@lynn123411/dsh-subagent-judge-dispatch 0.6.4 → 0.6.6

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/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  每次派工,插件把派出这次活的标签与任务正文交给一个判断服务,由它从你的类型清单里挑一个编号,插件按这个编号对应的设置改写子代理的模型与思考强度。
8
8
 
9
- - **清单由你写**:任务类型是一张表格,每一行写一段判定依据、选一个模型、选一个思考强度。模型从宿主那份「子代理可选用哪些模型」设置里读,强度从该模型自己声明的档位里读:档位读得到时强度栏是下拉,读不到时退回自由填写格。没填完的行、没有描述的行、描述和别的行重复的行,编号下面各有一句提示;它们照常写进配置,只是暂时不生效或判不准。
9
+ - **清单由你写**:任务类型是一张表格,每一行写一段判定依据、选一个模型、选一个思考强度。模型从宿主那份「子代理可选用哪些模型」设置里读,强度从该模型自己声明的档位里读:档位读得到时强度栏是下拉,读不到时退回自由填写格。没填完的行、没有描述的行、描述和别的行重复的行,编号下面各有一句提示;它们照常写进配置,只是暂时不生效或判不准。每一行还有一个开关:关掉的行留在清单里,但不参与判断,也不占编号。
10
10
  - **只改两样**:只改写子代理使用的模型与思考强度,不改名字、不改标题、不动主对话,其余一概沿用 DSH 原本的派工流程。
11
11
  - **判断永不打断派工**:连不上、超过 5 秒、答复对不上清单、答复为空,这四种都算判断失败;失败时一个字段都不写,子代理保持宿主已经为它解析好的那条子路由,不重试。代价是每次派工最多多等 5 秒。
12
12
  - **导入导出**:任务类型清单与判断服务设置都能按纯 JSON 复制走,也能粘贴回来;粘进来的那一份直接替换并立即写入。判断服务那一份只含地址与判断模型,不含密钥。
@@ -32,7 +32,7 @@ dsh plugin --profile web add @lynn123411/dsh-subagent-judge-dispatch
32
32
 
33
33
  这条行同时承载两个半边:宿主半边在那条行下注册插件本体,浏览器半边由 Web shell 按 root loader 的 enabled entry 依据 `dsh.client` 声明服务 `lib/client.js`。行不写 `config`——配置一律经插件页的卡片读写,避免出现第二处真相。
34
34
 
35
- 开关有两个,都在插件页的配置卡片上:「改写子代理的模型与强度」关掉后不判断、也不记日志;「记录日志」关掉后照常判断,只是不写日志文件。整条 loader entry 关掉时插件完全不加载。
35
+ 开关有两个,都在插件页的配置卡片上:「改写子代理的模型与强度」关掉后不判断、也不记日志;「记录日志」关掉后照常判断,只是不写日志文件。整条 loader entry 关掉时插件完全不加载。任务类型清单里每一行还有自己的开关,关掉的行不参与判断,也不占编号。
36
36
 
37
37
  宿主半边声明的服务(`inject`):`credentials`、`sessions`、`sessionTitle`;`connection` 经 `ctx.inject` 取,取不到时插件照常加载、只是没有那三条读取通道;`settings` 同样经 `ctx.inject` 取,用来声明本条目不走宿主自动生成的设置页。
38
38
 
@@ -53,7 +53,7 @@ dsh plugin --profile web add @lynn123411/dsh-subagent-judge-dispatch
53
53
  | `logEnabled` | true | 判断结果写不写进日志文件。 |
54
54
  | `endpointUrl` | 空 | 判断服务地址,按读者填的原样存,发请求时才补路径。 |
55
55
  | `judgeModel` | 空 | 判断模型 id。 |
56
- | `rows` | `[]` | 任务类型清单,按页面顺序;每行四个文字字段:`description`、`provider`、`model`、`effort`。行没有编号字段——编号按数组位置算,删一行后面的自动重排。 |
56
+ | `rows` | `[]` | 任务类型清单,按页面顺序;每行四个文字字段 `description`、`provider`、`model`、`effort` 与一个开关 `enabled`(缺省 true)。行没有编号字段——编号只数打开且填全的行,按数组位置从 1 连续;关掉或没填全的行不占编号,删一行、改完一行、换一个顺序,后面的自动重排。 |
57
57
 
58
58
  字段都标了 `.volatile()`:改它们不重挂这条 loader entry,接线每次派工现读当前值。
59
59
 
@@ -83,7 +83,9 @@ dsh plugin --profile web add @lynn123411/dsh-subagent-judge-dispatch
83
83
 
84
84
  ### 判断协议
85
85
 
86
- `POST` 到页面填的地址自动补上路径之后的完整地址,请求体 `{ model, state: { message }, questions }`;`questions` 只有一个 `task_type`,类型是 `choice`,`criteria` 就是你的类型清单(键是编号、值是你写的描述),答复取被选中选项的编号。
86
+ `POST` 到页面填的地址自动补上路径之后的完整地址,请求体 `{ model, state: { message }, questions }`;`questions` 只有一个 `task_type`,类型是 `choice`,`criteria` 就是交给判断模型的那份清单(键是编号、值是你写的描述):只含打开且填全的行,编号按清单顺序从 1 连续,没有缺号。答复取被选中选项的编号。
87
+
88
+ 预览、真正发出的请求与答复匹配读的是同一份编号:关掉或没填全的行在这三处都不出现,所以预览里是编号 2 的那一行,就是答复「2」会选中的那一行。
87
89
 
88
90
  写入铁律:模型、强度、提供方三项一起写。`resolveChildAgentOptions` 在「换了模型但没给强度」时会删掉继承来的强度,所以三项必须同进同出。
89
91
 
