inspect-ai 0.3.63__py3-none-any.whl → 0.3.64__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/textual/widgets/samples.py +4 -3
- 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 +5 -0
- inspect_ai/_view/www/README.md +1 -1
- inspect_ai/_view/www/dist/assets/index.css +39 -11
- inspect_ai/_view/www/dist/assets/index.js +504 -501
- 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/plan/PlanDetailView.tsx +17 -2
- inspect_ai/_view/www/src/plan/SolverDetailView.tsx +1 -1
- inspect_ai/_view/www/src/samples/SampleDisplay.tsx +9 -4
- 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/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.64.dist-info}/LICENSE +1 -1
- {inspect_ai-0.3.63.dist-info → inspect_ai-0.3.64.dist-info}/METADATA +10 -6
- {inspect_ai-0.3.63.dist-info → inspect_ai-0.3.64.dist-info}/RECORD +178 -171
- {inspect_ai-0.3.63.dist-info → inspect_ai-0.3.64.dist-info}/WHEEL +0 -0
- {inspect_ai-0.3.63.dist-info → inspect_ai-0.3.64.dist-info}/entry_points.txt +0 -0
- {inspect_ai-0.3.63.dist-info → inspect_ai-0.3.64.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",
|
@@ -22598,8 +22512,10 @@ var require_assets = __commonJS({
|
|
22598
22512
|
const scoreRendered = (sample2, scoreLabel) => {
|
22599
22513
|
const descriptor = scoreDescriptor(scoreLabel);
|
22600
22514
|
const score22 = scoreValue2(sample2, scoreLabel);
|
22601
|
-
if (score22 === null
|
22515
|
+
if (score22 === null) {
|
22602
22516
|
return "null";
|
22517
|
+
} else if (score22 === void 0) {
|
22518
|
+
return "";
|
22603
22519
|
} else if (score22 && descriptor && descriptor.render) {
|
22604
22520
|
return descriptor.render(score22);
|
22605
22521
|
} else {
|
@@ -25410,7 +25326,7 @@ categories: ${categories.join(" ")}`;
|
|
25410
25326
|
setSort(sel.value);
|
25411
25327
|
},
|
25412
25328
|
children: options2.map((option) => {
|
25413
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: option.val, children: option.label });
|
25329
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: option.val, children: option.label }, option.val);
|
25414
25330
|
})
|
25415
25331
|
}
|
25416
25332
|
)
|
@@ -25617,6 +25533,28 @@ categories: ${categories.join(" ")}`;
|
|
25617
25533
|
running,
|
25618
25534
|
cancelled
|
25619
25535
|
};
|
25536
|
+
const metricDisplayName = (metric2) => {
|
25537
|
+
let modifier = void 0;
|
25538
|
+
for (const metricModifier of metricModifiers) {
|
25539
|
+
modifier = metricModifier(metric2);
|
25540
|
+
if (modifier) {
|
25541
|
+
break;
|
25542
|
+
}
|
25543
|
+
}
|
25544
|
+
const metricName2 = !modifier ? metric2.name : `${metric2.name}[${modifier}]`;
|
25545
|
+
return metricName2;
|
25546
|
+
};
|
25547
|
+
const clusterMetricModifier = (metric2) => {
|
25548
|
+
if (metric2.name !== "stderr") {
|
25549
|
+
return void 0;
|
25550
|
+
}
|
25551
|
+
const clusterValue = (metric2.params || {})["cluster"];
|
25552
|
+
if (clusterValue === void 0 || typeof clusterValue !== "string") {
|
25553
|
+
return void 0;
|
25554
|
+
}
|
25555
|
+
return clusterValue;
|
25556
|
+
};
|
25557
|
+
const metricModifiers = [clusterMetricModifier];
|
25620
25558
|
const container$c = "_container_1frsg_1";
|
25621
25559
|
const metric = "_metric_1frsg_8";
|
25622
25560
|
const metricName$1 = "_metricName_1frsg_17";
|
@@ -25628,6 +25566,7 @@ categories: ${categories.join(" ")}`;
|
|
25628
25566
|
metricReducer: metricReducer$1
|
25629
25567
|
};
|
25630
25568
|
const SidebarScoreView = ({ scorer }) => {
|
25569
|
+
const showReducer = !!scorer.reducer;
|
25631
25570
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$O.container, children: Object.keys(scorer.metrics).map((metric2) => {
|
25632
25571
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$O.metric, children: [
|
25633
25572
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -25639,15 +25578,12 @@ categories: ${categories.join(" ")}`;
|
|
25639
25578
|
"text-size-small",
|
25640
25579
|
styles$O.metricName
|
25641
25580
|
),
|
25642
|
-
children: scorer.metrics[metric2]
|
25581
|
+
children: metricDisplayName(scorer.metrics[metric2])
|
25643
25582
|
}
|
25644
25583
|
),
|
25645
|
-
|
25646
|
-
"$",
|
25647
|
-
scorer.reducer
|
25648
|
-
] }) : "",
|
25584
|
+
showReducer ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-size-small", styles$O.metricReducer), children: scorer.reducer || "default" }) : "",
|
25649
25585
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-size-title-secondary", children: formatPrettyDecimal(scorer.metrics[metric2].value) })
|
25650
|
-
] });
|
25586
|
+
] }, metric2);
|
25651
25587
|
}) });
|
25652
25588
|
};
|
25653
25589
|
const container$b = "_container_5kpg1_1";
|
@@ -25665,7 +25601,8 @@ categories: ${categories.join(" ")}`;
|
|
25665
25601
|
metricValue
|
25666
25602
|
};
|
25667
25603
|
const SidebarScoresView = ({ scores: scores2 }) => {
|
25668
|
-
|
25604
|
+
const showReducer = scores2.findIndex((score2) => !!score2.reducer) !== -1;
|
25605
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$N.container, children: scores2.map((score2, idx) => {
|
25669
25606
|
const name2 = score2.name;
|
25670
25607
|
const reducer = score2.reducer;
|
25671
25608
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$N.scoreWrapper, children: [
|
@@ -25674,31 +25611,33 @@ categories: ${categories.join(" ")}`;
|
|
25674
25611
|
{
|
25675
25612
|
className: clsx(
|
25676
25613
|
"text-style-secondary",
|
25677
|
-
"text-label",
|
25614
|
+
"text-style-label",
|
25678
25615
|
"text-size-small",
|
25679
25616
|
styles$N.metricName
|
25680
25617
|
),
|
25681
25618
|
children: name2
|
25682
25619
|
}
|
25683
25620
|
),
|
25684
|
-
|
25621
|
+
showReducer ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
25622
|
+
"div",
|
25623
|
+
{
|
25624
|
+
className: clsx(
|
25625
|
+
"text-size-small",
|
25626
|
+
"text-style-label",
|
25627
|
+
"text-style-secondary",
|
25628
|
+
styles$N.metricReducer
|
25629
|
+
),
|
25630
|
+
children: reducer || "default"
|
25631
|
+
}
|
25632
|
+
) : "",
|
25685
25633
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-size-small", styles$N.metricValues), children: Object.keys(score2.metrics).map((key2) => {
|
25686
25634
|
const metric2 = score2.metrics[key2];
|
25687
25635
|
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
|
-
),
|
25636
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(), children: metricDisplayName(metric2) }),
|
25698
25637
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$N.metricValue, children: formatPrettyDecimal(metric2.value) })
|
25699
25638
|
] }, key2);
|
25700
25639
|
}) })
|
25701
|
-
] });
|
25640
|
+
] }, `scorer-${name2}-${idx}`);
|
25702
25641
|
}) });
|
25703
25642
|
};
|
25704
25643
|
const EvalStatus = ({ logHeader }) => {
|
@@ -46359,33 +46298,6 @@ Supported expressions:
|
|
46359
46298
|
const scorerScores = scores2.filter((sc) => {
|
46360
46299
|
return score2 && sc.scorer === score2.scorer;
|
46361
46300
|
});
|
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
46301
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$J.flex, children: [
|
46390
46302
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
46391
46303
|
"span",
|
@@ -46401,7 +46313,27 @@ Supported expressions:
|
|
46401
46313
|
children: "Scorer:"
|
46402
46314
|
}
|
46403
46315
|
),
|
46404
|
-
|
46316
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
46317
|
+
ScorerSelector,
|
46318
|
+
{
|
46319
|
+
scorers,
|
46320
|
+
selectedIndex: scorerIndex(scorers, score2),
|
46321
|
+
setSelectedIndex: (index2) => {
|
46322
|
+
setScore(scorers[index2]);
|
46323
|
+
}
|
46324
|
+
}
|
46325
|
+
),
|
46326
|
+
scorerScores.length > 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
46327
|
+
ScoreSelector,
|
46328
|
+
{
|
46329
|
+
className: clsx(styles$J.secondSel),
|
46330
|
+
scores: scorerScores,
|
46331
|
+
selectedIndex: scoreIndex(scorerScores, score2),
|
46332
|
+
setSelectedIndex: (index2) => {
|
46333
|
+
setScore(scorerScores[index2]);
|
46334
|
+
}
|
46335
|
+
}
|
46336
|
+
) : void 0
|
46405
46337
|
] });
|
46406
46338
|
}
|
46407
46339
|
};
|
@@ -46427,7 +46359,7 @@ Supported expressions:
|
|
46427
46359
|
setSelectedIndex(sel.selectedIndex);
|
46428
46360
|
},
|
46429
46361
|
children: scores2.map((score2) => {
|
46430
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: score2.name, children: score2.name });
|
46362
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: score2.name, children: score2.name }, score2.name);
|
46431
46363
|
})
|
46432
46364
|
}
|
46433
46365
|
);
|
@@ -46448,7 +46380,7 @@ Supported expressions:
|
|
46448
46380
|
setSelectedIndex(sel.selectedIndex);
|
46449
46381
|
},
|
46450
46382
|
children: scorers.map((scorer) => {
|
46451
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: scorer.scorer, children: scorer.scorer });
|
46383
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: scorer.scorer, children: scorer.scorer }, scorer.scorer);
|
46452
46384
|
})
|
46453
46385
|
}
|
46454
46386
|
);
|
@@ -46472,8 +46404,7 @@ Supported expressions:
|
|
46472
46404
|
scores: scores2,
|
46473
46405
|
sampleDescriptor
|
46474
46406
|
}) => {
|
46475
|
-
|
46476
|
-
tools2.push(
|
46407
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
46477
46408
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
46478
46409
|
SampleFilter,
|
46479
46410
|
{
|
@@ -46481,20 +46412,11 @@ Supported expressions:
|
|
46481
46412
|
scoreFilter,
|
46482
46413
|
setScoreFilter
|
46483
46414
|
}
|
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;
|
46415
|
+
),
|
46416
|
+
scores2.length > 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(SelectScorer, { scores: scores2, score: score2, setScore }) : void 0,
|
46417
|
+
epochs > 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(EpochFilter, { epoch, setEpoch, epochs }) : void 0,
|
46418
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SortFilter, { sort, setSort, epochs })
|
46419
|
+
] });
|
46498
46420
|
};
|
46499
46421
|
const filename = (path) => {
|
46500
46422
|
const pathparts = path.split("/");
|
@@ -48822,7 +48744,6 @@ self.onmessage = function (e) {
|
|
48822
48744
|
if (remoteZipFile.centralDirectory.has(sampleFile)) {
|
48823
48745
|
return await readJSONFile(sampleFile, MAX_BYTES);
|
48824
48746
|
} else {
|
48825
|
-
console.log({ dir: remoteZipFile.centralDirectory });
|
48826
48747
|
throw new Error(
|
48827
48748
|
`Unable to read sample file ${sampleFile} - it is not present in the manifest.`
|
48828
48749
|
);
|
@@ -49297,7 +49218,7 @@ self.onmessage = function (e) {
|
|
49297
49218
|
tools: tools2,
|
49298
49219
|
children: children2
|
49299
49220
|
}) => {
|
49300
|
-
const validTabs =
|
49221
|
+
const validTabs = flattenChildren(children2);
|
49301
49222
|
if (validTabs.length === 0) return null;
|
49302
49223
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [
|
49303
49224
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
@@ -49411,6 +49332,18 @@ self.onmessage = function (e) {
|
|
49411
49332
|
const TabTools = ({ tools: tools2 }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("tab-tools", moduleStyles.tabTools), children: tools2 });
|
49412
49333
|
const computeTabId = (id, index2) => `${id}-${index2}`;
|
49413
49334
|
const computeTabContentsId = (id) => `${id}-contents`;
|
49335
|
+
const flattenChildren = (children2) => {
|
49336
|
+
return reactExports.Children.toArray(children2).flatMap((child) => {
|
49337
|
+
if (reactExports.isValidElement(child)) {
|
49338
|
+
const element = child;
|
49339
|
+
if (element.type === reactExports.Fragment) {
|
49340
|
+
return flattenChildren(element.props.children);
|
49341
|
+
}
|
49342
|
+
return element;
|
49343
|
+
}
|
49344
|
+
return [];
|
49345
|
+
});
|
49346
|
+
};
|
49414
49347
|
function escapeSelector(id) {
|
49415
49348
|
return id.replace(/([ #.;,?!+*~'":^$[\]()=>|/\\])/g, "\\$1");
|
49416
49349
|
}
|
@@ -49489,7 +49422,7 @@ self.onmessage = function (e) {
|
|
49489
49422
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(RenderedContent, { id: id2, entry: entry2 })
|
49490
49423
|
}
|
49491
49424
|
)
|
49492
|
-
] });
|
49425
|
+
] }, `${baseId}-record-${index2}`);
|
49493
49426
|
});
|
49494
49427
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id, className: clsx(className2, styles$H.grid), style: style2, children: entryEls });
|
49495
49428
|
};
|
@@ -49753,9 +49686,9 @@ self.onmessage = function (e) {
|
|
49753
49686
|
value: usage.total_tokens,
|
49754
49687
|
secondary: false
|
49755
49688
|
});
|
49756
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-size-small", styles$E.wrapper), children: rows.map((row2) => {
|
49689
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-size-small", styles$E.wrapper), children: rows.map((row2, idx) => {
|
49757
49690
|
if (row2.label === "---") {
|
49758
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$E.separator });
|
49691
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$E.separator }, `$usage-sep-${idx}`);
|
49759
49692
|
} else {
|
49760
49693
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [
|
49761
49694
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -49770,7 +49703,7 @@ self.onmessage = function (e) {
|
|
49770
49703
|
}
|
49771
49704
|
),
|
49772
49705
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$E.col3, children: row2.value ? formatNumber(row2.value) : "" })
|
49773
|
-
] });
|
49706
|
+
] }, `$usage-row-${idx}`);
|
49774
49707
|
}
|
49775
49708
|
}) });
|
49776
49709
|
};
|
@@ -49863,7 +49796,14 @@ self.onmessage = function (e) {
|
|
49863
49796
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(TokenTable, { className: className2, children: [
|
49864
49797
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TokenHeader, {}),
|
49865
49798
|
/* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { children: Object.keys(model_usage).map((key2) => {
|
49866
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
49799
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
49800
|
+
TokenRow,
|
49801
|
+
{
|
49802
|
+
model: `${key2}-token-row`,
|
49803
|
+
usage: model_usage[key2]
|
49804
|
+
},
|
49805
|
+
key2
|
49806
|
+
);
|
49867
49807
|
}) })
|
49868
49808
|
] });
|
49869
49809
|
};
|
@@ -50307,7 +50247,7 @@ self.onmessage = function (e) {
|
|
50307
50247
|
}).join(" ")}`
|
50308
50248
|
},
|
50309
50249
|
children: [
|
50310
|
-
columns.map((col) => {
|
50250
|
+
columns.map((col, idx) => {
|
50311
50251
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
50312
50252
|
"div",
|
50313
50253
|
{
|
@@ -50318,10 +50258,11 @@ self.onmessage = function (e) {
|
|
50318
50258
|
col.center ? styles$y.centerLabel : void 0
|
50319
50259
|
),
|
50320
50260
|
children: col.label
|
50321
|
-
}
|
50261
|
+
},
|
50262
|
+
`sample-summ-lbl-${idx}`
|
50322
50263
|
);
|
50323
50264
|
}),
|
50324
|
-
columns.map((col) => {
|
50265
|
+
columns.map((col, idx) => {
|
50325
50266
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
50326
50267
|
"div",
|
50327
50268
|
{
|
@@ -50331,7 +50272,8 @@ self.onmessage = function (e) {
|
|
50331
50272
|
col.center ? styles$y.centerLabel : void 0
|
50332
50273
|
),
|
50333
50274
|
children: col.value
|
50334
|
-
}
|
50275
|
+
},
|
50276
|
+
`sample-summ-val-${idx}`
|
50335
50277
|
);
|
50336
50278
|
})
|
50337
50279
|
]
|
@@ -50459,7 +50401,8 @@ self.onmessage = function (e) {
|
|
50459
50401
|
title: nav2.title,
|
50460
50402
|
selectedNav,
|
50461
50403
|
setSelectedNav
|
50462
|
-
}
|
50404
|
+
},
|
50405
|
+
nav2.title
|
50463
50406
|
);
|
50464
50407
|
})
|
50465
50408
|
}
|
@@ -50611,7 +50554,8 @@ self.onmessage = function (e) {
|
|
50611
50554
|
id: id2,
|
50612
50555
|
className: clsx("tab-pane", "show", isSelected ? "active" : ""),
|
50613
50556
|
children: child
|
50614
|
-
}
|
50557
|
+
},
|
50558
|
+
`children-${id2}-${index2}`
|
50615
50559
|
);
|
50616
50560
|
})
|
50617
50561
|
}
|
@@ -50676,7 +50620,7 @@ self.onmessage = function (e) {
|
|
50676
50620
|
EventPanel,
|
50677
50621
|
{
|
50678
50622
|
id,
|
50679
|
-
title: "Info",
|
50623
|
+
title: "Info" + (event.source ? ": " + event.source : ""),
|
50680
50624
|
className: className2,
|
50681
50625
|
subTitle: formatDateTime(new Date(event.timestamp)),
|
50682
50626
|
icon: ApplicationIcons.info,
|
@@ -50918,11 +50862,11 @@ self.onmessage = function (e) {
|
|
50918
50862
|
) }) });
|
50919
50863
|
};
|
50920
50864
|
const ToolsConfig = ({ tools: tools2 }) => {
|
50921
|
-
const toolEls = tools2.map((tool2) => {
|
50865
|
+
const toolEls = tools2.map((tool2, idx) => {
|
50922
50866
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [
|
50923
50867
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-style-label", "text-style-secondary"), children: tool2.name }),
|
50924
50868
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: tool2.description })
|
50925
|
-
] });
|
50869
|
+
] }, `${tool2.name}-${idx}`);
|
50926
50870
|
});
|
50927
50871
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$q.toolConfig, children: toolEls });
|
50928
50872
|
};
|
@@ -50950,13 +50894,13 @@ self.onmessage = function (e) {
|
|
50950
50894
|
if (event.sample.files && Object.keys(event.sample.files).length > 0) {
|
50951
50895
|
sections.push(
|
50952
50896
|
/* @__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
|
-
}) })
|
50897
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: styles$p.noMargin, children: file }, `sample-init-file-${file}`);
|
50898
|
+
}) }, `sample-${id}-init-files`)
|
50955
50899
|
);
|
50956
50900
|
}
|
50957
50901
|
if (event.sample.setup) {
|
50958
50902
|
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 }) }) })
|
50903
|
+
/* @__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
50904
|
);
|
50961
50905
|
}
|
50962
50906
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
@@ -50984,11 +50928,11 @@ self.onmessage = function (e) {
|
|
50984
50928
|
String.fromCharCode(65 + index2),
|
50985
50929
|
") ",
|
50986
50930
|
choice
|
50987
|
-
] });
|
50931
|
+
] }, `$choice-{choice}`);
|
50988
50932
|
}) : "",
|
50989
50933
|
sections.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$p.section, children: sections }) : "",
|
50990
50934
|
/* @__PURE__ */ jsxRuntimeExports.jsx(EventSection, { title: "Target", children: toArray(event.sample.target).map((target2) => {
|
50991
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: target2 });
|
50935
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: target2 }, target2);
|
50992
50936
|
}) })
|
50993
50937
|
] })
|
50994
50938
|
] }),
|
@@ -51080,7 +51024,7 @@ self.onmessage = function (e) {
|
|
51080
51024
|
EventPanel,
|
51081
51025
|
{
|
51082
51026
|
id,
|
51083
|
-
title: "Score",
|
51027
|
+
title: (event.intermediate ? "Intermediate " : "") + "Score",
|
51084
51028
|
className: clsx(className2, "text-size-small"),
|
51085
51029
|
subTitle: formatDateTime(new Date(event.timestamp)),
|
51086
51030
|
icon: ApplicationIcons.scorer,
|
@@ -57658,7 +57602,8 @@ ${events}
|
|
57658
57602
|
{
|
57659
57603
|
id: "system_msg_event_preview",
|
57660
57604
|
messages: [message2]
|
57661
|
-
}
|
57605
|
+
},
|
57606
|
+
"system_msg_event_preview"
|
57662
57607
|
);
|
57663
57608
|
}
|
57664
57609
|
};
|
@@ -57740,7 +57685,8 @@ ${events}
|
|
57740
57685
|
answer: answer2,
|
57741
57686
|
runtime,
|
57742
57687
|
sessionLogs: Object.values(sessions)
|
57743
|
-
}
|
57688
|
+
},
|
57689
|
+
"human_baseline_view"
|
57744
57690
|
);
|
57745
57691
|
}
|
57746
57692
|
};
|
@@ -57791,8 +57737,8 @@ ${events}
|
|
57791
57737
|
}
|
57792
57738
|
),
|
57793
57739
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-size-base"), children: toolsInfo[key2] })
|
57794
|
-
] });
|
57795
|
-
}) });
|
57740
|
+
] }, key2);
|
57741
|
+
}) }, "state-diff-tools");
|
57796
57742
|
};
|
57797
57743
|
const RenderableChangeTypes = [
|
57798
57744
|
system_msg_added_sig,
|
@@ -57803,11 +57749,18 @@ ${events}
|
|
57803
57749
|
human_baseline_session
|
57804
57750
|
];
|
57805
57751
|
const Tools = ({ toolDefinitions }) => {
|
57806
|
-
return toolDefinitions.map((toolDefinition) => {
|
57752
|
+
return toolDefinitions.map((toolDefinition, idx) => {
|
57807
57753
|
var _a2;
|
57808
57754
|
const toolName = toolDefinition.name;
|
57809
57755
|
const toolArgs = ((_a2 = toolDefinition.parameters) == null ? void 0 : _a2.properties) ? Object.keys(toolDefinition.parameters.properties) : [];
|
57810
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
57756
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
57757
|
+
Tool,
|
57758
|
+
{
|
57759
|
+
toolName,
|
57760
|
+
toolArgs
|
57761
|
+
},
|
57762
|
+
`${toolName}-${idx}`
|
57763
|
+
);
|
57811
57764
|
});
|
57812
57765
|
};
|
57813
57766
|
const Tool = ({ toolName, toolArgs }) => {
|
@@ -57830,36 +57783,20 @@ ${events}
|
|
57830
57783
|
}) => {
|
57831
57784
|
const summary2 = summarizeChanges(event.changes);
|
57832
57785
|
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
57786
|
const changePreview = generatePreview(
|
57845
57787
|
event.changes,
|
57846
57788
|
structuredClone(after),
|
57847
57789
|
isStore
|
57848
57790
|
);
|
57849
|
-
if (changePreview) {
|
57850
|
-
tabs2.unshift(
|
57851
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { "data-name": "Summary", className: clsx(styles$m.summary), children: changePreview })
|
57852
|
-
);
|
57853
|
-
}
|
57854
57791
|
const title2 = event.event === "state" ? "State Updated" : "Store Updated";
|
57855
|
-
return /* @__PURE__ */ jsxRuntimeExports.
|
57792
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
57856
57793
|
EventPanel,
|
57857
57794
|
{
|
57858
57795
|
id,
|
57859
57796
|
title: title2,
|
57860
57797
|
className: className2,
|
57861
57798
|
subTitle: formatDateTime(new Date(event.timestamp)),
|
57862
|
-
text:
|
57799
|
+
text: !changePreview ? summary2 : void 0,
|
57863
57800
|
collapse: changePreview === void 0 ? true : void 0,
|
57864
57801
|
selectedNav: eventState.selectedNav || "",
|
57865
57802
|
setSelectedNav: (selectedNav) => {
|
@@ -57869,7 +57806,18 @@ ${events}
|
|
57869
57806
|
setCollapsed: (collapsed) => {
|
57870
57807
|
setEventState({ ...eventState, collapsed });
|
57871
57808
|
},
|
57872
|
-
children:
|
57809
|
+
children: [
|
57810
|
+
changePreview ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { "data-name": "Summary", className: clsx(styles$m.summary), children: changePreview }) : void 0,
|
57811
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
57812
|
+
StateDiffView,
|
57813
|
+
{
|
57814
|
+
before,
|
57815
|
+
after,
|
57816
|
+
"data-name": "Diff",
|
57817
|
+
className: clsx(styles$m.diff)
|
57818
|
+
}
|
57819
|
+
)
|
57820
|
+
]
|
57873
57821
|
}
|
57874
57822
|
);
|
57875
57823
|
};
|
@@ -57914,7 +57862,8 @@ ${events}
|
|
57914
57862
|
}
|
57915
57863
|
}
|
57916
57864
|
if (matchingOps === requiredMatchCount) {
|
57917
|
-
|
57865
|
+
const el = changeType.render(changes, resolvedState);
|
57866
|
+
results.push(el);
|
57918
57867
|
break;
|
57919
57868
|
}
|
57920
57869
|
}
|
@@ -58286,9 +58235,9 @@ ${events}
|
|
58286
58235
|
className: className2
|
58287
58236
|
}) => {
|
58288
58237
|
var _a2, _b2;
|
58289
|
-
const { input: input2, functionCall,
|
58290
|
-
event.function,
|
58291
|
-
event.arguments
|
58238
|
+
const { input: input2, functionCall, highlightLanguage } = reactExports.useMemo(
|
58239
|
+
() => resolveToolInput(event.function, event.arguments),
|
58240
|
+
[event.function, event.arguments]
|
58292
58241
|
);
|
58293
58242
|
const approvalEvent = event.events.find((e) => {
|
58294
58243
|
return e.event === "approval";
|
@@ -58317,7 +58266,7 @@ ${events}
|
|
58317
58266
|
{
|
58318
58267
|
functionCall,
|
58319
58268
|
input: input2,
|
58320
|
-
|
58269
|
+
highlightLanguage,
|
58321
58270
|
output: ((_b2 = event.error) == null ? void 0 : _b2.message) || event.result,
|
58322
58271
|
mode: "compact",
|
58323
58272
|
view: event.view ? event.view : void 0
|
@@ -58758,7 +58707,8 @@ ${events}
|
|
58758
58707
|
onClick: () => {
|
58759
58708
|
printSample(id, targetId);
|
58760
58709
|
}
|
58761
|
-
}
|
58710
|
+
},
|
58711
|
+
"sample-print-tool"
|
58762
58712
|
)
|
58763
58713
|
);
|
58764
58714
|
}
|
@@ -58797,7 +58747,8 @@ ${events}
|
|
58797
58747
|
},
|
58798
58748
|
`${baseId}-transcript-display-${id}`
|
58799
58749
|
)
|
58800
|
-
}
|
58750
|
+
},
|
58751
|
+
kSampleTranscriptTabId
|
58801
58752
|
) : null,
|
58802
58753
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
58803
58754
|
TabPanel,
|
@@ -58819,7 +58770,8 @@ ${events}
|
|
58819
58770
|
},
|
58820
58771
|
`${baseId}-chat-${id}`
|
58821
58772
|
)
|
58822
|
-
}
|
58773
|
+
},
|
58774
|
+
kSampleMessagesTabId
|
58823
58775
|
),
|
58824
58776
|
scorerNames.length === 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
58825
58777
|
TabPanel,
|
@@ -58837,7 +58789,8 @@ ${events}
|
|
58837
58789
|
scorer: scorerNames[0]
|
58838
58790
|
}
|
58839
58791
|
)
|
58840
|
-
}
|
58792
|
+
},
|
58793
|
+
kSampleScoringTabId
|
58841
58794
|
) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: Object.keys(sample2.scores || {}).map((scorer) => {
|
58842
58795
|
const tabId = `score-${scorer}`;
|
58843
58796
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -58856,7 +58809,8 @@ ${events}
|
|
58856
58809
|
scorer
|
58857
58810
|
}
|
58858
58811
|
)
|
58859
|
-
}
|
58812
|
+
},
|
58813
|
+
tabId
|
58860
58814
|
);
|
58861
58815
|
}) }),
|
58862
58816
|
sampleMetadatas.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -58903,7 +58857,7 @@ ${events}
|
|
58903
58857
|
)
|
58904
58858
|
] });
|
58905
58859
|
};
|
58906
|
-
const metadataViewsForSample = (
|
58860
|
+
const metadataViewsForSample = (id, sample2) => {
|
58907
58861
|
const sampleMetadatas = [];
|
58908
58862
|
if (sample2.model_usage && Object.keys(sample2.model_usage).length > 0) {
|
58909
58863
|
sampleMetadatas.push(
|
@@ -58916,7 +58870,7 @@ ${events}
|
|
58916
58870
|
className: clsx(styles$A.noTop)
|
58917
58871
|
}
|
58918
58872
|
) })
|
58919
|
-
] })
|
58873
|
+
] }, `sample-usage-${id}`)
|
58920
58874
|
);
|
58921
58875
|
}
|
58922
58876
|
if (Object.keys(sample2 == null ? void 0 : sample2.metadata).length > 0) {
|
@@ -58931,7 +58885,7 @@ ${events}
|
|
58931
58885
|
className: clsx("tab-pane", styles$A.noTop)
|
58932
58886
|
}
|
58933
58887
|
) })
|
58934
|
-
] })
|
58888
|
+
] }, `sample-metadata-${id}`)
|
58935
58889
|
);
|
58936
58890
|
}
|
58937
58891
|
if (Object.keys(sample2 == null ? void 0 : sample2.store).length > 0) {
|
@@ -58946,7 +58900,7 @@ ${events}
|
|
58946
58900
|
className: clsx("tab-pane", styles$A.noTop)
|
58947
58901
|
}
|
58948
58902
|
) })
|
58949
|
-
] })
|
58903
|
+
] }, `sample-store-${id}`)
|
58950
58904
|
);
|
58951
58905
|
}
|
58952
58906
|
return sampleMetadatas;
|
@@ -59090,40 +59044,6 @@ ${events}
|
|
59090
59044
|
},
|
59091
59045
|
[setInitialScrollPosition]
|
59092
59046
|
);
|
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
59047
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
59128
59048
|
"div",
|
59129
59049
|
{
|
@@ -59146,7 +59066,39 @@ ${events}
|
|
59146
59066
|
),
|
59147
59067
|
role: "document",
|
59148
59068
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx("modal-content", styles$h.content), children: [
|
59149
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
59069
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx("modal-header", styles$h.header), children: [
|
59070
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
59071
|
+
"div",
|
59072
|
+
{
|
59073
|
+
className: clsx("modal-title", "text-size-smaller", styles$h.title),
|
59074
|
+
children: title2 || ""
|
59075
|
+
}
|
59076
|
+
),
|
59077
|
+
detail2 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$h.detail, children: [
|
59078
|
+
(detailTools == null ? void 0 : detailTools.left) ? detailTools.left.map((tool2, idx) => {
|
59079
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TitleTool, { ...tool2 }, `tool-left-${idx}`);
|
59080
|
+
}) : "",
|
59081
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-size-smaller", styles$h.detailText), children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: detail2 }) }),
|
59082
|
+
(detailTools == null ? void 0 : detailTools.right) ? detailTools.right.map((tool2, idx) => {
|
59083
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TitleTool, { ...tool2 }, `tool-right-${idx}`);
|
59084
|
+
}) : ""
|
59085
|
+
] }) : void 0,
|
59086
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
59087
|
+
"button",
|
59088
|
+
{
|
59089
|
+
type: "button",
|
59090
|
+
className: clsx(
|
59091
|
+
"btn",
|
59092
|
+
"btn-close-large-dialog",
|
59093
|
+
"text-size-larger",
|
59094
|
+
styles$h.close
|
59095
|
+
),
|
59096
|
+
onClick: onHide,
|
59097
|
+
"aria-label": "Close",
|
59098
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(HtmlEntity, { html: "×" })
|
59099
|
+
}
|
59100
|
+
)
|
59101
|
+
] }),
|
59150
59102
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ProgressBar, { animating: showProgress }),
|
59151
59103
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "modal-body", ref: scrollRef, onScroll, children: children2 }),
|
59152
59104
|
modalFooter
|
@@ -60050,7 +60002,7 @@ ${events}
|
|
60050
60002
|
}
|
60051
60003
|
),
|
60052
60004
|
index2 < steps.length - 1 ? separator2 : ""
|
60053
|
-
] });
|
60005
|
+
] }, `solver-step-${index2}`);
|
60054
60006
|
});
|
60055
60007
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.container, children: details });
|
60056
60008
|
};
|
@@ -60164,7 +60116,8 @@ ${events}
|
|
60164
60116
|
name: key2,
|
60165
60117
|
scores: scorers[key2].scores,
|
60166
60118
|
params: scorers[key2].params
|
60167
|
-
}
|
60119
|
+
},
|
60120
|
+
key2
|
60168
60121
|
);
|
60169
60122
|
});
|
60170
60123
|
taskColumns.push({
|
@@ -60191,7 +60144,8 @@ ${events}
|
|
60191
60144
|
className: "text-size-small",
|
60192
60145
|
entries: taskInformation,
|
60193
60146
|
tableOptions: "sm"
|
60194
|
-
}
|
60147
|
+
},
|
60148
|
+
`plan-md-task`
|
60195
60149
|
)
|
60196
60150
|
});
|
60197
60151
|
if (task_args && Object.keys(task_args).length > 0) {
|
@@ -60204,7 +60158,8 @@ ${events}
|
|
60204
60158
|
className: "text-size-small",
|
60205
60159
|
entries: task_args,
|
60206
60160
|
tableOptions: "sm"
|
60207
|
-
}
|
60161
|
+
},
|
60162
|
+
`plan-md-task-args`
|
60208
60163
|
)
|
60209
60164
|
});
|
60210
60165
|
}
|
@@ -60218,7 +60173,8 @@ ${events}
|
|
60218
60173
|
className: "text-size-small",
|
60219
60174
|
entries: model_args,
|
60220
60175
|
tableOptions: "sm"
|
60221
|
-
}
|
60176
|
+
},
|
60177
|
+
`plan-md-model-args`
|
60222
60178
|
)
|
60223
60179
|
});
|
60224
60180
|
}
|
@@ -60232,7 +60188,8 @@ ${events}
|
|
60232
60188
|
className: "text-size-small",
|
60233
60189
|
entries: config2,
|
60234
60190
|
tableOptions: "sm"
|
60235
|
-
}
|
60191
|
+
},
|
60192
|
+
`plan-md-config`
|
60236
60193
|
)
|
60237
60194
|
});
|
60238
60195
|
}
|
@@ -60249,7 +60206,8 @@ ${events}
|
|
60249
60206
|
className: "text-size-small",
|
60250
60207
|
entries: generate_record,
|
60251
60208
|
tableOptions: "sm"
|
60252
|
-
}
|
60209
|
+
},
|
60210
|
+
`plan-md-generate-config`
|
60253
60211
|
)
|
60254
60212
|
});
|
60255
60213
|
}
|
@@ -60263,7 +60221,8 @@ ${events}
|
|
60263
60221
|
className: "text-size-small",
|
60264
60222
|
entries: metadata2,
|
60265
60223
|
tableOptions: "sm"
|
60266
|
-
}
|
60224
|
+
},
|
60225
|
+
`plan-md-metadata`
|
60267
60226
|
)
|
60268
60227
|
});
|
60269
60228
|
}
|
@@ -60276,12 +60235,28 @@ ${events}
|
|
60276
60235
|
gridTemplateColumns: `repeat(${taskColumns.length}, auto)`
|
60277
60236
|
},
|
60278
60237
|
children: taskColumns.map((col) => {
|
60279
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60238
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60239
|
+
PlanColumn,
|
60240
|
+
{
|
60241
|
+
title: col.title,
|
60242
|
+
className: col.className,
|
60243
|
+
children: col.contents
|
60244
|
+
},
|
60245
|
+
`plan-col-${col.title}`
|
60246
|
+
);
|
60280
60247
|
})
|
60281
60248
|
}
|
60282
60249
|
),
|
60283
60250
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$9.row), children: metadataColumns.map((col) => {
|
60284
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60251
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60252
|
+
PlanColumn,
|
60253
|
+
{
|
60254
|
+
title: col.title,
|
60255
|
+
className: col.className,
|
60256
|
+
children: col.contents
|
60257
|
+
},
|
60258
|
+
`plan-col-${col.title}`
|
60259
|
+
);
|
60285
60260
|
}) })
|
60286
60261
|
] });
|
60287
60262
|
};
|
@@ -60412,23 +60387,6 @@ ${events}
|
|
60412
60387
|
reactExports.useEffect(() => {
|
60413
60388
|
setHidden(false);
|
60414
60389
|
}, [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
60390
|
const showWarning = (!samples || samples.length === 0) && evalStatus === "success" && (evalSpec == null ? void 0 : evalSpec.dataset.samples) && evalSpec.dataset.samples > 0;
|
60433
60391
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { width: "100%" }, children: [
|
60434
60392
|
showWarning ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -60440,7 +60398,18 @@ ${events}
|
|
60440
60398
|
type: "warning"
|
60441
60399
|
}
|
60442
60400
|
) : "",
|
60443
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
60401
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { padding: "0.5em 1em 0 1em", width: "100%" }, children: [
|
60402
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
60403
|
+
PlanCard,
|
60404
|
+
{
|
60405
|
+
evalSpec,
|
60406
|
+
evalPlan,
|
60407
|
+
scores: evalResults == null ? void 0 : evalResults.scores
|
60408
|
+
}
|
60409
|
+
),
|
60410
|
+
evalStatus !== "started" ? /* @__PURE__ */ jsxRuntimeExports.jsx(UsageCard, { stats: evalStats }) : void 0,
|
60411
|
+
evalStatus === "error" && evalError ? /* @__PURE__ */ jsxRuntimeExports.jsx(TaskErrorCard, { error: evalError }) : void 0
|
60412
|
+
] })
|
60444
60413
|
] });
|
60445
60414
|
};
|
60446
60415
|
const navbarContainer = "_navbarContainer_838qu_1";
|
@@ -60529,25 +60498,31 @@ ${events}
|
|
60529
60498
|
taskStatus,
|
60530
60499
|
secondaryContainer
|
60531
60500
|
};
|
60532
|
-
const simpleMetricsRows = "
|
60533
|
-
const multiMetricsRows = "
|
60534
|
-
const verticalMetricReducer = "
|
60535
|
-
const verticalMetricName = "
|
60536
|
-
const verticalMetricValue = "
|
60537
|
-
const
|
60538
|
-
const
|
60539
|
-
const
|
60540
|
-
const
|
60501
|
+
const simpleMetricsRows = "_simpleMetricsRows_tnqkm_1";
|
60502
|
+
const multiMetricsRows = "_multiMetricsRows_tnqkm_12";
|
60503
|
+
const verticalMetricReducer = "_verticalMetricReducer_tnqkm_26";
|
60504
|
+
const verticalMetricName = "_verticalMetricName_tnqkm_33";
|
60505
|
+
const verticalMetricValue = "_verticalMetricValue_tnqkm_41";
|
60506
|
+
const multiScorer = "_multiScorer_tnqkm_46";
|
60507
|
+
const multiScorerIndent = "_multiScorerIndent_tnqkm_54";
|
60508
|
+
const multiScorerReducer = "_multiScorerReducer_tnqkm_58";
|
60509
|
+
const multiScorerLabel = "_multiScorerLabel_tnqkm_64";
|
60510
|
+
const multiScorerValue = "_multiScorerValue_tnqkm_70";
|
60511
|
+
const multiScorerValueContent = "_multiScorerValueContent_tnqkm_79";
|
60512
|
+
const multiScoreMetricGrid = "_multiScoreMetricGrid_tnqkm_84";
|
60541
60513
|
const styles$3 = {
|
60542
60514
|
simpleMetricsRows,
|
60543
60515
|
multiMetricsRows,
|
60544
60516
|
verticalMetricReducer,
|
60545
60517
|
verticalMetricName,
|
60546
60518
|
verticalMetricValue,
|
60519
|
+
multiScorer,
|
60520
|
+
multiScorerIndent,
|
60547
60521
|
multiScorerReducer,
|
60548
60522
|
multiScorerLabel,
|
60549
60523
|
multiScorerValue,
|
60550
|
-
multiScorerValueContent
|
60524
|
+
multiScorerValueContent,
|
60525
|
+
multiScoreMetricGrid
|
60551
60526
|
};
|
60552
60527
|
const ResultsPanel = ({ results }) => {
|
60553
60528
|
var _a2, _b2;
|
@@ -60560,37 +60535,45 @@ ${events}
|
|
60560
60535
|
metric: {
|
60561
60536
|
name: key2,
|
60562
60537
|
value: score2.metrics[key2].value,
|
60563
|
-
|
60538
|
+
params: score2.metrics[key2].params,
|
60564
60539
|
metadata: {}
|
60565
60540
|
}
|
60566
60541
|
};
|
60567
60542
|
});
|
60568
60543
|
});
|
60569
60544
|
const metrics = Object.values(scorers)[0];
|
60545
|
+
const showReducer = !!metrics[0].reducer;
|
60570
60546
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$3.simpleMetricsRows, children: metrics.map((metric2, i2) => {
|
60571
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60547
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60548
|
+
VerticalMetric,
|
60549
|
+
{
|
60550
|
+
metricSummary: metric2,
|
60551
|
+
isFirst: i2 === 0,
|
60552
|
+
showReducer
|
60553
|
+
},
|
60554
|
+
`simple-metric-${i2}`
|
60555
|
+
);
|
60572
60556
|
}) });
|
60573
60557
|
} else {
|
60558
|
+
const showReducer = (results == null ? void 0 : results.scores.findIndex((score2) => !!score2.reducer)) !== -1;
|
60574
60559
|
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(
|
60560
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60561
|
+
MultiScorerMetric,
|
60562
|
+
{
|
60563
|
+
scorer: score2,
|
60564
|
+
isFirst: index2 === 0,
|
60565
|
+
showReducer
|
60566
|
+
},
|
60567
|
+
`multi-metric-${index2}`
|
60568
|
+
);
|
60576
60569
|
}) });
|
60577
60570
|
}
|
60578
60571
|
};
|
60579
60572
|
const VerticalMetric = ({
|
60580
60573
|
metricSummary,
|
60581
|
-
isFirst
|
60574
|
+
isFirst,
|
60575
|
+
showReducer
|
60582
60576
|
}) => {
|
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
60577
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { paddingLeft: isFirst ? "0" : "1em" }, children: [
|
60595
60578
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
60596
60579
|
"div",
|
@@ -60601,14 +60584,28 @@ ${events}
|
|
60601
60584
|
"text-style-secondary",
|
60602
60585
|
styles$3.verticalMetricName
|
60603
60586
|
),
|
60604
|
-
children: metricSummary.metric
|
60587
|
+
children: metricDisplayName(metricSummary.metric)
|
60605
60588
|
}
|
60606
60589
|
),
|
60607
|
-
|
60590
|
+
showReducer ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60591
|
+
"div",
|
60592
|
+
{
|
60593
|
+
className: clsx(
|
60594
|
+
"text-style-label",
|
60595
|
+
"text-style-secondary",
|
60596
|
+
styles$3.verticalMetricReducer
|
60597
|
+
),
|
60598
|
+
children: metricSummary.reducer || "default"
|
60599
|
+
}
|
60600
|
+
) : void 0,
|
60608
60601
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
60609
60602
|
"div",
|
60610
60603
|
{
|
60611
|
-
className: clsx(
|
60604
|
+
className: clsx(
|
60605
|
+
"vertical-metric-value",
|
60606
|
+
"text-size-largest",
|
60607
|
+
styles$3.verticalMetricValue
|
60608
|
+
),
|
60612
60609
|
children: formatPrettyDecimal(metricSummary.metric.value)
|
60613
60610
|
}
|
60614
60611
|
)
|
@@ -60616,46 +60613,55 @@ ${events}
|
|
60616
60613
|
};
|
60617
60614
|
const MultiScorerMetric = ({
|
60618
60615
|
scorer,
|
60619
|
-
isFirst
|
60616
|
+
isFirst,
|
60617
|
+
showReducer
|
60620
60618
|
}) => {
|
60621
60619
|
const titleFontClz = "text-size-base";
|
60622
60620
|
const reducerFontClz = "text-size-smaller";
|
60623
60621
|
const valueFontClz = "text-size-base";
|
60624
|
-
|
60622
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
60625
60623
|
"div",
|
60626
60624
|
{
|
60627
60625
|
className: clsx(
|
60628
|
-
|
60629
|
-
|
60630
|
-
"text-style-secondary",
|
60631
|
-
styles$3.multiScorerReducer
|
60626
|
+
styles$3.multiScorer,
|
60627
|
+
isFirst ? styles$3.multiScorerIndent : void 0
|
60632
60628
|
),
|
60633
|
-
children:
|
60634
|
-
|
60635
|
-
|
60636
|
-
|
60637
|
-
|
60638
|
-
|
60639
|
-
|
60640
|
-
|
60641
|
-
|
60642
|
-
|
60643
|
-
|
60644
|
-
|
60645
|
-
|
60629
|
+
children: [
|
60630
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
60631
|
+
"div",
|
60632
|
+
{
|
60633
|
+
className: clsx(
|
60634
|
+
titleFontClz,
|
60635
|
+
"text-style-label",
|
60636
|
+
"text-style-secondary",
|
60637
|
+
"multi-score-label",
|
60638
|
+
styles$3.multiScorerLabel
|
60639
|
+
),
|
60640
|
+
children: scorer.name
|
60641
|
+
}
|
60646
60642
|
),
|
60647
|
-
|
60648
|
-
|
60649
|
-
|
60650
|
-
|
60651
|
-
|
60652
|
-
|
60653
|
-
|
60654
|
-
|
60655
|
-
|
60656
|
-
|
60657
|
-
|
60658
|
-
|
60643
|
+
showReducer ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
60644
|
+
"div",
|
60645
|
+
{
|
60646
|
+
className: clsx(
|
60647
|
+
reducerFontClz,
|
60648
|
+
"text-style-label",
|
60649
|
+
"text-style-secondary",
|
60650
|
+
styles$3.multiScorerReducer
|
60651
|
+
),
|
60652
|
+
children: scorer.reducer || "default"
|
60653
|
+
}
|
60654
|
+
) : void 0,
|
60655
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(valueFontClz, styles$3.multiScorerValue), children: Object.keys(scorer.metrics).map((key2) => {
|
60656
|
+
const metric2 = scorer.metrics[key2];
|
60657
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$3.multiScoreMetricGrid, children: [
|
60658
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: metricDisplayName(metric2) }),
|
60659
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$3.multiScorerValueContent, children: formatPrettyDecimal(metric2.value) })
|
60660
|
+
] }, key2);
|
60661
|
+
}) })
|
60662
|
+
]
|
60663
|
+
}
|
60664
|
+
);
|
60659
60665
|
};
|
60660
60666
|
const statusPanel = "_statusPanel_1fzh4_1";
|
60661
60667
|
const statusIcon = "_statusIcon_1fzh4_10";
|
@@ -60725,16 +60731,6 @@ ${events}
|
|
60725
60731
|
evalSpec,
|
60726
60732
|
setOffcanvas
|
60727
60733
|
}) => {
|
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
60734
|
const logFileName = file ? filename(file) : "";
|
60739
60735
|
const handleToggle = reactExports.useCallback(() => {
|
60740
60736
|
setOffcanvas(!offcanvas);
|
@@ -60798,7 +60794,12 @@ ${events}
|
|
60798
60794
|
]
|
60799
60795
|
}
|
60800
60796
|
),
|
60801
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
60797
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$4.taskStatus, "navbar-text"), children: [
|
60798
|
+
status === "success" ? /* @__PURE__ */ jsxRuntimeExports.jsx(ResultsPanel, { results: evalResults }) : void 0,
|
60799
|
+
status === "cancelled" ? /* @__PURE__ */ jsxRuntimeExports.jsx(CancelledPanel, { sampleCount: (samples == null ? void 0 : samples.length) || 0 }) : void 0,
|
60800
|
+
status === "started" ? /* @__PURE__ */ jsxRuntimeExports.jsx(RunningPanel, { sampleCount: (samples == null ? void 0 : samples.length) || 0 }) : void 0,
|
60801
|
+
status === "error" ? /* @__PURE__ */ jsxRuntimeExports.jsx(ErroredPanel, { sampleCount: (samples == null ? void 0 : samples.length) || 0 }) : void 0
|
60802
|
+
] }),
|
60802
60803
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "task-created", style: { display: "none" }, children: evalSpec == null ? void 0 : evalSpec.created })
|
60803
60804
|
] });
|
60804
60805
|
};
|
@@ -60882,7 +60883,8 @@ ${events}
|
|
60882
60883
|
epochs
|
60883
60884
|
}
|
60884
60885
|
)
|
60885
|
-
}
|
60886
|
+
},
|
60887
|
+
"sb-dataset"
|
60886
60888
|
)
|
60887
60889
|
});
|
60888
60890
|
const label2 = (evalResults == null ? void 0 : evalResults.scores) && evalResults.scores.length > 1 ? "Scorers" : "Scorer";
|
@@ -60898,7 +60900,8 @@ ${events}
|
|
60898
60900
|
"text-size-small"
|
60899
60901
|
),
|
60900
60902
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ScorerSummary, { evalDescriptor })
|
60901
|
-
}
|
60903
|
+
},
|
60904
|
+
"sb-scorer"
|
60902
60905
|
)
|
60903
60906
|
});
|
60904
60907
|
if (hasConfig) {
|
@@ -60910,7 +60913,8 @@ ${events}
|
|
60910
60913
|
label: "Config",
|
60911
60914
|
className: clsx(styles$1.justifyRight, "text-size-small"),
|
60912
60915
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ParamSummary, { params: hyperparameters })
|
60913
|
-
}
|
60916
|
+
},
|
60917
|
+
"sb-params"
|
60914
60918
|
)
|
60915
60919
|
});
|
60916
60920
|
}
|
@@ -60927,7 +60931,8 @@ ${events}
|
|
60927
60931
|
label: "Duration",
|
60928
60932
|
className: clsx(styles$1.justifyRight, "text-size-small"),
|
60929
60933
|
children: totalDuration
|
60930
|
-
}
|
60934
|
+
},
|
60935
|
+
"sb-duration"
|
60931
60936
|
)
|
60932
60937
|
});
|
60933
60938
|
}
|
@@ -61085,31 +61090,6 @@ ${events}
|
|
61085
61090
|
},
|
61086
61091
|
[setSelectedTab]
|
61087
61092
|
);
|
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
61093
|
if (evalSpec === void 0) {
|
61114
61094
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(EmptyPanel, {});
|
61115
61095
|
} else {
|
@@ -61152,7 +61132,30 @@ ${events}
|
|
61152
61132
|
className: clsx(styles.tabSet, "text-size-smaller"),
|
61153
61133
|
tabControlsClassName: clsx(styles.tabs, "text-size-smaller"),
|
61154
61134
|
tabPanelsClassName: clsx(styles.tabPanels),
|
61155
|
-
children:
|
61135
|
+
children: Object.keys(tabs2).map((key2) => {
|
61136
|
+
var _a2;
|
61137
|
+
const tab2 = tabs2[key2];
|
61138
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
61139
|
+
TabPanel,
|
61140
|
+
{
|
61141
|
+
id: tab2.id,
|
61142
|
+
title: tab2.label,
|
61143
|
+
onSelected,
|
61144
|
+
selected: selectedTab === tab2.id,
|
61145
|
+
scrollable: !!tab2.scrollable,
|
61146
|
+
scrollRef: tab2.scrollRef,
|
61147
|
+
scrollPosition: (_a2 = workspaceTabScrollPositionRef.current) == null ? void 0 : _a2[tab2.id],
|
61148
|
+
setScrollPosition: reactExports.useCallback(
|
61149
|
+
(position) => {
|
61150
|
+
onScroll(tab2.id, position);
|
61151
|
+
},
|
61152
|
+
[onScroll]
|
61153
|
+
),
|
61154
|
+
children: tab2.content()
|
61155
|
+
},
|
61156
|
+
tab2.id
|
61157
|
+
);
|
61158
|
+
})
|
61156
61159
|
}
|
61157
61160
|
) }) })
|
61158
61161
|
] });
|