@migor/agentia-harness 0.5.1 → 0.6.1
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/dist/assets/discover.d.ts +5 -0
- package/dist/assets/discover.d.ts.map +1 -1
- package/dist/assets/discover.js +17 -7
- package/dist/assets/discover.js.map +1 -1
- package/dist/assets/stub-template.d.ts +24 -0
- package/dist/assets/stub-template.d.ts.map +1 -0
- package/dist/assets/stub-template.js +58 -0
- package/dist/assets/stub-template.js.map +1 -0
- package/dist/assets/tool-stub.d.ts +103 -0
- package/dist/assets/tool-stub.d.ts.map +1 -0
- package/dist/assets/tool-stub.js +234 -0
- package/dist/assets/tool-stub.js.map +1 -0
- package/dist/assets/types.d.ts +12 -0
- package/dist/assets/types.d.ts.map +1 -1
- package/dist/assets/types.js.map +1 -1
- package/dist/cli/commands/rsi-inspect.js +1 -1
- package/dist/cli/commands/rsi-inspect.js.map +1 -1
- package/dist/cli/commands/rsi-manual.js +1 -1
- package/dist/cli/commands/rsi-manual.js.map +1 -1
- package/dist/cli/commands/rsi-watch.js +1 -1
- package/dist/cli/commands/rsi-watch.js.map +1 -1
- package/dist/cli/commands/rsi.js +1 -1
- package/dist/cli/commands/rsi.js.map +1 -1
- package/dist/cli/commands/run.d.ts +10 -1
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +39 -3
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/context.d.ts.map +1 -1
- package/dist/cli/context.js +9 -1
- package/dist/cli/context.js.map +1 -1
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +5 -1
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/remote-stage.d.ts.map +1 -1
- package/dist/cli/remote-stage.js +3 -0
- package/dist/cli/remote-stage.js.map +1 -1
- package/dist/cli.js +15 -0
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +2 -0
- package/dist/config.js.map +1 -1
- package/dist/evals/check.d.ts +17 -2
- package/dist/evals/check.d.ts.map +1 -1
- package/dist/evals/check.js +65 -1
- package/dist/evals/check.js.map +1 -1
- package/dist/evals/gate.d.ts +10 -0
- package/dist/evals/gate.d.ts.map +1 -1
- package/dist/evals/gate.js +30 -3
- package/dist/evals/gate.js.map +1 -1
- package/dist/evals/judge-gate.d.ts +31 -0
- package/dist/evals/judge-gate.d.ts.map +1 -0
- package/dist/evals/judge-gate.js +77 -0
- package/dist/evals/judge-gate.js.map +1 -0
- package/dist/evals/judge.d.ts +130 -0
- package/dist/evals/judge.d.ts.map +1 -0
- package/dist/evals/judge.js +251 -0
- package/dist/evals/judge.js.map +1 -0
- package/dist/evals/load-fields.d.ts +89 -0
- package/dist/evals/load-fields.d.ts.map +1 -0
- package/dist/evals/load-fields.js +215 -0
- package/dist/evals/load-fields.js.map +1 -0
- package/dist/evals/load.d.ts +1 -9
- package/dist/evals/load.d.ts.map +1 -1
- package/dist/evals/load.js +56 -109
- package/dist/evals/load.js.map +1 -1
- package/dist/evals/memory-seed.d.ts +35 -0
- package/dist/evals/memory-seed.d.ts.map +1 -0
- package/dist/evals/memory-seed.js +54 -0
- package/dist/evals/memory-seed.js.map +1 -0
- package/dist/evals/report-types.d.ts +204 -0
- package/dist/evals/report-types.d.ts.map +1 -0
- package/dist/evals/report-types.js +11 -0
- package/dist/evals/report-types.js.map +1 -0
- package/dist/evals/report.d.ts.map +1 -1
- package/dist/evals/report.js +32 -0
- package/dist/evals/report.js.map +1 -1
- package/dist/evals/run-one.d.ts +18 -1
- package/dist/evals/run-one.d.ts.map +1 -1
- package/dist/evals/run-one.js +84 -4
- package/dist/evals/run-one.js.map +1 -1
- package/dist/evals/run.d.ts +12 -2
- package/dist/evals/run.d.ts.map +1 -1
- package/dist/evals/run.js +71 -2
- package/dist/evals/run.js.map +1 -1
- package/dist/evals/sample.d.ts.map +1 -1
- package/dist/evals/sample.js +33 -2
- package/dist/evals/sample.js.map +1 -1
- package/dist/evals/types.d.ts +130 -147
- package/dist/evals/types.d.ts.map +1 -1
- package/dist/evals/types.js +21 -2
- package/dist/evals/types.js.map +1 -1
- package/dist/evals/variants.d.ts +37 -0
- package/dist/evals/variants.d.ts.map +1 -0
- package/dist/evals/variants.js +186 -0
- package/dist/evals/variants.js.map +1 -0
- package/dist/rsi/accept.d.ts.map +1 -1
- package/dist/rsi/accept.js +10 -2
- package/dist/rsi/accept.js.map +1 -1
- package/dist/rsi/commit.js +3 -3
- package/dist/rsi/commit.js.map +1 -1
- package/dist/rsi/holdout.d.ts.map +1 -1
- package/dist/rsi/holdout.js +2 -5
- package/dist/rsi/holdout.js.map +1 -1
- package/dist/rsi/regress.d.ts.map +1 -1
- package/dist/rsi/regress.js +2 -5
- package/dist/rsi/regress.js.map +1 -1
- package/dist/rsi/rounds.d.ts +9 -7
- package/dist/rsi/rounds.d.ts.map +1 -1
- package/dist/rsi/rounds.js +3 -4
- package/dist/rsi/rounds.js.map +1 -1
- package/dist/rsi/verify.d.ts.map +1 -1
- package/dist/rsi/verify.js +2 -5
- package/dist/rsi/verify.js.map +1 -1
- package/dist/run/app.d.ts +11 -0
- package/dist/run/app.d.ts.map +1 -1
- package/dist/run/app.js +1 -1
- package/dist/run/app.js.map +1 -1
- package/dist/run/case-runner.d.ts +17 -0
- package/dist/run/case-runner.d.ts.map +1 -1
- package/dist/run/remote-metadata.d.ts +14 -0
- package/dist/run/remote-metadata.d.ts.map +1 -1
- package/dist/run/remote-metadata.js +9 -1
- package/dist/run/remote-metadata.js.map +1 -1
- package/dist/run/remote.d.ts +7 -0
- package/dist/run/remote.d.ts.map +1 -1
- package/dist/run/remote.js +21 -0
- package/dist/run/remote.js.map +1 -1
- package/dist/run/runner.d.ts +25 -0
- package/dist/run/runner.d.ts.map +1 -1
- package/dist/run/runner.js +36 -1
- package/dist/run/runner.js.map +1 -1
- package/dist/run/stub-tool.d.ts +17 -0
- package/dist/run/stub-tool.d.ts.map +1 -0
- package/dist/run/stub-tool.js +50 -0
- package/dist/run/stub-tool.js.map +1 -0
- package/dist/run/stub-world.d.ts +52 -0
- package/dist/run/stub-world.d.ts.map +1 -0
- package/dist/run/stub-world.js +115 -0
- package/dist/run/stub-world.js.map +1 -0
- package/dist/run/tools.d.ts +12 -2
- package/dist/run/tools.d.ts.map +1 -1
- package/dist/run/tools.js +27 -3
- package/dist/run/tools.js.map +1 -1
- package/dist/server/asset-echarts.d.ts +11 -0
- package/dist/server/asset-echarts.d.ts.map +1 -0
- package/dist/server/asset-echarts.js +78 -0
- package/dist/server/asset-echarts.js.map +1 -0
- package/dist/server/assets/echarts.min.js +18 -0
- package/dist/server/page-chart.d.ts +21 -0
- package/dist/server/page-chart.d.ts.map +1 -0
- package/dist/server/page-chart.js +159 -0
- package/dist/server/page-chart.js.map +1 -0
- package/dist/server/page-core.d.ts +1 -1
- package/dist/server/page-core.d.ts.map +1 -1
- package/dist/server/page-core.js +17 -3
- package/dist/server/page-core.js.map +1 -1
- package/dist/server/page-style.d.ts +8 -2
- package/dist/server/page-style.d.ts.map +1 -1
- package/dist/server/page-style.js +217 -132
- package/dist/server/page-style.js.map +1 -1
- package/dist/server/page-views-cases.d.ts +18 -0
- package/dist/server/page-views-cases.d.ts.map +1 -0
- package/dist/server/page-views-cases.js +180 -0
- package/dist/server/page-views-cases.js.map +1 -0
- package/dist/server/page-views.d.ts +1 -1
- package/dist/server/page-views.d.ts.map +1 -1
- package/dist/server/page-views.js +45 -125
- package/dist/server/page-views.js.map +1 -1
- package/dist/server/page-views2.d.ts +1 -1
- package/dist/server/page-views2.d.ts.map +1 -1
- package/dist/server/page-views2.js +4 -4
- package/dist/server/page-views3.d.ts +1 -1
- package/dist/server/page-views3.d.ts.map +1 -1
- package/dist/server/page-views3.js +4 -2
- package/dist/server/page-views3.js.map +1 -1
- package/dist/server/page-widgets.d.ts +1 -1
- package/dist/server/page-widgets.d.ts.map +1 -1
- package/dist/server/page-widgets.js +86 -54
- package/dist/server/page-widgets.js.map +1 -1
- package/dist/server/page.d.ts +7 -5
- package/dist/server/page.d.ts.map +1 -1
- package/dist/server/page.js +31 -13
- package/dist/server/page.js.map +1 -1
- package/dist/server/read/workspace.d.ts.map +1 -1
- package/dist/server/read/workspace.js +5 -1
- package/dist/server/read/workspace.js.map +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +8 -0
- package/dist/server/routes.js.map +1 -1
- package/dist/server/web.d.ts.map +1 -1
- package/dist/server/web.js +9 -0
- package/dist/server/web.js.map +1 -1
- package/dist/util/kv.d.ts +29 -0
- package/dist/util/kv.d.ts.map +1 -0
- package/dist/util/kv.js +46 -0
- package/dist/util/kv.js.map +1 -0
- package/package.json +6 -3
|
@@ -9,186 +9,271 @@
|
|
|
9
9
|
* - **暗色为默认**。这东西通常开在第二块屏上、旁边是终端;亮色留给白天/投影场景
|
|
10
10
|
* (左下角可切,存 localStorage)。
|
|
11
11
|
* - **颜色只表达状态**:绿=通过/采纳,黄=可疑/部分,红=失败/被门拦。装饰性颜色
|
|
12
|
-
* 一律中性灰 ——
|
|
12
|
+
* 一律中性灰 —— 一眼扫过去时,有颜色的地方就是需要看的地方。强调色只用于
|
|
13
|
+
* 链接与聚焦环,饱和度压到「能认出来、不会先看到」的程度。
|
|
13
14
|
* - **数字用等宽 + tabular-nums**:成本、token、通过率要能竖着对齐比大小,
|
|
14
15
|
* 比例字体做不到这件事。
|
|
15
16
|
* - **不靠阴影堆层次**。层次用 1px 边框 + 背景差分,密度才上得去(一屏放得下
|
|
16
17
|
* 12 条用例、6 个指标,而不用滚动)。
|
|
18
|
+
* - **没有渐变、没有胶囊、没有大写字母间距**。前两条是仪表盘模板的指纹;第三条
|
|
19
|
+
* 对中文是硬伤:`text-transform:uppercase` 在中文上无效,`letter-spacing` 却会把
|
|
20
|
+
* 「最新通过率」拉散成「最 新 通 过 率」,一眼看出是英文版式套了中文数据。
|
|
21
|
+
* - **圆角只用在可点的东西上**(按钮、输入框)。面板、卡片、表格一律直角或 3px,
|
|
22
|
+
* 因为这里的每一块都是"读数",不是"卡片"。
|
|
17
23
|
*/
|
|
18
24
|
export const BOARD_STYLE = `
|
|
19
25
|
:root{
|
|
20
|
-
--bg:#
|
|
21
|
-
--text:#
|
|
22
|
-
--accent:#
|
|
23
|
-
--ok-soft:#
|
|
26
|
+
--bg:#0f1012; --panel:#15161a; --panel2:#1a1c20; --line:#26282e; --line2:#3a3d45;
|
|
27
|
+
--text:#e6e7ea; --muted:#9a9da5; --dim:#70747c;
|
|
28
|
+
--accent:#8fa9c9; --accent-soft:#1f242c; --ok:#4ea36f; --warn:#c9973f; --bad:#d9636a;
|
|
29
|
+
--ok-soft:#16251c; --warn-soft:#282116; --bad-soft:#2a191a;
|
|
24
30
|
--mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace;
|
|
25
|
-
--radius:
|
|
31
|
+
--radius:3px;
|
|
26
32
|
}
|
|
27
33
|
body.light{
|
|
28
|
-
--bg:#
|
|
29
|
-
--text:#
|
|
30
|
-
--accent:#
|
|
31
|
-
--ok-soft:#
|
|
34
|
+
--bg:#fbfbf9; --panel:#ffffff; --panel2:#f4f4f0; --line:#e4e4de; --line2:#cfcfc7;
|
|
35
|
+
--text:#1a1b1e; --muted:#5e6068; --dim:#8b8d94;
|
|
36
|
+
--accent:#4a6382; --accent-soft:#eef0f4; --ok:#2f7d4f; --warn:#8a6a1f; --bad:#b03a41;
|
|
37
|
+
--ok-soft:#eaf4ee; --warn-soft:#f7f1e2; --bad-soft:#f8ecec;
|
|
32
38
|
}
|
|
33
39
|
*{box-sizing:border-box}
|
|
34
40
|
html,body{height:100%}
|
|
35
41
|
body{margin:0;background:var(--bg);color:var(--text);
|
|
36
|
-
font:
|
|
42
|
+
font:13px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
|
|
37
43
|
-webkit-font-smoothing:antialiased}
|
|
38
44
|
a{color:var(--accent);text-decoration:none}
|
|
39
|
-
a:hover{text-decoration:underline}
|
|
40
|
-
code,.mono{font-family:var(--mono);font-size:
|
|
41
|
-
.num{text-align:right;font-variant-numeric:tabular-nums;font-family:var(--mono);font-size:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
.
|
|
47
|
-
|
|
48
|
-
.brand
|
|
49
|
-
.brand
|
|
50
|
-
.
|
|
51
|
-
.ws
|
|
52
|
-
.ws .
|
|
53
|
-
.
|
|
54
|
-
|
|
45
|
+
a:hover{color:var(--text);text-decoration:underline;text-underline-offset:2px}
|
|
46
|
+
code,.mono{font-family:var(--mono);font-size:11.5px}
|
|
47
|
+
.num{text-align:right;font-variant-numeric:tabular-nums;font-family:var(--mono);font-size:11.5px}
|
|
48
|
+
:focus-visible{outline:1px solid var(--accent);outline-offset:2px}
|
|
49
|
+
|
|
50
|
+
/* ── 框架 ────────────────────────────────────────────────────── */
|
|
51
|
+
.app{display:grid;grid-template-columns:200px minmax(0,1fr);min-height:100vh}
|
|
52
|
+
.side{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;
|
|
53
|
+
padding:14px 10px 10px;border-right:1px solid var(--line);background:var(--bg)}
|
|
54
|
+
.brand{display:flex;align-items:baseline;gap:6px;padding:0 8px 14px}
|
|
55
|
+
.brand b{font-family:var(--mono);font-size:13px;font-weight:600;letter-spacing:0}
|
|
56
|
+
.brand span{font-size:10.5px;color:var(--dim);font-family:var(--mono)}
|
|
57
|
+
.ws{margin:0 2px 14px;padding:0 6px 10px;border-bottom:1px solid var(--line)}
|
|
58
|
+
.ws .k{font-size:10.5px;color:var(--dim)}
|
|
59
|
+
.ws .v{font-family:var(--mono);font-size:11.5px;color:var(--text);
|
|
60
|
+
overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:1px}
|
|
61
|
+
.nav{display:flex;flex-direction:column;gap:1px}
|
|
62
|
+
.nav a{display:block;padding:5px 8px;border-radius:var(--radius);color:var(--muted);font-size:12.5px}
|
|
55
63
|
.nav a:hover{background:var(--panel2);color:var(--text);text-decoration:none}
|
|
56
|
-
.nav a[aria-current]{background:var(--
|
|
57
|
-
.nav a .ico{width:15px;text-align:center;font-size:12px;opacity:.8;font-family:var(--mono)}
|
|
64
|
+
.nav a[aria-current]{background:var(--panel2);color:var(--text);box-shadow:inset 2px 0 0 var(--text)}
|
|
58
65
|
.side .spacer{flex:1}
|
|
59
|
-
.side .foot{display:flex;flex-direction:column;gap:
|
|
60
|
-
.badge{display:
|
|
61
|
-
|
|
66
|
+
.side .foot{display:flex;flex-direction:column;gap:6px;padding:10px 6px 0;border-top:1px solid var(--line)}
|
|
67
|
+
.badge{display:flex;align-items:center;gap:5px;font-size:11px;color:var(--dim);
|
|
68
|
+
font-family:var(--mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
69
|
+
.badge .dot{width:5px;height:5px;border-radius:50%;background:var(--ok);flex:none}
|
|
62
70
|
.badge .dot.stale{background:var(--warn)}
|
|
63
|
-
.ghost{background:transparent;border:1px solid var(--line2);color:var(--muted);
|
|
64
|
-
padding:
|
|
65
|
-
.ghost:hover{color:var(--text);border-color:var(--
|
|
71
|
+
.ghost{background:transparent;border:1px solid var(--line2);color:var(--muted);
|
|
72
|
+
border-radius:var(--radius);padding:4px 9px;font-size:11.5px;cursor:pointer;font-family:inherit}
|
|
73
|
+
.ghost:hover{color:var(--text);border-color:var(--dim)}
|
|
74
|
+
/* 原生 select 在暗色下会自带一块浅色底,和周围的输入框不是一套 */
|
|
75
|
+
select.ghost{background:var(--bg);color:var(--text);font-size:11.5px;padding:3px 6px}
|
|
76
|
+
|
|
66
77
|
.main{min-width:0;display:flex;flex-direction:column}
|
|
67
|
-
.top{display:flex;align-items:center;gap:
|
|
68
|
-
|
|
69
|
-
.top
|
|
70
|
-
.top .sub{font-size:12px;color:var(--muted);margin-top:1px}
|
|
78
|
+
.top{display:flex;align-items:center;gap:10px;padding:11px 18px;border-bottom:1px solid var(--line)}
|
|
79
|
+
.top h1{margin:0;font-size:13.5px;font-weight:600;letter-spacing:0}
|
|
80
|
+
.top .sub{font-size:11px;color:var(--dim);margin-top:1px}
|
|
71
81
|
.top .grow{flex:1}
|
|
72
|
-
.search{display:flex;align-items:center;gap:6px;background:var(--
|
|
73
|
-
border-radius:
|
|
74
|
-
.search input{background:transparent;border:0;outline:0;color:var(--text);font:inherit;font-size:
|
|
75
|
-
.search kbd{font-family:var(--mono);font-size:10px;color:var(--dim);
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
.
|
|
81
|
-
|
|
82
|
+
.search{display:flex;align-items:center;gap:6px;background:var(--bg);border:1px solid var(--line);
|
|
83
|
+
border-radius:var(--radius);padding:3px 7px;min-width:220px}
|
|
84
|
+
.search input{background:transparent;border:0;outline:0;color:var(--text);font:inherit;font-size:12px;width:100%}
|
|
85
|
+
.search kbd{font-family:var(--mono);font-size:10px;color:var(--dim);
|
|
86
|
+
border:1px solid var(--line);border-radius:2px;padding:0 3px}
|
|
87
|
+
.wrap{padding:14px 18px 56px;display:flex;flex-direction:column;gap:12px;max-width:1560px}
|
|
88
|
+
|
|
89
|
+
/* ── 读数轨:一排指标,用竖线分隔,不切成六张卡 ──────────────── */
|
|
90
|
+
.cards{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);
|
|
91
|
+
border:1px solid var(--line);border-radius:var(--radius);background:var(--panel)}
|
|
92
|
+
.card{padding:9px 12px;min-width:0;border-left:1px solid var(--line)}
|
|
93
|
+
.card:first-child{border-left:0}
|
|
94
|
+
.card .k{font-size:10.5px;color:var(--dim);line-height:1.4}
|
|
95
|
+
.card .v{font-size:17px;font-weight:500;margin-top:2px;font-family:var(--mono);
|
|
96
|
+
font-variant-numeric:tabular-nums;letter-spacing:-.2px;line-height:1.25;
|
|
97
|
+
overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
98
|
+
.card .v.hash{font-size:12px;letter-spacing:0;color:var(--muted)}
|
|
99
|
+
.card .h{font-size:10.5px;color:var(--dim);margin-top:2px;
|
|
82
100
|
overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
83
|
-
/* 指纹这类定长 hash 不需要 21px 的字号:让它在同一行里放得下,比截断更有用 */
|
|
84
|
-
.card .v.hash{font-size:15px;letter-spacing:0;color:var(--muted)}
|
|
85
|
-
.card .v small{font-size:12px;color:var(--muted);font-weight:400;margin-left:5px}
|
|
86
|
-
.card .h{font-size:11.5px;color:var(--muted);margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
87
101
|
.card.ok .v{color:var(--ok)} .card.warn .v{color:var(--warn)} .card.bad .v{color:var(--bad)}
|
|
88
102
|
|
|
103
|
+
/* ── 面板 ────────────────────────────────────────────────────── */
|
|
89
104
|
.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
|
|
90
|
-
.panel > header{display:flex;align-items:center;gap:
|
|
91
|
-
.panel > header h2{margin:0;font-size:
|
|
92
|
-
.panel > header .hint{font-size:
|
|
105
|
+
.panel > header{display:flex;align-items:center;gap:8px;padding:8px 12px;border-bottom:1px solid var(--line)}
|
|
106
|
+
.panel > header h2{margin:0;font-size:12px;font-weight:600}
|
|
107
|
+
.panel > header .hint{font-size:10.5px;color:var(--dim)}
|
|
93
108
|
.panel > header .grow{flex:1}
|
|
94
|
-
.panel .body{padding:12px
|
|
109
|
+
.panel .body{padding:11px 12px}
|
|
95
110
|
.panel .body.flush{padding:0}
|
|
111
|
+
.hint{font-size:10.5px;color:var(--dim)}
|
|
112
|
+
|
|
113
|
+
/* 一行读数(图下方的起点 / 现在 / 变化 / 代价),比四个独立药丸更像一句话 */
|
|
114
|
+
.stats{display:flex;flex-wrap:wrap;margin-top:9px;padding-top:8px;border-top:1px solid var(--line)}
|
|
115
|
+
.stats > div{display:flex;align-items:baseline;gap:5px;padding:0 14px;border-left:1px solid var(--line)}
|
|
116
|
+
.stats > div:first-child{padding-left:0;border-left:0}
|
|
117
|
+
.stats .k{font-size:10.5px;color:var(--dim)}
|
|
118
|
+
.stats .v{font-family:var(--mono);font-size:11.5px;font-variant-numeric:tabular-nums}
|
|
119
|
+
.stats .v.ok{color:var(--ok)} .stats .v.bad{color:var(--bad)}
|
|
96
120
|
|
|
97
|
-
|
|
98
|
-
.tbl
|
|
99
|
-
|
|
100
|
-
|
|
121
|
+
/* ── 表格 ────────────────────────────────────────────────────── */
|
|
122
|
+
table.tbl{width:100%;border-collapse:collapse;font-size:12px}
|
|
123
|
+
.tbl th{text-align:left;font-weight:500;font-size:10.5px;color:var(--dim);
|
|
124
|
+
background:var(--panel2);padding:6px 12px;border-bottom:1px solid var(--line);white-space:nowrap}
|
|
125
|
+
.tbl th.num{text-align:right}
|
|
126
|
+
.tbl td{padding:6px 12px;border-bottom:1px solid var(--line);vertical-align:middle}
|
|
101
127
|
.tbl tbody tr:hover{background:var(--panel2)}
|
|
102
128
|
.tbl tbody tr:last-child td{border-bottom:0}
|
|
103
129
|
.tbl tr.click{cursor:pointer}
|
|
104
130
|
.tbl .muted{color:var(--muted)}
|
|
105
|
-
.tbl .name{font-family:var(--mono);font-size:
|
|
131
|
+
.tbl .name{font-family:var(--mono);font-size:11.5px;color:var(--text)}
|
|
132
|
+
.tbl .ok{color:var(--ok)} .tbl .bad{color:var(--bad)} .tbl .warn{color:var(--warn)}
|
|
133
|
+
/* 标识类单元格(轮次 id、时间戳、文件名)不许折行:一旦某一列 class 有 spread,
|
|
134
|
+
余量全被它吃掉,其余列会被压到 min-content,长 id 就会断成三四行 */
|
|
135
|
+
.tbl .nw{white-space:nowrap}
|
|
136
|
+
/* 数字与时间戳同理 —— 但「未知」这类中文占位也会在 min-content 下按字断开,
|
|
137
|
+
所以按列类型统一禁折行,而不是逐个单元格去标 */
|
|
138
|
+
.tbl td.num{white-space:nowrap}
|
|
139
|
+
/* 对比表:用例名吃掉剩余宽度,A/B/变化 三列缩到内容宽 —— 否则四个等宽列里
|
|
140
|
+
三个只放一个 40px 的标记,中间全是空白 */
|
|
141
|
+
.tbl.flip th:first-child{width:100%}
|
|
142
|
+
.tbl.flip td{white-space:nowrap}
|
|
143
|
+
/* 数字表:让**某一个文字列**吃掉剩余宽度,其余列缩到内容宽。
|
|
144
|
+
不加这句时 auto 布局把余量均摊给每一列,短列之间会裂出几十像素的洞 ——
|
|
145
|
+
一行数据被拉成散落的几段,读起来像没对齐。标在哪一列,洞就落在那一列里 */
|
|
146
|
+
.tbl .spread{width:100%}
|
|
106
147
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
.
|
|
110
|
-
|
|
111
|
-
.pill.
|
|
112
|
-
.pill.
|
|
148
|
+
/* 状态标记:方角、等宽、只染字色 —— 不做彩色药丸 */
|
|
149
|
+
.pill{display:inline-flex;align-items:center;gap:4px;border-radius:2px;padding:0 5px;
|
|
150
|
+
font-size:10.5px;font-family:var(--mono);line-height:16px;
|
|
151
|
+
border:1px solid var(--line2);color:var(--muted);white-space:nowrap}
|
|
152
|
+
.pill.ok{color:var(--ok);border-color:var(--ok)}
|
|
153
|
+
.pill.bad{color:var(--bad);border-color:var(--bad)}
|
|
154
|
+
.pill.warn{color:var(--warn);border-color:var(--warn)}
|
|
155
|
+
.pill.accent{color:var(--accent);border-color:var(--accent)}
|
|
113
156
|
|
|
114
|
-
.bar{height:
|
|
157
|
+
.bar{height:3px;border-radius:0;background:var(--line);overflow:hidden;min-width:48px}
|
|
115
158
|
.bar > i{display:block;height:100%;background:var(--ok)}
|
|
116
159
|
.bar.bad > i{background:var(--bad)} .bar.warn > i{background:var(--warn)}
|
|
117
160
|
|
|
118
|
-
.chips{display:flex;flex-wrap:wrap;gap:
|
|
119
|
-
.chip{font-size:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
.
|
|
123
|
-
|
|
124
|
-
.empty
|
|
125
|
-
|
|
126
|
-
.
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
.kv
|
|
131
|
-
.
|
|
132
|
-
border-
|
|
133
|
-
.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
.
|
|
143
|
-
.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
.
|
|
150
|
-
|
|
151
|
-
|
|
161
|
+
.chips{display:flex;flex-wrap:wrap;gap:5px;align-items:center}
|
|
162
|
+
.chip{font-size:11.5px;padding:2px 8px;border-radius:var(--radius);border:1px solid var(--line2);
|
|
163
|
+
color:var(--muted);cursor:pointer;background:transparent;font-family:inherit}
|
|
164
|
+
.chip:hover{color:var(--text);border-color:var(--dim)}
|
|
165
|
+
.chip[aria-pressed]{color:var(--text);border-color:var(--text);background:var(--panel2)}
|
|
166
|
+
|
|
167
|
+
.empty{padding:26px 14px;text-align:center;color:var(--dim);font-size:12px}
|
|
168
|
+
.empty .big{font-size:12.5px;color:var(--muted);margin-bottom:4px}
|
|
169
|
+
.empty code{display:inline-block;margin-top:8px;background:var(--bg);border:1px solid var(--line);
|
|
170
|
+
border-radius:var(--radius);padding:3px 7px;color:var(--text);cursor:pointer}
|
|
171
|
+
|
|
172
|
+
/* ── 键值表 ──────────────────────────────────────────────────── */
|
|
173
|
+
.kv{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0 20px}
|
|
174
|
+
.kv > div{display:grid;grid-template-columns:96px minmax(0,1fr);gap:8px;padding:4px 0;
|
|
175
|
+
border-bottom:1px solid var(--line);align-items:start}
|
|
176
|
+
.kv .k{color:var(--dim);font-size:11px;white-space:nowrap;padding-top:1px}
|
|
177
|
+
.kv .v{font-family:var(--mono);font-size:11.5px;word-break:break-word;line-height:1.5}
|
|
178
|
+
.block{margin-top:8px;padding:7px 9px;border-left:2px solid var(--line2);background:var(--panel2);
|
|
179
|
+
font-size:11.5px;white-space:pre-wrap;word-break:break-word;line-height:1.55}
|
|
180
|
+
.block b{display:block;font-size:10.5px;color:var(--dim);font-weight:500;margin-bottom:2px}
|
|
181
|
+
|
|
182
|
+
pre.diff{margin:0;background:var(--bg);border:1px solid var(--line);padding:8px 10px;
|
|
183
|
+
overflow:auto;max-height:340px;font-family:var(--mono);font-size:11px;line-height:1.55;
|
|
184
|
+
white-space:pre-wrap;word-break:break-word}
|
|
185
|
+
pre.diff .add{color:var(--ok)} pre.diff .del{color:var(--bad)} pre.diff .ctx{color:var(--dim)}
|
|
186
|
+
pre.raw{margin:0;background:var(--bg);border:1px solid var(--line);padding:8px 10px;
|
|
187
|
+
overflow:auto;max-height:420px;font-family:var(--mono);font-size:10.5px;line-height:1.55}
|
|
188
|
+
|
|
189
|
+
/* ── 走势 ────────────────────────────────────────────────────── */
|
|
190
|
+
/* 高度必须由 CSS 给出:canvas 按像素画,不像原来的 svg 那样自己撑开。
|
|
191
|
+
宽度跟着卡片走,变化时由 page-chart.ts 通知 ECharts 重算。 */
|
|
192
|
+
.spark-wrap{position:relative}
|
|
193
|
+
.spark{display:block;width:100%;height:132px}
|
|
194
|
+
/* 资源没取到时的兜底:说清楚缺了什么,别留一块空白让人以为"没有数据" */
|
|
195
|
+
.spark.missing{display:flex;align-items:center;justify-content:center;
|
|
196
|
+
border:1px dashed var(--line);color:var(--dim);font-size:11.5px}
|
|
197
|
+
|
|
198
|
+
.skeleton{height:10px;background:var(--panel2);border:1px solid var(--line)}
|
|
152
199
|
|
|
153
200
|
.toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
|
|
154
201
|
.toolbar .grow{flex:1}
|
|
155
202
|
|
|
156
|
-
.detail-head{display:flex;flex-wrap:wrap;align-items:flex-start;gap:
|
|
157
|
-
.detail-head .t{font-family:var(--mono);font-size:
|
|
158
|
-
.detail-head .meta{font-size:
|
|
159
|
-
.
|
|
160
|
-
.fail-list
|
|
161
|
-
.
|
|
162
|
-
|
|
203
|
+
.detail-head{display:flex;flex-wrap:wrap;align-items:flex-start;gap:10px}
|
|
204
|
+
.detail-head .t{font-family:var(--mono);font-size:12.5px;line-height:1.45;word-break:break-all}
|
|
205
|
+
.detail-head .meta{font-size:11px;color:var(--dim);margin-top:3px}
|
|
206
|
+
.detail-head .grow{flex:1}
|
|
207
|
+
.fail-list{margin:5px 0 0;padding-left:16px;color:var(--bad);font-size:11.5px}
|
|
208
|
+
.fail-list li{margin:1px 0}
|
|
209
|
+
.taskbox{margin-top:6px;padding:7px 9px;border-left:2px solid var(--line2);background:var(--panel2);
|
|
210
|
+
color:var(--muted);font-size:11.5px;white-space:pre-wrap;line-height:1.55}
|
|
211
|
+
|
|
212
|
+
/* ── 逐条用例 ────────────────────────────────────────────────── */
|
|
213
|
+
/* 展开的详情收进竖线里:原先它和数据行同色同基线,taskbox 的文字比同级 trace 行
|
|
214
|
+
还靠右 9px —— 一段正文出现两条左对齐线,最下面那行就像掉在表格外面。 */
|
|
215
|
+
.case-bar{display:flex;align-items:center;gap:10px;padding:8px 14px;
|
|
216
|
+
border-bottom:1px solid var(--line)}
|
|
217
|
+
.case-bar .grow{flex:1}
|
|
218
|
+
.tbl .caret{display:inline-block;width:0;height:0;margin-right:7px;vertical-align:2px;
|
|
219
|
+
border-left:4px solid var(--dim);border-top:3px solid transparent;
|
|
220
|
+
border-bottom:3px solid transparent;transition:transform .12s}
|
|
221
|
+
.tbl tr.open .caret{transform:rotate(90deg);border-left-color:var(--accent)}
|
|
222
|
+
.tbl tr.detail-row:hover{background:none}
|
|
223
|
+
.tbl td.detail{padding:0 14px 12px}
|
|
224
|
+
.case-detail{border-left:2px solid var(--line2);padding:1px 0 1px 11px}
|
|
225
|
+
.case-detail .taskbox{border-left:0}
|
|
226
|
+
.case-detail > :first-child{margin-top:0}
|
|
227
|
+
/* 9px 与 taskbox 的 padding-left 对齐 —— 正文与事实行必须共用一条左边界 */
|
|
228
|
+
.case-detail .meta{margin-top:5px;padding-left:9px;font-size:10.5px;color:var(--dim)}
|
|
229
|
+
.case-detail .meta .lbl{display:inline-block;min-width:36px}
|
|
230
|
+
.case-detail .tid{font-size:10px;color:var(--muted);background:var(--panel2);
|
|
231
|
+
border:1px solid var(--line);padding:0 4px;border-radius:2px}
|
|
232
|
+
.case-detail .cap{color:var(--dim);margin-bottom:3px}
|
|
163
233
|
|
|
164
|
-
|
|
165
|
-
|
|
234
|
+
/* ── 覆盖层 ──────────────────────────────────────────────────── */
|
|
235
|
+
.palette{position:fixed;inset:0;background:rgba(0,0,0,.55);display:none;
|
|
236
|
+
align-items:flex-start;justify-content:center;z-index:50;padding-top:10vh}
|
|
237
|
+
body.light .palette{background:rgba(26,27,30,.28)}
|
|
166
238
|
.palette.on{display:flex}
|
|
167
|
-
.palette .box{width:min(
|
|
168
|
-
|
|
169
|
-
.palette
|
|
170
|
-
|
|
171
|
-
.palette
|
|
172
|
-
.palette li
|
|
173
|
-
|
|
174
|
-
.
|
|
175
|
-
|
|
239
|
+
.palette .box{width:min(520px,92vw);background:var(--panel);border:1px solid var(--line2);
|
|
240
|
+
border-radius:4px;overflow:hidden}
|
|
241
|
+
.palette input{width:100%;border:0;outline:0;background:transparent;color:var(--text);
|
|
242
|
+
font:inherit;font-size:12.5px;padding:11px 13px;border-bottom:1px solid var(--line)}
|
|
243
|
+
.palette ul{list-style:none;margin:0;padding:4px;max-height:44vh;overflow:auto}
|
|
244
|
+
.palette li{padding:6px 8px;border-radius:var(--radius);display:flex;gap:8px;align-items:center;
|
|
245
|
+
cursor:pointer;font-size:12px}
|
|
246
|
+
.palette li[aria-selected]{background:var(--panel2);box-shadow:inset 2px 0 0 var(--text)}
|
|
247
|
+
.palette li small{margin-left:auto;color:var(--dim);font-family:var(--mono);font-size:10.5px}
|
|
248
|
+
|
|
249
|
+
.toast{position:fixed;right:16px;bottom:16px;background:var(--panel);border:1px solid var(--line2);
|
|
250
|
+
border-radius:var(--radius);padding:6px 11px;font-size:11.5px;opacity:0;transform:translateY(4px);
|
|
251
|
+
transition:.15s;pointer-events:none;z-index:60}
|
|
176
252
|
.toast.on{opacity:1;transform:none}
|
|
177
253
|
|
|
178
|
-
.auth{max-width:
|
|
179
|
-
|
|
180
|
-
.auth
|
|
181
|
-
.auth
|
|
182
|
-
.auth
|
|
254
|
+
.auth{max-width:380px;margin:12vh auto;padding:18px;background:var(--panel);
|
|
255
|
+
border:1px solid var(--line);border-radius:4px}
|
|
256
|
+
.auth h2{margin:0 0 5px;font-size:13.5px;font-weight:600}
|
|
257
|
+
.auth p{margin:0 0 12px;color:var(--dim);font-size:11.5px;line-height:1.6}
|
|
258
|
+
.auth input{width:100%;padding:7px 9px;border-radius:var(--radius);border:1px solid var(--line2);
|
|
259
|
+
background:var(--bg);color:var(--text);font:inherit;font-size:12.5px;margin-bottom:8px}
|
|
260
|
+
.auth button{width:100%;padding:7px;border-radius:var(--radius);border:1px solid var(--text);
|
|
261
|
+
background:var(--text);color:var(--bg);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer}
|
|
183
262
|
|
|
184
|
-
@media (max-width:
|
|
263
|
+
@media (max-width:900px){
|
|
185
264
|
.app{grid-template-columns:1fr}
|
|
186
|
-
.side{position:static;height:auto;flex-direction:row;align-items:center;
|
|
187
|
-
|
|
188
|
-
.
|
|
189
|
-
.
|
|
190
|
-
.
|
|
265
|
+
.side{position:static;height:auto;flex-direction:row;align-items:center;
|
|
266
|
+
overflow-x:auto;padding:8px 10px;border-right:0;border-bottom:1px solid var(--line)}
|
|
267
|
+
.side .ws,.side .foot,.side .spacer,.brand span{display:none}
|
|
268
|
+
.brand{padding:0 8px 0 0}
|
|
269
|
+
.nav{flex-direction:row;gap:2px}
|
|
270
|
+
.wrap{padding:12px}
|
|
271
|
+
.top{padding:10px 12px}
|
|
191
272
|
.search{min-width:0}
|
|
273
|
+
.cards{grid-auto-flow:row;grid-auto-columns:auto;
|
|
274
|
+
grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
|
|
275
|
+
.card{border-left:0;border-top:1px solid var(--line)}
|
|
276
|
+
.card:nth-child(-n+2){border-top:0}
|
|
192
277
|
}
|
|
193
278
|
`;
|
|
194
279
|
//# sourceMappingURL=page-style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-style.js","sourceRoot":"","sources":["../../src/server/page-style.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"page-style.js","sourceRoot":"","sources":["../../src/server/page-style.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8P1B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 报告详情里的「逐条用例」表。
|
|
3
|
+
*
|
|
4
|
+
* 拆成独立文件只为满足 400 行守卫(`page-views.ts` 已到上限)。它和 `page-views2`、
|
|
5
|
+
* `page-views3` 一样,最终被拼进同一段内联脚本,共享同一个闭包。
|
|
6
|
+
*
|
|
7
|
+
* 这一页真正的阅读面是**展开后的那一段**:任务原文、模型输出、失败断言、stopReason
|
|
8
|
+
* 与 trace 叠在一起。原先这些都直接铺在表格行里,于是出现两个问题 ——
|
|
9
|
+
*
|
|
10
|
+
* 1. 详情与数据行同色同基线,读不出「这是上面那条用例的正文」;
|
|
11
|
+
* 2. 详情的左边界比 taskbox 里的文字还靠左 9px,一段文字里出现两条左对齐线,
|
|
12
|
+
* 最下面那行 trace 看起来像掉在表格外面。
|
|
13
|
+
*
|
|
14
|
+
* 所以详情收进一个带竖线的容器:竖线从用例名下方起始,所有内容统一缩进到竖线右侧。
|
|
15
|
+
* 行首的三角是 CSS 画的,不依赖字体里有没有 ▸。
|
|
16
|
+
*/
|
|
17
|
+
export declare const BOARD_VIEWS_CASES = "\n function casesPanel(cases, rawCases) {\n /* \u8BFB\u6570\uFF08\u526F\u4F5C\u7528 / \u8BB0\u5FC6\u952E / \u5224\u5B98\uFF09\u53EA\u5728\u62A5\u544A\u539F\u4EF6\u91CC\u6709 \u2014\u2014 \u5E93\u91CC\u7684\u6458\u8981\u7ED9\u300C\u5217\u8868\u9875\u300D\u7528\uFF0C\n \u800C\u8FD9\u4E00\u9875\u8981\u7684\u662F\u300C\u8FD9\u6761\u7528\u4F8B\u5230\u5E95\u5E26\u7740\u4EC0\u4E48\u6761\u4EF6\u8DD1\u3001\u9A8C\u4E86\u4EC0\u4E48\u300D\u3002\u6CA1\u505A\u8FDB RunCase \u662F\u523B\u610F\u7684\uFF1A\n \u4E16\u754C\u5FEB\u7167\u662F\u4EFB\u610F\u7ED3\u6784\uFF0C\u8FDB\u5E93\u8981\u5F00\u4E00\u5217 JSONB\uFF0C\u800C\u5B83\u7684\u8BFB\u6CD5\u53EA\u6709\u8FD9\u4E00\u4E2A\u9875\u9762\u7528\u5F97\u4E0A\u3002 */\n var rawByName = {};\n (rawCases || []).forEach(function (c) {\n if (c && c.name) rawByName[c.name] = c;\n });\n var p = panel('\u9010\u6761\u7528\u4F8B', cases.length + ' \u6761');\n p.body.className = 'body flush';\n\n var bar = el('div', 'case-bar');\n var onlyBad = el('button', 'chip', '\u53EA\u770B\u5931\u8D25');\n onlyBad.setAttribute('aria-pressed', 'false');\n bar.appendChild(onlyBad);\n bar.appendChild(el('div', 'grow'));\n bar.appendChild(el('span', 'hint', '\u70B9\u4E00\u884C\u5C55\u5F00\u4EFB\u52A1\u539F\u6587\u4E0E\u5931\u8D25\u65AD\u8A00'));\n p.body.appendChild(bar);\n\n var t = el('table', 'tbl');\n var thead = el('thead');\n var hr = el('tr');\n [['\u7528\u4F8B', ''], ['\u7ED3\u679C', ''], ['token', 'num'], ['\u8F6E\u6B21', 'num'],\n ['\u8017\u65F6', 'num'], ['\u8DEF\u7531', '']].forEach(function (h) {\n hr.appendChild(el('th', h[1], h[0]));\n });\n thead.appendChild(hr);\n t.appendChild(thead);\n var tb = el('tbody');\n\n function rowOf(c) {\n var tr = el('tr', 'click');\n var c1 = el('td');\n c1.appendChild(el('span', 'caret'));\n c1.appendChild(el('span', 'name', c.name));\n if (c.failures && c.failures.length) {\n // \u901A\u8FC7\u4F46\u5E26 failures = \u91CD\u590D\u91C7\u6837\u91CC\u6709\u6837\u672C\u6CA1\u8FC7\uFF08passed \u662F\u8FC7\u534A\u5224\u5B9A\uFF09\u3002\n // \u8FD9\u4E24\u79CD\u60C5\u51B5\u5FC5\u987B\u957F\u5F97\u4E0D\u4E00\u6837\uFF0C\u5426\u5219\u4EBA\u4F1A\u53BB\u4FEE\u4E00\u6761\u672C\u6765\u5DF2\u7ECF\u8FC7\u7684\u7528\u4F8B\n var dot = c.passed\n ? pill('\u91C7\u6837\u542B\u5931\u8D25', 'warn')\n : pill(String(c.failures.length) + ' \u5904\u65AD\u8A00\u672A\u8FC7', 'bad');\n dot.style.marginLeft = '8px';\n c1.appendChild(dot);\n }\n tr.appendChild(c1);\n // el() \u7684\u7B2C\u4E09\u53C2\u662F\u6587\u672C\uFF0C\u4F20\u8282\u70B9\u4F1A\u88AB toString \u6210 [object HTMLSpanElement]\n var c2 = el('td');\n c2.appendChild(pill(c.passed ? '\u901A\u8FC7' : '\u5931\u8D25', c.passed ? 'ok' : 'bad'));\n tr.appendChild(c2);\n tr.appendChild(el('td', 'num', tok(c.tokens)));\n tr.appendChild(el('td', 'num', c.iterations));\n tr.appendChild(el('td', 'num', c.durationMs === undefined ? '\u2014' : (c.durationMs / 1000).toFixed(1) + 's'));\n tr.appendChild(el('td', 'muted', c.routedTo || '\u2014'));\n\n var detail = el('tr', 'detail-row');\n detail.style.display = 'none';\n var td = el('td', 'detail');\n td.colSpan = 6;\n var box = el('div', 'case-detail');\n if (c.task) box.appendChild(el('div', 'taskbox', c.task));\n if (c.failures && c.failures.length) {\n var ul2 = el('ul', 'fail-list');\n c.failures.forEach(function (f) { ul2.appendChild(el('li', '', f)); });\n box.appendChild(ul2);\n }\n if (c.excerpt) {\n var ex = el('div', 'taskbox');\n ex.appendChild(el('div', 'cap', '\u6A21\u578B\u8F93\u51FA\uFF08\u88C1\u526A\uFF09'));\n ex.appendChild(document.createTextNode(c.excerpt));\n box.appendChild(ex);\n }\n /* \u5916\u90E8\u72B6\u6001\uFF1A\u8FD9\u6761\u7528\u4F8B\u65AD\u8A00\u300C\u4E16\u754C\u5E94\u8BE5\u53D8\u6210\u4EC0\u4E48\u6837\u300D\uFF0C\u800C\u6A21\u578B\u81EA\u5DF1\u8BF4\u4E86\u4EC0\u4E48\u4E0D\u7B97\u6570\u3002\n \u901A\u8FC7\u7684\u4E5F\u663E\u793A \u2014\u2014 \u4E00\u6761 effects \u65AD\u8A00\u5982\u679C\u4ECE\u6765\u6CA1\u88AB\u770B\u8FC7\uFF0C\u5B83\u5C31\u662F\u4E00\u6761\u8C01\u4E5F\u4E0D\u6562\u4FE1\u7684\u65AD\u8A00 */\n var fx = (rawByName[c.name] || {}).effects;\n if (fx && fx.length) {\n var fxBox = el('div', 'taskbox');\n fxBox.appendChild(el('div', 'cap', '\u5916\u90E8\u72B6\u6001\uFF08\u5DE5\u5177\u6869\u4E16\u754C\uFF09'));\n fx.forEach(function (e) {\n var has = e.actual !== undefined;\n var agree = has && String(e.actual) === String(e.expected);\n var line = el('div', 'meta');\n line.appendChild(el('code', 'tid', e.path));\n line.appendChild(document.createTextNode(\n ' ' + (has ? String(e.actual) : '\uFF08\u6CA1\u6709\u8FD9\u4E2A\u952E\uFF09') + ' \u2192 '\n ));\n line.appendChild(el('span', agree ? 'ok' : 'bad', String(e.expected)));\n fxBox.appendChild(line);\n });\n box.appendChild(fxBox);\n }\n /* \u5224\u5B98\u7684\u4E0D\u5408\u683C\u9879\u8981\u5355\u72EC\u5217\u51FA\u6765\uFF1A\u975E\u95E8\u63A7\u7684\u7528\u4F8B\u91CC\u5B83\u4E0D\u8FDB failures\uFF08\u90A3\u662F\u523B\u610F\u7684\uFF09\uFF0C\n \u4F46\u4EBA\u6253\u5F00\u4E00\u6761\u7528\u4F8B\uFF0C\u6700\u60F3\u77E5\u9053\u7684\u6070\u6070\u662F\u300C\u5B83\u5230\u5E95\u5ACC\u54EA\u4E00\u53E5\u300D */\n if (raw.judge && raw.judge.misses && raw.judge.misses.length) {\n var jb = el('div', 'taskbox');\n jb.appendChild(el('div', 'cap', '\u5224\u5B98\uFF1A\u4E0D\u5408\u683C\u9879'));\n raw.judge.misses.forEach(function (m) {\n jb.appendChild(el('div', 'meta', m));\n });\n box.appendChild(jb);\n }\n var facts = [];\n var raw = rawByName[c.name] || {};\n if (raw.memoryKeys && raw.memoryKeys.length) facts.push('\u8BB0\u5FC6 ' + raw.memoryKeys.join(', '));\n /* \u5224\u5B98\uFF1A\u7ED9\u7684\u662F\u300C\u51E0\u6761\u6EE1\u8DB3 + \u6709\u6CA1\u6709\u53C2\u4E0E\u5224\u5B9A\u300D\u3002\u4E0D\u5199\u5206\u6570\u6BD4\u4F8B\u662F\u56E0\u4E3A\u6E05\u5355\u53EF\u80FD\u53EA\u6709\n 3 \u6761\uFF0C67% \u4E0E 2/3 \u76F8\u6BD4\u540E\u8005\u66F4\u80FD\u8BA9\u4EBA\u5224\u65AD\u300C\u5B83\u5230\u5E95\u5ACC\u54EA\u4E00\u6761\u300D\u2014\u2014 \u800C\u4E0D\u5408\u683C\u9879\u5C31\u5728\u4E0B\u9762 */\n if (raw.judge) {\n facts.push(\n raw.judge.error\n ? '\u5224\u5B98\u672A\u7ED9\u51FA\u7ED3\u8BBA'\n : '\u5224\u5B98 ' + raw.judge.yes + '/' + raw.judge.total + (raw.judge.gate ? '\uFF08\u53C2\u4E0E\u5224\u5B9A\uFF09' : '')\n );\n }\n if (c.stopReason) facts.push('stopReason ' + c.stopReason);\n if (c.peakContextTokens !== undefined) facts.push('\u5CF0\u503C\u4E0A\u4E0B\u6587 ' + tok(c.peakContextTokens));\n if (c.compactions !== undefined) facts.push('\u538B\u7F29 ' + c.compactions + ' \u6B21');\n if (c.toolCalls !== undefined) facts.push('\u5DE5\u5177\u8C03\u7528 ' + c.toolCalls);\n if (c.samples !== undefined) facts.push('\u91C7\u6837 ' + (c.passedSamples || 0) + '/' + c.samples);\n if (facts.length) box.appendChild(el('div', 'meta', facts.join(' \u00B7 ')));\n if (c.traceId) {\n var tid = el('div', 'meta');\n tid.appendChild(el('span', 'lbl', 'trace'));\n var code = el('code', 'tid', c.traceId);\n code.title = '\u70B9\u51FB\u590D\u5236\uFF1Aharness trace ' + c.traceId;\n code.style.cursor = 'pointer';\n code.onclick = function (ev) { ev.stopPropagation(); copy('harness trace ' + c.traceId); };\n tid.appendChild(code);\n box.appendChild(tid);\n }\n td.appendChild(box);\n detail.appendChild(td);\n\n tr.onclick = function () {\n var open = detail.style.display === 'none';\n detail.style.display = open ? '' : 'none';\n tr.className = open ? 'click open' : 'click';\n };\n return [tr, detail];\n }\n\n cases.forEach(function (c) {\n var pair = rowOf(c);\n tb.appendChild(pair[0]);\n tb.appendChild(pair[1]);\n });\n t.appendChild(tb);\n p.body.appendChild(t);\n onlyBad.onclick = function () {\n var on = onlyBad.getAttribute('aria-pressed') !== 'true';\n onlyBad.setAttribute('aria-pressed', on ? 'true' : 'false');\n onlyBad.textContent = on ? '\u663E\u793A\u5168\u90E8' : '\u53EA\u770B\u5931\u8D25';\n Array.prototype.forEach.call(tb.children, function (tr, i) {\n if (i % 2 === 0) {\n var c = cases[i / 2];\n tr.style.display = !on || !c.passed ? '' : 'none';\n if (tr.style.display === 'none' && tr.nextSibling) tr.nextSibling.style.display = 'none';\n }\n });\n };\n return p;\n }\n\n";
|
|
18
|
+
//# sourceMappingURL=page-views-cases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-views-cases.d.ts","sourceRoot":"","sources":["../../src/server/page-views-cases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,iBAAiB,8wRAkK7B,CAAC"}
|