@@ -95,7 +97,7 @@ dsh plugin --profile web add @lynn123411/dsh-subagent-judge-dispatch
95
97
 
96
98
  ### 日志
97
99
 
98
- 判断日志写在 `~/.dsh/dsh-subagent-judge-dispatch/judgements.json`(跟随 `DSH_HOME`),文件留最近 200 条,配置页只列最近 10 条——页面是看一眼刚发生什么的地方,不是日志查看器。连续追加合并成一次写入,先写临时文件再改名,进程崩了也不会留下半份文档;一条记录的字段缺了,留住它带着的那部分,不连累整份文件。
100
+ 判断日志写在 `~/.dsh/dsh-subagent-judge-dispatch/judgements.json`(跟随 `DSH_HOME`),文件留最近 200 条,配置页只列最近 10 条。日志页的「优化任务类型描述」可复制一段分析最近 100 条日志、查找可能误判并建议优化任务类型描述的请求,粘贴到会话中使用。连续追加合并成一次写入,先写临时文件再改名,进程崩了也不会留下半份文档;一条记录的字段缺了,留住它带着的那部分,不连累整份文件。
99
101
 
100
102
  表格「子代理」一栏只放派工标签(没有标签时退回正文开头,截到 60 字),不把判断模型读过的那一整段塞回去——那一整段在同一行的弹窗里能看到。日志是一张六列表:结果(`类型 3` / `未判成`)、选择(`模型 · 强度`,悬停补上供应商)、主代理、子代理、时间、耗时。结果在最左,读者扫一眼先看「判成了没有」;选择一栏只写各条之间真正不同的两样,供应商几乎每行都一样,悬停才把整段路 `供应商 · 模型 · 强度` 写出来。没判成的原因同样不在格子里展开,悬停才说——那一列宽度是给编号留的。放不下的格子截断,气泡用宿主的 `Tooltip`(原生 `title` 键盘够不到)。
101
103
 
@@ -124,6 +126,7 @@ dsh plugin --profile web add @lynn123411/dsh-subagent-judge-dispatch
124
126
  ## 限制
125
127
 
126
128
  - 每次派工最多多等 5 秒;判断失败不重试。
129
+ - 编号按位置算:关掉一行、填完一行或换一个顺序,后面的编号都会重排;日志里早先记下的编号可能因此指向另一行。
127
130
  - 每个子代理只判一次,插件卸载或重载后这份记录清空。
128
131
  - 写进去的模型或强度若无效,报错发生在子代理自己的第一次请求上,不在判断失败的兜底范围内。
129
132
  - 日志文件留最近 200 条,配置页只列最近 10 条。
@@ -138,8 +141,8 @@ cd plugins/dsh-subagent-judge-dispatch && pnpm check
138
141
 
139
142
  `check` = `typecheck` + `build` + 五个自检 + `assert:lib-untracked`:
140
143
 
141
- - **`scripts/test-decision.mjs`** 打的是 `src/`(Node 直接跑 `.ts`),守判断与改写这条纯逻辑:失败时按身份退回同一个对象(不是深比较——深比较会放过「复制一份再写回原值」这种仍然算覆盖的写法)、三项同写、残缺行不生效、答复读取的三种形状与七种空答复、四种失败原因各自的归类、超时不重试、日志文件留 200 条、页面只取最近 10 条、换一个 LogStore 实例也读得回来、文件缺失或残缺都不抛、读出来是副本,编号按位置从 1 连着。它还守判断模型读到的输入:标签在前正文在后、没标签时只发正文、两样都没有时输入为空、短任务一字不动、长任务留头尾并写明省掉多少字、刚好到上限的不算截断;端点地址的补全;以及「判断带回的提示词就是发出去的那一段」。
142
- - **`scripts/smoke-host.mjs`** 起真 cordis `Context`,把 `agent/created` 钩子按宿主的方式跑一遍(判定后断言 `agent.model.select()` 收到了什么;判定没成时断言一次都没调):主代理不被判断、同一子代理只判一次、两个开关各自的短路、发送出去的请求体形状、判断输入是标签加正文两段、正文按 `source.kind` 取、新建子代理时从父会话刚记录的派工调用里按标签取正文(两种记录形状各一组用例)、派工消息还在收件箱里与已经落盘成 `user/message` 两种形状都读得到、宿主追加的返回指引不送进去、长任务留头尾、没有描述时取任务正文、叉出来的子代理只读自己的事件、日志的子代理一栏只写标签、判断过的记忆有上限。它另起一个挂着 `connection` 的实例,从日志路由读回那一行,断言 `prompt` 与真正发出去的请求体同值。
144
+ - **`scripts/test-decision.mjs`** 打的是 `src/`(Node 直接跑 `.ts`),守判断与改写这条纯逻辑:失败时按身份退回同一个对象(不是深比较——深比较会放过「复制一份再写回原值」这种仍然算覆盖的写法)、三项同写、残缺行不生效、答复读取的三种形状与七种空答复、四种失败原因各自的归类、超时不重试、日志文件留 200 条、页面只取最近 10 条、换一个 LogStore 实例也读得回来、文件缺失或残缺都不抛、读出来是副本,编号按位置从 1 连着。它还守判断模型读到的输入:标签在前正文在后、没标签时只发正文、两样都没有时输入为空、短任务一字不动、长任务留头尾并写明省掉多少字、刚好到上限的不算截断;端点地址的补全;以及「判断带回的提示词就是发出去的那一段」;它还守清单的开关与编号:关掉或没填全的行不占编号也不进判断请求、有效清单的编号从 1 连续没有缺号、预览与答复读同一份编号、判断选中一个被关掉的行时不改写。
145
+ - **`scripts/smoke-host.mjs`** 起真 cordis `Context`,把 `agent/created` 钩子按宿主的方式跑一遍(判定后断言 `agent.model.select()` 收到了什么;判定没成时断言一次都没调):主代理不被判断、同一子代理只判一次、两个开关各自的短路、发送出去的请求体形状、判断输入是标签加正文两段、正文按 `source.kind` 取、新建子代理时从父会话刚记录的派工调用里按标签取正文(两种记录形状各一组用例)、派工消息还在收件箱里与已经落盘成 `user/message` 两种形状都读得到、宿主追加的返回指引不送进去、长任务留头尾、没有描述时取任务正文、叉出来的子代理只读自己的事件、日志的子代理一栏只写标签、判断过的记忆有上限;关掉或没填全的类型不发给判断模型且编号连续、预览路由与判断请求读同一份编号、全部关掉时不判断。它另起一个挂着 `connection` 的实例,从日志路由读回那一行,断言 `prompt` 与真正发出去的请求体同值。
143
146
  - **`scripts/smoke-client.mjs`** 按 Web shell 的方式装载 `lib/client.js`(`window.__ModuleLoader__.load` 桩件),喂假 cordis 服务:断言卡片注册进 `plugins.bundle.config`、key 是包名、走 `slots.inject`、读本插件自己的命名空间与宿主那份「子代理可选用哪些模型」设置、以宿主在服务本条目为挂载条件、样式表在 `apply()` 追加一次且没写死色值,以及 zh/en 键集一致。它的守卫带反例断言(「守卫拒绝未声明的服务读取」必须抛)。
