dsh-chrome-bridge 1.16.0 → 1.16.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-chrome-bridge",
3
- "version": "1.16.0",
3
+ "version": "1.16.1",
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": {