dsh-code-server-app 0.3.35 → 0.3.37
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.
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
| react | 18.3.1 | MIT |
|
|
12
12
|
| react-dom | 18.3.1 | MIT |
|
|
13
13
|
|
|
14
|
-
生成时间:2026-09-13T12:
|
|
14
|
+
生成时间:2026-09-13T12:38:24.712Z
|
|
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/bridge-approval.mjs
CHANGED
|
@@ -137,13 +137,24 @@ export function createApprovalInterceptor(deps) {
|
|
|
137
137
|
*/
|
|
138
138
|
async function waitForDecision(decision) {
|
|
139
139
|
const deadline = Date.now() + holdMs;
|
|
140
|
+
let loggedStillWaiting = false;
|
|
140
141
|
for (;;) {
|
|
141
142
|
const remaining = deadline - Date.now();
|
|
142
|
-
if (remaining <= 0)
|
|
143
|
+
if (remaining <= 0) {
|
|
144
|
+
log('等待期间没人作答:窗口到点,交回 DSH 界面');
|
|
145
|
+
return undefined;
|
|
146
|
+
}
|
|
143
147
|
const outcome = await Promise.race([decision, sleep(Math.min(pollMs, remaining))]);
|
|
144
148
|
if (outcome !== undefined) return outcome;
|
|
145
149
|
// 面板关掉了(用户关掉 webview / 换了会话)→ 立刻交回官方链路,不干等窗口结束。
|
|
146
|
-
if (!hasPanel())
|
|
150
|
+
if (!hasPanel()) {
|
|
151
|
+
log('等待期间判据翻成 false(不再有人看):立刻交回 DSH 界面 —— 若卡片因此跑到 DSH 侧,这就是原因');
|
|
152
|
+
return undefined;
|
|
153
|
+
}
|
|
154
|
+
if (!loggedStillWaiting) {
|
|
155
|
+
loggedStillWaiting = true;
|
|
156
|
+
log('已接住授权,正在等面板/对话框作答(此后再翻 false 会立刻放手)');
|
|
157
|
+
}
|
|
147
158
|
}
|
|
148
159
|
}
|
|
149
160
|
|
|
@@ -191,7 +202,12 @@ export function createApprovalInterceptor(deps) {
|
|
|
191
202
|
if (registered.has(agent)) return registered.get(agent);
|
|
192
203
|
let dispose = () => {};
|
|
193
204
|
try {
|
|
194
|
-
|
|
205
|
+
// **必须 prepend**(0.3.36):DSH 的客户端审批卡片是一个更早注册的 waterfall 监听器
|
|
206
|
+
// (packages/client/ui-approval/src/client/index.ts:90 的 ctx.remote.$on),它在用户点击前不会返回
|
|
207
|
+
// ⇒ 我们的监听器排在他后面就永远轮不到(实测:日志里连 hasPanel() 都没被调用过)。
|
|
208
|
+
// prepend 之后我们排在最前:能答就答,答不了 next() 原样交回官方卡片。
|
|
209
|
+
// 派发点与作用域见 packages/interaction/user-approval/src/index.ts:275(scopeTarget(req.agent, req.agent))。
|
|
210
|
+
const result = scope.on('approval/request', handle, { prepend: true });
|
|
195
211
|
if (typeof result === 'function') dispose = result;
|
|
196
212
|
} catch (err) {
|
|
197
213
|
log(`注册授权拦截失败(${sessionId}):${err && err.message ? err.message : String(err)}`);
|
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.37",
|
|
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-13T12:
|
|
6
|
+
"preparedAt": "2026-09-13T12:38:23.539Z",
|
|
7
7
|
"source": "registry",
|
|
8
8
|
"node": "v24.21.0",
|
|
9
9
|
"platform": "win32",
|