dsh-chrome-use 0.19.0 → 0.19.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/CHANGELOG.md +7 -0
- package/extension/manifest.json +1 -1
- package/extension/tab-reference.js +10 -2
- package/package.json +1 -1
- package/src/client.js +1 -1
- package/src/index.js +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## [0.19.1] - 2026-11-30
|
|
4
|
+
|
|
5
|
+
### 修复
|
|
6
|
+
|
|
7
|
+
- 插件加载失败:`src/index.js` 用 `export { bridgeOptions } from './bridge-options.js'` 转出口,但 `apply()` 里直接调用 `bridgeOptions(...)`,本地作用域没有这个名字,0.19.0 一加载就抛 `ReferenceError: bridgeOptions is not defined`,所有 `chrome_*` 工具随之消失(#74)。改为显式 `import` 后再 `export`,并新增 `test/index.test.js` 直接调用 `apply()` 覆盖这条路径——以前所有测试都绕过 `apply()`,所以没抓到。
|
|
8
|
+
- 老版本浏览器 Service Worker 启动失败:`chrome.contextMenus.create()` 用了 `contexts: ['tab']`,这个枚举值 Chrome 148 才支持,143 及更早版本(含同内核的 Edge)会同步抛 `TypeError`,导致后台脚本一启动就崩、弹窗「连接」无反应(#75)。现在先按 `tab` 创建,抛错时回退到 `page`,右键菜单在页面右键里仍可复制标签页引用;`test/tab-reference.test.js` 用会抛错的假 `chrome.contextMenus` 覆盖回退分支。
|
|
9
|
+
|
|
3
10
|
## [0.19.0] - 2026-11-29
|
|
4
11
|
|
|
5
12
|
### 新增
|
package/extension/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifest_version": 3,
|
|
3
3
|
"name": "dsh-chrome-use",
|
|
4
4
|
"description": "Let DeepSeek Harness control Chrome tabs, with several agent sessions working in parallel.",
|
|
5
|
-
"version": "0.19.
|
|
5
|
+
"version": "0.19.1",
|
|
6
6
|
"minimum_chrome_version": "120",
|
|
7
7
|
"permissions": [
|
|
8
8
|
"debugger",
|
|
@@ -76,13 +76,21 @@ export async function copyTabReference(tab) {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export function createTabReferenceMenu() {
|
|
79
|
-
chrome.contextMenus.create({
|
|
79
|
+
const create = (contexts) => chrome.contextMenus.create({
|
|
80
80
|
id: TAB_REFERENCE_MENU_ID,
|
|
81
81
|
title: TAB_REFERENCE_MENU_TITLE,
|
|
82
|
-
contexts
|
|
82
|
+
contexts,
|
|
83
83
|
}, () => {
|
|
84
84
|
// The item survives service-worker restarts, so creating it again is
|
|
85
85
|
// expected; reading lastError keeps that out of the extension console.
|
|
86
86
|
void chrome.runtime.lastError;
|
|
87
87
|
});
|
|
88
|
+
try {
|
|
89
|
+
// "tab" (right-click on the tab strip) only exists from Chrome 148.
|
|
90
|
+
create(['tab']);
|
|
91
|
+
} catch {
|
|
92
|
+
// Older browsers throw on the unknown enum value, which used to abort the
|
|
93
|
+
// service worker at startup. A page-level item keeps the copy action usable.
|
|
94
|
+
create(['page']);
|
|
95
|
+
}
|
|
88
96
|
}
|
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -179,7 +179,7 @@ async function checkRelease(current, fetcher = fetch) {
|
|
|
179
179
|
} finally { clearTimeout(timer); }
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
const packageVersion = "0.19.
|
|
182
|
+
const packageVersion = "0.19.1";
|
|
183
183
|
// Wrapped by scripts/build-client.mjs for the Harness browser module loader.
|
|
184
184
|
const React = require('react');
|
|
185
185
|
const { createElement: h, useState, useEffect, useRef } = React;
|
package/src/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import { TOOLS, validateArgs } from '../extension/protocol.js';
|
|
|
10
10
|
import { failureFromError, formatFailure } from '../extension/failures.js';
|
|
11
11
|
import { buildIssueReport } from './report.js';
|
|
12
12
|
import { createKeepAwake } from './keep-awake.js';
|
|
13
|
+
import { bridgeOptions } from './bridge-options.js';
|
|
13
14
|
import { createRequire } from 'node:module';
|
|
14
15
|
|
|
15
16
|
// The issue report quotes the version the user is actually running.
|
|
@@ -18,7 +19,9 @@ const pluginVersion = createRequire(import.meta.url)('../package.json').version;
|
|
|
18
19
|
export const name = 'dsh-chrome-use';
|
|
19
20
|
export const inject = ['tools'];
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
// Re-exporting keeps the module's public surface; the browser options are also
|
|
23
|
+
// needed inside apply(), which is why the import above cannot rely on this line.
|
|
24
|
+
export { bridgeOptions };
|
|
22
25
|
|
|
23
26
|
// Diagnostics stay available even in a narrowed deployment: without them a
|
|
24
27
|
// harness cannot explain why a tool is missing.
|