@meridianlabs/log-viewer 0.3.283 → 0.3.284
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/{AsciinemaPlayerImpl-CTd51CWg.js → AsciinemaPlayerImpl-DrztGkXg.js} +33 -28
- package/lib/{AsciinemaPlayerImpl-CTd51CWg.js.map → AsciinemaPlayerImpl-DrztGkXg.js.map} +1 -1
- package/lib/index.js +87 -5
- package/lib/index.js.map +1 -1
- package/lib/{markdownPipeline-bhdCQvtQ.js → markdownPipeline-D23f-WkE.js} +177 -122
- package/lib/markdownPipeline-D23f-WkE.js.map +1 -0
- package/lib/src/app/samples/SampleDisplay.d.ts.map +1 -1
- package/lib/src/app/samples/StoreTerminalSessions.d.ts +20 -0
- package/lib/src/app/samples/StoreTerminalSessions.d.ts.map +1 -0
- package/lib/styles/index.css +9 -0
- package/package.json +2 -2
- package/lib/markdownPipeline-bhdCQvtQ.js.map +0 -1
package/lib/index.js
CHANGED
|
@@ -17207,7 +17207,7 @@ var CopyButton = (t0) => {
|
|
|
17207
17207
|
};
|
|
17208
17208
|
//#endregion
|
|
17209
17209
|
//#region ../../packages/react/src/components/AsciinemaPlayer.tsx
|
|
17210
|
-
var player = onDemandModule(() => import("./AsciinemaPlayerImpl-
|
|
17210
|
+
var player = onDemandModule(() => import("./AsciinemaPlayerImpl-DrztGkXg.js"));
|
|
17211
17211
|
var AsciinemaPlayer = (props) => {
|
|
17212
17212
|
const $ = c(4);
|
|
17213
17213
|
const policy = useContentPolicy();
|
|
@@ -29265,7 +29265,7 @@ var LoadingBar = (t0) => {
|
|
|
29265
29265
|
};
|
|
29266
29266
|
//#endregion
|
|
29267
29267
|
//#region ../../packages/react/src/components/MarkdownDiv.tsx
|
|
29268
|
-
var markdownPipeline = onDemandModule(() => import("./markdownPipeline-
|
|
29268
|
+
var markdownPipeline = onDemandModule(() => import("./markdownPipeline-D23f-WkE.js"));
|
|
29269
29269
|
var sanitizeMarkdown = (md) => {
|
|
29270
29270
|
return escapeHtmlCharacters(md).replace(/\n/g, "<br/>");
|
|
29271
29271
|
};
|
|
@@ -92326,7 +92326,13 @@ function collectFromContent(content, out, sourceSpans, skipAgentSpanId, includeU
|
|
|
92326
92326
|
}
|
|
92327
92327
|
}
|
|
92328
92328
|
const emittedBranchedFroms = /* @__PURE__ */ new Set();
|
|
92329
|
+
const openCheckpointIds = [];
|
|
92329
92330
|
for (const item of content) if (item.type === "event") {
|
|
92331
|
+
if (item.event.event === "span_begin" && item.event.type === "checkpoint") openCheckpointIds.push(item.event.id);
|
|
92332
|
+
else if (item.event.event === "span_end") {
|
|
92333
|
+
const index = openCheckpointIds.lastIndexOf(item.event.id);
|
|
92334
|
+
if (index !== -1) openCheckpointIds.splice(index, 1);
|
|
92335
|
+
}
|
|
92330
92336
|
if (skipAgentSpanId && item.event.event === "tool" && item.event.agent_span_id === skipAgentSpanId) continue;
|
|
92331
92337
|
if (item.event.event === "model" && pendingToolCallIds.size > 0) {
|
|
92332
92338
|
const modelEvent = item.event;
|
|
@@ -92354,7 +92360,7 @@ function collectFromContent(content, out, sourceSpans, skipAgentSpanId, includeU
|
|
|
92354
92360
|
span_id: item.id,
|
|
92355
92361
|
type: item.spanType,
|
|
92356
92362
|
timestamp: item.startTime().toISOString(),
|
|
92357
|
-
parent_id: null,
|
|
92363
|
+
parent_id: openCheckpointIds.at(-1) ?? null,
|
|
92358
92364
|
pending: false,
|
|
92359
92365
|
working_start: 0,
|
|
92360
92366
|
uuid: item.id,
|
|
@@ -108746,6 +108752,75 @@ var SampleScoresView = (t0) => {
|
|
|
108746
108752
|
function _temp$34(choice, index) {
|
|
108747
108753
|
return `${String.fromCharCode(65 + index)}) ${choice}`;
|
|
108748
108754
|
}
|
|
108755
|
+
var StoreTerminalSessions_module_default = {
|
|
108756
|
+
sessions: "_sessions_ezmbx_1",
|
|
108757
|
+
sessionLabel: "_sessionLabel_ezmbx_7"
|
|
108758
|
+
};
|
|
108759
|
+
//#endregion
|
|
108760
|
+
//#region src/app/samples/StoreTerminalSessions.tsx
|
|
108761
|
+
var kAsciicastStorePrefix = "asciinema:";
|
|
108762
|
+
/** Collect the playable asciicast entries from a sample's store. */ var storeCasts = (store) => Object.entries(store).flatMap(([key, value]) => key.startsWith(kAsciicastStorePrefix) && typeof value === "string" ? [{
|
|
108763
|
+
key,
|
|
108764
|
+
name: key.slice(10),
|
|
108765
|
+
cast: value
|
|
108766
|
+
}] : []);
|
|
108767
|
+
/** Plays each store asciicast, labeled by session name. */ var StoreTerminalSessions = (t0) => {
|
|
108768
|
+
const $ = c(8);
|
|
108769
|
+
const { id, casts } = t0;
|
|
108770
|
+
let t1;
|
|
108771
|
+
if ($[0] !== casts || $[1] !== id) {
|
|
108772
|
+
let t2;
|
|
108773
|
+
if ($[3] !== casts.length || $[4] !== id) {
|
|
108774
|
+
t2 = (storeCast) => {
|
|
108775
|
+
const { rows, cols } = castGeometry(storeCast.cast);
|
|
108776
|
+
return /*#__PURE__*/ jsxs("div", { children: [casts.length > 1 ? /*#__PURE__*/ jsx("div", {
|
|
108777
|
+
className: clsx(StoreTerminalSessions_module_default.sessionLabel, "text-style-label"),
|
|
108778
|
+
children: storeCast.name
|
|
108779
|
+
}) : void 0, /*#__PURE__*/ jsx(AsciinemaPlayer, {
|
|
108780
|
+
id: `${id}-${storeCast.name}`,
|
|
108781
|
+
cast: storeCast.cast,
|
|
108782
|
+
rows,
|
|
108783
|
+
cols,
|
|
108784
|
+
fit: "width"
|
|
108785
|
+
})] }, storeCast.key);
|
|
108786
|
+
};
|
|
108787
|
+
$[3] = casts.length;
|
|
108788
|
+
$[4] = id;
|
|
108789
|
+
$[5] = t2;
|
|
108790
|
+
} else t2 = $[5];
|
|
108791
|
+
t1 = casts.map(t2);
|
|
108792
|
+
$[0] = casts;
|
|
108793
|
+
$[1] = id;
|
|
108794
|
+
$[2] = t1;
|
|
108795
|
+
} else t1 = $[2];
|
|
108796
|
+
let t2;
|
|
108797
|
+
if ($[6] !== t1) {
|
|
108798
|
+
t2 = /*#__PURE__*/ jsx("div", {
|
|
108799
|
+
className: StoreTerminalSessions_module_default.sessions,
|
|
108800
|
+
children: t1
|
|
108801
|
+
});
|
|
108802
|
+
$[6] = t1;
|
|
108803
|
+
$[7] = t2;
|
|
108804
|
+
} else t2 = $[7];
|
|
108805
|
+
return t2;
|
|
108806
|
+
};
|
|
108807
|
+
var castGeometry = (cast) => {
|
|
108808
|
+
let rows = 24;
|
|
108809
|
+
let cols = 80;
|
|
108810
|
+
const newline = cast.indexOf("\n");
|
|
108811
|
+
const headerLine = newline === -1 ? cast : cast.slice(0, newline);
|
|
108812
|
+
try {
|
|
108813
|
+
const header = JSON.parse(headerLine);
|
|
108814
|
+
if (typeof header === "object" && header !== null) {
|
|
108815
|
+
if ("height" in header && typeof header.height === "number") rows = header.height;
|
|
108816
|
+
if ("width" in header && typeof header.width === "number") cols = header.width;
|
|
108817
|
+
}
|
|
108818
|
+
} catch {}
|
|
108819
|
+
return {
|
|
108820
|
+
rows,
|
|
108821
|
+
cols
|
|
108822
|
+
};
|
|
108823
|
+
};
|
|
108749
108824
|
//#endregion
|
|
108750
108825
|
//#region src/app/samples/transcript/chunked/ChunkedRowView.tsx
|
|
108751
108826
|
/** Stable row identity: event uuid when present, else the sequence ordinal. */ var rowNodeId = (row) => {
|
|
@@ -111204,11 +111279,18 @@ var metadataViewsForSample = (id, scrollRef, sample) => {
|
|
|
111204
111279
|
copyButton: true
|
|
111205
111280
|
})
|
|
111206
111281
|
})] }, `sample-metadata-${id}`));
|
|
111207
|
-
|
|
111282
|
+
const terminalSessions = storeCasts(sample.store);
|
|
111283
|
+
if (terminalSessions.length > 0) sampleMetadatas.push(/*#__PURE__*/ jsxs(Card$1, { children: [/*#__PURE__*/ jsx(CardHeader, { label: "Terminal Sessions" }), /*#__PURE__*/ jsx(CardBody, { children: /*#__PURE__*/ jsx(StoreTerminalSessions, {
|
|
111284
|
+
id: `task-sample-terminal-sessions-${id}`,
|
|
111285
|
+
casts: terminalSessions
|
|
111286
|
+
}) })] }, `sample-terminal-sessions-${id}`));
|
|
111287
|
+
const castKeys = new Set(terminalSessions.map((session) => session.key));
|
|
111288
|
+
const storeRecord = Object.fromEntries(Object.entries(sample.store).filter(([key]) => !castKeys.has(key)));
|
|
111289
|
+
if (Object.keys(storeRecord).length > 0) sampleMetadatas.push(/*#__PURE__*/ jsxs(Card$1, { children: [/*#__PURE__*/ jsx(CardHeader, { label: "Store" }), /*#__PURE__*/ jsx(CardBody, {
|
|
111208
111290
|
padded: false,
|
|
111209
111291
|
children: /*#__PURE__*/ jsx(RecordTree, {
|
|
111210
111292
|
id: `task-sample-store-${id}`,
|
|
111211
|
-
record:
|
|
111293
|
+
record: storeRecord,
|
|
111212
111294
|
className: clsx("tab-pane", SampleDisplay_module_default.noTop),
|
|
111213
111295
|
scrollRef,
|
|
111214
111296
|
processStore: true,
|