@meridianlabs/log-viewer 0.3.185 → 0.3.187
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app/log-list/grid/LogListGrid.d.ts.map +1 -1
- package/lib/app/log-list/grid/columns/types.d.ts +1 -0
- package/lib/app/log-list/grid/columns/types.d.ts.map +1 -1
- package/lib/app/samples/SampleDetailComponent.d.ts.map +1 -1
- package/lib/app/samples/SampleDisplay.d.ts.map +1 -1
- package/lib/app/samples/chat/ChatMessage.d.ts +1 -0
- package/lib/app/samples/chat/ChatMessage.d.ts.map +1 -1
- package/lib/app/samples/chat/ChatMessageRow.d.ts +1 -0
- package/lib/app/samples/chat/ChatMessageRow.d.ts.map +1 -1
- package/lib/app/samples/chat/ChatView.d.ts +1 -0
- package/lib/app/samples/chat/ChatView.d.ts.map +1 -1
- package/lib/app/samples/transcript/ModelEventView.d.ts.map +1 -1
- package/lib/app/samples/transcript/event/utils.d.ts +1 -1
- package/lib/app/samples/transcript/event/utils.d.ts.map +1 -1
- package/lib/components/FindBand.d.ts.map +1 -1
- package/lib/components/FindBandUI.d.ts +18 -0
- package/lib/components/FindBandUI.d.ts.map +1 -0
- package/lib/index.js +313 -140
- package/lib/index.js.map +1 -1
- package/lib/state/sampleSlice.d.ts.map +1 -1
- package/lib/styles/index.css +95 -85
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -17274,7 +17274,6 @@ const createSampleSlice = (set3, get2, _store) => {
|
|
|
17274
17274
|
state.sample.sampleStatus = "loading";
|
|
17275
17275
|
state.sample.sampleError = void 0;
|
|
17276
17276
|
state.sample.sample_identifier = { logFile, id, epoch };
|
|
17277
|
-
state.log.selectedSampleHandle = void 0;
|
|
17278
17277
|
});
|
|
17279
17278
|
},
|
|
17280
17279
|
setSampleStatus: (status2) => set3((state) => {
|
|
@@ -99424,10 +99423,10 @@ const isAnsiOutput = (text2) => {
|
|
|
99424
99423
|
);
|
|
99425
99424
|
return ansiRegex.test(text2);
|
|
99426
99425
|
};
|
|
99427
|
-
const toolImage = "
|
|
99428
|
-
const output = "
|
|
99429
|
-
const textOutput = "
|
|
99430
|
-
const textCode = "
|
|
99426
|
+
const toolImage = "_toolImage_h7uyp_1";
|
|
99427
|
+
const output = "_output_h7uyp_6";
|
|
99428
|
+
const textOutput = "_textOutput_h7uyp_10";
|
|
99429
|
+
const textCode = "_textCode_h7uyp_19";
|
|
99431
99430
|
const styles$1p = {
|
|
99432
99431
|
toolImage,
|
|
99433
99432
|
output,
|
|
@@ -100229,11 +100228,20 @@ const ChatMessage = memo(
|
|
|
100229
100228
|
toolMessages,
|
|
100230
100229
|
indented: indented2,
|
|
100231
100230
|
toolCallStyle,
|
|
100232
|
-
allowLinking = true
|
|
100231
|
+
allowLinking = true,
|
|
100232
|
+
unlabeledRoles
|
|
100233
100233
|
}) => {
|
|
100234
100234
|
const messageUrl = useSampleMessageUrl(message2.id);
|
|
100235
|
-
const collapse = message2.role === "system" || message2.role === "user";
|
|
100236
100235
|
const [mouseOver, setMouseOver] = useState(false);
|
|
100236
|
+
const collapse = message2.role === "system" || message2.role === "user";
|
|
100237
|
+
const hideRole = unlabeledRoles?.includes(message2.role) ?? false;
|
|
100238
|
+
if (hideRole) {
|
|
100239
|
+
const content2 = message2.content;
|
|
100240
|
+
const hasVisibleContent = typeof content2 === "string" ? content2.trim().length > 0 : Array.isArray(content2) && content2.some((c2) => c2.type !== "tool_use");
|
|
100241
|
+
if (!hasVisibleContent) {
|
|
100242
|
+
return null;
|
|
100243
|
+
}
|
|
100244
|
+
}
|
|
100237
100245
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
100238
100246
|
"div",
|
|
100239
100247
|
{
|
|
@@ -100248,7 +100256,7 @@ const ChatMessage = memo(
|
|
|
100248
100256
|
onMouseEnter: () => setMouseOver(true),
|
|
100249
100257
|
onMouseLeave: () => setMouseOver(false),
|
|
100250
100258
|
children: [
|
|
100251
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
100259
|
+
!hideRole && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
100252
100260
|
"div",
|
|
100253
100261
|
{
|
|
100254
100262
|
className: clsx(
|
|
@@ -100339,7 +100347,8 @@ const ChatMessageRow = ({
|
|
|
100339
100347
|
toolCallStyle,
|
|
100340
100348
|
indented: indented2,
|
|
100341
100349
|
highlightUserMessage,
|
|
100342
|
-
allowLinking = true
|
|
100350
|
+
allowLinking = true,
|
|
100351
|
+
unlabeledRoles
|
|
100343
100352
|
}) => {
|
|
100344
100353
|
if (number2) {
|
|
100345
100354
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -100370,7 +100379,8 @@ const ChatMessageRow = ({
|
|
|
100370
100379
|
toolMessages: resolvedMessage.toolMessages,
|
|
100371
100380
|
indented: indented2,
|
|
100372
100381
|
toolCallStyle,
|
|
100373
|
-
allowLinking
|
|
100382
|
+
allowLinking,
|
|
100383
|
+
unlabeledRoles
|
|
100374
100384
|
}
|
|
100375
100385
|
)
|
|
100376
100386
|
]
|
|
@@ -100394,7 +100404,8 @@ const ChatMessageRow = ({
|
|
|
100394
100404
|
toolMessages: resolvedMessage.toolMessages,
|
|
100395
100405
|
indented: indented2,
|
|
100396
100406
|
toolCallStyle,
|
|
100397
|
-
allowLinking
|
|
100407
|
+
allowLinking,
|
|
100408
|
+
unlabeledRoles
|
|
100398
100409
|
}
|
|
100399
100410
|
),
|
|
100400
100411
|
resolvedMessage.message.role === "user" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "10px" } }) : void 0
|
|
@@ -100488,7 +100499,8 @@ const ChatView = ({
|
|
|
100488
100499
|
indented: indented2,
|
|
100489
100500
|
numbered = true,
|
|
100490
100501
|
className: className2,
|
|
100491
|
-
allowLinking = true
|
|
100502
|
+
allowLinking = true,
|
|
100503
|
+
unlabeledRoles
|
|
100492
100504
|
}) => {
|
|
100493
100505
|
const collapsedMessages = resolveToolCallsIntoPreviousMessage ? resolveMessages(messages2) : messages2.map((msg) => {
|
|
100494
100506
|
return {
|
|
@@ -100507,7 +100519,8 @@ const ChatView = ({
|
|
|
100507
100519
|
indented: indented2,
|
|
100508
100520
|
toolCallStyle,
|
|
100509
100521
|
allowLinking,
|
|
100510
|
-
highlightUserMessage: true
|
|
100522
|
+
highlightUserMessage: true,
|
|
100523
|
+
unlabeledRoles
|
|
100511
100524
|
},
|
|
100512
100525
|
`${id}-msg-${index}`
|
|
100513
100526
|
);
|
|
@@ -106556,7 +106569,7 @@ const ViewerOptionsPopover = ({
|
|
|
106556
106569
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1d.fullWidth, styles$1d.fullWidthPadded), children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$1d.logDir, children: logDir2 }) }),
|
|
106557
106570
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1d.spacer) }),
|
|
106558
106571
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-style-label", "text-style-secondary"), children: "Version" }),
|
|
106559
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(), children: "0.3.
|
|
106572
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(), children: "0.3.187-0-g376e76891" }),
|
|
106560
106573
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-style-label", "text-style-secondary"), children: "Schema" }),
|
|
106561
106574
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(), children: DB_VERSION }),
|
|
106562
106575
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1d.spacer) }),
|
|
@@ -164277,6 +164290,82 @@ var AgGridReact = class extends Component$1 {
|
|
|
164277
164290
|
return /* @__PURE__ */ React3__default.createElement(AgGridReactUi, { ...this.props, passGridApi: this.setGridApi });
|
|
164278
164291
|
}
|
|
164279
164292
|
};
|
|
164293
|
+
const FindBandUI = ({
|
|
164294
|
+
onClose,
|
|
164295
|
+
onNext,
|
|
164296
|
+
onPrevious,
|
|
164297
|
+
onKeyDown,
|
|
164298
|
+
onChange,
|
|
164299
|
+
onBeforeInput,
|
|
164300
|
+
value: value2,
|
|
164301
|
+
matchCount,
|
|
164302
|
+
matchIndex,
|
|
164303
|
+
noResults = false,
|
|
164304
|
+
disableNav,
|
|
164305
|
+
inputRef: externalRef
|
|
164306
|
+
}) => {
|
|
164307
|
+
const internalRef = useRef(null);
|
|
164308
|
+
const inputRef = externalRef ?? internalRef;
|
|
164309
|
+
const inputProps = {
|
|
164310
|
+
type: "text",
|
|
164311
|
+
placeholder: "Find",
|
|
164312
|
+
onKeyDown,
|
|
164313
|
+
onBeforeInput,
|
|
164314
|
+
onChange
|
|
164315
|
+
};
|
|
164316
|
+
if (value2 !== void 0) {
|
|
164317
|
+
inputProps.value = value2;
|
|
164318
|
+
}
|
|
164319
|
+
const hasCount = matchCount !== void 0 && matchIndex !== void 0;
|
|
164320
|
+
const showStatus = noResults || hasCount && matchCount > 0;
|
|
164321
|
+
const statusText2 = hasCount && matchCount > 0 ? `${matchIndex + 1} of ${matchCount}` : "No results";
|
|
164322
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { "data-unsearchable": "true", className: clsx("findBand"), children: [
|
|
164323
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("input", { ref: inputRef, ...inputProps }),
|
|
164324
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
164325
|
+
"span",
|
|
164326
|
+
{
|
|
164327
|
+
className: clsx(
|
|
164328
|
+
"findBand-match-count",
|
|
164329
|
+
noResults && matchCount === 0 && "findBand-no-results"
|
|
164330
|
+
),
|
|
164331
|
+
style: { visibility: showStatus ? "visible" : "hidden" },
|
|
164332
|
+
children: statusText2
|
|
164333
|
+
}
|
|
164334
|
+
),
|
|
164335
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
164336
|
+
"button",
|
|
164337
|
+
{
|
|
164338
|
+
type: "button",
|
|
164339
|
+
title: "Previous match",
|
|
164340
|
+
className: "btn prev",
|
|
164341
|
+
onClick: onPrevious,
|
|
164342
|
+
disabled: disableNav,
|
|
164343
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("i", { className: ApplicationIcons.arrows.up })
|
|
164344
|
+
}
|
|
164345
|
+
),
|
|
164346
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
164347
|
+
"button",
|
|
164348
|
+
{
|
|
164349
|
+
type: "button",
|
|
164350
|
+
title: "Next match",
|
|
164351
|
+
className: "btn next",
|
|
164352
|
+
onClick: onNext,
|
|
164353
|
+
disabled: disableNav,
|
|
164354
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("i", { className: ApplicationIcons.arrows.down })
|
|
164355
|
+
}
|
|
164356
|
+
),
|
|
164357
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
164358
|
+
"button",
|
|
164359
|
+
{
|
|
164360
|
+
type: "button",
|
|
164361
|
+
title: "Close",
|
|
164362
|
+
className: "btn close",
|
|
164363
|
+
onClick: onClose,
|
|
164364
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("i", { className: ApplicationIcons.close })
|
|
164365
|
+
}
|
|
164366
|
+
)
|
|
164367
|
+
] });
|
|
164368
|
+
};
|
|
164280
164369
|
ModuleRegistry.registerModules([AllCommunityModule]);
|
|
164281
164370
|
const createGridKeyboardHandler = ({
|
|
164282
164371
|
gridRef,
|
|
@@ -164378,6 +164467,17 @@ const LogListGrid = ({
|
|
|
164378
164467
|
const internalGridRef = useRef(null);
|
|
164379
164468
|
const gridRef = externalGridRef ?? internalGridRef;
|
|
164380
164469
|
const gridContainerRef = useRef(null);
|
|
164470
|
+
const [showFind, setShowFind] = useState(false);
|
|
164471
|
+
const [findTerm, setFindTerm] = useState("");
|
|
164472
|
+
const [matchIds, setMatchIds] = useState([]);
|
|
164473
|
+
const [currentMatchIndex, setCurrentMatchIndex] = useState(0);
|
|
164474
|
+
const findInputRef = useRef(null);
|
|
164475
|
+
const closeFind = useCallback(() => {
|
|
164476
|
+
setShowFind(false);
|
|
164477
|
+
setFindTerm("");
|
|
164478
|
+
setMatchIds([]);
|
|
164479
|
+
setCurrentMatchIndex(0);
|
|
164480
|
+
}, []);
|
|
164381
164481
|
const logFiles = useMemo(() => {
|
|
164382
164482
|
return items.filter((item2) => item2.type === "file").map((item2) => item2.log).filter((file) => file !== void 0);
|
|
164383
164483
|
}, [items]);
|
|
@@ -164427,6 +164527,7 @@ const LogListGrid = ({
|
|
|
164427
164527
|
}
|
|
164428
164528
|
}
|
|
164429
164529
|
}
|
|
164530
|
+
row2.searchText = [row2.name, row2.task, row2.model, row2.id].filter(Boolean).join(" ").toLowerCase();
|
|
164430
164531
|
return row2;
|
|
164431
164532
|
});
|
|
164432
164533
|
}, [items, logDetails]);
|
|
@@ -164513,47 +164614,145 @@ const LogListGrid = ({
|
|
|
164513
164614
|
useEffect(() => {
|
|
164514
164615
|
resizeGridColumns();
|
|
164515
164616
|
}, [columns, resizeGridColumns]);
|
|
164516
|
-
|
|
164517
|
-
|
|
164518
|
-
|
|
164519
|
-
|
|
164520
|
-
|
|
164521
|
-
|
|
164522
|
-
|
|
164523
|
-
|
|
164524
|
-
|
|
164525
|
-
|
|
164526
|
-
|
|
164527
|
-
|
|
164528
|
-
|
|
164529
|
-
|
|
164530
|
-
|
|
164531
|
-
getRowId: (params) => params.data.id,
|
|
164532
|
-
onGridColumnsChanged: (e) => {
|
|
164533
|
-
const cols = e.api.getColumnDefs();
|
|
164534
|
-
if (cols && cols?.length > maxColCount.current) {
|
|
164535
|
-
maxColCount.current = cols.length;
|
|
164536
|
-
resizeGridColumns();
|
|
164617
|
+
const performSearch = useCallback(
|
|
164618
|
+
(term) => {
|
|
164619
|
+
const api2 = gridRef.current?.api;
|
|
164620
|
+
if (!api2 || !term) {
|
|
164621
|
+
setMatchIds([]);
|
|
164622
|
+
setCurrentMatchIndex(0);
|
|
164623
|
+
return;
|
|
164624
|
+
}
|
|
164625
|
+
const lowerTerm = term.toLowerCase();
|
|
164626
|
+
const foundIds = [];
|
|
164627
|
+
api2.forEachNode((node2) => {
|
|
164628
|
+
const rowData = node2.data;
|
|
164629
|
+
if (!rowData?.searchText) return;
|
|
164630
|
+
if (rowData.searchText.includes(lowerTerm)) {
|
|
164631
|
+
foundIds.push(rowData.id);
|
|
164537
164632
|
}
|
|
164538
|
-
}
|
|
164539
|
-
|
|
164540
|
-
|
|
164541
|
-
|
|
164542
|
-
|
|
164543
|
-
|
|
164544
|
-
|
|
164545
|
-
|
|
164546
|
-
|
|
164547
|
-
const displayedRowCount = gridRef.current.api.getDisplayedRowCount();
|
|
164548
|
-
setFilteredCount(displayedRowCount);
|
|
164633
|
+
});
|
|
164634
|
+
setMatchIds(foundIds);
|
|
164635
|
+
setCurrentMatchIndex(0);
|
|
164636
|
+
if (foundIds.length > 0) {
|
|
164637
|
+
const firstNode = api2.getRowNode(foundIds[0]);
|
|
164638
|
+
if (firstNode) {
|
|
164639
|
+
api2.deselectAll();
|
|
164640
|
+
api2.ensureNodeVisible(firstNode, "middle");
|
|
164641
|
+
firstNode.setSelected(true, true);
|
|
164549
164642
|
}
|
|
164550
|
-
}
|
|
164551
|
-
|
|
164552
|
-
|
|
164553
|
-
|
|
164554
|
-
|
|
164643
|
+
}
|
|
164644
|
+
},
|
|
164645
|
+
[gridRef]
|
|
164646
|
+
);
|
|
164647
|
+
const goToMatch = useCallback(
|
|
164648
|
+
(index) => {
|
|
164649
|
+
if (matchIds.length === 0) return;
|
|
164650
|
+
const idx = (index % matchIds.length + matchIds.length) % matchIds.length;
|
|
164651
|
+
setCurrentMatchIndex(idx);
|
|
164652
|
+
const api2 = gridRef.current?.api;
|
|
164653
|
+
if (!api2) return;
|
|
164654
|
+
const node2 = api2.getRowNode(matchIds[idx]);
|
|
164655
|
+
if (node2) {
|
|
164656
|
+
api2.deselectAll();
|
|
164657
|
+
api2.ensureNodeVisible(node2, "middle");
|
|
164658
|
+
node2.setSelected(true, true);
|
|
164659
|
+
}
|
|
164660
|
+
},
|
|
164661
|
+
[matchIds, gridRef]
|
|
164662
|
+
);
|
|
164663
|
+
const handleInputKeyDown = useCallback(
|
|
164664
|
+
(e) => {
|
|
164665
|
+
if (e.key === "Escape") {
|
|
164666
|
+
closeFind();
|
|
164667
|
+
} else if (e.key === "Enter") {
|
|
164668
|
+
e.preventDefault();
|
|
164669
|
+
goToMatch(currentMatchIndex + (e.shiftKey ? -1 : 1));
|
|
164670
|
+
}
|
|
164671
|
+
},
|
|
164672
|
+
[goToMatch, currentMatchIndex, closeFind]
|
|
164673
|
+
);
|
|
164674
|
+
useEffect(() => {
|
|
164675
|
+
const handleFindKeyDown = (e) => {
|
|
164676
|
+
if ((e.metaKey || e.ctrlKey) && e.key === "f") {
|
|
164677
|
+
e.preventDefault();
|
|
164678
|
+
e.stopPropagation();
|
|
164679
|
+
setShowFind(true);
|
|
164680
|
+
setTimeout(() => findInputRef.current?.focus(), 100);
|
|
164681
|
+
}
|
|
164682
|
+
if (e.key === "Escape" && showFind) {
|
|
164683
|
+
closeFind();
|
|
164684
|
+
}
|
|
164685
|
+
};
|
|
164686
|
+
document.addEventListener("keydown", handleFindKeyDown, true);
|
|
164687
|
+
return () => document.removeEventListener("keydown", handleFindKeyDown, true);
|
|
164688
|
+
}, [closeFind, showFind]);
|
|
164689
|
+
useEffect(() => {
|
|
164690
|
+
if (findTerm) {
|
|
164691
|
+
performSearch(findTerm);
|
|
164692
|
+
} else {
|
|
164693
|
+
setMatchIds([]);
|
|
164694
|
+
setCurrentMatchIndex(0);
|
|
164555
164695
|
}
|
|
164556
|
-
|
|
164696
|
+
}, [findTerm, performSearch]);
|
|
164697
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$18.gridWrapper), children: [
|
|
164698
|
+
showFind && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
164699
|
+
FindBandUI,
|
|
164700
|
+
{
|
|
164701
|
+
inputRef: findInputRef,
|
|
164702
|
+
value: findTerm,
|
|
164703
|
+
onChange: () => setFindTerm(findInputRef.current?.value ?? ""),
|
|
164704
|
+
onKeyDown: handleInputKeyDown,
|
|
164705
|
+
onClose: closeFind,
|
|
164706
|
+
onPrevious: () => goToMatch(currentMatchIndex - 1),
|
|
164707
|
+
onNext: () => goToMatch(currentMatchIndex + 1),
|
|
164708
|
+
disableNav: matchIds.length === 0,
|
|
164709
|
+
noResults: !!findTerm && matchIds.length === 0,
|
|
164710
|
+
matchCount: findTerm ? matchIds.length : void 0,
|
|
164711
|
+
matchIndex: findTerm ? currentMatchIndex : void 0
|
|
164712
|
+
}
|
|
164713
|
+
),
|
|
164714
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: gridContainerRef, className: styles$18.gridContainer, tabIndex: 0, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
164715
|
+
AgGridReact,
|
|
164716
|
+
{
|
|
164717
|
+
ref: gridRef,
|
|
164718
|
+
rowData: data,
|
|
164719
|
+
animateRows: false,
|
|
164720
|
+
columnDefs: columns,
|
|
164721
|
+
defaultColDef: {
|
|
164722
|
+
sortable: true,
|
|
164723
|
+
filter: true,
|
|
164724
|
+
resizable: true
|
|
164725
|
+
},
|
|
164726
|
+
autoSizeStrategy: { type: "fitGridWidth" },
|
|
164727
|
+
headerHeight: 25,
|
|
164728
|
+
rowSelection: { mode: "singleRow", checkboxes: false },
|
|
164729
|
+
getRowId: (params) => params.data.id,
|
|
164730
|
+
onGridColumnsChanged: (e) => {
|
|
164731
|
+
const cols = e.api.getColumnDefs();
|
|
164732
|
+
if (cols && cols?.length > maxColCount.current) {
|
|
164733
|
+
maxColCount.current = cols.length;
|
|
164734
|
+
resizeGridColumns();
|
|
164735
|
+
}
|
|
164736
|
+
},
|
|
164737
|
+
onGridSizeChanged: resizeGridColumns,
|
|
164738
|
+
theme: themeBalham,
|
|
164739
|
+
enableCellTextSelection: true,
|
|
164740
|
+
initialState: initialGridState,
|
|
164741
|
+
suppressCellFocus: true,
|
|
164742
|
+
onStateUpdated: (e) => {
|
|
164743
|
+
setGridState(e.state);
|
|
164744
|
+
if (gridRef.current?.api) {
|
|
164745
|
+
const displayedRowCount = gridRef.current.api.getDisplayedRowCount();
|
|
164746
|
+
setFilteredCount(displayedRowCount);
|
|
164747
|
+
}
|
|
164748
|
+
},
|
|
164749
|
+
onRowClicked: handleRowClick,
|
|
164750
|
+
onSortChanged: handleSortChanged,
|
|
164751
|
+
onFilterChanged: handleFilterChanged,
|
|
164752
|
+
loading: data.length === 0 && (loading > 0 || syncing)
|
|
164753
|
+
}
|
|
164754
|
+
) })
|
|
164755
|
+
] });
|
|
164557
164756
|
};
|
|
164558
164757
|
const footer$1 = "_footer_14uod_1";
|
|
164559
164758
|
const spinnerContainer$1 = "_spinnerContainer_14uod_11";
|
|
@@ -165539,64 +165738,21 @@ const FindBand = () => {
|
|
|
165539
165738
|
document.removeEventListener("keydown", handleGlobalKeyDown, true);
|
|
165540
165739
|
};
|
|
165541
165740
|
}, [handleSearch, restoreCursor]);
|
|
165542
|
-
|
|
165543
|
-
|
|
165544
|
-
|
|
165545
|
-
|
|
165546
|
-
|
|
165547
|
-
|
|
165548
|
-
|
|
165549
|
-
|
|
165550
|
-
|
|
165551
|
-
|
|
165552
|
-
|
|
165553
|
-
|
|
165554
|
-
|
|
165555
|
-
|
|
165556
|
-
|
|
165557
|
-
}
|
|
165558
|
-
),
|
|
165559
|
-
matchCountLabel !== null && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
165560
|
-
"span",
|
|
165561
|
-
{
|
|
165562
|
-
className: clsx(
|
|
165563
|
-
"findBand-match-count",
|
|
165564
|
-
matchCount === 0 && "findBand-no-results"
|
|
165565
|
-
),
|
|
165566
|
-
children: matchCountLabel
|
|
165567
|
-
}
|
|
165568
|
-
),
|
|
165569
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
165570
|
-
"button",
|
|
165571
|
-
{
|
|
165572
|
-
type: "button",
|
|
165573
|
-
title: "Previous match",
|
|
165574
|
-
className: "btn next",
|
|
165575
|
-
onClick: findPrevious,
|
|
165576
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx("i", { className: ApplicationIcons.arrows.up })
|
|
165577
|
-
}
|
|
165578
|
-
),
|
|
165579
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
165580
|
-
"button",
|
|
165581
|
-
{
|
|
165582
|
-
type: "button",
|
|
165583
|
-
title: "Next match",
|
|
165584
|
-
className: "btn prev",
|
|
165585
|
-
onClick: findNext,
|
|
165586
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx("i", { className: ApplicationIcons.arrows.down })
|
|
165587
|
-
}
|
|
165588
|
-
),
|
|
165589
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
165590
|
-
"button",
|
|
165591
|
-
{
|
|
165592
|
-
type: "button",
|
|
165593
|
-
title: "Close",
|
|
165594
|
-
className: "btn close",
|
|
165595
|
-
onClick: storeHideFind,
|
|
165596
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx("i", { className: ApplicationIcons.close })
|
|
165597
|
-
}
|
|
165598
|
-
)
|
|
165599
|
-
] });
|
|
165741
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
165742
|
+
FindBandUI,
|
|
165743
|
+
{
|
|
165744
|
+
inputRef: searchBoxRef,
|
|
165745
|
+
onClose: storeHideFind,
|
|
165746
|
+
onNext: findNext,
|
|
165747
|
+
onPrevious: findPrevious,
|
|
165748
|
+
onKeyDown: handleKeyDown,
|
|
165749
|
+
onBeforeInput: handleBeforeInput,
|
|
165750
|
+
onChange: handleInputChange,
|
|
165751
|
+
noResults: matchCount !== null && matchCount === 0,
|
|
165752
|
+
matchCount: matchCount ?? void 0,
|
|
165753
|
+
matchIndex: matchCount !== null && matchCount > 0 ? currentMatchIndex - 1 : void 0
|
|
165754
|
+
}
|
|
165755
|
+
);
|
|
165600
165756
|
};
|
|
165601
165757
|
function windowFind(searchTerm, back) {
|
|
165602
165758
|
return window.find(
|
|
@@ -166896,15 +167052,16 @@ const ChatViewVirtualListComponent = memo(
|
|
|
166896
167052
|
);
|
|
166897
167053
|
}
|
|
166898
167054
|
);
|
|
166899
|
-
const tabPanel = "
|
|
166900
|
-
const tabControls = "
|
|
166901
|
-
const fullWidth$1 = "
|
|
166902
|
-
const padded = "
|
|
166903
|
-
const error$2 = "
|
|
166904
|
-
const ansi = "
|
|
166905
|
-
const noTop = "
|
|
166906
|
-
const chat = "
|
|
166907
|
-
const transcriptContainer = "
|
|
167055
|
+
const tabPanel = "_tabPanel_20s9q_1";
|
|
167056
|
+
const tabControls = "_tabControls_20s9q_5";
|
|
167057
|
+
const fullWidth$1 = "_fullWidth_20s9q_12";
|
|
167058
|
+
const padded = "_padded_20s9q_25";
|
|
167059
|
+
const error$2 = "_error_20s9q_30";
|
|
167060
|
+
const ansi = "_ansi_20s9q_34";
|
|
167061
|
+
const noTop = "_noTop_20s9q_38";
|
|
167062
|
+
const chat = "_chat_20s9q_50";
|
|
167063
|
+
const transcriptContainer = "_transcriptContainer_20s9q_58";
|
|
167064
|
+
const overflowVisible$1 = "_overflowVisible_20s9q_62";
|
|
166908
167065
|
const styles$Z = {
|
|
166909
167066
|
tabPanel,
|
|
166910
167067
|
tabControls,
|
|
@@ -166914,7 +167071,8 @@ const styles$Z = {
|
|
|
166914
167071
|
ansi,
|
|
166915
167072
|
noTop,
|
|
166916
167073
|
chat,
|
|
166917
|
-
transcriptContainer
|
|
167074
|
+
transcriptContainer,
|
|
167075
|
+
overflowVisible: overflowVisible$1
|
|
166918
167076
|
};
|
|
166919
167077
|
function truncateMarkdown(markdown, maxLength = 250, ellipsis2 = "...") {
|
|
166920
167078
|
if (!markdown || markdown.length <= maxLength) {
|
|
@@ -168805,7 +168963,8 @@ const formatTiming = (timestamp2, working_start) => {
|
|
|
168805
168963
|
return formatDateTime(new Date(timestamp2));
|
|
168806
168964
|
}
|
|
168807
168965
|
};
|
|
168808
|
-
const formatTitle = (title2, total_tokens, working_start) => {
|
|
168966
|
+
const formatTitle = (title2, total_tokens, working_start, role2) => {
|
|
168967
|
+
const titleWithRole = role2 ? `${title2} – ${role2} –` : title2;
|
|
168809
168968
|
const subItems = [];
|
|
168810
168969
|
if (total_tokens) {
|
|
168811
168970
|
subItems.push(`${formatNumber(total_tokens)} tokens`);
|
|
@@ -168814,7 +168973,7 @@ const formatTitle = (title2, total_tokens, working_start) => {
|
|
|
168814
168973
|
subItems.push(`${formatTime$1(working_start)}`);
|
|
168815
168974
|
}
|
|
168816
168975
|
const subtitle = subItems.length > 0 ? ` (${subItems.join(", ")})` : "";
|
|
168817
|
-
return `${
|
|
168976
|
+
return `${titleWithRole}${subtitle}`;
|
|
168818
168977
|
};
|
|
168819
168978
|
const ApprovalEventView = ({
|
|
168820
168979
|
eventNode,
|
|
@@ -169380,16 +169539,16 @@ const EventSection = ({
|
|
|
169380
169539
|
children2
|
|
169381
169540
|
] });
|
|
169382
169541
|
};
|
|
169383
|
-
const container$c = "
|
|
169384
|
-
const all = "
|
|
169385
|
-
const tableSelection = "
|
|
169386
|
-
const codePre = "
|
|
169387
|
-
const code$3 = "
|
|
169388
|
-
const progress$1 = "
|
|
169389
|
-
const error$1 = "
|
|
169390
|
-
const toolConfig = "
|
|
169391
|
-
const toolChoice = "
|
|
169392
|
-
const traceback = "
|
|
169542
|
+
const container$c = "_container_1gr6b_1";
|
|
169543
|
+
const all = "_all_1gr6b_6";
|
|
169544
|
+
const tableSelection = "_tableSelection_1gr6b_12";
|
|
169545
|
+
const codePre = "_codePre_1gr6b_22";
|
|
169546
|
+
const code$3 = "_code_1gr6b_22";
|
|
169547
|
+
const progress$1 = "_progress_1gr6b_34";
|
|
169548
|
+
const error$1 = "_error_1gr6b_38";
|
|
169549
|
+
const toolConfig = "_toolConfig_1gr6b_54";
|
|
169550
|
+
const toolChoice = "_toolChoice_1gr6b_62";
|
|
169551
|
+
const traceback = "_traceback_1gr6b_71";
|
|
169393
169552
|
const styles$J = {
|
|
169394
169553
|
container: container$c,
|
|
169395
169554
|
all,
|
|
@@ -169543,14 +169702,17 @@ const ModelEventView = ({
|
|
|
169543
169702
|
}
|
|
169544
169703
|
}
|
|
169545
169704
|
const panelTitle = eventTitle(event);
|
|
169546
|
-
const
|
|
169705
|
+
const outputRole = outputMessages.length > 0 ? outputMessages[0].role : void 0;
|
|
169706
|
+
const outputTimestamp = event.completed ? formatDateTime(new Date(event.completed)) : void 0;
|
|
169707
|
+
const baseTurnLabel = context?.turnInfo ? `turn ${context.turnInfo.turnNumber}/${context.turnInfo.totalTurns}` : void 0;
|
|
169708
|
+
const turnLabel2 = [outputTimestamp, baseTurnLabel].filter(Boolean).join(" | ") || void 0;
|
|
169547
169709
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
169548
169710
|
EventPanel,
|
|
169549
169711
|
{
|
|
169550
169712
|
eventNodeId: eventNode.id,
|
|
169551
169713
|
depth: eventNode.depth,
|
|
169552
|
-
className: className2,
|
|
169553
|
-
title: formatTitle(panelTitle, totalUsage, callTime),
|
|
169714
|
+
className: clsx(className2),
|
|
169715
|
+
title: formatTitle(panelTitle, totalUsage, callTime, outputRole),
|
|
169554
169716
|
subTitle: formatTiming(event.timestamp, event.working_start),
|
|
169555
169717
|
icon: ApplicationIcons.model,
|
|
169556
169718
|
turnLabel: turnLabel2,
|
|
@@ -169564,7 +169726,8 @@ const ModelEventView = ({
|
|
|
169564
169726
|
numbered: false,
|
|
169565
169727
|
toolCallStyle: showToolCalls ? "complete" : "omit",
|
|
169566
169728
|
resolveToolCallsIntoPreviousMessage: context?.hasToolEvents !== false,
|
|
169567
|
-
allowLinking: false
|
|
169729
|
+
allowLinking: false,
|
|
169730
|
+
unlabeledRoles: ["assistant"]
|
|
169568
169731
|
}
|
|
169569
169732
|
),
|
|
169570
169733
|
event.error ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$J.error, children: [
|
|
@@ -180525,7 +180688,11 @@ const SampleDisplay = ({
|
|
|
180525
180688
|
TabPanel,
|
|
180526
180689
|
{
|
|
180527
180690
|
id: kSampleTranscriptTabId,
|
|
180528
|
-
className: clsx(
|
|
180691
|
+
className: clsx(
|
|
180692
|
+
"sample-tab",
|
|
180693
|
+
styles$Z.transcriptContainer,
|
|
180694
|
+
styles$Z.overflowVisible
|
|
180695
|
+
),
|
|
180529
180696
|
title: "Transcript",
|
|
180530
180697
|
onSelected: onSelectedTab,
|
|
180531
180698
|
selected: effectiveSelectedTab === kSampleTranscriptTabId || effectiveSelectedTab === void 0,
|
|
@@ -180559,7 +180726,12 @@ const SampleDisplay = ({
|
|
|
180559
180726
|
TabPanel,
|
|
180560
180727
|
{
|
|
180561
180728
|
id: kSampleMessagesTabId,
|
|
180562
|
-
className: clsx(
|
|
180729
|
+
className: clsx(
|
|
180730
|
+
"sample-tab",
|
|
180731
|
+
styles$Z.fullWidth,
|
|
180732
|
+
styles$Z.chat,
|
|
180733
|
+
styles$Z.overflowVisible
|
|
180734
|
+
),
|
|
180563
180735
|
title: "Messages",
|
|
180564
180736
|
onSelected: onSelectedTab,
|
|
180565
180737
|
selected: effectiveSelectedTab === kSampleMessagesTabId,
|
|
@@ -180930,7 +181102,8 @@ const SampleDetailComponent = ({
|
|
|
180930
181102
|
}, [sampleData]);
|
|
180931
181103
|
const sampleStatus2 = useStore((state) => state.sample.sampleStatus);
|
|
180932
181104
|
const sampleMatchesRequest = useMemo(() => {
|
|
180933
|
-
if (!
|
|
181105
|
+
if (!sampleId || !epoch) return false;
|
|
181106
|
+
if (!sample2) return true;
|
|
180934
181107
|
return String(sample2.id) === sampleId && sample2.epoch === parseInt(epoch, 10);
|
|
180935
181108
|
}, [sample2, sampleId, epoch]);
|
|
180936
181109
|
const showFind = useStore((state) => state.app.showFind);
|
|
@@ -181043,7 +181216,7 @@ const SampleDetailComponent = ({
|
|
|
181043
181216
|
] })
|
|
181044
181217
|
}
|
|
181045
181218
|
),
|
|
181046
|
-
sampleStatus2 !== "loading" &&
|
|
181219
|
+
sampleStatus2 !== "loading" && sampleMatchesRequest && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
181047
181220
|
InlineSampleComponent,
|
|
181048
181221
|
{
|
|
181049
181222
|
showActivity: false,
|