@meridianlabs/log-viewer 0.3.172 → 0.3.174

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/index.js CHANGED
@@ -18239,7 +18239,7 @@ const container$n = "_container_1n7pm_1";
18239
18239
  const label$b = "_label_1n7pm_7";
18240
18240
  const outer = "_outer_1n7pm_11";
18241
18241
  const inner = "_inner_1n7pm_20";
18242
- const styles$1R = {
18242
+ const styles$1S = {
18243
18243
  container: container$n,
18244
18244
  label: label$b,
18245
18245
  outer,
@@ -18252,15 +18252,15 @@ const ProgressBar = ({
18252
18252
  label: label2,
18253
18253
  width = "100px"
18254
18254
  }) => {
18255
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$1R.container), children: [
18256
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1R.outer), style: { width }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
18255
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$1S.container), children: [
18256
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1S.outer), style: { width }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
18257
18257
  "div",
18258
18258
  {
18259
- className: clsx(styles$1R.inner),
18259
+ className: clsx(styles$1S.inner),
18260
18260
  style: { width: `${(value2 - min2) / (max2 - min2) * 100}%` }
18261
18261
  }
18262
18262
  ) }),
18263
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$1R.label, "text-size-smallest"), children: [
18263
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$1S.label, "text-size-smallest"), children: [
18264
18264
  value2,
18265
18265
  " / ",
18266
18266
  max2,
@@ -18473,7 +18473,7 @@ const errorType = (message2) => {
18473
18473
  const circle$1 = "_circle_qymy9_1";
18474
18474
  const green$1 = "_green_qymy9_12";
18475
18475
  const red$1 = "_red_qymy9_18";
18476
- const styles$1Q = {
18476
+ const styles$1R = {
18477
18477
  circle: circle$1,
18478
18478
  green: green$1,
18479
18479
  red: red$1
@@ -18489,9 +18489,9 @@ const booleanScoreDescriptor = () => {
18489
18489
  "span",
18490
18490
  {
18491
18491
  className: clsx(
18492
- styles$1Q.circle,
18492
+ styles$1R.circle,
18493
18493
  "text-size-small",
18494
- score2 ? styles$1Q.green : styles$1Q.red
18494
+ score2 ? styles$1R.green : styles$1R.red
18495
18495
  ),
18496
18496
  children: String(score2)
18497
18497
  }
@@ -18593,7 +18593,7 @@ const numericScoreDescriptor = (values) => {
18593
18593
  const container$m = "_container_1ramc_1";
18594
18594
  const key$1 = "_key_1ramc_12";
18595
18595
  const value$2 = "_value_1ramc_16";
18596
- const styles$1P = {
18596
+ const styles$1Q = {
18597
18597
  container: container$m,
18598
18598
  key: key$1,
18599
18599
  value: value$2
@@ -18637,12 +18637,12 @@ const objectScoreDescriptor = (values) => {
18637
18637
  ) : String(value2);
18638
18638
  scores2.push(
18639
18639
  /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
18640
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1P.key, "text-size-smaller"), children: key2 }),
18641
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1P.value, "text-size-base"), children: formattedValue })
18640
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1Q.key, "text-size-smaller"), children: key2 }),
18641
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1Q.value, "text-size-base"), children: formattedValue })
18642
18642
  ] })
18643
18643
  );
18644
18644
  });
18645
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1P.container), children: scores2 }, `score-value`);
18645
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1Q.container), children: scores2 }, `score-value`);
18646
18646
  }
18647
18647
  };
18648
18648
  };
@@ -19936,7 +19936,7 @@ function requireAnsiOutput() {
19936
19936
  var ansiOutputExports = requireAnsiOutput();
19937
19937
  const toolButton$1 = "_toolButton_nu8dt_1";
19938
19938
  const latched = "_latched_nu8dt_13";
19939
- const styles$1O = {
19939
+ const styles$1P = {
19940
19940
  toolButton: toolButton$1,
19941
19941
  latched
19942
19942
  };
@@ -19950,10 +19950,10 @@ const ToolButton = forwardRef(
19950
19950
  className: clsx(
19951
19951
  "btn",
19952
19952
  "btn-tools",
19953
- styles$1O.toolButton,
19953
+ styles$1P.toolButton,
19954
19954
  classes,
19955
19955
  className2,
19956
- latched2 ? styles$1O.latched : void 0
19956
+ latched2 ? styles$1P.latched : void 0
19957
19957
  ),
19958
19958
  ...rest,
19959
19959
  children: [
@@ -19969,7 +19969,7 @@ const ansiDisplayContainer = "_ansiDisplayContainer_sawhg_1";
19969
19969
  const ansiDisplay = "_ansiDisplay_sawhg_1";
19970
19970
  const ansiDisplayRaw = "_ansiDisplayRaw_sawhg_28";
19971
19971
  const ansiDisplayToggle = "_ansiDisplayToggle_sawhg_33";
19972
- const styles$1N = {
19972
+ const styles$1O = {
19973
19973
  ansiDisplayContainer,
19974
19974
  ansiDisplay,
19975
19975
  ansiDisplayRaw,
@@ -20025,13 +20025,13 @@ const ANSIDisplay = ({
20025
20025
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
20026
20026
  "div",
20027
20027
  {
20028
- className: clsx(styles$1N.ansiDisplayContainer, className2),
20028
+ className: clsx(styles$1O.ansiDisplayContainer, className2),
20029
20029
  style: { ...style2 },
20030
20030
  children: [
20031
20031
  /* @__PURE__ */ jsxRuntimeExports.jsx(
20032
20032
  ToolButton,
20033
20033
  {
20034
- className: clsx(styles$1N.ansiDisplayToggle, "text-size-smallest"),
20034
+ className: clsx(styles$1O.ansiDisplayToggle, "text-size-smallest"),
20035
20035
  icon: "bi bi-code-slash",
20036
20036
  label: "",
20037
20037
  latched: showRaw,
@@ -20039,9 +20039,9 @@ const ANSIDisplay = ({
20039
20039
  title: showRaw ? "Show rendered output" : "Show raw output"
20040
20040
  }
20041
20041
  ),
20042
- showRaw ? /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: clsx(styles$1N.ansiDisplay, styles$1N.ansiDisplayRaw), children: output2 }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1N.ansiDisplay), style: backgroundStyle, children: ansiOutput2.outputLines.map((line2, index) => {
20042
+ showRaw ? /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: clsx(styles$1O.ansiDisplay, styles$1O.ansiDisplayRaw), children: output2 }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1O.ansiDisplay), style: backgroundStyle, children: ansiOutput2.outputLines.map((line2, index) => {
20043
20043
  firstOutput = firstOutput || !!line2.outputRuns.length;
20044
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1N.ansiDisplayLine), children: !line2.outputRuns.length ? firstOutput ? /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}) : null : line2.outputRuns.map((outputRun) => /* @__PURE__ */ jsxRuntimeExports.jsx(OutputRun, { run: outputRun }, outputRun.id)) }, index);
20044
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1O.ansiDisplayLine), children: !line2.outputRuns.length ? firstOutput ? /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}) : null : line2.outputRuns.map((outputRun) => /* @__PURE__ */ jsxRuntimeExports.jsx(OutputRun, { run: outputRun }, outputRun.id)) }, index);
20045
20045
  }) })
