dsh-chrome-bridge 1.16.0 → 1.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -19,8 +19,8 @@ Requirements: macOS, Windows or Linux, Chrome 116+, Node.js 18+.
19
19
 
20
20
  ## Updating / 更新
21
21
 
22
- Uninstall the plugin on the Plugins page and add it again. A new version can be installed by package name about a day after it is released, because the pnpm that DSH uses skips brand-new versions by default.
22
+ On DSH 0.2.2 or later, open the plugin on the Plugins page and click "Update to …". On older DSH, uninstall it and add it again. A new version can be installed about a day after it is released, because the pnpm that DSH uses skips brand-new versions by default.
23
23
 
24
- 在「插件」页把它卸载,再添加一次。DSH 用 pnpm 安装插件,而 pnpm 默认不装刚发布的版本,所以新版大约发布一天后,按包名才能装到。
24
+ DSH 0.2.2 起,在「插件」页点开它,点「更新到 …」;更老的 DSH 先卸载,再添加一次。DSH 用 pnpm 安装插件,而 pnpm 默认不装刚发布的版本,所以新版大约发布一天后才装得到。
25
25
 
26
26
  Full documentation / 完整说明:https://github.com/OrderG-X/dsh-chrome-bridge
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-chrome-bridge",
3
- "version": "1.16.0",
3
+ "version": "1.16.2",
4
4
  "description": "DSH plugin: native browser_* tools that drive the Chrome you are already using, over native messaging + CDP. No WebSocket, no port, no Connect button. The native host and the MV3 extension ship inside this package and are installed automatically on first load; the one step left is adding the DSH Bridge extension to Chrome, from the Chrome Web Store or as the bundled unpacked copy. Until then browser_* tools fail loudly with those exact steps.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1041,12 +1041,15 @@ const OPS = {
1041
1041
  let focusedWin = null
1042
1042
  try { focusedWin = (await chrome.windows.getLastFocused()).id } catch {}
1043
1043
  const agentWins = await agentWindowIds()
1044
+ // 刚开、服务器还没回第一个字节的页 url 是空的,要去的地址在 pendingUrl:不算上的话,刚开的慢页列不出来,
1045
+ // 不传 tab 接着操作它也会报「没指定标签页」
1044
1046
  return tabs
1045
- .filter(t => t.url && !t.url.startsWith('chrome-extension://'))
1046
- .map(t => ({
1047
+ .map(t => ({ t, url: t.url || t.pendingUrl || '' }))
1048
+ .filter(({ url }) => url && !url.startsWith('chrome-extension://'))
1049
+ .map(({ t, url }) => ({
1047
1050
  id: t.id, windowId: t.windowId, active: t.active, pinned: t.pinned,
1048
1051
  focused: t.windowId === focusedWin, agentWindow: agentWins.has(t.windowId),
1049
- title: t.title, url: t.url, attached: attached.has(t.id),
1052
+ title: t.title, url, attached: attached.has(t.id),
1050
1053
  // 这个标签页是不是被我们自动分进「🖱 DSH agent」组(面板和自检都用得上)
1051
1054
  grouped: groupedTabs.has(t.id), groupId: t.groupId >= 0 ? t.groupId : null,
1052
1055
  }))
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "DSH Bridge",
4
- "version": "1.13.0",
4
+ "version": "1.13.1",
5
5
  "description": "DSH 原生浏览器控制桥:装一次永久可用,不需要点 Connect",
6
6
  "minimum_chrome_version": "116",
7
7
  "icons": {