@dsh-workbench/shared 1.5.0 → 1.5.2-alpha.0

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.
@@ -1,7 +1,8 @@
1
1
  import type { Translate } from '../../lib/dsh-client.js';
2
- import type { ApprovalInput, UnitClientFace } from './board-module.js';
2
+ import type { ApprovalInput, ApprovalPlanData, UnitClientFace } from './board-module.js';
3
3
  import { Fragment, h, type ReactNode } from '../../lib/react.js';
4
4
  import { CodeBlock } from '@deepseek-ai/dsh-client-ui-primitives';
5
+ import { ApprovalPlan, type ApprovalPlanRow } from './ApprovalPlan.js';
5
6
  import { CardBoundary } from './CardBoundary.js';
6
7
  import './ApprovalDetail.css';
7
8
 
@@ -48,14 +49,52 @@ function parseArgs(raw: string): Readonly<Record<string, unknown>> {
48
49
  }
49
50
  }
50
51
 
52
+ function reasonOf(error: unknown): string {
53
+ return error instanceof Error ? error.message : String(error);
54
+ }
55
+
56
+ function planRowsOf(plan: ApprovalPlanData, t: Translate): readonly ApprovalPlanRow[] {
57
+ const rows: ApprovalPlanRow[] = [
58
+ { label: plan.objectLabel ?? t('approval.fact.object'), value: plan.object },
59
+ { label: t('approval.fact.change'), value: plan.change },
60
+ { label: t('approval.fact.target'), value: plan.target },
61
+ { label: t('approval.fact.impact'), value: plan.impact },
62
+ ];
63
+ return plan.extra === undefined ? rows : [...rows, ...plan.extra];
64
+ }
65
+
66
+ function planNodeOf(plan: ApprovalPlanData, t: Translate): ReactNode {
67
+ return h(ApprovalPlan, {
68
+ rows: planRowsOf(plan, t),
69
+ ...(plan.warn === undefined ? {} : { warn: plan.warn }),
70
+ });
71
+ }
72
+
73
+ function missingNodeOf(t: Translate): ReactNode {
74
+ return h(ApprovalPlan, { rows: [], warn: t('approval.missingDetail') });
75
+ }
76
+
77
+ function planOf(
78
+ plan: (input: ApprovalInput, t: Translate) => ApprovalPlanData | null,
79
+ input: ApprovalInput,
80
+ t: Translate,
81
+ ): ApprovalPlanData | null {
82
+ try {
83
+ return plan(input, t);
84
+ } catch (error) {
85
+ console.error(`[dsh-workbench] 模块审批详情读取失败:${reasonOf(error)}`);
86
+ return null;
87
+ }
88
+ }
89
+
51
90
  /**
52
- * 审批屏的详情格:按工具名找到认领它的模块交给它渲染,没有模块认领就退回外壳那张表或一段原始命令。
91
+ * 审批屏的详情格:先画模块交的四行事实或它自己的渲染器,再退回外壳那张表或一段原始命令。
53
92
  * @param props.callId - 这次工具调用的 id;不给就直接走兜底(连调用都找不到)。
54
93
  * @param props.useChat - 读会话快照的钩子(dsh 注入);不给就当作读不到调用。
55
94
  * @param props.units - 已装模块的面,按各自的 `approval.tools` 认领这次调用。
56
95
  * @param props.t - 翻译函数;不给就用返回 key 的直通实现。
57
96
  * @param props.renderShell - 没有模块认领时外壳自己的渲染(那张表);不给且这次调用没带 `command` 时整格返回 `null`。
58
- * @returns 认领方的渲染、外壳那张表,或一段可复制的命令。
97
+ * @returns 认领方的四行表 / 自定义渲染、外壳那张表,或一段可复制的命令。
59
98
  */
