inspect-ai 0.3.63__py3-none-any.whl → 0.3.65__py3-none-any.whl
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.
- inspect_ai/_cli/cache.py +8 -7
- inspect_ai/_cli/common.py +0 -12
- inspect_ai/_cli/eval.py +32 -4
- inspect_ai/_cli/info.py +1 -0
- inspect_ai/_cli/list.py +1 -1
- inspect_ai/_cli/log.py +2 -0
- inspect_ai/_cli/sandbox.py +4 -1
- inspect_ai/_cli/score.py +181 -32
- inspect_ai/_cli/trace.py +2 -0
- inspect_ai/_cli/view.py +4 -2
- inspect_ai/_display/core/config.py +7 -1
- inspect_ai/_display/core/progress.py +1 -1
- inspect_ai/_display/textual/app.py +8 -4
- inspect_ai/_display/textual/widgets/samples.py +6 -5
- inspect_ai/_display/textual/widgets/sandbox.py +6 -0
- inspect_ai/_eval/__init__.py +0 -0
- inspect_ai/_eval/eval.py +100 -97
- inspect_ai/_eval/evalset.py +69 -69
- inspect_ai/_eval/loader.py +122 -12
- inspect_ai/_eval/registry.py +1 -1
- inspect_ai/_eval/run.py +14 -0
- inspect_ai/_eval/score.py +125 -36
- inspect_ai/_eval/task/log.py +105 -4
- inspect_ai/_eval/task/results.py +92 -38
- inspect_ai/_eval/task/run.py +6 -2
- inspect_ai/_eval/task/sandbox.py +35 -2
- inspect_ai/_eval/task/task.py +49 -46
- inspect_ai/_util/__init__.py +0 -0
- inspect_ai/_util/constants.py +1 -1
- inspect_ai/_util/content.py +8 -0
- inspect_ai/_util/error.py +2 -0
- inspect_ai/_util/file.py +15 -1
- inspect_ai/_util/logger.py +4 -2
- inspect_ai/_util/registry.py +7 -1
- inspect_ai/_view/view.py +1 -2
- inspect_ai/_view/www/App.css +8 -3
- inspect_ai/_view/www/README.md +1 -1
- inspect_ai/_view/www/dist/assets/index.css +66 -38
- inspect_ai/_view/www/dist/assets/index.js +525 -523
- inspect_ai/_view/www/log-schema.json +86 -73
- inspect_ai/_view/www/package.json +1 -1
- inspect_ai/_view/www/src/App.tsx +1 -0
- inspect_ai/_view/www/src/components/AnsiDisplay.tsx +1 -1
- inspect_ai/_view/www/src/components/JsonPanel.tsx +1 -1
- inspect_ai/_view/www/src/components/LargeModal.tsx +39 -49
- inspect_ai/_view/www/src/components/NavPills.tsx +3 -1
- inspect_ai/_view/www/src/components/TabSet.tsx +19 -4
- inspect_ai/_view/www/src/logfile/remoteLogFile.ts +0 -1
- inspect_ai/_view/www/src/metadata/MetaDataGrid.tsx +1 -1
- inspect_ai/_view/www/src/metadata/MetaDataView.tsx +1 -1
- inspect_ai/_view/www/src/metadata/RenderedContent.tsx +6 -13
- inspect_ai/_view/www/src/plan/PlanDetailView.tsx +17 -2
- inspect_ai/_view/www/src/plan/SolverDetailView.tsx +1 -1
- inspect_ai/_view/www/src/samples/SampleDisplay.tsx +14 -5
- inspect_ai/_view/www/src/samples/SampleSummaryView.tsx +4 -2
- inspect_ai/_view/www/src/samples/SamplesTools.tsx +16 -24
- inspect_ai/_view/www/src/samples/chat/ChatMessage.tsx +1 -1
- inspect_ai/_view/www/src/samples/chat/ChatView.tsx +1 -0
- inspect_ai/_view/www/src/samples/chat/MessageContent.tsx +27 -13
- inspect_ai/_view/www/src/samples/chat/MessageContents.tsx +19 -17
- inspect_ai/_view/www/src/samples/chat/tools/ToolCallView.tsx +12 -10
- inspect_ai/_view/www/src/samples/chat/tools/ToolInput.tsx +56 -66
- inspect_ai/_view/www/src/samples/chat/tools/ToolOutput.tsx +12 -5
- inspect_ai/_view/www/src/samples/chat/tools/tool.ts +21 -36
- inspect_ai/_view/www/src/samples/descriptor/samplesDescriptor.tsx +3 -1
- inspect_ai/_view/www/src/samples/sample-tools/SelectScorer.tsx +27 -25
- inspect_ai/_view/www/src/samples/sample-tools/SortFilter.tsx +5 -1
- inspect_ai/_view/www/src/samples/scores/SampleScoreView.module.css +13 -13
- inspect_ai/_view/www/src/samples/transcript/InfoEventView.tsx +1 -1
- inspect_ai/_view/www/src/samples/transcript/ModelEventView.tsx +2 -2
- inspect_ai/_view/www/src/samples/transcript/SampleInitEventView.tsx +9 -5
- inspect_ai/_view/www/src/samples/transcript/ScoreEventView.tsx +1 -1
- inspect_ai/_view/www/src/samples/transcript/ToolEventView.tsx +5 -4
- inspect_ai/_view/www/src/samples/transcript/event/EventNavs.tsx +1 -0
- inspect_ai/_view/www/src/samples/transcript/event/EventPanel.tsx +1 -0
- inspect_ai/_view/www/src/samples/transcript/state/StateEventRenderers.tsx +17 -6
- inspect_ai/_view/www/src/samples/transcript/state/StateEventView.tsx +14 -19
- inspect_ai/_view/www/src/types/log.d.ts +107 -19
- inspect_ai/_view/www/src/usage/ModelTokenTable.tsx +7 -1
- inspect_ai/_view/www/src/usage/ModelUsagePanel.tsx +5 -3
- inspect_ai/_view/www/src/workspace/WorkSpaceView.tsx +25 -27
- inspect_ai/_view/www/src/workspace/navbar/PrimaryBar.tsx +12 -11
- inspect_ai/_view/www/src/workspace/navbar/ResultsPanel.module.css +25 -2
- inspect_ai/_view/www/src/workspace/navbar/ResultsPanel.tsx +60 -36
- inspect_ai/_view/www/src/workspace/navbar/SecondaryBar.tsx +4 -0
- inspect_ai/_view/www/src/workspace/sidebar/SidebarScoreView.tsx +6 -4
- inspect_ai/_view/www/src/workspace/sidebar/SidebarScoresView.tsx +16 -14
- inspect_ai/_view/www/src/workspace/tabs/InfoTab.tsx +9 -19
- inspect_ai/_view/www/src/workspace/utils.ts +34 -0
- inspect_ai/approval/_approval.py +2 -0
- inspect_ai/approval/_approver.py +4 -4
- inspect_ai/approval/_auto.py +1 -1
- inspect_ai/approval/_human/approver.py +3 -0
- inspect_ai/approval/_policy.py +5 -0
- inspect_ai/approval/_registry.py +2 -2
- inspect_ai/dataset/_dataset.py +36 -45
- inspect_ai/dataset/_sources/__init__.py +0 -0
- inspect_ai/dataset/_sources/csv.py +13 -13
- inspect_ai/dataset/_sources/hf.py +29 -29
- inspect_ai/dataset/_sources/json.py +10 -10
- inspect_ai/log/__init__.py +2 -0
- inspect_ai/log/_convert.py +3 -3
- inspect_ai/log/_file.py +24 -9
- inspect_ai/log/_log.py +98 -7
- inspect_ai/log/_message.py +3 -1
- inspect_ai/log/_recorders/file.py +4 -0
- inspect_ai/log/_recorders/recorder.py +3 -0
- inspect_ai/log/_transcript.py +19 -8
- inspect_ai/model/__init__.py +2 -0
- inspect_ai/model/_cache.py +39 -21
- inspect_ai/model/_call_tools.py +2 -2
- inspect_ai/model/_chat_message.py +14 -4
- inspect_ai/model/_generate_config.py +1 -1
- inspect_ai/model/_model.py +31 -24
- inspect_ai/model/_model_output.py +14 -1
- inspect_ai/model/_openai.py +10 -18
- inspect_ai/model/_providers/google.py +9 -5
- inspect_ai/model/_providers/openai.py +5 -9
- inspect_ai/model/_providers/openrouter.py +1 -1
- inspect_ai/scorer/__init__.py +6 -1
- inspect_ai/scorer/_answer.py +1 -1
- inspect_ai/scorer/_classification.py +4 -0
- inspect_ai/scorer/_match.py +4 -5
- inspect_ai/scorer/_metric.py +87 -28
- inspect_ai/scorer/_metrics/__init__.py +3 -3
- inspect_ai/scorer/_metrics/accuracy.py +8 -10
- inspect_ai/scorer/_metrics/mean.py +3 -17
- inspect_ai/scorer/_metrics/std.py +111 -30
- inspect_ai/scorer/_model.py +12 -12
- inspect_ai/scorer/_pattern.py +3 -3
- inspect_ai/scorer/_reducer/reducer.py +36 -21
- inspect_ai/scorer/_reducer/registry.py +2 -2
- inspect_ai/scorer/_reducer/types.py +7 -1
- inspect_ai/scorer/_score.py +11 -1
- inspect_ai/scorer/_scorer.py +110 -16
- inspect_ai/solver/__init__.py +1 -1
- inspect_ai/solver/_basic_agent.py +19 -22
- inspect_ai/solver/_bridge/__init__.py +0 -3
- inspect_ai/solver/_bridge/bridge.py +3 -3
- inspect_ai/solver/_chain.py +1 -2
- inspect_ai/solver/_critique.py +3 -3
- inspect_ai/solver/_fork.py +2 -2
- inspect_ai/solver/_human_agent/__init__.py +0 -0
- inspect_ai/solver/_human_agent/agent.py +5 -8
- inspect_ai/solver/_human_agent/commands/clock.py +14 -10
- inspect_ai/solver/_human_agent/commands/note.py +1 -1
- inspect_ai/solver/_human_agent/commands/score.py +0 -11
- inspect_ai/solver/_multiple_choice.py +15 -18
- inspect_ai/solver/_prompt.py +7 -7
- inspect_ai/solver/_solver.py +53 -52
- inspect_ai/solver/_task_state.py +80 -69
- inspect_ai/solver/_use_tools.py +9 -9
- inspect_ai/tool/__init__.py +2 -1
- inspect_ai/tool/_tool.py +43 -14
- inspect_ai/tool/_tool_call.py +6 -2
- inspect_ai/tool/_tool_choice.py +3 -1
- inspect_ai/tool/_tool_def.py +10 -8
- inspect_ai/tool/_tool_params.py +24 -0
- inspect_ai/tool/_tool_with.py +7 -7
- inspect_ai/tool/_tools/__init__.py +0 -0
- inspect_ai/tool/_tools/_computer/_common.py +2 -2
- inspect_ai/tool/_tools/_computer/_computer.py +11 -0
- inspect_ai/tool/_tools/_execute.py +15 -9
- inspect_ai/tool/_tools/_web_browser/_resources/README.md +2 -2
- inspect_ai/tool/_tools/_web_browser/_web_browser.py +5 -3
- inspect_ai/tool/_tools/_web_search.py +7 -5
- inspect_ai/util/_concurrency.py +3 -3
- inspect_ai/util/_panel.py +2 -0
- inspect_ai/util/_resource.py +12 -12
- inspect_ai/util/_sandbox/docker/compose.py +23 -20
- inspect_ai/util/_sandbox/docker/config.py +2 -1
- inspect_ai/util/_sandbox/docker/docker.py +10 -1
- inspect_ai/util/_sandbox/docker/service.py +100 -0
- inspect_ai/util/_sandbox/environment.py +99 -96
- inspect_ai/util/_subprocess.py +5 -3
- inspect_ai/util/_subtask.py +15 -16
- {inspect_ai-0.3.63.dist-info → inspect_ai-0.3.65.dist-info}/LICENSE +1 -1
- {inspect_ai-0.3.63.dist-info → inspect_ai-0.3.65.dist-info}/METADATA +10 -6
- {inspect_ai-0.3.63.dist-info → inspect_ai-0.3.65.dist-info}/RECORD +182 -175
- {inspect_ai-0.3.63.dist-info → inspect_ai-0.3.65.dist-info}/WHEEL +0 -0
- {inspect_ai-0.3.63.dist-info → inspect_ai-0.3.65.dist-info}/entry_points.txt +0 -0
- {inspect_ai-0.3.63.dist-info → inspect_ai-0.3.65.dist-info}/top_level.txt +0 -0
@@ -15908,17 +15908,19 @@ var require_assets = __commonJS({
|
|
15908
15908
|
title: title2,
|
15909
15909
|
activeItem,
|
15910
15910
|
setActiveItem
|
15911
|
-
}
|
15911
|
+
},
|
15912
|
+
`nav-pill-contents-${idx}`
|
15912
15913
|
);
|
15913
15914
|
});
|
15914
|
-
const navBodies = children2.map((child) => {
|
15915
|
+
const navBodies = children2.map((child, idx) => {
|
15915
15916
|
var _a2;
|
15916
15917
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
15917
15918
|
"div",
|
15918
15919
|
{
|
15919
15920
|
className: ((_a2 = child["props"]) == null ? void 0 : _a2.title) === activeItem ? styles$11.visible : styles$11.hidden,
|
15920
15921
|
children: child
|
15921
|
-
}
|
15922
|
+
},
|
15923
|
+
`nav-pill-container-${idx}`
|
15922
15924
|
);
|
15923
15925
|
});
|
15924
15926
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
@@ -21347,21 +21349,31 @@ var require_assets = __commonJS({
|
|
21347
21349
|
}
|
21348
21350
|
const outputs = [];
|
21349
21351
|
if (Array.isArray(output2)) {
|
21350
|
-
output2.forEach((out) => {
|
21352
|
+
output2.forEach((out, idx) => {
|
21353
|
+
const key2 = `tool-output-${idx}`;
|
21351
21354
|
if (out.type === "text") {
|
21352
|
-
outputs.push(/* @__PURE__ */ jsxRuntimeExports.jsx(ToolTextOutput, { text: out.text }));
|
21355
|
+
outputs.push(/* @__PURE__ */ jsxRuntimeExports.jsx(ToolTextOutput, { text: out.text }, key2));
|
21353
21356
|
} else {
|
21354
21357
|
if (out.image.startsWith("data:")) {
|
21355
21358
|
outputs.push(
|
21356
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
21359
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
21360
|
+
"img",
|
21361
|
+
{
|
21362
|
+
className: clsx(styles$_.toolImage),
|
21363
|
+
src: out.image
|
21364
|
+
},
|
21365
|
+
key2
|
21366
|
+
)
|
21357
21367
|
);
|
21358
21368
|
} else {
|
21359
|
-
outputs.push(/* @__PURE__ */ jsxRuntimeExports.jsx(ToolTextOutput, { text: String(out.image) }));
|
21369
|
+
outputs.push(/* @__PURE__ */ jsxRuntimeExports.jsx(ToolTextOutput, { text: String(out.image) }, key2));
|
21360
21370
|
}
|
21361
21371
|
}
|
21362
21372
|
});
|
21363
21373
|
} else {
|
21364
|
-
outputs.push(
|
21374
|
+
outputs.push(
|
21375
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ToolTextOutput, { text: String(output2) }, "tool-output-single")
|
21376
|
+
);
|
21365
21377
|
}
|
21366
21378
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$_.output), children: outputs });
|
21367
21379
|
};
|
@@ -21373,6 +21385,7 @@ var require_assets = __commonJS({
|
|
21373
21385
|
return contents2.map((content2, index2) => {
|
21374
21386
|
if (typeof content2 === "string") {
|
21375
21387
|
return messageRenderers["text"].render(
|
21388
|
+
`text-content-${index2}`,
|
21376
21389
|
{
|
21377
21390
|
type: "text",
|
21378
21391
|
text: content2
|
@@ -21383,7 +21396,11 @@ var require_assets = __commonJS({
|
|
21383
21396
|
if (content2) {
|
21384
21397
|
const renderer = messageRenderers[content2.type];
|
21385
21398
|
if (renderer) {
|
21386
|
-
return renderer.render(
|
21399
|
+
return renderer.render(
|
21400
|
+
`text-${content2.type}-${index2}`,
|
21401
|
+
content2,
|
21402
|
+
index2 === contents2.length - 1
|
21403
|
+
);
|
21387
21404
|
} else {
|
21388
21405
|
console.error(`Unknown message content type '${content2.type}'`);
|
21389
21406
|
}
|
@@ -21395,48 +21412,53 @@ var require_assets = __commonJS({
|
|
21395
21412
|
type: "text",
|
21396
21413
|
text: contents2
|
21397
21414
|
};
|
21398
|
-
return messageRenderers["text"].render(
|
21415
|
+
return messageRenderers["text"].render(
|
21416
|
+
"text-message-content",
|
21417
|
+
contentText,
|
21418
|
+
true
|
21419
|
+
);
|
21399
21420
|
}
|
21400
21421
|
};
|
21401
21422
|
const messageRenderers = {
|
21402
21423
|
text: {
|
21403
|
-
render: (content2, isLast) => {
|
21424
|
+
render: (key2, content2, isLast) => {
|
21404
21425
|
const c2 = content2;
|
21405
21426
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
21406
21427
|
MarkdownDiv,
|
21407
21428
|
{
|
21408
21429
|
markdown: c2.text,
|
21409
21430
|
className: isLast ? "no-last-para-padding" : ""
|
21410
|
-
}
|
21431
|
+
},
|
21432
|
+
key2
|
21411
21433
|
);
|
21412
21434
|
}
|
21413
21435
|
},
|
21414
21436
|
image: {
|
21415
|
-
render: (content2) => {
|
21437
|
+
render: (key2, content2) => {
|
21416
21438
|
const c2 = content2;
|
21417
21439
|
if (c2.image.startsWith("data:")) {
|
21418
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: c2.image, className: styles$$.contentImage });
|
21440
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: c2.image, className: styles$$.contentImage }, key2);
|
21419
21441
|
} else {
|
21420
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("code", { children: c2.image });
|
21442
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("code", { children: c2.image }, key2);
|
21421
21443
|
}
|
21422
21444
|
}
|
21423
21445
|
},
|
21424
21446
|
audio: {
|
21425
|
-
render: (content2) => {
|
21447
|
+
render: (key2, content2) => {
|
21426
21448
|
const c2 = content2;
|
21427
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("audio", { controls: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx("source", { src: c2.audio, type: mimeTypeForFormat(c2.format) }) });
|
21449
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("audio", { controls: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx("source", { src: c2.audio, type: mimeTypeForFormat(c2.format) }) }, key2);
|
21428
21450
|
}
|
21429
21451
|
},
|
21430
21452
|
video: {
|
21431
|
-
render: (content2) => {
|
21453
|
+
render: (key2, content2) => {
|
21432
21454
|
const c2 = content2;
|
21433
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("video", { width: "500", height: "375", controls: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx("source", { src: c2.video, type: mimeTypeForFormat(c2.format) }) });
|
21455
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("video", { width: "500", height: "375", controls: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx("source", { src: c2.video, type: mimeTypeForFormat(c2.format) }) }, key2);
|
21434
21456
|
}
|
21435
21457
|
},
|
21436
21458
|
tool: {
|
21437
|
-
render: (content2) => {
|
21459
|
+
render: (key2, content2) => {
|
21438
21460
|
const c2 = content2;
|
21439
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(ToolOutput, { output: c2.content });
|
21461
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ToolOutput, { output: c2.content }, key2);
|
21440
21462
|
}
|
21441
21463
|
}
|
21442
21464
|
};
|
@@ -21456,23 +21478,17 @@ var require_assets = __commonJS({
|
|
21456
21478
|
};
|
21457
21479
|
const resolveToolInput = (fn, toolArgs) => {
|
21458
21480
|
const toolName = fn;
|
21459
|
-
const [inputKey,
|
21460
|
-
|
21461
|
-
|
21462
|
-
|
21463
|
-
|
21464
|
-
|
21465
|
-
|
21466
|
-
|
21467
|
-
|
21468
|
-
|
21469
|
-
|
21470
|
-
};
|
21471
|
-
} else {
|
21472
|
-
return {
|
21473
|
-
functionCall: toolName
|
21474
|
-
};
|
21475
|
-
}
|
21481
|
+
const [inputKey, highlightLanguage] = extractInputMetadata(toolName);
|
21482
|
+
const { input: input2, args } = extractInput(
|
21483
|
+
toolArgs,
|
21484
|
+
inputKey
|
21485
|
+
);
|
21486
|
+
const functionCall = args.length > 0 ? `${toolName}(${args.join(", ")})` : toolName;
|
21487
|
+
return {
|
21488
|
+
functionCall,
|
21489
|
+
input: input2,
|
21490
|
+
highlightLanguage
|
21491
|
+
};
|
21476
21492
|
};
|
21477
21493
|
const extractInputMetadata = (toolName) => {
|
21478
21494
|
if (toolName === "bash") {
|
@@ -21485,25 +21501,13 @@ var require_assets = __commonJS({
|
|
21485
21501
|
return [void 0, void 0];
|
21486
21502
|
}
|
21487
21503
|
};
|
21488
|
-
const extractInput = (
|
21504
|
+
const extractInput = (args, inputKey) => {
|
21489
21505
|
const formatArg = (key2, value2) => {
|
21490
|
-
const quotedValue = typeof value2 === "string" ? `"${value2}"` : value2;
|
21506
|
+
const quotedValue = typeof value2 === "string" ? `"${value2}"` : typeof value2 === "object" || Array.isArray(value2) ? JSON.stringify(value2, void 0, 2) : String(value2);
|
21491
21507
|
return `${key2}: ${quotedValue}`;
|
21492
21508
|
};
|
21493
21509
|
if (args) {
|
21494
|
-
if (
|
21495
|
-
const inputRaw = args[Object.keys(args)[0]];
|
21496
|
-
let input2;
|
21497
|
-
if (Array.isArray(inputRaw) || typeof inputRaw === "object") {
|
21498
|
-
input2 = JSON.stringify(inputRaw, void 0, 2);
|
21499
|
-
} else {
|
21500
|
-
input2 = String(inputRaw);
|
21501
|
-
}
|
21502
|
-
return {
|
21503
|
-
input: input2,
|
21504
|
-
args: []
|
21505
|
-
};
|
21506
|
-
} else if (args[inputKey]) {
|
21510
|
+
if (inputKey && args[inputKey]) {
|
21507
21511
|
const input2 = args[inputKey];
|
21508
21512
|
const filteredArgs = Object.keys(args).filter((key2) => {
|
21509
21513
|
return key2 !== inputKey;
|
@@ -21529,87 +21533,6 @@ var require_assets = __commonJS({
|
|
21529
21533
|
args: []
|
21530
21534
|
};
|
21531
21535
|
};
|
21532
|
-
var murmurhash$1 = { exports: {} };
|
21533
|
-
(function(module2) {
|
21534
|
-
(function() {
|
21535
|
-
const createBuffer = (val) => new TextEncoder().encode(val);
|
21536
|
-
function MurmurHashV2(str2, seed) {
|
21537
|
-
if (typeof str2 === "string") str2 = createBuffer(str2);
|
21538
|
-
let l = str2.length, h = seed ^ l, i2 = 0, k;
|
21539
|
-
while (l >= 4) {
|
21540
|
-
k = str2[i2] & 255 | (str2[++i2] & 255) << 8 | (str2[++i2] & 255) << 16 | (str2[++i2] & 255) << 24;
|
21541
|
-
k = (k & 65535) * 1540483477 + (((k >>> 16) * 1540483477 & 65535) << 16);
|
21542
|
-
k ^= k >>> 24;
|
21543
|
-
k = (k & 65535) * 1540483477 + (((k >>> 16) * 1540483477 & 65535) << 16);
|
21544
|
-
h = (h & 65535) * 1540483477 + (((h >>> 16) * 1540483477 & 65535) << 16) ^ k;
|
21545
|
-
l -= 4;
|
21546
|
-
++i2;
|
21547
|
-
}
|
21548
|
-
switch (l) {
|
21549
|
-
case 3:
|
21550
|
-
h ^= (str2[i2 + 2] & 255) << 16;
|
21551
|
-
case 2:
|
21552
|
-
h ^= (str2[i2 + 1] & 255) << 8;
|
21553
|
-
case 1:
|
21554
|
-
h ^= str2[i2] & 255;
|
21555
|
-
h = (h & 65535) * 1540483477 + (((h >>> 16) * 1540483477 & 65535) << 16);
|
21556
|
-
}
|
21557
|
-
h ^= h >>> 13;
|
21558
|
-
h = (h & 65535) * 1540483477 + (((h >>> 16) * 1540483477 & 65535) << 16);
|
21559
|
-
h ^= h >>> 15;
|
21560
|
-
return h >>> 0;
|
21561
|
-
}
|
21562
|
-
function MurmurHashV3(key2, seed) {
|
21563
|
-
if (typeof key2 === "string") key2 = createBuffer(key2);
|
21564
|
-
let remainder, bytes, h1, h1b, c1, c2, k1, i2;
|
21565
|
-
remainder = key2.length & 3;
|
21566
|
-
bytes = key2.length - remainder;
|
21567
|
-
h1 = seed;
|
21568
|
-
c1 = 3432918353;
|
21569
|
-
c2 = 461845907;
|
21570
|
-
i2 = 0;
|
21571
|
-
while (i2 < bytes) {
|
21572
|
-
k1 = key2[i2] & 255 | (key2[++i2] & 255) << 8 | (key2[++i2] & 255) << 16 | (key2[++i2] & 255) << 24;
|
21573
|
-
++i2;
|
21574
|
-
k1 = (k1 & 65535) * c1 + (((k1 >>> 16) * c1 & 65535) << 16) & 4294967295;
|
21575
|
-
k1 = k1 << 15 | k1 >>> 17;
|
21576
|
-
k1 = (k1 & 65535) * c2 + (((k1 >>> 16) * c2 & 65535) << 16) & 4294967295;
|
21577
|
-
h1 ^= k1;
|
21578
|
-
h1 = h1 << 13 | h1 >>> 19;
|
21579
|
-
h1b = (h1 & 65535) * 5 + (((h1 >>> 16) * 5 & 65535) << 16) & 4294967295;
|
21580
|
-
h1 = (h1b & 65535) + 27492 + (((h1b >>> 16) + 58964 & 65535) << 16);
|
21581
|
-
}
|
21582
|
-
k1 = 0;
|
21583
|
-
switch (remainder) {
|
21584
|
-
case 3:
|
21585
|
-
k1 ^= (key2[i2 + 2] & 255) << 16;
|
21586
|
-
case 2:
|
21587
|
-
k1 ^= (key2[i2 + 1] & 255) << 8;
|
21588
|
-
case 1:
|
21589
|
-
k1 ^= key2[i2] & 255;
|
21590
|
-
k1 = (k1 & 65535) * c1 + (((k1 >>> 16) * c1 & 65535) << 16) & 4294967295;
|
21591
|
-
k1 = k1 << 15 | k1 >>> 17;
|
21592
|
-
k1 = (k1 & 65535) * c2 + (((k1 >>> 16) * c2 & 65535) << 16) & 4294967295;
|
21593
|
-
h1 ^= k1;
|
21594
|
-
}
|
21595
|
-
h1 ^= key2.length;
|
21596
|
-
h1 ^= h1 >>> 16;
|
21597
|
-
h1 = (h1 & 65535) * 2246822507 + (((h1 >>> 16) * 2246822507 & 65535) << 16) & 4294967295;
|
21598
|
-
h1 ^= h1 >>> 13;
|
21599
|
-
h1 = (h1 & 65535) * 3266489909 + (((h1 >>> 16) * 3266489909 & 65535) << 16) & 4294967295;
|
21600
|
-
h1 ^= h1 >>> 16;
|
21601
|
-
return h1 >>> 0;
|
21602
|
-
}
|
21603
|
-
const murmur = MurmurHashV3;
|
21604
|
-
murmur.v2 = MurmurHashV2;
|
21605
|
-
murmur.v3 = MurmurHashV3;
|
21606
|
-
{
|
21607
|
-
module2.exports = murmur;
|
21608
|
-
}
|
21609
|
-
})();
|
21610
|
-
})(murmurhash$1);
|
21611
|
-
var murmurhashExports = murmurhash$1.exports;
|
21612
|
-
const murmurhash = /* @__PURE__ */ getDefaultExportFromCjs(murmurhashExports);
|
21613
21536
|
const outputPre = "_outputPre_18agr_1";
|
21614
21537
|
const outputCode = "_outputCode_18agr_7";
|
21615
21538
|
const bottomMargin = "_bottomMargin_18agr_12";
|
@@ -21618,71 +21541,58 @@ var require_assets = __commonJS({
|
|
21618
21541
|
outputCode,
|
21619
21542
|
bottomMargin
|
21620
21543
|
};
|
21621
|
-
const
|
21622
|
-
|
21623
|
-
|
21624
|
-
|
21625
|
-
|
21626
|
-
|
21627
|
-
|
21628
|
-
|
21629
|
-
|
21544
|
+
const useCodeHighlight = (language2) => {
|
21545
|
+
const codeRef = reactExports.useRef(null);
|
21546
|
+
reactExports.useEffect(() => {
|
21547
|
+
if (codeRef.current && language2) {
|
21548
|
+
prismExports.highlightElement(codeRef.current);
|
21549
|
+
}
|
21550
|
+
}, [language2]);
|
21551
|
+
return codeRef;
|
21552
|
+
};
|
21553
|
+
const ToolInput = reactExports.memo((props) => {
|
21554
|
+
const { highlightLanguage, contents: contents2, toolCallView } = props;
|
21555
|
+
const codeRef = useCodeHighlight(highlightLanguage);
|
21556
|
+
if (!contents2 && !(toolCallView == null ? void 0 : toolCallView.content)) return null;
|
21557
|
+
if (toolCallView) {
|
21630
21558
|
const toolViewRef = reactExports.useRef(null);
|
21631
21559
|
reactExports.useEffect(() => {
|
21632
|
-
if (toolViewRef.current) {
|
21633
|
-
|
21634
|
-
|
21635
|
-
|
21636
|
-
if (
|
21637
|
-
|
21638
|
-
|
21639
|
-
);
|
21640
|
-
if (hasLanguageClass) {
|
21641
|
-
child.classList.add("tool-output");
|
21642
|
-
prismExports.highlightElement(childChild);
|
21643
|
-
}
|
21560
|
+
if ((toolCallView == null ? void 0 : toolCallView.content) && toolViewRef.current) {
|
21561
|
+
requestAnimationFrame(() => {
|
21562
|
+
const codeBlocks = toolViewRef.current.querySelectorAll("pre code");
|
21563
|
+
codeBlocks.forEach((block2) => {
|
21564
|
+
if (block2.className.includes("language-")) {
|
21565
|
+
block2.classList.add("sourceCode");
|
21566
|
+
prismExports.highlightElement(block2);
|
21644
21567
|
}
|
21645
|
-
}
|
21646
|
-
}
|
21568
|
+
});
|
21569
|
+
});
|
21647
21570
|
}
|
21648
|
-
}, [
|
21571
|
+
}, [toolCallView == null ? void 0 : toolCallView.content]);
|
21649
21572
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
21650
21573
|
MarkdownDiv,
|
21651
21574
|
{
|
21652
|
-
markdown:
|
21575
|
+
markdown: toolCallView.content,
|
21653
21576
|
ref: toolViewRef,
|
21654
|
-
className: clsx(styles$Z.bottomMargin)
|
21655
|
-
}
|
21656
|
-
);
|
21657
|
-
} else {
|
21658
|
-
const toolInputRef = reactExports.useRef(null);
|
21659
|
-
reactExports.useEffect(() => {
|
21660
|
-
if (type) {
|
21661
|
-
const tokens = prismExports.languages[type];
|
21662
|
-
if (toolInputRef.current && tokens) {
|
21663
|
-
prismExports.highlightElement(toolInputRef.current);
|
21664
|
-
}
|
21665
|
-
}
|
21666
|
-
}, [contents2, type, view]);
|
21667
|
-
contents2 = typeof contents2 === "object" || Array.isArray(contents2) ? JSON.stringify(contents2) : contents2;
|
21668
|
-
const key2 = murmurhash.v3(contents2 || "");
|
21669
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
21670
|
-
"pre",
|
21671
|
-
{
|
21672
|
-
className: clsx("tool-output", styles$Z.outputPre, styles$Z.bottomMargin),
|
21673
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
21674
|
-
"code",
|
21675
|
-
{
|
21676
|
-
ref: toolInputRef,
|
21677
|
-
className: clsx("source-code", `language-${type}`, styles$Z.outputCode),
|
21678
|
-
children: contents2
|
21679
|
-
},
|
21680
|
-
key2
|
21681
|
-
)
|
21577
|
+
className: clsx(styles$Z.bottomMargin, "text-size-small")
|
21682
21578
|
}
|
21683
21579
|
);
|
21684
21580
|
}
|
21685
|
-
|
21581
|
+
const formattedContent = typeof contents2 === "object" ? JSON.stringify(contents2) : contents2;
|
21582
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: clsx("tool-output", styles$Z.outputPre, styles$Z.bottomMargin), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
21583
|
+
"code",
|
21584
|
+
{
|
21585
|
+
ref: codeRef,
|
21586
|
+
className: clsx(
|
21587
|
+
"source-code",
|
21588
|
+
"sourceCode",
|
21589
|
+
`language-${highlightLanguage}`,
|
21590
|
+
styles$Z.outputCode
|
21591
|
+
),
|
21592
|
+
children: formattedContent
|
21593
|
+
}
|
21594
|
+
) });
|
21595
|
+
});
|
21686
21596
|
const image = "_image_10saa_1";
|
21687
21597
|
const styles$Y = {
|
21688
21598
|
image
|
@@ -21696,7 +21606,7 @@ var require_assets = __commonJS({
|
|
21696
21606
|
const ToolCallView = ({
|
21697
21607
|
functionCall,
|
21698
21608
|
input: input2,
|
21699
|
-
|
21609
|
+
highlightLanguage,
|
21700
21610
|
view,
|
21701
21611
|
output: output2,
|
21702
21612
|
mode
|
@@ -21714,11 +21624,19 @@ var require_assets = __commonJS({
|
|
21714
21624
|
return false;
|
21715
21625
|
}
|
21716
21626
|
const collapse = Array.isArray(output2) ? output2.every((item2) => !isContentImage(item2)) : !isContentImage(output2);
|
21627
|
+
const normalizedContent = reactExports.useMemo(() => normalizeContent$1(output2), [output2]);
|
21717
21628
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
21718
21629
|
mode !== "compact" && (!view || view.title) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ToolTitle, { title: (view == null ? void 0 : view.title) || functionCall }) : "",
|
21719
21630
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
21720
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
21721
|
-
|
21631
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
21632
|
+
ToolInput,
|
21633
|
+
{
|
21634
|
+
highlightLanguage,
|
21635
|
+
contents: input2,
|
21636
|
+
toolCallView: view
|
21637
|
+
}
|
21638
|
+
),
|
21639
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ExpandablePanel, { collapse, border: true, lines: 15, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageContent, { contents: normalizedContent }) })
|
21722
21640
|
] }) })
|
21723
21641
|
] });
|
21724
21642
|
};
|
@@ -21749,14 +21667,8 @@ var require_assets = __commonJS({
|
|
21749
21667
|
toolCallStyle
|
21750
21668
|
}) => {
|
21751
21669
|
if (message2.role === "assistant" && message2.tool_calls && message2.tool_calls.length) {
|
21752
|
-
const result = [];
|
21753
|
-
if (message2.content) {
|
21754
|
-
result.push(
|
21755
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$X.content, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageContent, { contents: message2.content }) })
|
21756
|
-
);
|
21757
|
-
}
|
21758
21670
|
const toolCalls = message2.tool_calls.map((tool_call, idx) => {
|
21759
|
-
const { input: input2, functionCall,
|
21671
|
+
const { input: input2, functionCall, highlightLanguage } = resolveToolInput(
|
21760
21672
|
tool_call.function,
|
21761
21673
|
tool_call.arguments
|
21762
21674
|
);
|
@@ -21770,26 +21682,27 @@ var require_assets = __commonJS({
|
|
21770
21682
|
}
|
21771
21683
|
const resolvedToolOutput = resolveToolMessage(toolMessage);
|
21772
21684
|
if (toolCallStyle === "compact") {
|
21773
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("code", { children: [
|
21685
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("code", { children: [
|
21774
21686
|
"tool: ",
|
21775
21687
|
functionCall
|
21776
|
-
] });
|
21688
|
+
] }) }, `tool-call-${idx}`);
|
21777
21689
|
} else {
|
21778
21690
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
21779
21691
|
ToolCallView,
|
21780
21692
|
{
|
21781
21693
|
functionCall,
|
21782
21694
|
input: input2,
|
21783
|
-
|
21695
|
+
highlightLanguage,
|
21784
21696
|
output: resolvedToolOutput
|
21785
|
-
}
|
21697
|
+
},
|
21698
|
+
`tool-call-${idx}`
|
21786
21699
|
);
|
21787
21700
|
}
|
21788
21701
|
});
|
21789
|
-
|
21790
|
-
|
21791
|
-
|
21792
|
-
|
21702
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [
|
21703
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$X.content, children: message2.content ? /* @__PURE__ */ jsxRuntimeExports.jsx(MessageContent, { contents: message2.content }) : void 0 }),
|
21704
|
+
toolCalls
|
21705
|
+
] });
|
21793
21706
|
} else {
|
21794
21707
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(MessageContent, { contents: message2.content });
|
21795
21708
|
}
|
@@ -21923,7 +21836,7 @@ var require_assets = __commonJS({
|
|
21923
21836
|
message2.role === "assistant" && message2.reasoning ? /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [
|
21924
21837
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-style-label", "text-style-secondary"), children: "Reasoning" }),
|
21925
21838
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ExpandablePanel, { collapse: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MarkdownDiv, { markdown: message2.reasoning }) })
|
21926
|
-
] }) : void 0,
|
21839
|
+
] }, `${id}-response-label`) : void 0,
|
21927
21840
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
21928
21841
|
"div",
|
21929
21842
|
{
|
@@ -22018,7 +21931,8 @@ var require_assets = __commonJS({
|
|
22018
21931
|
resolvedMessage: msg,
|
22019
21932
|
indented: indented2,
|
22020
21933
|
toolCallStyle
|
22021
|
-
}
|
21934
|
+
},
|
21935
|
+
`${id}-msg-${index2}`
|
22022
21936
|
);
|
22023
21937
|
}) });
|
22024
21938
|
return result;
|
@@ -22093,7 +22007,7 @@ var require_assets = __commonJS({
|
|
22093
22007
|
}
|
22094
22008
|
),
|
22095
22009
|
/* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: clsx(styles$V.cell, styles$V.cellValue, "text-size-small"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(RenderedContent, { id: id2, entry: entry2 }) })
|
22096
|
-
] });
|
22010
|
+
] }, id2);
|
22097
22011
|
});
|
22098
22012
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
22099
22013
|
"table",
|
@@ -22232,7 +22146,7 @@ var require_assets = __commonJS({
|
|
22232
22146
|
const isArray = Array.isArray(entry2.value);
|
22233
22147
|
if (isArray) {
|
22234
22148
|
const types2 = new Set(
|
22235
|
-
entry2.value.map((e) => {
|
22149
|
+
entry2.value.filter((e) => e !== null).map((e) => {
|
22236
22150
|
return typeof e;
|
22237
22151
|
})
|
22238
22152
|
);
|
@@ -22329,15 +22243,7 @@ var require_assets = __commonJS({
|
|
22329
22243
|
return typeof entry2.value === "object";
|
22330
22244
|
},
|
22331
22245
|
render: (id, entry2) => {
|
22332
|
-
|
22333
|
-
const keys = Object.keys(entry2.value);
|
22334
|
-
if (keys.length > 4) {
|
22335
|
-
summary2.push(...keys.slice(0, 2));
|
22336
|
-
summary2.push("...");
|
22337
|
-
summary2.push(...keys.slice(keys.length - 2));
|
22338
|
-
} else {
|
22339
|
-
summary2.push(...keys);
|
22340
|
-
}
|
22246
|
+
console.log({ entry: entry2 });
|
22341
22247
|
return {
|
22342
22248
|
rendered: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
22343
22249
|
MetaDataView,
|
@@ -22598,8 +22504,10 @@ var require_assets = __commonJS({
|
|
22598
22504
|
const scoreRendered = (sample2, scoreLabel) => {
|
22599
22505
|
const descriptor = scoreDescriptor(scoreLabel);
|
22600
22506
|
const score22 = scoreValue2(sample2, scoreLabel);
|
22601
|
-
if (score22 === null
|
22507
|
+
if (score22 === null) {
|
22602
22508
|
return "null";
|
22509
|
+
} else if (score22 === void 0) {
|
22510
|
+
return "";
|
22603
22511
|
} else if (score22 && descriptor && descriptor.render) {
|
22604
22512
|
return descriptor.render(score22);
|
22605
22513
|
} else {
|
@@ -25410,7 +25318,7 @@ categories: ${categories.join(" ")}`;
|
|
25410
25318
|
setSort(sel.value);
|
25411
25319
|
},
|
25412
25320
|
children: options2.map((option) => {
|
25413
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: option.val, children: option.label });
|
25321
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: option.val, children: option.label }, option.val);
|
25414
25322
|
})
|
25415
25323
|
}
|
25416
25324
|
)
|
@@ -25617,6 +25525,28 @@ categories: ${categories.join(" ")}`;
|
|
25617
25525
|
running,
|
25618
25526
|
cancelled
|
25619
25527
|
};
|
25528
|
+
const metricDisplayName = (metric2) => {
|
25529
|
+
let modifier = void 0;
|
25530
|
+
for (const metricModifier of metricModifiers) {
|
25531
|
+
modifier = metricModifier(metric2);
|
25532
|
+
if (modifier) {
|
25533
|
+
break;
|
25534
|
+
}
|
25535
|
+
}
|
25536
|
+
const metricName2 = !modifier ? metric2.name : `${metric2.name}[${modifier}]`;
|
25537
|
+
return metricName2;
|
25538
|
+
};
|
25539
|
+
const clusterMetricModifier = (metric2) => {
|
25540
|
+
if (metric2.name !== "stderr") {
|
25541
|
+
return void 0;
|
25542
|
+
}
|
25543
|
+
const clusterValue = (metric2.params || {})["cluster"];
|
25544
|
+
if (clusterValue === void 0 || typeof clusterValue !== "string") {
|
25545
|
+
return void 0;
|
25546
|
+
}
|
25547
|
+
return clusterValue;
|
25548
|
+
};
|
25549
|
+
const metricModifiers = [clusterMetricModifier];
|
25620
25550
|
const container$c = "_container_1frsg_1";
|
25621
25551
|
const metric = "_metric_1frsg_8";
|
25622
25552
|
const metricName$1 = "_metricName_1frsg_17";
|
@@ -25628,6 +25558,7 @@ categories: ${categories.join(" ")}`;
|
|
25628
25558
|
metricReducer: metricReducer$1
|
25629
25559
|
};
|
25630
25560
|
const SidebarScoreView = ({ scorer }) => {
|
25561
|
+
const showReducer = !!scorer.reducer;
|
25631
25562
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$O.container, children: Object.keys(scorer.metrics).map((metric2) => {
|
25632
25563
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$O.metric, children: [
|
25633
25564
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -25639,15 +25570,12 @@ categories: ${categories.join(" ")}`;
|
|
25639
25570
|
"text-size-small",
|
25640
25571
|
styles$O.metricName
|
25641
25572
|
),
|
25642
|
-
children: scorer.metrics[metric2]
|
25573
|
+
children: metricDisplayName(scorer.metrics[metric2])
|
25643
25574
|
}
|
25644
25575
|
),
|
25645
|
-
|
25646
|
-
"$",
|
25647
|
-
scorer.reducer
|
25648
|
-
] }) : "",
|
25576
|
+
showReducer ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-size-small", styles$O.metricReducer), children: scorer.reducer || "default" }) : "",
|
25649
25577
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-size-title-secondary", children: formatPrettyDecimal(scorer.metrics[metric2].value) })
|
25650
|
-
] });
|
25578
|
+
] }, metric2);
|
25651
25579
|
}) });
|
25652
25580
|
};
|
25653
25581
|
const container$b = "_container_5kpg1_1";
|
@@ -25665,7 +25593,8 @@ categories: ${categories.join(" ")}`;
|
|
25665
25593
|
metricValue
|
25666
25594
|
};
|
25667
25595
|
const SidebarScoresView = ({ scores: scores2 }) => {
|
25668
|
-
|
25596
|
+
const showReducer = scores2.findIndex((score2) => !!score2.reducer) !== -1;
|
25597
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$N.container, children: scores2.map((score2, idx) => {
|
25669
25598
|
const name2 = score2.name;
|
25670
25599
|
const reducer = score2.reducer;
|
25671
25600
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$N.scoreWrapper, children: [
|
@@ -25674,31 +25603,33 @@ categories: ${categories.join(" ")}`;
|
|
25674
25603
|
{
|
25675
25604
|
className: clsx(
|
25676
25605
|
"text-style-secondary",
|
25677
|
-
"text-label",
|
25606
|
+
"text-style-label",
|
25678
25607
|
"text-size-small",
|
25679
25608
|
styles$N.metricName
|
25680
25609
|
),
|
25681
25610
|
children: name2
|
25682
25611
|
}
|
25683
25612
|
),
|
25684
|
-
|
25613
|
+
showReducer ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
25614
|
+
"div",
|
25615
|
+
{
|
25616
|
+
className: clsx(
|
25617
|
+
"text-size-small",
|
25618
|
+
"text-style-label",
|
25619
|
+
"text-style-secondary",
|
25620
|
+
styles$N.metricReducer
|
25621
|
+
),
|
25622
|
+
children: reducer || "default"
|
25623
|
+
}
|
25624
|
+
) : "",
|
25685
25625
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-size-small", styles$N.metricValues), children: Object.keys(score2.metrics).map((key2) => {
|
25686
25626
|
const metric2 = score2.metrics[key2];
|
25687
25627
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [
|
25688
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
25689
|
-
"div",
|
25690
|
-
{
|
25691
|
-
className: clsx(
|
25692
|
-
"text-style-secondary",
|
25693
|
-
"text-style-label"
|
25694
|
-
),
|
25695
|
-
children: metric2.name
|
25696
|
-
}
|
25697
|
-
),
|
25628
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(), children: metricDisplayName(metric2) }),
|
25698
25629
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$N.metricValue, children: formatPrettyDecimal(metric2.value) })
|
25699
25630
|
] }, key2);
|
25700
25631
|
}) })
|
25701
|
-
] });
|
25632
|
+
] }, `scorer-${name2}-${idx}`);
|
25702
25633
|
}) });
|
25703
25634
|
};
|
25704
25635
|
const EvalStatus = ({ logHeader }) => {
|
@@ -46359,33 +46290,6 @@ Supported expressions:
|
|
46359
46290
|
const scorerScores = scores2.filter((sc) => {
|
46360
46291
|
return score2 && sc.scorer === score2.scorer;
|
46361
46292
|
});
|
46362
|
-
const selectors = [
|
46363
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
46364
|
-
ScorerSelector,
|
46365
|
-
{
|
46366
|
-
scorers,
|
46367
|
-
selectedIndex: scorerIndex(scorers, score2),
|
46368
|
-
setSelectedIndex: (index2) => {
|
46369
|
-
setScore(scorers[index2]);
|
46370
|
-
}
|
46371
|
-
}
|
46372
|
-
)
|
46373
|
-
];
|
46374
|
-
if (scorerScores.length > 1) {
|
46375
|
-
selectors.push(
|
46376
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
46377
|
-
ScoreSelector,
|
46378
|
-
{
|
46379
|
-
className: clsx(styles$J.secondSel),
|
46380
|
-
scores: scorerScores,
|
46381
|
-
selectedIndex: scoreIndex(scorerScores, score2),
|
46382
|
-
setSelectedIndex: (index2) => {
|
46383
|
-
setScore(scorerScores[index2]);
|
46384
|
-
}
|
46385
|
-
}
|
46386
|
-
)
|
46387
|
-
);
|
46388
|
-
}
|
46389
46293
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$J.flex, children: [
|
46390
46294
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
46391
46295
|
"span",
|
@@ -46401,7 +46305,27 @@ Supported expressions:
|
|
46401
46305
|
children: "Scorer:"
|
46402
46306
|
}
|
46403
46307
|
),
|
46404
|
-
|
46308
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
46309
|
+
ScorerSelector,
|
46310
|
+
{
|
46311
|
+
scorers,
|
46312
|
+
selectedIndex: scorerIndex(scorers, score2),
|
46313
|
+
setSelectedIndex: (index2) => {
|
46314
|
+
setScore(scorers[index2]);
|
46315
|
+
}
|
46316
|
+
}
|
46317
|
+
),
|
46318
|
+
scorerScores.length > 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
46319
|
+
ScoreSelector,
|
46320
|
+
{
|
46321
|
+
className: clsx(styles$J.secondSel),
|
46322
|
+
scores: scorerScores,
|
46323
|
+
selectedIndex: scoreIndex(scorerScores, score2),
|
46324
|
+
setSelectedIndex: (index2) => {
|
46325
|
+
setScore(scorerScores[index2]);
|
46326
|
+
}
|
46327
|
+
}
|
46328
|
+
) : void 0
|
46405
46329
|
] });
|
46406
46330
|
}
|
46407
46331
|
};
|
@@ -46427,7 +46351,7 @@ Supported expressions:
|
|
46427
46351
|
setSelectedIndex(sel.selectedIndex);
|
46428
46352
|
},
|
46429
46353
|
children: scores2.map((score2) => {
|
46430
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: score2.name, children: score2.name });
|
46354
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: score2.name, children: score2.name }, score2.name);
|
46431
46355
|
})
|
46432
46356
|
}
|
46433
46357
|
);
|
@@ -46448,7 +46372,7 @@ Supported expressions:
|
|
46448
46372
|
setSelectedIndex(sel.selectedIndex);
|
46449
46373
|
},
|
46450
46374
|
children: scorers.map((scorer) => {
|
46451
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: scorer.scorer, children: scorer.scorer });
|
46375
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: scorer.scorer, children: scorer.scorer }, scorer.scorer);
|
46452
46376
|
})
|
46453
46377
|
}
|
46454
46378
|
);
|
@@ -46472,8 +46396,7 @@ Supported expressions:
|
|
46472
46396
|
scores: scores2,
|
46473
46397
|
sampleDescriptor
|
46474
46398
|
}) => {
|
46475
|
-
|
46476
|
-
tools2.push(
|
46399
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
46477
46400
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
46478
46401
|
SampleFilter,
|
46479
46402
|
{
|
@@ -46481,20 +46404,11 @@ Supported expressions:
|
|
46481
46404
|
scoreFilter,
|
46482
46405
|
setScoreFilter
|
46483
46406
|
}
|
46484
|
-
)
|
46485
|
-
|
46486
|
-
|
46487
|
-
|
46488
|
-
|
46489
|
-
);
|
46490
|
-
}
|
46491
|
-
if (epochs > 1) {
|
46492
|
-
tools2.push(
|
46493
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(EpochFilter, { epoch, setEpoch, epochs })
|
46494
|
-
);
|
46495
|
-
}
|
46496
|
-
tools2.push(/* @__PURE__ */ jsxRuntimeExports.jsx(SortFilter, { sort, setSort, epochs }));
|
46497
|
-
return tools2;
|
46407
|
+
),
|
46408
|
+
scores2.length > 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(SelectScorer, { scores: scores2, score: score2, setScore }) : void 0,
|
46409
|
+
epochs > 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(EpochFilter, { epoch, setEpoch, epochs }) : void 0,
|
46410
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SortFilter, { sort, setSort, epochs })
|
46411
|
+
] });
|
46498
46412
|
};
|
46499
46413
|
const filename = (path) => {
|
46500
46414
|
const pathparts = path.split("/");
|
@@ -48822,7 +48736,6 @@ self.onmessage = function (e) {
|
|
48822
48736
|
if (remoteZipFile.centralDirectory.has(sampleFile)) {
|
48823
48737
|
return await readJSONFile(sampleFile, MAX_BYTES);
|
48824
48738
|
} else {
|
48825
|
-
console.log({ dir: remoteZipFile.centralDirectory });
|
48826
48739
|
throw new Error(
|
48827
48740
|
`Unable to read sample file ${sampleFile} - it is not present in the manifest.`
|
48828
48741
|
);
|
@@ -49297,7 +49210,7 @@ self.onmessage = function (e) {
|
|
49297
49210
|
tools: tools2,
|
49298
49211
|
children: children2
|
49299
49212
|
}) => {
|
49300
|
-
const validTabs =
|
49213
|
+
const validTabs = flattenChildren(children2);
|
49301
49214
|
if (validTabs.length === 0) return null;
|
49302
49215
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [
|
49303
49216
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
@@ -49411,6 +49324,18 @@ self.onmessage = function (e) {
|
|
49411
49324
|
const TabTools = ({ tools: tools2 }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("tab-tools", moduleStyles.tabTools), children: tools2 });
|
49412
49325
|
const computeTabId = (id, index2) => `${id}-${index2}`;
|
49413
49326
|
const computeTabContentsId = (id) => `${id}-contents`;
|
49327
|
+
const flattenChildren = (children2) => {
|
49328
|
+
return reactExports.Children.toArray(children2).flatMap((child) => {
|
49329
|
+
if (reactExports.isValidElement(child)) {
|
49330
|
+
const element = child;
|
49331
|
+
if (element.type === reactExports.Fragment) {
|
49332
|
+
return flattenChildren(element.props.children);
|
49333
|
+
}
|
49334
|
+
return element;
|
49335
|
+
}
|
49336
|
+
return [];
|
49337
|
+
});
|
49338
|
+
};
|
49414
49339
|
function escapeSelector(id) {
|
49415
49340
|
return id.replace(/([ #.;,?!+*~'":^$[\]()=>|/\\])/g, "\\$1");
|
49416
49341
|
}
|
@@ -49489,7 +49414,7 @@ self.onmessage = function (e) {
|
|
49489
49414
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(RenderedContent, { id: id2, entry: entry2 })
|
49490
49415
|
}
|
49491
49416
|
)
|
49492
|
-
] });
|
49417
|
+
] }, `${baseId}-record-${index2}`);
|
49493
49418
|
});
|
49494
49419
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id, className: clsx(className2, styles$H.grid), style: style2, children: entryEls });
|
49495
49420
|
};
|
@@ -49527,17 +49452,17 @@ self.onmessage = function (e) {
|
|
49527
49452
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$G.grid, children: rows });
|
49528
49453
|
}
|
49529
49454
|
};
|
49530
|
-
const container$9 = "
|
49531
|
-
const label$1 = "
|
49532
|
-
const wordBreak = "
|
49533
|
-
const scoreTable = "
|
49534
|
-
const bottomBorder = "
|
49535
|
-
const headerScore = "
|
49536
|
-
const targetValue = "
|
49537
|
-
const answerValue = "
|
49538
|
-
const scoreValue = "
|
49539
|
-
const noLeft$1 = "
|
49540
|
-
const noTop$1 = "
|
49455
|
+
const container$9 = "_container_1jqar_1";
|
49456
|
+
const label$1 = "_label_1jqar_6";
|
49457
|
+
const wordBreak = "_wordBreak_1jqar_14";
|
49458
|
+
const scoreTable = "_scoreTable_1jqar_18";
|
49459
|
+
const bottomBorder = "_bottomBorder_1jqar_23";
|
49460
|
+
const headerScore = "_headerScore_1jqar_27";
|
49461
|
+
const targetValue = "_targetValue_1jqar_31";
|
49462
|
+
const answerValue = "_answerValue_1jqar_37";
|
49463
|
+
const scoreValue = "_scoreValue_1jqar_42";
|
49464
|
+
const noLeft$1 = "_noLeft_1jqar_47";
|
49465
|
+
const noTop$1 = "_noTop_1jqar_51";
|
49541
49466
|
const styles$F = {
|
49542
49467
|
container: container$9,
|
49543
49468
|
label: label$1,
|
@@ -49753,9 +49678,9 @@ self.onmessage = function (e) {
|
|
49753
49678
|
value: usage.total_tokens,
|
49754
49679
|
secondary: false
|
49755
49680
|
});
|
49756
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-size-small", styles$E.wrapper), children: rows.map((row2) => {
|
49681
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-size-small", styles$E.wrapper), children: rows.map((row2, idx) => {
|
49757
49682
|
if (row2.label === "---") {
|
49758
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$E.separator });
|
49683
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$E.separator }, `$usage-sep-${idx}`);
|
49759
49684
|
} else {
|
49760
49685
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [
|
49761
49686
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -49770,7 +49695,7 @@ self.onmessage = function (e) {
|
|
49770
49695
|
}
|
49771
49696
|
),
|
49772
49697
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$E.col3, children: row2.value ? formatNumber(row2.value) : "" })
|
49773
|
-
] });
|
49698
|
+
] }, `$usage-row-${idx}`);
|
49774
49699
|
}
|
49775
49700
|
}) });
|
49776
49701
|
};
|
@@ -49863,7 +49788,14 @@ self.onmessage = function (e) {
|
|
49863
49788
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(TokenTable, { className: className2, children: [
|
49864
49789
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TokenHeader, {}),
|
49865
49790
|
/* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { children: Object.keys(model_usage).map((key2) => {
|
49866
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
49791
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
49792
|
+
TokenRow,
|
49793
|
+
{
|
49794
|
+
model: `${key2}-token-row`,
|
49795
|
+
usage: model_usage[key2]
|
49796
|
+
},
|
49797
|
+
key2
|
49798
|
+
);
|
49867
49799
|
}) })
|
49868
49800
|
] });
|
49869
49801
|
};
|
@@ -50307,7 +50239,7 @@ self.onmessage = function (e) {
|
|
50307
50239
|
}).join(" ")}`
|
50308
50240
|
},
|
50309
50241
|
children: [
|
50310
|
-
columns.map((col) => {
|
50242
|
+
columns.map((col, idx) => {
|
50311
50243
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
50312
50244
|
"div",
|
50313
50245
|
{
|
@@ -50318,10 +50250,11 @@ self.onmessage = function (e) {
|
|
50318
50250
|
col.center ? styles$y.centerLabel : void 0
|
50319
50251
|
),
|
50320
50252
|
children: col.label
|
50321
|
-
}
|
50253
|
+
},
|
50254
|
+
`sample-summ-lbl-${idx}`
|
50322
50255
|
);
|
50323
50256
|
}),
|
50324
|
-
columns.map((col) => {
|
50257
|
+
columns.map((col, idx) => {
|
50325
50258
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
50326
50259
|
"div",
|
50327
50260
|
{
|
@@ -50331,7 +50264,8 @@ self.onmessage = function (e) {
|
|
50331
50264
|
col.center ? styles$y.centerLabel : void 0
|
50332
50265
|
),
|
50333
50266
|
children: col.value
|
50334
|
-
}
|
50267
|
+
},
|
50268
|
+
`sample-summ-val-${idx}`
|
50335
50269
|
);
|
50336
50270
|
})
|
50337
50271
|
]
|
@@ -50459,7 +50393,8 @@ self.onmessage = function (e) {
|
|
50459
50393
|
title: nav2.title,
|
50460
50394
|
selectedNav,
|
50461
50395
|
setSelectedNav
|
50462
|
-
}
|
50396
|
+
},
|
50397
|
+
nav2.title
|
50463
50398
|
);
|
50464
50399
|
})
|
50465
50400
|
}
|
@@ -50611,7 +50546,8 @@ self.onmessage = function (e) {
|
|
50611
50546
|
id: id2,
|
50612
50547
|
className: clsx("tab-pane", "show", isSelected ? "active" : ""),
|
50613
50548
|
children: child
|
50614
|
-
}
|
50549
|
+
},
|
50550
|
+
`children-${id2}-${index2}`
|
50615
50551
|
);
|
50616
50552
|
})
|
50617
50553
|
}
|
@@ -50676,7 +50612,7 @@ self.onmessage = function (e) {
|
|
50676
50612
|
EventPanel,
|
50677
50613
|
{
|
50678
50614
|
id,
|
50679
|
-
title: "Info",
|
50615
|
+
title: "Info" + (event.source ? ": " + event.source : ""),
|
50680
50616
|
className: className2,
|
50681
50617
|
subTitle: formatDateTime(new Date(event.timestamp)),
|
50682
50618
|
icon: ApplicationIcons.info,
|
@@ -50918,11 +50854,11 @@ self.onmessage = function (e) {
|
|
50918
50854
|
) }) });
|
50919
50855
|
};
|
50920
50856
|
const ToolsConfig = ({ tools: tools2 }) => {
|
50921
|
-
const toolEls = tools2.map((tool2) => {
|
50857
|
+
const toolEls = tools2.map((tool2, idx) => {
|
50922
50858
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [
|
50923
50859
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-style-label", "text-style-secondary"), children: tool2.name }),
|
50924
50860
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: tool2.description })
|
50925
|
-
] });
|
50861
|
+
] }, `${tool2.name}-${idx}`);
|
50926
50862
|
});
|
50927
50863
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$q.toolConfig, children: toolEls });
|
50928
50864
|
};
|
@@ -50950,13 +50886,13 @@ self.onmessage = function (e) {
|
|
50950
50886
|
if (event.sample.files && Object.keys(event.sample.files).length > 0) {
|
50951
50887
|
sections.push(
|
50952
50888
|
/* @__PURE__ */ jsxRuntimeExports.jsx(EventSection, { title: "Files", children: Object.keys(event.sample.files).map((file) => {
|
50953
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: styles$p.noMargin, children: file });
|
50954
|
-
}) })
|
50889
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: styles$p.noMargin, children: file }, `sample-init-file-${file}`);
|
50890
|
+
}) }, `sample-${id}-init-files`)
|
50955
50891
|
);
|
50956
50892
|
}
|
50957
50893
|
if (event.sample.setup) {
|
50958
50894
|
sections.push(
|
50959
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(EventSection, { title: "Setup", children: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: styles$p.code, children: /* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: "sourceCode", children: event.sample.setup }) }) })
|
50895
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(EventSection, { title: "Setup", children: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: styles$p.code, children: /* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: "sourceCode", children: event.sample.setup }) }) }, `sample-${id}-init-setup`)
|
50960
50896
|
);
|
50961
50897
|
}
|
50962
50898
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
@@ -50984,11 +50920,11 @@ self.onmessage = function (e) {
|
|
50984
50920
|
String.fromCharCode(65 + index2),
|
50985
50921
|
") ",
|
50986
50922
|
choice
|
50987
|
-
] });
|
50923
|
+
] }, `$choice-{choice}`);
|
50988
50924
|
}) : "",
|
50989
50925
|
sections.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$p.section, children: sections }) : "",
|
50990
50926
|
/* @__PURE__ */ jsxRuntimeExports.jsx(EventSection, { title: "Target", children: toArray(event.sample.target).map((target2) => {
|
50991
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: target2 });
|
50927
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: target2 }, target2);
|
50992
50928
|
}) })
|
50993
50929
|
] })
|
50994
50930
|
] }),
|
@@ -51080,7 +51016,7 @@ self.onmessage = function (e) {
|
|
51080
51016
|
EventPanel,
|
51081
51017
|
{
|
51082
51018
|
id,
|
51083
|
-
title: "Score",
|
51019
|
+
title: (event.intermediate ? "Intermediate " : "") + "Score",
|
51084
51020
|
className: clsx(className2, "text-size-small"),
|
51085
51021
|
subTitle: formatDateTime(new Date(event.timestamp)),
|
51086
51022
|
icon: ApplicationIcons.scorer,
|
@@ -57658,7 +57594,8 @@ ${events}
|
|
57658
57594
|
{
|
57659
57595
|
id: "system_msg_event_preview",
|
57660
57596
|
messages: [message2]
|
57661
|
-
}
|
57597
|
+
},
|
57598
|
+
"system_msg_event_preview"
|
57662
57599
|
);
|
57663
57600
|
}
|
57664
57601
|
};
|
@@ -57740,7 +57677,8 @@ ${events}
|
|
57740
57677
|
answer: answer2,
|
57741
57678
|
runtime,
|
57742
57679
|
sessionLogs: Object.values(sessions)
|
57743
|
-
}
|
57680
|
+
},
|
57681
|
+
"human_baseline_view"
|
57744
57682
|
);
|
57745
57683
|
}
|
57746
57684
|
};
|
@@ -57791,8 +57729,8 @@ ${events}
|
|
57791
57729
|
}
|
57792
57730
|
),
|
57793
57731
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-size-base"), children: toolsInfo[key2] })
|
57794
|
-
] });
|
57795
|
-
}) });
|
57732
|
+
] }, key2);
|
57733
|
+
}) }, "state-diff-tools");
|
57796
57734
|
};
|
57797
57735
|
const RenderableChangeTypes = [
|
57798
57736
|
system_msg_added_sig,
|
@@ -57803,11 +57741,18 @@ ${events}
|
|
57803
57741
|
human_baseline_session
|
57804
57742
|
];
|
57805
57743
|
const Tools = ({ toolDefinitions }) => {
|
57806
|
-
return toolDefinitions.map((toolDefinition) => {
|
57744
|
+
return toolDefinitions.map((toolDefinition, idx) => {
|
57807
57745
|
var _a2;
|
57808
57746
|
const toolName = toolDefinition.name;
|
57809
57747
|
const toolArgs = ((_a2 = toolDefinition.parameters) == null ? void 0 : _a2.properties) ? Object.keys(toolDefinition.parameters.properties) : [];
|
57810
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
57748
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
57749
|
+
Tool,
|
57750
|
+
{
|
57751
|
+
toolName,
|
57752
|
+
toolArgs
|
57753
|
+
},
|
57754
|
+
`${toolName}-${idx}`
|
57755
|
+
);
|
57811
57756
|
});
|
57812
57757
|
};
|
57813
57758
|
const Tool = ({ toolName, toolArgs }) => {
|
@@ -57830,36 +57775,20 @@ ${events}
|
|
57830
57775
|
}) => {
|
57831
57776
|
const summary2 = summarizeChanges(event.changes);
|
57832
57777
|
const [before, after] = synthesizeComparable(event.changes);
|
57833
|
-
const tabs2 = [
|
57834
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
57835
|
-
StateDiffView,
|
57836
|
-
{
|
57837
|
-
before,
|
57838
|
-
after,
|
57839
|
-
"data-name": "Diff",
|
57840
|
-
className: clsx(styles$m.diff)
|
57841
|
-
}
|
57842
|
-
)
|
57843
|
-
];
|
57844
57778
|
const changePreview = generatePreview(
|
57845
57779
|
event.changes,
|
57846
57780
|
structuredClone(after),
|
57847
57781
|
isStore
|
57848
57782
|
);
|
57849
|
-
if (changePreview) {
|
57850
|
-
tabs2.unshift(
|
57851
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { "data-name": "Summary", className: clsx(styles$m.summary), children: changePreview })
|
57852
|
-
);
|
57853
|
-
}
|
57854
57783
|
const title2 = event.event === "state" ? "State Updated" : "Store Updated";
|
57855
|
-
return /* @__PURE__ */ jsxRuntimeExports.
|
57784
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
57856
57785
|
EventPanel,
|
57857
57786
|
{
|
57858
57787
|
id,
|
57859
57788
|
title: title2,
|
57860
57789
|
className: className2,
|
57861
57790
|
subTitle: formatDateTime(new Date(event.timestamp)),
|
57862
|
-
text:
|
57791
|
+
text: !changePreview ? summary2 : void 0,
|
57863
57792
|
collapse: changePreview === void 0 ? true : void 0,
|
57864
57793
|
selectedNav: eventState.selectedNav || "",
|
57865
57794
|
setSelectedNav: (selectedNav) => {
|
@@ -57869,7 +57798,18 @@ ${events}
|
|
57869
57798
|
setCollapsed: (collapsed) => {
|
57870
57799
|
setEventState({ ...eventState, collapsed });
|
57871
57800
|
},
|
57872
|
-
children:
|
57801
|
+
children: [
|
57802
|
+
changePreview ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { "data-name": "Summary", className: clsx(styles$m.summary), children: changePreview }) : void 0,
|
57803
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
57804
|
+
StateDiffView,
|
57805
|
+
{
|
57806
|
+
before,
|
57807
|
+
after,
|
57808
|
+
"data-name": "Diff",
|
57809
|
+
className: clsx(styles$m.diff)
|
57810
|
+
}
|
57811
|
+
)
|
57812
|
+
]
|
57873
57813
|
}
|
57874
57814
|
);
|
57875
57815
|
};
|
@@ -57914,7 +57854,8 @@ ${events}
|
|
57914
57854
|
}
|
57915
57855
|
}
|
57916
57856
|
if (matchingOps === requiredMatchCount) {
|
57917
|
-
|
57857
|
+
const el = changeType.render(changes, resolvedState);
|
57858
|
+
results.push(el);
|
57918
57859
|
break;
|
57919
57860
|
}
|
57920
57861
|
}
|
@@ -58286,9 +58227,9 @@ ${events}
|
|
58286
58227
|
className: className2
|
58287
58228
|
}) => {
|
58288
58229
|
var _a2, _b2;
|
58289
|
-
const { input: input2, functionCall,
|
58290
|
-
event.function,
|
58291
|
-
event.arguments
|
58230
|
+
const { input: input2, functionCall, highlightLanguage } = reactExports.useMemo(
|
58231
|
+
() => resolveToolInput(event.function, event.arguments),
|
58232
|
+
[event.function, event.arguments]
|
58292
58233
|
);
|
58293
58234
|
const approvalEvent = event.events.find((e) => {
|
58294
58235
|
return e.event === "approval";
|
@@ -58317,7 +58258,7 @@ ${events}
|
|
58317
58258
|
{
|
58318
58259
|
functionCall,
|
58319
58260
|
input: input2,
|
58320
|
-
|
58261
|
+
highlightLanguage,
|
58321
58262
|
output: ((_b2 = event.error) == null ? void 0 : _b2.message) || event.result,
|
58322
58263
|
mode: "compact",
|
58323
58264
|
view: event.view ? event.view : void 0
|
@@ -58758,7 +58699,8 @@ ${events}
|
|
58758
58699
|
onClick: () => {
|
58759
58700
|
printSample(id, targetId);
|
58760
58701
|
}
|
58761
|
-
}
|
58702
|
+
},
|
58703
|
+
"sample-print-tool"
|
58762
58704
|
)
|
58763
58705
|
);
|
58764
58706
|
}
|
@@ -58797,7 +58739,8 @@ ${events}
|
|
58797
58739
|
},
|
58798
58740
|
`${baseId}-transcript-display-${id}`
|
58799
58741
|
)
|
58800
|
-
}
|
58742
|
+
},
|
58743
|
+
kSampleTranscriptTabId
|
58801
58744
|
) : null,
|
58802
58745
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
58803
58746
|
TabPanel,
|
@@ -58819,7 +58762,8 @@ ${events}
|
|
58819
58762
|
},
|
58820
58763
|
`${baseId}-chat-${id}`
|
58821
58764
|
)
|
58822
|
-
}
|
58765
|
+
},
|
58766
|
+
kSampleMessagesTabId
|
58823
58767
|
),
|
58824
58768
|
scorerNames.length === 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
58825
58769
|
TabPanel,
|
@@ -58837,7 +58781,8 @@ ${events}
|
|
58837
58781
|
scorer: scorerNames[0]
|
58838
58782
|
}
|
58839
58783
|
)
|
58840
|
-
}
|
58784
|
+
},
|
58785
|
+
kSampleScoringTabId
|
58841
58786
|
) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: Object.keys(sample2.scores || {}).map((scorer) => {
|
58842
58787
|
const tabId = `score-${scorer}`;
|
58843
58788
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -58856,7 +58801,8 @@ ${events}
|
|
58856
58801
|
scorer
|
58857
58802
|
}
|
58858
58803
|
)
|
58859
|
-
}
|
58804
|
+
},
|
58805
|
+
tabId
|
58860
58806
|
);
|
58861
58807
|
}) }),
|
58862
58808
|
sampleMetadatas.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -58895,7 +58841,14 @@ ${events}
|
|
58895
58841
|
title: "JSON",
|
58896
58842
|
onSelected: onSelectedTab,
|
58897
58843
|
selected: selectedTab === kSampleJsonTabId,
|
58898
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$A.padded, styles$A.fullWidth), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
58844
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$A.padded, styles$A.fullWidth), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
58845
|
+
JSONPanel,
|
58846
|
+
{
|
58847
|
+
data: sample2,
|
58848
|
+
simple: true,
|
58849
|
+
className: clsx("text-size-small")
|
58850
|
+
}
|
58851
|
+
) })
|
58899
58852
|
}
|
58900
58853
|
) : null
|
58901
58854
|
]
|
@@ -58903,7 +58856,7 @@ ${events}
|
|
58903
58856
|
)
|
58904
58857
|
] });
|
58905
58858
|
};
|
58906
|
-
const metadataViewsForSample = (
|
58859
|
+
const metadataViewsForSample = (id, sample2) => {
|
58907
58860
|
const sampleMetadatas = [];
|
58908
58861
|
if (sample2.model_usage && Object.keys(sample2.model_usage).length > 0) {
|
58909
58862
|
sampleMetadatas.push(
|
@@ -58916,7 +58869,7 @@ ${events}
|
|
58916
58869
|
className: clsx(styles$A.noTop)
|
58917
58870
|
}
|
58918
58871
|
) })
|
58919
|
-
] })
|
58872
|
+
] }, `sample-usage-${id}`)
|
58920
58873
|
);
|
58921
58874
|
}
|
58922
58875
|
if (Object.keys(sample2 == null ? void 0 : sample2.metadata).length > 0) {
|
@@ -58931,7 +58884,7 @@ ${events}
|
|
58931
58884
|
className: clsx("tab-pane", styles$A.noTop)
|
58932
58885
|
}
|
58933
58886
|
) })
|
58934
|
-
] })
|
58887
|
+
] }, `sample-metadata-${id}`)
|
58935
58888
|
);
|
58936
58889
|
}
|
58937
58890
|
if (Object.keys(sample2 == null ? void 0 : sample2.store).length > 0) {
|
@@ -58946,7 +58899,7 @@ ${events}
|
|
58946
58899
|
className: clsx("tab-pane", styles$A.noTop)
|
58947
58900
|
}
|
58948
58901
|
) })
|
58949
|
-
] })
|
58902
|
+
] }, `sample-store-${id}`)
|
58950
58903
|
);
|
58951
58904
|
}
|
58952
58905
|
return sampleMetadatas;
|
@@ -59090,40 +59043,6 @@ ${events}
|
|
59090
59043
|
},
|
59091
59044
|
[setInitialScrollPosition]
|
59092
59045
|
);
|
59093
|
-
const headerEls = [];
|
59094
|
-
headerEls.push(
|
59095
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("modal-title", "text-size-smaller", styles$h.title), children: title2 || "" })
|
59096
|
-
);
|
59097
|
-
if (detail2) {
|
59098
|
-
headerEls.push(
|
59099
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$h.detail, children: [
|
59100
|
-
(detailTools == null ? void 0 : detailTools.left) ? detailTools.left.map((tool2) => {
|
59101
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(TitleTool, { ...tool2 });
|
59102
|
-
}) : "",
|
59103
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-size-smaller", styles$h.detailText), children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: detail2 }) }),
|
59104
|
-
(detailTools == null ? void 0 : detailTools.right) ? detailTools.right.map((tool2) => {
|
59105
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(TitleTool, { ...tool2 });
|
59106
|
-
}) : ""
|
59107
|
-
] })
|
59108
|
-
);
|
59109
|
-
}
|
59110
|
-
headerEls.push(
|
59111
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
59112
|
-
"button",
|
59113
|
-
{
|
59114
|
-
type: "button",
|
59115
|
-
className: clsx(
|
59116
|
-
"btn",
|
59117
|
-
"btn-close-large-dialog",
|
59118
|
-
"text-size-larger",
|
59119
|
-
styles$h.close
|
59120
|
-
),
|
59121
|
-
onClick: onHide,
|
59122
|
-
"aria-label": "Close",
|
59123
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(HtmlEntity, { html: "×" })
|
59124
|
-
}
|
59125
|
-
)
|
59126
|
-
);
|
59127
59046
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
59128
59047
|
"div",
|
59129
59048
|
{
|
@@ -59146,7 +59065,39 @@ ${events}
|
|
59146
59065
|
),
|
59147
59066
|
role: "document",
|
59148
59067
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx("modal-content", styles$h.content), children: [
|
59149
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
59068
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx("modal-header", styles$h.header), children: [
|
59069
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
59070
|
+
"div",
|
59071
|
+
{
|
59072
|
+
className: clsx("modal-title", "text-size-smaller", styles$h.title),
|
59073
|
+
children: title2 || ""
|
59074
|
+
}
|
59075
|
+
),
|
59076
|
+
detail2 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$h.detail, children: [
|
59077
|
+
(detailTools == null ? void 0 : detailTools.left) ? detailTools.left.map((tool2, idx) => {
|
59078
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TitleTool, { ...tool2 }, `tool-left-${idx}`);
|
59079
|
+
}) : "",
|
59080
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-size-smaller", styles$h.detailText), children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: detail2 }) }),
|
59081
|
+
(detailTools == null ? void 0 : detailTools.right) ? detailTools.right.map((tool2, idx) => {
|
59082
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TitleTool, { ...tool2 }, `tool-right-${idx}`);
|
59083
|
+
}) : ""
|
59084
|
+
] }) : void 0,
|
59085
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
59086
|
+
"button",
|
59087
|
+
{
|
59088
|
+
type: "button",
|
59089
|
+
className: clsx(
|
59090
|
+
"btn",
|
59091
|
+
"btn-close-large-dialog",
|
59092
|
+
"text-size-larger",
|
59093
|
+
styles$h.close
|
59094
|
+
),
|
59095
|
+
onClick: onHide,
|
59096
|
+
"aria-label": "Close",
|
59097
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(HtmlEntity, { html: "×" })
|
59098
|
+
}
|
59099
|
+
)
|
59100
|
+
] }),
|
59150
59101
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ProgressBar, { animating: showProgress }),
|
59151
59102
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "modal-body", ref: scrollRef, onScroll, children: children2 }),
|
59152
59103
|
modalFooter
|
@@ -60050,7 +60001,7 @@ ${events}
|
|
60050
60001
|
}
|
60051
60002
|
),
|
60052
60003
|
index2 < steps.length - 1 ? separator2 : ""
|
60053
|
-
] });
|
60004
|
+
] }, `solver-step-${index2}`);
|
60054
60005
|
});
|
60055
60006
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.container, children: details });
|
60056
60007
|
};
|
@@ -60164,7 +60115,8 @@ ${events}
|
|
60164
60115
|
name: key2,
|
60165
60116
|
scores: scorers[key2].scores,
|
60166
60117
|
params: scorers[key2].params
|
60167
|
-
}
|
60118
|
+
},
|
60119
|
+
key2
|
60168
60120
|
);
|
60169
60121
|
});
|
60170
60122
|
taskColumns.push({
|
@@ -60191,7 +60143,8 @@ ${events}
|
|
60191
60143
|
className: "text-size-small",
|
60192
60144
|
entries: taskInformation,
|
60193
60145
|
tableOptions: "sm"
|
60194
|
-
}
|
60146
|
+
},
|
60147
|
+
`plan-md-task`
|
60195
60148
|
)
|
60196
60149
|
});
|
60197
60150
|
if (task_args && Object.keys(task_args).length > 0) {
|
@@ -60204,7 +60157,8 @@ ${events}
|
|
60204
60157
|
className: "text-size-small",
|
60205
60158
|
entries: task_args,
|
60206
60159
|
tableOptions: "sm"
|
60207
|
-
}
|
60160
|
+
},
|
60161
|
+
`plan-md-task-args`
|
60208
60162
|
)
|
60209
60163
|
});
|
60210
60164
|
}
|
@@ -60218,7 +60172,8 @@ ${events}
|
|
60218
60172
|
className: "text-size-small",
|
60219
60173
|
entries: model_args,
|
60220
60174
|
tableOptions: "sm"
|
60221
|
-
}
|
60175
|
+
},
|
60176
|
+
`plan-md-model-args`
|
60222
60177
|
)
|
60223
60178
|
});
|
60224
60179
|
}
|
@@ -60232,7 +60187,8 @@ ${events}
|
|
60232
60187
|
className: "text-size-small",
|
60233
60188
|
entries: config2,
|
60234
60189
|
tableOptions: "sm"
|
60235
|
-
}
|
60190
|
+
},
|
60191
|
+
`plan-md-config`
|
60236
60192
|
)
|
60237
60193
|
});
|
60238
60194
|
}
|
@@ -60249,7 +60205,8 @@ ${events}
|
|
60249
60205
|
className: "text-size-small",
|
60250
60206
|
entries: generate_record,
|
60251
60207
|
tableOptions: "sm"
|
60252
|
-
}
|
60208
|
+
},
|
60209
|
+
`plan-md-generate-config`
|
60253
60210
|
)
|
60254
60211
|
});
|
60255
60212
|
}
|
@@ -60263,7 +60220,8 @@ ${events}
|
|
60263
60220
|
className: "text-size-small",
|
60264
60221
|
entries: metadata2,
|
60265
60222
|
tableOptions: "sm"
|
60266
|
-
}
|
60223
|
+
},
|
60224
|
+
`plan-md-metadata`
|
60267
60225
|
)
|
60268
60226
|
});
|
60269
60227
|
}
|
@@ -60276,12 +60234,28 @@ ${events}
|
|
60276
60234
|
gridTemplateColumns: `repeat(${taskColumns.length}, auto)`
|
60277
60235
|
},
|
60278
60236
|
children: taskColumns.map((col) => {
|
60279
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60237
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60238
|
+
PlanColumn,
|
60239
|
+
{
|
60240
|
+
title: col.title,
|
60241
|
+
className: col.className,
|
60242
|
+
children: col.contents
|
60243
|
+
},
|
60244
|
+
`plan-col-${col.title}`
|
60245
|
+
);
|
60280
60246
|
})
|
60281
60247
|
}
|
60282
60248
|
),
|
60283
60249
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$9.row), children: metadataColumns.map((col) => {
|
60284
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60250
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60251
|
+
PlanColumn,
|
60252
|
+
{
|
60253
|
+
title: col.title,
|
60254
|
+
className: col.className,
|
60255
|
+
children: col.contents
|
60256
|
+
},
|
60257
|
+
`plan-col-${col.title}`
|
60258
|
+
);
|
60285
60259
|
}) })
|
60286
60260
|
] });
|
60287
60261
|
};
|
@@ -60412,23 +60386,6 @@ ${events}
|
|
60412
60386
|
reactExports.useEffect(() => {
|
60413
60387
|
setHidden(false);
|
60414
60388
|
}, [evalSpec, evalPlan, evalResults, evalStats, samples]);
|
60415
|
-
const infoCards = [];
|
60416
|
-
infoCards.push([
|
60417
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
60418
|
-
PlanCard,
|
60419
|
-
{
|
60420
|
-
evalSpec,
|
60421
|
-
evalPlan,
|
60422
|
-
scores: evalResults == null ? void 0 : evalResults.scores
|
60423
|
-
}
|
60424
|
-
)
|
60425
|
-
]);
|
60426
|
-
if (evalStatus !== "started") {
|
60427
|
-
infoCards.push(/* @__PURE__ */ jsxRuntimeExports.jsx(UsageCard, { stats: evalStats }));
|
60428
|
-
}
|
60429
|
-
if (evalStatus === "error" && evalError) {
|
60430
|
-
infoCards.unshift(/* @__PURE__ */ jsxRuntimeExports.jsx(TaskErrorCard, { error: evalError }));
|
60431
|
-
}
|
60432
60389
|
const showWarning = (!samples || samples.length === 0) && evalStatus === "success" && (evalSpec == null ? void 0 : evalSpec.dataset.samples) && evalSpec.dataset.samples > 0;
|
60433
60390
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { width: "100%" }, children: [
|
60434
60391
|
showWarning ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -60440,7 +60397,18 @@ ${events}
|
|
60440
60397
|
type: "warning"
|
60441
60398
|
}
|
60442
60399
|
) : "",
|
60443
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
60400
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { padding: "0.5em 1em 0 1em", width: "100%" }, children: [
|
60401
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
60402
|
+
PlanCard,
|
60403
|
+
{
|
60404
|
+
evalSpec,
|
60405
|
+
evalPlan,
|
60406
|
+
scores: evalResults == null ? void 0 : evalResults.scores
|
60407
|
+
}
|
60408
|
+
),
|
60409
|
+
evalStatus !== "started" ? /* @__PURE__ */ jsxRuntimeExports.jsx(UsageCard, { stats: evalStats }) : void 0,
|
60410
|
+
evalStatus === "error" && evalError ? /* @__PURE__ */ jsxRuntimeExports.jsx(TaskErrorCard, { error: evalError }) : void 0
|
60411
|
+
] })
|
60444
60412
|
] });
|
60445
60413
|
};
|
60446
60414
|
const navbarContainer = "_navbarContainer_838qu_1";
|
@@ -60529,25 +60497,31 @@ ${events}
|
|
60529
60497
|
taskStatus,
|
60530
60498
|
secondaryContainer
|
60531
60499
|
};
|
60532
|
-
const simpleMetricsRows = "
|
60533
|
-
const multiMetricsRows = "
|
60534
|
-
const verticalMetricReducer = "
|
60535
|
-
const verticalMetricName = "
|
60536
|
-
const verticalMetricValue = "
|
60537
|
-
const
|
60538
|
-
const
|
60539
|
-
const
|
60540
|
-
const
|
60500
|
+
const simpleMetricsRows = "_simpleMetricsRows_tnqkm_1";
|
60501
|
+
const multiMetricsRows = "_multiMetricsRows_tnqkm_12";
|
60502
|
+
const verticalMetricReducer = "_verticalMetricReducer_tnqkm_26";
|
60503
|
+
const verticalMetricName = "_verticalMetricName_tnqkm_33";
|
60504
|
+
const verticalMetricValue = "_verticalMetricValue_tnqkm_41";
|
60505
|
+
const multiScorer = "_multiScorer_tnqkm_46";
|
60506
|
+
const multiScorerIndent = "_multiScorerIndent_tnqkm_54";
|
60507
|
+
const multiScorerReducer = "_multiScorerReducer_tnqkm_58";
|
60508
|
+
const multiScorerLabel = "_multiScorerLabel_tnqkm_64";
|
60509
|
+
const multiScorerValue = "_multiScorerValue_tnqkm_70";
|
60510
|
+
const multiScorerValueContent = "_multiScorerValueContent_tnqkm_79";
|
60511
|
+
const multiScoreMetricGrid = "_multiScoreMetricGrid_tnqkm_84";
|
60541
60512
|
const styles$3 = {
|
60542
60513
|
simpleMetricsRows,
|
60543
60514
|
multiMetricsRows,
|
60544
60515
|
verticalMetricReducer,
|
60545
60516
|
verticalMetricName,
|
60546
60517
|
verticalMetricValue,
|
60518
|
+
multiScorer,
|
60519
|
+
multiScorerIndent,
|
60547
60520
|
multiScorerReducer,
|
60548
60521
|
multiScorerLabel,
|
60549
60522
|
multiScorerValue,
|
60550
|
-
multiScorerValueContent
|
60523
|
+
multiScorerValueContent,
|
60524
|
+
multiScoreMetricGrid
|
60551
60525
|
};
|
60552
60526
|
const ResultsPanel = ({ results }) => {
|
60553
60527
|
var _a2, _b2;
|
@@ -60560,37 +60534,45 @@ ${events}
|
|
60560
60534
|
metric: {
|
60561
60535
|
name: key2,
|
60562
60536
|
value: score2.metrics[key2].value,
|
60563
|
-
|
60537
|
+
params: score2.metrics[key2].params,
|
60564
60538
|
metadata: {}
|
60565
60539
|
}
|
60566
60540
|
};
|
60567
60541
|
});
|
60568
60542
|
});
|
60569
60543
|
const metrics = Object.values(scorers)[0];
|
60544
|
+
const showReducer = metrics && metrics.length > 0 && !!metrics[0].reducer;
|
60570
60545
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$3.simpleMetricsRows, children: metrics.map((metric2, i2) => {
|
60571
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60546
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60547
|
+
VerticalMetric,
|
60548
|
+
{
|
60549
|
+
metricSummary: metric2,
|
60550
|
+
isFirst: i2 === 0,
|
60551
|
+
showReducer
|
60552
|
+
},
|
60553
|
+
`simple-metric-${i2}`
|
60554
|
+
);
|
60572
60555
|
}) });
|
60573
60556
|
} else {
|
60557
|
+
const showReducer = (results == null ? void 0 : results.scores.findIndex((score2) => !!score2.reducer)) !== -1;
|
60574
60558
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$3.multiMetricsRows, children: (_b2 = results == null ? void 0 : results.scores) == null ? void 0 : _b2.map((score2, index2) => {
|
60575
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60559
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60560
|
+
MultiScorerMetric,
|
60561
|
+
{
|
60562
|
+
scorer: score2,
|
60563
|
+
isFirst: index2 === 0,
|
60564
|
+
showReducer
|
60565
|
+
},
|
60566
|
+
`multi-metric-${index2}`
|
60567
|
+
);
|
60576
60568
|
}) });
|
60577
60569
|
}
|
60578
60570
|
};
|
60579
60571
|
const VerticalMetric = ({
|
60580
60572
|
metricSummary,
|
60581
|
-
isFirst
|
60573
|
+
isFirst,
|
60574
|
+
showReducer
|
60582
60575
|
}) => {
|
60583
|
-
const reducer_component = metricSummary.reducer ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60584
|
-
"div",
|
60585
|
-
{
|
60586
|
-
className: clsx(
|
60587
|
-
"text-style-label",
|
60588
|
-
"text-style-secondary",
|
60589
|
-
styles$3.verticalMetricReducer
|
60590
|
-
),
|
60591
|
-
children: metricSummary.reducer
|
60592
|
-
}
|
60593
|
-
) : "";
|
60594
60576
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { paddingLeft: isFirst ? "0" : "1em" }, children: [
|
60595
60577
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
60596
60578
|
"div",
|
@@ -60601,14 +60583,28 @@ ${events}
|
|
60601
60583
|
"text-style-secondary",
|
60602
60584
|
styles$3.verticalMetricName
|
60603
60585
|
),
|
60604
|
-
children: metricSummary.metric
|
60586
|
+
children: metricDisplayName(metricSummary.metric)
|
60605
60587
|
}
|
60606
60588
|
),
|
60607
|
-
|
60589
|
+
showReducer ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60590
|
+
"div",
|
60591
|
+
{
|
60592
|
+
className: clsx(
|
60593
|
+
"text-style-label",
|
60594
|
+
"text-style-secondary",
|
60595
|
+
styles$3.verticalMetricReducer
|
60596
|
+
),
|
60597
|
+
children: metricSummary.reducer || "default"
|
60598
|
+
}
|
60599
|
+
) : void 0,
|
60608
60600
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
60609
60601
|
"div",
|
60610
60602
|
{
|
60611
|
-
className: clsx(
|
60603
|
+
className: clsx(
|
60604
|
+
"vertical-metric-value",
|
60605
|
+
"text-size-largest",
|
60606
|
+
styles$3.verticalMetricValue
|
60607
|
+
),
|
60612
60608
|
children: formatPrettyDecimal(metricSummary.metric.value)
|
60613
60609
|
}
|
60614
60610
|
)
|
@@ -60616,46 +60612,55 @@ ${events}
|
|
60616
60612
|
};
|
60617
60613
|
const MultiScorerMetric = ({
|
60618
60614
|
scorer,
|
60619
|
-
isFirst
|
60615
|
+
isFirst,
|
60616
|
+
showReducer
|
60620
60617
|
}) => {
|
60621
60618
|
const titleFontClz = "text-size-base";
|
60622
60619
|
const reducerFontClz = "text-size-smaller";
|
60623
60620
|
const valueFontClz = "text-size-base";
|
60624
|
-
|
60621
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
60625
60622
|
"div",
|
60626
60623
|
{
|
60627
60624
|
className: clsx(
|
60628
|
-
|
60629
|
-
|
60630
|
-
"text-style-secondary",
|
60631
|
-
styles$3.multiScorerReducer
|
60625
|
+
styles$3.multiScorer,
|
60626
|
+
isFirst ? styles$3.multiScorerIndent : void 0
|
60632
60627
|
),
|
60633
|
-
children:
|
60634
|
-
|
60635
|
-
|
60636
|
-
|
60637
|
-
|
60638
|
-
|
60639
|
-
|
60640
|
-
|
60641
|
-
|
60642
|
-
|
60643
|
-
|
60644
|
-
|
60645
|
-
|
60628
|
+
children: [
|
60629
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
60630
|
+
"div",
|
60631
|
+
{
|
60632
|
+
className: clsx(
|
60633
|
+
titleFontClz,
|
60634
|
+
"text-style-label",
|
60635
|
+
"text-style-secondary",
|
60636
|
+
"multi-score-label",
|
60637
|
+
styles$3.multiScorerLabel
|
60638
|
+
),
|
60639
|
+
children: scorer.name
|
60640
|
+
}
|
60646
60641
|
),
|
60647
|
-
|
60648
|
-
|
60649
|
-
|
60650
|
-
|
60651
|
-
|
60652
|
-
|
60653
|
-
|
60654
|
-
|
60655
|
-
|
60656
|
-
|
60657
|
-
|
60658
|
-
|
60642
|
+
showReducer ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60643
|
+
"div",
|
60644
|
+
{
|
60645
|
+
className: clsx(
|
60646
|
+
reducerFontClz,
|
60647
|
+
"text-style-label",
|
60648
|
+
"text-style-secondary",
|
60649
|
+
styles$3.multiScorerReducer
|
60650
|
+
),
|
60651
|
+
children: scorer.reducer || "default"
|
60652
|
+
}
|
60653
|
+
) : void 0,
|
60654
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(valueFontClz, styles$3.multiScorerValue), children: Object.keys(scorer.metrics).map((key2) => {
|
60655
|
+
const metric2 = scorer.metrics[key2];
|
60656
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$3.multiScoreMetricGrid, children: [
|
60657
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: metricDisplayName(metric2) }),
|
60658
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$3.multiScorerValueContent, children: formatPrettyDecimal(metric2.value) })
|
60659
|
+
] }, key2);
|
60660
|
+
}) })
|
60661
|
+
]
|
60662
|
+
}
|
60663
|
+
);
|
60659
60664
|
};
|
60660
60665
|
const statusPanel = "_statusPanel_1fzh4_1";
|
60661
60666
|
const statusIcon = "_statusIcon_1fzh4_10";
|
@@ -60725,16 +60730,6 @@ ${events}
|
|
60725
60730
|
evalSpec,
|
60726
60731
|
setOffcanvas
|
60727
60732
|
}) => {
|
60728
|
-
let statusPanel2;
|
60729
|
-
if (status === "success") {
|
60730
|
-
statusPanel2 = /* @__PURE__ */ jsxRuntimeExports.jsx(ResultsPanel, { results: evalResults });
|
60731
|
-
} else if (status === "cancelled") {
|
60732
|
-
statusPanel2 = /* @__PURE__ */ jsxRuntimeExports.jsx(CancelledPanel, { sampleCount: (samples == null ? void 0 : samples.length) || 0 });
|
60733
|
-
} else if (status === "started") {
|
60734
|
-
statusPanel2 = /* @__PURE__ */ jsxRuntimeExports.jsx(RunningPanel, { sampleCount: (samples == null ? void 0 : samples.length) || 0 });
|
60735
|
-
} else if (status === "error") {
|
60736
|
-
statusPanel2 = /* @__PURE__ */ jsxRuntimeExports.jsx(ErroredPanel, { sampleCount: (samples == null ? void 0 : samples.length) || 0 });
|
60737
|
-
}
|
60738
60733
|
const logFileName = file ? filename(file) : "";
|
60739
60734
|
const handleToggle = reactExports.useCallback(() => {
|
60740
60735
|
setOffcanvas(!offcanvas);
|
@@ -60798,7 +60793,12 @@ ${events}
|
|
60798
60793
|
]
|
60799
60794
|
}
|
60800
60795
|
),
|
60801
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
60796
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$4.taskStatus, "navbar-text"), children: [
|
60797
|
+
status === "success" ? /* @__PURE__ */ jsxRuntimeExports.jsx(ResultsPanel, { results: evalResults }) : void 0,
|
60798
|
+
status === "cancelled" ? /* @__PURE__ */ jsxRuntimeExports.jsx(CancelledPanel, { sampleCount: (samples == null ? void 0 : samples.length) || 0 }) : void 0,
|
60799
|
+
status === "started" ? /* @__PURE__ */ jsxRuntimeExports.jsx(RunningPanel, { sampleCount: (samples == null ? void 0 : samples.length) || 0 }) : void 0,
|
60800
|
+
status === "error" ? /* @__PURE__ */ jsxRuntimeExports.jsx(ErroredPanel, { sampleCount: (samples == null ? void 0 : samples.length) || 0 }) : void 0
|
60801
|
+
] }),
|
60802
60802
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "task-created", style: { display: "none" }, children: evalSpec == null ? void 0 : evalSpec.created })
|
60803
60803
|
] });
|
60804
60804
|
};
|
@@ -60882,7 +60882,8 @@ ${events}
|
|
60882
60882
|
epochs
|
60883
60883
|
}
|
60884
60884
|
)
|
60885
|
-
}
|
60885
|
+
},
|
60886
|
+
"sb-dataset"
|
60886
60887
|
)
|
60887
60888
|
});
|
60888
60889
|
const label2 = (evalResults == null ? void 0 : evalResults.scores) && evalResults.scores.length > 1 ? "Scorers" : "Scorer";
|
@@ -60898,7 +60899,8 @@ ${events}
|
|
60898
60899
|
"text-size-small"
|
60899
60900
|
),
|
60900
60901
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ScorerSummary, { evalDescriptor })
|
60901
|
-
}
|
60902
|
+
},
|
60903
|
+
"sb-scorer"
|
60902
60904
|
)
|
60903
60905
|
});
|
60904
60906
|
if (hasConfig) {
|
@@ -60910,7 +60912,8 @@ ${events}
|
|
60910
60912
|
label: "Config",
|
60911
60913
|
className: clsx(styles$1.justifyRight, "text-size-small"),
|
60912
60914
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ParamSummary, { params: hyperparameters })
|
60913
|
-
}
|
60915
|
+
},
|
60916
|
+
"sb-params"
|
60914
60917
|
)
|
60915
60918
|
});
|
60916
60919
|
}
|
@@ -60927,7 +60930,8 @@ ${events}
|
|
60927
60930
|
label: "Duration",
|
60928
60931
|
className: clsx(styles$1.justifyRight, "text-size-small"),
|
60929
60932
|
children: totalDuration
|
60930
|
-
}
|
60933
|
+
},
|
60934
|
+
"sb-duration"
|
60931
60935
|
)
|
60932
60936
|
});
|
60933
60937
|
}
|
@@ -61085,31 +61089,6 @@ ${events}
|
|
61085
61089
|
},
|
61086
61090
|
[setSelectedTab]
|
61087
61091
|
);
|
61088
|
-
const tabPanels2 = reactExports.useMemo(() => {
|
61089
|
-
return Object.keys(tabs2).map((key2) => {
|
61090
|
-
var _a2;
|
61091
|
-
const tab2 = tabs2[key2];
|
61092
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
61093
|
-
TabPanel,
|
61094
|
-
{
|
61095
|
-
id: tab2.id,
|
61096
|
-
title: tab2.label,
|
61097
|
-
onSelected,
|
61098
|
-
selected: selectedTab === tab2.id,
|
61099
|
-
scrollable: !!tab2.scrollable,
|
61100
|
-
scrollRef: tab2.scrollRef,
|
61101
|
-
scrollPosition: (_a2 = workspaceTabScrollPositionRef.current) == null ? void 0 : _a2[tab2.id],
|
61102
|
-
setScrollPosition: reactExports.useCallback(
|
61103
|
-
(position) => {
|
61104
|
-
onScroll(tab2.id, position);
|
61105
|
-
},
|
61106
|
-
[onScroll]
|
61107
|
-
),
|
61108
|
-
children: tab2.content()
|
61109
|
-
}
|
61110
|
-
);
|
61111
|
-
});
|
61112
|
-
}, [tabs2, selectedTab]);
|
61113
61092
|
if (evalSpec === void 0) {
|
61114
61093
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(EmptyPanel, {});
|
61115
61094
|
} else {
|
@@ -61152,7 +61131,30 @@ ${events}
|
|
61152
61131
|
className: clsx(styles.tabSet, "text-size-smaller"),
|
61153
61132
|
tabControlsClassName: clsx(styles.tabs, "text-size-smaller"),
|
61154
61133
|
tabPanelsClassName: clsx(styles.tabPanels),
|
61155
|
-
children:
|
61134
|
+
children: Object.keys(tabs2).map((key2) => {
|
61135
|
+
var _a2;
|
61136
|
+
const tab2 = tabs2[key2];
|
61137
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
61138
|
+
TabPanel,
|
61139
|
+
{
|
61140
|
+
id: tab2.id,
|
61141
|
+
title: tab2.label,
|
61142
|
+
onSelected,
|
61143
|
+
selected: selectedTab === tab2.id,
|
61144
|
+
scrollable: !!tab2.scrollable,
|
61145
|
+
scrollRef: tab2.scrollRef,
|
61146
|
+
scrollPosition: (_a2 = workspaceTabScrollPositionRef.current) == null ? void 0 : _a2[tab2.id],
|
61147
|
+
setScrollPosition: reactExports.useCallback(
|
61148
|
+
(position) => {
|
61149
|
+
onScroll(tab2.id, position);
|
61150
|
+
},
|
61151
|
+
[onScroll]
|
61152
|
+
),
|
61153
|
+
children: tab2.content()
|
61154
|
+
},
|
61155
|
+
tab2.id
|
61156
|
+
);
|
61157
|
+
})
|
61156
61158
|
}
|
61157
61159
|
) }) })
|
61158
61160
|
] });
|