@chatcode/chatcode-cli 3.0.4-rc.5 → 3.0.4-rc.7

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.
Files changed (53) hide show
  1. package/README.i18n.yaml +4 -4
  2. package/README.md +4 -2
  3. package/README.zh.md +4 -2
  4. package/lib/bin.js +3 -3
  5. package/lib/{command-errors-BJ_ZWzUU.js → command-errors-Ca64Lgba.js} +12 -12
  6. package/lib/{command-trees-C9b7-bci.js → command-trees-CVc4Xu_z.js} +2 -2
  7. package/lib/{component-identity-Jb1DYjke.js → component-identity-6aEut5Yt.js} +3 -3
  8. package/lib/dump-config-CDixiJNt.js +2 -0
  9. package/lib/{dump-config-BcH-VYuv.js → dump-config-ZzrfvtnX.js} +10 -6
  10. package/lib/{dump-config-schema-DM0fb6Ns.js → dump-config-schema-BlO-eZ-J.js} +2 -2
  11. package/lib/{extension-events-DKX4LXOd.js → extension-events-C7MUpqVE.js} +20 -20
  12. package/lib/headless-compat.js +31 -31
  13. package/lib/{host-access-CMg6rsWt.js → host-access-CLbyAGT5.js} +1 -1
  14. package/lib/{keymap-CrC4pSNH.js → keymap-82JwLLHe.js} +2 -2
  15. package/lib/{plugin-eJjD6r12.js → plugin-BZdazFXS.js} +1 -1
  16. package/lib/{plugin-CmyMCGfb.js → plugin-BlQlWIR5.js} +425 -451
  17. package/lib/{profile-boot-BNQry1NM.js → profile-boot-B0aEEQIR.js} +40 -11
  18. package/lib/profile-boot.js +2 -2
  19. package/lib/{scenes-Cil9RnwU.js → scenes-BNS0ZFyQ.js} +3 -3
  20. package/lib/{settings-sections-jVCqXwdH.js → settings-sections-CXH24cu5.js} +3 -3
  21. package/lib/{statusBarSettings-DNoBH3Cq.js → statusBarSettings-BAMzn8fX.js} +6 -6
  22. package/lib/{themes-BdgeY3It.js → themes-DXUIvP7m.js} +12 -12
  23. package/lib/tui-compat-command-trees.js +1 -1
  24. package/lib/tui-compat-extensions.js +3 -3
  25. package/lib/tui-compat-plugin-host.js +5 -5
  26. package/lib/tui-compat-scenes.js +1 -1
  27. package/lib/tui-compat-settings-sections.js +1 -1
  28. package/lib/tui-compat-working-activity.js +17 -17
  29. package/lib/tui-compat-workspaces.js +1 -1
  30. package/lib/tui-compat.js +39 -39
  31. package/lib/types/dump-config.d.ts +3 -3
  32. package/lib/types/profile-boot.d.ts +13 -3
  33. package/lib/{workspaces-DOatJRYr.js → workspaces-CUJXNU5W.js} +2 -2
  34. package/package.json +28 -28
  35. package/runtime/manifest.json +1 -1
  36. package/runtime/node_modules/@deepseek-ai/cordis-plugin-loader/lib/index.js +1 -1
  37. package/runtime/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/entry.ts +1 -1
  38. package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +5 -1
  39. package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/types/profile-context.d.ts +2 -0
  40. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +2 -2
  41. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
  42. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +3 -1
  43. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +17 -159
  44. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/ArchivedSessions.d.ts +1 -2
  45. package/runtime/node_modules/@deepseek-ai/dsh-config-editor/lib/index.js +5 -1
  46. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{index-Dz_cDcce.js → index-D-8yUukj.js} +24 -24
  47. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{index-Dz_cDcce.js.map → index-D-8yUukj.js.map} +1 -1
  48. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +1 -1
  49. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/preview.html +1 -1
  50. package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/index.js +32 -29
  51. package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/index.d.ts +0 -2
  52. package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/index.js +39 -30
  53. package/lib/dump-config-CyopmD85.js +0 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chatcode/chatcode-cli",
