@tangle-network/agent-app 0.60.7 → 0.60.9

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.
@@ -67,7 +67,7 @@ import {
67
67
  } from "./chunk-LQYIBL3G.js";
68
68
 
69
69
  // src/web-react/index.tsx
70
- import { useEffect as useEffect16, useMemo as useMemo10, useRef as useRef17, useState as useState24, memo } from "react";
70
+ import { useEffect as useEffect16, useMemo as useMemo10, useRef as useRef17, useState as useState25, memo } from "react";
71
71
  import { isViewerMessage, MessageAuthor } from "@tangle-network/ui/chat";
72
72
  import { InlineToolItem, RunRowShell } from "@tangle-network/ui/run";
73
73
 
@@ -7696,39 +7696,87 @@ function ApiAccessPanel({
7696
7696
  ] }) });
7697
7697
  }
7698
7698
 
7699
+ // src/web-react/agent-setup-block.tsx
7700
+ import { useState as useState24 } from "react";
7701
+ import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
7702
+ function AgentSetupBlock({ productName, setupUrl, markdown, className }) {
7703
+ const [notice, setNotice] = useState24(null);
7704
+ const prompt = markdown ?? `Set up ${productName} for me. Fetch ${setupUrl} and follow every step in it.`;
7705
+ async function copy() {
7706
+ try {
7707
+ await navigator.clipboard.writeText(prompt);
7708
+ setNotice("Copied. Paste it into your coding agent.");
7709
+ } catch {
7710
+ setNotice(`Clipboard unavailable. Open ${setupUrl} and copy it from there.`);
7711
+ }
7712
+ }
7713
+ return /* @__PURE__ */ jsxs22(
7714
+ "section",
7715
+ {
7716
+ "aria-labelledby": "agent-setup-heading",
7717
+ className: `space-y-3 rounded-xl border border-border bg-card p-5 ${className ?? ""}`.trim(),
7718
+ children: [
7719
+ /* @__PURE__ */ jsxs22("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [
7720
+ /* @__PURE__ */ jsx24("h2", { id: "agent-setup-heading", className: "font-medium text-foreground", children: "Hand this to your agent" }),
7721
+ /* @__PURE__ */ jsx24(
7722
+ "button",
7723
+ {
7724
+ type: "button",
7725
+ onClick: copy,
7726
+ className: "inline-flex items-center justify-center rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",
7727
+ children: "Copy setup prompt"
7728
+ }
7729
+ )
7730
+ ] }),
7731
+ /* @__PURE__ */ jsxs22("p", { className: "text-sm text-muted-foreground", children: [
7732
+ "Your coding agent sets up ",
7733
+ productName,
7734
+ " end to end: it asks you to approve once, gets its own capped key, installs the client, and verifies a first call."
7735
+ ] }),
7736
+ /* @__PURE__ */ jsxs22("p", { className: "text-sm text-muted-foreground", children: [
7737
+ "Raw prompt:",
7738
+ " ",
7739
+ /* @__PURE__ */ jsx24("a", { href: setupUrl, className: "font-mono text-foreground underline", children: setupUrl })
7740
+ ] }),
7741
+ notice ? /* @__PURE__ */ jsx24("p", { role: "status", className: "text-sm text-foreground", children: notice }) : null
7742
+ ]
7743
+ }
7744
+ );
7745
+ }
7746
+
7699
7747
  // src/web-react/agent-profile-choices.tsx
7700
7748
  import { useId as useId9 } from "react";