144
147
  - **`scripts/test-card.mjs`** 打的是 `src/`,守配置卡片这层状态机:文字格只在提交时写且只写改过的那一项、开关与行的增删当场写、连续两次提交合并成一次写、没填完的行照常写入而页面只在行上提示、宿主回 `false` 算没写进去、密钥跟着判断服务那次提交一起写且写的是固定引用名、密钥值从不进页面状态、草稿按字段保留,「选择」一列只写模型与强度、悬停才带上供应商,清单与判断服务设置各自的 JSON 导出与导入认什么、拒什么,以及官方配置入口的有无与调用。
145
148
  - **`scripts/test-render.mjs`** 用真 react 把卡片画进 jsdom:没有保存按钮,两节标题行的动作顺序、行上只剩「删掉」、预览单独在卡片最下面那条栏里;任务类型那一节写明依赖的官方配置,点入口先回插件页列表、再按下那张官方卡片;文字格离开才写、写的是这一格的新值,行的问题写在编号列下方;日志表是六列且顺序固定,结果写「类型 3」/「未判成」,选择格只写模型与强度、供应商在悬停气泡里,导出把清单按纯 JSON 写进剪贴板、导入直接替换并立即写入且三种坏输入各报各的话,没判成的原因挂在宿主的 `Tooltip` 上而不是原生 `title`。`ui-primitives` 走替身(真组件是浏览器 ESM、带 `.css` 导入,Node 里跑不起来),所以它验的是本插件的视图结构,外观与浮层定位要在真浏览器里看。