3
3
  "description": "ChatCode CLI: TUI-first coding agent, Web launcher, profiles, and legacy DSH-compatible plugins",
4
- "version": "3.0.4-rc.5",
4
+ "version": "3.0.4-rc.7",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -28,15 +28,15 @@
28
28
  "dependencies": {
29
29
  "@agentclientprotocol/sdk": "1.4.0",
30
30
  "@babel/code-frame": "^7.29.0",
31
- "@chatcode/cco-better-sidebar": "0.18.0-rc.8",
31
+ "@chatcode/cco-better-sidebar": "0.18.0-rc.11",
32
32
  "@chatcode/cco-builtin-browser": "0.1.21",
33
33
  "@chatcode/cco-chat-import": "0.17.0",
34
34
  "@chatcode/cco-computer-use": "0.3.2",
35
35
  "@chatcode/cco-llm-chatcode-config": "0.1.4-rc.9",
36
36
  "@chatcode/cco-market": "1.45.2-rc.4",
37
- "@chatcode/cco-tui": "0.10.0-rc.20",
37
+ "@chatcode/cco-tui": "0.10.0-rc.21",
38
38
  "@deepseek-ai/libreoffice-kit": "^0.1.1",
39
- "@deepseek-harness-tui/dsh-tui": "npm:@chatcode/cco-tui@0.10.0-rc.20",
39
+ "@deepseek-harness-tui/dsh-tui": "npm:@chatcode/cco-tui@0.10.0-rc.21",
40
40
  "@earendil-works/pi-ai": "^0.85.1",
41
41
  "@eslint-community/regexpp": "^4.12.2",
42
42
  "@joplin/turndown-plugin-gfm": "^1.0.67",
@@ -58,7 +58,7 @@
58
58
  "commander": "^15.0.0",
59
59
  "compression": "^1.8.1",
60
60
  "diff": "^9.0.0",
61
- "dsh-better-sidebar": "npm:@chatcode/cco-better-sidebar@0.18.0-rc.8",
61
+ "dsh-better-sidebar": "npm:@chatcode/cco-better-sidebar@0.18.0-rc.11",
62
62
  "dsh-builtin-browser": "npm:@chatcode/cco-builtin-browser@0.1.21",
63
63
  "dsh-chat-import": "npm:@chatcode/cco-chat-import@0.17.0",
64
64
  "dsh-computer-use": "npm:@chatcode/cco-computer-use@0.3.2",
@@ -96,47 +96,47 @@
96
96
  "ajv": "^8.20.0",
97
97
  "execa": "^10.0.0",
98
98
  "ws": "8.21.0",
99
- "@deepseek-ai/dsh-acp": "0.1.7-rc.2",
100
99
  "@deepseek-ai/dsh-agent": "0.1.7-rc.2",
101
- "@deepseek-ai/dsh-agent-loop-testkit": "0.1.7-rc.2",
100
+ "@deepseek-ai/dsh-acp": "0.1.7-rc.2",
102
101
  "@deepseek-ai/dsh-bash-local": "0.1.7-rc.2",
102
+ "@deepseek-ai/dsh-attachment-local": "0.1.7-rc.2",
103
103
  "@deepseek-ai/dsh-credentials-local": "0.1.7-rc.2",
104
+ "@deepseek-ai/dsh-agent-loop-testkit": "0.1.7-rc.2",
105
+ "@deepseek-ai/dsh-deepseek-llm-api-extensions": "0.1.7-rc.2",
104
106
  "@deepseek-ai/dsh-agent-loop": "0.1.7-rc.2",
105
- "@deepseek-ai/dsh-attachment-local": "0.1.7-rc.2",
107
+ "@deepseek-ai/dsh-experimental-tool-agent-team": "0.1.7-rc.2",
106
108
  "@deepseek-ai/dsh-experimental-agent-team": "0.1.7-rc.2",
107
- "@deepseek-ai/dsh-fs-sandbox": "0.1.7-rc.2",
108
- "@deepseek-ai/dsh-deepseek-llm-api-extensions": "0.1.7-rc.2",
109
109
  "@deepseek-ai/dsh-fs-observation-policy": "0.1.7-rc.2",
110
110
  "@deepseek-ai/dsh-experimental-ptc-runtime-python": "0.1.7-rc.2",
111
- "@deepseek-ai/dsh-host-frontend-static": "0.1.7-rc.2",
112
111
  "@deepseek-ai/dsh-host-webserver": "0.1.7-rc.2",
112
+ "@deepseek-ai/dsh-host-frontend-static": "0.1.7-rc.2",
113
113
  "@deepseek-ai/dsh-llm": "0.1.7-rc.2",
114
- "@deepseek-ai/dsh-llm-deepseek": "0.1.7-rc.2",
115
- "@deepseek-ai/dsh-llm-mock-server": "0.1.7-rc.2",
114
+ "@deepseek-ai/dsh-llm-deepseek-api-key": "0.1.7-rc.2",
115
+ "@deepseek-ai/dsh-fs-sandbox": "0.1.7-rc.2",
116
116
  "@deepseek-ai/dsh-llm-pi-ai": "0.1.7-rc.2",
117
- "@deepseek-ai/dsh-experimental-tool-agent-team": "0.1.7-rc.2",
118
- "@deepseek-ai/dsh-sandbox-local": "0.1.7-rc.2",
119
- "@deepseek-ai/dsh-sdk-client": "0.1.7-rc.2",
120
117
  "@deepseek-ai/dsh-llm-deepseek-account": "0.1.7-rc.2",
121
- "@deepseek-ai/dsh-session-checkpoint-policy": "0.1.7-rc.2",
118
+ "@deepseek-ai/dsh-loader-smoke": "0.1.7-rc.2",
119
+ "@deepseek-ai/dsh-llm-replay": "0.1.7-rc.2",
120
+ "@deepseek-ai/dsh-llm-mock-server": "0.1.7-rc.2",
121
+ "@deepseek-ai/dsh-llm-deepseek": "0.1.7-rc.2",
122
122
  "@deepseek-ai/dsh-plugin-package-inventory-deepseek": "0.1.7-rc.2",
123
- "@deepseek-ai/dsh-session-log-deepseek": "0.1.7-rc.2",
124
- "@deepseek-ai/dsh-sandbox-policy": "0.1.7-rc.2",
123
+ "@deepseek-ai/dsh-sandbox-local": "0.1.7-rc.2",
125
124
  "@deepseek-ai/dsh-session": "0.1.7-rc.2",
126
- "@deepseek-ai/dsh-llm-deepseek-api-key": "0.1.7-rc.2",
127
- "@deepseek-ai/dsh-loader-smoke": "0.1.7-rc.2",
128
125
  "@deepseek-ai/dsh-session-persistence-jsonl": "0.1.7-rc.2",
126
+ "@deepseek-ai/dsh-session-log-deepseek": "0.1.7-rc.2",
127
+ "@deepseek-ai/dsh-session-checkpoint-policy": "0.1.7-rc.2",
129
128
  "@deepseek-ai/dsh-session-query": "0.1.7-rc.2",
129
+ "@deepseek-ai/dsh-sandbox-policy": "0.1.7-rc.2",
130
+ "@deepseek-ai/dsh-settings": "0.1.7-rc.2",
131
+ "@deepseek-ai/dsh-subprocess-local": "0.1.7-rc.2",
130
132
  "@deepseek-ai/dsh-shell-env": "0.1.7-rc.2",
131
- "@deepseek-ai/dsh-llm-replay": "0.1.7-rc.2",
133
+ "@deepseek-ai/dsh-sdk-client": "0.1.7-rc.2",
134
+ "@deepseek-ai/dsh-system-prompt": "0.1.7-rc.2",
135
+ "@deepseek-ai/dsh-tools": "0.1.7-rc.2",
132
136
  "@deepseek-ai/dsh-subagent-fork-in-process": "0.1.7-rc.2",
133
- "@deepseek-ai/dsh-settings": "0.1.7-rc.2",
134
- "@deepseek-ai/dsh-subagent-spawn-in-process": "0.1.7-rc.2",
135
137
  "@deepseek-ai/dsh-subagent": "0.1.7-rc.2",
136
- "@deepseek-ai/dsh-system-prompt": "0.1.7-rc.2",
137
- "@deepseek-ai/dsh-subprocess-local": "0.1.7-rc.2",
138
- "@deepseek-ai/dsh-user-approval": "0.1.7-rc.2",
139
- "@deepseek-ai/dsh-tools": "0.1.7-rc.2"
138
+ "@deepseek-ai/dsh-subagent-spawn-in-process": "0.1.7-rc.2",
139
+ "@deepseek-ai/dsh-user-approval": "0.1.7-rc.2"
140
140
  },