7701
- import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
7749
+ import { jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
7702
7750
  function AgentProfileChoices({ value, profiles, onChange, disabled, locked, lockReason, onNewChat, label = "Agent profile" }) {
7703
7751
  const name = useId9();
7704
7752
  const selected = profiles.find((profile) => profile.id === value);
7705
7753
  if (locked) {
7706
- return /* @__PURE__ */ jsxs22("div", { className: "space-y-2 rounded-lg border border-border p-3 text-sm", children: [
7707
- /* @__PURE__ */ jsx24("p", { className: "font-medium text-foreground", children: selected?.name ?? value }),
7708
- /* @__PURE__ */ jsx24("p", { className: "text-muted-foreground", children: lockReason ?? "This conversation stays on its current profile." }),
7709
- onNewChat && !disabled && /* @__PURE__ */ jsx24("button", { type: "button", onClick: onNewChat, className: "text-sm font-medium text-primary underline underline-offset-4", children: "New chat to switch profile" })
7754
+ return /* @__PURE__ */ jsxs23("div", { className: "space-y-2 rounded-lg border border-border p-3 text-sm", children: [
7755
+ /* @__PURE__ */ jsx25("p", { className: "font-medium text-foreground", children: selected?.name ?? value }),
7756
+ /* @__PURE__ */ jsx25("p", { className: "text-muted-foreground", children: lockReason ?? "This conversation stays on its current profile." }),
7757
+ onNewChat && !disabled && /* @__PURE__ */ jsx25("button", { type: "button", onClick: onNewChat, className: "text-sm font-medium text-primary underline underline-offset-4", children: "New chat to switch profile" })
7710
7758
  ] });
7711
7759
  }
7712
- return /* @__PURE__ */ jsxs22("fieldset", { disabled, className: "min-w-0 space-y-1", children: [
7713
- /* @__PURE__ */ jsx24("legend", { className: "sr-only", children: label }),
7714
- /* @__PURE__ */ jsxs22("div", { className: "max-h-48 space-y-1 overflow-y-auto", children: [
7715
- profiles.map((profile) => /* @__PURE__ */ jsxs22("label", { className: "flex min-h-10 cursor-pointer items-start gap-2 rounded-lg border border-transparent p-2 text-sm hover:bg-muted has-[:checked]:border-border has-[:checked]:bg-muted has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-60", children: [
7716
- /* @__PURE__ */ jsx24("input", { type: "radio", name, value: profile.id, checked: profile.id === value, disabled, onChange: () => {
7760
+ return /* @__PURE__ */ jsxs23("fieldset", { disabled, className: "min-w-0 space-y-1", children: [
7761
+ /* @__PURE__ */ jsx25("legend", { className: "sr-only", children: label }),
7762
+ /* @__PURE__ */ jsxs23("div", { className: "max-h-48 space-y-1 overflow-y-auto", children: [
7763
+ profiles.map((profile) => /* @__PURE__ */ jsxs23("label", { className: "flex min-h-10 cursor-pointer items-start gap-2 rounded-lg border border-transparent p-2 text-sm hover:bg-muted has-[:checked]:border-border has-[:checked]:bg-muted has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-60", children: [
7764
+ /* @__PURE__ */ jsx25("input", { type: "radio", name, value: profile.id, checked: profile.id === value, disabled, onChange: () => {
7717
7765
  if (!disabled) onChange(profile.id);
7718
7766
  }, className: "mt-1 shrink-0 accent-primary" }),
7719
- /* @__PURE__ */ jsxs22("span", { className: "min-w-0", children: [
7720
- /* @__PURE__ */ jsx24("span", { className: "block font-medium text-foreground", children: profile.name }),
7721
- profile.description && /* @__PURE__ */ jsx24("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: profile.description })
7767
+ /* @__PURE__ */ jsxs23("span", { className: "min-w-0", children: [
7768
+ /* @__PURE__ */ jsx25("span", { className: "block font-medium text-foreground", children: profile.name }),
7769
+ profile.description && /* @__PURE__ */ jsx25("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: profile.description })
7722
7770
  ] })
7723
7771
  ] }, profile.id)),
7724
- profiles.length === 0 && /* @__PURE__ */ jsx24("p", { role: "status", className: "p-2 text-sm text-muted-foreground", children: "No profiles available." })
7772
+ profiles.length === 0 && /* @__PURE__ */ jsx25("p", { role: "status", className: "p-2 text-sm text-muted-foreground", children: "No profiles available." })
7725
7773
  ] })
7726
7774
  ] });
7727
7775
  }
7728
7776
 
7729
7777
  // src/web-react/composer-profile-pill.tsx
7730
7778
  import { AgentProfilePicker } from "@tangle-network/sandbox-ui/chat";
7731
- import { jsx as jsx25 } from "react/jsx-runtime";
7779
+ import { jsx as jsx26 } from "react/jsx-runtime";
7732
7780
  var TRIGGER = {
7733
7781
  composer: "max-w-[180px]",
7734
7782
  // A menu panel repoints surface-container to its own tone, which would leave
@@ -7751,7 +7799,7 @@ function ComposerProfilePill({
7751
7799
  placement = "composer",
7752
7800
  className
7753
7801
  }) {
7754
- return /* @__PURE__ */ jsx25(
7802
+ return /* @__PURE__ */ jsx26(
7755
7803
  AgentProfilePicker,
7756
7804
  {
7757
7805
  value: selection.value,
@@ -7773,7 +7821,7 @@ function ComposerProfilePill({
7773
7821
  }
7774
7822
 
7775
7823
  // src/web-react/index.tsx
7776
- import { Fragment as Fragment10, jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
7824
+ import { Fragment as Fragment10, jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
7777
7825
  function formatModelCost(msg, models) {
7778
7826
  if (msg.promptTokens == null && msg.completionTokens == null) return null;
7779
7827
  const pricing = models.find((m) => m.id === msg.modelUsed)?.pricing;
@@ -7792,41 +7840,41 @@ function formatTokensPerSecond(msg) {
7792
7840
  return `${Math.round(msg.completionTokens / (msg.durationMs / 1e3))} tok/s`;
7793
7841
  }
7794
7842
  function RunDrillIn({ run, onClose }) {
7795
- return /* @__PURE__ */ jsxs23("div", { className: `fixed inset-y-0 right-0 z-50 flex w-[480px] max-w-full flex-col border-l border-card-edge bg-popover ${OVERLAY_SHADOW}`, children: [
7796
- /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2 border-b border-border px-4 py-3", children: [
7797
- /* @__PURE__ */ jsx26(
7843
+ return /* @__PURE__ */ jsxs24("div", { className: `fixed inset-y-0 right-0 z-50 flex w-[480px] max-w-full flex-col border-l border-card-edge bg-popover ${OVERLAY_SHADOW}`, children: [
7844
+ /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2 border-b border-border px-4 py-3", children: [
7845
+ /* @__PURE__ */ jsx27(
7798
7846
  "span",
7799
7847
  {
7800
7848
  className: `h-2 w-2 shrink-0 rounded-full ${run.status === "running" ? "bg-warning" : run.status === "error" ? "bg-destructive" : "bg-success"}`
7801
7849
  }
7802
7850
  ),
7803
- /* @__PURE__ */ jsxs23("div", { className: "min-w-0 flex-1", children: [
7804
- /* @__PURE__ */ jsx26("p", { className: "truncate text-[15px] font-semibold", children: run.title }),
7805
- /* @__PURE__ */ jsx26("p", { className: "truncate font-mono text-xs text-muted-foreground", children: run.toolName })
7851
+ /* @__PURE__ */ jsxs24("div", { className: "min-w-0 flex-1", children: [
7852
+ /* @__PURE__ */ jsx27("p", { className: "truncate text-[15px] font-semibold", children: run.title }),
7853
+ /* @__PURE__ */ jsx27("p", { className: "truncate font-mono text-xs text-muted-foreground", children: run.toolName })
7806
7854
  ] }),
7807
- /* @__PURE__ */ jsx26(
7855
+ /* @__PURE__ */ jsx27(
7808
7856
  "button",
7809
7857
  {
7810
7858
  type: "button",
7811
7859
  onClick: onClose,
7812
7860
  "aria-label": "Close",
7813
7861
  className: "rounded-md p-1.5 text-muted-foreground transition hover:bg-accent hover:text-foreground",
7814
- children: /* @__PURE__ */ jsx26("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx26("path", { d: "M18 6 6 18M6 6l12 12" }) })
7862
+ children: /* @__PURE__ */ jsx27("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx27("path", { d: "M18 6 6 18M6 6l12 12" }) })
7815
7863
  }
7816
7864
  )
7817
7865
  ] }),
7818
- /* @__PURE__ */ jsxs23("div", { className: "flex-1 space-y-3 overflow-y-auto p-4", children: [
7819
- run.steps.length === 0 && /* @__PURE__ */ jsx26("p", { className: "text-sm text-muted-foreground", children: "No steps recorded yet." }),
7820
- run.steps.map((step, i) => /* @__PURE__ */ jsxs23("div", { className: "rounded-lg border border-card-edge bg-card", children: [
7821
- /* @__PURE__ */ jsxs23("div", { className: "flex items-baseline gap-2 border-b border-border px-3 py-1.5", children: [
7822
- /* @__PURE__ */ jsx26("span", { className: `font-mono text-xs ${step.status === "error" ? "text-destructive" : "text-muted-foreground"}`, children: step.status === "error" ? "\u2717" : "$" }),
7823
- /* @__PURE__ */ jsx26("code", { className: "min-w-0 flex-1 truncate font-mono text-xs", children: step.label }),
7824
- /* @__PURE__ */ jsx26("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: new Date(step.at).toLocaleTimeString([], { hour: "numeric", minute: "2-digit" }) })
7866
+ /* @__PURE__ */ jsxs24("div", { className: "flex-1 space-y-3 overflow-y-auto p-4", children: [
7867
+ run.steps.length === 0 && /* @__PURE__ */ jsx27("p", { className: "text-sm text-muted-foreground", children: "No steps recorded yet." }),
7868
+ run.steps.map((step, i) => /* @__PURE__ */ jsxs24("div", { className: "rounded-lg border border-card-edge bg-card", children: [
7869
+ /* @__PURE__ */ jsxs24("div", { className: "flex items-baseline gap-2 border-b border-border px-3 py-1.5", children: [
7870
+ /* @__PURE__ */ jsx27("span", { className: `font-mono text-xs ${step.status === "error" ? "text-destructive" : "text-muted-foreground"}`, children: step.status === "error" ? "\u2717" : "$" }),
7871
+ /* @__PURE__ */ jsx27("code", { className: "min-w-0 flex-1 truncate font-mono text-xs", children: step.label }),
7872
+ /* @__PURE__ */ jsx27("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: new Date(step.at).toLocaleTimeString([], { hour: "numeric", minute: "2-digit" }) })
7825
7873
  ] }),
7826
- step.detail && /* @__PURE__ */ jsx26("pre", { className: "max-h-48 overflow-auto whitespace-pre-wrap px-3 py-2 font-mono text-xs leading-relaxed text-muted-foreground", children: step.detail })
7874
+ step.detail && /* @__PURE__ */ jsx27("pre", { className: "max-h-48 overflow-auto whitespace-pre-wrap px-3 py-2 font-mono text-xs leading-relaxed text-muted-foreground", children: step.detail })
7827
7875
  ] }, i))
7828
7876
  ] }),
7829
- /* @__PURE__ */ jsx26("p", { className: "border-t border-border px-4 py-2 text-xs text-muted-foreground", children: "Read-only transcript \u2014 reply in the main chat." })
7877
+ /* @__PURE__ */ jsx27("p", { className: "border-t border-border px-4 py-2 text-xs text-muted-foreground", children: "Read-only transcript \u2014 reply in the main chat." })
7830
7878
  ] });
7831
7879
  }
7832
7880
  function pendingApprovalOf(call) {
@@ -7842,23 +7890,23 @@ function ChatEmptyState({
7842
7890
  }) {
7843
7891
  const doorCount = Math.min(doors?.length ?? 0, 3);
7844
7892
  const doorsGridClass = doorCount === 1 ? "mx-auto max-w-sm sm:grid-cols-1" : doorCount === 2 ? "sm:grid-cols-2" : "sm:grid-cols-3";
7845
- return /* @__PURE__ */ jsxs23("div", { className: "mx-auto flex w-full max-w-2xl flex-col items-center px-6 py-12 text-center sm:py-20", children: [
7846
- /* @__PURE__ */ jsx26("span", { className: "mb-5 inline-flex h-14 w-14 items-center justify-center rounded-2xl bg-primary/10 ring-1 ring-primary/15", children: /* @__PURE__ */ jsx26(BrandMark, { size: 32, className: "shrink-0" }) }),
7847
- /* @__PURE__ */ jsx26("p", { className: "text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: productName }),
7848
- /* @__PURE__ */ jsx26("h2", { className: "mt-1.5 text-balance text-2xl font-semibold leading-tight text-foreground", children: headline }),
7849
- subline && /* @__PURE__ */ jsx26("p", { className: "mt-3 max-w-md text-[15px] leading-relaxed text-muted-foreground", children: subline }),
7850
- doors && doors.length > 0 && /* @__PURE__ */ jsx26("div", { className: `mt-7 grid w-full gap-2.5 ${doorsGridClass}`, children: doors.slice(0, 3).map((door, i) => /* @__PURE__ */ jsxs23(
7893
+ return /* @__PURE__ */ jsxs24("div", { className: "mx-auto flex w-full max-w-2xl flex-col items-center px-6 py-12 text-center sm:py-20", children: [
7894
+ /* @__PURE__ */ jsx27("span", { className: "mb-5 inline-flex h-14 w-14 items-center justify-center rounded-2xl bg-primary/10 ring-1 ring-primary/15", children: /* @__PURE__ */ jsx27(BrandMark, { size: 32, className: "shrink-0" }) }),
7895
+ /* @__PURE__ */ jsx27("p", { className: "text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: productName }),
7896
+ /* @__PURE__ */ jsx27("h2", { className: "mt-1.5 text-balance text-2xl font-semibold leading-tight text-foreground", children: headline }),
7897
+ subline && /* @__PURE__ */ jsx27("p", { className: "mt-3 max-w-md text-[15px] leading-relaxed text-muted-foreground", children: subline }),
7898
+ doors && doors.length > 0 && /* @__PURE__ */ jsx27("div", { className: `mt-7 grid w-full gap-2.5 ${doorsGridClass}`, children: doors.slice(0, 3).map((door, i) => /* @__PURE__ */ jsxs24(
7851
7899
  "button",
7852
7900
  {
7853
7901
  type: "button",
7854
7902
  onClick: door.onSelect,
7855
7903
  className: "group flex min-h-[44px] flex-col items-start rounded-xl border border-border bg-card px-4 py-3 text-left transition hover:border-primary/40 hover:bg-accent",
7856
7904
  children: [
7857
- /* @__PURE__ */ jsxs23("span", { className: "flex items-center gap-2 text-sm font-semibold text-foreground", children: [
7905
+ /* @__PURE__ */ jsxs24("span", { className: "flex items-center gap-2 text-sm font-semibold text-foreground", children: [
7858
7906
  door.icon,
7859
7907
  door.label
7860
7908
  ] }),
7861
- door.description && /* @__PURE__ */ jsx26("span", { className: "mt-0.5 text-[12px] leading-snug text-muted-foreground", children: door.description })
7909
+ door.description && /* @__PURE__ */ jsx27("span", { className: "mt-0.5 text-[12px] leading-snug text-muted-foreground", children: door.description })
7862
7910
  ]
7863
7911
  },
7864
7912
  i
@@ -7867,26 +7915,26 @@ function ChatEmptyState({
7867
7915
  }
7868
7916
  function ToolGlyph({ name, className }) {
7869
7917
  if (name.startsWith("sandbox_")) {
7870
- return /* @__PURE__ */ jsxs23("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
7871
- /* @__PURE__ */ jsx26("polyline", { points: "4 17 10 11 4 5" }),
7872
- /* @__PURE__ */ jsx26("line", { x1: "12", y1: "19", x2: "20", y2: "19" })
7918
+ return /* @__PURE__ */ jsxs24("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
7919
+ /* @__PURE__ */ jsx27("polyline", { points: "4 17 10 11 4 5" }),
7920
+ /* @__PURE__ */ jsx27("line", { x1: "12", y1: "19", x2: "20", y2: "19" })
7873
7921
  ] });
7874
7922
  }
7875
7923
  if (name === "submit_proposal") {
7876
- return /* @__PURE__ */ jsxs23("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
7877
- /* @__PURE__ */ jsx26("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
7878
- /* @__PURE__ */ jsx26("path", { d: "M14 2v6h6M9 15l2 2 4-4" })
7924
+ return /* @__PURE__ */ jsxs24("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
7925
+ /* @__PURE__ */ jsx27("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
7926
+ /* @__PURE__ */ jsx27("path", { d: "M14 2v6h6M9 15l2 2 4-4" })
7879
7927
  ] });
7880
7928
  }
7881
7929
  if (name === "schedule_followup") {
7882
- return /* @__PURE__ */ jsxs23("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: [
7883
- /* @__PURE__ */ jsx26("circle", { cx: "12", cy: "12", r: "9" }),
7884
- /* @__PURE__ */ jsx26("path", { d: "M12 7v5l3 3" })
7930
+ return /* @__PURE__ */ jsxs24("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: [
7931
+ /* @__PURE__ */ jsx27("circle", { cx: "12", cy: "12", r: "9" }),
7932
+ /* @__PURE__ */ jsx27("path", { d: "M12 7v5l3 3" })
7885
7933
  ] });
7886
7934
  }
7887
- return /* @__PURE__ */ jsxs23("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
7888
- /* @__PURE__ */ jsx26("path", { d: "M12 3v3m0 12v3M3 12h3m12 0h3" }),
7889
- /* @__PURE__ */ jsx26("circle", { cx: "12", cy: "12", r: "4" })
7935
+ return /* @__PURE__ */ jsxs24("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
7936
+ /* @__PURE__ */ jsx27("path", { d: "M12 3v3m0 12v3M3 12h3m12 0h3" }),
7937
+ /* @__PURE__ */ jsx27("circle", { cx: "12", cy: "12", r: "4" })
7890
7938
  ] });
7891
7939
  }
7892
7940
  function toolOutcomeOf(call) {
@@ -7972,40 +8020,40 @@ function truncate(v, max = 240) {
7972
8020
  function KvRows({ data }) {
7973
8021
  const entries = Object.entries(data).filter(([, v]) => v !== void 0 && v !== null && v !== "");
7974
8022
  if (!entries.length) return null;
7975
- return /* @__PURE__ */ jsx26("dl", { className: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-1", children: entries.map(([k, v]) => /* @__PURE__ */ jsxs23("div", { className: "contents", children: [
7976
- /* @__PURE__ */ jsx26("dt", { className: "font-mono text-xs text-muted-foreground", children: k }),
7977
- /* @__PURE__ */ jsx26("dd", { className: "min-w-0 whitespace-pre-wrap break-words font-mono text-xs text-muted-foreground", children: truncate(v) })
8023
+ return /* @__PURE__ */ jsx27("dl", { className: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-1", children: entries.map(([k, v]) => /* @__PURE__ */ jsxs24("div", { className: "contents", children: [
8024
+ /* @__PURE__ */ jsx27("dt", { className: "font-mono text-xs text-muted-foreground", children: k }),
8025
+ /* @__PURE__ */ jsx27("dd", { className: "min-w-0 whitespace-pre-wrap break-words font-mono text-xs text-muted-foreground", children: truncate(v) })
7978
8026
  ] }, k)) });
7979
8027
  }
7980
8028
  function ShellDetail({ call }) {
7981
8029
  const outcome = toolOutcomeOf(call);
7982
8030
  const r = outcome?.result ?? {};
7983
- return /* @__PURE__ */ jsxs23("div", { className: "overflow-hidden rounded-md bg-zinc-900 font-mono text-xs leading-relaxed", children: [
7984
- /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2 px-3 pt-2 text-zinc-400", children: [
7985
- /* @__PURE__ */ jsx26("span", { className: "select-none text-zinc-500", children: "$" }),
7986
- /* @__PURE__ */ jsx26("span", { className: "min-w-0 flex-1 truncate text-zinc-200", children: String(call.args?.command ?? "") }),
7987
- r.exitCode != null && /* @__PURE__ */ jsxs23("span", { className: r.exitCode === 0 ? "text-success" : "text-destructive", children: [
8031
+ return /* @__PURE__ */ jsxs24("div", { className: "overflow-hidden rounded-md bg-zinc-900 font-mono text-xs leading-relaxed", children: [
8032
+ /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2 px-3 pt-2 text-zinc-400", children: [
8033
+ /* @__PURE__ */ jsx27("span", { className: "select-none text-zinc-500", children: "$" }),
8034
+ /* @__PURE__ */ jsx27("span", { className: "min-w-0 flex-1 truncate text-zinc-200", children: String(call.args?.command ?? "") }),
8035
+ r.exitCode != null && /* @__PURE__ */ jsxs24("span", { className: r.exitCode === 0 ? "text-success" : "text-destructive", children: [
7988
8036
  "exit ",
7989
8037
  r.exitCode
7990
8038
  ] })
7991
8039
  ] }),
7992
- /* @__PURE__ */ jsx26("pre", { className: "max-h-56 overflow-auto whitespace-pre-wrap px-3 pb-2.5 pt-1.5 text-zinc-300", children: outcome?.ok === false ? outcome.message ?? "failed" : [r.stdout, r.stderr].filter(Boolean).join("\n") || "(no output)" })
8040
+ /* @__PURE__ */ jsx27("pre", { className: "max-h-56 overflow-auto whitespace-pre-wrap px-3 pb-2.5 pt-1.5 text-zinc-300", children: outcome?.ok === false ? outcome.message ?? "failed" : [r.stdout, r.stderr].filter(Boolean).join("\n") || "(no output)" })
7993
8041
  ] });
7994
8042
  }
7995
8043
  function DefaultToolDetail({ call }) {
7996
8044
  const result = call.result;
7997
8045
  const envelope = typeof result === "object" && result !== null ? result : null;
7998
- return /* @__PURE__ */ jsxs23("div", { className: "space-y-2", children: [
7999
- call.args && Object.keys(call.args).length > 0 && /* @__PURE__ */ jsxs23("div", { children: [
8000
- /* @__PURE__ */ jsx26("p", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Called with" }),
8001
- /* @__PURE__ */ jsx26(KvRows, { data: call.args })
8046
+ return /* @__PURE__ */ jsxs24("div", { className: "space-y-2", children: [
8047
+ call.args && Object.keys(call.args).length > 0 && /* @__PURE__ */ jsxs24("div", { children: [
8048
+ /* @__PURE__ */ jsx27("p", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Called with" }),
8049
+ /* @__PURE__ */ jsx27(KvRows, { data: call.args })
8002
8050
  ] }),
8003
- envelope ? /* @__PURE__ */ jsxs23("div", { children: [
8004
- /* @__PURE__ */ jsx26("p", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: envelope.ok === false ? "Failed" : "Result" }),
8005
- envelope.ok === false ? /* @__PURE__ */ jsx26("p", { className: "text-xs text-destructive", children: envelope.message ?? "Tool failed" }) : envelope.result && typeof envelope.result === "object" ? /* @__PURE__ */ jsx26(KvRows, { data: envelope.result }) : envelope.result != null ? /* @__PURE__ */ jsx26("p", { className: "font-mono text-xs text-muted-foreground", children: truncate(envelope.result) }) : null
8006
- ] }) : result != null ? /* @__PURE__ */ jsxs23("div", { children: [
8007
- /* @__PURE__ */ jsx26("p", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Result" }),
8008
- /* @__PURE__ */ jsx26("p", { className: "font-mono text-xs text-muted-foreground", children: truncate(result) })
8051
+ envelope ? /* @__PURE__ */ jsxs24("div", { children: [
8052
+ /* @__PURE__ */ jsx27("p", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: envelope.ok === false ? "Failed" : "Result" }),
8053
+ envelope.ok === false ? /* @__PURE__ */ jsx27("p", { className: "text-xs text-destructive", children: envelope.message ?? "Tool failed" }) : envelope.result && typeof envelope.result === "object" ? /* @__PURE__ */ jsx27(KvRows, { data: envelope.result }) : envelope.result != null ? /* @__PURE__ */ jsx27("p", { className: "font-mono text-xs text-muted-foreground", children: truncate(envelope.result) }) : null
8054
+ ] }) : result != null ? /* @__PURE__ */ jsxs24("div", { children: [
8055
+ /* @__PURE__ */ jsx27("p", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Result" }),
8056
+ /* @__PURE__ */ jsx27("p", { className: "font-mono text-xs text-muted-foreground", children: truncate(result) })
8009
8057
  ] }) : null
8010
8058
  ] });
8011
8059
  }
@@ -8016,24 +8064,24 @@ function ProposalCard({
8016
8064
  approval,
8017
8065
  renderers
8018
8066
  }) {
8019
- const [expanded, setExpanded] = useState24(false);
8067
+ const [expanded, setExpanded] = useState25(false);
8020
8068
  const { summary, meta, typeSlug } = proposalPreview(call);
8021
8069
  const custom = renderers?.[call.name]?.(call, message);
8022
8070
  const { pending: deciding, run: decide } = usePending();
8023
- return /* @__PURE__ */ jsxs23("div", { className: "w-full max-w-full rounded-xl border border-warning/50 bg-warning/[0.06] text-sm shadow-sm ring-1 ring-warning/10", children: [
8024
- /* @__PURE__ */ jsxs23("div", { className: "flex items-start gap-2.5 px-4 pt-3.5", children: [
8025
- /* @__PURE__ */ jsx26("span", { className: "mt-0.5 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-warning/15 text-warning", children: /* @__PURE__ */ jsx26(ToolGlyph, { name: call.name, className: "h-3.5 w-3.5" }) }),
8026
- /* @__PURE__ */ jsxs23("div", { className: "min-w-0 flex-1", children: [
8027
- /* @__PURE__ */ jsx26("p", { className: "text-xs font-semibold uppercase tracking-[0.05em] text-warning-strong", children: approval ? "Needs your approval" : "Awaiting approval" }),
8028
- /* @__PURE__ */ jsx26("p", { className: "mt-0.5 text-[15px] font-semibold leading-snug text-foreground", children: friendlyToolTitle(call) }),
8029
- summary && /* @__PURE__ */ jsx26("p", { className: "mt-1 text-xs leading-relaxed text-muted-foreground", children: summary }),
8030
- typeSlug && /* @__PURE__ */ jsx26("p", { className: "mt-1 font-mono text-xs text-muted-foreground", children: typeSlug }),
8031
- meta.length > 0 && /* @__PURE__ */ jsx26("div", { className: "mt-1.5 flex flex-wrap items-center gap-1.5", children: meta.map((m, i) => /* @__PURE__ */ jsx26("span", { className: "rounded-full bg-secondary px-2 py-0.5 text-xs font-medium text-muted-foreground", children: m }, i)) })
8071
+ return /* @__PURE__ */ jsxs24("div", { className: "w-full max-w-full rounded-xl border border-warning/50 bg-warning/[0.06] text-sm shadow-sm ring-1 ring-warning/10", children: [
8072
+ /* @__PURE__ */ jsxs24("div", { className: "flex items-start gap-2.5 px-4 pt-3.5", children: [
8073
+ /* @__PURE__ */ jsx27("span", { className: "mt-0.5 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-warning/15 text-warning", children: /* @__PURE__ */ jsx27(ToolGlyph, { name: call.name, className: "h-3.5 w-3.5" }) }),
8074
+ /* @__PURE__ */ jsxs24("div", { className: "min-w-0 flex-1", children: [
8075
+ /* @__PURE__ */ jsx27("p", { className: "text-xs font-semibold uppercase tracking-[0.05em] text-warning-strong", children: approval ? "Needs your approval" : "Awaiting approval" }),
8076
+ /* @__PURE__ */ jsx27("p", { className: "mt-0.5 text-[15px] font-semibold leading-snug text-foreground", children: friendlyToolTitle(call) }),
8077
+ summary && /* @__PURE__ */ jsx27("p", { className: "mt-1 text-xs leading-relaxed text-muted-foreground", children: summary }),
8078
+ typeSlug && /* @__PURE__ */ jsx27("p", { className: "mt-1 font-mono text-xs text-muted-foreground", children: typeSlug }),
8079
+ meta.length > 0 && /* @__PURE__ */ jsx27("div", { className: "mt-1.5 flex flex-wrap items-center gap-1.5", children: meta.map((m, i) => /* @__PURE__ */ jsx27("span", { className: "rounded-full bg-secondary px-2 py-0.5 text-xs font-medium text-muted-foreground", children: m }, i)) })
8032
8080
  ] })
8033
8081
  ] }),
8034
- /* @__PURE__ */ jsxs23("div", { className: "flex flex-wrap items-center gap-2 px-4 pb-3.5 pt-3", children: [
8035
- approval && /* @__PURE__ */ jsxs23(Fragment10, { children: [
8036
- /* @__PURE__ */ jsx26(
8082
+ /* @__PURE__ */ jsxs24("div", { className: "flex flex-wrap items-center gap-2 px-4 pb-3.5 pt-3", children: [
8083
+ approval && /* @__PURE__ */ jsxs24(Fragment10, { children: [
8084
+ /* @__PURE__ */ jsx27(
8037
8085
  "button",
8038
8086
  {
8039
8087
  type: "button",
@@ -8043,7 +8091,7 @@ function ProposalCard({
8043
8091
  children: "Approve & run"
8044
8092
  }
8045
8093
  ),
8046
- /* @__PURE__ */ jsx26(
8094
+ /* @__PURE__ */ jsx27(
8047
8095
  "button",
8048
8096
  {
8049
8097
  type: "button",
@@ -8054,7 +8102,7 @@ function ProposalCard({
8054
8102
  }
8055
8103
  )
8056
8104
  ] }),
8057
- /* @__PURE__ */ jsxs23(
8105
+ /* @__PURE__ */ jsxs24(
8058
8106
  "button",
8059
8107
  {
8060
8108
  type: "button",
@@ -8063,12 +8111,12 @@ function ProposalCard({
8063
8111
  className: "ml-auto inline-flex items-center gap-1 rounded text-[12px] font-medium text-muted-foreground transition hover:text-foreground",
8064
8112
  children: [
8065
8113
  expanded ? "Hide details" : "View details",
8066
- /* @__PURE__ */ jsx26(ChevronDown, { className: `h-3 w-3 transition-transform ${expanded ? "rotate-180" : ""}` })
8114
+ /* @__PURE__ */ jsx27(ChevronDown, { className: `h-3 w-3 transition-transform ${expanded ? "rotate-180" : ""}` })
8067
8115
  ]
8068
8116
  }
8069
8117
  )
8070
8118
  ] }),
8071
- expanded && /* @__PURE__ */ jsx26("div", { className: "border-t border-warning/20 px-4 py-3 text-xs", children: custom ?? /* @__PURE__ */ jsx26(DefaultToolDetail, { call }) })
8119
+ expanded && /* @__PURE__ */ jsx27("div", { className: "border-t border-warning/20 px-4 py-3 text-xs", children: custom ?? /* @__PURE__ */ jsx27(DefaultToolDetail, { call }) })
8072
8120
  ] });
8073
8121
  }
8074
8122
  function formatFollowupWhen(when) {
@@ -8083,14 +8131,14 @@ function FollowupCard({ call }) {
8083
8131
  const when = typeof a.when === "string" ? a.when : typeof a.at === "string" ? a.at : typeof a.schedule === "string" ? a.schedule : null;
8084
8132
  const failed = toolCallFailed(call);
8085
8133
  const errorText = failed ? toolOutcomeOf(call)?.message ?? "Scheduling failed" : null;
8086
- return /* @__PURE__ */ jsx26("div", { className: "flex items-start gap-2", children: /* @__PURE__ */ jsxs23("div", { className: "min-w-0 flex-1 overflow-hidden rounded-[var(--radius-lg)] border border-[var(--border-subtle)] bg-[var(--md3-surface-container)]", children: [
8087
- /* @__PURE__ */ jsxs23("div", { className: "flex w-full items-center gap-2.5 px-3 py-2", children: [
8088
- /* @__PURE__ */ jsx26("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-[var(--radius-sm)] border border-border bg-muted text-muted-foreground", children: /* @__PURE__ */ jsx26(ToolGlyph, { name: call.name, className: "h-3.5 w-3.5" }) }),
8089
- /* @__PURE__ */ jsx26("span", { className: "shrink-0 whitespace-nowrap text-xs font-medium text-foreground", children: friendlyToolTitle(call) }),
8090
- when && /* @__PURE__ */ jsx26("span", { title: when, className: "hidden min-w-0 flex-1 truncate font-mono text-xs tabular-nums text-muted-foreground sm:inline", children: formatFollowupWhen(when) }),
8091
- /* @__PURE__ */ jsx26("span", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: call.status === "running" ? /* @__PURE__ */ jsx26("svg", { className: "h-3 w-3 shrink-0 animate-spin text-[var(--accent-text)]", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": true, children: /* @__PURE__ */ jsx26("path", { d: "M21 12a9 9 0 1 1-6.219-8.56", strokeLinecap: "round" }) }) : /* @__PURE__ */ jsx26("span", { className: `h-1.5 w-1.5 shrink-0 rounded-full ${failed ? "bg-[var(--surface-danger-text)]" : "bg-[var(--surface-success-text)]"}` }) })
8134
+ return /* @__PURE__ */ jsx27("div", { className: "flex items-start gap-2", children: /* @__PURE__ */ jsxs24("div", { className: "min-w-0 flex-1 overflow-hidden rounded-[var(--radius-lg)] border border-[var(--border-subtle)] bg-[var(--md3-surface-container)]", children: [
8135
+ /* @__PURE__ */ jsxs24("div", { className: "flex w-full items-center gap-2.5 px-3 py-2", children: [
8136
+ /* @__PURE__ */ jsx27("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-[var(--radius-sm)] border border-border bg-muted text-muted-foreground", children: /* @__PURE__ */ jsx27(ToolGlyph, { name: call.name, className: "h-3.5 w-3.5" }) }),
8137
+ /* @__PURE__ */ jsx27("span", { className: "shrink-0 whitespace-nowrap text-xs font-medium text-foreground", children: friendlyToolTitle(call) }),
8138
+ when && /* @__PURE__ */ jsx27("span", { title: when, className: "hidden min-w-0 flex-1 truncate font-mono text-xs tabular-nums text-muted-foreground sm:inline", children: formatFollowupWhen(when) }),
8139
+ /* @__PURE__ */ jsx27("span", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: call.status === "running" ? /* @__PURE__ */ jsx27("svg", { className: "h-3 w-3 shrink-0 animate-spin text-[var(--accent-text)]", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": true, children: /* @__PURE__ */ jsx27("path", { d: "M21 12a9 9 0 1 1-6.219-8.56", strokeLinecap: "round" }) }) : /* @__PURE__ */ jsx27("span", { className: `h-1.5 w-1.5 shrink-0 rounded-full ${failed ? "bg-[var(--surface-danger-text)]" : "bg-[var(--surface-success-text)]"}` }) })
8092
8140
  ] }),
8093
- errorText && /* @__PURE__ */ jsx26("div", { className: "border-t border-border px-3 py-2 text-xs text-[var(--surface-danger-text)]", children: errorText })
8141
+ errorText && /* @__PURE__ */ jsx27("div", { className: "border-t border-border px-3 py-2 text-xs text-[var(--surface-danger-text)]", children: errorText })
8094
8142
  ] }) });
8095
8143
  }
8096
8144
  function toolRowTitle(call) {
@@ -8113,10 +8161,10 @@ function ToolCallCard({
8113
8161
  const arrival = useArrivalStyle(staggerIndex ?? 0);
8114
8162
  const pending = call.status === "done" ? pendingApprovalOf(call) : null;
8115
8163
  const kind = blockKindOf(call);
8116
- const arrive = (row) => /* @__PURE__ */ jsx26("div", { className: "agent-arrive", style: arrival, children: row });
8164
+ const arrive = (row) => /* @__PURE__ */ jsx27("div", { className: "agent-arrive", style: arrival, children: row });
8117
8165
  if (pending) {
8118
8166
  return arrive(
8119
- /* @__PURE__ */ jsx26(
8167
+ /* @__PURE__ */ jsx27(
8120
8168
  ProposalCard,
8121
8169
  {
8122
8170
  call,
@@ -8129,18 +8177,18 @@ function ToolCallCard({
8129
8177
  );
8130
8178
  }
8131
8179
  if (kind === "followup") {
8132
- return arrive(/* @__PURE__ */ jsx26(FollowupCard, { call }));
8180
+ return arrive(/* @__PURE__ */ jsx27(FollowupCard, { call }));
8133
8181
  }
8134
8182
  const custom = renderers?.[call.name]?.(call, message);
8135
8183
  return arrive(
8136
- /* @__PURE__ */ jsx26(
8184
+ /* @__PURE__ */ jsx27(
8137
8185
  InlineToolItem,
8138
8186
  {
8139
8187
  part: chatToolCallPart(call),
8140
8188
  title: toolRowTitle(call),
8141
8189
  description: toolRowDescription(call),
8142
- renderToolDetail: () => custom ?? (call.name === "sandbox_run_command" ? /* @__PURE__ */ jsx26(ShellDetail, { call }) : /* @__PURE__ */ jsx26(DefaultToolDetail, { call })),
8143
- actions: onOpenRun && call.name.startsWith("sandbox_") ? /* @__PURE__ */ jsx26(
8190
+ renderToolDetail: () => custom ?? (call.name === "sandbox_run_command" ? /* @__PURE__ */ jsx27(ShellDetail, { call }) : /* @__PURE__ */ jsx27(DefaultToolDetail, { call })),
8191
+ actions: onOpenRun && call.name.startsWith("sandbox_") ? /* @__PURE__ */ jsx27(
8144
8192
  "button",
8145
8193
  {
8146
8194
  type: "button",
@@ -8148,9 +8196,9 @@ function ToolCallCard({
8148
8196
  "aria-label": "Open full transcript",
8149
8197
  title: "Open full transcript",
8150
8198
  className: "rounded-md p-1.5 text-muted-foreground transition hover:bg-accent hover:text-foreground",
8151
- children: /* @__PURE__ */ jsxs23("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
8152
- /* @__PURE__ */ jsx26("path", { d: "M7 17 17 7" }),
8153
- /* @__PURE__ */ jsx26("path", { d: "M7 7h10v10" })
8199
+ children: /* @__PURE__ */ jsxs24("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
8200
+ /* @__PURE__ */ jsx27("path", { d: "M7 17 17 7" }),
8201
+ /* @__PURE__ */ jsx27("path", { d: "M7 7h10v10" })
8154
8202
  ] })
8155
8203
  }
8156
8204
  ) : void 0
@@ -8159,7 +8207,7 @@ function ToolCallCard({
8159
8207
  );
8160
8208
  }
8161
8209
  function StreamingCaret() {
8162
- return /* @__PURE__ */ jsx26(
8210
+ return /* @__PURE__ */ jsx27(
8163
8211
  "span",
8164
8212
  {
8165
8213
  className: "ml-0.5 inline-block h-[1.1em] w-[3px] translate-y-[2px] animate-[agent-caret_1s_step-end_infinite] rounded-sm bg-foreground/70",
@@ -8184,9 +8232,9 @@ function SegmentText({
8184
8232
  // the container on top of that makes the paragraph shimmer while it types.
8185
8233
  // The distinction is what separates "the answer materialised" from "the
8186
8234
  // log was appended to".
8187
- /* @__PURE__ */ jsxs23("div", { className: `${messageClassName}${streaming ? "" : " agent-stream-in"}`, children: [
8235
+ /* @__PURE__ */ jsxs24("div", { className: `${messageClassName}${streaming ? "" : " agent-stream-in"}`, children: [
8188
8236
  body,
8189
- showCaret && /* @__PURE__ */ jsx26(StreamingCaret, {})
8237
+ showCaret && /* @__PURE__ */ jsx27(StreamingCaret, {})
8190
8238
  ] })
8191
8239
  );
8192
8240
  }
@@ -8211,7 +8259,7 @@ function SegmentedBody({
8211
8259
  const leftoverToolCalls = (msg.toolCalls ?? []).filter(
8212
8260
  (tc) => !segmentToolIds.has(tc.id)
8213
8261
  );
8214
- const renderToolCard = (call, index) => /* @__PURE__ */ jsx26(
8262
+ const renderToolCard = (call, index) => /* @__PURE__ */ jsx27(
8215
8263
  ToolCallCard,
8216
8264
  {
8217
8265
  call,
@@ -8240,12 +8288,12 @@ function SegmentedBody({
8240
8288
  const children = [];
8241
8289
  for (const g of groups) {
8242
8290
  if (g.kind === "notice") {
8243
- children.push(/* @__PURE__ */ jsx26(SegmentNotice, { tone: g.tone, content: g.content }, `notice-${g.index}`));
8291
+ children.push(/* @__PURE__ */ jsx27(SegmentNotice, { tone: g.tone, content: g.content }, `notice-${g.index}`));
8244
8292
  continue;
8245
8293
  }
8246
8294
  if (g.kind === "text") {
8247
8295
  children.push(
8248
- /* @__PURE__ */ jsx26(
8296
+ /* @__PURE__ */ jsx27(
8249
8297
  SegmentText,
8250
8298
  {
8251
8299
  content: g.content,
@@ -8261,13 +8309,13 @@ function SegmentedBody({
8261
8309
  }
8262
8310
  if (!streaming && g.calls.length >= COLLAPSE_TOOL_RUN_AT && !g.calls.some(isImportantTool)) {
8263
8311
  children.push(
8264
- /* @__PURE__ */ jsxs23("details", { children: [
8265
- /* @__PURE__ */ jsxs23("summary", { className: "cursor-pointer select-none rounded-md py-0.5 text-xs font-medium text-muted-foreground [transition:color_var(--motion-control)] hover:text-foreground", children: [
8312
+ /* @__PURE__ */ jsxs24("details", { children: [
8313
+ /* @__PURE__ */ jsxs24("summary", { className: "cursor-pointer select-none rounded-md py-0.5 text-xs font-medium text-muted-foreground [transition:color_var(--motion-control)] hover:text-foreground", children: [
8266
8314
  "Worked through ",
8267
8315
  g.calls.length,
8268
8316
  " steps"
8269
8317
  ] }),
8270
- /* @__PURE__ */ jsx26("div", { className: "mt-1.5 flex flex-col gap-1.5", children: g.calls.map(renderToolCard) })
8318
+ /* @__PURE__ */ jsx27("div", { className: "mt-1.5 flex flex-col gap-1.5", children: g.calls.map(renderToolCard) })
8271
8319
  ] }, `tools-fold-${g.index}`)
8272
8320
  );
8273
8321
  continue;
@@ -8276,9 +8324,9 @@ function SegmentedBody({
8276
8324
  }
8277
8325
  leftoverToolCalls.forEach((call, index) => children.push(renderToolCard(call, index)));
8278
8326
  if (streaming && segments[lastIndex]?.kind === "tool") {
8279
- children.push(/* @__PURE__ */ jsx26(StreamingCaret, {}, "streaming-caret"));
8327
+ children.push(/* @__PURE__ */ jsx27(StreamingCaret, {}, "streaming-caret"));
8280
8328
  }
8281
- return /* @__PURE__ */ jsx26("div", { className: "flex flex-col gap-2", children });
8329
+ return /* @__PURE__ */ jsx27("div", { className: "flex flex-col gap-2", children });
8282
8330
  }
8283
8331
  var QUIET_META_LANE_CLASS = "mt-1 flex h-[18px] items-center gap-2 text-xs tabular-nums text-muted-foreground opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none [@media(hover:none)]:opacity-100";
8284
8332
  function copyTextOf(msg) {
@@ -8287,7 +8335,7 @@ function copyTextOf(msg) {
8287
8335
  return msg.content;
8288
8336
  }
8289
8337
  function CopyMessageButton({ text }) {
8290
- const [copied, setCopied] = useState24(false);
8338
+ const [copied, setCopied] = useState25(false);
8291
8339
  const timerRef = useRef17(null);
8292
8340
  useEffect16(
8293
8341
  () => () => {
@@ -8308,7 +8356,7 @@ function CopyMessageButton({ text }) {
8308
8356
  }
8309
8357
  );
8310
8358
  };
8311
- return /* @__PURE__ */ jsx26(
8359
+ return /* @__PURE__ */ jsx27(
8312
8360
  "button",
8313
8361
  {
8314
8362
  type: "button",
@@ -8316,9 +8364,9 @@ function CopyMessageButton({ text }) {
8316
8364
  "aria-label": "Copy message",
8317
8365
  title: "Copy message",
8318
8366
  className: "rounded p-0.5 text-muted-foreground transition hover:bg-accent hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
8319
- children: copied ? /* @__PURE__ */ jsx26("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx26("polyline", { points: "20 6 9 17 4 12" }) }) : /* @__PURE__ */ jsxs23("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
8320
- /* @__PURE__ */ jsx26("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }),
8321
- /* @__PURE__ */ jsx26("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
8367
+ children: copied ? /* @__PURE__ */ jsx27("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx27("polyline", { points: "20 6 9 17 4 12" }) }) : /* @__PURE__ */ jsxs24("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
8368
+ /* @__PURE__ */ jsx27("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }),
8369
+ /* @__PURE__ */ jsx27("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
8322
8370
  ] })
8323
8371
  }
8324
8372
  );
@@ -8360,20 +8408,20 @@ function AssistantMessageImpl({
8360
8408
  const thinkingSeconds = useThinkingSeconds(
8361
8409
  streaming && !!reasoning && !hasAnswerText
8362
8410
  );
8363
- const [reasoningToggled, setReasoningToggled] = useState24(null);
8411
+ const [reasoningToggled, setReasoningToggled] = useState25(null);
8364
8412
  const reasoningOpen = reasoningToggled ?? !hasAnswerText;
8365
8413
  const quiet = chrome === "quiet";
8366
- return /* @__PURE__ */ jsxs23("div", { className: `mx-auto w-full max-w-3xl px-6 ${quiet ? "group pb-1 pt-3" : "py-3"}`, children: [
8367
- quiet && msg.author && /* @__PURE__ */ jsx26(MessageAuthor, { author: msg.author, className: "mb-1.5" }),
8368
- !quiet && /* @__PURE__ */ jsxs23(
8414
+ return /* @__PURE__ */ jsxs24("div", { className: `mx-auto w-full max-w-3xl px-6 ${quiet ? "group pb-1 pt-3" : "py-3"}`, children: [
8415
+ quiet && msg.author && /* @__PURE__ */ jsx27(MessageAuthor, { author: msg.author, className: "mb-1.5" }),
8416
+ !quiet && /* @__PURE__ */ jsxs24(
8369
8417
  "div",
8370
8418
  {
8371
8419
  className: `mb-1 flex ${msg.author ? "items-center" : "items-baseline"} gap-2 text-xs tabular-nums text-muted-foreground`,
8372
8420
  children: [
8373
- msg.author ? /* @__PURE__ */ jsx26(MessageAuthor, { author: msg.author }) : /* @__PURE__ */ jsx26("span", { className: "font-semibold uppercase tracking-[0.05em]", children: agentLabel }),
8374
- msg.modelUsed && /* @__PURE__ */ jsx26("span", { className: "font-mono normal-case", children: msg.modelUsed }),
8375
- formatTokensPerSecond(msg) && /* @__PURE__ */ jsx26("span", { children: formatTokensPerSecond(msg) }),
8376
- formatModelCost(msg, models) && /* @__PURE__ */ jsx26("span", { children: formatModelCost(msg, models) })
8421
+ msg.author ? /* @__PURE__ */ jsx27(MessageAuthor, { author: msg.author }) : /* @__PURE__ */ jsx27("span", { className: "font-semibold uppercase tracking-[0.05em]", children: agentLabel }),
8422
+ msg.modelUsed && /* @__PURE__ */ jsx27("span", { className: "font-mono normal-case", children: msg.modelUsed }),
8423
+ formatTokensPerSecond(msg) && /* @__PURE__ */ jsx27("span", { children: formatTokensPerSecond(msg) }),
8424
+ formatModelCost(msg, models) && /* @__PURE__ */ jsx27("span", { children: formatModelCost(msg, models) })
8377
8425
  ]
8378
8426
  }
8379
8427
  ),
@@ -8385,12 +8433,12 @@ function AssistantMessageImpl({
8385
8433
  // and a click outranks the default from then on — the contract the old
8386
8434
  // hand-rolled disclosure had, now enforced through the shell's
8387
8435
  // controlled `open`.
8388
- /* @__PURE__ */ jsx26(
8436
+ /* @__PURE__ */ jsx27(
8389
8437
  RunRowShell,
8390
8438
  {
8391
8439
  className: "mb-2",
8392
- icon: /* @__PURE__ */ jsx26(BrainGlyph, { className: "h-3.5 w-3.5" }),
8393
- title: !hasAnswerText ? /* @__PURE__ */ jsxs23("span", { className: "agent-shimmer", "data-motion": "essential", children: [
8440
+ icon: /* @__PURE__ */ jsx27(BrainGlyph, { className: "h-3.5 w-3.5" }),
8441
+ title: !hasAnswerText ? /* @__PURE__ */ jsxs24("span", { className: "agent-shimmer", "data-motion": "essential", children: [
8394
8442
  "Thinking",
8395
8443
  thinkingSeconds >= 1 ? ` \xB7 ${thinkingSeconds}s` : "\u2026"
8396
8444
  ] }) : thinkMsRef.current != null ? (
@@ -8405,7 +8453,7 @@ function AssistantMessageImpl({
8405
8453
  status: hasAnswerText ? "idle" : "running",
8406
8454
  open: reasoningOpen,
8407
8455
  onOpenChange: (next) => setReasoningToggled(next),
8408
- children: /* @__PURE__ */ jsx26(
8456
+ children: /* @__PURE__ */ jsx27(
8409
8457
  "div",
8410
8458
  {
8411
8459
  ref: reasoningScrollRef,
@@ -8415,7 +8463,7 @@ function AssistantMessageImpl({
8415
8463
  )
8416
8464
  }
8417
8465
  ),
8418
- segments && segments.length > 0 ? /* @__PURE__ */ jsx26(
8466
+ segments && segments.length > 0 ? /* @__PURE__ */ jsx27(
8419
8467
  SegmentedBody,
8420
8468
  {
8421
8469
  segments,
@@ -8427,12 +8475,12 @@ function AssistantMessageImpl({
8427
8475
  toolRenderers,
8428
8476
  messageClassName
8429
8477
  }
8430
- ) : /* @__PURE__ */ jsxs23(Fragment10, { children: [
8431
- /* @__PURE__ */ jsxs23("div", { className: messageClassName, children: [
8478
+ ) : /* @__PURE__ */ jsxs24(Fragment10, { children: [
8479
+ /* @__PURE__ */ jsxs24("div", { className: messageClassName, children: [
8432
8480
  body,
8433
- streaming && content && !msg.toolCalls?.length && /* @__PURE__ */ jsx26(StreamingCaret, {})
8481
+ streaming && content && !msg.toolCalls?.length && /* @__PURE__ */ jsx27(StreamingCaret, {})
8434
8482
  ] }),
8435
- msg.toolCalls && msg.toolCalls.length > 0 && /* @__PURE__ */ jsx26("div", { className: "mt-2 flex flex-col gap-1.5", children: msg.toolCalls.map((tc, index) => /* @__PURE__ */ jsx26(
8483
+ msg.toolCalls && msg.toolCalls.length > 0 && /* @__PURE__ */ jsx27("div", { className: "mt-2 flex flex-col gap-1.5", children: msg.toolCalls.map((tc, index) => /* @__PURE__ */ jsx27(
8436
8484
  ToolCallCard,
8437
8485
  {
8438
8486
  call: tc,
@@ -8445,7 +8493,7 @@ function AssistantMessageImpl({
8445
8493
  tc.id
8446
8494
  )) })
8447
8495
  ] }),
8448
- durableCards && msg.parts && /* @__PURE__ */ jsx26(
8496
+ durableCards && msg.parts && /* @__PURE__ */ jsx27(
8449
8497
  DurableChatCards,
8450
8498
  {
8451
8499
  ...durableCards,
@@ -8454,7 +8502,7 @@ function AssistantMessageImpl({
8454
8502
  className: "mt-3"
8455
8503
  }
8456
8504
  ),
8457
- workProductCards && workProductPartsFromMessageParts(msg.parts).map((part) => /* @__PURE__ */ jsx26(
8505
+ workProductCards && workProductPartsFromMessageParts(msg.parts).map((part) => /* @__PURE__ */ jsx27(
8458
8506
  WorkProductCard,
8459
8507
  {
8460
8508
  part,
@@ -8464,7 +8512,7 @@ function AssistantMessageImpl({
8464
8512
  `${part.ref.id}:${part.ref.version}`
8465
8513
  )),
8466
8514
  renderExtras?.(msg),
8467
- resolveAttachmentUrl && attachmentPartsFromMessageParts(msg.parts).length > 0 && /* @__PURE__ */ jsx26("div", { className: "mt-2", children: /* @__PURE__ */ jsx26(
8515
+ resolveAttachmentUrl && attachmentPartsFromMessageParts(msg.parts).length > 0 && /* @__PURE__ */ jsx27("div", { className: "mt-2", children: /* @__PURE__ */ jsx27(
8468
8516
  MessageAttachments,
8469
8517
  {
8470
8518
  parts: attachmentPartsFromMessageParts(msg.parts),
@@ -8472,17 +8520,17 @@ function AssistantMessageImpl({
8472
8520
  justify: "start"
8473
8521
  }
8474
8522
  ) }),
8475
- quiet && /* @__PURE__ */ jsxs23("div", { "data-testid": "message-meta-lane", className: QUIET_META_LANE_CLASS, children: [
8476
- /* @__PURE__ */ jsx26(CopyMessageButton, { text: copyTextOf(msg) }),
8477
- msg.modelUsed && /* @__PURE__ */ jsx26("span", { className: "font-mono", children: msg.modelUsed }),
8478
- formatTokensPerSecond(msg) && /* @__PURE__ */ jsx26("span", { children: formatTokensPerSecond(msg) }),
8479
- formatModelCost(msg, models) && /* @__PURE__ */ jsx26("span", { children: formatModelCost(msg, models) })
8523
+ quiet && /* @__PURE__ */ jsxs24("div", { "data-testid": "message-meta-lane", className: QUIET_META_LANE_CLASS, children: [
8524
+ /* @__PURE__ */ jsx27(CopyMessageButton, { text: copyTextOf(msg) }),
8525
+ msg.modelUsed && /* @__PURE__ */ jsx27("span", { className: "font-mono", children: msg.modelUsed }),
8526
+ formatTokensPerSecond(msg) && /* @__PURE__ */ jsx27("span", { children: formatTokensPerSecond(msg) }),
8527
+ formatModelCost(msg, models) && /* @__PURE__ */ jsx27("span", { children: formatModelCost(msg, models) })
8480
8528
  ] })
8481
8529
  ] });
8482
8530
  }
8483
8531
  var AssistantMessage = memo(AssistantMessageImpl);
8484
8532
  function useThinkingSeconds(active) {
8485
- const [seconds, setSeconds] = useState24(0);
8533
+ const [seconds, setSeconds] = useState25(0);
8486
8534
  useEffect16(() => {
8487
8535
  if (!active) return;
8488
8536
  setSeconds(0);
@@ -8493,10 +8541,10 @@ function useThinkingSeconds(active) {
8493
8541
  }
8494
8542
  function ThinkingRow({ agentLabel, chrome = "labeled" }) {
8495
8543
  const seconds = useThinkingSeconds(true);
8496
- return /* @__PURE__ */ jsxs23("div", { className: "mx-auto w-full max-w-3xl px-6 py-3", children: [
8497
- chrome !== "quiet" && /* @__PURE__ */ jsx26("p", { className: "mb-1 text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: agentLabel }),
8498
- /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2 text-[15px] text-muted-foreground", children: [
8499
- /* @__PURE__ */ jsx26("svg", { className: "h-4 w-4 animate-spin", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": true, children: /* @__PURE__ */ jsx26("path", { d: "M21 12a9 9 0 1 1-6.219-8.56", strokeLinecap: "round" }) }),
8544
+ return /* @__PURE__ */ jsxs24("div", { className: "mx-auto w-full max-w-3xl px-6 py-3", children: [
8545
+ chrome !== "quiet" && /* @__PURE__ */ jsx27("p", { className: "mb-1 text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: agentLabel }),
8546
+ /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2 text-[15px] text-muted-foreground", children: [
8547
+ /* @__PURE__ */ jsx27("svg", { className: "h-4 w-4 animate-spin", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": true, children: /* @__PURE__ */ jsx27("path", { d: "M21 12a9 9 0 1 1-6.219-8.56", strokeLinecap: "round" }) }),
8500
8548
  "Thinking",
8501
8549
  seconds >= 3 ? ` \xB7 ${seconds}s` : "..."
8502
8550
  ] })
@@ -8507,29 +8555,29 @@ var NOTICE_TONE_CLASS = {
8507
8555
  warning: "border-warning/40 bg-warning/10 text-warning-strong"
8508
8556
  };
8509
8557
  function SegmentNotice({ tone, content }) {
8510
- return /* @__PURE__ */ jsxs23(
8558
+ return /* @__PURE__ */ jsxs24(
8511
8559
  "div",
8512
8560
  {
8513
8561
  "data-notice-tone": tone,
8514
8562
  className: `flex items-start gap-2.5 rounded-lg border px-3 py-2.5 text-sm ${NOTICE_TONE_CLASS[tone]}`,
8515
8563
  children: [
8516
- /* @__PURE__ */ jsxs23("svg", { className: "mt-0.5 h-4 w-4 shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
8517
- /* @__PURE__ */ jsx26("circle", { cx: "12", cy: "12", r: "9" }),
8518
- /* @__PURE__ */ jsx26("path", { d: "M12 8v4m0 4h.01" })
8564
+ /* @__PURE__ */ jsxs24("svg", { className: "mt-0.5 h-4 w-4 shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
8565
+ /* @__PURE__ */ jsx27("circle", { cx: "12", cy: "12", r: "9" }),
8566
+ /* @__PURE__ */ jsx27("path", { d: "M12 8v4m0 4h.01" })
8519
8567
  ] }),
8520
- /* @__PURE__ */ jsx26("span", { className: "min-w-0 flex-1 whitespace-pre-wrap break-words", children: content })
8568
+ /* @__PURE__ */ jsx27("span", { className: "min-w-0 flex-1 whitespace-pre-wrap break-words", children: content })
8521
8569
  ]
8522
8570
  }
8523
8571
  );
8524
8572
  }
8525
8573
  function StreamErrorRow({ message, onRetry }) {
8526
- return /* @__PURE__ */ jsx26("div", { className: "mx-auto w-full max-w-3xl px-6 py-3", children: /* @__PURE__ */ jsxs23("div", { role: "alert", className: "flex items-start gap-2.5 rounded-lg border border-destructive/40 bg-destructive/5 px-3 py-2.5 text-sm text-destructive", children: [
8527
- /* @__PURE__ */ jsxs23("svg", { className: "mt-0.5 h-4 w-4 shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
8528
- /* @__PURE__ */ jsx26("circle", { cx: "12", cy: "12", r: "9" }),
8529
- /* @__PURE__ */ jsx26("path", { d: "M12 8v4m0 4h.01" })
8574
+ return /* @__PURE__ */ jsx27("div", { className: "mx-auto w-full max-w-3xl px-6 py-3", children: /* @__PURE__ */ jsxs24("div", { role: "alert", className: "flex items-start gap-2.5 rounded-lg border border-destructive/40 bg-destructive/5 px-3 py-2.5 text-sm text-destructive", children: [
8575
+ /* @__PURE__ */ jsxs24("svg", { className: "mt-0.5 h-4 w-4 shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
8576
+ /* @__PURE__ */ jsx27("circle", { cx: "12", cy: "12", r: "9" }),
8577
+ /* @__PURE__ */ jsx27("path", { d: "M12 8v4m0 4h.01" })
8530
8578
  ] }),
8531
- /* @__PURE__ */ jsx26("span", { className: "min-w-0 flex-1 break-words", children: message }),
8532
- onRetry && /* @__PURE__ */ jsx26(
8579
+ /* @__PURE__ */ jsx27("span", { className: "min-w-0 flex-1 break-words", children: message }),
8580
+ onRetry && /* @__PURE__ */ jsx27(
8533
8581
  "button",
8534
8582
  {
8535
8583
  type: "button",
@@ -8548,19 +8596,19 @@ function OtherPersonMessage({
8548
8596
  resolveAttachmentUrl
8549
8597
  }) {
8550
8598
  const attachments = resolveAttachmentUrl ? attachmentPartsFromMessageParts(msg.parts) : [];
8551
- return /* @__PURE__ */ jsxs23("div", { className: `mx-auto w-full max-w-3xl px-6 ${quiet ? "group pb-1 pt-3" : "py-3"}`, children: [
8552
- /* @__PURE__ */ jsxs23("div", { className: `w-fit ${quiet ? "max-w-[72%]" : "max-w-[85%]"}`, children: [
8553
- /* @__PURE__ */ jsx26(MessageAuthor, { author, className: "mb-1.5" }),
8554
- /* @__PURE__ */ jsx26(
8599
+ return /* @__PURE__ */ jsxs24("div", { className: `mx-auto w-full max-w-3xl px-6 ${quiet ? "group pb-1 pt-3" : "py-3"}`, children: [
8600
+ /* @__PURE__ */ jsxs24("div", { className: `w-fit ${quiet ? "max-w-[72%]" : "max-w-[85%]"}`, children: [
8601
+ /* @__PURE__ */ jsx27(MessageAuthor, { author, className: "mb-1.5" }),
8602
+ /* @__PURE__ */ jsx27(
8555
8603
  "div",
8556
8604
  {
8557
8605
  className: `w-fit max-w-full rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--card))] px-4 py-2.5 text-[hsl(var(--foreground))] ${quiet ? "" : "rounded-tl-md "}${messageClassName}`,
8558
- children: /* @__PURE__ */ jsx26("p", { className: "whitespace-pre-wrap", children: msg.content })
8606
+ children: /* @__PURE__ */ jsx27("p", { className: "whitespace-pre-wrap", children: msg.content })
8559
8607
  }
8560
8608
  ),
8561
- resolveAttachmentUrl && attachments.length > 0 && /* @__PURE__ */ jsx26("div", { className: "mt-1.5", children: /* @__PURE__ */ jsx26(MessageAttachments, { parts: attachments, resolveFileUrl: resolveAttachmentUrl, justify: "start" }) })
8609
+ resolveAttachmentUrl && attachments.length > 0 && /* @__PURE__ */ jsx27("div", { className: "mt-1.5", children: /* @__PURE__ */ jsx27(MessageAttachments, { parts: attachments, resolveFileUrl: resolveAttachmentUrl, justify: "start" }) })
8562
8610
  ] }),
8563
- quiet && /* @__PURE__ */ jsx26("div", { "data-testid": "message-meta-lane", className: `${QUIET_META_LANE_CLASS} justify-start`, children: /* @__PURE__ */ jsx26(CopyMessageButton, { text: msg.content }) })
8611
+ quiet && /* @__PURE__ */ jsx27("div", { "data-testid": "message-meta-lane", className: `${QUIET_META_LANE_CLASS} justify-start`, children: /* @__PURE__ */ jsx27(CopyMessageButton, { text: msg.content }) })
8564
8612
  ] });
8565
8613
  }
8566
8614
  function ChatMessages({
@@ -8589,22 +8637,22 @@ function ChatMessages({
8589
8637
  const messageClassName = messageSize === "large" ? "agent-app-message-copy text-[17px] leading-[1.6]" : "agent-app-message-copy text-base leading-[1.6]";
8590
8638
  const assistantMessageClassName = `${messageClassName} bg-transparent text-[hsl(var(--foreground))]`;
8591
8639
  const renderBody = useMemo10(
8592
- () => renderMarkdown ?? ((content) => /* @__PURE__ */ jsx26("p", { className: "whitespace-pre-wrap", children: content })),
8640
+ () => renderMarkdown ?? ((content) => /* @__PURE__ */ jsx27("p", { className: "whitespace-pre-wrap", children: content })),
8593
8641
  [renderMarkdown]
8594
8642
  );
8595
8643
  const lastIsUser = messages[messages.length - 1]?.role === "user";
8596
8644
  const quiet = chrome === "quiet";
8597
8645
  if (messages.length === 0 && !loading && !error) {
8598
- const empty = renderEmpty ? renderEmpty() : /* @__PURE__ */ jsx26(ChatEmptyState, { ...emptyState });
8599
- return /* @__PURE__ */ jsxs23(Fragment10, { children: [
8646
+ const empty = renderEmpty ? renderEmpty() : /* @__PURE__ */ jsx27(ChatEmptyState, { ...emptyState });
8647
+ return /* @__PURE__ */ jsxs24(Fragment10, { children: [
8600
8648
  header,
8601
8649
  empty
8602
8650
  ] });
8603
8651
  }
8604
- return /* @__PURE__ */ jsxs23(Fragment10, { children: [
8652
+ return /* @__PURE__ */ jsxs24(Fragment10, { children: [
8605
8653
  header,
8606
8654
  messages.map(
8607
- (msg) => msg.role === "user" && msg.author && !isViewerMessage(msg.author, viewerId) ? /* @__PURE__ */ jsx26(
8655
+ (msg) => msg.role === "user" && msg.author && !isViewerMessage(msg.author, viewerId) ? /* @__PURE__ */ jsx27(
8608
8656
  OtherPersonMessage,
8609
8657
  {
8610
8658
  msg,
@@ -8614,17 +8662,17 @@ function ChatMessages({
8614
8662
  resolveAttachmentUrl
8615
8663
  },
8616
8664
  msg.id
8617
- ) : msg.role === "user" ? /* @__PURE__ */ jsxs23("div", { className: `mx-auto w-full max-w-3xl px-6 ${quiet ? "group pb-1 pt-3" : "py-3"}`, children: [
8618
- /* @__PURE__ */ jsxs23("div", { className: `ml-auto w-fit ${quiet ? "max-w-[72%]" : "max-w-[85%]"}`, children: [
8619
- !quiet && /* @__PURE__ */ jsx26("p", { className: "mb-1 text-right text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: userLabel }),
8620
- /* @__PURE__ */ jsx26(
8665
+ ) : msg.role === "user" ? /* @__PURE__ */ jsxs24("div", { className: `mx-auto w-full max-w-3xl px-6 ${quiet ? "group pb-1 pt-3" : "py-3"}`, children: [
8666
+ /* @__PURE__ */ jsxs24("div", { className: `ml-auto w-fit ${quiet ? "max-w-[72%]" : "max-w-[85%]"}`, children: [
8667
+ !quiet && /* @__PURE__ */ jsx27("p", { className: "mb-1 text-right text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: userLabel }),
8668
+ /* @__PURE__ */ jsx27(
8621
8669
  "div",
8622
8670
  {
8623
8671
  className: `rounded-2xl bg-[hsl(var(--foreground))] px-4 py-2.5 text-[hsl(var(--background))] ${quiet ? "" : "rounded-tr-md "}${messageClassName}`,
8624
- children: /* @__PURE__ */ jsx26("p", { className: "whitespace-pre-wrap", children: msg.content })
8672
+ children: /* @__PURE__ */ jsx27("p", { className: "whitespace-pre-wrap", children: msg.content })
8625
8673
  }
8626
8674
  ),
8627
- resolveAttachmentUrl && attachmentPartsFromMessageParts(msg.parts).length > 0 && /* @__PURE__ */ jsx26("div", { className: "mt-1.5", children: /* @__PURE__ */ jsx26(
8675
+ resolveAttachmentUrl && attachmentPartsFromMessageParts(msg.parts).length > 0 && /* @__PURE__ */ jsx27("div", { className: "mt-1.5", children: /* @__PURE__ */ jsx27(
8628
8676
  MessageAttachments,
8629
8677
  {
8630
8678
  parts: attachmentPartsFromMessageParts(msg.parts),
@@ -8633,8 +8681,8 @@ function ChatMessages({
8633
8681
  }
8634
8682
  ) })
8635
8683
  ] }),
8636
- quiet && /* @__PURE__ */ jsx26("div", { "data-testid": "message-meta-lane", className: `${QUIET_META_LANE_CLASS} justify-end`, children: /* @__PURE__ */ jsx26(CopyMessageButton, { text: msg.content }) })
8637
- ] }, msg.id) : /* @__PURE__ */ jsx26(
8684
+ quiet && /* @__PURE__ */ jsx27("div", { "data-testid": "message-meta-lane", className: `${QUIET_META_LANE_CLASS} justify-end`, children: /* @__PURE__ */ jsx27(CopyMessageButton, { text: msg.content }) })
8685
+ ] }, msg.id) : /* @__PURE__ */ jsx27(
8638
8686
  AssistantMessage,
8639
8687
  {
8640
8688
  msg,
@@ -8655,8 +8703,8 @@ function ChatMessages({
8655
8703
  msg.id
8656
8704
  )
8657
8705
  ),
8658
- loading && lastIsUser && /* @__PURE__ */ jsx26(ThinkingRow, { agentLabel, chrome }),
8659
- error && !loading && /* @__PURE__ */ jsx26(StreamErrorRow, { message: error, onRetry })
8706
+ loading && lastIsUser && /* @__PURE__ */ jsx27(ThinkingRow, { agentLabel, chrome }),
8707
+ error && !loading && /* @__PURE__ */ jsx27(StreamErrorRow, { message: error, onRetry })
8660
8708
  ] });
8661
8709
  }
8662
8710
 
@@ -8787,6 +8835,7 @@ export {
8787
8835
  insightPageSlice,
8788
8836
  InsightDeck,
8789
8837
  ApiAccessPanel,
8838
+ AgentSetupBlock,
8790
8839
  AgentProfileChoices,
8791
8840
  ComposerProfilePill,
8792
8841
  formatModelCost,
@@ -8798,4 +8847,4 @@ export {
8798
8847
  useThinkingSeconds,
8799
8848
  ChatMessages
8800
8849
  };
8801
- //# sourceMappingURL=chunk-GJRGCVDV.js.map
8850
+ //# sourceMappingURL=chunk-MUZQUS6X.js.map