Skip to content

feat(browser): add browser_open_window to open and follow a new window - #125

Open
zzalancelot wants to merge 1 commit into
omdsh-dev:mainfrom
zzalancelot:feat/browser-open-window
Open

zzalancelot wants to merge 1 commit into
omdsh-dev:mainfrom
zzalancelot:feat/browser-open-window

Conversation

@zzalancelot

Copy link
Copy Markdown
Contributor

Mirror browser_open_tab via chrome.windows.create so agents can open a URL in a new browser window and bind its tab as the controlled target.

Summary

Add browser_open_window so the agent can open an HTTP(S) URL in a new browser window and make that window’s tab the controlled target.

Motivation

browser_open_tab only opens a tab in the current window. Some workflows need a separate window (isolation, multi-monitor, or keeping the current window undisturbed). This mirrors the open-tab path with chrome.windows.create.

Changes

  • Register browser_open_window on the bridge tool surface (url, optional focused)
  • Implement dispatchOpenWindow in the extension: blank window → arm readiness → navigate → rebind affinity → optional snapshot
  • Wire authorization prompts, trusted-origins trust, panel tool labels, and READMEs
  • Add unit coverage for dispatch, approval copy, panel summaries, and bridge registration

Testing

  • pnpm run typecheck
  • pnpm run test (extension + bridge-browser)
  • Manual: ask the agent to open a URL in a new window and confirm control transfers to that window’s tab
  • Manual: focused: false opens without stealing focus

Impact

  • Chrome / Firefox extension users and DSH agents that use browser tools
  • No change to existing browser_open_tab behavior; prefer that tool when a same-window tab is enough

Checklist

  • Tested on the relevant platforms
  • Passed basic checks (pnpm run typecheck / pnpm run test)
  • Docs updated if needed
  • No unrelated changes included

Mirror browser_open_tab via chrome.windows.create so agents can open a URL in a new browser window and bind its tab as the controlled target.
graydovee added a commit to graydovee/dsh-browser that referenced this pull request Oct 19, 2026
Upstream-PR: omdsh-dev#125
Source: origin/pr/125 @ 2c12f81
Author: zhaozian <1161954287@qq.com>
Adaptation: 工具描述字符预算随工具数扩容到 1650,并补每工具平均 <105 字符断言
graydovee added a commit to graydovee/dsh-browser that referenced this pull request Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant