dsh-llm-verifier 0.6.0 → 0.6.2

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 (61) hide show
  1. package/README.md +3 -0
  2. package/lib/{auto-DAMeKRkK.js → auto-caXDU2pw.js} +19 -1
  3. package/lib/{auto-DAMeKRkK.js.map → auto-caXDU2pw.js.map} +1 -1
  4. package/lib/client.js +493 -331
  5. package/lib/client.js.map +1 -1
  6. package/lib/index.js +201 -52
  7. package/lib/index.js.map +1 -1
  8. package/lib/replay.js +1 -1
  9. package/lib/types/client-i18n.d.ts +36 -11
  10. package/lib/types/client-i18n.d.ts.map +1 -1
  11. package/lib/types/client-i18n.js +50 -9
  12. package/lib/types/client-i18n.js.map +1 -1
  13. package/lib/types/client.d.ts +17 -7
  14. package/lib/types/client.d.ts.map +1 -1
  15. package/lib/types/client.js +165 -44
  16. package/lib/types/client.js.map +1 -1
  17. package/lib/types/decisions.d.ts +8 -0
  18. package/lib/types/decisions.d.ts.map +1 -1
  19. package/lib/types/decisions.js +13 -1
  20. package/lib/types/decisions.js.map +1 -1
  21. package/lib/types/index.d.ts.map +1 -1
  22. package/lib/types/index.js +47 -31
  23. package/lib/types/index.js.map +1 -1
  24. package/lib/types/process-selection.d.ts +27 -5
  25. package/lib/types/process-selection.d.ts.map +1 -1
  26. package/lib/types/process-selection.js +17 -8
  27. package/lib/types/process-selection.js.map +1 -1
  28. package/lib/types/router.d.ts +22 -0
  29. package/lib/types/router.d.ts.map +1 -1
  30. package/lib/types/router.js +20 -0
  31. package/lib/types/router.js.map +1 -1
  32. package/lib/types/statistics.d.ts +8 -0
  33. package/lib/types/statistics.d.ts.map +1 -1
  34. package/lib/types/statistics.js +1 -1
  35. package/lib/types/statistics.js.map +1 -1
  36. package/lib/types/verifier-activity.d.ts +189 -0
  37. package/lib/types/verifier-activity.d.ts.map +1 -0
  38. package/lib/types/verifier-activity.js +223 -0
  39. package/lib/types/verifier-activity.js.map +1 -0
  40. package/package.json +1 -1
  41. package/src/client-i18n.ts +55 -16
  42. package/src/client.test.ts +101 -16
  43. package/src/client.tsx +238 -103
  44. package/src/decisions.test.ts +16 -0
  45. package/src/decisions.ts +22 -1
  46. package/src/index.test.ts +32 -0
  47. package/src/index.ts +48 -33
  48. package/src/process-selection.test.ts +13 -0
  49. package/src/process-selection.ts +39 -14
  50. package/src/router.test.ts +46 -0
  51. package/src/router.ts +31 -0
  52. package/src/statistics.test.ts +16 -0
  53. package/src/statistics.ts +9 -1
  54. package/src/verifier-activity.test.ts +164 -0
  55. package/src/verifier-activity.ts +321 -0
  56. package/lib/types/process-activity.d.ts +0 -109
  57. package/lib/types/process-activity.d.ts.map +0 -1
  58. package/lib/types/process-activity.js +0 -135
  59. package/lib/types/process-activity.js.map +0 -1
  60. package/src/process-activity.test.ts +0 -91
  61. package/src/process-activity.ts +0 -177
package/lib/client.js CHANGED
@@ -213,6 +213,7 @@ window.__ModuleLoader__.load({
213
213
  "recent.decisionPrompt": "提示词",
214
214
  "recent.decisionOutput": "原始回答",
215
215
  "recent.details": "查看详情",
216
+ "recent.detailsHide": "收起详情",
216
217
  "recent.detail.criterion": "判据",
217
218
  "recent.detail.score": "分数",
218
219
  "recent.detail.threshold": "阈值",
@@ -238,6 +239,13 @@ window.__ModuleLoader__.load({
238
239
  "models.calls": "{calls} 请求",
239
240
  "models.tokens": "{tokens} Token",
240
241
  "models.empty": "暂无模型调用",
242
+ "activity.route.classifying": "正在识别需要独立复核的对象…",
243
+ "activity.route.compare": "正在比较候选方案(约 {n} 次调用)…",
244
+ "activity.route.select": "正在为多个候选排名(约 {n} 次调用)…",
245
+ "activity.route.track": "正在复核任务进度(约 {n} 次调用)…",
246
+ "activity.final.accepting": "正在最终验收(约 {n} 次调用)…",
247
+ "activity.final.accepted": "最终验收通过",
248
+ "activity.final.rejected": "最终验收未通过",
241
249
  "process.generating": "正在过程选优:生成 {n} 份候选…",
242
250
  "process.comparing": "正在过程选优:裁判比较 {n} 份候选…",
243
251
  "process.replaced": "过程选优完成:已改用更优的回复",
@@ -514,6 +522,7 @@ window.__ModuleLoader__.load({
514
522
  "recent.decisionPrompt": "Prompt",
515
523
  "recent.decisionOutput": "Raw answer",
516
524
  "recent.details": "Details",
525
+ "recent.detailsHide": "Hide details",
517
526
  "recent.detail.criterion": "Criterion",
518
527
  "recent.detail.score": "Score",
519
528
  "recent.detail.threshold": "Threshold",
@@ -539,6 +548,13 @@ window.__ModuleLoader__.load({
539
548
  "models.calls": "{calls} Requests",
540
549
  "models.tokens": "{tokens} Tokens",
541
550
  "models.empty": "No model calls",
551
+ "activity.route.classifying": "Identifying what needs independent review…",
552
+ "activity.route.compare": "Comparing the candidate replies (about {n} calls)…",
553
+ "activity.route.select": "Ranking the candidate set (about {n} calls)…",
554
+ "activity.route.track": "Reviewing task progress (about {n} calls)…",
555
+ "activity.final.accepting": "Running the final acceptance (about {n} calls)…",
556
+ "activity.final.accepted": "Final acceptance passed",
557
+ "activity.final.rejected": "Final acceptance did not pass",
542
558
  "process.generating": "Selecting the best reply: generating {n} candidates…",
543
559
  "process.comparing": "Selecting the best reply: judging {n} candidates…",
544
560
  "process.replaced": "Process selection: a better reply replaced the original",
@@ -636,20 +652,47 @@ window.__ModuleLoader__.load({
636
652
  if (!params) return template;
637
653
  return template.replace(/\{(\w+)\}/g, (match, key) => key in params ? String(params[key]) : match);
638
654
  }
655
+ /** A count that is safe to print, falling back to the given minimum for a missing/garbled value. */
656
+ function activityCount(value, minimum) {
657
+ return typeof value === "number" && Number.isFinite(value) ? Math.max(minimum, Math.floor(value)) : minimum;
658
+ }
639
659
  /**
640
- * Render the process-selection chip, or nothing when there is nothing to say.
660
+ * Render the chat chip, or nothing when there is nothing to say.
641
661
  *
642
662
  * Pure on purpose (no React, no locale detection): both the chip and its regression tests read the
643
- * same mapping. An unknown phase counts as generating — a newer host describing a phase this build
644
- * does not know must still show that work is happening, not disappear.
663
+ * same mapping. Unknown enum values degrade to the least surprising copy — a newer host describing a
664
+ * phase or a stage this build does not know must still show that work is happening, not disappear.
645
665
  * @param view - the server's activity view, or nothing.
646
666
  * @param t - the active dictionary.
647
667
  * @returns The tone and copy, or null to render no row at all.
648
668
  */
649
- function processActivityText(view, t) {
669
+ function verifierActivityText(view, t) {
650
670
  const active = view?.active;
651
671
  if (active !== void 0 && active !== null) {
652
- const candidates = typeof active.candidates === "number" && Number.isFinite(active.candidates) ? Math.max(2, Math.floor(active.candidates)) : 2;
672
+ if (active.stage === "route") {
673
+ if (active.phase !== "reviewing") return {
674
+ tone: "busy",
675
+ text: t["activity.route.classifying"]
676
+ };
677
+ const calls = activityCount(active.expectedCalls, 1);
678
+ if (active.destination === "select") return {
679
+ tone: "busy",
680
+ text: tFormat(t["activity.route.select"], { n: calls })
681
+ };
682
+ if (active.destination === "track") return {
683
+ tone: "busy",
684
+ text: tFormat(t["activity.route.track"], { n: calls })
685
+ };
686
+ return {
687
+ tone: "busy",
688
+ text: tFormat(t["activity.route.compare"], { n: calls })
689
+ };
690
+ }
691
+ if (active.stage === "final") return {
692
+ tone: "busy",
693
+ text: tFormat(t["activity.final.accepting"], { n: activityCount(active.expectedCalls, 1) })
694
+ };
695
+ const candidates = activityCount(active.candidates, 2);
653
696
  return active.phase === "comparing" ? {
654
697
  tone: "busy",
655
698
  text: tFormat(t["process.comparing"], { n: candidates })
@@ -658,7 +701,19 @@ window.__ModuleLoader__.load({
658
701
  text: tFormat(t["process.generating"], { n: candidates })
659
702
  };
660
703
  }
661
- switch (view?.settled?.outcome) {
704
+ const settled = view?.settled;
705
+ if (settled?.stage === "final") {
706
+ if (settled.outcome === "accepted") return {
707
+ tone: "ok",
708
+ text: t["activity.final.accepted"]
709
+ };
710
+ if (settled.outcome === "rejected") return {
711
+ tone: "error",
712
+ text: t["activity.final.rejected"]
713
+ };
714
+ return null;
715
+ }
716
+ switch (settled?.outcome) {
662
717
  case "replaced": return {
663
718
  tone: "ok",
664
719
  text: t["process.replaced"]
@@ -1917,7 +1972,7 @@ window.__ModuleLoader__.load({
1917
1972
  fontSize: 12,
1918
1973
  lineHeight: "18px",
1919
1974
  cursor: "pointer",
1920
- color: "var(--dsw-alias-brand-primary, #4f8cff)"
1975
+ color: "var(--dsw-alias-link)"
1921
1976
  };
1922
1977
  const row = {
1923
1978
  display: "flex",
@@ -1964,7 +2019,7 @@ window.__ModuleLoader__.load({
1964
2019
  const sliderStyle = {
1965
2020
  width: "100%",
1966
2021
  margin: 0,
1967
- accentColor: "var(--dsw-alias-brand-primary, #4f8cff)"
2022
+ accentColor: "var(--dsw-alias-state-business-primary)"
1968
2023
  };
1969
2024
  const toolbarStyle = {
1970
2025
  display: "flex",
@@ -1989,8 +2044,8 @@ window.__ModuleLoader__.load({
1989
2044
  gap: 6,
1990
2045
  padding: "10px 0 12px",
1991
2046
  borderTop: "1px solid var(--dsw-alias-border-l2)",
1992
- background: "var(--dsw-alias-bg-module, #171925)",
1993
- boxShadow: "0 -10px 24px rgba(0,0,0,.18)"
2047
+ background: "var(--dsw-alias-bg-module-platform)",
2048
+ boxShadow: "0 -10px 24px var(--dsw-alias-bg-mask-2)"
1994
2049
  };
1995
2050
  const statusStyle = {
1996
2051
  fontSize: 12,
@@ -2008,7 +2063,7 @@ window.__ModuleLoader__.load({
2008
2063
  padding: "0 34px 0 12px",
2009
2064
  borderRadius: 8,
2010
2065
  color: "var(--dsw-alias-label-primary)",
2011
- background: "var(--dsw-alias-bg-input)",
2066
+ background: "var(--dsw-specific-input-major)",
2012
2067
  border: "1px solid var(--dsw-alias-border-l2)",
2013
2068
  font: "inherit",
2014
2069
  fontSize: 14,
@@ -2025,7 +2080,7 @@ window.__ModuleLoader__.load({
2025
2080
  borderRadius: 999,
2026
2081
  cursor: "pointer",
2027
2082
  transition: "background .15s ease",
2028
- background: enabled ? "var(--dsw-alias-state-success-primary)" : "var(--dsw-alias-bg-input)"
2083
+ background: enabled ? "var(--dsw-alias-state-success-primary)" : "var(--dsw-specific-input-major)"
2029
2084
  });
2030
2085
  const toggleThumbStyle = (enabled) => ({
2031
2086
  position: "absolute",
@@ -2034,20 +2089,31 @@ window.__ModuleLoader__.load({
2034
2089
  width: 16,
2035
2090
  height: 16,
2036
2091
  borderRadius: "50%",
2037
- background: "var(--dsw-static-neutral-00, #fff)",
2092
+ background: "var(--dsw-static-neutral-00)",
2038
2093
  boxShadow: "0 1px 3px rgba(0,0,0,.28)",
2039
2094
  transition: "left .15s ease"
2040
2095
  });
2041
2096
  const dashboardCard = {
2042
- border: "1px solid var(--dsw-alias-border-l2, rgba(255,255,255,.13))",
2043
- background: "color-mix(in srgb, var(--dsw-alias-bg-module, #171925) 88%, transparent)",
2097
+ border: "1px solid var(--dsw-alias-border-l2)",
2098
+ background: "var(--dsw-alias-bg-module-platform)",
2044
2099
  borderRadius: 16,
2045
- boxShadow: "0 12px 36px rgba(0,0,0,.12)"
2100
+ boxShadow: "0 12px 36px var(--dsw-alias-bg-mask-2)"
2046
2101
  };
2047
2102
  const muted = {
2048
- color: "var(--dsw-text-secondary)",
2103
+ color: "var(--dsw-alias-label-tertiary)",
2049
2104
  fontSize: 12
2050
2105
  };
2106
+ /** Chart palette rides the state aliases so bars and line stay legible in both themes. */
2107
+ const chartBarColor = "var(--dsw-alias-state-business-primary)";
2108
+ const chartLineColor = "var(--dsw-alias-state-warn-primary)";
2109
+ function toneChip(tone) {
2110
+ const token = tone === "error" ? "var(--dsw-alias-state-error-primary)" : tone === "warn" ? "var(--dsw-alias-state-warn-primary)" : tone === "pass" ? "var(--dsw-alias-state-success-primary)" : "var(--dsw-alias-state-business-primary)";
2111
+ return {
2112
+ background: `color-mix(in srgb, ${token} 14%, transparent)`,
2113
+ border: `1px solid color-mix(in srgb, ${token} 32%, transparent)`,
2114
+ color: tone === "warn" ? "var(--dsw-alias-state-warn-label)" : token
2115
+ };
2116
+ }
2051
2117
  const toolColors = {
2052
2118
  verifier_route_classify: "#d97706",
2053
2119
  verifier_compare: "#4f8cff",
@@ -2701,7 +2767,7 @@ window.__ModuleLoader__.load({
2701
2767
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", {
2702
2768
  style: {
2703
2769
  cursor: "pointer",
2704
- color: "var(--dsw-text-secondary)"
2770
+ color: "var(--dsw-alias-label-secondary)"
2705
2771
  },
2706
2772
  children: tFormat(t["field.criteriaPreset.previewSummary"], { count: preset.length })
2707
2773
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
@@ -2710,8 +2776,8 @@ window.__ModuleLoader__.load({
2710
2776
  wordBreak: "break-word",
2711
2777
  maxHeight: 240,
2712
2778
  overflow: "auto",
2713
- background: "var(--dsw-surface-sunken)",
2714
- border: "1px solid var(--dsw-alias-border-l2, rgba(255,255,255,.12))",
2779
+ background: "var(--dsw-alias-markdown-code-block)",
2780
+ border: "1px solid var(--dsw-alias-border-l1)",
2715
2781
  borderRadius: 8,
2716
2782
  padding: 10,
2717
2783
  marginTop: 8
@@ -2921,7 +2987,7 @@ window.__ModuleLoader__.load({
2921
2987
  style: {
2922
2988
  padding: "10px 12px",
2923
2989
  borderRadius: 8,
2924
- background: "var(--dsw-alias-state-warn-bg)",
2990
+ background: "var(--dsw-alias-state-warn-tertiary)",
2925
2991
  color: "var(--dsw-alias-state-warn-label)",
2926
2992
  fontSize: 12,
2927
2993
  lineHeight: "18px"
@@ -3095,13 +3161,13 @@ window.__ModuleLoader__.load({
3095
3161
  x2: width - pad.r,
3096
3162
  y1: pad.t + innerH * ratio,
3097
3163
  y2: pad.t + innerH * ratio,
3098
- stroke: "rgba(148,163,184,.16)"
3164
+ stroke: "var(--dsw-alias-border-l2)"
3099
3165
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
3100
3166
  x: pad.l - 8,
3101
3167
  y: pad.t + innerH * ratio + 4,
3102
3168
  textAnchor: "end",
3103
3169
  fontSize: "10",
3104
- fill: "var(--dsw-text-secondary)",
3170
+ fill: "var(--dsw-alias-label-secondary)",
3105
3171
  children: Math.round(max * (1 - ratio))
3106
3172
  })] }, ratio)),
3107
3173
  rows.map((row, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
@@ -3110,13 +3176,13 @@ window.__ModuleLoader__.load({
3110
3176
  width: barWidth,
3111
3177
  height: pad.t + innerH - y(row.invocations),
3112
3178
  rx: "2",
3113
- fill: "#4f8cff",
3179
+ fill: chartBarColor,
3114
3180
  opacity: ".82"
3115
3181
  }, row.date)),
3116
3182
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("polyline", {
3117
3183
  points,
3118
3184
  fill: "none",
3119
- stroke: "#5ed7e8",
3185
+ stroke: chartLineColor,
3120
3186
  strokeWidth: "2.4",
3121
3187
  strokeLinejoin: "round",
3122
3188
  strokeLinecap: "round"
@@ -3126,7 +3192,7 @@ window.__ModuleLoader__.load({
3126
3192
  y: height - 14,
3127
3193
  textAnchor: "middle",
3128
3194
  fontSize: "10",
3129
- fill: "var(--dsw-text-secondary)",
3195
+ fill: "var(--dsw-alias-label-secondary)",
3130
3196
  children: [
3131
3197
  Number(row.date.slice(5, 7)),
3132
3198
  "/",
@@ -3146,20 +3212,20 @@ window.__ModuleLoader__.load({
3146
3212
  width: 8,
3147
3213
  height: 8,
3148
3214
  borderRadius: 2,
3149
- background: "#4f8cff",
3215
+ background: chartBarColor,
3150
3216
  marginRight: 6
3151
3217
  } }), t["chart.legendToolCalls"]] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { style: {
3152
3218
  display: "inline-block",
3153
3219
  width: 14,
3154
3220
  height: 2,
3155
- background: "#5ed7e8",
3221
+ background: chartLineColor,
3156
3222
  marginRight: 6,
3157
3223
  verticalAlign: "middle"
3158
3224
  } }), t["chart.legendModelCalls"]] })]
3159
3225
  })]
3160
3226
  });
3161
3227
  }
3162
- function StatisticsPage({ sessionId, rpc, isGlobal }) {
3228
+ function StatisticsPage({ sessionId, rpc, isGlobal, blankComposerSeat }) {
3163
3229
  const lang = useLanguage();
3164
3230
  const t = dictionaries[lang];
3165
3231
  const labels = toolLabels[lang];
@@ -3171,6 +3237,17 @@ window.__ModuleLoader__.load({
3171
3237
  const [refresh, setRefresh] = (0, react.useState)(0);
3172
3238
  const [snapshot, setSnapshot] = (0, react.useState)(null);
3173
3239
  const snapshotRequest = (0, react.useRef)(0);
3240
+ const [openDetails, setOpenDetails] = (0, react.useState)(null);
3241
+ const seatHandle = (0, react.useRef)(blankComposerSeat);
3242
+ seatHandle.current = blankComposerSeat;
3243
+ (0, react.useEffect)(() => {
3244
+ const take = seatHandle.current;
3245
+ if (typeof take !== "function") return void 0;
3246
+ const dispose = take();
3247
+ return () => {
3248
+ dispose();
3249
+ };
3250
+ }, []);
3174
3251
  const toggleSnapshot = async (id) => {
3175
3252
  if (snapshot?.id === id) {
3176
3253
  setSnapshot(null);
@@ -3187,6 +3264,13 @@ window.__ModuleLoader__.load({
3187
3264
  if (rpc && typeof rpc.call === "function") try {
3188
3265
  const result = await rpc.call("/api", "llm-verifier/statistics", payload);
3189
3266
  if (result && result.ok === true) record = result.value.decision;
3267
+ else if (result && result.ok === false) {
3268
+ if (snapshotRequest.current === request) setSnapshot({
3269
+ id,
3270
+ error: result.error?.message ?? t["recent.decisionMissing"]
3271
+ });
3272
+ return;
3273
+ }
3190
3274
  } catch (rpcError) {
3191
3275
  console.warn("[llm-verifier] decision rpc.call failed, trying fetch fallback:", rpcError);
3192
3276
  }
@@ -3317,7 +3401,7 @@ window.__ModuleLoader__.load({
3317
3401
  overflow: "auto",
3318
3402
  boxSizing: "border-box",
3319
3403
  padding: "22px clamp(16px, 3vw, 38px) 48px",
3320
- color: "var(--dsw-text-primary)",
3404
+ color: "var(--dsw-alias-label-primary)",
3321
3405
  background: "radial-gradient(circle at 10% 0%, rgba(115,77,255,.09), transparent 32%), radial-gradient(circle at 100% 8%, rgba(47,197,201,.07), transparent 28%)"
3322
3406
  },
3323
3407
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -3350,8 +3434,8 @@ window.__ModuleLoader__.load({
3350
3434
  width: 34,
3351
3435
  height: 34,
3352
3436
  borderRadius: 10,
3353
- background: "rgba(79,140,255,.14)",
3354
- color: "#6da0ff"
3437
+ background: "color-mix(in srgb, var(--dsw-alias-state-business-primary) 14%, transparent)",
3438
+ color: "var(--dsw-alias-state-business-primary)"
3355
3439
  },
3356
3440
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconDataOutline16, { size: 18 })
3357
3441
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
@@ -3380,8 +3464,8 @@ window.__ModuleLoader__.load({
3380
3464
  display: "flex",
3381
3465
  padding: 3,
3382
3466
  borderRadius: 10,
3383
- background: "var(--dsw-surface-sunken)",
3384
- border: "1px solid var(--dsw-alias-border-l2, rgba(255,255,255,.12))"
3467
+ background: "var(--dsw-alias-bg-multi-select)",
3468
+ border: "1px solid var(--dsw-alias-border-l2)"
3385
3469
  },
3386
3470
  children: [
3387
3471
  7,
@@ -3395,8 +3479,8 @@ window.__ModuleLoader__.load({
3395
3479
  borderRadius: 7,
3396
3480
  padding: "6px 10px",
3397
3481
  cursor: "pointer",
3398
- color: days === value ? "#fff" : "var(--dsw-text-secondary)",
3399
- background: days === value ? "#3f68d8" : "transparent"
3482
+ color: days === value ? "var(--dsw-alias-state-business-primary)" : "var(--dsw-alias-label-secondary)",
3483
+ background: days === value ? "color-mix(in srgb, var(--dsw-alias-state-business-primary) 16%, transparent)" : "transparent"
3400
3484
  },
3401
3485
  children: tFormat(t["stats.daysUnit"], { days: value })
3402
3486
  }, value))
@@ -3405,12 +3489,12 @@ window.__ModuleLoader__.load({
3405
3489
  "aria-pressed": sessionOnly,
3406
3490
  onClick: () => setSessionOnly((value) => !value),
3407
3491
  style: {
3408
- border: "1px solid var(--dsw-alias-border-l2, rgba(255,255,255,.15))",
3492
+ border: "1px solid var(--dsw-alias-border-l3)",
3409
3493
  borderRadius: 9,
3410
3494
  padding: "7px 11px",
3411
3495
  cursor: "pointer",
3412
- color: "var(--dsw-text-primary)",
3413
- background: sessionOnly ? "rgba(79,140,255,.18)" : "var(--dsw-surface-sunken)"
3496
+ color: sessionOnly ? "var(--dsw-alias-state-business-primary)" : "var(--dsw-alias-label-primary)",
3497
+ background: sessionOnly ? "color-mix(in srgb, var(--dsw-alias-state-business-primary) 14%, transparent)" : "var(--dsw-alias-interactive-bg-hover)"
3414
3498
  },
3415
3499
  children: sessionOnly ? t["stats.currentSession"] : t["stats.allSessions"]
3416
3500
  }),
@@ -3419,12 +3503,12 @@ window.__ModuleLoader__.load({
3419
3503
  disabled: probe?.busy === true,
3420
3504
  onClick: () => void runProbe(),
3421
3505
  style: {
3422
- border: "1px solid var(--dsw-alias-border-l2, rgba(255,255,255,.15))",
3506
+ border: "1px solid var(--dsw-alias-border-l3)",
3423
3507
  borderRadius: 9,
3424
3508
  padding: "7px 11px",
3425
3509
  cursor: "pointer",
3426
- color: "var(--dsw-text-primary)",
3427
- background: "var(--dsw-surface-sunken)"
3510
+ color: "var(--dsw-alias-label-primary)",
3511
+ background: "var(--dsw-alias-interactive-bg-hover)"
3428
3512
  },
3429
3513
  children: probe?.busy === true ? t["probe.running"] : t["probe.button"]
3430
3514
  }),
@@ -3437,9 +3521,9 @@ window.__ModuleLoader__.load({
3437
3521
  width: 34,
3438
3522
  height: 34,
3439
3523
  borderRadius: 9,
3440
- border: "1px solid var(--dsw-alias-border-l2, rgba(255,255,255,.15))",
3441
- color: "var(--dsw-text-primary)",
3442
- background: "var(--dsw-surface-sunken)",
3524
+ border: "1px solid var(--dsw-alias-border-l3)",
3525
+ color: "var(--dsw-alias-label-primary)",
3526
+ background: "var(--dsw-alias-interactive-bg-hover)",
3443
3527
  cursor: "pointer"
3444
3528
  },
3445
3529
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutline16, { size: 16 })
@@ -3451,8 +3535,8 @@ window.__ModuleLoader__.load({
3451
3535
  style: {
3452
3536
  ...dashboardCard,
3453
3537
  padding: 18,
3454
- borderColor: "var(--dsw-danger, #e85858)",
3455
- color: "var(--dsw-danger, #e85858)"
3538
+ borderColor: "var(--dsw-alias-state-error-primary)",
3539
+ color: "var(--dsw-alias-state-error-primary)"
3456
3540
  },
3457
3541
  children: [error, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3458
3542
  style: {
@@ -3483,7 +3567,7 @@ window.__ModuleLoader__.load({
3483
3567
  style: {
3484
3568
  marginTop: 10,
3485
3569
  fontSize: 12,
3486
- color: "#e76565"
3570
+ color: "var(--dsw-alias-state-error-primary)"
3487
3571
  },
3488
3572
  children: probe.error
3489
3573
  }),
@@ -3503,7 +3587,7 @@ window.__ModuleLoader__.load({
3503
3587
  style: {
3504
3588
  marginTop: 6,
3505
3589
  fontSize: 12,
3506
- color: "#e3bd63"
3590
+ color: "var(--dsw-alias-state-warn-label)"
3507
3591
  },
3508
3592
  children: tFormat(t["probe.rubricFallback"], { error: probe.value.rubric.error })
3509
3593
  }),
@@ -3523,12 +3607,12 @@ window.__ModuleLoader__.load({
3523
3607
  fontSize: 12,
3524
3608
  padding: "9px 11px",
3525
3609
  borderRadius: 9,
3526
- background: "var(--dsw-surface-sunken)"
3610
+ background: "var(--dsw-alias-interactive-bg-hover)"
3527
3611
  },
3528
3612
  children: [
3529
3613
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3530
3614
  style: {
3531
- color: judge.ok ? "#77d49b" : "#e76565",
3615
+ color: judge.ok ? "var(--dsw-alias-state-success-primary)" : "var(--dsw-alias-state-error-primary)",
3532
3616
  fontWeight: 600
3533
3617
  },
3534
3618
  children: judge.ok ? "OK" : t["probe.failed"]
@@ -3563,7 +3647,7 @@ window.__ModuleLoader__.load({
3563
3647
  children: tFormat(t["probe.calls"], { calls: String(judge.calls) })
3564
3648
  })
3565
3649
  ] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3566
- style: { color: "#e76565" },
3650
+ style: { color: "var(--dsw-alias-state-error-primary)" },
3567
3651
  children: judge.error
3568
3652
  })
3569
3653
  ]
@@ -3627,7 +3711,7 @@ window.__ModuleLoader__.load({
3627
3711
  compact(totals?.successes ?? 0, lang),
3628
3712
  " ",
3629
3713
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("small", {
3630
- style: { color: "#77d49b" },
3714
+ style: { color: "var(--dsw-alias-state-success-primary)" },
3631
3715
  children: [
3632
3716
  "▲ ",
3633
3717
  ((totals?.successRate ?? 0) * 100).toFixed(1),
@@ -3662,7 +3746,7 @@ window.__ModuleLoader__.load({
3662
3746
  hits: compact(totals?.cacheHits ?? 0, lang),
3663
3747
  total: compact((totals?.cacheHits ?? 0) + (totals?.cacheMisses ?? 0), lang)
3664
3748
  }),
3665
- accent: "#b7dd64"
3749
+ accent: "var(--dsw-alias-state-success-primary)"
3666
3750
  }),
3667
3751
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Metric, {
3668
3752
  label: t["metric.prefixCacheHitRate"],
@@ -3745,8 +3829,8 @@ window.__ModuleLoader__.load({
3745
3829
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", {
3746
3830
  style: {
3747
3831
  textAlign: "left",
3748
- color: "var(--dsw-text-secondary)",
3749
- background: "var(--dsw-surface-sunken)"
3832
+ color: "var(--dsw-alias-label-secondary)",
3833
+ background: "var(--dsw-alias-interactive-bg-hover)"
3750
3834
  },
3751
3835
  children: [
3752
3836
  t["table.colTool"],
@@ -3765,7 +3849,7 @@ window.__ModuleLoader__.load({
3765
3849
  children: value
3766
3850
  }, value))
3767
3851
  }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tbody", { children: [(data?.tools ?? []).map((tool) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", {
3768
- style: { borderTop: "1px solid var(--dsw-alias-border-l2, rgba(255,255,255,.1))" },
3852
+ style: { borderTop: "1px solid var(--dsw-alias-border-l2)" },
3769
3853
  children: [
3770
3854
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("td", {
3771
3855
  style: { padding: "13px 12px" },
@@ -3795,7 +3879,7 @@ window.__ModuleLoader__.load({
3795
3879
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("td", {
3796
3880
  style: {
3797
3881
  padding: "13px 12px",
3798
- color: tool.successRate >= .9 ? "#77d49b" : tool.successRate >= .7 ? "#e3bd63" : "#ed7777"
3882
+ color: tool.successRate >= .9 ? "var(--dsw-alias-state-success-primary)" : tool.successRate >= .7 ? "var(--dsw-alias-state-warn-label)" : "var(--dsw-alias-state-error-primary)"
3799
3883
  },
3800
3884
  children: [(tool.successRate * 100).toFixed(1), "%"]
3801
3885
  }),
@@ -3866,258 +3950,196 @@ window.__ModuleLoader__.load({
3866
3950
  },
3867
3951
  children: [(data?.recent ?? []).map((item) => {
3868
3952
  const verdictInfo = item.verdict ? formatVerdictDetails(item.verdict, t) : void 0;
3953
+ const failed = !item.success || (verdictInfo ? verdictInfo.isFailed : false);
3954
+ const detailsOpen = openDetails === item.id;
3955
+ const panelStyle = {
3956
+ margin: "8px 0 0 15px",
3957
+ border: "1px solid var(--dsw-alias-border-l2)",
3958
+ borderRadius: 8,
3959
+ padding: "8px 10px",
3960
+ background: "var(--dsw-alias-interactive-bg-hover)",
3961
+ fontSize: 11
3962
+ };
3869
3963
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3870
3964
  style: {
3871
- display: "grid",
3872
- gridTemplateColumns: "minmax(170px,1fr) auto",
3873
- gap: 12,
3874
3965
  padding: "11px 8px",
3875
- borderTop: "1px solid var(--dsw-alias-border-l2, rgba(255,255,255,.1))"
3966
+ borderTop: "1px solid var(--dsw-alias-border-l2)"
3876
3967
  },
3877
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [
3968
+ children: [
3878
3969
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3879
3970
  style: {
3880
- display: "flex",
3881
- alignItems: "center",
3882
- gap: 8
3883
- },
3884
- children: [
3885
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { style: {
3886
- width: 7,
3887
- height: 7,
3888
- borderRadius: "50%",
3889
- background: !item.success || (verdictInfo ? verdictInfo.isFailed : false) ? "#e76565" : "#59c985"
3890
- } }),
3891
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", {
3892
- style: { fontSize: 13 },
3893
- children: labels[item.toolName] ?? item.toolName
3894
- }),
3895
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
3896
- style: muted,
3897
- children: [
3898
- item.provider,
3899
- "/",
3900
- item.model
3901
- ]
3902
- })
3903
- ]
3904
- }),
3905
- !item.success && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3906
- title: item.errorMessage,
3907
- style: {
3908
- margin: "5px 0 0 15px",
3909
- fontSize: 11,
3910
- color: "#e76565",
3911
- overflow: "hidden",
3912
- textOverflow: "ellipsis",
3913
- whiteSpace: "nowrap"
3971
+ display: "grid",
3972
+ gridTemplateColumns: "minmax(170px,1fr) auto",
3973
+ gap: 12
3914
3974
  },
3915
- children: item.errorMessage ?? item.errorName
3916
- }),
3917
- item.verdict && verdictInfo && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3918
- style: {
3919
- display: "flex",
3920
- alignItems: "center",
3921
- flexWrap: "wrap",
3922
- gap: 6,
3923
- margin: "6px 0 0 15px",
3924
- fontSize: 11
3925
- },
3926
- children: [
3927
- verdictInfo.outcomeText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3975
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [
3976
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3928
3977
  style: {
3929
- padding: "1px 5px",
3930
- borderRadius: 4,
3931
- fontWeight: 500,
3932
- fontSize: 11,
3933
- background: verdictInfo.isFailed ? "rgba(231,101,101,.16)" : item.verdict.outcome === "tie" ? "rgba(227,189,99,.16)" : "rgba(89,201,133,.16)",
3934
- color: verdictInfo.isFailed ? "#e76565" : item.verdict.outcome === "tie" ? "#e3bd63" : "#77d49b",
3935
- border: `1px solid ${verdictInfo.isFailed ? "rgba(231,101,101,.3)" : item.verdict.outcome === "tie" ? "rgba(227,189,99,.3)" : "rgba(89,201,133,.3)"}`
3936
- },
3937
- children: verdictInfo.outcomeText
3938
- }),
3939
- verdictInfo.phaseText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3940
- style: {
3941
- padding: "1px 5px",
3942
- borderRadius: 4,
3943
- background: "var(--dsw-surface-sunken)",
3944
- color: "var(--dsw-text-secondary)",
3945
- border: "1px solid var(--dsw-alias-border-l2, rgba(255,255,255,.1))"
3978
+ display: "flex",
3979
+ alignItems: "center",
3980
+ gap: 8
3946
3981
  },
3947
- children: verdictInfo.phaseText
3948
- }),
3949
- verdictInfo.scoreText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3950
- style: { color: typeof item.verdict.threshold === "number" && typeof item.verdict.score === "number" && item.verdict.score < item.verdict.threshold ? "#e76565" : "var(--dsw-text-primary)" },
3951
- children: verdictInfo.scoreText
3952
- }),
3953
- verdictInfo.checkpointsText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3954
- style: { color: "var(--dsw-text-secondary)" },
3955
- children: verdictInfo.checkpointsText
3956
- }),
3957
- verdictInfo.criteriaText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3958
- style: { color: "var(--dsw-text-secondary)" },
3959
- children: verdictInfo.criteriaText
3960
- }),
3961
- verdictInfo.winnerText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3962
- style: { color: "var(--dsw-text-secondary)" },
3963
- children: verdictInfo.winnerText
3982
+ children: [
3983
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { style: {
3984
+ width: 7,
3985
+ height: 7,
3986
+ borderRadius: "50%",
3987
+ background: failed ? "var(--dsw-alias-state-error-primary)" : "var(--dsw-alias-state-success-primary)"
3988
+ } }),
3989
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", {
3990
+ style: { fontSize: 13 },
3991
+ children: labels[item.toolName] ?? item.toolName
3992
+ }),
3993
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
3994
+ style: muted,
3995
+ children: [
3996
+ item.provider,
3997
+ "/",
3998
+ item.model
3999
+ ]
4000
+ })
4001
+ ]
3964
4002
  }),
3965
- item.route && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4003
+ !item.success && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4004
+ title: item.errorMessage,
3966
4005
  style: {
3967
- padding: "1px 5px",
3968
- borderRadius: 4,
4006
+ margin: "5px 0 0 15px",
3969
4007
  fontSize: 11,
3970
- background: "rgba(120,140,220,.14)",
3971
- color: "var(--dsw-text-secondary)",
3972
- border: "1px solid rgba(120,140,220,.3)"
4008
+ color: "var(--dsw-alias-state-error-primary)",
4009
+ overflow: "hidden",
4010
+ textOverflow: "ellipsis",
4011
+ whiteSpace: "nowrap"
3973
4012
  },
3974
- children: tFormat(t["recent.route.badge"], {
3975
- stage: item.route.stage,
3976
- destination: item.route.destination
3977
- })
4013
+ children: item.errorMessage ?? item.errorName
3978
4014
  }),
3979
- item.stats.usageIncomplete === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4015
+ item.verdict && verdictInfo && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3980
4016
  style: {
3981
- padding: "1px 5px",
3982
- borderRadius: 4,
3983
- fontSize: 11,
3984
- background: "rgba(227,189,99,.16)",
3985
- color: "#e3bd63",
3986
- border: "1px solid rgba(227,189,99,.3)"
4017
+ display: "flex",
4018
+ alignItems: "center",
4019
+ flexWrap: "wrap",
4020
+ gap: 6,
4021
+ margin: "6px 0 0 15px",
4022
+ fontSize: 11
3987
4023
  },
3988
- children: t["recent.detail.usageIncomplete"]
4024
+ children: [
4025
+ verdictInfo.outcomeText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4026
+ style: {
4027
+ padding: "1px 5px",
4028
+ borderRadius: 4,
4029
+ fontWeight: 500,
4030
+ fontSize: 11,
4031
+ ...toneChip(verdictInfo.isFailed ? "error" : item.verdict.outcome === "tie" ? "warn" : "pass")
4032
+ },
4033
+ children: verdictInfo.outcomeText
4034
+ }),
4035
+ verdictInfo.phaseText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4036
+ style: {
4037
+ padding: "1px 5px",
4038
+ borderRadius: 4,
4039
+ background: "var(--dsw-alias-interactive-bg-hover)",
4040
+ color: "var(--dsw-alias-label-secondary)",
4041
+ border: "1px solid var(--dsw-alias-border-l2)"
4042
+ },
4043
+ children: verdictInfo.phaseText
4044
+ }),
4045
+ verdictInfo.scoreText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4046
+ style: { color: typeof item.verdict.threshold === "number" && typeof item.verdict.score === "number" && item.verdict.score < item.verdict.threshold ? "var(--dsw-alias-state-error-primary)" : "var(--dsw-alias-label-primary)" },
4047
+ children: verdictInfo.scoreText
4048
+ }),
4049
+ verdictInfo.checkpointsText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4050
+ style: { color: "var(--dsw-alias-label-secondary)" },
4051
+ children: verdictInfo.checkpointsText
4052
+ }),
4053
+ verdictInfo.criteriaText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4054
+ style: { color: "var(--dsw-alias-label-secondary)" },
4055
+ children: verdictInfo.criteriaText
4056
+ }),
4057
+ verdictInfo.winnerText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4058
+ style: { color: "var(--dsw-alias-label-secondary)" },
4059
+ children: verdictInfo.winnerText
4060
+ }),
4061
+ item.route && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4062
+ style: {
4063
+ padding: "1px 5px",
4064
+ borderRadius: 4,
4065
+ fontSize: 11,
4066
+ color: "var(--dsw-alias-label-secondary)",
4067
+ ...toneChip("neutral")
4068
+ },
4069
+ children: tFormat(t["recent.route.badge"], {
4070
+ stage: item.route.stage,
4071
+ destination: item.route.destination
4072
+ })
4073
+ }),
4074
+ item.stats.usageIncomplete === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4075
+ style: {
4076
+ padding: "1px 5px",
4077
+ borderRadius: 4,
4078
+ fontSize: 11,
4079
+ ...toneChip("warn")
4080
+ },
4081
+ children: t["recent.detail.usageIncomplete"]
4082
+ })
4083
+ ]
3989
4084
  })
3990
- ]
4085
+ ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4086
+ style: { textAlign: "right" },
4087
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4088
+ style: { fontSize: 12 },
4089
+ children: duration(item.durationMs)
4090
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4091
+ style: {
4092
+ ...muted,
4093
+ marginTop: 3
4094
+ },
4095
+ children: dateTime(item.startedAt, lang)
4096
+ })]
4097
+ })]
3991
4098
  }),
3992
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3993
- style: { margin: "6px 0 0 15px" },
3994
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
4099
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4100
+ style: {
4101
+ display: "flex",
4102
+ alignItems: "center",
4103
+ gap: 8,
4104
+ margin: "6px 0 0 15px"
4105
+ },
4106
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
3995
4107
  type: "button",
4108
+ "aria-expanded": snapshot?.id === item.id,
3996
4109
  onClick: () => void toggleSnapshot(item.id),
3997
4110
  style: {
3998
4111
  fontSize: 11,
3999
4112
  padding: "2px 7px",
4000
4113
  borderRadius: 5,
4001
4114
  cursor: "pointer",
4002
- color: "var(--dsw-text-secondary)",
4003
- background: "var(--dsw-surface-sunken)",
4004
- border: "1px solid var(--dsw-alias-border-l2, rgba(255,255,255,.14))"
4115
+ color: "var(--dsw-alias-label-secondary)",
4116
+ background: "var(--dsw-alias-interactive-bg-hover)",
4117
+ border: "1px solid var(--dsw-alias-border-l2)"
4005
4118
  },
4006
4119
  children: snapshot?.id === item.id ? t["recent.decisionHide"] : t["recent.decision"]
4007
- })
4008
- }),
4009
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
4010
- style: { margin: "6px 0 0 15px" },
4011
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", {
4120
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
4121
+ type: "button",
4122
+ "aria-expanded": detailsOpen,
4123
+ onClick: () => setOpenDetails((current) => current === item.id ? null : item.id),
4012
4124
  style: {
4013
- cursor: "pointer",
4014
4125
  fontSize: 11,
4015
- color: "var(--dsw-text-secondary)"
4016
- },
4017
- children: t["recent.details"]
4018
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4019
- style: {
4020
- marginTop: 8,
4021
- border: "1px solid var(--dsw-alias-border-l2, rgba(255,255,255,.14))",
4022
- borderRadius: 8,
4023
- padding: "8px 10px",
4024
- background: "var(--dsw-surface-sunken)",
4025
- fontSize: 11
4126
+ padding: "2px 7px",
4127
+ borderRadius: 5,
4128
+ cursor: "pointer",
4129
+ color: "var(--dsw-alias-label-secondary)",
4130
+ background: "var(--dsw-alias-interactive-bg-hover)",
4131
+ border: "1px solid var(--dsw-alias-border-l2)"
4026
4132
  },
