dsh-vt-web-chat 1.2.0 → 1.2.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/README.md +1 -1
- package/client.js +8 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
1. **插件市场(推荐)**:在「插件 → 发现 → 添加索引源」里填入
|
|
34
34
|
`https://vontean.github.io/vt-dsh-plugin/index.json`,找到「网页对话」点安装。
|
|
35
|
-
2. **npm**:`dsh plugin --profile <profile> add dsh-vt-web-chat@1.2.
|
|
35
|
+
2. **npm**:`dsh plugin --profile <profile> add dsh-vt-web-chat@1.2.1`。
|
|
36
36
|
3. **Release tarball**:从 GitHub Release 下载 `.tgz`,再执行
|
|
37
37
|
`dsh plugin --profile <profile> add <该 .tgz 的本地路径或 URL>`。
|
|
38
38
|
|
package/client.js
CHANGED
|
@@ -31,7 +31,7 @@ window.__ModuleLoader__.load({
|
|
|
31
31
|
/** Package identity: one source for the module id and every log/storage prefix. */
|
|
32
32
|
const PLUGIN_ID = 'dsh-vt-web-chat';
|
|
33
33
|
/** Must equal `version` in package.json; printed once in the mount trace below. */
|
|
34
|
-
const VERSION = '1.2.
|
|
34
|
+
const VERSION = '1.2.1';
|
|
35
35
|
|
|
36
36
|
// Mount trace: one line naming the loaded build (DevTools → verbose level).
|
|
37
37
|
console.debug(`[${PLUGIN_ID}] v${VERSION}`);
|
|
@@ -86,7 +86,7 @@ window.__ModuleLoader__.load({
|
|
|
86
86
|
crashed: '内嵌页面已退出',
|
|
87
87
|
retry: '重试',
|
|
88
88
|
unsupportedTitle: '需要桌面版 App',
|
|
89
|
-
unsupportedBody: '
|
|
89
|
+
unsupportedBody: '网页对话依赖桌面端的内嵌浏览器(桥接协议 v1)。当前环境要么不是桌面版,要么桌面壳的协议版本与插件不一致。请在浏览器新标签中打开,或把 DSH 升级到与插件匹配的版本。',
|
|
90
90
|
openExternal: '在浏览器打开',
|
|
91
91
|
signInHint: '登录状态只在本次运行中保留;重启 DSH 后需要重新登录。',
|
|
92
92
|
signInAction: '在系统浏览器登录',
|
|
@@ -101,7 +101,7 @@ window.__ModuleLoader__.load({
|
|
|
101
101
|
retry: 'Retry',
|
|
102
102
|
unsupportedTitle: 'Desktop app required',
|
|
103
103
|
unsupportedBody:
|
|
104
|
-
'Web Chat
|
|
104
|
+
'Web Chat needs the desktop embedded browser (bridge protocol v1). This environment is either not the desktop app, or its shell speaks a different protocol version. Open it in a browser tab instead, or update DSH to match this plugin.',
|
|
105
105
|
openExternal: 'Open in browser',
|
|
106
106
|
signInHint:
|
|
107
107
|
'Your sign-in lasts only for this app run; restarting DSH requires signing in again.',
|
|
@@ -553,7 +553,11 @@ window.__ModuleLoader__.load({
|
|
|
553
553
|
|
|
554
554
|
React.useEffect(() => {
|
|
555
555
|
const host = hostRef.current;
|
|
556
|
-
|
|
556
|
+
// 桌面壳用 protocolVersion 声明这套桥接契约的版本。内置侧边栏浏览器也做同样的
|
|
557
|
+
// 判断(dsh-client-ui-sidebar-browser 的 carrier?.protocolVersion === 1)。不校验的话,
|
|
558
|
+
// 一旦壳升版,这里会拿到形状不对的对象,表现为「打不开、重试」而看不出原因。
|
|
559
|
+
const carrier = globalThis.dshDesktop;
|
|
560
|
+
const bridge = carrier?.protocolVersion === 1 ? carrier.browser : undefined;
|
|
557
561
|
if (host === null) return undefined;
|
|
558
562
|
if (bridge === undefined) {
|
|
559
563
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-vt-web-chat",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Adds a Web Chat entry under New Session that opens chat.deepseek.com as a full main-area panel in the desktop embedded browser, remembers the last conversation, starts with the site sidebar collapsed and keeps the site's environment warning dismissed.",
|
|
6
6
|
"license": "MIT",
|