20046
20046
  ]
20047
20047
  }
@@ -20268,7 +20268,7 @@ const visible = "_visible_tm52u_1";
20268
20268
  const hidden$2 = "_hidden_tm52u_5";
20269
20269
  const pills = "_pills_tm52u_9";
20270
20270
  const pill = "_pill_tm52u_9";
20271
- const styles$1M = {
20271
+ const styles$1N = {
20272
20272
  visible,
20273
20273
  hidden: hidden$2,
20274
20274
  pills,
@@ -20298,7 +20298,7 @@ const NavPills = ({ id, children: children2 }) => {
20298
20298
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
20299
20299
  "div",
20300
20300
  {
20301
- className: child["props"]?.title === activeItem ? styles$1M.visible : styles$1M.hidden,
20301
+ className: child["props"]?.title === activeItem ? styles$1N.visible : styles$1N.hidden,
20302
20302
  children: child
20303
20303
  },
20304
20304
  `nav-pill-container-${idx}`
@@ -20308,7 +20308,7 @@ const NavPills = ({ id, children: children2 }) => {
20308
20308
  /* @__PURE__ */ jsxRuntimeExports.jsx(
20309
20309
  "ul",
20310
20310
  {
20311
- className: clsx("nav", "nav-pills", styles$1M.pills),
20311
+ className: clsx("nav", "nav-pills", styles$1N.pills),
20312
20312
  role: "tablist",
20313
20313
  "aria-orientation": "horizontal",
20314
20314
  children: navPills
@@ -20344,7 +20344,7 @@ const NavPill = ({
20344
20344
  "nav-link",
20345
20345
  "text-style-label",
20346
20346
  active ? "active " : "",
20347
- styles$1M.pill
20347
+ styles$1N.pill
20348
20348
  ),
20349
20349
  "data-target": title2,
20350
20350
  onClick: handleClick,
@@ -20360,7 +20360,7 @@ const Buckets = {
20360
20360
  final: 1e3
20361
20361
  };
20362
20362
  const copyButton = "_copyButton_1goi8_1";
20363
- const styles$1L = {
20363
+ const styles$1M = {
20364
20364
  copyButton
20365
20365
  };
20366
20366
  const CopyButton = ({
@@ -20390,7 +20390,7 @@ const CopyButton = ({
20390
20390
  "button",
20391
20391
  {
20392
20392
  type: "button",
20393
- className: clsx("copy-button", styles$1L.copyButton, className2),
20393
+ className: clsx("copy-button", styles$1M.copyButton, className2),
20394
20394
  onClick: handleClick,
20395
20395
  "aria-label": ariaLabel,
20396
20396
  disabled: isCopied,
@@ -20468,7 +20468,7 @@ const moreToggleButton = "_moreToggleButton_1cl3h_36";
20468
20468
  const separator$6 = "_separator_1cl3h_42";
20469
20469
  const inlineRight = "_inlineRight_1cl3h_48";
20470
20470
  const blockLeft = "_blockLeft_1cl3h_54";
20471
- const styles$1K = {
20471
+ const styles$1L = {
20472
20472
  expandablePanel,
20473
20473
  expandableBordered,
20474
20474
  expandableCollapsed,
@@ -20521,10 +20521,10 @@ const ExpandablePanel = memo(
20521
20521
  ref: contentRef,
20522
20522
  "data-expandable-panel": "true",
20523
20523
  className: clsx(
20524
- styles$1K.expandablePanel,
20525
- collapsed2 ? styles$1K.expandableCollapsed : void 0,
20526
- border ? styles$1K.expandableBordered : void 0,
20527
- showToggle ? styles$1K.padBottom : void 0,
20524
+ styles$1L.expandablePanel,
20525
+ collapsed2 ? styles$1L.expandableCollapsed : void 0,
20526
+ border ? styles$1L.expandableBordered : void 0,
20527
+ showToggle ? styles$1L.padBottom : void 0,
20528
20528
  className2
20529
20529
  ),
20530
20530
  children: [
@@ -20550,7 +20550,7 @@ const ExpandablePanel = memo(
20550
20550
  position: "block-left"
20551
20551
  }
20552
20552
  ) }),
20553
- showToggle && layout == "inline-right" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1K.separator) })
20553
+ showToggle && layout == "inline-right" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1L.separator) })
20554
20554
  ] });
20555
20555
  }
20556
20556
  );
@@ -20569,15 +20569,15 @@ const MoreToggle = ({
20569
20569
  "div",
20570
20570
  {
20571
20571
  className: clsx(
20572
- styles$1K.moreToggle,
20573
- border ? styles$1K.bordered : void 0,
20574
- position === "inline-right" ? styles$1K.inlineRight : styles$1K.blockLeft
20572
+ styles$1L.moreToggle,
20573
+ border ? styles$1L.bordered : void 0,
20574
+ position === "inline-right" ? styles$1L.inlineRight : styles$1L.blockLeft
20575
20575
  ),
20576
20576
  style: style2,
20577
20577
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
20578
20578
  "button",
20579
20579
  {
20580
- className: clsx("btn", styles$1K.moreToggleButton, "text-size-smallest"),
20580
+ className: clsx("btn", styles$1L.moreToggleButton, "text-size-smallest"),
20581
20581
  onClick: handleClick,
20582
20582
  children: [
20583
20583
  text2,
@@ -24111,7 +24111,7 @@ const keyPairBordered = "_keyPairBordered_qjlxf_9";
24111
24111
  const key = "_key_qjlxf_1";
24112
24112
  const pre$1 = "_pre_qjlxf_19";
24113
24113
  const treeIcon = "_treeIcon_qjlxf_23";
24114
- const styles$1J = {
24114
+ const styles$1K = {
24115
24115
  keyPairContainer,
24116
24116
  keyPairBordered,
24117
24117
  key,
@@ -24297,8 +24297,8 @@ const RecordTree = ({
24297
24297
  "div",
24298
24298
  {
24299
24299
  className: clsx(
24300
- styles$1J.keyPairContainer,
24301
- index < items.length - 1 && useBorders ? styles$1J.keyPairBordered : void 0,
24300
+ styles$1K.keyPairContainer,
24301
+ index < items.length - 1 && useBorders ? styles$1K.keyPairBordered : void 0,
24302
24302
  "text-size-small"
24303
24303
  ),
24304
24304
  style: {
@@ -24311,7 +24311,7 @@ const RecordTree = ({
24311
24311
  "data-index": index,
24312
24312
  className: clsx(
24313
24313
  kRecordTreeKey,
24314
- styles$1J.key,
24314
+ styles$1K.key,
24315
24315
  "font-monospace",
24316
24316
  "text-style-secondary"
24317
24317
  ),
@@ -24321,16 +24321,16 @@ const RecordTree = ({
24321
24321
  setCollapsed(item2.id, !collapsedIds?.[item2.id]);
24322
24322
  },
24323
24323
  children: [
24324
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: item2.hasChildren ? /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: clsx(styles$1J.pre), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
24324
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: item2.hasChildren ? /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: clsx(styles$1K.pre), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
24325
24325
  "i",
24326
24326
  {
24327
24327
  className: clsx(
24328
24328
  collapsedIds && collapsedIds[item2.id] ? ApplicationIcons.tree.closed : ApplicationIcons.tree.open,
24329
- styles$1J.treeIcon
24329
+ styles$1K.treeIcon
24330
24330
  )
24331
24331
  }
24332
24332
  ) }) : void 0 }),
24333
- /* @__PURE__ */ jsxRuntimeExports.jsxs("pre", { className: clsx(styles$1J.pre), children: [
24333
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("pre", { className: clsx(styles$1K.pre), children: [
24334
24334
  item2.key,
24335
24335
  ":"
24336
24336
  ] })
@@ -24811,7 +24811,7 @@ const indented = "_indented_1k527_37";
24811
24811
  const copyLink$1 = "_copyLink_1k527_41";
24812
24812
  const metadataLabel = "_metadataLabel_1k527_52";
24813
24813
  const hover$1 = "_hover_1k527_56";
24814
- const styles$1I = {
24814
+ const styles$1J = {
24815
24815
  message: message$3,
24816
24816
  systemRole,
24817
24817
  timestamp,
@@ -24825,14 +24825,14 @@ const styles$1I = {
24825
24825
  };
24826
24826
  const panel$8 = "_panel_1pa96_1";
24827
24827
  const code$5 = "_code_1pa96_7";
24828
- const styles$1H = {
24828
+ const styles$1I = {
24829
24829
  panel: panel$8,
24830
24830
  code: code$5
24831
24831
  };
24832
24832
  const CodePanel = ({ code: code2, language: language2 = "json" }) => {
24833
24833
  const codeContainerRef = useRef(null);
24834
24834
  usePrismHighlight(codeContainerRef, code2.length);
24835
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: codeContainerRef, className: clsx(styles$1H.panel), children: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: clsx(styles$1H.code), children: /* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: clsx(`language-${language2}`), children: code2 }) }) });
24835
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: codeContainerRef, className: clsx(styles$1I.panel), children: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: clsx(styles$1I.code), children: /* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: clsx(`language-${language2}`), children: code2 }) }) });
24836
24836
  };
24837
24837
  class JsonWorkerPool {
24838
24838
  encoder = new TextEncoder();
@@ -95644,9 +95644,9 @@ function unescapeCodeHtmlEntities(str2) {
95644
95644
  }
95645
95645
  );
95646
95646
  }
95647
- const content$3 = "_content_13ihw_1";
95648
- const styles$1G = {
95649
- content: content$3
95647
+ const content$4 = "_content_13ihw_1";
95648
+ const styles$1H = {
95649
+ content: content$4
95650
95650
  };
95651
95651
  const Preformatted = forwardRef(
95652
95652
  ({ text: text2, style: style2, className: className2 }, ref) => {
@@ -95654,7 +95654,7 @@ const Preformatted = forwardRef(
95654
95654
  "pre",
95655
95655
  {
95656
95656
  ref,
95657
- className: clsx(styles$1G.content, "text-size-smaller", className2),
95657
+ className: clsx(styles$1H.content, "text-size-smaller", className2),
95658
95658
  style: style2,
95659
95659
  children: text2
95660
95660
  }
@@ -95689,22 +95689,22 @@ const RenderedText = forwardRef(({ markdown, style: style2, className: className
95689
95689
  });
95690
95690
  const webSearch = "_webSearch_1376z_1";
95691
95691
  const query$1 = "_query_1376z_8";
95692
- const styles$1F = {
95692
+ const styles$1G = {
95693
95693
  webSearch,
95694
95694
  query: query$1
95695
95695
  };
95696
95696
  const WebSearch = ({ query: query2 }) => {
95697
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$1F.webSearch, "text-size-smaller"), children: [
95697
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$1G.webSearch, "text-size-smaller"), children: [
95698
95698
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: clsx("text-style-label", "text-style-secondary"), children: "Web Search:" }),
95699
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: clsx(styles$1F.query, "text-size-smallest"), children: query2 })
95699
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: clsx(styles$1G.query, "text-size-smallest"), children: query2 })
95700
95700
  ] });
95701
95701
  };
95702
- const contentData = "_contentData_1sd1z_1";
95703
- const styles$1E = {
95702
+ const contentData = "_contentData_1lrx1_1";
95703
+ const styles$1F = {
95704
95704
  contentData
95705
95705
  };
95706
95706
  const result$1 = "_result_1mixg_12";
95707
- const styles$1D = {
95707
+ const styles$1E = {
95708
95708
  result: result$1
95709
95709
  };
95710
95710
  const WebSearchResults = ({
@@ -95715,7 +95715,7 @@ const WebSearchResults = ({
95715
95715
  "div",
95716
95716
  {
95717
95717
  className: clsx(
95718
- styles$1D.label,
95718
+ styles$1E.label,
95719
95719
  "text-style-label",
95720
95720
  "text-style-secondary",
95721
95721
  "text-size-smaller"
@@ -95723,10 +95723,10 @@ const WebSearchResults = ({
95723
95723
  children: "Results"
95724
95724
  }
95725
95725
  ),
95726
- /* @__PURE__ */ jsxRuntimeExports.jsx("ol", { className: clsx(styles$1D.results, "text-size-smaller"), children: results.map((result2, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
95726
+ /* @__PURE__ */ jsxRuntimeExports.jsx("ol", { className: clsx(styles$1E.results, "text-size-smaller"), children: results.map((result2, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
95727
95727
  "li",
95728
95728
  {
95729
- className: clsx(styles$1D.result, "text-style-secondary"),
95729
+ className: clsx(styles$1E.result, "text-style-secondary"),
95730
95730
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
95731
95731
  "a",
95732
95732
  {
@@ -95743,6 +95743,121 @@ const WebSearchResults = ({
95743
95743
  )) })
95744
95744
  ] });
95745
95745
  };
95746
+ const title$4 = "_title_1gjvf_1";
95747
+ const content$3 = "_content_1gjvf_11";
95748
+ const grid$a = "_grid_1gjvf_16";
95749
+ const styles$1D = {
95750
+ title: title$4,
95751
+ content: content$3,
95752
+ grid: grid$a
95753
+ };
95754
+ const grid$9 = "_grid_14885_1";
95755
+ const cell$2 = "_cell_14885_8";
95756
+ const styles$1C = {
95757
+ grid: grid$9,
95758
+ cell: cell$2
95759
+ };
95760
+ const MetaDataGrid = ({
95761
+ id,
95762
+ entries,
95763
+ className: className2,
95764
+ size,
95765
+ style: style2,
95766
+ plain
95767
+ }) => {
95768
+ const baseId = "metadata-grid";
95769
+ const fontStyle = size === "mini" ? "text-size-smallest" : "text-size-smaller";
95770
+ const entryEls = entryRecords(entries).map((entry, index) => {
95771
+ const id2 = `${baseId}-value-${index}`;
95772
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
95773
+ index !== 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
95774
+ "div",
95775
+ {
95776
+ style: {
95777
+ gridColumn: "1 / -1",
95778
+ borderBottom: `${!plain ? "solid 1px var(--bs-light-border-subtle" : ""}`
95779
+ }
95780
+ }
95781
+ ) : void 0,
95782
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
95783
+ "div",
95784
+ {
95785
+ className: clsx(
95786
+ `${baseId}-key`,
95787
+ styles$1C.cell,
95788
+ "text-style-label",
95789
+ "text-style-secondary",
95790
+ fontStyle
95791
+ ),
95792
+ children: entry?.name
95793
+ }
95794
+ ),
95795
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1C.value, `${baseId}-value`, fontStyle), children: entry && /* @__PURE__ */ jsxRuntimeExports.jsx(
95796
+ RenderedContent,
95797
+ {
95798
+ id: id2,
95799
+ entry,
95800
+ renderObject: (obj) => {
95801
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
95802
+ MetaDataGrid,
95803
+ {
95804
+ id: id2,
95805
+ className: clsx(styles$1C.nested),
95806
+ entries: obj,
95807
+ size,
95808
+ plain
95809
+ }
95810
+ );
95811
+ }
95812
+ }
95813
+ ) })
95814
+ ] }, `${baseId}-record-${index}`);
95815
+ });
95816
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id, className: clsx(className2, styles$1C.grid), style: style2, children: entryEls });
95817
+ };
95818
+ const entryRecords = (entries) => {
95819
+ if (!entries) {
95820
+ return [];
95821
+ }
95822
+ if (!Array.isArray(entries)) {
95823
+ return Object.entries(entries || {}).map(([key2, value2]) => {
95824
+ return { name: key2, value: value2 };
95825
+ });
95826
+ } else {
95827
+ return entries;
95828
+ }
95829
+ };
95830
+ const kCompactionMetadata = "compaction_metadata";
95831
+ const CompactionData = ({ id, data }) => {
95832
+ const compactionMetadata = data[kCompactionMetadata];
95833
+ let compactionContent = void 0;
95834
+ if (compactionMetadata.type === "anthropic_compact") {
95835
+ compactionContent = /* @__PURE__ */ jsxRuntimeExports.jsx(ExpandablePanel, { id: `${id}-compacted-content`, collapse: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(RenderedText, { markdown: String(compactionMetadata.content) }) });
95836
+ } else {
95837
+ compactionContent = /* @__PURE__ */ jsxRuntimeExports.jsx(
95838
+ MetaDataGrid,
95839
+ {
95840
+ id: `${id}-compacted-content-metadata`,
95841
+ className: styles$1D.grid,
95842
+ entries: compactionMetadata
95843
+ }
95844
+ );
95845
+ }
95846
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$1D.content, "text-size-small"), children: [
95847
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
95848
+ "div",
95849
+ {
95850
+ className: clsx(
95851
+ "text-style-label",
95852
+ "text-style-secondary",
95853
+ styles$1D.title
95854
+ ),
95855
+ children: "Compacted Content"
95856
+ }
95857
+ ),
95858
+ compactionContent
95859
+ ] });
95860
+ };
95746
95861
  const ContentDataView = ({ id, contentData: contentData2 }) => {
95747
95862
  const renderableData = contentData2.data;
95748
95863
  const renderer = contentDataRenderers.find(
@@ -95750,24 +95865,33 @@ const ContentDataView = ({ id, contentData: contentData2 }) => {
95750
95865
  );
95751
95866
  if (!renderer) {
95752
95867
  const { encrypted_content, ...record } = renderableData;
95753
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1E.contentData), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
95868
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1F.contentData), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
95754
95869
  RecordTree,
95755
95870
  {
95756
95871
  id: `${id}-tree`,
95757
95872
  record,
95758
- className: clsx(styles$1E.data),
95873
+ className: clsx(styles$1F.data),
95759
95874
  defaultExpandLevel: 0
95760
95875
  }
95761
95876
  ) });
95762
95877
  }
95763
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1E.contentData), children: renderer.render(renderableData) });
95878
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1F.contentData), children: renderer.render(id, renderableData) });
95879
+ };
95880
+ const compactionDataRenderer = {
95881
+ name: "Compaction",
95882
+ canRender: (data) => {
95883
+ return Object.hasOwn(data, kCompactionMetadata);
95884
+ },
95885
+ render: (id, data) => {
95886
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(CompactionData, { id, data });
95887
+ }
95764
95888
  };
95765
95889
  const webSearchServerToolRenderer = {
95766
95890
  name: "WebSearch",
95767
95891
  canRender: (data) => {
95768
95892
  return data.type === "server_tool_use" && data.name === "web_search";
95769
95893
  },
95770
- render: (data) => {
95894
+ render: (_id, data) => {
95771
95895
  return /* @__PURE__ */ jsxRuntimeExports.jsx(WebSearch, { query: data.input.query });
95772
95896
  }
95773
95897
  };
@@ -95776,7 +95900,7 @@ const webSearchResultsServerToolRenderer = {
95776
95900
  canRender: (data) => {
95777
95901
  return data.type === "web_search_tool_result" && Array.isArray(data.content);
95778
95902
  },
95779
- render: (data) => {
95903
+ render: (_id, data) => {
95780
95904
  const results = data.content;
95781
95905
  return /* @__PURE__ */ jsxRuntimeExports.jsx(WebSearchResults, { results });
95782
95906
  }
@@ -95784,7 +95908,7 @@ const webSearchResultsServerToolRenderer = {
95784
95908
  const serverToolRenderer = {
95785
95909
  name: "ServerTool",
95786
95910
  canRender: (data) => data.type === "server_tool_use",
95787
- render: (data) => {
95911
+ render: (id, data) => {
95788
95912
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
95789
95913
  /* @__PURE__ */ jsxRuntimeExports.jsx(
95790
95914
  "div",
@@ -95800,15 +95924,16 @@ const serverToolRenderer = {
95800
95924
  /* @__PURE__ */ jsxRuntimeExports.jsx(
95801
95925
  RecordTree,
95802
95926
  {
95803
- id: data.name || "server-tool",
95927
+ id: `${id}-server-tool`,
95804
95928
  record: data,
95805
- className: clsx(styles$1E.data)
95929
+ className: clsx(styles$1F.data)
95806
95930
  }
95807
95931
  )
95808
95932
  ] });
95809
95933
  }
95810
95934
  };
95811
95935
  const contentDataRenderers = [
95936
+ compactionDataRenderer,
95812
95937
  webSearchServerToolRenderer,
95813
95938
  webSearchResultsServerToolRenderer,
95814
95939
  serverToolRenderer
@@ -98991,7 +99116,7 @@ const documentFrame = "_documentFrame_1576h_1";
98991
99116
  const documentFrameTitle = "_documentFrameTitle_1576h_9";
98992
99117
  const downloadLink = "_downloadLink_1576h_16";
98993
99118
  const imageDocument = "_imageDocument_1576h_21";
98994
- const styles$1C = {
99119
+ const styles$1B = {
98995
99120
  documentFrame,
98996
99121
  documentFrameTitle,
98997
99122
  downloadLink,
@@ -99008,7 +99133,7 @@ const ContentDocumentView = ({
99008
99133
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ContentDocumentFrame, { document: document2, downloadable: canDownloadFiles, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
99009
99134
  "img",
99010
99135
  {
99011
- className: clsx(styles$1C.imageDocument),
99136
+ className: clsx(styles$1B.imageDocument),
99012
99137
  src: document2.document,
99013
99138
  alt: document2.filename,
99014
99139
  id
@@ -99033,17 +99158,17 @@ const ContentDocumentFrame = ({
99033
99158
  "div",
99034
99159
  {
99035
99160
  className: clsx(
99036
- styles$1C.documentFrame,
99161
+ styles$1B.documentFrame,
99037
99162
  "text-size-small",
99038
99163
  "text-style-secondary"
99039
99164
  ),
99040
99165
  children: [
99041
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$1C.documentFrameTitle), children: [
99166
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$1B.documentFrameTitle), children: [
99042
99167
  /* @__PURE__ */ jsxRuntimeExports.jsx("i", { className: clsx(iconForMimeType(document2.mime_type)) }),
99043
99168
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: downloadable ? /* @__PURE__ */ jsxRuntimeExports.jsx(
99044
99169
  "a",
99045
99170
  {
99046
- className: clsx(styles$1C.downloadLink),
99171
+ className: clsx(styles$1B.downloadLink),
99047
99172
  onClick: () => {
99048
99173
  api.download_file(document2.filename, document2.document);
99049
99174
  },
@@ -99057,7 +99182,7 @@ const ContentDocumentFrame = ({
99057
99182
  );
99058
99183
  };
99059
99184
  const jsonMessage = "_jsonMessage_oxf8d_1";
99060
- const styles$1B = {
99185
+ const styles$1A = {
99061
99186
  jsonMessage
99062
99187
  };
99063
99188
  const JsonMessageContent = ({
@@ -99070,7 +99195,7 @@ const JsonMessageContent = ({
99070
99195
  {
99071
99196
  id,
99072
99197
  record: json,
99073
- className: clsx(styles$1B.jsonMessage, className2),
99198
+ className: clsx(styles$1A.jsonMessage, className2),
99074
99199
  useBorders: false
99075
99200
  }
99076
99201
  );
@@ -99085,7 +99210,7 @@ const decodeHtmlEntities = (text2) => {
99085
99210
  };
99086
99211
  const citations = "_citations_1ggvf_1";
99087
99212
  const citationLink = "_citationLink_1ggvf_9";
99088
- const styles$1A = {
99213
+ const styles$1z = {
99089
99214
  citations,
99090
99215
  citationLink
99091
99216
  };
@@ -99093,7 +99218,7 @@ const MessageCitations = ({ citations: citations2 }) => {
99093
99218
  if (citations2.length === 0) {
99094
99219
  return void 0;
99095
99220
  }
99096
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1A.citations, "text-size-smallest"), children: citations2.map((citation, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
99221
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1z.citations, "text-size-smallest"), children: citations2.map((citation, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
99097
99222
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: index + 1 }),
99098
99223
  /* @__PURE__ */ jsxRuntimeExports.jsx(MessageCitation, { citation })
99099
99224
  ] }, index)) });
@@ -99113,7 +99238,7 @@ const UrlCitation = ({
99113
99238
  href: citation.url,
99114
99239
  target: "_blank",
99115
99240
  rel: "noopener noreferrer",
99116
- className: clsx(styles$1A.citationLink),
99241
+ className: clsx(styles$1z.citationLink),
99117
99242
  title: citation.cited_text ? `${citation.cited_text}
99118
99243
  ${citation.url}` : citation.url,
99119
99244
  children: children2
@@ -99122,7 +99247,7 @@ ${citation.url}` : citation.url,
99122
99247
  const OtherCitation = ({ children: children2 }) => /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: children2 });
99123
99248
  const contentImage = "_contentImage_srbm0_1";
99124
99249
  const reasoning = "_reasoning_srbm0_6";
99125
- const styles$1z = {
99250
+ const styles$1y = {
99126
99251
  contentImage,
99127
99252
  reasoning
99128
99253
  };
@@ -99133,7 +99258,7 @@ const args = "_args_1792k_22";
99133
99258
  const argLabel = "_argLabel_1792k_31";
99134
99259
  const error$3 = "_error_1792k_35";
99135
99260
  const toolPanel = "_toolPanel_1792k_40";
99136
- const styles$1y = {
99261
+ const styles$1x = {
99137
99262
  mcpToolUse,
99138
99263
  title: title$3,
99139
99264
  titleText,
@@ -99154,23 +99279,23 @@ const McpToolUse = ({ id, content: content2, className: className2 }) => {
99154
99279
  const titleStr = content2.context ? `${content2.context} — ${content2.name}()` : `${content2.name}()`;
99155
99280
  const listToolsResult = maybeListTools(content2);
99156
99281
  const webSearchResult = maybeWebSearchResult(content2);
99157
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { id, className: clsx(styles$1y.mcpToolUse, className2), children: [
99282
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { id, className: clsx(styles$1x.mcpToolUse, className2), children: [
99158
99283
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
99159
99284
  "div",
99160
99285
  {
99161
99286
  className: clsx(
99162
- styles$1y.title,
99287
+ styles$1x.title,
99163
99288
  "text-size-small",
99164
99289
  "text-style-secondary"
99165
99290
  ),
99166
99291
  children: [
99167
99292
  /* @__PURE__ */ jsxRuntimeExports.jsx("i", { className: ApplicationIcons.role.tool }),
99168
- /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: styles$1y.titleText, children: titleStr }),
99169
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$1y.type, children: content2.type })
99293
+ /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: styles$1x.titleText, children: titleStr }),
99294
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$1x.type, children: content2.type })
99170
99295
  ]
99171
99296
  }
99172
99297
  ),
99173
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$1y.args, children: [
99298
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$1x.args, children: [
99174
99299
  Object.keys(args2).map((key2, index) => {
99175
99300
  const value2 = args2[key2];
99176
99301
  let valueRecord = void 0;
@@ -99189,7 +99314,7 @@ const McpToolUse = ({ id, content: content2, className: className2 }) => {
99189
99314
  }),
99190
99315
  webSearchResult ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
99191
99316
  /* @__PURE__ */ jsxRuntimeExports.jsx(LabelDiv, { label: "results" }),
99192
- /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDiv, { children: webSearchResult.result.map((result2, index) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$1y.result, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
99317
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDiv, { children: webSearchResult.result.map((result2, index) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$1x.result, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
99193
99318
  "a",
99194
99319
  {
99195
99320
  href: result2.url,
@@ -99204,7 +99329,7 @@ const McpToolUse = ({ id, content: content2, className: className2 }) => {
99204
99329
  {
99205
99330
  id: `${id}-output`,
99206
99331
  collapse: true,
99207
- className: clsx(styles$1y.toolPanel),
99332
+ className: clsx(styles$1x.toolPanel),
99208
99333
  children: [
99209
99334
  /* @__PURE__ */ jsxRuntimeExports.jsx(LabelDiv, { label: tool2.name }),
99210
99335
  /* @__PURE__ */ jsxRuntimeExports.jsxs(ValueDiv, { children: [
@@ -99222,7 +99347,7 @@ const McpToolUse = ({ id, content: content2, className: className2 }) => {
99222
99347
  }
99223
99348
  ) })) : void 0
99224
99349
  ] }),
99225
- content2.error ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$1y.error, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
99350
+ content2.error ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$1x.error, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
99226
99351
  "Error: ",
99227
99352
  content2.error
99228
99353
  ] }) }) : !listToolsResult && !webSearchResult ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-size-small"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExpandablePanel, { id: `${id}-output`, collapse: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -99279,7 +99404,7 @@ const LabelDiv = ({ label: label2 }) => {
99279
99404
  "div",
99280
99405
  {
99281
99406
  className: clsx(
99282
- styles$1y.argLabel,
99407
+ styles$1x.argLabel,
99283
99408
  "text-style-secondary",
99284
99409
  "text-size-smaller"
99285
99410
  ),
@@ -99301,7 +99426,7 @@ const toolImage = "_toolImage_1wvgr_1";
99301
99426
  const output = "_output_1wvgr_6";
99302
99427
  const textOutput = "_textOutput_1wvgr_10";
99303
99428
  const textCode = "_textCode_1wvgr_18";
99304
- const styles$1x = {
99429
+ const styles$1w = {
99305
99430
  toolImage,
99306
99431
  output,
99307
99432
  textOutput,
@@ -99323,7 +99448,7 @@ const ToolOutput = ({ output: output2, className: className2 }) => {
99323
99448
  /* @__PURE__ */ jsxRuntimeExports.jsx(
99324
99449
  "img",
99325
99450
  {
99326
- className: clsx(styles$1x.toolImage),
99451
+ className: clsx(styles$1w.toolImage),
99327
99452
  src: out.image
99328
99453
  },
99329
99454
  key2
@@ -99339,7 +99464,7 @@ const ToolOutput = ({ output: output2, className: className2 }) => {
99339
99464
  /* @__PURE__ */ jsxRuntimeExports.jsx(ToolTextOutput, { text: String(output2) }, "tool-output-single")
99340
99465
  );
99341
99466
  }
99342
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1x.output, className2), children: outputs });
99467
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1w.output, className2), children: outputs });
99343
99468
  };
99344
99469
  const ToolTextOutput = ({ text: text2 }) => {
99345
99470
  if (isJson(text2)) {
@@ -99350,13 +99475,13 @@ const ToolTextOutput = ({ text: text2 }) => {
99350
99475
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
99351
99476
  ANSIDisplay,
99352
99477
  {
99353
- className: styles$1x.ansiOutput,
99478
+ className: styles$1w.ansiOutput,
99354
99479
  output: text2,
99355
99480
  style: { fontSize: "clamp(0.4rem, 1.15vw, 0.9rem)" }
99356
99481
  }
99357
99482
  );
99358
99483
  }
99359
- return /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: clsx(styles$1x.textOutput, "tool-output"), children: /* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: clsx("sourceCode", styles$1x.textCode), children: text2.trim() }) });
99484
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: clsx(styles$1w.textOutput, "tool-output"), children: /* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: clsx("sourceCode", styles$1w.textCode), children: text2.trim() }) });
99360
99485
  };
99361
99486
  const isMessageContent = (content2) => {
99362
99487
  return typeof content2 === "object" && content2 !== null && "type" in content2 && typeof content2.type === "string";
@@ -99465,7 +99590,7 @@ const messageRenderers = {
99465
99590
  }
99466
99591
  const renderReasoningCode = isOpenRouterReasoning(text2);
99467
99592
  const codeFormatted = renderReasoningCode ? JSON.stringify(jsonParse(text2), null, 2) : text2;
99468
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$1z.reasoning, "text-size-small"), children: [
99593
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$1y.reasoning, "text-size-small"), children: [
99469
99594
  /* @__PURE__ */ jsxRuntimeExports.jsx(
99470
99595
  "div",
99471
99596
  {
@@ -99488,7 +99613,7 @@ const messageRenderers = {
99488
99613
  render: (key2, content2, _isLast, _context) => {
99489
99614
  const c2 = content2;
99490
99615
  if (c2.image.startsWith("data:")) {
99491
- return /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: c2.image, className: styles$1z.contentImage }, key2);
99616
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: c2.image, className: styles$1y.contentImage }, key2);
99492
99617
  } else {
99493
99618
  return /* @__PURE__ */ jsxRuntimeExports.jsx("code", { children: c2.image }, key2);
99494
99619
  }
@@ -99727,20 +99852,20 @@ const extractInput = (args2, inputDescriptor) => {
99727
99852
  }
99728
99853
  };
99729
99854
  const toolCallView = "_toolCallView_l6wae_1";
99730
- const styles$1w = {
99855
+ const styles$1v = {
99731
99856
  toolCallView
99732
99857
  };
99733
99858
  const outputPre = "_outputPre_1jznn_1";
99734
99859
  const toolView = "_toolView_1jznn_7";
99735
99860
  const outputCode = "_outputCode_1jznn_15";
99736
- const styles$1v = {
99861
+ const styles$1u = {
99737
99862
  outputPre,
99738
99863
  toolView,
99739
99864
  outputCode
99740
99865
  };
99741
99866
  const todoList = "_todoList_1t8rx_1";
99742
99867
  const inProgress = "_inProgress_1t8rx_9";
99743
- const styles$1u = {
99868
+ const styles$1t = {
99744
99869
  todoList,
99745
99870
  inProgress
99746
99871
  };
@@ -99760,7 +99885,7 @@ const toToolTodos = (obj) => {
99760
99885
  };
99761
99886
  const TodoWriteInput = ({ contents: contents2, parentRef }) => {
99762
99887
  const todoItems = toToolTodos(contents2);
99763
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: parentRef, className: clsx(styles$1u.todoList), children: todoItems.map((todo) => {
99888
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: parentRef, className: clsx(styles$1t.todoList), children: todoItems.map((todo) => {
99764
99889
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
99765
99890
  /* @__PURE__ */ jsxRuntimeExports.jsx(
99766
99891
  "i",
@@ -99775,9 +99900,9 @@ const TodoWriteInput = ({ contents: contents2, parentRef }) => {
99775
99900
  "span",
99776
99901
  {
99777
99902
  className: clsx(
99778
- styles$1u.todoItem,
99903
+ styles$1t.todoItem,
99779
99904
  "text-size-smallest",
99780
- todo.status === "in_progress" ? styles$1u.inProgress : void 0
99905
+ todo.status === "in_progress" ? styles$1t.inProgress : void 0
99781
99906
  ),
99782
99907
  children: todo.content
99783
99908
  }
@@ -99800,7 +99925,7 @@ const ToolInput = (props) => {
99800
99925
  {
99801
99926
  markdown: toolCallView2.content,
99802
99927
  ref: sourceCodeRef,
99803
- className: clsx("tool-output", styles$1v.toolView, className2)
99928
+ className: clsx("tool-output", styles$1u.toolView, className2)
99804
99929
  }
99805
99930
  );
99806
99931
  } else {
@@ -99830,8 +99955,8 @@ const RenderTool = ({
99830
99955
  {
99831
99956
  className: clsx(
99832
99957
  "tool-output",
99833
- styles$1v.outputPre,
99834
- styles$1v.bottomMargin,
99958
+ styles$1u.outputPre,
99959
+ styles$1u.bottomMargin,
99835
99960
  className2
99836
99961
  ),
99837
99962
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -99841,7 +99966,7 @@ const RenderTool = ({
99841
99966
  "source-code",
99842
99967
  "sourceCode",
99843
99968
  contentType ? `language-${contentType}` : void 0,
99844
- styles$1v.outputCode
99969
+ styles$1u.outputCode
99845
99970
  ),
99846
99971
  children: formattedContent
99847
99972
  }
@@ -99858,16 +99983,16 @@ const isValidView = (view) => {
99858
99983
  const image = "_image_1vcac_1";
99859
99984
  const toolTitle = "_toolTitle_1vcac_6";
99860
99985
  const description = "_description_1vcac_10";
99861
- const styles$1t = {
99986
+ const styles$1s = {
99862
99987
  image,
99863
99988
  toolTitle,
99864
99989
  description
99865
99990
  };
99866
99991
  const ToolTitle = ({ title: title2, description: description2 }) => {
99867
99992
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
99868
- /* @__PURE__ */ jsxRuntimeExports.jsx("i", { className: clsx("bi", "bi-tools", styles$1t.image) }),
99869
- /* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: clsx("text-size-small", styles$1t.toolTitle), children: title2 }),
99870
- description2 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: clsx(styles$1t.description, "text-size-smallest"), children: [
99993
+ /* @__PURE__ */ jsxRuntimeExports.jsx("i", { className: clsx("bi", "bi-tools", styles$1s.image) }),
99994
+ /* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: clsx("text-size-small", styles$1s.toolTitle), children: title2 }),
99995
+ description2 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: clsx(styles$1s.description, "text-size-smallest"), children: [
99871
99996
  "- ",
99872
99997
  description2
99873
99998
  ] }) : void 0
@@ -99916,7 +100041,7 @@ const ToolCallView = ({
99916
100041
  });
99917
100042
  const contents2 = mode !== "compact" ? input2 : input2 || functionCall;
99918
100043
  const context = defaultContext("tool");
99919
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$1w.toolCallView), children: [
100044
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$1v.toolCallView), children: [
99920
100045
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
99921
100046
  mode !== "compact" && (!view || view.title) ? /* @__PURE__ */ jsxRuntimeExports.jsx(
99922
100047
  ToolTitle,
@@ -99969,7 +100094,7 @@ const normalizeContent$1 = (output2) => {
99969
100094
  };
99970
100095
  const content$2 = "_content_1b2jp_1";
99971
100096
  const codeCompact = "_codeCompact_1b2jp_5";
99972
- const styles$1s = {
100097
+ const styles$1r = {
99973
100098
  content: content$2,
99974
100099
  codeCompact
99975
100100
  };
@@ -100000,7 +100125,7 @@ const MessageContents = ({
100000
100125
  }
100001
100126
  const resolvedToolOutput = resolveToolMessage(toolMessage);
100002
100127
  if (toolCallStyle === "compact") {
100003
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("code", { className: clsx(styles$1s.codeCompact), children: [
100128
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("code", { className: clsx(styles$1r.codeCompact), children: [
100004
100129
  "tool: ",
100005
100130
  functionCall
100006
100131
  ] }) }, `tool-call-${idx}`);
@@ -100024,7 +100149,7 @@ const MessageContents = ({
100024
100149
  }
100025
100150
  });
100026
100151
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
100027
- message2.content && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$1s.content, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageContent, { contents: message2.content, context }) }),
100152
+ message2.content && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$1r.content, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageContent, { contents: message2.content, context }) }),
100028
100153
  toolCalls
100029
100154
  ] });
100030
100155
  } else {
@@ -100099,10 +100224,10 @@ const ChatMessage = memo(
100099
100224
  className: clsx(
100100
100225
  message2.role,
100101
100226
  "text-size-base",
100102
- styles$1I.message,
100103
- message2.role === "system" ? styles$1I.systemRole : void 0,
100104
- message2.role === "user" ? styles$1I.userRole : void 0,
100105
- mouseOver ? styles$1I.hover : void 0
100227
+ styles$1J.message,
100228
+ message2.role === "system" ? styles$1J.systemRole : void 0,
100229
+ message2.role === "user" ? styles$1J.userRole : void 0,
100230
+ mouseOver ? styles$1J.hover : void 0
100106
100231
  ),
100107
100232
  onMouseEnter: () => setMouseOver(true),
100108
100233
  onMouseLeave: () => setMouseOver(false),
@@ -100111,8 +100236,8 @@ const ChatMessage = memo(
100111
100236
  "div",
100112
100237
  {
100113
100238
  className: clsx(
100114
- styles$1I.messageGrid,
100115
- message2.role === "tool" ? styles$1I.toolMessageGrid : void 0,
100239
+ styles$1J.messageGrid,
100240
+ message2.role === "tool" ? styles$1J.toolMessageGrid : void 0,
100116
100241
  "text-style-label"
100117
100242
  ),
100118
100243
  children: [
@@ -100124,11 +100249,11 @@ const ChatMessage = memo(
100124
100249
  {
100125
100250
  icon: ApplicationIcons.link,
100126
100251
  value: toFullUrl(messageUrl),
100127
- className: clsx(styles$1I.copyLink)
100252
+ className: clsx(styles$1J.copyLink)
100128
100253
  }
100129
100254
  ) : ""
100130
100255
  ] }),
100131
- message2.timestamp && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$1I.timestamp, title: message2.timestamp, children: formatDateTime(new Date(message2.timestamp)) })
100256
+ message2.timestamp && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$1J.timestamp, title: message2.timestamp, children: formatDateTime(new Date(message2.timestamp)) })
100132
100257
  ]
100133
100258
  }
100134
100259
  ),
@@ -100136,8 +100261,8 @@ const ChatMessage = memo(
100136
100261
  "div",
100137
100262
  {
100138
100263
  className: clsx(
100139
- styles$1I.messageContents,
100140
- indented2 ? styles$1I.indented : void 0
100264
+ styles$1J.messageContents,
100265
+ indented2 ? styles$1J.indented : void 0
100141
100266
  ),
100142
100267
  children: [
100143
100268
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -100162,7 +100287,7 @@ const ChatMessage = memo(
100162
100287
  LabeledValue,
100163
100288
  {
100164
100289
  label: "Metadata",
100165
- className: clsx(styles$1I.metadataLabel, "text-size-smaller"),
100290
+ className: clsx(styles$1J.metadataLabel, "text-size-smaller"),
100166
100291
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
100167
100292
  RecordTree,
100168
100293
  {
@@ -100181,12 +100306,12 @@ const ChatMessage = memo(
100181
100306
  );
100182
100307
  }
100183
100308
  );
100184
- const grid$9 = "_grid_3x3ql_1";
100309
+ const grid$8 = "_grid_3x3ql_1";
100185
100310
  const number$1 = "_number_3x3ql_10";
100186
100311
  const user = "_user_3x3ql_14";
100187
100312
  const container$l = "_container_3x3ql_19";
100188
- const styles$1r = {
100189
- grid: grid$9,
100313
+ const styles$1q = {
100314
+ grid: grid$8,
100190
100315
  number: number$1,
100191
100316
  user,
100192
100317
  container: container$l
@@ -100205,9 +100330,9 @@ const ChatMessageRow = ({
100205
100330
  "div",
100206
100331
  {
100207
100332
  className: clsx(
100208
- styles$1r.grid,
100209
- styles$1r.container,
100210
- highlightUserMessage && resolvedMessage.message.role === "user" ? styles$1r.user : void 0
100333
+ styles$1q.grid,
100334
+ styles$1q.container,
100335
+ highlightUserMessage && resolvedMessage.message.role === "user" ? styles$1q.user : void 0
100211
100336
  ),
100212
100337
  children: [
100213
100338
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -100216,7 +100341,7 @@ const ChatMessageRow = ({
100216
100341
  className: clsx(
100217
100342
  "text-size-smaller",
100218
100343
  "text-style-secondary",
100219
- styles$1r.number
100344
+ styles$1q.number
100220
100345
  ),
100221
100346
  children: number2
100222
100347
  }
@@ -100240,9 +100365,9 @@ const ChatMessageRow = ({
100240
100365
  "div",
100241
100366
  {
100242
100367
  className: clsx(
100243
- styles$1r.container,
100244
- styles$1r.simple,
100245
- highlightUserMessage && resolvedMessage.message.role === "user" ? styles$1r.user : void 0
100368
+ styles$1q.container,
100369
+ styles$1q.simple,
100370
+ highlightUserMessage && resolvedMessage.message.role === "user" ? styles$1q.user : void 0
100246
100371
  ),
100247
100372
  children: [
100248
100373
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -100406,82 +100531,6 @@ const ChatSummary = ({ id, messages: messages2 }) => {
100406
100531
  }
100407
100532
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ChatView, { id, messages: summaryMessages });
100408
100533
  };
100409
- const grid$8 = "_grid_14885_1";
100410
- const cell$2 = "_cell_14885_8";
100411
- const styles$1q = {
100412
- grid: grid$8,
100413
- cell: cell$2
100414
- };
100415
- const MetaDataGrid = ({
100416
- id,
100417
- entries,
100418
- className: className2,
100419
- size,
100420
- style: style2,
100421
- plain
100422
- }) => {
100423
- const baseId = "metadata-grid";
100424
- const fontStyle = size === "mini" ? "text-size-smallest" : "text-size-smaller";
100425
- const entryEls = entryRecords(entries).map((entry, index) => {
100426
- const id2 = `${baseId}-value-${index}`;
100427
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
100428
- index !== 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
100429
- "div",
100430
- {
100431
- style: {
100432
- gridColumn: "1 / -1",
100433
- borderBottom: `${!plain ? "solid 1px var(--bs-light-border-subtle" : ""}`
100434
- }
100435
- }
100436
- ) : void 0,
100437
- /* @__PURE__ */ jsxRuntimeExports.jsx(
100438
- "div",
100439
- {
100440
- className: clsx(
100441
- `${baseId}-key`,
100442
- styles$1q.cell,
100443
- "text-style-label",
100444
- "text-style-secondary",
100445
- fontStyle
100446
- ),
100447
- children: entry?.name
100448
- }
100449
- ),
100450
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1q.value, `${baseId}-value`, fontStyle), children: entry && /* @__PURE__ */ jsxRuntimeExports.jsx(
100451
- RenderedContent,
100452
- {
100453
- id: id2,
100454
- entry,
100455
- renderObject: (obj) => {
100456
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
100457
- MetaDataGrid,
100458
- {
100459
- id: id2,
100460
- className: clsx(styles$1q.nested),
100461
- entries: obj,
100462
- size,
100463
- plain
100464
- }
100465
- );
100466
- }
100467
- }
100468
- ) })
100469
- ] }, `${baseId}-record-${index}`);
100470
- });
100471
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id, className: clsx(className2, styles$1q.grid), style: style2, children: entryEls });
100472
- };
100473
- const entryRecords = (entries) => {
100474
- if (!entries) {
100475
- return [];
100476
- }
100477
- if (!Array.isArray(entries)) {
100478
- return Object.entries(entries || {}).map(([key2, value2]) => {
100479
- return { name: key2, value: value2 };
100480
- });
100481
- } else {
100482
- return entries;
100483
- }
100484
- };
100485
100534
  const query = "_query_seqs2_1";
100486
100535
  const summary$3 = "_summary_seqs2_6";
100487
100536
  const preWrap = "_preWrap_seqs2_10";
@@ -106688,7 +106737,7 @@ const ViewerOptionsPopover = ({
106688
106737
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1j.fullWidth, styles$1j.fullWidthPadded), children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$1j.logDir, children: logDir2 }) }),
106689
106738
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1j.spacer) }),
106690
106739
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-style-label", "text-style-secondary"), children: "Version" }),
106691
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(), children: "0.3.172-0-g35c22e3f7" }),
106740
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(), children: "0.3.174-0-ga77523349" }),
106692
106741
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-style-label", "text-style-secondary"), children: "Schema" }),
106693
106742
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(), children: DB_VERSION }),
106694
106743
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1j.spacer) }),
@@ -169822,7 +169871,13 @@ const ModelEventView = ({
169822
169871
  const entries = { ...event.config };
169823
169872
  delete entries["max_connections"];
169824
169873
  const userMessages = [];
169825
- for (const msg of inputMessages.slice().reverse()) {
169874
+ let offset2 = void 0;
169875
+ const lastMessage = inputMessages.at(-1);
169876
+ if (lastMessage?.role === "assistant") {
169877
+ userMessages.push(lastMessage);
169878
+ offset2 = -1;
169879
+ }
169880
+ for (const msg of inputMessages.slice(offset2).reverse()) {
169826
169881
  if (msg.role === "user" && !msg.tool_call_id || msg.role === "system" || // If the client doesn't support tool events, then tools messages are allowed to be displayed
169827
169882
  // in this view, since no tool events will be shown. This pretty much happens for bridged agents
169828
169883
  // where tool events aren't captured.
@@ -179892,16 +179947,13 @@ const CompactionEventView = ({
179892
179947
  data["tokens_after"] = event.tokens_after;
179893
179948
  }
179894
179949
  data = { ...data, ...event.metadata || {} };
179950
+ const source2 = event.source && event.source !== "inspect" ? event.source : "";
179895
179951
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
179896
179952
  EventPanel,
179897
179953
  {
179898
179954
  eventNodeId: eventNode.id,
179899
179955
  depth: eventNode.depth,
179900
- title: formatTitle(
179901
- "Compaction" + (event.source ? ": " + event.source : ""),
179902
- void 0,
179903
- event.working_start
179904
- ),
179956
+ title: formatTitle("Compaction" + source2, void 0, event.working_start),
179905
179957
  className: className2,
179906
179958
  subTitle: formatDateTime(new Date(event.timestamp)),
179907
179959
  icon: ApplicationIcons.info,