@tangle-network/sandbox-ui 0.5.2 → 0.6.1

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CodeBlock
3
- } from "./chunk-H5XYSFYE.js";
3
+ } from "./chunk-3HW53XTH.js";
4
4
  import {
5
5
  cn
6
6
  } from "./chunk-RQHJBTEU.js";
@@ -116,7 +116,7 @@ function ToolCallStep({
116
116
  onClick: () => hasExpandable && setExpanded(!expanded),
117
117
  disabled: !hasExpandable,
118
118
  className: cn(
119
- "flex w-full items-center gap-3 px-3 py-3 text-left text-sm",
119
+ "flex w-full items-center gap-2.5 px-3 py-2 text-left text-sm",
120
120
  hasExpandable && "cursor-pointer"
121
121
  ),
122
122
  children: [
@@ -124,12 +124,12 @@ function ToolCallStep({
124
124
  "div",
125
125
  {
126
126
  className: cn(
127
- "flex h-8 w-8 shrink-0 items-center justify-center rounded-[var(--radius-md)] border",
127
+ "flex h-6 w-6 shrink-0 items-center justify-center rounded-[var(--radius-sm)] border",
128
128
  status === "running" && "border-[var(--border-accent)] bg-[var(--accent-surface-soft)] text-[var(--brand-cool)]",
129
129
  status === "success" && "border-[var(--surface-success-border)] bg-[var(--surface-success-bg)] text-[var(--surface-success-text)]",
130
130
  status === "error" && "border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] text-[var(--surface-danger-text)]"
131
131
  ),
132
- children: status === "running" ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin shrink-0" }) : /* @__PURE__ */ jsx(Icon, { className: cn("h-4 w-4 shrink-0", STATUS_COLORS[status]) })
132
+ children: status === "running" ? /* @__PURE__ */ jsx(Loader2, { className: "h-3 w-3 animate-spin shrink-0" }) : /* @__PURE__ */ jsx(Icon, { className: cn("h-3 w-3 shrink-0", STATUS_COLORS[status]) })
133
133
  }
134
134
  ),
135
135
  /* @__PURE__ */ jsx("span", { className: "truncate flex-1 font-[var(--font-sans)] text-[var(--text-secondary)]", children: label }),
@@ -158,7 +158,7 @@ function ToolCallStep({
158
158
  ]
159
159
  }
160
160
  ),
161
- expanded && (detail || output) && /* @__PURE__ */ jsxs("div", { className: "space-y-2 border-t border-[var(--border-subtle)] bg-[var(--bg-section)] px-4 py-4", children: [
161
+ expanded && (detail || output) && /* @__PURE__ */ jsxs("div", { className: "space-y-2 border-t border-[var(--border-subtle)] bg-[var(--bg-section)] px-3 py-2.5", children: [
162
162
  detail && (isFilePath(detail) ? /* @__PURE__ */ jsx(FilePathChip, { path: detail }) : /* @__PURE__ */ jsx("div", { className: "text-xs font-[var(--font-mono)] text-[var(--text-muted)]", children: detail })),
163
163
  output && /* @__PURE__ */ jsx(
164
164
  CodeBlock,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseToolEvent
3
- } from "./chunk-XBR3IP7B.js";
3
+ } from "./chunk-33W2TLUL.js";
4
4
  import {
5
5
  bumpActiveSessionActivity,
6
6
  registerActiveSession,
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  CodeBlock,
11
11
  Markdown
12
- } from "./chunk-H5XYSFYE.js";
12
+ } from "./chunk-3HW53XTH.js";
13
13
  import {
14
14
  Badge,
15
15
  Card,
@@ -6,20 +6,20 @@ import {
6
6
  import {
7
7
  InlineThinkingItem,
8
8
  RunGroup
9
- } from "./chunk-WC7QTWPN.js";
9
+ } from "./chunk-ZMWWE5RF.js";
10
10
  import {
11
11
  ToolCallGroup,
12
12
  ToolCallStep
13
- } from "./chunk-NTSRY4GW.js";
13
+ } from "./chunk-MJUDMVRU.js";
14
14
  import {
15
15
  getToolDisplayMetadata
16
16
  } from "./chunk-BX6AQMUS.js";
17
17
  import {
18
18
  OpenUIArtifactRenderer
19
- } from "./chunk-VBWY44UU.js";
19
+ } from "./chunk-OVNLOE3Y.js";
20
20
  import {
21
21
  Markdown
22
- } from "./chunk-H5XYSFYE.js";
22
+ } from "./chunk-3HW53XTH.js";
23
23
  import {
24
24
  cn
25
25
  } from "./chunk-RQHJBTEU.js";
@@ -96,18 +96,15 @@ function ThinkingIndicator({ className }) {
96
96
  const interval = window.setInterval(() => setElapsed((current) => current + 1), 1e3);
97
97
  return () => window.clearInterval(interval);
98
98
  }, []);
99
- return /* @__PURE__ */ jsxs2("div", { className: cn("flex gap-3 px-4 py-3", className), children: [
100
- /* @__PURE__ */ jsx3("div", { className: "mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-[var(--brand-glow)]/15 text-[var(--brand-glow)]", children: /* @__PURE__ */ jsxs2("div", { className: "flex gap-0.5", children: [
101
- /* @__PURE__ */ jsx3("span", { className: "h-1.5 w-1.5 animate-bounce rounded-full bg-current", style: { animationDelay: "0ms" } }),
102
- /* @__PURE__ */ jsx3("span", { className: "h-1.5 w-1.5 animate-bounce rounded-full bg-current", style: { animationDelay: "150ms" } }),
103
- /* @__PURE__ */ jsx3("span", { className: "h-1.5 w-1.5 animate-bounce rounded-full bg-current", style: { animationDelay: "300ms" } })
104
- ] }) }),
105
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2", children: [
106
- /* @__PURE__ */ jsx3("span", { className: "text-sm text-[var(--text-muted)]", children: elapsed < 10 ? "Thinking..." : elapsed < 60 ? "Thinking deeply..." : "Still working..." }),
107
- elapsed > 5 && /* @__PURE__ */ jsxs2("span", { className: "text-xs tabular-nums text-[var(--text-muted)]", children: [
108
- elapsed,
109
- "s"
110
- ] })
99
+ return /* @__PURE__ */ jsxs2("div", { className: cn("flex items-center gap-2 px-3 py-1.5", className), children: [
100
+ /* @__PURE__ */ jsxs2("div", { className: "flex gap-[3px]", children: [
101
+ /* @__PURE__ */ jsx3("span", { className: "h-1 w-1 animate-bounce rounded-full bg-[var(--brand-glow)]", style: { animationDelay: "0ms" } }),
102
+ /* @__PURE__ */ jsx3("span", { className: "h-1 w-1 animate-bounce rounded-full bg-[var(--brand-glow)]", style: { animationDelay: "150ms" } }),
103
+ /* @__PURE__ */ jsx3("span", { className: "h-1 w-1 animate-bounce rounded-full bg-[var(--brand-glow)]", style: { animationDelay: "300ms" } })
104
+ ] }),
105
+ elapsed > 3 && /* @__PURE__ */ jsxs2("span", { className: "text-[11px] tabular-nums text-[var(--text-dim)]", children: [
106
+ elapsed,
107
+ "s"
111
108
  ] })
112
109
  ] });
113
110
  }
@@ -227,7 +224,7 @@ function AgentTimeline({
227
224
  className
228
225
  }) {
229
226
  if (items.length === 0 && !isThinking) {
230
- return emptyState ? /* @__PURE__ */ jsx4("div", { className: cn("flex h-full items-center justify-center p-8", className), children: emptyState }) : null;
227
+ return emptyState ? /* @__PURE__ */ jsx4("div", { className: cn("flex h-full items-center justify-center p-4", className), children: emptyState }) : null;
231
228
  }
232
229
  const renderedItems = isThinking ? [...items, { id: "__thinking__", kind: "custom", content: /* @__PURE__ */ jsx4(ThinkingIndicator, {}) }] : items;
233
230
  const timelineItems = renderedItems.filter((item) => !(item.kind === "message" && item.role === "user"));
@@ -467,8 +464,8 @@ function ChatInput({
467
464
  f.id
468
465
  ))
469
466
  ] }),
470
- /* @__PURE__ */ jsx5("div", { className: "rounded-[var(--radius-xl)] border border-[var(--border-default)] bg-[var(--depth-2)] shadow-[var(--shadow-card)]", children: /* @__PURE__ */ jsxs4("div", { className: "rounded-[var(--radius-xl)] px-3 py-3.5 transition-colors focus-within:border-[var(--border-accent)]", children: [
471
- /* @__PURE__ */ jsxs4("div", { className: "mb-2 flex items-center justify-between gap-3 px-1", children: [
467
+ /* @__PURE__ */ jsx5("div", { className: "rounded-[var(--radius-xl)] border border-[var(--border-default)] bg-[var(--depth-2)] shadow-[var(--shadow-card)]", children: /* @__PURE__ */ jsxs4("div", { className: "rounded-[var(--radius-xl)] px-3 py-[var(--chat-input-py)] transition-colors focus-within:border-[var(--border-accent)]", children: [
468
+ /* @__PURE__ */ jsxs4("div", { className: "mb-1.5 flex items-center justify-between gap-3 px-1", children: [
472
469
  /* @__PURE__ */ jsx5("div", { className: "text-[11px] font-semibold uppercase tracking-[0.16em] text-[var(--text-muted)]", children: "Agent Command Deck" }),
473
470
  /* @__PURE__ */ jsx5("div", { className: "text-[11px] text-[var(--text-muted)]", children: isStreaming ? "Streaming response" : "Ready for next instruction" })
474
471
  ] }),
@@ -534,7 +531,7 @@ function ChatInput({
534
531
  disabled: isStreaming || disabled,
535
532
  rows: 1,
536
533
  "aria-label": "Message input",
537
- className: "min-h-[36px] max-h-[160px] flex-1 resize-none bg-transparent text-[15px] leading-7 text-[var(--text-primary)] placeholder:text-[var(--text-muted)] disabled:opacity-50 focus-visible:outline-none"
534
+ className: "min-h-[32px] max-h-[120px] flex-1 resize-none bg-transparent text-[14px] leading-6 text-[var(--text-primary)] placeholder:text-[var(--text-muted)] disabled:opacity-50 focus-visible:outline-none"
538
535
  }
539
536
  ),
540
537
  isStreaming ? /* @__PURE__ */ jsx5(
@@ -865,8 +862,8 @@ var ChatContainer = memo3(
865
862
  "div",
866
863
  {
867
864
  ref: scrollRef,
868
- className: "flex-1 overflow-y-auto px-4 py-4 [scrollbar-gutter:stable]",
869
- children: messages.length === 0 ? /* @__PURE__ */ jsx6("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsxs5("div", { className: "max-w-md rounded-[var(--radius-xl)] border border-[var(--border-subtle)] bg-[linear-gradient(180deg,rgba(255,255,255,0.03),transparent)] px-6 py-8 text-center shadow-[var(--shadow-card)]", children: [
865
+ className: "flex-1 overflow-y-auto px-4 py-2 [scrollbar-gutter:stable]",
866
+ children: messages.length === 0 ? /* @__PURE__ */ jsx6("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsxs5("div", { className: "max-w-md rounded-[var(--radius-xl)] border border-[var(--border-subtle)] bg-[linear-gradient(180deg,rgba(255,255,255,0.03),transparent)] px-5 py-5 text-center shadow-[var(--shadow-card)]", children: [
870
867
  /* @__PURE__ */ jsx6("div", { className: "text-sm font-semibold text-[var(--text-primary)]", children: "Start the filing workflow" }),
871
868
  /* @__PURE__ */ jsx6("div", { className: "mt-2 text-sm leading-relaxed text-[var(--text-muted)]", children: "Ask the agent to analyze documents, generate forms, explain a calculation, or review the current filing package." })
872
869
  ] }) }) : presentation === "timeline" ? /* @__PURE__ */ jsx6(AgentTimeline, { items: timeline.items, isThinking: timeline.showThinking }) : /* @__PURE__ */ jsx6("div", { className: "mx-auto flex w-full max-w-5xl flex-col gap-3", children: /* @__PURE__ */ jsx6(
@@ -11,7 +11,7 @@ import {
11
11
  CodeBlock,
12
12
  CopyButton,
13
13
  Markdown
14
- } from "./chunk-H5XYSFYE.js";
14
+ } from "./chunk-3HW53XTH.js";
15
15
  import {
16
16
  cn
17
17
  } from "./chunk-RQHJBTEU.js";
@@ -43,15 +43,15 @@ function PreviewCard({
43
43
  className
44
44
  ),
45
45
  children: [
46
- /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 border-b border-[var(--border-subtle)] bg-[var(--depth-1)] px-4 py-3", children: [
47
- /* @__PURE__ */ jsx("div", { className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-[var(--radius-md)] border border-[var(--border-accent)] bg-[var(--bg-section)] text-[var(--brand-cool)]", children: icon }),
48
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
49
- /* @__PURE__ */ jsx("div", { className: "text-sm font-semibold text-[var(--text-primary)]", children: title }),
50
- description ? /* @__PURE__ */ jsx("div", { className: "mt-1 text-xs text-[var(--text-muted)]", children: description }) : null
51
- ] }),
46
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5 border-b border-[var(--border-subtle)] bg-[var(--depth-1)] px-[var(--tool-card-px)] py-[var(--tool-card-py)]", children: [
47
+ /* @__PURE__ */ jsx("div", { className: "flex h-[var(--tool-icon-size)] w-[var(--tool-icon-size)] shrink-0 items-center justify-center rounded-[var(--radius-sm)] border border-[var(--border-accent)] bg-[var(--bg-section)] text-[var(--brand-cool)]", children: icon }),
48
+ /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
49
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-semibold text-[var(--text-primary)]", children: title }),
50
+ description ? /* @__PURE__ */ jsx("span", { className: "truncate text-xs font-[var(--font-mono)] text-[var(--text-muted)]", children: description }) : null
51
+ ] }) }),
52
52
  meta ? /* @__PURE__ */ jsx("div", { className: "shrink-0 text-xs text-[var(--text-muted)]", children: meta }) : null
53
53
  ] }),
54
- children ? /* @__PURE__ */ jsx("div", { className: "space-y-3 px-4 py-4", children }) : null
54
+ children ? /* @__PURE__ */ jsx("div", { className: "space-y-2 px-[var(--tool-card-px)] py-[var(--tool-card-py)]", children }) : null
55
55
  ]
56
56
  }
57
57
  );
@@ -64,7 +64,7 @@ function PreviewEmpty({
64
64
  "div",
65
65
  {
66
66
  className: cn(
67
- "rounded-[var(--radius-md)] border border-dashed border-[var(--border-subtle)] bg-[var(--bg-section)] px-3 py-4 text-sm text-[var(--text-muted)]",
67
+ "rounded-[var(--radius-md)] border border-dashed border-[var(--border-subtle)] bg-[var(--bg-section)] px-3 py-2.5 text-xs text-[var(--text-muted)]",
68
68
  className
69
69
  ),
70
70
  children: label
@@ -75,7 +75,7 @@ function PreviewError({ error }) {
75
75
  return /* @__PURE__ */ jsx("div", { className: "rounded-[var(--radius-md)] border border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] px-3 py-3 text-sm text-[var(--surface-danger-text)]", children: error });
76
76
  }
77
77
  function PreviewLoading({ label = "Running\u2026" }) {
78
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-[var(--radius-md)] border border-[var(--border-subtle)] bg-[var(--bg-section)] px-3 py-3 text-sm text-[var(--text-muted)]", children: [
78
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-[var(--radius-md)] border border-[var(--border-subtle)] bg-[var(--bg-section)] px-3 py-2 text-xs text-[var(--text-muted)]", children: [
79
79
  /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin text-[var(--brand-cool)]" }),
80
80
  /* @__PURE__ */ jsx("span", { children: label })
81
81
  ] });
@@ -687,14 +687,14 @@ var ExpandedToolDetail = memo8(({ part }) => {
687
687
  }
688
688
  if (meta.displayVariant === "read-file") {
689
689
  return /* @__PURE__ */ jsxs9("div", { className: "overflow-hidden rounded-[var(--radius-lg)] border border-[var(--border-subtle)] bg-[var(--bg-card)] shadow-[var(--shadow-card)]", children: [
690
- /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-3 border-b border-[var(--border-subtle)] bg-[var(--depth-1)] px-4 py-3", children: [
691
- /* @__PURE__ */ jsx9("div", { className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-[var(--radius-md)] border border-[var(--border-accent)] bg-[var(--bg-section)] text-[var(--brand-cool)]", children: /* @__PURE__ */ jsx9(FileText2, { className: "h-4 w-4" }) }),
692
- /* @__PURE__ */ jsxs9("div", { className: "min-w-0", children: [
693
- /* @__PURE__ */ jsx9("div", { className: "text-sm font-semibold text-[var(--text-primary)]", children: "Read file" }),
694
- meta.targetPath ? /* @__PURE__ */ jsx9("div", { className: "mt-1 text-xs text-[var(--text-muted)]", children: meta.targetPath }) : null
690
+ /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2.5 border-b border-[var(--border-subtle)] bg-[var(--depth-1)] px-3 py-2", children: [
691
+ /* @__PURE__ */ jsx9("div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-[var(--radius-sm)] border border-[var(--border-accent)] bg-[var(--bg-section)] text-[var(--brand-cool)]", children: /* @__PURE__ */ jsx9(FileText2, { className: "h-3.5 w-3.5" }) }),
692
+ /* @__PURE__ */ jsxs9("div", { className: "min-w-0 flex items-center gap-2", children: [
693
+ /* @__PURE__ */ jsx9("span", { className: "text-xs font-semibold text-[var(--text-primary)]", children: "Read file" }),
694
+ meta.targetPath ? /* @__PURE__ */ jsx9("span", { className: "truncate text-xs font-[var(--font-mono)] text-[var(--text-muted)]", children: meta.targetPath }) : null
695
695
  ] })
696
696
  ] }),
697
- /* @__PURE__ */ jsxs9("div", { className: "space-y-3 px-4 py-4", children: [
697
+ /* @__PURE__ */ jsxs9("div", { className: "space-y-2 px-3 py-2.5", children: [
698
698
  typeof output === "string" ? /* @__PURE__ */ jsx9(CodeBlock, { code: output, language: langFromPath(meta.targetPath) ?? "text", className: "rounded-[var(--radius-md)]" }) : /* @__PURE__ */ jsx9("div", { className: "rounded-[var(--radius-md)] border border-dashed border-[var(--border-subtle)] bg-[var(--bg-section)] px-3 py-4 text-sm text-[var(--text-muted)]", children: "No readable file content was returned." }),
699
699
  error ? /* @__PURE__ */ jsx9("div", { className: "rounded-[var(--radius-md)] border border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] px-3 py-3 text-sm text-[var(--surface-danger-text)]", children: error }) : null
700
700
  ] })
@@ -822,7 +822,7 @@ var InlineToolItem = memo9(
822
822
  className
823
823
  ),
824
824
  children: [
825
- /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-2.5 px-3 py-2", children: [
825
+ /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-2 px-2.5 py-1.5", children: [
826
826
  /* @__PURE__ */ jsx11("div", { className: cn(
827
827
  "shrink-0",
828
828
  isRunning && "text-[var(--brand-cool)]",
@@ -830,18 +830,14 @@ var InlineToolItem = memo9(
830
830
  isError && "text-[var(--surface-danger-text)]",
831
831
  !isRunning && !isComplete && !isError && "text-[var(--text-muted)]"
832
832
  ), children: isRunning ? /* @__PURE__ */ jsx11(Loader24, { className: "h-3.5 w-3.5 animate-spin" }) : isComplete ? /* @__PURE__ */ jsx11(CheckCircle2, { className: "h-3.5 w-3.5" }) : isError ? /* @__PURE__ */ jsx11(AlertCircle2, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx11(DefaultIcon, { className: "h-3.5 w-3.5" }) }),
833
- /* @__PURE__ */ jsxs10("div", { className: "min-w-0 flex-1", children: [
834
- /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-2", children: [
835
- /* @__PURE__ */ jsx11("span", { className: "truncate text-sm font-medium text-[var(--text-primary)]", children: meta.title }),
836
- isError ? /* @__PURE__ */ jsx11("span", { className: "rounded-full border border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] px-2 py-0.5 text-[11px] font-semibold uppercase tracking-[0.06em] text-[var(--surface-danger-text)]", children: "Failed" }) : null,
837
- isRunning ? /* @__PURE__ */ jsx11("span", { className: "rounded-full border border-[var(--border-accent)] bg-[var(--brand-cool)]/10 px-2 py-0.5 text-[11px] font-semibold uppercase tracking-[0.06em] text-[var(--brand-cool)]", children: "Running" }) : null
838
- ] }),
839
- meta.description ? /* @__PURE__ */ jsx11("div", { className: "mt-1 truncate text-xs font-[var(--font-mono)] text-[var(--text-muted)]", children: meta.description }) : null
840
- ] }),
841
- /* @__PURE__ */ jsxs10("div", { className: "flex shrink-0 items-center gap-2", children: [
833
+ /* @__PURE__ */ jsx11("span", { className: "truncate text-xs font-medium text-[var(--text-primary)]", children: meta.title }),
834
+ meta.description ? /* @__PURE__ */ jsx11("span", { className: "hidden truncate text-xs font-[var(--font-mono)] text-[var(--text-muted)] sm:inline", children: meta.description }) : null,
835
+ /* @__PURE__ */ jsxs10("div", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: [
842
836
  isRunning && startTime ? /* @__PURE__ */ jsx11(LiveDuration, { startTime }) : null,
843
- !isRunning && durationMs != null ? /* @__PURE__ */ jsx11("span", { className: "rounded-full border border-[var(--border-subtle)] bg-[var(--bg-section)] px-2 py-0.5 text-[11px] font-[var(--font-mono)] text-[var(--text-muted)]", children: formatDuration(durationMs) }) : null,
844
- open ? /* @__PURE__ */ jsx11(ChevronDown2, { className: "h-3.5 w-3.5 text-[var(--text-muted)]" }) : /* @__PURE__ */ jsx11(ChevronRight2, { className: "h-3.5 w-3.5 text-[var(--text-muted)]" })
837
+ !isRunning && durationMs != null ? /* @__PURE__ */ jsx11("span", { className: "text-[10px] font-[var(--font-mono)] tabular-nums text-[var(--text-muted)]", children: formatDuration(durationMs) }) : null,
838
+ isError ? /* @__PURE__ */ jsx11("span", { className: "rounded-full border border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] px-1.5 py-px text-[10px] font-semibold uppercase text-[var(--surface-danger-text)]", children: "Failed" }) : null,
839
+ isRunning ? /* @__PURE__ */ jsx11("span", { className: "rounded-full border border-[var(--border-accent)] bg-[var(--brand-cool)]/10 px-1.5 py-px text-[10px] font-semibold uppercase text-[var(--brand-cool)]", children: "Running" }) : null,
840
+ open ? /* @__PURE__ */ jsx11(ChevronDown2, { className: "h-3 w-3 text-[var(--text-muted)]" }) : /* @__PURE__ */ jsx11(ChevronRight2, { className: "h-3 w-3 text-[var(--text-muted)]" })
845
841
  ] })
846
842
  ] }),
847
843
  errorText && !open ? /* @__PURE__ */ jsx11("div", { className: "border-t border-[var(--border-subtle)] px-3 py-2 text-xs text-red-200", children: errorText }) : null
@@ -902,44 +898,32 @@ var InlineThinkingItem = memo10(
902
898
  "button",
903
899
  {
904
900
  className: cn(
905
- "w-full rounded-[var(--radius-lg)] border border-[var(--border-subtle)] bg-[var(--bg-card)] text-left transition-colors",
906
- "hover:border-[var(--border-accent-hover)] hover:bg-[var(--bg-hover)]/35",
907
- open && "border-[var(--border-accent)] bg-[var(--bg-hover)]/30",
901
+ "w-full rounded-[var(--radius-lg)] border text-left transition-colors",
902
+ isActive ? "border-primary/30 bg-primary/10" : "border-border bg-muted hover:bg-accent",
903
+ open && !isActive && "bg-accent",
908
904
  className
909
905
  ),
910
- children: /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-3 px-3 py-3", children: [
911
- /* @__PURE__ */ jsx12(
912
- "div",
913
- {
914
- className: cn(
915
- "flex h-8 w-8 shrink-0 items-center justify-center rounded-[var(--radius-md)] border",
916
- isActive ? "border-[var(--border-accent)] bg-[var(--accent-surface-soft)] text-[var(--accent-text)] shadow-[var(--shadow-glow)]" : "border-[var(--border-subtle)] bg-[var(--bg-section)] text-[var(--text-muted)]"
917
- ),
918
- children: /* @__PURE__ */ jsx12(Brain, { className: cn("h-4 w-4", isActive && "animate-pulse") })
919
- }
920
- ),
921
- /* @__PURE__ */ jsxs11("div", { className: "min-w-0 flex-1", children: [
922
- /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2", children: [
923
- /* @__PURE__ */ jsx12("span", { className: "text-sm font-medium text-[var(--text-primary)]", children: isActive ? "Thinking\u2026" : "Reasoning" }),
924
- !isActive && durationMs != null ? /* @__PURE__ */ jsx12("span", { className: "rounded-full border border-[var(--border-subtle)] bg-[var(--bg-section)] px-2 py-0.5 text-[11px] font-[var(--font-mono)] text-[var(--text-muted)]", children: formatDuration(durationMs) }) : null,
925
- isActive && startTime ? /* @__PURE__ */ jsx12(LiveDuration, { startTime }) : null
926
- ] }),
927
- preview && !open ? /* @__PURE__ */ jsx12("div", { className: "mt-1 truncate text-xs text-[var(--text-muted)]", children: preview }) : null
928
- ] }),
929
- open ? /* @__PURE__ */ jsx12(ChevronDown3, { className: "h-3.5 w-3.5 shrink-0 text-[var(--text-muted)]" }) : /* @__PURE__ */ jsx12(ChevronRight3, { className: "h-3.5 w-3.5 shrink-0 text-[var(--text-muted)]" })
906
+ children: /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2.5 px-3 py-2", children: [
907
+ /* @__PURE__ */ jsx12(Brain, { className: cn("h-4 w-4 shrink-0", isActive ? "text-primary animate-pulse" : "text-muted-foreground") }),
908
+ /* @__PURE__ */ jsx12("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx12("span", { className: "truncate text-xs text-foreground", children: preview ?? (isActive ? "Thinking\u2026" : "Reasoning") }) }),
909
+ /* @__PURE__ */ jsxs11("div", { className: "flex shrink-0 items-center gap-2", children: [
910
+ isActive && startTime ? /* @__PURE__ */ jsx12(LiveDuration, { startTime }) : null,
911
+ !isActive && durationMs != null ? /* @__PURE__ */ jsx12("span", { className: "text-[10px] font-mono tabular-nums text-muted-foreground", children: formatDuration(durationMs) }) : null,
912
+ open ? /* @__PURE__ */ jsx12(ChevronDown3, { className: "h-3 w-3 text-muted-foreground" }) : /* @__PURE__ */ jsx12(ChevronRight3, { className: "h-3 w-3 text-muted-foreground" })
913
+ ] })
930
914
  ] })
931
915
  }
932
916
  ) }),
933
- /* @__PURE__ */ jsx12(Collapsible2.Content, { className: "overflow-hidden data-[state=open]:animate-slideDown data-[state=closed]:animate-slideUp", children: part.text ? /* @__PURE__ */ jsx12(
917
+ /* @__PURE__ */ jsx12(Collapsible2.Content, { className: "overflow-hidden rounded-b-[var(--radius-lg)] data-[state=open]:animate-slideDown data-[state=closed]:animate-slideUp", children: part.text ? /* @__PURE__ */ jsx12(
934
918
  "div",
935
919
  {
936
920
  className: cn(
937
- "border-t border-[var(--border-subtle)] px-4 py-4 text-sm text-[var(--text-secondary)]",
921
+ "max-h-60 overflow-y-auto border-t border-border bg-card px-3 py-3 text-sm leading-relaxed text-foreground",
938
922
  contentClassName
939
923
  ),
940
924
  children: /* @__PURE__ */ jsx12(Markdown, { children: part.text })
941
925
  }
942
- ) : /* @__PURE__ */ jsx12("div", { className: "border-t border-[var(--border-subtle)] px-4 py-3 text-sm text-[var(--text-muted)]", children: "No reasoning text was provided." }) })
926
+ ) : /* @__PURE__ */ jsx12("div", { className: "border-t border-border px-3 py-2.5 text-xs text-muted-foreground", children: "No reasoning text provided." }) })
943
927
  ] });
944
928
  }
945
929
  );
@@ -1001,17 +985,14 @@ function CategoryBadges({ categories }) {
1001
985
  [categories]
1002
986
  );
1003
987
  if (sorted.length === 0) return null;
1004
- return /* @__PURE__ */ jsx13("div", { className: "flex items-center gap-1.5", children: sorted.map((cat) => {
988
+ return /* @__PURE__ */ jsx13("div", { className: "flex items-center gap-1", children: sorted.map((cat) => {
1005
989
  const Icon = CATEGORY_ICON_MAP[cat] ?? Settings2;
1006
- return /* @__PURE__ */ jsxs12(
990
+ return /* @__PURE__ */ jsx13(
1007
991
  "span",
1008
992
  {
1009
993
  title: cat,
1010
- className: "flex h-7 items-center gap-1 rounded-full border border-[var(--border-subtle)] bg-[linear-gradient(180deg,rgba(255,255,255,0.04),transparent)] px-2 text-[11px] uppercase tracking-[0.12em] text-[var(--text-muted)]",
1011
- children: [
1012
- /* @__PURE__ */ jsx13(Icon, { className: "h-3.5 w-3.5" }),
1013
- /* @__PURE__ */ jsx13("span", { children: cat })
1014
- ]
994
+ className: "flex h-5 w-5 items-center justify-center rounded border border-[var(--border-subtle)] text-[var(--text-muted)]",
995
+ children: /* @__PURE__ */ jsx13(Icon, { className: "h-3 w-3" })
1015
996
  },
1016
997
  cat
1017
998
  );
@@ -1077,40 +1058,36 @@ var RunGroup = memo11(
1077
1058
  "button",
1078
1059
  {
1079
1060
  className: cn(
1080
- "w-full rounded-[var(--radius-xl)] border px-4 py-3.5 text-left transition-colors",
1061
+ "w-full rounded-[var(--radius-lg)] border px-3 py-2 text-left transition-colors",
1081
1062
  "bg-[var(--depth-2)] hover:bg-[var(--depth-3)]",
1082
1063
  collapsed ? branding.borderClass : "border-[var(--border-subtle)]",
1083
1064
  branding.bgClass
1084
1065
  ),
1085
- children: /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-3", children: [
1066
+ children: /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2.5", children: [
1086
1067
  /* @__PURE__ */ jsx13(
1087
1068
  "div",
1088
1069
  {
1089
1070
  className: cn(
1090
- "flex h-11 w-11 shrink-0 items-center justify-center rounded-[calc(var(--radius-lg)+2px)] border bg-[var(--accent-surface-soft)] shadow-[var(--shadow-accent)]",
1071
+ "flex h-7 w-7 shrink-0 items-center justify-center rounded-[var(--radius-md)] border bg-[var(--accent-surface-soft)]",
1091
1072
  branding.borderClass
1092
1073
  ),
1093
- children: /* @__PURE__ */ jsx13(Bot2, { className: cn("h-4 w-4", branding.accentClass) })
1074
+ children: /* @__PURE__ */ jsx13(Bot2, { className: cn("h-3.5 w-3.5", branding.accentClass) })
1094
1075
  }
1095
1076
  ),
1096
- /* @__PURE__ */ jsxs12("div", { className: "min-w-0 flex-1", children: [
1097
- /* @__PURE__ */ jsxs12("div", { className: "flex flex-wrap items-center gap-2", children: [
1098
- /* @__PURE__ */ jsx13("span", { className: cn("text-sm font-semibold tracking-[0.01em]", branding.textClass), children: branding.label }),
1099
- isStreaming ? /* @__PURE__ */ jsxs12("span", { className: "inline-flex items-center gap-1 rounded-full border border-[var(--border-accent)] bg-[var(--accent-surface-soft)] px-2.5 py-0.5 text-[11px] font-semibold uppercase tracking-[0.08em] text-[var(--accent-text)]", children: [
1100
- /* @__PURE__ */ jsx13(Loader25, { className: "h-3 w-3 animate-spin" }),
1101
- "Running"
1102
- ] }) : /* @__PURE__ */ jsxs12("span", { className: "inline-flex items-center gap-1 rounded-full border border-[var(--border-subtle)] bg-[linear-gradient(180deg,rgba(255,255,255,0.04),transparent)] px-2.5 py-0.5 text-[11px] font-semibold uppercase tracking-[0.08em] text-[var(--text-muted)]", children: [
1103
- /* @__PURE__ */ jsx13(Sparkles, { className: "h-3 w-3" }),
1104
- "Complete"
1105
- ] })
1077
+ /* @__PURE__ */ jsx13("span", { className: cn("text-xs font-semibold", branding.textClass), children: branding.label }),
1078
+ renderSummary(run) ? /* @__PURE__ */ jsx13("span", { className: "text-[11px] text-[var(--text-muted)]", children: renderSummary(run) }) : null,
1079
+ collapsed && run.summaryText ? /* @__PURE__ */ jsx13("span", { className: "min-w-0 truncate text-[11px] text-[var(--text-secondary)]", children: run.summaryText }) : null,
1080
+ /* @__PURE__ */ jsxs12("div", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: [
1081
+ /* @__PURE__ */ jsx13(CategoryBadges, { categories: stats.toolCategories }),
1082
+ isStreaming ? /* @__PURE__ */ jsxs12("span", { className: "inline-flex items-center gap-1 rounded-full border border-[var(--border-accent)] bg-[var(--accent-surface-soft)] px-2 py-px text-[10px] font-semibold uppercase text-[var(--accent-text)]", children: [
1083
+ /* @__PURE__ */ jsx13(Loader25, { className: "h-2.5 w-2.5 animate-spin" }),
1084
+ "Running"
1085
+ ] }) : /* @__PURE__ */ jsxs12("span", { className: "inline-flex items-center gap-1 rounded-full border border-[var(--border-subtle)] px-2 py-px text-[10px] font-semibold uppercase text-[var(--text-muted)]", children: [
1086
+ /* @__PURE__ */ jsx13(Sparkles, { className: "h-2.5 w-2.5" }),
1087
+ "Done"
1106
1088
  ] }),
1107
- /* @__PURE__ */ jsxs12("div", { className: "mt-1 flex flex-wrap items-center gap-2 text-xs text-[var(--text-muted)]", children: [
1108
- renderSummary(run) ? /* @__PURE__ */ jsx13("span", { children: renderSummary(run) }) : null,
1109
- collapsed && run.summaryText ? /* @__PURE__ */ jsx13("span", { className: "min-w-0 truncate text-[var(--text-secondary)]", children: run.summaryText }) : null
1110
- ] })
1111
- ] }),
1112
- /* @__PURE__ */ jsx13(CategoryBadges, { categories: stats.toolCategories }),
1113
- !collapsed ? /* @__PURE__ */ jsx13(ChevronDown4, { className: "h-4 w-4 shrink-0 text-[var(--text-muted)]" }) : /* @__PURE__ */ jsx13(ChevronRight4, { className: "h-4 w-4 shrink-0 text-[var(--text-muted)]" })
1089
+ !collapsed ? /* @__PURE__ */ jsx13(ChevronDown4, { className: "h-3.5 w-3.5 text-[var(--text-muted)]" }) : /* @__PURE__ */ jsx13(ChevronRight4, { className: "h-3.5 w-3.5 text-[var(--text-muted)]" })
1090
+ ] })
1114
1091
  ] })
1115
1092
  }
1116
1093
  ) }),
@@ -1121,7 +1098,7 @@ var RunGroup = memo11(
1121
1098
  "div",
1122
1099
  {
1123
1100
  className: cn(
1124
- "mt-2 space-y-3 rounded-[calc(var(--radius-xl)+2px)] border border-[var(--border-subtle)] p-3.5 shadow-[var(--shadow-card)]",
1101
+ "mt-1.5 space-y-1.5 rounded-[var(--radius-lg)] border border-[var(--border-subtle)] p-2 shadow-[var(--shadow-card)]",
1125
1102
  branding.containerBgClass
1126
1103
  ),
1127
1104
  children: allParts.map(({ part, msgId, index }, partIndex) => {
@@ -1156,7 +1133,7 @@ var RunGroup = memo11(
1156
1133
  return /* @__PURE__ */ jsx13(
1157
1134
  "div",
1158
1135
  {
1159
- className: "rounded-[calc(var(--radius-lg)+2px)] border border-[var(--border-subtle)] bg-[var(--bg-card)] px-4 py-4",
1136
+ className: "rounded-[var(--radius-lg)] border border-[var(--border-subtle)] bg-[var(--bg-card)] px-3 py-2.5",
1160
1137
  children: /* @__PURE__ */ jsx13(Markdown, { children: part.text })
1161
1138
  },
1162
1139
  key
package/dist/dashboard.js CHANGED
@@ -30,7 +30,7 @@ import {
30
30
  SidebarRailNav,
31
31
  VariantList,
32
32
  useSidebar
33
- } from "./chunk-STHB4N22.js";
33
+ } from "./chunk-6V4XVKFY.js";
34
34
  import {
35
35
  BillingDashboard,
36
36
  PricingPage,
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  DocumentEditorPane
4
- } from "./chunk-FFOXUHOF.js";
4
+ } from "./chunk-FNYJFCGU.js";
5
5
  import "./chunk-Q56BYXQF.js";
6
6
  import "./chunk-W4LM3QYZ.js";
7
- import "./chunk-H5XYSFYE.js";
7
+ import "./chunk-3HW53XTH.js";
8
8
  import "./chunk-RQHJBTEU.js";
9
9
  export {
10
10
  DocumentEditorPane
package/dist/editor.js CHANGED
@@ -11,10 +11,10 @@ import {
11
11
  useEditorConnection,
12
12
  useEditorContext,
13
13
  useYjsState
14
- } from "./chunk-FFOXUHOF.js";
14
+ } from "./chunk-FNYJFCGU.js";
15
15
  import "./chunk-Q56BYXQF.js";
16
16
  import "./chunk-W4LM3QYZ.js";
17
- import "./chunk-H5XYSFYE.js";
17
+ import "./chunk-3HW53XTH.js";
18
18
  import "./chunk-RQHJBTEU.js";
19
19
  export {
20
20
  CollaboratorsList,
@@ -48,10 +48,6 @@ interface InlineThinkingItemProps {
48
48
  className?: string;
49
49
  contentClassName?: string;
50
50
  }
51
- /**
52
- * Minimal collapsible display for thinking/reasoning parts.
53
- * Shows "Thinking..." with optional preview text and duration.
54
- */
55
51
  declare const InlineThinkingItem: React.MemoExoticComponent<({ part, defaultOpen, autoCollapse, className, contentClassName, }: InlineThinkingItemProps) => react_jsx_runtime.JSX.Element>;
56
52
 
57
53
  interface ExpandedToolDetailProps {
package/dist/files.js CHANGED
@@ -4,9 +4,9 @@ import {
4
4
  FileTabs,
5
5
  FileTree,
6
6
  filterFileTree
7
- } from "./chunk-WQH233GF.js";
7
+ } from "./chunk-KH5UDAJ2.js";
8
8
  import "./chunk-W4LM3QYZ.js";
9
- import "./chunk-H5XYSFYE.js";
9
+ import "./chunk-3HW53XTH.js";
10
10
  import "./chunk-RQHJBTEU.js";
11
11
  export {
12
12
  FileArtifactPane,
package/dist/hooks.js CHANGED
@@ -15,17 +15,17 @@ import {
15
15
  useSessionStream,
16
16
  useSidecarAuth,
17
17
  useToolCallStream
18
- } from "./chunk-5F4NX5R2.js";
19
- import "./chunk-XBR3IP7B.js";
18
+ } from "./chunk-MXRQ4MJE.js";
19
+ import "./chunk-33W2TLUL.js";
20
20
  import "./chunk-OEX7NZE3.js";
21
21
  import {
22
22
  useAutoScroll,
23
23
  useRunCollapseState,
24
24
  useRunGroups
25
25
  } from "./chunk-CNWVHQFY.js";
26
- import "./chunk-NTSRY4GW.js";
26
+ import "./chunk-MJUDMVRU.js";
27
27
  import "./chunk-BX6AQMUS.js";
28
- import "./chunk-H5XYSFYE.js";
28
+ import "./chunk-3HW53XTH.js";
29
29
  import "./chunk-RQHJBTEU.js";
30
30
 
31
31
  // src/hooks/use-session-crud.ts
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ export { C as ChatContainer, a as ChatContainerProps, b as ChatInput, c as ChatI
9
9
  export { C as Collaborator, a as ConnectionState, D as DocumentEditorBackend, b as DocumentEditorMode, c as DocumentEditorPane, d as DocumentEditorPaneCollaborationConfig, e as DocumentEditorPaneProps, E as EditorContextValue, f as EditorProvider, g as EditorProviderProps, h as EditorUser, u as useEditorContext } from './document-editor-pane-A70-EhdQ.js';
10
10
  export { CollaboratorsList, EditorToolbar, TiptapEditor, TiptapEditorProps, useAwareness, useCollaboratorPresence, useCollaborators, useDocumentChanges, useEditorConnection, useYjsState } from './editor.js';
11
11
  export { F as FeedSegment, T as ToolCallData, a as ToolCallFeed, b as ToolCallFeedProps, c as ToolCallGroup, d as ToolCallGroupProps, e as ToolCallStatus, f as ToolCallStep, g as ToolCallStepProps, h as ToolCallType, p as parseToolEvent } from './tool-call-feed-Bs3MyQMT.js';
12
- export { E as ExpandedToolDetail, I as InlineThinkingItem, c as InlineToolItem, R as RunGroup, e as RunGroupProps } from './expanded-tool-detail-DM5M_T9h.js';
12
+ export { E as ExpandedToolDetail, I as InlineThinkingItem, c as InlineToolItem, R as RunGroup, e as RunGroupProps } from './expanded-tool-detail-Dh99mcbY.js';
13
13
  import * as React$1 from 'react';
14
14
  import { b as ToolPart } from './parts-CyGkM6Fp.js';
15
15
  export { R as ReasoningPart, S as SessionMessage, a as SessionPart, T as TextPart, c as ToolState, d as ToolStatus, e as ToolTime } from './parts-CyGkM6Fp.js';