4027
- children: [(item.verdict?.criteria?.length ?? 0) > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4028
- style: {
4029
- display: "grid",
4030
- gridTemplateColumns: "minmax(120px,1fr) auto auto",
4031
- gap: "4px 14px",
4032
- marginBottom: 8
4033
- },
4034
- children: [
4035
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", {
4036
- style: { color: "var(--dsw-text-secondary)" },
4037
- children: t["recent.detail.criterion"]
4038
- }),
4039
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", {
4040
- style: { color: "var(--dsw-text-secondary)" },
4041
- children: t["recent.detail.score"]
4042
- }),
4043
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", {
4044
- style: { color: "var(--dsw-text-secondary)" },
4045
- children: t["recent.detail.threshold"]
4046
- }),
4047
- item.verdict.criteria.map((criterion) => {
4048
- const threshold = typeof item.verdict.threshold === "number" ? item.verdict.threshold : void 0;
4049
- const missed = threshold !== void 0 && criterion.score < threshold;
4050
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react.Fragment, { children: [
4051
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: criterion.id }),
4052
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4053
- style: { color: missed ? "#e76565" : "#77d49b" },
4054
- children: formatPercentage(criterion.score)
4055
- }),
4056
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4057
- style: { color: "var(--dsw-text-secondary)" },
4058
- children: threshold === void 0 ? "—" : formatPercentage(threshold)
4059
- })
4060
- ] }, criterion.id);
4061
- })
4062
- ]
4063
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4064
- style: {
4065
- display: "flex",
4066
- flexWrap: "wrap",
4067
- gap: 10,
4068
- color: "var(--dsw-text-secondary)"
4069
- },
4070
- children: [
4071
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.calls"], { calls: compact(item.stats.calls, lang) }) }),
4072
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.tokens"], {
4073
- input: compact(item.stats.inputTokens, lang),
4074
- cached: compact(item.stats.cachedInputTokens, lang),
4075
- output: compact(item.stats.outputTokens, lang)
4076
- }) }),
4077
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.scoreCache"], {
4078
- hits: compact(item.stats.cacheHits, lang),
4079
- misses: compact(item.stats.cacheMisses, lang)
4080
- }) }),
4081
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.prefixCache"], { rate: (item.stats.inputTokens + item.stats.cachedInputTokens > 0 ? (100 * item.stats.cachedInputTokens / (item.stats.inputTokens + item.stats.cachedInputTokens)).toFixed(0) : "0") + "%" }) }),
4082
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.cost"], { cost: money(item.stats.estimatedCostUsd) }) }),
4083
- item.route && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.route"], {
4084
- cycle: item.route.cycleId,
4085
- trigger: item.route.trigger,
4086
- stage: item.route.stage,
4087
- destination: item.route.destination,
4088
- attempt: item.route.attempt ?? 1
4089
- }) }),
4090
- item.route && item.route.reservedCalls !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.routeReserved"], {
4091
- reserved: compact(item.route.reservedCalls, lang),
4092
- actual: compact(item.stats.calls, lang)
4093
- }) }),
4094
- item.route?.skipReason !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.routeSkip"], { reason: item.route.skipReason }) }),
4095
- item.route?.replayed !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.routeProcess"], {
4096
- replayed: item.route.replayed === "candidate" ? t["recent.detail.replayCandidate"] : item.route.replayed === "original" ? t["recent.detail.replayOriginal"] : t["recent.detail.replayNone"],
4097
- generated: compact(item.route.generatedCalls ?? 0, lang),
4098
- judges: compact(item.route.judgeCalls ?? 0, lang)
4099
- }) }),
4100
- item.route?.sameCandidate === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t["recent.detail.routeSameCandidate"] }),
4101
- item.route?.alternativeAugmented === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t["recent.detail.routeAugmented"] }),
4102
- item.route?.alternativeModel !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.routeAlternativeModel"], { model: item.route.alternativeModel }) }),
4103
- (item.stats.channelFallbacks ?? 0) > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.channelFallback"], { count: compact(item.stats.channelFallbacks ?? 0, lang) }) })
4104
- ]
4105
- })]
4133
+ children: detailsOpen ? t["recent.detailsHide"] : t["recent.details"]
4106
4134
  })]