package/lib/client.js CHANGED
@@ -1,8 +1,10 @@
1
1
  window.__ModuleLoader__.load({ id: "@lynn123411/dsh-subagent-judge-dispatch", factory: (require) => { var module = { exports: {} }; var exports = module.exports;
2
2
  "use strict";
3
+ var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
6
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
9
  var __export = (target, all) => {
8
10
  for (var name2 in all)
@@ -16,6 +18,14 @@ var __copyProps = (to, from, except, desc) => {
16
18
  }
17
19
  return to;
18
20
  };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
19
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
30
 
21
31
  // src/client/index.ts
@@ -44,6 +54,7 @@ module.exports = __toCommonJS(index_exports);
44
54
 
45
55
  // src/client/settings/ui.tsx
46
56
  var import_react = require("react");
57
+ var React = __toESM(require("react"), 1);
47
58
  var import_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
48
59
 
49
60
  // src/client/settings/plugin-page.ts
@@ -146,7 +157,8 @@ function readRow(value) {
146
157
  description: text("description"),
147
158
  provider: text("provider"),
148
159
  model: text("model"),
149
- effort: text("effort")
160
+ effort: text("effort"),
161
+ enabled: record.enabled !== false
150
162
  };
151
163
  }
152
164
  function describeModel(row) {
@@ -216,7 +228,8 @@ function exportRowsJson(rows) {
216
228
  description: row.description,
217
229
  provider: row.provider,
218
230
  model: row.model,
219
- effort: row.effort
231
+ effort: row.effort,
232
+ enabled: row.enabled
220
233
  })),
221
234
  null,
222
235
  2
@@ -239,13 +252,14 @@ function parseRowsJson(text) {
239
252
  if (typeof value !== "object" || value === null || Array.isArray(value)) return { ok: false, error: "shape" };
240
253
  const record = value;
241
254
  const wrongType = ["description", "provider", "model", "effort"].some((key) => record[key] !== void 0 && typeof record[key] !== "string");
242
- if (wrongType) return { ok: false, error: "shape" };
255
+ if (wrongType || record.enabled !== void 0 && typeof record.enabled !== "boolean") return { ok: false, error: "shape" };
243
256
  const field = (key) => typeof record[key] === "string" ? record[key] : "";
244
257
  const row = {
245
258
  description: field("description"),
246
259
  provider: field("provider"),
247
260
  model: field("model"),
248
- effort: field("effort")
261
+ effort: field("effort"),
262
+ enabled: record.enabled !== false
249
263
  };
250
264
  if (isBlankRow(row)) continue;
251
265
  rows.push(row);
@@ -483,7 +497,7 @@ var DispatchCardStore = class {
483
497
  }
484
498
  /** Append an empty row and write it: a new row is a decision like any other. */
485
499
  addRow() {
486
- this.stage({ rows: [...this.state.rows, { description: "", provider: "", model: "", effort: "" }] });
500
+ this.stage({ rows: [...this.state.rows, { description: "", provider: "", model: "", effort: "", enabled: true }] });
487
501
  void this.commit("rows");
488
502
  }
489
503
  /**
@@ -496,7 +510,7 @@ var DispatchCardStore = class {
496
510
  * @param rows - the rows read from the pasted JSON.
497
511
  */
498
512
  replaceRows(rows) {
499
- this.stage({ rows: rows.map((row) => ({ ...row })) });
513
+ this.stage({ rows: rows.map(readRow) });
500
514
  void this.commit("rows");
501
515
  }
502
516
  /**
@@ -515,6 +529,18 @@ var DispatchCardStore = class {
515
529
  });
516
530
  void this.commit("judge");
517
531
  }
532
+ toggleRow(index, enabled) {
533
+ this.stage({ rows: this.state.rows.map((row, at) => at === index ? { ...row, enabled } : row) });
534
+ void this.commit("rows");
535
+ }
536
+ moveRow(from, to) {
537
+ if (from === to || from < 0 || to < 0 || from >= this.state.rows.length || to >= this.state.rows.length) return;
538
+ const rows = [...this.state.rows];
539
+ const [moved] = rows.splice(from, 1);
540
+ rows.splice(to, 0, moved);
541
+ this.stage({ rows });
542
+ void this.commit("rows");
543
+ }
518
544
  /** Delete one row and write the rest; the remaining rows renumber themselves. */
519
545
  removeRow(index) {
520
546
  this.stage({ rows: this.state.rows.filter((_row, at) => at !== index) });
@@ -750,7 +776,8 @@ var en = {
750
776
  "reason.unknown": "unknown reason",
751
777
  "rows.title": "Task types",
752
778
  "rows.empty": "No task type yet. Add one below.",
753
- "rows.colId": "No.",
779
+ "rows.drag": "Drag to reorder",
780
+ "rows.enabled": "Enable task type",
754
781
  "rows.colType": "Task type",
755
782
  "rows.colDescription": "Description",
756
783
  "rows.colModel": "Model",
@@ -777,7 +804,7 @@ var en = {
777
804
  "rows.importCancel": "Cancel",
778
805
  "rows.importClose": "Close",
779
806
  "rows.importBadJson": "This is not valid JSON.",
780
- "rows.importBadShape": "This is not a list of task types: every entry needs description, provider, model and effort as text.",
807
+ "rows.importBadShape": "Task type fields must be text, and enabled must be true or false.",
781
808
  "rows.importEmpty": "There is no task type in this list.",
782
809
  "preview.title": "View the full prompt",
783
810
  "preview.desc": "Exactly what would be sent to the judgement service. The delegation label and the task text are filled in at delegation time.",
@@ -804,6 +831,10 @@ var en = {
804
831
  "log.promptDesc": "Exactly the request body this judgement sent.",
805
832
  "log.promptClose": "Close",
806
833
  "log.promptEmpty": "No request was sent for this judgement.",
834
+ "log.copyAnalysis": "Improve task type descriptions",
835
+ "log.analysisPrompt": "Analyze the latest 100 judgement log entries in the DSH home (DSH_HOME, default ~/.dsh) at dsh-subagent-judge-dispatch/judgements.json. Compare each task and selected type with the criteria recorded in that request; type descriptions and numbering may have changed. Identify possible misclassifications with examples, explain uncertainty and missing or truncated task text, and suggest improved task type descriptions. Read the current task types and preserve their model and effort settings. Do not change the configuration unless asked.",
836
+ "log.analysisCopied": "Analysis prompt copied.",
837
+ "log.analysisCopyFailed": "Could not copy to the clipboard.",
807
838
  "log.refresh": "Refresh",
808
839
  "log.loadFailed": "The log could not be read.",
809
840
  "ms": "{value} ms"
@@ -857,7 +888,8 @@ var zh = {
857
888
  "reason.unknown": "\u539F\u56E0\u4E0D\u660E",
858
889
  "rows.title": "\u4EFB\u52A1\u7C7B\u578B",
859
890
  "rows.empty": "\u8FD8\u6CA1\u6709\u4EFB\u52A1\u7C7B\u578B\u3002\u5728\u4E0B\u9762\u52A0\u4E00\u884C\u3002",
860
- "rows.colId": "\u7F16\u53F7",
891
+ "rows.drag": "\u62D6\u62FD\u8C03\u6574\u987A\u5E8F",
892
+ "rows.enabled": "\u5F00\u542F\u4EFB\u52A1\u7C7B\u578B",
861
893
  "rows.colType": "\u4EFB\u52A1\u7C7B\u578B",
862
894
  "rows.colDescription": "\u63CF\u8FF0",
863
895
  "rows.colModel": "\u6A21\u578B",
@@ -884,7 +916,7 @@ var zh = {
884
916
  "rows.importCancel": "\u53D6\u6D88",
885
917
  "rows.importClose": "\u5173\u95ED",
886
918
  "rows.importBadJson": "\u8FD9\u4E0D\u662F\u5408\u6CD5\u7684 JSON\u3002",
887
- "rows.importBadShape": "\u8FD9\u4E0D\u662F\u4E00\u4EFD\u4EFB\u52A1\u7C7B\u578B\u6E05\u5355\uFF1A\u6BCF\u4E00\u6761\u90FD\u8981\u6709 description\u3001provider\u3001model\u3001effort \u56DB\u4E2A\u6587\u5B57\u5B57\u6BB5\u3002",
919
+ "rows.importBadShape": "\u4EFB\u52A1\u7C7B\u578B\u7684\u6587\u5B57\u5B57\u6BB5\u5FC5\u987B\u662F\u6587\u5B57\uFF0Cenabled \u5FC5\u987B\u662F true \u6216 false\u3002",
888
920
  "rows.importEmpty": "\u8FD9\u4EFD\u6E05\u5355\u91CC\u4E00\u6761\u4EFB\u52A1\u7C7B\u578B\u90FD\u6CA1\u6709\u3002",
889
921
  "preview.title": "\u67E5\u770B\u5B8C\u6574\u9884\u89C8",
890
922
  "preview.desc": "\u771F\u6B63\u4F1A\u53D1\u7ED9\u5224\u65AD\u670D\u52A1\u7684\u90A3\u6BB5\u5185\u5BB9\u3002\u6D3E\u5DE5\u6807\u7B7E\u4E0E\u4EFB\u52A1\u6B63\u6587\u90FD\u5728\u6D3E\u5DE5\u90A3\u4E00\u523B\u624D\u586B\u8FDB\u53BB\u3002",
@@ -911,6 +943,10 @@ var zh = {
911
943
  "log.promptDesc": "\u8FD9\u6B21\u5224\u65AD\u771F\u6B63\u53D1\u51FA\u53BB\u7684\u8BF7\u6C42\u4F53\u3002",
912
944
  "log.promptClose": "\u5173\u95ED",
913
945
  "log.promptEmpty": "\u8FD9\u6B21\u5224\u65AD\u6CA1\u6709\u53D1\u51FA\u8BF7\u6C42\u3002",
946
+ "log.copyAnalysis": "\u4F18\u5316\u4EFB\u52A1\u7C7B\u578B\u63CF\u8FF0",
947
+ "log.analysisPrompt": "\u8BF7\u5206\u6790 DSH \u5BB6\u76EE\u5F55\uFF08DSH_HOME\uFF0C\u9ED8\u8BA4 ~/.dsh\uFF09\u4E0B dsh-subagent-judge-dispatch/judgements.json \u4E2D\u6700\u8FD1 100 \u6761\u5224\u65AD\u65E5\u5FD7\u3002\u9010\u6761\u7ED3\u5408\u4EFB\u52A1\u5185\u5BB9\u3001\u9009\u62E9\u7ED3\u679C\u548C\u5F53\u6B21\u8BF7\u6C42\u4E2D\u8BB0\u5F55\u7684\u4EFB\u52A1\u7C7B\u578B\u63CF\u8FF0\uFF0C\u627E\u51FA\u53EF\u80FD\u7684\u8BEF\u5224\u5E76\u4E3E\u4F8B\u8BF4\u660E\uFF1B\u7C7B\u578B\u63CF\u8FF0\u548C\u7F16\u53F7\u53EF\u80FD\u968F\u65F6\u95F4\u53D8\u5316\u3002\u8BF4\u660E\u8BC1\u636E\u4E0D\u8DB3\u3001\u4EFB\u52A1\u6B63\u6587\u7F3A\u5931\u6216\u88AB\u622A\u65AD\u7684\u60C5\u51B5\uFF0C\u5E76\u7ED9\u51FA\u5F53\u524D\u4EFB\u52A1\u7C7B\u578B\u63CF\u8FF0\u7684\u4F18\u5316\u5EFA\u8BAE\u3002\u8BF7\u8BFB\u53D6\u5F53\u524D\u4EFB\u52A1\u7C7B\u578B\uFF0C\u4FDD\u7559\u6A21\u578B\u548C\u5F3A\u5EA6\u914D\u7F6E\uFF1B\u672A\u7ECF\u8981\u6C42\u4E0D\u8981\u4FEE\u6539\u914D\u7F6E\u3002",
948
+ "log.analysisCopied": "\u5DF2\u590D\u5236\u5206\u6790\u63D0\u793A\u8BCD\u3002",
949
+ "log.analysisCopyFailed": "\u590D\u5236\u5230\u526A\u8D34\u677F\u6CA1\u6210\u529F\u3002",
914
950
  "log.refresh": "\u5237\u65B0",
915
951
  "log.loadFailed": "\u65E5\u5FD7\u8BFB\u4E0D\u51FA\u6765\u3002",
916
952
  "ms": "{value} \u6BEB\u79D2"
@@ -971,6 +1007,21 @@ var CARD_CSS = `
971
1007
  \u6240\u4EE5\u8981\u6491\u7684\u662F\u5B83\uFF0C\u53EA\u7ED9 input \u5199\u5BBD\u5EA6\u6CA1\u7528\u3002 */
972
1008
  .dsh-judge-field { display: flex; box-sizing: border-box; width: 100%; min-width: 0; }
973
1009
  .dsh-judge-field input { box-sizing: border-box; width: 100%; min-width: 0; }
1010
+ .dsh-judge-description {
1011
+ field-sizing: content;
1012
+ display: block;
1013
+ min-height: 32px;
1014
+ max-height: 40vh;
1015
+ resize: vertical;
1016
+ padding: 6px 10px;
1017
+ border: 0.5px solid var(--dsw-alias-border-l3);
1018
+ border-radius: var(--dsw-radius-md);
1019
+ background: var(--dsw-alias-bg-layer-1);
1020
+ color: inherit;
1021
+ font: inherit;
1022
+ line-height: 1.4;
1023
+ }
1024
+ .dsh-judge-description:focus-visible { outline: 2px solid var(--dsw-alias-state-business-primary); outline-offset: -2px; }
974
1025
  .dsh-judge-key-line { display: flex; align-items: center; gap: 8px; box-sizing: border-box; width: 100%; }
975
1026
  .dsh-judge-off { display: block; color: var(--dsw-alias-state-warn-label); font: var(--dsw-font-xxxs-11); }
976
1027
  /* \u6807\u9898\u884C\u53F3\u7AEF\u7684\u4E00\u7EC4\u52A8\u4F5C\uFF1A\u8BD5\u901A\u3001\u5BFC\u5165\u3001\u5BFC\u51FA\u3001\u52A0\u4E00\u884C\u90FD\u6392\u5728\u8FD9\u91CC\u3002 */
@@ -998,11 +1049,12 @@ var CARD_CSS = `
998
1049
  .dsh-judge-table td { padding: 6px 8px 6px 0; vertical-align: middle; }
999
1050
  .dsh-judge-table tbody tr + tr td { border-top: 0.5px solid var(--dsw-alias-border-l3); }
1000
1051
  .dsh-judge-table td:last-child, .dsh-judge-table th:last-child { padding-right: 0; }
1001
- .dsh-judge-col-no { width: 84px; }
1052
+ .dsh-judge-col-drag { width: 36px; }
1053
+ .dsh-judge-drag { border: 0; padding: 4px; background: transparent; cursor: grab; color: var(--dsw-alias-label-tertiary); font: inherit; }
1054
+ .dsh-judge-drag:active { cursor: grabbing; }
1002
1055
  .dsh-judge-col-model { width: 188px; }
1003
1056
  .dsh-judge-col-effort { width: 124px; }
1004
- .dsh-judge-col-actions { width: 96px; }
1005
- .dsh-judge-no { color: var(--dsw-alias-label-tertiary); font: var(--dsw-font-xxs-12); font-variant-numeric: tabular-nums; }
1057
+ .dsh-judge-col-actions { width: 130px; }
1006
1058
  .dsh-judge-row-off .dsh-judge-field { opacity: 0.6; }
1007
1059
  .dsh-judge-cell-actions { display: flex; gap: 6px; }
1008
1060
  .dsh-judge-log { display: flex; flex-direction: column; gap: 4px; font: var(--dsw-font-xxs-12); }
@@ -1038,6 +1090,7 @@ function JudgeDispatchPanel(props) {
1038
1090
  const { t } = props;
1039
1091
  const [state, setState] = (0, import_react.useState)(() => dispatchCardStore.getState());
1040
1092
  const [tab, setTab] = (0, import_react.useState)("design");
1093
+ const dragIndex = React.useRef(null);
1041
1094
  const [preview, setPreview] = (0, import_react.useState)(null);
1042
1095
  const [previewOpen, setPreviewOpen] = (0, import_react.useState)(false);
1043
1096
  const [probing, setProbing] = (0, import_react.useState)(false);
@@ -1048,6 +1101,7 @@ function JudgeDispatchPanel(props) {
1048
1101
  const [importText, setImportText] = (0, import_react.useState)("");
1049
1102
  const [importError, setImportError] = (0, import_react.useState)("");
1050
1103
  const [copyNote, setCopyNote] = (0, import_react.useState)(null);
1104
+ const [logCopyResult, setLogCopyResult] = (0, import_react.useState)(null);
1051
1105
  (0, import_react.useEffect)(() => {
1052
1106
  setState(dispatchCardStore.getState());
1053
1107
  const unsubscribe = dispatchCardStore.subscribe(() => setState(dispatchCardStore.getState()));
@@ -1115,118 +1169,170 @@ function JudgeDispatchPanel(props) {
1115
1169
  const efforts = dispatchCardStore.effortsFor(draft);
1116
1170
  const usable = dispatchCardStore.rowUsable(draft);
1117
1171
  const catalogOffersEffort = state.catalogRead && efforts.length > 0;
1118
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { className: usable ? void 0 : "dsh-judge-row-off", children: [
1119
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("td", { className: "dsh-judge-col-no", children: [
1120
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dsh-judge-no", children: index + 1 }),
1121
- rowHints(state.rows, index, t).map((hint) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dsh-judge-off", children: hint }, hint))
1122
- ] }),
1123
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1124
- import_dsh_client_ui_primitives.Input,
1125
- {
1126
- type: "text",
1127
- className: "dsh-judge-field",
1128
- value: draft.description,
1129
- placeholder: t("rows.descriptionPlaceholder"),
1130
- "aria-label": `${t("rows.colDescription")} ${index + 1}`,
1131
- onChange: (event) => dispatchCardStore.cell(index, "description", event.target.value),
1132
- onBlur: commitRows
1133
- }
1134
- ) }),
1135
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1136
- import_dsh_client_ui_primitives.Menu,
1137
- {
1138
- open: openMenu?.index === index && openMenu.kind === "model",
1139
- anchor: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1140
- import_dsh_client_ui_primitives.Input,
1172
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
1173
+ "tr",
1174
+ {
1175
+ className: usable && draft.enabled ? void 0 : "dsh-judge-row-off",
1176
+ onDragOver: (event) => {
1177
+ if (dragIndex.current !== null) event.preventDefault();
1178
+ },
1179
+ onDrop: (event) => {
1180
+ event.preventDefault();
1181
+ if (dragIndex.current !== null) dispatchCardStore.moveRow(dragIndex.current, index);
1182
+ dragIndex.current = null;
1183
+ setOpenMenu(null);
1184
+ },
1185
+ children: [
1186
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { className: "dsh-judge-col-drag", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1187
+ "button",
1141
1188
  {
1142
- type: "text",
1143
- className: "dsh-judge-field",
1144
- readOnly: true,
1145
- value: draft.model === "" ? "" : `${draft.provider}/${draft.model}`,
1146
- placeholder: t("rows.modelPlaceholder"),
1147
- "aria-label": `${t("rows.colModel")} ${index + 1}`,
1148
- "aria-haspopup": "listbox",
1149
- "aria-expanded": openMenu?.index === index && openMenu.kind === "model",
1150
- onClick: () => setOpenMenu({ index, kind: "model" }),
1151
- onFocus: () => setOpenMenu({ index, kind: "model" })
1189
+ type: "button",
1190
+ className: "dsh-judge-drag",
1191
+ draggable: state.writable,
1192
+ disabled: !state.writable,
1193
+ "aria-label": `${t("rows.drag")}: ${draft.description}`,
1194
+ onDragStart: (event) => {
1195
+ dragIndex.current = index;
1196
+ event.dataTransfer.effectAllowed = "move";
1197
+ event.dataTransfer.setData("text/plain", String(index));
1198
+ },
1199
+ onDragEnd: () => {
1200
+ dragIndex.current = null;
1201
+ },
1202
+ onKeyDown: (event) => {
1203
+ if (event.key === "ArrowUp" || event.key === "ArrowDown") {
1204
+ event.preventDefault();
1205
+ dispatchCardStore.moveRow(index, index + (event.key === "ArrowUp" ? -1 : 1));
1206
+ }
1207
+ },
1208
+ children: "\u283F"
1152
1209
  }
1153
- ),
1154
- items: [
1155
- { type: "label", id: "model", text: t("rows.colModel") },
1156
- ...state.models.length === 0 ? [] : state.models.map((option) => ({
1157
- id: routeKey(option.provider, option.model),
1158
- label: `${option.provider}/${option.label}`
1159
- }))
1160
- ],
1161
- selectedId: draft.model === "" ? void 0 : routeKey(draft.provider, draft.model),
1162
- onSelect: (id) => {
1163
- const { provider, model } = splitRouteKey(id);
1164
- dispatchCardStore.cell(index, "provider", provider);
1165
- dispatchCardStore.cell(index, "model", model);
1166
- setOpenMenu(null);
1167
- commitRows();
1168
- },
1169
- onClose: () => setOpenMenu(null),
1170
- className: "dsh-judge-field-wrap",
1171
- portal: true
1172
- }
1173
- ) }),
1174
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: catalogOffersEffort ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1175
- import_dsh_client_ui_primitives.Menu,
1176
- {
1177
- open: openMenu?.index === index && openMenu.kind === "effort",
1178
- anchor: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1210
+ ) }),
1211
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("td", { children: [
1212
+ rowHints(state.rows, index, t).map((hint) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dsh-judge-off", children: hint }, hint)),
1213
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1214
+ "textarea",
1215
+ {
1216
+ className: "dsh-judge-field dsh-judge-description",
1217
+ rows: 2,
1218
+ readOnly: !state.writable,
1219
+ value: draft.description,
1220
+ placeholder: t("rows.descriptionPlaceholder"),
1221
+ "aria-label": `${t("rows.colDescription")} ${index + 1}`,
1222
+ onChange: (event) => dispatchCardStore.cell(index, "description", event.target.value),
1223
+ onBlur: commitRows
1224
+ }
1225
+ )
1226
+ ] }),
1227
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1228
+ import_dsh_client_ui_primitives.Menu,
1229
+ {
1230
+ open: openMenu?.index === index && openMenu.kind === "model",
1231
+ anchor: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1232
+ import_dsh_client_ui_primitives.Input,
1233
+ {
1234
+ type: "text",
1235
+ className: "dsh-judge-field",
1236
+ readOnly: true,
1237
+ value: draft.model,
1238
+ placeholder: t("rows.modelPlaceholder"),
1239
+ "aria-label": `${t("rows.colModel")} ${index + 1}`,
1240
+ "aria-haspopup": "listbox",
1241
+ "aria-expanded": openMenu?.index === index && openMenu.kind === "model",
1242
+ onClick: () => setOpenMenu({ index, kind: "model" }),
1243
+ onFocus: () => setOpenMenu({ index, kind: "model" })
1244
+ }
1245
+ ),
1246
+ items: [
1247
+ { type: "label", id: "model", text: t("rows.colModel") },
1248
+ ...state.models.length === 0 ? [] : state.models.map((option) => ({
1249
+ id: routeKey(option.provider, option.model),
1250
+ label: `${option.provider}/${option.model}`
1251
+ }))
1252
+ ],
1253
+ selectedId: draft.model === "" ? void 0 : routeKey(draft.provider, draft.model),
1254
+ onSelect: (id) => {
1255
+ const { provider, model } = splitRouteKey(id);
1256
+ dispatchCardStore.cell(index, "provider", provider);
1257
+ dispatchCardStore.cell(index, "model", model);
1258
+ setOpenMenu(null);
1259
+ commitRows();
1260
+ },
1261
+ onClose: () => setOpenMenu(null),
1262
+ className: "dsh-judge-field-wrap",
1263
+ portal: true
1264
+ }
1265
+ ) }),
1266
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: catalogOffersEffort ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1267
+ import_dsh_client_ui_primitives.Menu,
1268
+ {
1269
+ open: openMenu?.index === index && openMenu.kind === "effort",
1270
+ anchor: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1271
+ import_dsh_client_ui_primitives.Input,
1272
+ {
1273
+ type: "text",
1274
+ className: "dsh-judge-field",
1275
+ readOnly: true,
1276
+ value: draft.effort,
1277
+ placeholder: t("rows.effortPlaceholder"),
1278
+ "aria-label": `${t("rows.colEffort")} ${index + 1}`,
1279
+ "aria-haspopup": "listbox",
1280
+ "aria-expanded": openMenu?.index === index && openMenu.kind === "effort",
1281
+ onClick: () => setOpenMenu({ index, kind: "effort" }),
1282
+ onFocus: () => setOpenMenu({ index, kind: "effort" })
1283
+ }
1284
+ ),
1285
+ items: [
1286
+ { type: "label", id: "effort", text: t("rows.colEffort") },
1287
+ ...efforts.map((effort) => ({ id: effort, label: effort }))
1288
+ ],
1289
+ selectedId: draft.effort === "" ? void 0 : draft.effort,
1290
+ onSelect: (id) => {
1291
+ dispatchCardStore.cell(index, "effort", id);
1292
+ setOpenMenu(null);
1293
+ commitRows();
1294
+ },
1295
+ onClose: () => setOpenMenu(null),
1296
+ className: "dsh-judge-field-wrap",
1297
+ portal: true
1298
+ }
1299
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1179
1300
  import_dsh_client_ui_primitives.Input,
1180
1301
  {
1181
1302
  type: "text",
1182
1303
  className: "dsh-judge-field",
1183
- readOnly: true,
1184
1304
  value: draft.effort,
1185
1305
  placeholder: t("rows.effortPlaceholder"),
1186
1306
  "aria-label": `${t("rows.colEffort")} ${index + 1}`,
1187
- "aria-haspopup": "listbox",
1188
- "aria-expanded": openMenu?.index === index && openMenu.kind === "effort",
1189
- onClick: () => setOpenMenu({ index, kind: "effort" }),
1190
- onFocus: () => setOpenMenu({ index, kind: "effort" })
1307
+ onChange: (event) => dispatchCardStore.cell(index, "effort", event.target.value),
1308
+ onBlur: commitRows
1191
1309
  }
1192
- ),
1193
- items: [
1194
- { type: "label", id: "effort", text: t("rows.colEffort") },
1195
- ...efforts.map((effort) => ({ id: effort, label: effort }))
1196
- ],
1197
- selectedId: draft.effort === "" ? void 0 : draft.effort,
1198
- onSelect: (id) => {
1199
- dispatchCardStore.cell(index, "effort", id);
1200
- setOpenMenu(null);
1201
- commitRows();
1202
- },
1203
- onClose: () => setOpenMenu(null),
1204
- className: "dsh-judge-field-wrap",
1205
- portal: true
1206
- }
1207
- ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1208
- import_dsh_client_ui_primitives.Input,
1209
- {
1210
- type: "text",
1211
- className: "dsh-judge-field",
1212
- value: draft.effort,
1213
- placeholder: t("rows.effortPlaceholder"),
1214
- "aria-label": `${t("rows.colEffort")} ${index + 1}`,
1215
- onChange: (event) => dispatchCardStore.cell(index, "effort", event.target.value),
1216
- onBlur: commitRows
1217
- }
1218
- ) }),
1219
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { className: "dsh-judge-col-actions", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-judge-cell-actions", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1220
- import_dsh_client_ui_primitives.Button,
1221
- {
1222
- variant: "outline",
1223
- size: "sm",
1224
- "aria-label": `${t("rows.remove")} ${index + 1}`,
1225
- onClick: () => dispatchCardStore.removeRow(index),
1226
- children: t("rows.remove")
1227
- }
1228
- ) }) })
1229
- ] }, index);
1310
+ ) }),
1311
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { className: "dsh-judge-col-actions", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-judge-cell-actions", children: [
1312
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1313
+ import_dsh_client_ui_primitives.Switch,
1314
+ {
1315
+ checked: draft.enabled,
1316
+ onChange: (next) => dispatchCardStore.toggleRow(index, next),
1317
+ label: `${t("rows.enabled")}: ${draft.description}`,
1318
+ disabled: !state.writable
1319
+ }
1320
+ ),
1321
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1322
+ import_dsh_client_ui_primitives.Button,
1323
+ {
1324
+ variant: "outline",
1325
+ size: "sm",
1326
+ "aria-label": `${t("rows.remove")} ${index + 1}`,
1327
+ onClick: () => dispatchCardStore.removeRow(index),
1328
+ children: t("rows.remove")
1329
+ }
1330
+ )
1331
+ ] }) })
1332
+ ]
1333
+ },
1334
+ index
1335
+ );
1230
1336
  };
