Configure OpenCode browser-harness to default to existing ULAA browser session with active visible tab

未关闭
#166 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@SyedFahad7 已经在做这个了。

开始于 2026年9月29日。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
python, typescript
领域
devtools, web-dev

调研方向

Start with ~/.config/opencode/skills/browser-harness/tool.py and inspect the existing BU_CDP_URL, current_tab(), switch_tab(), activate_tab(), new_tab(), and goto_url() flows. Run the browser-harness commands against a running ULAA instance at http://localhost:9222; done means the active tab is attached and visible by default, navigation and actions are visibly performed, and new_tab() activates its tab without an environment variable.

由索引模型根据 Issue 内容生成。

描述

Summary

Configure the OpenCode browser-harness skill to strictly connect to the user's existing running ULAA browser (CDP at http://localhost:9222) and by default attach to/activate the currently active visible tab — matching BrowserCode's default behavior.

Current Behavior

  • browser-harness requires explicit BU_CDP_URL=http://localhost:9222 env var
  • new_tab() creates background tabs that aren't visually activated
  • switch_tab() attaches CDP but doesn't call Target.activateTarget by default
  • User must manually call activate_tab() to see actions

Desired Behavior (matching bcode)

  • Default to existing ULAA browser on port 9222 (no env var needed)
  • Automatically attach to current_tab() (the active visible tab)
  • Automatically call Target.activateTarget so actions are visible
  • new_tab() should activate the new tab by default
  • Zero-config: works out of the box with running ULAA

Technical Approach

  1. Modify ~/.config/opencode/skills/browser-harness/tool.py to inject BU_CDP_URL=http://localhost:9222 by default
  2. Update skill to auto-attach to active tab on first command
  3. Make activate_tab() the default for navigation actions
  4. Test end-to-end on running ULAA instance

Acceptance Criteria

  • No export BU_CDP_URL needed - works automatically
  • First command attaches to currently active ULAA tab
  • Navigation (goto_url) happens in the visible tab
  • Click/type actions are visibly performed in ULAA
  • new_tab() creates and activates a new visible tab
主要语言
TypeScript
星标
804
派生
95
平均合并
3 小时 13 分钟
30 天内合并 PR
6

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

browser-use/browsercode 的其他 Issue

查看 browser-use/browsercode 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。