4107
4135
  }),
4108
4136
  snapshot?.id === item.id && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4109
- style: {
4110
- margin: "8px 0 2px 15px",
4111
- border: "1px solid var(--dsw-alias-border-l2, rgba(255,255,255,.14))",
4112
- borderRadius: 8,
4113
- padding: "8px 10px",
4114
- background: "var(--dsw-surface-sunken)"
4115
- },
4137
+ style: panelStyle,
4116
4138
  children: [
4117
4139
  snapshot.error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4118
4140
  style: {
4119
4141
  fontSize: 11,
4120
- color: "#e76565"
4142
+ color: "var(--dsw-alias-state-error-primary)"
4121
4143
  },
4122
4144
  children: snapshot.error
4123
4145
  }),
@@ -4141,7 +4163,7 @@ window.__ModuleLoader__.load({
4141
4163
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4142
4164
  style: {
4143
4165
  fontSize: 11,
4144
- color: "var(--dsw-text-secondary)"
4166
+ color: "var(--dsw-alias-label-secondary)"
4145
4167
  },
4146
4168
  children: [
4147
4169
  call.label,
@@ -4165,7 +4187,7 @@ window.__ModuleLoader__.load({
4165
4187
  fontSize: 11,
4166
4188
  whiteSpace: "pre-wrap",
4167
4189
  wordBreak: "break-word",
4168
- background: "rgba(0,0,0,.2)",
4190
+ background: "var(--dsw-alias-markdown-code-block)",
4169
4191
  padding: "6px 8px",
4170
4192
  borderRadius: 6
4171
4193
  },
@@ -4186,7 +4208,7 @@ window.__ModuleLoader__.load({
4186
4208
  fontSize: 11,
4187
4209
  whiteSpace: "pre-wrap",
4188
4210
  wordBreak: "break-word",
4189
- background: "rgba(0,0,0,.2)",
4211
+ background: "var(--dsw-alias-markdown-code-block)",
4190
4212
  padding: "6px 8px",
4191
4213
  borderRadius: 6
4192
4214
  },
@@ -4195,20 +4217,90 @@ window.__ModuleLoader__.load({
4195
4217
  ]
4196
4218
  }, index))
4197
4219
  ]
4220
+ }),
4221
+ detailsOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4222
+ style: panelStyle,
4223
+ children: [(item.verdict?.criteria?.length ?? 0) > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4224
+ style: {
4225
+ display: "grid",
4226
+ gridTemplateColumns: "minmax(120px,1fr) auto auto",
4227
+ gap: "4px 14px",
4228
+ marginBottom: 8
4229
+ },
4230
+ children: [
4231
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", {
4232
+ style: { color: "var(--dsw-alias-label-secondary)" },
4233
+ children: t["recent.detail.criterion"]
4234
+ }),
4235
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", {
4236
+ style: { color: "var(--dsw-alias-label-secondary)" },
4237
+ children: t["recent.detail.score"]
4238
+ }),
4239
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", {
4240
+ style: { color: "var(--dsw-alias-label-secondary)" },
4241
+ children: t["recent.detail.threshold"]
4242
+ }),
4243
+ item.verdict.criteria.map((criterion) => {
4244
+ const threshold = typeof item.verdict.threshold === "number" ? item.verdict.threshold : void 0;
4245
+ const missed = threshold !== void 0 && criterion.score < threshold;
4246
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react.Fragment, { children: [
4247
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: criterion.id }),
4248
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4249
+ style: { color: missed ? "var(--dsw-alias-state-error-primary)" : "var(--dsw-alias-state-success-primary)" },
4250
+ children: formatPercentage(criterion.score)
4251
+ }),
4252
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4253
+ style: { color: "var(--dsw-alias-label-secondary)" },
4254
+ children: threshold === void 0 ? "—" : formatPercentage(threshold)
4255
+ })
4256
+ ] }, criterion.id);
4257
+ })
4258
+ ]
4259
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4260
+ style: {
4261
+ display: "flex",
4262
+ flexWrap: "wrap",
4263
+ gap: 10,
4264
+ color: "var(--dsw-alias-label-secondary)"
4265
+ },
4266
+ children: [
4267
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.calls"], { calls: compact(item.stats.calls, lang) }) }),
4268
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.tokens"], {
4269
+ input: compact(item.stats.inputTokens, lang),
4270
+ cached: compact(item.stats.cachedInputTokens, lang),
4271
+ output: compact(item.stats.outputTokens, lang)
4272
+ }) }),
4273
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.scoreCache"], {
4274
+ hits: compact(item.stats.cacheHits, lang),
4275
+ misses: compact(item.stats.cacheMisses, lang)
4276
+ }) }),
4277
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.prefixCache"], { rate: (item.stats.inputTokens + item.stats.cachedInputTokens > 0 ? (100 * item.stats.cachedInputTokens / (item.stats.inputTokens + item.stats.cachedInputTokens)).toFixed(0) : "0") + "%" }) }),
4278
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.cost"], { cost: money(item.stats.estimatedCostUsd) }) }),
4279
+ item.route && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.route"], {
4280
+ cycle: item.route.cycleId,
4281
+ trigger: item.route.trigger,
4282
+ stage: item.route.stage,
4283
+ destination: item.route.destination,
4284
+ attempt: item.route.attempt ?? 1
4285
+ }) }),
4286
+ item.route && item.route.reservedCalls !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.routeReserved"], {
4287
+ reserved: compact(item.route.reservedCalls, lang),
4288
+ actual: compact(item.stats.calls, lang)
4289
+ }) }),
4290
+ item.route?.skipReason !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.routeSkip"], { reason: item.route.skipReason }) }),
4291
+ item.route?.replayed !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.routeProcess"], {
4292
+ replayed: item.route.replayed === "candidate" ? t["recent.detail.replayCandidate"] : item.route.replayed === "original" ? t["recent.detail.replayOriginal"] : t["recent.detail.replayNone"],
4293
+ generated: compact(item.route.generatedCalls ?? 0, lang),
4294
+ judges: compact(item.route.judgeCalls ?? 0, lang)
4295
+ }) }),
4296
+ item.route?.sameCandidate === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t["recent.detail.routeSameCandidate"] }),
4297
+ item.route?.alternativeAugmented === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t["recent.detail.routeAugmented"] }),
4298
+ item.route?.alternativeModel !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.routeAlternativeModel"], { model: item.route.alternativeModel }) }),
4299
+ (item.stats.channelFallbacks ?? 0) > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tFormat(t["recent.detail.channelFallback"], { count: compact(item.stats.channelFallbacks ?? 0, lang) }) })
4300
+ ]
4301
+ })]
4198
4302
  })
