dsh-livebench-panel 0.1.14 → 0.1.16
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/lib/client.js +30 -21
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -13,7 +13,8 @@ window.__ModuleLoader__.load({
|
|
|
13
13
|
.dlb_head h2{margin:0;font-size:16px;font-weight:600}
|
|
14
14
|
.dlb_sub{color:var(--dsw-alias-label-tertiary);font-size:12px}
|
|
15
15
|
.dlb_card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);border-radius:10px;padding:14px;display:flex;flex-direction:column;gap:12px}
|
|
16
|
-
.dlb_grid{display:grid;grid-template-columns:repeat(
|
|
16
|
+
.dlb_grid{display:grid;grid-template-columns:repeat(12,1fr);gap:10px}
|
|
17
|
+
@media (max-width:860px){.dlb_grid>.dlb_field{grid-column:1/-1 !important}}
|
|
17
18
|
.dlb_field{display:flex;flex-direction:column;gap:4px;min-width:0}
|
|
18
19
|
.dlb_label{color:var(--dsw-alias-label-tertiary);font-size:11px;text-transform:uppercase;letter-spacing:.02em}
|
|
19
20
|
.dlb_select,.dlb_input{height:34px;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;border-radius:8px;padding:0 8px;outline:none;min-width:0}
|
|
@@ -50,6 +51,10 @@ window.__ModuleLoader__.load({
|
|
|
50
51
|
.dlb_chip{appearance:none;font:inherit;cursor:pointer;color:var(--dsw-alias-label-secondary);background:transparent;border:1px solid var(--dsw-alias-border-l2);border-radius:999px;padding:3px 12px;font-size:12px;line-height:18px}
|
|
51
52
|
.dlb_chip:disabled{opacity:.4;cursor:not-allowed}
|
|
52
53
|
.dlb_chipOn{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-state-business-primary);background:color-mix(in srgb,var(--dsw-alias-state-business-primary) 14%,transparent)}
|
|
54
|
+
.dlb_actionWrap{display:flex;gap:12px;align-items:stretch}
|
|
55
|
+
.dlb_actionCol{display:flex;flex-direction:column;gap:8px;width:130px;flex-shrink:0}
|
|
56
|
+
.dlb_btnBar{flex:1;min-height:44px;font-weight:600;white-space:normal}
|
|
57
|
+
@media (max-width:760px){.dlb_actionWrap{flex-direction:column}.dlb_actionCol{flex-direction:row;width:100%}.dlb_btnBar{min-height:40px;flex:1}}
|
|
53
58
|
.dlb_drag{cursor:grab;color:var(--dsw-alias-label-tertiary);text-align:center;user-select:none}`;
|
|
54
59
|
const tagId = "dsh-livebench-panel/panel.css";
|
|
55
60
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
@@ -386,9 +391,10 @@ window.__ModuleLoader__.load({
|
|
|
386
391
|
),
|
|
387
392
|
configError !== null && h("p", { className: c("error") }, `加载配置失败:${configError}`),
|
|
388
393
|
h("div", { className: c("card") },
|
|
389
|
-
h("div", { className: c("
|
|
390
|
-
h("div", { className: c("
|
|
391
|
-
|
|
394
|
+
h("div", { className: c("actionWrap") },
|
|
395
|
+
h("div", { className: c("grid"), style: { flex: 1, minWidth: 0 } },
|
|
396
|
+
h("div", { className: c("field"), ref: modelDdRef, style: { gridColumn: "span 6" } },
|
|
397
|
+
h("label", { className: c("label") }, "模型(harness 全部模型,可多选;勾选后可在行内单独设定推理强度)"),
|
|
392
398
|
h("button", {
|
|
393
399
|
type: "button", className: c("select"), style: { textAlign: "left", width: "100%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
|
|
394
400
|
onClick: () => setModelDdOpen((v) => !v),
|
|
@@ -439,11 +445,22 @@ window.__ModuleLoader__.load({
|
|
|
439
445
|
m.efforts.map((e) => h("option", { key: e, value: e }, e === "off" ? "off(关闭思考)" : e)))));
|
|
440
446
|
}))),
|
|
441
447
|
),
|
|
442
|
-
h("div", { className: c("field") },
|
|
448
|
+
h("div", { className: c("field"), style: { gridColumn: "span 2" } },
|
|
443
449
|
h("label", { className: c("label") }, "题集 release"),
|
|
444
450
|
h("select", { className: c("select"), value: sel.release, onChange: setField("release") },
|
|
445
451
|
(config?.releases ?? ["2024-11-25"]).map((r) => h("option", { key: r, value: r }, r))),
|
|
446
452
|
),
|
|
453
|
+
h("div", { className: c("field"), style: { gridColumn: "span 2" } },
|
|
454
|
+
h("label", { className: c("label") }, "题目序号范围(可选)"),
|
|
455
|
+
h("div", { className: c("row") },
|
|
456
|
+
h("input", { className: c("input"), type: "number", min: 0, placeholder: "起", value: sel.begin, onChange: setField("begin"), style: { width: "50%" } }),
|
|
457
|
+
h("input", { className: c("input"), type: "number", min: 0, placeholder: "止", value: sel.end, onChange: setField("end"), style: { width: "50%" } }),
|
|
458
|
+
),
|
|
459
|
+
),
|
|
460
|
+
h("div", { className: c("field"), style: { gridColumn: "span 2" } },
|
|
461
|
+
h("label", { className: c("label") }, "max-tokens(默认 32000)"),
|
|
462
|
+
h("input", { className: c("input"), type: "number", min: 256, max: 32768, value: sel.maxTokens, onChange: setField("maxTokens") }),
|
|
463
|
+
),
|
|
447
464
|
h("div", { className: c("field"), style: { gridColumn: "1 / -1" } },
|
|
448
465
|
h("label", { className: c("label") }, "分类(可多选,不选 = 全部分类;括号内为该 release 下有效题数)"),
|
|
449
466
|
h("div", { className: c("chips") },
|
|
@@ -470,23 +487,15 @@ window.__ModuleLoader__.load({
|
|
|
470
487
|
}, `${task}(${n})`);
|
|
471
488
|
})),
|
|
472
489
|
),
|
|
473
|
-
h("div", { className: c("field") },
|
|
474
|
-
h("label", { className: c("label") }, "题目序号范围(可选)"),
|
|
475
|
-
h("div", { className: c("row") },
|
|
476
|
-
h("input", { className: c("input"), type: "number", min: 0, placeholder: "起", value: sel.begin, onChange: setField("begin"), style: { width: "50%" } }),
|
|
477
|
-
h("input", { className: c("input"), type: "number", min: 0, placeholder: "止", value: sel.end, onChange: setField("end"), style: { width: "50%" } }),
|
|
478
|
-
),
|
|
479
|
-
),
|
|
480
|
-
h("div", { className: c("field") },
|
|
481
|
-
h("label", { className: c("label") }, "max-tokens(默认 32000)"),
|
|
482
|
-
h("input", { className: c("input"), type: "number", min: 256, max: 32768, value: sel.maxTokens, onChange: setField("maxTokens") }),
|
|
483
|
-
),
|
|
484
490
|
),
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
491
|
+
h("div", { className: c("actionCol") },
|
|
492
|
+
h("button", {
|
|
493
|
+
className: c("btn") + " " + c("btnBar"), onClick: onStart,
|
|
494
|
+
disabled: busy || !config?.available || sel.models.length === 0,
|
|
495
|
+
}, `开始评测(${sel.models.length})`),
|
|
496
|
+
running && h("button", { className: c("btn") + " " + c("btnDanger") + " " + c("btnBar"), onClick: onStop }, "停止全部"),
|
|
497
|
+
h("button", { className: c("btnGhost") + " " + c("btn") + " " + c("btnBar"), onClick: () => { loadConfig(); loadResults(); } }, "刷新"),
|
|
498
|
+
),
|
|
490
499
|
),
|
|
491
500
|
startError !== null && h("p", { className: c("error") }, startError),
|
|
492
501
|
),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-livebench-panel",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "DSH web plugin: a LiveBench tab in the Trajectory view (right of 对话/轨迹). Run LiveBench evaluations against every model configured in the DeepSeek Harness — pick provider/model, category, task, release and question range from dropdowns, watch progress, and read scores in place.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|