dsh-code-server-app 0.3.27 → 0.3.28
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.
|
@@ -62,6 +62,8 @@ let askPanel = null;
|
|
|
62
62
|
let askDialogSupported = false;
|
|
63
63
|
/** 上一份对话流快照(host 只在变化时回传,这里兜住"没变化"的那些轮询)。 */
|
|
64
64
|
let lastThreadSnapshot;
|
|
65
|
+
/** 上一份对话流修订号(随请求上报,告诉 host 本扩展懂修订号协议)。 */
|
|
66
|
+
let lastThreadRev = 0;
|
|
65
67
|
/** 扩展根目录(activate 时记下;面板要按它取 webview 产物 URI)。 */
|
|
66
68
|
let extensionRoot = null;
|
|
67
69
|
/** 是否已经确认过 host 端点可达(避免把"IDE 刚起、扩展先加载"误判为断线)。 */
|
|
@@ -371,6 +373,9 @@ async function pollOnce() {
|
|
|
371
373
|
// 并用"有没有人在看"决定授权请求是先问面板还是直接交给 DSH 界面
|
|
372
374
|
// (见 host 侧 lib/bridge-thread.mjs / lib/bridge-approval.mjs)。
|
|
373
375
|
watch: askPanel !== null && askPanel.state.sessionId !== null ? [askPanel.state.sessionId] : [],
|
|
376
|
+
// 声明"本扩展懂对话流修订号"(0.2.9):host 才会在没变化时省略 thread 省流量。
|
|
377
|
+
// 不声明(旧扩展)时 host 照旧发整份快照 —— 否则旧扩展会误报"宿主没有对话流能力"。
|
|
378
|
+
threadRev: lastThreadRev,
|
|
374
379
|
};
|
|
375
380
|
const result = await client.sync(payload);
|
|
376
381
|
if (result.ok !== true) {
|
|
@@ -406,6 +411,7 @@ async function pollOnce() {
|
|
|
406
411
|
? result.thread
|
|
407
412
|
: (result.threadRev !== undefined ? lastThreadSnapshot : undefined);
|
|
408
413
|
if (result.thread !== undefined) lastThreadSnapshot = result.thread;
|
|
414
|
+
if (Number.isSafeInteger(result.threadRev)) lastThreadRev = result.threadRev;
|
|
409
415
|
if (applySync(askPanel.state, { ...result, thread })) refreshAskPanel();
|
|
410
416
|
}
|
|
411
417
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "dshcs-editor-bridge",
|
|
3
3
|
"displayName": "DSH Editor Bridge",
|
|
4
4
|
"description": "只读地把编辑器状态(未保存缓冲区、诊断、活动选区)提供给 DSH;右键提问打开 DSH 页面里的悬浮对话对话框(0.2.5;老宿主退回编辑器面板),正文/思考/上下文都用 DSH 官方渲染器,并可就地回答授权请求。由 dsh-code-server-app 插件安装,可禁用。",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.9",
|
|
6
6
|
"publisher": "dsh-code-server-app",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"private": true,
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
| react | 18.3.1 | MIT |
|
|
12
12
|
| react-dom | 18.3.1 | MIT |
|
|
13
13
|
|
|
14
|
-
生成时间:2026-09-13T09:
|
|
14
|
+
生成时间:2026-09-13T09:49:25.226Z
|
|
15
15
|
渲染器:@deepseek-ai/dsh-client-ui-primitives@0.1.5-rc.2(DSH 部署的界面版本:0.1.5-rc.2)
|
|
16
16
|
设计令牌:@deepseek-ai/dsh-client-ui-theme@0.1.5-rc.2(11 段)
|
|
17
17
|
KaTeX:已打包(公式排版与 DSH 界面一致)
|
package/lib/index.js
CHANGED
|
@@ -1907,7 +1907,10 @@ export async function apply(ctx, config) {
|
|
|
1907
1907
|
const snapshot = bridgeThread.supported()
|
|
1908
1908
|
? bridgeThread.snapshot(watchedSessions())
|
|
1909
1909
|
: { available: false, sessionId: null, cursor: null, rev: 0, entries: [], error: '宿主没有 sessionController.follow(DSH 版本过旧)' };
|
|
1910
|
-
|
|
1910
|
+
// **只对"懂修订号"的扩展省流量**(0.3.28):旧扩展(≤0.2.7)不知道 threadRev,一旦收到省略了
|
|
1911
|
+
// thread 的响应就会以为"宿主没有对话流能力"(面板真的会这么报错)。所以对旧扩展照旧发整份快照。
|
|
1912
|
+
const peerUnderstandsRev = Number.isSafeInteger(body.threadRev);
|
|
1913
|
+
const threadChanged = threadRev !== bridgeThreadRevSent || snapshot.available === false || !peerUnderstandsRev;
|
|
1911
1914
|
bridgeThreadRevSent = threadRev;
|
|
1912
1915
|
// 对话流走独立字段:每个会话给有界条目(见 lib/bridge-thread.mjs),
|
|
1913
1916
|
// 授权待决列表也一并回去(面板显示卡片)。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-code-server-app",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.28",
|
|
4
4
|
"description": "VS Code (from a code-server release) inside DSH: a right-sidebar tab driven by the plugin's own launcher over the in-process VS Code server (lib/launcher.mjs). Since 0.3.0 the bundle also ships an editor bridge (assets/extensions/dshcs-editor-bridge): a read-only channel between the in-tree VS Code extension host and DSH, giving the agent what only the editor knows (unsaved buffers, language-server diagnostics, the active selection) and letting editor gestures drive the session. Since 0.3.22 the ask panel renders that session's new content with DSH's own Markdown renderer (pinned to the deployed DSH UI version); since 0.3.23 it is a full-width dialog with collapsible thinking rows and can answer approval requests in place — the bridge's only non-read-only route (POST /approve, constrained to pending in-process requests and the outcomes allowed-once/rejected; panel-first for 5 minutes, handed back to the official card the moment the panel closes). The tab claims DSH file addresses (dsh-resource://file/**) by file type (setting claimExtensions), so the product's own produced-file chips, delivered-file previews and inline prose mentions open in the workbench. The IDE is a resident surface moved with Element.moveBefore instead of being remounted, so switching sidebar tabs no longer reloads it. Opening the tab switches the right sidebar to fullscreen by default (setting fullscreenOnOpen). Following a workspace switch is lightweight: the workbench re-navigates with the new ?folder= and the IDE process is not restarted (since 0.2.12). Requires a DSH with the right-sidebar services (sidebarRightTabs/sidebarRight, >= 0.1.5-alpha.1); older DSH versions get a single upgrade notice on the settings page and no other UI. Two serving modes: loopback port (default) or same-origin mount on DSH's own webServer (/code-server, protected by ctx.connection.requestRejection). No code-server Node layer, no argon2, no C++ toolchain.",
|
|
5
5
|
"homepage": "https://github.com/jinsiyu/dsh-code-server-app",
|
|
6
6
|
"repository": {
|
package/vendor/VENDOR.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"vscodeVersion": "1.137.0",
|
|
4
4
|
"productPath": "stable-b11dabdaca0d3369986975be285db92c8795cea5",
|
|
5
5
|
"layout": "vscode-only",
|
|
6
|
-
"preparedAt": "2026-09-13T09:
|
|
6
|
+
"preparedAt": "2026-09-13T09:49:24.072Z",
|
|
7
7
|
"source": "registry",
|
|
8
8
|
"node": "v24.21.0",
|
|
9
9
|
"platform": "win32",
|