141
141
  "exports": {
142
142
  "./headless-compat": {
@@ -283,5 +283,5 @@
283
283
  "@deepseek-ai/schemastery"
284
284
  ],
285
285
  "fileCount": 3611,
286
- "byteCount": 68769077
286
+ "byteCount": 68765291
287
287
  }
@@ -393,7 +393,6 @@ var Entry = class Entry {
393
393
  _commitVolatile() {
394
394
  const fiber = this.fiber;
395
395
  const refs = volatileEntries(fiber.config);
396
- if (!refs.length) return true;
397
396
  const raw = this.options.config;
398
397
  let candidate;
399
398
  try {
@@ -403,6 +402,7 @@ var Entry = class Entry {
403
402
  this.ctx.logger.warn(error);
404
403
  return true;
405
404
  }
405
+ if (!refs.length) return deepEqual(fiber.config, candidate, true);
406
406
  if (!deepEqual(fiber.config, candidate, true)) {
407
407
  this.ctx.logger.debug("ordinary config values of %C changed with its volatile values; applying the ordinary update", this.options.id);
408
408
  return false;
@@ -162,7 +162,6 @@ export class Entry {
162
162
  private _commitVolatile(): boolean {
163
163
  const fiber = this.fiber!
164
164
  const refs = volatileEntries(fiber.config)
165
- if (!refs.length) return true
166
165
  const raw = this.options.config
167
166
  let candidate: unknown
168
167
  try {
@@ -172,6 +171,7 @@ export class Entry {
172
171
  this.ctx.logger.warn(error)
173
172
  return true
174
173
  }
174
+ if (!refs.length) return deepEqual(fiber.config, candidate, true)
175
175
  if (!deepEqual(fiber.config, candidate, true)) {
176
176
  this.ctx.logger.debug('ordinary config values of %C changed with its volatile values; applying the ordinary update', this.options.id)
177
177
  return false
@@ -1103,7 +1103,11 @@ function readProfilePatches(binName, context, initialProfile, homePatches) {
1103
1103
  ...context.trustedVersionExemptions === void 0 ? {} : { trustedVersionExemptions: context.trustedVersionExemptions },
1104
1104
  userLayer: false
1105
1105
  });
1106
- const patches = structuredClone([...profile.layers.flatMap((layer) => layer.patches), ...initialProfile?.patches ?? loadOptionalPatches(binName, context.patchPath) ?? []]);
1106
+ const patches = structuredClone([
1107
+ ...profile.layers.flatMap((layer) => layer.patches),
1108
+ ...context.defaults ?? [],
1109
+ ...initialProfile?.patches ?? loadOptionalPatches(binName, context.patchPath) ?? []
1110
+ ]);
1107
1111
  patches.push(...resolveHomePatchConfigs(binName, patches, homePatches ?? loadOptionalPatches(binName, join(context.home, "cordis.patch.yml")) ?? []));
1108
1112
  patches.push(...structuredClone(context.overlays));
1109
1113
  const telemetryPatch = resolveTelemetryPatch(context.telemetryDisabledEnv, composeEntries([patches]).some((row) => row.id === TELEMETRY_ROW_ID));
@@ -18,6 +18,8 @@ export interface ProfileContext {
18
18
  readonly home: string;
19
19
  /** Bundle packages used to start this process, before any persisted edits. */
20
20
  readonly startedBundles: readonly string[];
21
+ /** Launcher-owned defaults, applied after bundles and before editable profile and home patches. */
22
+ readonly defaults?: readonly PatchOptions[];
21
23
  /** Parsed command-line overlays, applied above profile and home patches. */
22
24
  readonly overlays: readonly PatchOptions[];
23
25
  /** Launcher package aliases applied identically at startup and on every reload. */
@@ -4125,7 +4125,7 @@ window.__ModuleLoader__.load({
4125
4125
  for (const listener of listeners) listener();
4126
4126
  };
4127
4127
  /** @returns the client identity for one account call, read at call time so it carries the language and zone in effect then. */
4128
- const client = () => accountClientMetadata(ctx.locale.getSnapshot().active, "3.0.4-rc.5");
4128
+ const client = () => accountClientMetadata(ctx.locale.getSnapshot().active, "3.0.4-rc.7");
4129
4129
  const notices = createBonusNoticeController({
4130
4130
  ackRetryDelayMs: config.bonusAckRetryDelayMs,
4131
4131
  ackRetryMaxDelayMs: config.bonusAckRetryMaxDelayMs,
@@ -4256,7 +4256,7 @@ window.__ModuleLoader__.load({
4256
4256
  refreshAccount,
4257
4257
  contactUs() {
4258
4258
  const url = contactUrl(config, {
4259
- version: "3.0.4-rc.5",
4259
+ version: "3.0.4-rc.7",
4260
4260
  locale: ctx.locale.getSnapshot().active === "zh" ? "zh-CN" : "en",
4261
4261
  width: window.screen.width,
4262
4262
  height: window.screen.height,
@@ -657,7 +657,7 @@ window.__ModuleLoader__.load({
657
657
  function CurrentVersionRow({ t }) {
658
658
  return (0, react_jsx_runtime.jsx)("div", {
659
659
  className: CurrentVersionRow_module_css_default.row,
660
- children: t("general.currentVersion", { version: "3.0.4-rc.5" })
660
+ children: t("general.currentVersion", { version: "3.0.4-rc.7" })
661
661
  });
662
662
  }
663
663
  //#endregion
@@ -167,7 +167,9 @@ window.__ModuleLoader__.load({
167
167
  const SCROLLBAR_LINGER_MS = 2e3;
168
168
  /** Format complete-build metadata for the local brand badge. */
169
169
  function localBuildVersion() {
170
- return `3.0.4-rc.5-b482da5-dirty`;
170
+ const commit = "d5337cd";
171
+ const dirty = {}.CHATCODE_CLI_CLIENT_GIT_DIRTY ?? {}["DSH_CLIENT_GIT_DIRTY"];
172
+ return `3.0.4-rc.7-${commit}` + (dirty === "true" ? "-dirty" : "");
171
173
  }
172
174
  /** Each panel row subscribes only to its own selection state. */
173
175
  function PanelRow({ id, label, wide, usePanelInfo, selectPanel, renderSlot }) {
@@ -5244,10 +5244,10 @@ window.__ModuleLoader__.load({
5244
5244
  };
5245
5245
  //#endregion
5246
5246
  //#region lib/types/client/ArchivedSessions.js
5247
- /** Metadata-only archived-session management with bounded pages and confirmed deletion. */
5247
+ /** Metadata-only archived-session management with bounded pages and restoration. */
5248
5248
  const PAGE_SIZE = 30;
5249
5249
  /** Archived roots, including archived empty Sessions, with one global search and bounded DOM. */
5250
- function ArchivedSessions({ useSessions, useWorkspaces, requestDelete, restore, failureText, t }) {
5250
+ function ArchivedSessions({ useSessions, useWorkspaces, restore, failureText, t }) {
5251
5251
  const list = useSessions((s) => s);
5252
5252
  const archived = useWorkspaces((s) => s.archivedSessionIds);
5253
5253
  const [query, setQuery] = (0, react.useState)("");
@@ -5310,32 +5310,19 @@ window.__ModuleLoader__.load({
5310
5310
  if (item === void 0) return null;
5311
5311
  return (0, react_jsx_runtime.jsxs)("li", {
5312
5312
  className: ArchivedSessions_module_css_default.row,
5313
- children: [
5314
- (0, react_jsx_runtime.jsx)("span", {
5315
- className: ArchivedSessions_module_css_default.title,
5316
- title: item.displayTitle,
5317
- children: item.displayTitle
5318
- }),
5319
- (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
5320
- size: "sm",
5321
- disabled: pending !== void 0,
5322
- "aria-label": t("archive.manager.restoreAria", { title: item.displayTitle }),
5323
- onClick: () => {
5324
- run(id, () => restore(id));
5325
- },
5326
- children: t("archive.manager.restore")
5327
- }),
5328
- (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
5329
- size: "sm",
5330
- className: ArchivedSessions_module_css_default.danger,
5331
- disabled: pending !== void 0,
5332
- "aria-label": t("archive.manager.deleteAria", { title: item.displayTitle }),
5333
- onClick: () => {
5334
- run(id, () => requestDelete(id));
5335
- },
5336
- children: t("archive.manager.delete")
5337
- })
5338
- ]
5313
+ children: [(0, react_jsx_runtime.jsx)("span", {
5314
+ className: ArchivedSessions_module_css_default.title,
5315
+ title: item.displayTitle,
5316
+ children: item.displayTitle
5317
+ }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
5318
+ size: "sm",
5319
+ disabled: pending !== void 0,
5320
+ "aria-label": t("archive.manager.restoreAria", { title: item.displayTitle }),
5321
+ onClick: () => {
5322
+ run(id, () => restore(id));
5323
+ },
5324
+ children: t("archive.manager.restore")
5325
+ })]
5339
5326
  }, id);
5340
5327
  })
5341
5328
  }),
@@ -5369,85 +5356,6 @@ window.__ModuleLoader__.load({
5369
5356
  });
5370
5357
  }
5371
5358
  //#endregion
5372
- //#region lib/types/client/session-actions/DeleteSession.js
5373
- /** Archived-only permanent deletion; both entry points share this confirmation. */
5374
- /** Permanent deletion is offered only for archived rows. */
5375
- function DeleteSessionMenuItem({ sessionId, useArchived, useMenuOpenState, requestDelete, t }) {
5376
- const archived = useArchived((ids) => ids.has(sessionId));
5377
- const [, setMenuOpen] = useMenuOpenState();
5378
- if (!archived) return null;
5379
- return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MenuItemButton, {
5380
- onSelect: () => {
5381
- setMenuOpen(false);
5382
- requestDelete(sessionId);
5383
- },
5384
- children: t("archive.manager.delete")
5385
- });
5386
- }
5387
- /** The dialog outlives the menu or settings page that raised it. */
5388
- function SessionDeleteDialog(props) {
5389
- const request = props.useRequest((value) => value);
5390
- if (request === null) return null;
5391
- return (0, react_jsx_runtime.jsx)(DeleteForm, {
5392
- request,
5393
- dismiss: props.dismiss,
5394
- remove: props.remove,
5395
- failureText: props.failureText,
5396
- t: props.t
5397
- }, request.id);
5398
- }
5399
- function DeleteForm({ request, dismiss, remove, failureText, t }) {
5400
- const busy = (0, react.useRef)(false);
5401
- const [pending, setPending] = (0, react.useState)(false);
5402
- const [error, setError] = (0, react.useState)();
5403
- const close = () => {
5404
- if (!busy.current) dismiss();
5405
- };
5406
- const confirm = async () => {
5407
- if (busy.current) return;
5408
- busy.current = true;
5409
- setPending(true);
5410
- setError(void 0);
5411
- try {
5412
- await remove(request.id, request.scope);
5413
- dismiss();
5414
- } catch (reason) {
5415
- setError(failureText(reason));
5416
- } finally {
5417
- busy.current = false;
5418
- setPending(false);
5419
- }
5420
- };
5421
- return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
5422
- open: true,
5423
- title: t("archive.manager.confirmTitle"),
5424
- closeLabel: t("close"),
5425
- onClose: close,
5426
- description: t("archive.manager.confirmDescription", {
5427
- title: request.title,
5428
- count: request.scope.length
5429
- }),
5430
- footer: (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
5431
- "data-modal-autofocus": true,
5432
- disabled: pending,
5433
- onClick: close,
5434
- children: t("cancel")
5435
- }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
5436
- className: ArchivedSessions_module_css_default.danger,
5437
- disabled: pending,
5438
- onClick: () => {
5439
- confirm();
5440
- },
5441
- children: t(pending ? "archive.manager.deleting" : "archive.manager.delete")
5442
- })] }),
5443
- children: error !== void 0 && (0, react_jsx_runtime.jsx)("p", {
5444
- role: "alert",
5445
- className: ArchivedSessions_module_css_default.error,
5446
- children: error
5447
- })
5448
- });
5449
- }
5450
- //#endregion
5451
5359
  //#region lib/types/client/locales.js
5452
5360
  /**
5453
5361
  * `workspace` namespace dictionaries: the browsing region (section header,
@@ -5457,7 +5365,7 @@ window.__ModuleLoader__.load({
5457
5365
  /** Simplified Chinese dictionary (the key-set source of truth). */
5458
5366
  const zh = {
5459
5367
  "archive.manager.title": "已归档会话",
5460
- "archive.manager.description": "归档保留会话记录,可恢复后继续。永久删除会同时移除该会话及其子代理记录,无法撤销。",
5368
+ "archive.manager.description": "归档保留会话记录,可恢复后继续。",
5461
5369
  "archive.manager.search": "搜索已归档会话",
5462
5370
  "archive.manager.restoreAria": "恢复会话“{title}”",
5463
5371
  "archive.manager.deleteAria": "永久删除会话“{title}”",
@@ -5592,7 +5500,7 @@ window.__ModuleLoader__.load({
5592
5500
  /** English dictionary, checked complete against the zh key set. */
5593
5501
  const en = {
5594
5502
  "archive.manager.title": "Archived sessions",
5595
- "archive.manager.description": "Archiving keeps the conversation for later. Permanent deletion removes the session and its subagent records and cannot be undone.",
5503
+ "archive.manager.description": "Archiving keeps the conversation for later. Restore it to continue.",
5596
5504
  "archive.manager.search": "Search archived sessions",
5597
5505
  "archive.manager.restoreAria": "Restore session “{title}”",
5598
5506
  "archive.manager.deleteAria": "Permanently delete session “{title}”",
@@ -5798,7 +5706,6 @@ window.__ModuleLoader__.load({
5798
5706
  const archivedSet = derive(workspaces.list, (snapshot) => new Set(snapshot.archivedSessionIds));
5799
5707
  const renameRequest = derive(shortcutControls.state, (state) => state.renameTarget);
5800
5708
  const archiveRequest = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)(null);
5801
- const deleteRequest = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)(null);
5802
5709
  const t = ctx.locale.bind(NS);
5803
5710
  const failureText = (reason) => {
5804
5711
  if (reason instanceof Error && reason.name === "WorkspaceArchiveError") {
@@ -5813,23 +5720,6 @@ window.__ModuleLoader__.load({
5813
5720
  }
5814
5721
  return t("archive.manager.failed");
5815
5722
  };
5816
- const requestDelete = async (id) => {
5817
- const scope = await workspaces.sessionDeletionScope(id);
5818
- const title = sessions.list.getSnapshot().byId[id]?.displayTitle ?? id;
5819
- deleteRequest.set({
5820
- id,
5821
- title,
5822
- scope
5823
- });
5824
- };
5825
- const remove = async (id, scope) => {
5826
- await workspaces.deleteSession(id, scope);
5827
- notify({
5828
- kind: "sessionOperation",
5829
- message: t("archive.manager.deleted"),
5830
- success: true
5831
- });
5832
- };
5833
5723
  ctx.slots.inject("settings.section", () => ctx.slots.register({
5834
5724
  name: "settings.section",
5835
5725
  id: "archived-sessions",
@@ -5837,7 +5727,6 @@ window.__ModuleLoader__.load({
5837
5727
  locale: NS,
5838
5728
  label: () => t("archive.manager.title"),
5839
5729
  inject: () => ({
5840
- requestDelete,
5841
5730
  failureText,
5842
5731
  restore: async (id) => {
5843
5732
  await workspaces.unarchiveSession(id);
@@ -6033,24 +5922,6 @@ window.__ModuleLoader__.load({
6033
5922
  locale: NS,
6034
5923
  inject: archiveInjected
6035
5924
  }, ArchiveSessionMenuItem);
6036
- yield ctx.slots.register({
6037
- name: "sidebar.workspaces.session.menu.item",
6038
- id: "delete",
6039
- order: 500,
6040
- locale: NS,
6041
- inject: () => ({
6042
- hooks: { archived: archivedSet },
6043
- requestDelete: (id) => {
6044
- requestDelete(id).catch((reason) => {
6045
- notify({
6046
- kind: "sessionOperation",
6047
- message: failureText(reason),
6048
- success: false
6049
- });
6050
- });
6051
- }
6052
- })
6053
- }, DeleteSessionMenuItem);
6054
5925
  });
6055
5926
  ctx.slots.inject("sidebar.workspaces.session.row.action", function* () {
6056
5927
  yield ctx.slots.register({
@@ -6069,19 +5940,6 @@ window.__ModuleLoader__.load({
6069
5940
  }, PinSessionRowButton);
6070
5941
  });
6071
5942
  ctx.slots.inject("shell.overlay", function* () {
6072
- yield ctx.slots.register({
6073
- name: "shell.overlay",
6074
- id: "workspace.session-delete",
6075
- locale: NS,
6076
- inject: () => ({
6077
- hooks: { request: deleteRequest },
6078
- dismiss: () => {
6079
- deleteRequest.set(null);
6080
- },
6081
- remove,
6082
- failureText
6083
- })
6084
- }, SessionDeleteDialog);
6085
5943
  yield ctx.slots.register({
6086
5944
  name: "shell.overlay",
6087
5945
  id: "workspace.session-rename",
@@ -2,12 +2,11 @@ import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-cli
2
2
  import type { SessionId } from '@deepseek-ai/dsh-session/types';
3
3
  /** Host operations shared with the TUI; no history is opened to list archived Sessions. */
4
4
  export interface ArchivedSessionsInjected {
5
- requestDelete: (id: SessionId) => Promise<void>;
6
5
  restore: (id: SessionId) => Promise<void>;
7
6
  failureText: (error: unknown) => string;
8
7
  }
9
8
  type Props = PropsRuntime<'settings.section'> & PropsLocale<'workspace'> & InjectFace<ArchivedSessionsInjected>;
10
9
  /** Archived roots, including archived empty Sessions, with one global search and bounded DOM. */
11
- export declare function ArchivedSessions({ useSessions, useWorkspaces, requestDelete, restore, failureText, t }: Props): import("react").JSX.Element;
10
+ export declare function ArchivedSessions({ useSessions, useWorkspaces, restore, failureText, t }: Props): import("react").JSX.Element;
12
11
  export {};
13
12
  //# sourceMappingURL=ArchivedSessions.d.ts.map
@@ -110,7 +110,11 @@ var ConfigEditor = class extends Service {
110
110
  Reflect.deleteProperty(rest, "config");
111
111
  return rest;
112
112
  });
113
- const row = flatten(composeEntries(this.shared(entry) ? [readProfilePatches("dsh", this.ownerContext.profileContext, loaded, patches)] : [...loaded.layers.map((layer) => layer.patches), patches])).find((row) => row.id === entry.options.id);
113
+ const row = flatten(composeEntries(this.shared(entry) ? [readProfilePatches("dsh", this.ownerContext.profileContext, loaded, patches)] : [
114
+ ...loaded.layers.map((layer) => layer.patches),
115
+ [...this.ownerContext.profileContext.defaults ?? []],
116
+ patches
117
+ ])).find((row) => row.id === entry.options.id);
114
118
  return structuredClone(row?.config ?? {});
115
119
  }
116
120
  /** Validate, persist, and reconcile a plugin's next config; ordinary fields keep normal lifecycle rules.