1231
1337
  const design = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-judge-panel", children: [
1232
1338
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-judge-section", children: [
@@ -1378,7 +1484,7 @@ function JudgeDispatchPanel(props) {
1378
1484
  state.rows.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-judge-desc", children: t("rows.empty") }),
1379
1485
  state.rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", { className: "dsh-judge-table", children: [
1380
1486
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
1381
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { className: "dsh-judge-col-no", children: t("rows.colId") }),
1487
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { className: "dsh-judge-col-drag" }),
1382
1488
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: t("rows.colType") }),
1383
1489
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { className: "dsh-judge-col-model", children: t("rows.colModel") }),
1384
1490
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { className: "dsh-judge-col-effort", children: t("rows.colEffort") }),
@@ -1394,8 +1500,12 @@ function JudgeDispatchPanel(props) {
1394
1500
  const log = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-judge-panel", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-judge-section", children: [
1395
1501
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-judge-head", children: [
1396
1502
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dsh-judge-title", children: t("log.title") }),
1397
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", onClick: () => void dispatchCardStore.refreshLog(), children: t("log.refresh") })
1503
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-judge-actions-group", children: [
1504
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", onClick: () => void (0, import_dsh_client_ui_primitives.writeClipboard)(t("log.analysisPrompt")).then(setLogCopyResult), children: t("log.copyAnalysis") }),
1505
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", onClick: () => void dispatchCardStore.refreshLog(), children: t("log.refresh") })
1506
+ ] })
1398
1507
  ] }),
1508
+ logCopyResult !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: logCopyResult ? "dsh-judge-note-ok" : "dsh-judge-note-bad", role: "status", children: t(logCopyResult ? "log.analysisCopied" : "log.analysisCopyFailed") }),
1399
1509
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-judge-desc", children: t("log.desc") }),
1400
1510
  state.logFailed && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-judge-note-bad", children: t("log.loadFailed") }),
1401
1511
  state.logLoaded && state.log.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-judge-desc", children: t("log.empty") }),