dsh-code-server-app 0.3.42 → 0.3.44
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/assets/extensions/dshcs-editor-bridge/lib/ask-panel.js +3 -0
- package/assets/extensions/dshcs-editor-bridge/package.json +1 -1
- package/assets/extensions/dshcs-editor-bridge/webview/THIRD-PARTY.md +1 -1
- package/assets/extensions/dshcs-editor-bridge/webview/src/app.jsx +11 -3
- package/assets/extensions/dshcs-editor-bridge/webview/src/thread.jsx +11 -2
- package/assets/extensions/dshcs-editor-bridge/webview/thread.js +48 -48
- package/lib/bridge-thread.mjs +13 -0
- package/package.json +1 -1
- package/vendor/VENDOR.json +1 -1
package/lib/bridge-thread.mjs
CHANGED
|
@@ -160,6 +160,17 @@ export function applyEvent(state, event) {
|
|
|
160
160
|
if (event.type === 'user/message') {
|
|
161
161
|
const text = partsOfContent(data.content).text;
|
|
162
162
|
if (text === '') return false;
|
|
163
|
+
// **消息来源**(0.3.43):别的工具注入的上下文也被 DSH 记成 user/message,但它们的 source
|
|
164
|
+
// 不是 `{kind:'user'}`(官方界面按"上下文注入"折叠显示)。面板照做:只有 kind==='user'
|
|
165
|
+
// 才是用户气泡,其余的渲染成折叠的「上下文注入」。
|
|
166
|
+
const source = data.source ?? data.message?.source ?? null;
|
|
167
|
+
const sourceKind = source !== null && typeof source === 'object' && typeof source.kind === 'string'
|
|
168
|
+
? source.kind
|
|
169
|
+
: 'user';
|
|
170
|
+
if (sourceKind !== 'user') {
|
|
171
|
+
push(state, { role: 'user', text, sourceKind, context: '' });
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
163
174
|
// 桥自己拼的消息(位置行 + 选区代码块 + 用户原话)拆开:上下文折叠显示,气泡只留原话。
|
|
164
175
|
// 认不出来(用户在 DSH 界面里自己敲的)→ 整段当原话。
|
|
165
176
|
const { context, question } = splitEditorPrompt(text);
|
|
@@ -278,6 +289,8 @@ export function threadSnapshot(state) {
|
|
|
278
289
|
summary: entry.summary ?? null,
|
|
279
290
|
status: entry.status ?? null,
|
|
280
291
|
approvalId: entry.approvalId ?? null,
|
|
292
|
+
// 消息来源(0.3.43):'' / null = 用户自己说的;其它值(plugin 等)= 上下文注入,面板折叠显示。
|
|
293
|
+
sourceKind: entry.sourceKind ?? null,
|
|
281
294
|
})),
|
|
282
295
|
};
|
|
283
296
|
}
|
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.44",
|
|
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-13T13:
|
|
6
|
+
"preparedAt": "2026-09-13T13:24:33.857Z",
|
|
7
7
|
"source": "registry",
|
|
8
8
|
"node": "v24.21.0",
|
|
9
9
|
"platform": "win32",
|