@lynn123411/dsh-subagent-judge-dispatch 0.6.8 → 0.6.9
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 +8 -7
- package/lib/client.js +74 -13
- package/lib/client.js.map +2 -2
- package/lib/index.js +67 -9
- package/lib/index.js.map +3 -3
- package/package.json +20 -20
package/README.md
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
- **导入导出**:任务类型清单与判断服务设置都能按纯 JSON 复制走,也能粘贴回来;粘进来的那一份直接替换并立即写入。判断服务那一份只含地址与判断模型,不含密钥。
|
|
13
13
|
- **完整预览**:看一眼真正会发给判断服务的整段内容,派工标签与任务正文那两处标注「派工时才填」。
|
|
14
14
|
- **当场试通**:判断服务的地址填完就能试一下通不通,不用等第一次派工失败。
|
|
15
|
+
- **试判样例**:输入任务并主动发送,将正文和已保存的类型清单发给配置的判断服务,显示所选路线和宿主校验结果;不派工、不记日志。
|
|
15
16
|
- **地址自动补路径**:端点地址填到主机就行,发请求时自动补上 `/v1/systemone`;地址里已经带了 `/v1/systemone` 或 `/systemone` 就原样用,只填到 `/v1` 就只补 `/systemone`。
|
|
16
17
|
- **密钥直接填**:判断服务要用的密钥就填在配置卡片里,存进 DSH 的凭据文件,只写不读;页面不会把它显示回来。
|
|
17
18
|
- **结果日志**:记录结果、路线、时间和耗时。点开一行可看判断模型、可选类型数和输入长度。配置页显示最近 10 条,磁盘最多保留 200 条。
|
|
@@ -54,7 +55,7 @@ dsh plugin --profile web add @lynn123411/dsh-subagent-judge-dispatch
|
|
|
54
55
|
| `logEnabled` | true | 判断结果写不写进日志文件。 |
|
|
55
56
|
| `endpointUrl` | 空 | 判断服务地址,按读者填的原样存,发请求时才补路径。 |
|
|
56
57
|
| `judgeModel` | 空 | 判断模型 id。 |
|
|
57
|
-
| `rows` | `[]` |
|
|
58
|
+
| `rows` | `[]` | 任务类型清单,按页面顺序;每行包含 `description`、`provider`、`model`、`effort`、开关 `enabled` 和随机标识 `stableId`。编号只数打开且填全的行,按数组位置从 1 连续;保存清单时为缺少标识的旧行补上标识。 |
|
|
58
59
|
|
|
59
60
|
字段都标了 `.volatile()`:改它们不重挂这条 loader entry,接线每次派工现读当前值。
|
|
60
61
|
|
|
@@ -102,7 +103,7 @@ dsh plugin --profile web add @lynn123411/dsh-subagent-judge-dispatch
|
|
|
102
103
|
|
|
103
104
|
判断日志写在 `~/.dsh/dsh-subagent-judge-dispatch/judgements.json`(跟随 `DSH_HOME`)。多个进程在同一个文件锁内读取并合并最新记录,再原子替换文件。
|
|
104
105
|
|
|
105
|
-
|
|
106
|
+
「选择」列显示模型和推理等级,悬停可以查看提供方。「未判成」结果的悬停提示说明失败原因。类型编号是判断时的编号;悬停显示随机行标识,旧记录或尚未保存标识的行提示无法追溯。行标识不记录判断条件,行内容后来改动时不能还原原描述。点开日志行可看当次请求的数值和模型信息。读取失败时保留已有列表并可刷新重试。日志不保存任务正文、派工标签、会话标题或判断条件。日志页的「分析判断结果」可复制一段统计最近 100 条日志的请求。
|
|
106
107
|
|
|
107
108
|
### 导入导出
|
|
108
109
|
|
|
@@ -127,7 +128,7 @@ dsh plugin --profile web add @lynn123411/dsh-subagent-judge-dispatch
|
|
|
127
128
|
## 限制
|
|
128
129
|
|
|
129
130
|
- 判断服务和宿主路线校验共用 5 秒,时间用完时沿用原路线。
|
|
130
|
-
-
|
|
131
|
+
- 编号按位置算,清单改变后会重排;旧日志没有行标识时不能确定当时的类型,删除或导入替换的行也无法与新行关联。
|
|
131
132
|
- 每个子代理只判一次,插件卸载或重载后这份记录清空。
|
|
132
133
|
- 宿主未开启子代理模型选择时,派工沿用宿主原路线。
|
|
133
134
|
- 日志文件留最近 200 条,配置页只列最近 10 条。
|
|
@@ -143,10 +144,10 @@ cd plugins/dsh-subagent-judge-dispatch && pnpm check
|
|
|
143
144
|
`check` = `typecheck` + `build` + 五个自检 + `assert:lib-untracked`:
|
|
144
145
|
|
|
145
146
|
- **`scripts/test-decision.mjs`** 直接验证判断请求、答复匹配、超时、类型编号与日志保留。用四个进程同时追加日志,核对磁盘保留完整的最新 200 条。
|
|
146
|
-
- **`scripts/smoke-host.mjs`** 用 Cordis `Context` 验证 `agent/created`
|
|
147
|
+
- **`scripts/smoke-host.mjs`** 用 Cordis `Context` 验证 `agent/created` 的派工关联、原路线保留、实时允许名单、推理等级校验、共享时限与无任务正文的日志;模拟判断服务检查样例正文、路线校验和不记日志。使用真实 Connection 验证 `/api` 必须认证、匿名凭据被拒、非 owner 无法触发样例判断。
|
|
147
148
|
- **`scripts/smoke-client.mjs`** 按 Web shell 的方式装载 `lib/client.js`(`window.__ModuleLoader__.load` 桩件),喂假 cordis 服务:断言卡片注册进 `plugins.bundle.config`、key 是包名、走 `slots.inject`、读本插件自己的命名空间与宿主那份「子代理可选用哪些模型」设置、以宿主在服务本条目为挂载条件、样式表在 `apply()` 追加一次且没写死色值,以及 zh/en 键集一致。它的守卫带反例断言(「守卫拒绝未声明的服务读取」必须抛)。
|
|
148
|
-
- **`scripts/test-card.mjs`** 打的是 `src
|
|
149
|
-
- **`scripts/test-render.mjs`** 用真 react 把卡片画进 jsdom
|
|
149
|
+
- **`scripts/test-card.mjs`** 打的是 `src/`,守配置卡片状态机、失败的日志读取与重试、行标识在排序后保持不变,以及清单与判断服务设置的导入导出。
|
|
150
|
+
- **`scripts/test-render.mjs`** 用真 react 把卡片画进 jsdom,验证配置、导入导出和日志表,旧记录的编号说明挂在 `Tooltip` 上。`ui-primitives` 走替身,外观与浮层定位要在真浏览器里看。
|
|
150
151
|
- **`assert-lib-untracked.mjs`**:`lib/` 是构建镜像,不入 git。
|
|
151
152
|
|
|
152
|
-
要肉眼确认页面上的形态,用仓库的 `node tools/verify-client.mjs dsh-subagent-judge-dispatch --needle '<你新写的文案>'`。
|
|
153
|
+
要肉眼确认页面上的形态,用仓库的 `node tools/verify-client.mjs dsh-subagent-judge-dispatch --needle '<你新写的文案>'`。
|
package/lib/client.js
CHANGED
|
@@ -142,6 +142,7 @@ var ALLOWED_MODELS_NAMESPACE = "subagent-model-selection-settings";
|
|
|
142
142
|
var LOG_ROUTE_PATH = "/api/dsh-subagent-judge-dispatch/log";
|
|
143
143
|
var PREVIEW_ROUTE_PATH = "/api/dsh-subagent-judge-dispatch/preview";
|
|
144
144
|
var PROBE_ROUTE_PATH = "/api/dsh-subagent-judge-dispatch/probe";
|
|
145
|
+
var SAMPLE_ROUTE_PATH = "/api/dsh-subagent-judge-dispatch/sample";
|
|
145
146
|
async function readJson(response) {
|
|
146
147
|
try {
|
|
147
148
|
return await response.json();
|
|
@@ -152,14 +153,11 @@ async function readJson(response) {
|
|
|
152
153
|
function createDispatchRemote() {
|
|
153
154
|
return {
|
|
154
155
|
async log() {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
} catch {
|
|
161
|
-
return [];
|
|
162
|
-
}
|
|
156
|
+
const response = await fetch(LOG_ROUTE_PATH);
|
|
157
|
+
if (!response.ok) throw new Error("Log request failed");
|
|
158
|
+
const body = await readJson(response);
|
|
159
|
+
if (body?.ok !== true || !Array.isArray(body.entries)) throw new Error("Invalid log response");
|
|
160
|
+
return body.entries;
|
|
163
161
|
},
|
|
164
162
|
async preview() {
|
|
165
163
|
try {
|
|
@@ -185,6 +183,15 @@ function createDispatchRemote() {
|
|
|
185
183
|
} catch {
|
|
186
184
|
return { ok: false, latencyMs: 0, reason: "unreachable" };
|
|
187
185
|
}
|
|
186
|
+
},
|
|
187
|
+
async sample(task) {
|
|
188
|
+
const response = await fetch(SAMPLE_ROUTE_PATH, {
|
|
189
|
+
method: "POST",
|
|
190
|
+
headers: { "content-type": "application/json" },
|
|
191
|
+
body: JSON.stringify({ task })
|
|
192
|
+
});
|
|
193
|
+
if (!response.ok) throw new Error("Sample request failed");
|
|
194
|
+
return await readJson(response) ?? { ok: false, reason: "unreachable" };
|
|
188
195
|
}
|
|
189
196
|
};
|
|
190
197
|
}
|
|
@@ -192,6 +199,7 @@ function readRow(value) {
|
|
|
192
199
|
const record = typeof value === "object" && value !== null ? value : {};
|
|
193
200
|
const text = (key) => typeof record[key] === "string" ? record[key] : "";
|
|
194
201
|
return {
|
|
202
|
+
...typeof record.stableId === "string" && record.stableId !== "" ? { stableId: record.stableId } : {},
|
|
195
203
|
description: text("description"),
|
|
196
204
|
provider: text("provider"),
|
|
197
205
|
model: text("model"),
|
|
@@ -629,7 +637,9 @@ var DispatchCardStore = class {
|
|
|
629
637
|
ops.push({ op: "set", path: ["logEnabled"], value: this.state.logEnabled });
|
|
630
638
|
}
|
|
631
639
|
} else if (JSON.stringify(this.state.rows) !== JSON.stringify(this.state.committed.rows)) {
|
|
632
|
-
|
|
640
|
+
const rows = this.state.rows.map((row) => readRow({ ...row, stableId: row.stableId || crypto.randomUUID() }));
|
|
641
|
+
this.state = { ...this.state, rows };
|
|
642
|
+
ops.push({ op: "set", path: ["rows"], value: rows });
|
|
633
643
|
}
|
|
634
644
|
const typedKey = section === "judge" ? this.state.key.text.trim() : "";
|
|
635
645
|
if (ops.length === 0 && typedKey === "") {
|
|
@@ -703,7 +713,11 @@ var DispatchCardStore = class {
|
|
|
703
713
|
}
|
|
704
714
|
/** Read the runtime log from the Host. */
|
|
705
715
|
async refreshLog() {
|
|
706
|
-
if (this.remote === null)
|
|
716
|
+
if (this.remote === null) {
|
|
717
|
+
this.state = { ...this.state, logLoaded: true, logFailed: true };
|
|
718
|
+
this.notify();
|
|
719
|
+
return;
|
|
720
|
+
}
|
|
707
721
|
try {
|
|
708
722
|
const entries = await this.remote.log();
|
|
709
723
|
this.state = { ...this.state, log: entries, logLoaded: true, logFailed: false };
|
|
@@ -730,6 +744,13 @@ var DispatchCardStore = class {
|
|
|
730
744
|
return { ok: false, latencyMs: 0, reason: "unreachable" };
|
|
731
745
|
}
|
|
732
746
|
}
|
|
747
|
+
async sample(task) {
|
|
748
|
+
try {
|
|
749
|
+
return await this.remote?.sample?.(task) ?? { ok: false, reason: "unreachable" };
|
|
750
|
+
} catch {
|
|
751
|
+
return { ok: false, reason: "unreachable" };
|
|
752
|
+
}
|
|
753
|
+
}
|
|
733
754
|
/** The effort ids available for one row's currently selected model. */
|
|
734
755
|
effortsFor(row) {
|
|
735
756
|
return this.state.models.find(
|
|
@@ -852,6 +873,7 @@ var en = {
|
|
|
852
873
|
"log.colTime": "Time",
|
|
853
874
|
"log.colLatency": "Took",
|
|
854
875
|
"log.resultJudged": "Type {id}",
|
|
876
|
+
"log.resultHistorical": "Type {id} at the time",
|
|
855
877
|
"log.resultInherited": "No match",
|
|
856
878
|
"log.promptTitle": "Judgement request metrics",
|
|
857
879
|
"log.promptDesc": "Judge model, number of offered choices, and input length.",
|
|
@@ -863,6 +885,14 @@ var en = {
|
|
|
863
885
|
"log.analysisCopyFailed": "Could not copy to the clipboard.",
|
|
864
886
|
"log.refresh": "Refresh",
|
|
865
887
|
"log.loadFailed": "The log could not be read.",
|
|
888
|
+
"log.typeKey": "Type identifier: {key}; number at the time of judgement.",
|
|
889
|
+
"log.legacyType": "Historical number; the original type cannot be identified after edits.",
|
|
890
|
+
"sample.title": "Try a sample task",
|
|
891
|
+
"sample.desc": "Sending will transmit this text and the configured type list to the configured judgement service. Uses saved settings; does not dispatch a subagent or write a log.",
|
|
892
|
+
"sample.send": "Send sample for judgement",
|
|
893
|
+
"sample.running": "Judging\u2026",
|
|
894
|
+
"sample.valid": "Route validation passed.",
|
|
895
|
+
"sample.failed": "Judgement or route validation failed:",
|
|
866
896
|
"ms": "{value} ms"
|
|
867
897
|
};
|
|
868
898
|
var zh = {
|
|
@@ -964,6 +994,7 @@ var zh = {
|
|
|
964
994
|
"log.colTime": "\u65F6\u95F4",
|
|
965
995
|
"log.colLatency": "\u8017\u65F6",
|
|
966
996
|
"log.resultJudged": "\u7C7B\u578B {id}",
|
|
997
|
+
"log.resultHistorical": "\u5F53\u65F6\u7684\u7C7B\u578B {id}",
|
|
967
998
|
"log.resultInherited": "\u672A\u5224\u6210",
|
|
968
999
|
"log.promptTitle": "\u5224\u65AD\u8BF7\u6C42\u7EDF\u8BA1",
|
|
969
1000
|
"log.promptDesc": "\u5224\u65AD\u6A21\u578B\u3001\u53EF\u9009\u7C7B\u578B\u6570\u548C\u8F93\u5165\u957F\u5EA6\u3002",
|
|
@@ -975,6 +1006,14 @@ var zh = {
|
|
|
975
1006
|
"log.analysisCopyFailed": "\u590D\u5236\u5230\u526A\u8D34\u677F\u6CA1\u6210\u529F\u3002",
|
|
976
1007
|
"log.refresh": "\u5237\u65B0",
|
|
977
1008
|
"log.loadFailed": "\u65E5\u5FD7\u8BFB\u4E0D\u51FA\u6765\u3002",
|
|
1009
|
+
"log.typeKey": "\u7C7B\u578B\u6807\u8BC6\uFF1A{key}\uFF1B\u7F16\u53F7\u662F\u5224\u65AD\u65F6\u7684\u7F16\u53F7\u3002",
|
|
1010
|
+
"log.legacyType": "\u8FD9\u662F\u5F53\u65F6\u7684\u7F16\u53F7\uFF1B\u6E05\u5355\u4FEE\u6539\u540E\u65E0\u6CD5\u786E\u5B9A\u539F\u6765\u7684\u7C7B\u578B\u3002",
|
|
1011
|
+
"sample.title": "\u8BD5\u5224\u6837\u4F8B\u4EFB\u52A1",
|
|
1012
|
+
"sample.desc": "\u53D1\u9001\u540E\uFF0C\u8FD9\u6BB5\u6587\u5B57\u548C\u5DF2\u4FDD\u5B58\u7684\u7C7B\u578B\u6E05\u5355\u4F1A\u53D1\u7ED9\u914D\u7F6E\u7684\u5224\u65AD\u670D\u52A1\u3002\u4F7F\u7528\u5DF2\u4FDD\u5B58\u7684\u8BBE\u7F6E\uFF0C\u4E0D\u4F1A\u6D3E\u51FA\u5B50\u4EE3\u7406\u6216\u5199\u5165\u65E5\u5FD7\u3002",
|
|
1013
|
+
"sample.send": "\u53D1\u9001\u6837\u4F8B\u5E76\u8BD5\u5224",
|
|
1014
|
+
"sample.running": "\u6B63\u5728\u5224\u65AD\u2026",
|
|
1015
|
+
"sample.valid": "\u8DEF\u7EBF\u6821\u9A8C\u901A\u8FC7\u3002",
|
|
1016
|
+
"sample.failed": "\u5224\u65AD\u6216\u8DEF\u7EBF\u6821\u9A8C\u5931\u8D25\uFF1A",
|
|
978
1017
|
"ms": "{value} \u6BEB\u79D2"
|
|
979
1018
|
};
|
|
980
1019
|
function apply(ctx) {
|
|
@@ -1135,6 +1174,9 @@ function JudgeDispatchPanel(props) {
|
|
|
1135
1174
|
const [previewOpen, setPreviewOpen] = (0, import_react2.useState)(false);
|
|
1136
1175
|
const [probing, setProbing] = (0, import_react2.useState)(false);
|
|
1137
1176
|
const [probeResult, setProbeResult] = (0, import_react2.useState)(null);
|
|
1177
|
+
const [sampleTask, setSampleTask] = (0, import_react2.useState)("");
|
|
1178
|
+
const [sampling, setSampling] = (0, import_react2.useState)(false);
|
|
1179
|
+
const [sampleResult, setSampleResult] = (0, import_react2.useState)(null);
|
|
1138
1180
|
const [detail, setDetail] = (0, import_react2.useState)(null);
|
|
1139
1181
|
const [openMenu, setOpenMenu] = (0, import_react2.useState)(null);
|
|
1140
1182
|
const [importSection, setImportSection] = (0, import_react2.useState)(null);
|
|
@@ -1249,6 +1291,7 @@ function JudgeDispatchPanel(props) {
|
|
|
1249
1291
|
}
|
|
1250
1292
|
) }),
|
|
1251
1293
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("td", { children: [
|
|
1294
|
+
draft.stableId && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dsh-judge-hint", children: t("log.typeKey").replace("{key}", draft.stableId) }),
|
|
1252
1295
|
rowHints(state.rows, index, t).map((hint) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dsh-judge-off", children: hint }, hint)),
|
|
1253
1296
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1254
1297
|
"textarea",
|
|
@@ -1523,7 +1566,25 @@ function JudgeDispatchPanel(props) {
|
|
|
1523
1566
|
copyNote !== null && copyNote.section === "rows" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: copyNote.ok ? "dsh-judge-note-ok" : "dsh-judge-note-bad", role: "status", children: copyNote.text }),
|
|
1524
1567
|
failure("rows")
|
|
1525
1568
|
] }),
|
|
1526
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "dsh-judge-footer", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives2.Button, { variant: "outline", size: "sm", onClick: () => void openPreview(), children: t("preview.open") }) })
|
|
1569
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "dsh-judge-footer", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives2.Button, { variant: "outline", size: "sm", onClick: () => void openPreview(), children: t("preview.open") }) }),
|
|
1570
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dsh-judge-section", children: [
|
|
1571
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "dsh-judge-title", children: t("sample.title") }),
|
|
1572
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "dsh-judge-desc", children: t("sample.desc") }),
|
|
1573
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("textarea", { "aria-label": t("sample.title"), value: sampleTask, maxLength: 1e4, onChange: (event) => setSampleTask(event.target.value) }),
|
|
1574
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives2.Button, { variant: "outline", size: "sm", disabled: sampling || !sampleTask.trim() || state.writing !== "", onClick: () => void (async () => {
|
|
1575
|
+
setSampling(true);
|
|
1576
|
+
await dispatchCardStore.flush();
|
|
1577
|
+
const current = dispatchCardStore.getState();
|
|
1578
|
+
if (current.writeFailed || current.key.failed || current.endpointUrl !== current.committed.endpointUrl || current.judgeModel !== current.committed.judgeModel || JSON.stringify(current.rows) !== JSON.stringify(current.committed.rows)) setSampleResult({ ok: false, reason: "write" });
|
|
1579
|
+
else setSampleResult(await dispatchCardStore.sample(sampleTask));
|
|
1580
|
+
setSampling(false);
|
|
1581
|
+
})(), children: sampling ? t("sample.running") : t("sample.send") }),
|
|
1582
|
+
sampleResult && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { role: "status", children: [
|
|
1583
|
+
sampleResult.typeId != null && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { children: t("log.resultJudged").replace("{id}", String(sampleResult.typeId)) }),
|
|
1584
|
+
sampleResult.route && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { children: [sampleResult.route.provider, sampleResult.route.model, sampleResult.route.reasoningEffort].join(" \xB7 ") }),
|
|
1585
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { children: sampleResult.ok ? t("sample.valid") : `${t("sample.failed")} ${sampleResult.reason === "write" ? t("write.invalid") : reasonText(sampleResult.reason)}` })
|
|
1586
|
+
] })
|
|
1587
|
+
] })
|
|
1527
1588
|
] });
|
|
1528
1589
|
const log = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "dsh-judge-panel", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dsh-judge-section", children: [
|
|
1529
1590
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dsh-judge-head", children: [
|
|
@@ -1536,7 +1597,7 @@ function JudgeDispatchPanel(props) {
|
|
|
1536
1597
|
logCopyResult !== null && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: logCopyResult ? "dsh-judge-note-ok" : "dsh-judge-note-bad", role: "status", children: t(logCopyResult ? "log.analysisCopied" : "log.analysisCopyFailed") }),
|
|
1537
1598
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "dsh-judge-desc", children: t("log.desc") }),
|
|
1538
1599
|
state.logFailed && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "dsh-judge-note-bad", children: t("log.loadFailed") }),
|
|
1539
|
-
state.logLoaded && state.log.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "dsh-judge-desc", children: t("log.empty") }),
|
|
1600
|
+
state.logLoaded && !state.logFailed && state.log.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "dsh-judge-desc", children: t("log.empty") }),
|
|
1540
1601
|
state.log.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dsh-judge-log", children: [
|
|
1541
1602
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dsh-judge-log-row dsh-judge-log-head", children: [
|
|
1542
1603
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: t("log.colResult") }),
|
|
@@ -1548,7 +1609,7 @@ function JudgeDispatchPanel(props) {
|
|
|
1548
1609
|
const result = entry.typeId === null ? {
|
|
1549
1610
|
text: t("log.resultInherited"),
|
|
1550
1611
|
hint: entry.reason === void 0 ? "" : reasonText(entry.reason)
|
|
1551
|
-
} : { text: t("log.
|
|
1612
|
+
} : { text: t("log.resultHistorical").replace("{id}", String(entry.typeId)), hint: entry.typeKey ? t("log.typeKey").replace("{key}", entry.typeKey) : t("log.legacyType") };
|
|
1552
1613
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1553
1614
|
"button",
|
|
1554
1615
|
{
|