60
99
  export function ApprovalDetail(props: ApprovalDetailProps) {
61
100
  const useChat = props.useChat ?? ((): undefined => undefined);
@@ -68,9 +107,30 @@ export function ApprovalDetail(props: ApprovalDetailProps) {
68
107
 
69
108
  const owner = (props.units ?? []).find((face) => face.approval?.tools.includes(input.tool) === true);
70
109
  if (owner?.approval !== undefined) {
71
- const Render = owner.approval.render;
110
+ const approval = owner.approval;
111
+ if (approval.plan !== undefined) {
112
+ const plan = planOf(approval.plan, input, t);
113
+ if (plan === null) return missingNodeOf(t);
114
+ const fallback = planNodeOf(plan, t);
115
+ const render = approval.render;
116
+ if (render === undefined) return fallback;
117
+ let custom: ReactNode;
118
+ try {
119
+ custom = render({ input, plan, t });
120
+ } catch (error) {
121
+ console.error(`[dsh-workbench] 模块审批自定义渲染失败:${reasonOf(error)}`);
122
+ return fallback;
123
+ }
124
+ if (custom === null || custom === undefined || custom === false) return fallback;
125
+ return (
126
+ <CardBoundary unit={owner.unit} resetKey={props.callId ?? ''} t={t} fallback={fallback}>
127
+ {custom}
128
+ </CardBoundary>
129
+ );
130
+ }
131
+ const Render = approval.render;
72
132
  return (
73
- <CardBoundary unit={owner.unit} resetKey={props.callId ?? ''} t={t}>
133
+ <CardBoundary unit={owner.unit} resetKey={props.callId ?? ''} t={t} fallback={missingNodeOf(t)}>
74
134
  <Render input={input} t={t} />
75
135
  </CardBoundary>
76
136
  );
@@ -13,6 +13,7 @@ export interface CardBoundaryProps {
13
13
  readonly resetKey: string;
14
14
  readonly t: Translate;
15
15
  readonly onFailure?: ((reason: string) => void) | undefined;
16
+ readonly fallback?: ReactNode | undefined;
16
17
  readonly children?: ReactNode | undefined;
17
18
  }
18
19
 
@@ -39,6 +40,7 @@ export function errorReasonOf(error: unknown): string {
39
40
  * @param props.resetKey - 重来键:它一变(如切了工作区)就自动清掉报错,把卡片重新渲染一遍。
40
41
  * @param props.t - 报错那句与重试钮文案的翻译函数。
41
42
  * @param props.onFailure - 失败时把原因报给宿主(面板状态要用);不给就只打一条 console。
43
+ * @param props.fallback - 出错时改画这一份;不给就画卡片失败提示与重试。
42
44
  * @param props.children - 正常时要渲染的卡片内容。
43
45
  * @returns 正常时是 `children`,炸过且还没重来之前是一条报错。
44
46
  */
@@ -68,6 +70,7 @@ export class CardBoundary extends Component<CardBoundaryProps, CardBoundaryState
68
70
  override render(): ReactNode {
69
71
  const { reason } = this.state;
70
72
  if (reason === null) return this.props.children;
73
+ if (this.props.fallback !== undefined) return this.props.fallback;
71
74
  return (
72
75
  <Note tone="problem">
73
76
  <div className={styles.failure}>
@@ -320,12 +320,7 @@ export interface UnitClientFace {
320
320
  readonly view?: CardView;
321
321
  readonly steps?: Readonly<Record<string, UnitStep>>;
322
322
  readonly messages?: Dictionaries;
323
- readonly approval?:
324
- | {
325
- readonly tools: readonly string[];
326
- readonly render: (props: { readonly input: ApprovalInput; readonly t: Translate }) => ReactNode;
327
- }
328
- | undefined;
323
+ readonly approval?: UnitApprovalFace | undefined;
329
324
  }
330
325
 
331
326
  /**
@@ -343,6 +338,56 @@ export interface ApprovalInput {
343
338
  readonly args: Readonly<Record<string, unknown>>;
344
339
  }
345
340
 
341
+ /**
342
+ * 审批详情里的一行附加事实:标签与值都由模块给。
343
+ */
344
+ export interface ApprovalPlanExtra {
345
+ readonly label: string;
346
+ readonly value: string;
347
+ }
348
+
349
+ /**
350
+ * 模块审批详情的四行数据:对象、修改后、目标位置、影响范围,外加可选的领域标签、附加行与警告。
351
+ */
352
+ export interface ApprovalPlanData {
353
+ readonly object: string;
354
+ readonly change: string;
355
+ readonly target: string;
356
+ readonly impact: string;
357
+ readonly objectLabel?: string | undefined;
358
+ readonly extra?: readonly ApprovalPlanExtra[] | undefined;
359
+ readonly warn?: string | undefined;
360
+ }
361
+
362
+ /**
363
+ * 带四行数据的模块审批面:`plan` 是下限,`render` 可选地接管详情区(同步纯函数,不直接调 hook)。
364
+ */
365
+ export interface ApprovalPlanFace {
366
+ readonly tools: readonly string[];
367
+ readonly plan: (input: ApprovalInput, t: Translate) => ApprovalPlanData | null;
368
+ readonly render?:
369
+ | ((props: {
370
+ readonly input: ApprovalInput;
371
+ readonly plan: ApprovalPlanData;
372
+ readonly t: Translate;
373
+ }) => ReactNode)
374
+ | undefined;
375
+ }
376
+
377
+ /**
378
+ * 已安装旧模块的审批面:只有自定义渲染,没有四行数据。
379
+ */
380
+ export interface ApprovalLegacyFace {
381
+ readonly tools: readonly string[];
382
+ readonly plan?: undefined;
383
+ readonly render: (props: { readonly input: ApprovalInput; readonly t: Translate }) => ReactNode;
384
+ }
385
+
386
+ /**
387
+ * 一个模块交出来的审批面:新契约是四行数据 + 可选自定义,旧契约只有自定义。
388
+ */
389
+ export type UnitApprovalFace = ApprovalPlanFace | ApprovalLegacyFace;
390
+
346
391
  /**
347
392
  * 模块注册进外壳的那个口:注册一份面(拿回注销函数)、列出已装 unit。
348
393
  */
@@ -246,6 +246,7 @@ export interface MarketInstalledModule {
246
246
 
247
247
  export interface MarketInstalledPayload {
248
248
  readonly modules: readonly MarketInstalledModule[];
249
+ readonly problem?: DiscoverProblem;
249
250
  }
250
251
 
251
252
  export interface InstalledPackageInfo {
@@ -79,8 +79,11 @@ export interface ApprovalCall {
79
79
 
80
80
  /**
81
81
  * 模块对一次写调用给出的判定:`read` 只是看看、`allow` 会写但本模块不问、`deny` 这一次根本跑不成
82
- * (连问都不该问,`reason` 原样交给 agent)、`ask` 要用户点头(`question` 接在明细后,`fallback` 是没明细时的整句;
83
- * `noteInDetail` 为真表示模块把 agent 的附注画在自己的详情座里,标题只留动作、不再追加)。
82
+ * (连问都不该问,`reason` 原样交给 agent)、`ask` 要用户点头(`headline` 是具体标题;没有它时
83
+ * `question` 接在明细后,`fallback` 是没明细时的整句;`noteInDetail` 为真表示模块把 agent 的附注
84
+ * 画在自己的详情座里,标题只留动作、不再追加)。
85
+ * `preflight` 是在显示审批之前先执行的机器检查:返回非空字符串表示这次执行不了,原样交给 agent、
86
+ * 用户不会被询问;返回空表示照常询问;抛出同样转成 `deny`(不会静默放行)。
84
87
  */
85
88
  export type ApprovalVerdict =
86
89
  | { readonly kind: 'read' }
@@ -92,9 +95,11 @@ export type ApprovalVerdict =
92
95
  | {
93
96
  readonly kind: 'ask';
94
97
  readonly reason: string;
98
+ readonly headline?: ApprovalDetail | undefined;
95
99
  readonly question: ApprovalDetail;
96
100
  readonly fallback: ApprovalDetail;
97
101
  readonly noteInDetail?: boolean;
102
+ readonly preflight?: (() => Promise<string | undefined>) | undefined;
98
103
  };
99
104
 
100
105
  export type ApprovalPolicy = (call: ApprovalCall) => ApprovalVerdict | undefined;
@@ -162,6 +167,16 @@ export async function approvalFor(
162
167
  };
163
168
  }
164
169
 
170
+ if (verdict.preflight !== undefined) {
171
+ let blocked: string | undefined;
172
+ try {
173
+ blocked = await verdict.preflight();
174
+ } catch (error) {
175
+ return { kind: 'deny', reason: `审批前的检查没有完成,已拒绝这次调用:${messageOf(error)}` };
176
+ }
177
+ if (blocked !== undefined && blocked.trim() !== '') return { kind: 'deny', reason: blocked.trim() };
178
+ }
179
+
165
180
  let facts: ApprovalFacts | undefined;
166
181
  try {
167
182
  facts = await context.detailOf?.(call);
@@ -175,40 +190,76 @@ export async function approvalFor(
175
190
  const note =
176
191
  context.declaredNote === true && verdict.noteInDetail !== true ? approvalNoteOf(call) : undefined;
177
192
 
193
+ const headline = verdict.headline;
194
+ const displayReason =
195
+ headline !== undefined && headline.zh.trim() !== '' && headline.en.trim() !== ''
196
+ ? { en: oneLine(headline.en), zh: oneLine(headline.zh) }
197
+ : compose(facts, verdict, note);
198
+
178
199
  return {
179
200
  kind: 'ask',
180
201
  reason: verdict.reason,
181
- displayReason: compose(facts, verdict, note),
202
+ displayReason,
182
203
  };
183
204
  }
184
205
 
185
206
  /**
186
- * 「写工具要点头」那一对的默认口径:点名的工具一律 `ask` + 同一份明细,其余一律 `read`。
207
+ * 审批屏上的一段中英文文本:给值,或按每次调用算。
208
+ */
209
+ export type ApprovalText = ApprovalDetail | ((call: ApprovalCall) => ApprovalDetail);
210
+
211
+ /**
212
+ * 「写工具要点头」那一对的默认口径:点名的工具一律 `ask`,其余一律 `read`。
187
213
  * 把它直接摊在 `mount()` 的返回值里:`...writeApprovalOf({ … })`。
188
214
  * @param options.tools 需要点头的工具名。
189
215
  * @param options.reason 为什么问(给 agent 看的理由)。
190
- * @param options.question 问句(zh / en,≤40 字)。
191
- * @param options.fallback 没有明细时的整句(zh / en,≤40 字)。
192
- * @param options.detail 审批屏头行那句明细(zh / en,≤20 字)。
216
+ * @param options.headline 审批屏的标题;有它时 `approvalDetail` 可以省,默认也用标题补 question / fallback。
217
+ * @param options.question 问句(zh / en,≤40 字);不给就取 `headline`。
218
+ * @param options.fallback 没有明细时的整句(zh / en,≤40 字);不给就取 `headline`。
219
+ * @param options.detail 审批屏头行那句明细(zh / en,≤20 字);有 `headline` 时可以省。
193
220
  * @returns `{ needsApproval, approvalDetail }`。
194
221
  */
195
- export function writeApprovalOf(options: {
222
+ export interface WriteApprovalOptions {
196
223
  readonly tools: readonly string[];
197
224
  readonly reason: string;
198
- readonly question: ApprovalDetail;
199
- readonly fallback: ApprovalDetail;
200
- readonly detail: ApprovalDetail;
201
- }): {
225
+ readonly headline?: ApprovalText | undefined;
226
+ readonly question?: ApprovalText | undefined;
227
+ readonly fallback?: ApprovalText | undefined;
228
+ readonly detail?: ApprovalText | undefined;
229
+ }
230
+
231
+ function resolveText(value: ApprovalText | undefined, call: ApprovalCall): ApprovalDetail | undefined {
232
+ if (value === undefined) return undefined;
233
+ return typeof value === 'function' ? value(call) : value;
234
+ }
235
+
236
+ export function writeApprovalOf(options: WriteApprovalOptions): {
202
237
  needsApproval(call: ApprovalCall): ApprovalVerdict;
203
238
  approvalDetail(call: ApprovalCall): ApprovalFacts | undefined;
204
239
  } {
205
240
  const tools = new Set(options.tools);
206
241
  const named = (call: ApprovalCall): boolean => call.name !== undefined && tools.has(call.name);
207
242
  return {
208
- needsApproval: (call) =>
209
- named(call)
210
- ? { kind: 'ask', reason: options.reason, question: options.question, fallback: options.fallback }
211
- : { kind: 'read' },
212
- approvalDetail: (call) => (named(call) ? options.detail : undefined),
243
+ needsApproval: (call) => {
244
+ if (!named(call)) return { kind: 'read' };
245
+ const headline = resolveText(options.headline, call);
246
+ const question = resolveText(options.question, call) ?? headline;
247
+ const fallback = resolveText(options.fallback, call) ?? headline;
248
+ if (question === undefined || fallback === undefined) {
249
+ return {
250
+ kind: 'deny',
251
+ reason:
252
+ 'writeApprovalOf 没有给 headline、question 或 fallback —— 这次无法问清,先不要发起审批',
253
+ };
254
+ }
255
+ return {
256
+ kind: 'ask',
257
+ reason: options.reason,
258
+ ...(headline === undefined ? {} : { headline }),
259
+ question,
260
+ fallback,
261
+ };
262
+ },
263
+ approvalDetail: (call) => (named(call) ? resolveText(options.detail, call) : undefined),
213
264
  };
214
265
  }
package/src/i18n/en.ts CHANGED
@@ -361,9 +361,11 @@ export const en: Record<keyof WorkbenchMessages, string> = {
361
361
  'panels.market.checkUpdates': 'Check for updates',
362
362
  'panels.market.checkAll': 'Check all updates',
363
363
  'panels.market.checkingNow': 'Checking…',
364
- 'panels.market.checkFailed': 'The last check failed. Check your network and try again.',
364
+ 'panels.market.checkFailed': 'Check failed. Check your network and try again.',
365
+ 'panels.market.notCheckedYet': 'Not checked for updates yet',
365
366
  'panels.market.checkedAt': 'Last checked: {time}',
366
- 'panels.market.latestPartial': 'Could not check {n} modules',
367
+ 'panels.market.latestPartial': 'Could not check {n} modules for a new version',
368
+ 'panels.market.sourceUnreachable': 'Could not reach the module source. Try again.',
367
369
  'panels.market.latestNoRegistry': 'No source configured, so the latest version was not checked.',
368
370
  'panels.market.latestProbeFailed': 'Could not reach the source. Try again later.',
369
371
  'panels.market.justNow': 'just now',
@@ -859,6 +861,11 @@ export const en: Record<keyof WorkbenchMessages, string> = {
859
861
  'approval.plan.do': 'What you can do',
860
862
  'approval.plan.agent': 'What the AI can do',
861
863
  'approval.plan.data': 'Data source',
864
+ 'approval.fact.object': 'Item',
865
+ 'approval.fact.change': 'After',
866
+ 'approval.fact.target': 'Destination',
867
+ 'approval.fact.impact': 'Impact',
868
+ 'approval.missingDetail': 'This module does not say what will change. Reject, and ask the agent to add approval details.',
862
869
  'approval.record.site': 'Site',
863
870
  'approval.record.what': 'Recording',
864
871
  'approval.record.lands': 'Saves to',
@@ -868,6 +875,42 @@ export const en: Record<keyof WorkbenchMessages, string> = {
868
875
  'approval.longTask.what': 'Task to stop',
869
876
  'approval.longTask.signal':
870
877
  'Stopping only sends an interrupt signal from the workbench; how the task wraps up is up to the module.',
878
+ 'approval.shell.module': 'Module',
879
+ 'approval.shell.panel': 'Panel',
880
+ 'approval.shell.bundle': 'Module package',
881
+ 'approval.shell.dependency': 'Dependency',
882
+ 'approval.shell.plugin': 'Plugin',
883
+ 'approval.shell.workbench': 'Workbench',
884
+ 'approval.shell.itself': 'itself',
885
+ 'approval.shell.projectPanel': "this project's panel",
886
+ 'approval.shell.machineDefaults': 'the machine-level defaults',
887
+ 'approval.shell.thisMachine': 'this machine',
888
+ 'approval.shell.config': "this machine's workbench config",
889
+ 'approval.shell.page': 'the current workbench page',
890
+ 'approval.shell.addPanel': 'add to this project panel',
891
+ 'approval.shell.resetProject': "clear this project's panel changes",
892
+ 'approval.shell.resetMachine': 'clear the machine-level defaults',
893
+ 'approval.shell.followDefaults': 'follow the machine-level defaults again',
894
+ 'approval.shell.moveFront': 'move to the front',
895
+ 'approval.shell.moveAt': 'move to position {index}',
896
+ 'approval.shell.uninstallModule': 'uninstall the module and its packages',
897
+ 'approval.shell.installBundle': 'install as a workbench module package',
898
+ 'approval.shell.updateLatest': 'update to the latest version',
899
+ 'approval.shell.uninstallPlugin': 'uninstall the plugin',
900
+ 'approval.shell.startDebug': 'start debugging',
901
+ 'approval.shell.resumeDebug': 'resume debugging',
902
+ 'approval.shell.impactPanel': 'display and order only; no module data',
903
+ 'approval.shell.impactMove': 'order only; no module data',
904
+ 'approval.shell.impactReset': 'restore machine defaults; modules stay',
905
+ 'approval.shell.impactFollow': 'only this row; other rows stay',
906
+ 'approval.shell.impactUninstallModule': 'card, tools and packages are removed',
907
+ 'approval.shell.impactInstallBundle': 'adds a package; no existing module data changes',
908
+ 'approval.shell.impactDependency': 'every module using it changes version',
909
+ 'approval.shell.impactPlugin': 'modules using it change version',
910
+ 'approval.shell.impactUninstallPlugin': 'modules depending on it may stop working',
911
+ 'approval.shell.impactWorkbench': 'takes effect after restarting panels and modules',
912
+ 'approval.shell.impactStartDebug': 'takes over this page; stay on it while debugging',
913
+ 'approval.shell.impactResumeDebug': 'takes over this page again; stay on it while debugging',
871
914
  'approval.plugin.name': 'Plugin',
872
915
  'approval.plugin.command': 'Command',
873
916
  'approval.plugin.note': 'Agent note',
package/src/i18n/zh.ts CHANGED
@@ -357,9 +357,11 @@ export const zh = {
357
357
  'panels.market.checkUpdates': '检查更新',
358
358
  'panels.market.checkAll': '检查全部更新',
359
359
  'panels.market.checkingNow': '正在检查…',
360
- 'panels.market.checkFailed': '上次检查失败,请检查网络后重试。',
360
+ 'panels.market.checkFailed': '检查失败,请检查网络后重试',
361
+ 'panels.market.notCheckedYet': '还没检查更新',
361
362
  'panels.market.checkedAt': '最近检查:{time}',
362
- 'panels.market.latestPartial': '{n} 个模块检查失败',
363
+ 'panels.market.latestPartial': '{n} 个模块未能检查新版本',
364
+ 'panels.market.sourceUnreachable': '无法连接模块来源,请重试',
363
365
  'panels.market.latestNoRegistry': '未配置来源,未检查新版本。',
364
366
  'panels.market.latestProbeFailed': '无法连接来源,请稍后重试。',
365
367
  'panels.market.justNow': '刚刚',
@@ -855,6 +857,11 @@ export const zh = {
855
857
  'approval.plan.do': '你可以做什么',
856
858
  'approval.plan.agent': 'AI 能做什么',
857
859
  'approval.plan.data': '数据来源',
860
+ 'approval.fact.object': '修改项',
861
+ 'approval.fact.change': '修改后',
862
+ 'approval.fact.target': '目标位置',
863
+ 'approval.fact.impact': '影响范围',
864
+ 'approval.missingDetail': '这个模块没有说明本次会改动什么。请拒绝,并要求 agent 补上审批详情。',
858
865
  'approval.record.site': '站点',
859
866
  'approval.record.what': '录制内容',
860
867
  'approval.record.lands': '保存到',
@@ -863,6 +870,42 @@ export const zh = {
863
870
  'approval.record.oneAction': '一次操作',
864
871
  'approval.longTask.what': '要停止的任务',
865
872
  'approval.longTask.signal': '停止只会让工作台发出中断信号,任务如何结束由模块自行负责。',
873
+ 'approval.shell.module': '模块',
874
+ 'approval.shell.panel': '面板',
875
+ 'approval.shell.bundle': '模块包',
876
+ 'approval.shell.dependency': '依赖',
877
+ 'approval.shell.plugin': '插件',
878
+ 'approval.shell.workbench': '工作台',
879
+ 'approval.shell.itself': '本身',
880
+ 'approval.shell.projectPanel': '当前项目的面板',
881
+ 'approval.shell.machineDefaults': '机器级默认值',
882
+ 'approval.shell.thisMachine': '本机',
883
+ 'approval.shell.config': '本机工作台配置',
884
+ 'approval.shell.page': '当前工作台页面',
885
+ 'approval.shell.addPanel': '加入当前项目面板',
886
+ 'approval.shell.resetProject': '清空本项目对面板的改动',
887
+ 'approval.shell.resetMachine': '清空机器级默认',
888
+ 'approval.shell.followDefaults': '恢复为跟随机器级默认',
889
+ 'approval.shell.moveFront': '移到最前面',
890
+ 'approval.shell.moveAt': '移到第 {index} 位',
891
+ 'approval.shell.uninstallModule': '卸载模块及其包',
892
+ 'approval.shell.installBundle': '安装为工作台模块包',
893
+ 'approval.shell.updateLatest': '更新到最新版',
894
+ 'approval.shell.uninstallPlugin': '卸载插件',
895
+ 'approval.shell.startDebug': '开始调试',
896
+ 'approval.shell.resumeDebug': '继续调试',
897
+ 'approval.shell.impactPanel': '只改显示与顺序;不改模块数据',
898
+ 'approval.shell.impactMove': '只改顺序;不改模块数据',
899
+ 'approval.shell.impactReset': '恢复机器级默认;不删模块',
900
+ 'approval.shell.impactFollow': '只改这一格;不动其他行',
901
+ 'approval.shell.impactUninstallModule': '卡片、工具与包一起移除',
902
+ 'approval.shell.impactInstallBundle': '新增一个模块包;不改已有模块数据',
903
+ 'approval.shell.impactDependency': '所有使用该依赖的模块都会换版本',
904
+ 'approval.shell.impactPlugin': '使用该插件的模块会换版本',
905
+ 'approval.shell.impactUninstallPlugin': '依赖它的模块可能不可用',
906
+ 'approval.shell.impactWorkbench': '所有面板与模块重启后生效',
907
+ 'approval.shell.impactStartDebug': '接管当前页面;调试期间请留在该页',
908
+ 'approval.shell.impactResumeDebug': '再次接管当前页面;调试期间请留在该页',
866
909
  'approval.plugin.name': '插件',
867
910
  'approval.plugin.command': '命令',
868
911
  'approval.plugin.note': 'agent 说明',
@@ -12,6 +12,7 @@ import type {} from '@deepseek-ai/dsh-client-ui-input-trigger/client';
12
12
  import type {} from '@deepseek-ai/dsh-client-ui-layout/client';
13
13
  import type {} from '@deepseek-ai/dsh-client-ui-renderer/client';
14
14
  import type {} from '@deepseek-ai/dsh-client-ui-session/client';
15
+ import type {} from '@deepseek-ai/dsh-client-ui-session-status/client';
15
16
  import type {} from '@deepseek-ai/dsh-client-ui-sidebar-right/client';
16
17
  import type {} from '@deepseek-ai/dsh-client-ui-settings/client';
17
18
  import type {} from '@deepseek-ai/dsh-client-ui-workspace/client';
@@ -19,7 +20,7 @@ import type {} from '@deepseek-ai/dsh-subagent';
19
20
  import type { SlotRegistry } from '@deepseek-ai/dsh-client-ui-renderer/client';
20
21
  import type { PropsRenderSlots, SlotLabel } from '@deepseek-ai/dsh-client-ui-slots';
21
22
  import type { SessionInput as OfficialSessionInput } from '@deepseek-ai/dsh-client-ui-conversation/client';
22
- import type { SessionStatus as OfficialSessionStatus } from '@deepseek-ai/dsh-client-ui-session/client';
23
+ import type { SessionStatus as OfficialSessionStatus } from '@deepseek-ai/dsh-client-ui-session-status/client';
23
24
  import type { SessionSummary as OfficialSessionSummary } from '@deepseek-ai/dsh-api-session-controller/client';
24
25
  import type {
25
26
  WorkspaceSnapshot as OfficialWorkspaceSnapshot,