4199
- ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4200
- style: { textAlign: "right" },
4201
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4202
- style: { fontSize: 12 },
4203
- children: duration(item.durationMs)
4204
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4205
- style: {
4206
- ...muted,
4207
- marginTop: 3
4208
- },
4209
- children: dateTime(item.startedAt, lang)
4210
- })]
4211
- })]
4303
+ ]
4212
4304
  }, item.id);
4213
4305
  }), (data?.recent.length ?? 0) === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4214
4306
  style: {
@@ -4235,7 +4327,7 @@ window.__ModuleLoader__.load({
4235
4327
  style: {
4236
4328
  padding: "11px 12px",
4237
4329
  borderRadius: 10,
4238
- background: "var(--dsw-surface-sunken)"
4330
+ background: "var(--dsw-alias-interactive-bg-hover)"
4239
4331
  },
4240
4332
  children: [
4241
4333
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -4288,7 +4380,7 @@ window.__ModuleLoader__.load({
4288
4380
  justifyContent: "center",
4289
4381
  width: size,
4290
4382
  height: size,
4291
- color: active ? "var(--dsw-alias-brand-primary, #4f8cff)" : "currentColor"
4383
+ color: active ? "var(--dsw-alias-state-business-primary)" : "currentColor"
4292
4384
  },
4293
4385
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconDataOutline16, { size: Math.min(18, size) })
4294
4386
  });
@@ -4330,20 +4422,20 @@ window.__ModuleLoader__.load({
4330
4422
  "remote.session",
4331
4423
  "remote.settings"
4332
4424
  ];
4333
- /** Poll interval of the process-selection chip while a turn runs (the answer is in-memory). */
4334
- const PROCESS_ACTIVITY_POLL_MS = 1e3;
4425
+ /** Poll interval of the chat chip while a turn runs (the answer is in-memory and cheap). */
4426
+ const VERIFIER_ACTIVITY_POLL_MS = 1e3;
4335
4427
  /**
4336
- * Read the in-flight process-selection cycle of one session.
4428
+ * Read what the plugin is doing for one session (P06 cycle, routed review, final acceptance).
4337
4429
  *
4338
- * The chip explains a pause the chat cannot explain by itself (P06 buffers the reply, so no text
4339
- * streams while it runs), so a failed or refused read is SILENCE, never an error banner: the
4340
- * composer must not grow noise because a dashboard endpoint was unavailable.
4430
+ * The chip explains a pause the chat cannot explain by itself, so a failed or refused read is
4431
+ * SILENCE, never an error banner: the composer must not grow noise because a dashboard endpoint was
4432
+ * unavailable.
4341
4433
  * @param rpc - the host RPC handle, when the client exposes one.
4342
4434
  * @param sessionId - the session to ask about.
4343
4435
  * @param signal - abort signal of the owning effect.
4344
4436
  * @returns The activity view, or null when there is nothing (or nothing readable).
4345
4437
  */
4346
- async function readProcessActivity(rpc, sessionId, signal) {
4438
+ async function readVerifierActivity(rpc, sessionId, signal) {
4347
4439
  const payload = {
4348
4440
  kind: "process",
4349
4441
  sessionId
@@ -4355,7 +4447,7 @@ window.__ModuleLoader__.load({
4355
4447
  if (result && result.ok === false) return null;
4356
4448
  } catch (rpcError) {
4357
4449
  if (signal.aborted) return null;
4358
- console.warn("[llm-verifier] process activity rpc.call failed, trying fetch fallback:", rpcError);
4450
+ console.warn("[llm-verifier] activity rpc.call failed, trying fetch fallback:", rpcError);
4359
4451
  }
4360
4452
  const body = await (await fetch("/api/llm-verifier/statistics", {
4361
4453
  method: "POST",
@@ -4370,19 +4462,57 @@ window.__ModuleLoader__.load({
4370
4462
  }
4371
4463
  }
4372
4464
  /**
4373
- * The chat-visible half of P06: what the bought cycle is doing while the reply is being buffered.
4465
+ * Dock-card geometry, copied from the host's own composer-stack cards (Todo/Goal/Queue).
4466
+ *
4467
+ * Those cards share one width axis — the chat content column minus the composer clearances and the
4468
+ * four dock insets — and the fallbacks below only matter on a host that does not publish the three
4469
+ * custom properties. Without this clamp the status line stretches to the window edge and its text
4470
+ * sits far left of the composer it belongs to, which is exactly the misplacement it is here to fix.
4471
+ */
4472
+ const activityDock = {
4473
+ boxSizing: "border-box",
4474
+ width: "calc(100% - var(--dsh-composer-side-clearance, 16px) - var(--dsh-composer-side-clearance, 16px) - var(--dsh-composer-dock-inset, 8px) - var(--dsh-composer-dock-inset, 8px) - var(--dsh-composer-dock-inset, 8px) - var(--dsh-composer-dock-inset, 8px))",
4475
+ margin: "0 auto"
4476
+ };
4477
+ const activityBar = {
4478
+ boxSizing: "border-box",
4479
+ display: "flex",
4480
+ alignItems: "center",
4481
+ gap: 10,
4482
+ width: "100%",
4483
+ maxWidth: "calc(var(--dsh-composer-card-max-width, 952px) - 4 * var(--dsh-composer-dock-inset, 8px))",
4484
+ height: 36,
4485
+ margin: "0 auto",
4486
+ padding: "0 12px",
4487
+ border: "0.5px solid var(--dsw-alias-border-l1)",
4488
+ borderRadius: 12,
4489
+ background: "var(--dsw-specific-tip)"
4490
+ };
4491
+ const activityTextStyle = {
4492
+ minWidth: 0,
4493
+ overflow: "hidden",
4494
+ textOverflow: "ellipsis",
4495
+ whiteSpace: "nowrap",
4496
+ fontSize: 13,
4497
+ lineHeight: "20px",
4498
+ color: "var(--dsw-alias-label-secondary)"
4499
+ };
4500
+ /**
4501
+ * The chat-visible half of the automatic stages: what the plugin is doing for this session right now.
4374
4502
  *
4375
- * Polls only while a read can change the answer — while the turn runs, and while a settled cycle is
4376
- * still inside its server-side TTL — so an idle conversation makes no requests at all.
4503
+ * It answers the pauses the chat cannot explain: a P06 cycle buffers the reply, a routed review and
4504
+ * the final acceptance hold the turn open while the judges run, and a PASSING acceptance otherwise
4505
+ * says nothing at all. Polls only while a read can change the answer — while the turn runs, and
4506
+ * while something is still being shown — so an idle conversation makes no requests.
4377
4507
  * @param props - the input-dock owner values (the session snapshot) plus the injected RPC handle.
4378
4508
  */
4379
- function ProcessActivityChip({ session, rpc }) {
4509
+ function VerifierActivityChip({ session, rpc }) {
4380
4510
  const t = dictionaries[useLanguage()];
4381
4511
  const raw = session?.sessionId;
4382
4512
  const sessionId = raw === void 0 || raw === null || String(raw) === "" ? void 0 : String(raw);
4383
4513
  const running = session?.running === true;
4384
4514
  const [view, setView] = (0, react.useState)(null);
4385
- const rendered = processActivityText(view, t);
4515
+ const rendered = verifierActivityText(view, t);
4386
4516
  const showing = rendered !== null;
4387
4517
  (0, react.useEffect)(() => {
4388
4518
  if (sessionId === void 0) {
@@ -4396,13 +4526,13 @@ window.__ModuleLoader__.load({
4396
4526
  let cancelled = false;
4397
4527
  const controller = new AbortController();
4398
4528
  const load = async () => {
4399
- const value = await readProcessActivity(rpc, sessionId, controller.signal);
4529
+ const value = await readVerifierActivity(rpc, sessionId, controller.signal);
4400
4530
  if (!cancelled) setView(value);
4401
4531
  };
4402
4532
  load();
4403
4533
  const timer = setInterval(() => {
4404
4534
  load();
4405
- }, PROCESS_ACTIVITY_POLL_MS);
4535
+ }, VERIFIER_ACTIVITY_POLL_MS);
4406
4536
  return () => {
4407
4537
  cancelled = true;
4408
4538
  clearInterval(timer);
@@ -4415,31 +4545,60 @@ window.__ModuleLoader__.load({
4415
4545
  rpc
4416
4546
  ]);
4417
4547
  if (rendered === null) return null;
4418
- const accent = rendered.tone === "busy" ? "#4f8cff" : rendered.tone === "ok" ? "#77d492" : "var(--dsw-danger, #e85858)";
4419
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4420
- style: {
4421
- display: "flex",
4422
- alignItems: "center",
4423
- gap: 8,
4424
- padding: "2px 4px 6px",
4425
- ...muted
4426
- },
4427
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4428
- "aria-hidden": true,
4429
- style: {
4430
- flex: "0 0 auto",
4431
- width: 7,
4432
- height: 7,
4433
- borderRadius: "50%",
4434
- background: accent,
4435
- opacity: rendered.tone === "busy" ? .65 : 1
4436
- }
4437
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: rendered.text })]
4548
+ const dotState = rendered.tone === "busy" ? "ongoing" : rendered.tone === "ok" ? "done" : "error";
4549
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4550
+ style: activityDock,
4551
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4552
+ style: activityBar,
4553
+ role: "status",
4554
+ "aria-live": "polite",
4555
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, {
4556
+ state: dotState,
4557
+ size: 8
4558
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4559
+ style: activityTextStyle,
4560
+ children: rendered.text
4561
+ })]
4562
+ })
4438
4563
  });
4439
4564
  }
4565
+ /**
4566
+ * Marker the blank-composer takeover elects with; the value itself is never read.
4567
+ *
4568
+ * Any non-null selector result elects the entry, so a shared frozen object keeps the selector pure
4569
+ * and allocation-free.
4570
+ */
4571
+ const BLANK_COMPOSER = Object.freeze({ blank: true });
4440
4572
  function apply(ctx) {
4441
4573
  const connection = ctx.get("connection");
4442
4574
  const remote = ctx.remote;
4575
+ /**
4576
+ * Collapse the resident composer while the statistics View is the active one.
4577
+ *
4578
+ * The Conversation shell renders its composer for EVERY View — a View can only opt into the
4579
+ * overlay geometry (`data-conversation-composer-overlay`), never into its absence — so the input
4580
+ * card covers the very table the dashboard exists to show. The selector-routed composer chain is
4581
+ * the host's own replacement point: while this View is mounted one entry elects an empty
4582
+ * composer, and disposing that entry on unmount restores the real card with its draft intact.
4583
+ * Tried LAST (`priority` is ascending) so a pending approval, question or subagent takeover still
4584
+ * wins the seat. A host that does not know the key leaves the composer in place instead of
4585
+ * failing the page.
4586
+ * @returns Disposer that hands the seat back to the resident composer.
4587
+ */
4588
+ const blankComposerSeat = () => {
4589
+ try {
4590
+ const dispose = ctx.slots.register({
4591
+ name: "conversation.composer",
4592
+ id: "llm-verifier-blank",
4593
+ priority: 1e3,
4594
+ select: () => BLANK_COMPOSER
4595
+ }, (() => null));
4596
+ return typeof dispose === "function" ? dispose : () => {};
4597
+ } catch (error) {
4598
+ console.warn("[llm-verifier] composer takeover registration failed:", error);
4599
+ return () => {};
4600
+ }
4601
+ };
4443
4602
  ctx.slots.inject("settings.section", () => ctx.slots.register({
4444
4603
  name: "settings.section",
4445
4604
  id: "llm-verifier",
@@ -4452,14 +4611,17 @@ window.__ModuleLoader__.load({
4452
4611
  id: "llm-verifier-statistics",
4453
4612
  order: 30,
4454
4613
  label: () => detectLanguage() === "zh" ? zh["slot.statistics"] : en["slot.statistics"],
4455
- inject: () => ({ rpc: connection.rpc })
4614
+ inject: () => ({
4615
+ rpc: connection.rpc,
4616
+ blankComposerSeat
4617
+ })
4456
4618
  }, StatisticsPage));
4457
4619
  ctx.slots.inject("conversation.input.dock", () => ctx.slots.register({
4458
4620
  name: "conversation.input.dock",
4459
- id: "llm-verifier-process",
4621
+ id: "llm-verifier-activity",
4460
4622
  order: 30,
4461
4623
  inject: () => ({ rpc: connection.rpc })
4462
- }, ProcessActivityChip));
4624
+ }, VerifierActivityChip));
4463
4625
  const VERIFIER_TAB_KIND = "llm-verifier";
4464
4626
  const VERIFIER_TAB_ID = "dsh-llm-verifier";
4465
4627
  const registerRightSidebar = (tabs) => {
@@ -4504,11 +4666,11 @@ window.__ModuleLoader__.load({
4504
4666
  }
4505
4667
  //#endregion
4506
4668
  exports.GlobalVerifierDashboard = GlobalVerifierDashboard;
4507
- exports.PROCESS_ACTIVITY_POLL_MS = PROCESS_ACTIVITY_POLL_MS;
4508
- exports.ProcessActivityChip = ProcessActivityChip;
4509
4669
  exports.RightSidebarVerifierPanel = RightSidebarVerifierPanel;
4510
4670
  exports.RightSidebarVerifierTitle = RightSidebarVerifierTitle;
4511
4671
  exports.StatisticsPage = StatisticsPage;
4672
+ exports.VERIFIER_ACTIVITY_POLL_MS = VERIFIER_ACTIVITY_POLL_MS;
4673
+ exports.VerifierActivityChip = VerifierActivityChip;
4512
4674
  exports.VerifierSettings = VerifierSettings;
4513
4675
  exports.VerifierSidebarIcon = VerifierSidebarIcon;
4514
4676
  exports.WORST_CASE_FINAL_CALLS_PER_JUDGE = WORST_CASE_FINAL_CALLS_PER_JUDGE;