@pstdio/ui 0.23.0 → 0.24.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.
Files changed (46) hide show
  1. package/dist/chat-ui.js +840 -834
  2. package/dist/chat-ui.js.map +1 -1
  3. package/dist/components/chat-ui/components/chat-input-actions.d.ts +2 -0
  4. package/dist/components/chat-ui/components/chat-input-question-prompt.d.ts +3 -0
  5. package/dist/components/chat-ui/components/chat-input.d.ts +2 -0
  6. package/dist/components/chat-ui/components/chat-panel.d.ts +2 -0
  7. package/dist/components/chat-ui/components/timeline-title.d.ts +6 -0
  8. package/dist/components/layout/index.d.ts +1 -0
  9. package/dist/components/layout/resizable-split-layout.d.ts +4 -3
  10. package/dist/components/layout/resizable-split-layout.handle.d.ts +6 -2
  11. package/dist/components/layout/resizable-split-layout.panels.d.ts +6 -2
  12. package/dist/components/layout/resizable-split-layout.root-size.d.ts +3 -0
  13. package/dist/components/primitives/index.d.ts +2 -0
  14. package/dist/data-table.js +1 -1
  15. package/dist/{diff-editor-BnfV8cYB.js → diff-bubble-DvUPRnfB.js} +49 -48
  16. package/dist/diff-bubble-DvUPRnfB.js.map +1 -0
  17. package/dist/diff.js +111 -111
  18. package/dist/diff.js.map +1 -1
  19. package/dist/index.js +44 -43
  20. package/dist/index.js.map +1 -1
  21. package/dist/kanban-renderer.js +4 -4
  22. package/dist/kanban-renderer.js.map +1 -1
  23. package/dist/{param-editor-DgzVeyJ0.js → param-editor-DhoxgwGd.js} +2 -2
  24. package/dist/{param-editor-DgzVeyJ0.js.map → param-editor-DhoxgwGd.js.map} +1 -1
  25. package/dist/{param-editor-field-BMvuSAP5.js → param-editor-field-DurcyLuw.js} +43 -42
  26. package/dist/param-editor-field-DurcyLuw.js.map +1 -0
  27. package/dist/theme/primitives/colors.d.ts +34 -0
  28. package/dist/theme/primitives/sizes.d.ts +9 -0
  29. package/dist/theme/recipes/landing-story.d.ts +10 -0
  30. package/dist/theme/recipes/landing-tool-demo.d.ts +1 -0
  31. package/dist/theme/recipes/landing.d.ts +23 -0
  32. package/dist/theme/recipes/resizable-split-layout.d.ts +106 -0
  33. package/dist/theme/tokens/colors-background.d.ts +260 -0
  34. package/dist/theme/tokens/colors-visualization.d.ts +162 -0
  35. package/dist/theme/tokens/colors.d.ts +2 -422
  36. package/dist/{theme-C0empEin.js → theme-Ca-KyNoi.js} +1409 -568
  37. package/dist/theme-Ca-KyNoi.js.map +1 -0
  38. package/dist/theme.js +1 -1
  39. package/dist/tree-list-DXwHWodb.js +1348 -0
  40. package/dist/tree-list-DXwHWodb.js.map +1 -0
  41. package/package.json +2 -2
  42. package/dist/diff-editor-BnfV8cYB.js.map +0 -1
  43. package/dist/param-editor-field-BMvuSAP5.js.map +0 -1
  44. package/dist/theme-C0empEin.js.map +0 -1
  45. package/dist/tree-list-BHFSyvIZ.js +0 -1262
  46. package/dist/tree-list-BHFSyvIZ.js.map +0 -1
package/dist/chat-ui.js CHANGED
@@ -1,22 +1,22 @@
1
- import { jsx as c, jsxs as k, Fragment as tn } from "react/jsx-runtime";
2
- import { c as C } from "react/compiler-runtime";
3
- import { AbsoluteCenter as ys, IconButton as nt, chakra as Rn, createSlotRecipeContext as xs, defineSlotRecipe as Ss, Text as U, Code as pn, Button as ft, HStack as ae, Box as B, Flex as Qe, Stack as G, Textarea as ws, Tooltip as Ct, Portal as Mn, Kbd as Ts, Spacer as As, Timeline as Cs, Span as dt, Avatar as st, Image as Pn, Card as ie, Link as En, Spinner as nn, Badge as ks, Icon as Ht, Skeleton as Is } from "@chakra-ui/react";
4
- import { ArrowDownIcon as _s, ShieldX as vs, ShieldCheck as Rs, Check as Dn, Pause as Ms, ArrowUp as Ps, Copy as Es, Move as Ds, FileDown as Bs, FileUp as Fs, FileDiff as Ls, Trash2 as Bn, FilePen as $s, FileText as Os, ListTree as zs, Terminal as Fn, ListTodo as Qs, CircleQuestionMark as qs, File as Ws, Globe as Hs, Search as Vs, AlertTriangle as Ln, DotIcon as Ns, ChevronUpIcon as Us, GripVertical as js, Pencil as Ks, MessageCircleIcon as Xs } from "lucide-react";
5
- import { useStickToBottomContext as It, StickToBottom as Gs } from "use-stick-to-bottom";
1
+ import { jsx as c, jsxs as C, Fragment as tn } from "react/jsx-runtime";
2
+ import { c as A } from "react/compiler-runtime";
3
+ import { AbsoluteCenter as bs, IconButton as ot, chakra as vn, createSlotRecipeContext as ys, defineSlotRecipe as xs, Text as j, Code as fn, Button as ft, HStack as ce, Box as B, Flex as Qe, Stack as G, Textarea as Ss, Tooltip as Ct, Portal as Rn, Kbd as ws, Spacer as Ts, Link as Mn, Span as dt, Avatar as rt, Timeline as As, Image as Pn, Card as le, Spinner as nn, Badge as Cs, Icon as Ht, Skeleton as ks } from "@chakra-ui/react";
4
+ import { ArrowDownIcon as Is, ShieldX as _s, ShieldCheck as vs, Check as Dn, Pause as Rs, ArrowUp as Ms, Copy as Ps, Move as Ds, FileDown as Es, FileUp as Bs, FileDiff as Fs, Trash2 as En, FilePen as Ls, FileText as $s, ListTree as Os, Terminal as Bn, ListTodo as zs, CircleQuestionMark as Qs, File as qs, Globe as Ws, Search as Hs, AlertTriangle as Fn, DotIcon as Vs, ChevronUpIcon as Ns, GripVertical as Us, Pencil as js, MessageCircleIcon as Ks } from "lucide-react";
5
+ import { useStickToBottomContext as It, StickToBottom as Xs } from "use-stick-to-bottom";
6
6
  import { S as _t, T as sn } from "./browser-storage-DPtOQJx0.js";
7
- import { Fragment as Ys, useRef as Te, useEffect as le, useState as H } from "react";
8
- import { R as on, C as $n } from "./lazy-markdown-editor-Obb0M8xc.js";
9
- import { a as Vt, P as Js, g as Zs, R as On } from "./rich-message-dNYvLDd4.js";
10
- import { R as eo, a as to, A as mn } from "./radio-cLMEBBZk.js";
11
- import { E as no } from "./empty-state-Bo4HVrgr.js";
12
- import { useVirtualizer as so } from "@tanstack/react-virtual";
13
- import { D as oo, a as ro } from "./diff-editor-BnfV8cYB.js";
14
- const io = {
7
+ import { Fragment as Gs, useRef as Te, useEffect as ae, useState as V } from "react";
8
+ import { R as on, C as Ln } from "./lazy-markdown-editor-Obb0M8xc.js";
9
+ import { a as Vt, P as Ys, g as Js, R as $n } from "./rich-message-dNYvLDd4.js";
10
+ import { R as Zs, a as eo, A as pn } from "./radio-cLMEBBZk.js";
11
+ import { E as to } from "./empty-state-Bo4HVrgr.js";
12
+ import { useVirtualizer as no } from "@tanstack/react-virtual";
13
+ import { a as so, D as oo } from "./diff-bubble-DvUPRnfB.js";
14
+ const ro = {
15
15
  "aria-roledescription": "conversation",
16
16
  initial: "instant",
17
17
  resize: "instant",
18
18
  role: "log"
19
- }, lo = Rn(Gs, {
19
+ }, io = vn(Xs, {
20
20
  base: {
21
21
  position: "relative",
22
22
  flex: 1,
@@ -25,9 +25,9 @@ const io = {
25
25
  }
26
26
  }, {
27
27
  forwardProps: ["initial", "resize"],
28
- defaultProps: io
29
- }), ao = (t) => {
30
- const e = C(10);
28
+ defaultProps: ro
29
+ }), lo = (t) => {
30
+ const e = A(10);
31
31
  let n, o;
32
32
  e[0] !== t ? ({
33
33
  children: n,
@@ -47,22 +47,22 @@ const io = {
47
47
  }, e[3] = a, e[4] = u) : (a = e[3], u = e[4]);
48
48
  let d;
49
49
  return e[5] !== n || e[6] !== o || e[7] !== i || e[8] !== l ? (d = /* @__PURE__ */ c(_t, { ...o, height: "full", width: "full", showHorizontalScrollbar: !1, viewportRef: i, contentRef: l, verticalScrollbarProps: a, contentProps: u, children: n }), e[5] = n, e[6] = o, e[7] = i, e[8] = l, e[9] = d) : d = e[9], d;
50
- }, co = {
50
+ }, ao = {
51
51
  axis: "horizontal",
52
52
  bottom: "md",
53
53
  zIndex: 2
54
- }, uo = (t) => {
55
- const e = C(4), {
54
+ }, co = (t) => {
55
+ const e = A(4), {
56
56
  isAtBottom: n,
57
57
  scrollToBottom: o
58
58
  } = It();
59
59
  let s;
60
- return e[0] !== n || e[1] !== t || e[2] !== o ? (s = !n && /* @__PURE__ */ c(ys, { ...co, children: /* @__PURE__ */ c(nt, { rounded: "full", onClick: () => o(), variant: "outline", size: "xs", ...t, children: /* @__PURE__ */ c(_s, { size: 16 }) }) }), e[0] = n, e[1] = t, e[2] = o, e[3] = s) : s = e[3], s;
60
+ return e[0] !== n || e[1] !== t || e[2] !== o ? (s = !n && /* @__PURE__ */ c(bs, { ...ao, children: /* @__PURE__ */ c(ot, { rounded: "full", onClick: () => o(), variant: "outline", size: "xs", ...t, children: /* @__PURE__ */ c(Is, { size: 16 }) }) }), e[0] = n, e[1] = t, e[2] = o, e[3] = s) : s = e[3], s;
61
61
  }, Nt = {
62
- Root: lo,
63
- Viewport: ao,
64
- ScrollToBottom: uo
65
- }, fo = Ss({
62
+ Root: io,
63
+ Viewport: lo,
64
+ ScrollToBottom: co
65
+ }, uo = xs({
66
66
  className: "ai-message",
67
67
  slots: ["root", "content"],
68
68
  base: {
@@ -169,62 +169,62 @@ const io = {
169
169
  shape: "rounded"
170
170
  }
171
171
  }), {
172
- withProvider: po,
173
- withContext: mo
174
- } = xs({
175
- recipe: fo
176
- }), ho = po("div", "root"), go = mo("div", "content"), ze = {
177
- Root: ho,
178
- Content: go
179
- }, bo = (t) => {
172
+ withProvider: fo,
173
+ withContext: po
174
+ } = ys({
175
+ recipe: uo
176
+ }), mo = fo("div", "root"), ho = po("div", "content"), ze = {
177
+ Root: mo,
178
+ Content: ho
179
+ }, go = (t) => {
180
180
  if (t == null) return null;
181
181
  const e = typeof t == "string" ? t : JSON.stringify(t, null, 2);
182
182
  return e.length === 0 ? null : e.length > 200 ? `${e.slice(0, 200)}...` : e;
183
183
  }, Jl = (t) => {
184
- const e = C(19), {
184
+ const e = A(19), {
185
185
  toolName: n,
186
186
  toolInput: o,
187
187
  onApprove: s,
188
188
  onDeny: r
189
189
  } = t;
190
190
  let i;
191
- e[0] !== o ? (i = bo(o), e[0] = o, e[1] = i) : i = e[1];
191
+ e[0] !== o ? (i = go(o), e[0] = o, e[1] = i) : i = e[1];
192
192
  const l = i;
193
193
  let a;
194
- e[2] !== n ? (a = /* @__PURE__ */ k(U, { textStyle: "label/S/medium", color: "fg", children: [
194
+ e[2] !== n ? (a = /* @__PURE__ */ C(j, { textStyle: "label/S/medium", color: "fg", children: [
195
195
  "Allow ",
196
- /* @__PURE__ */ c(pn, { size: "sm", children: n }),
196
+ /* @__PURE__ */ c(fn, { size: "sm", children: n }),
197
197
  "?"
198
198
  ] }), e[2] = n, e[3] = a) : a = e[3];
199
199
  let u;
200
- e[4] !== l ? (u = l ? /* @__PURE__ */ c(_t, { maxH: "6rem", children: /* @__PURE__ */ c(pn, { size: "sm", whiteSpace: "pre-wrap", display: "block", width: "100%", children: l }) }) : null, e[4] = l, e[5] = u) : u = e[5];
200
+ e[4] !== l ? (u = l ? /* @__PURE__ */ c(_t, { maxH: "6rem", children: /* @__PURE__ */ c(fn, { size: "sm", whiteSpace: "pre-wrap", display: "block", width: "100%", children: l }) }) : null, e[4] = l, e[5] = u) : u = e[5];
201
201
  let d;
202
- e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ c(vs, { size: 14 }), e[6] = d) : d = e[6];
202
+ e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ c(_s, { size: 14 }), e[6] = d) : d = e[6];
203
203
  let f;
204
- e[7] !== r ? (f = /* @__PURE__ */ k(ft, { size: "xs", variant: "outline", onClick: r, children: [
204
+ e[7] !== r ? (f = /* @__PURE__ */ C(ft, { size: "xs", variant: "outline", onClick: r, children: [
205
205
  d,
206
206
  "Deny"
207
207
  ] }), e[7] = r, e[8] = f) : f = e[8];
208
- let p;
209
- e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ c(Rs, { size: 14 }), e[9] = p) : p = e[9];
210
208
  let m;
211
- e[10] !== s ? (m = /* @__PURE__ */ k(ft, { size: "xs", colorPalette: "green", onClick: s, children: [
212
- p,
209
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ c(vs, { size: 14 }), e[9] = m) : m = e[9];
210
+ let p;
211
+ e[10] !== s ? (p = /* @__PURE__ */ C(ft, { size: "xs", colorPalette: "green", onClick: s, children: [
212
+ m,
213
213
  "Allow"
214
- ] }), e[10] = s, e[11] = m) : m = e[11];
214
+ ] }), e[10] = s, e[11] = p) : p = e[11];
215
215
  let h;
216
- e[12] !== f || e[13] !== m ? (h = /* @__PURE__ */ k(ae, { gap: "xs", justifyContent: "flex-end", children: [
216
+ e[12] !== f || e[13] !== p ? (h = /* @__PURE__ */ C(ce, { gap: "xs", justifyContent: "flex-end", children: [
217
217
  f,
218
- m
219
- ] }), e[12] = f, e[13] = m, e[14] = h) : h = e[14];
218
+ p
219
+ ] }), e[12] = f, e[13] = p, e[14] = h) : h = e[14];
220
220
  let g;
221
- return e[15] !== a || e[16] !== u || e[17] !== h ? (g = /* @__PURE__ */ c(B, { px: "sm", py: "xs", mx: "sm", borderWidth: "1px", borderColor: "border.warning", borderRadius: "lg", bg: "bg.warning", children: /* @__PURE__ */ k(Qe, { direction: "column", gap: "xs", children: [
221
+ return e[15] !== a || e[16] !== u || e[17] !== h ? (g = /* @__PURE__ */ c(B, { px: "sm", py: "xs", mx: "sm", borderWidth: "1px", borderColor: "border.warning", borderRadius: "lg", bg: "bg.warning", children: /* @__PURE__ */ C(Qe, { direction: "column", gap: "xs", children: [
222
222
  a,
223
223
  u,
224
224
  h
225
225
  ] }) }), e[15] = a, e[16] = u, e[17] = h, e[18] = g) : g = e[18], g;
226
- }, yo = "md", xo = "neutral", Zl = (t) => {
227
- const e = C(17), {
226
+ }, bo = "md", yo = "neutral", Zl = (t) => {
227
+ const e = A(17), {
228
228
  attachments: n,
229
229
  onSelect: o,
230
230
  onRemove: s,
@@ -234,37 +234,37 @@ const io = {
234
234
  } = t;
235
235
  let a;
236
236
  e[0] !== n ? (a = n === void 0 ? [] : n, e[0] = n, e[1] = a) : a = e[1];
237
- const u = a, d = i === void 0 ? yo : i, f = l === void 0 ? xo : l;
237
+ const u = a, d = i === void 0 ? bo : i, f = l === void 0 ? yo : l;
238
238
  if (u.length === 0)
239
239
  return null;
240
- let p;
240
+ let m;
241
241
  if (e[2] !== u || e[3] !== s || e[4] !== o || e[5] !== r || e[6] !== d || e[7] !== f) {
242
242
  let h;
243
243
  e[9] !== s || e[10] !== o || e[11] !== r || e[12] !== d || e[13] !== f ? (h = (g) => {
244
- const y = o ? () => o(g) : void 0, x = s ? () => s(g) : void 0;
244
+ const b = o ? () => o(g) : void 0, y = s ? () => s(g) : void 0;
245
245
  if (r) {
246
- const b = r({
246
+ const w = r({
247
247
  attachmentId: g,
248
- onSelect: y,
249
- onRemove: x,
248
+ onSelect: b,
249
+ onRemove: y,
250
250
  size: d,
251
251
  tone: f
252
252
  });
253
- return /* @__PURE__ */ c(Ys, { children: b }, g);
253
+ return /* @__PURE__ */ c(Gs, { children: w }, g);
254
254
  }
255
- return /* @__PURE__ */ c(on, { fileName: g, onSelect: y, onRemove: x, size: d, tone: f }, g);
256
- }, e[9] = s, e[10] = o, e[11] = r, e[12] = d, e[13] = f, e[14] = h) : h = e[14], p = u.map(h), e[2] = u, e[3] = s, e[4] = o, e[5] = r, e[6] = d, e[7] = f, e[8] = p;
255
+ return /* @__PURE__ */ c(on, { fileName: g, onSelect: b, onRemove: y, size: d, tone: f }, g);
256
+ }, e[9] = s, e[10] = o, e[11] = r, e[12] = d, e[13] = f, e[14] = h) : h = e[14], m = u.map(h), e[2] = u, e[3] = s, e[4] = o, e[5] = r, e[6] = d, e[7] = f, e[8] = m;
257
257
  } else
258
- p = e[8];
259
- let m;
260
- return e[15] !== p ? (m = /* @__PURE__ */ c(G, { marginBottom: "sm", gap: "1", flexDir: "row", flexWrap: "wrap", children: p }), e[15] = p, e[16] = m) : m = e[16], m;
261
- }, So = (t) => {
258
+ m = e[8];
259
+ let p;
260
+ return e[15] !== m ? (p = /* @__PURE__ */ c(G, { marginBottom: "sm", gap: "1", flexDir: "row", flexWrap: "wrap", children: m }), e[15] = m, e[16] = p) : p = e[16], p;
261
+ }, xo = (t) => {
262
262
  const {
263
263
  previousUserMessageCount: e,
264
264
  userMessageCount: n
265
265
  } = t;
266
266
  return e === 0 ? !1 : n > e;
267
- }, wo = (t) => {
267
+ }, So = (t) => {
268
268
  const e = t.conversationKey ?? null;
269
269
  return t.state.conversationKey !== e ? {
270
270
  shouldScroll: !1,
@@ -273,7 +273,7 @@ const io = {
273
273
  userMessageCount: t.userMessageCount
274
274
  }
275
275
  } : {
276
- shouldScroll: So({
276
+ shouldScroll: xo({
277
277
  previousUserMessageCount: t.state.userMessageCount,
278
278
  userMessageCount: t.userMessageCount
279
279
  }),
@@ -282,12 +282,12 @@ const io = {
282
282
  userMessageCount: Math.max(t.state.userMessageCount, t.userMessageCount)
283
283
  }
284
284
  };
285
- }, To = (t) => {
286
- const e = wo(t);
285
+ }, wo = (t) => {
286
+ const e = So(t);
287
287
  return e.shouldScroll && t.scrollToBottom("instant"), e;
288
288
  };
289
- function Ao(t) {
290
- const e = C(8), {
289
+ function To(t) {
290
+ const e = A(8), {
291
291
  conversationKey: n,
292
292
  userMessageCount: o
293
293
  } = t, {
@@ -301,33 +301,35 @@ function Ao(t) {
301
301
  const l = Te(i);
302
302
  let a, u;
303
303
  return e[3] !== n || e[4] !== s || e[5] !== o ? (a = () => {
304
- const d = To({
304
+ const d = wo({
305
305
  state: l.current,
306
306
  conversationKey: n,
307
307
  userMessageCount: o,
308
308
  scrollToBottom: s
309
309
  });
310
310
  l.current = d.state;
311
- }, u = [n, o, s], e[3] = n, e[4] = s, e[5] = o, e[6] = a, e[7] = u) : (a = e[6], u = e[7]), le(a, u), null;
311
+ }, u = [n, o, s], e[3] = n, e[4] = s, e[5] = o, e[6] = a, e[7] = u) : (a = e[6], u = e[7]), ae(a, u), null;
312
312
  }
313
- const zn = (t) => t.trim().length > 0, Co = (t) => {
313
+ const On = (t) => t.trim().length > 0, Ao = (t) => {
314
314
  const {
315
- hasQuestionPrompt: e,
316
- isDisabled: n,
317
- streaming: o,
318
- text: s
319
- } = t;
320
- return n || o && !e || !zn(s) ? "none" : "submit";
321
- }, ko = (t) => {
322
- const {
323
- canInterrupt: e,
315
+ canSubmit: e,
324
316
  hasQuestionPrompt: n,
325
317
  isDisabled: o,
326
318
  streaming: s,
327
319
  text: r
328
320
  } = t;
329
- return o ? "none" : s && !n ? e ? "interrupt" : "none" : zn(r) ? "submit" : "none";
330
- }, Qn = 200, Io = (t, e = Qn) => t.length > 0 && t.split(/\r\n|\r|\n/).length > e, _o = (t) => {
321
+ return o || !e || s && !n || !On(r) ? "none" : "submit";
322
+ }, Co = (t) => {
323
+ const {
324
+ canInterrupt: e,
325
+ canSubmit: n,
326
+ hasQuestionPrompt: o,
327
+ isDisabled: s,
328
+ streaming: r,
329
+ text: i
330
+ } = t;
331
+ return s ? "none" : r && !o ? e ? "interrupt" : "none" : !n || !On(i) ? "none" : "submit";
332
+ }, zn = 200, ko = (t, e = zn) => t.length > 0 && t.split(/\r\n|\r|\n/).length > e, Io = (t) => {
331
333
  const {
332
334
  onAttachFiles: e,
333
335
  onAttachText: n,
@@ -348,26 +350,26 @@ const zn = (t) => t.trim().length > 0, Co = (t) => {
348
350
  return;
349
351
  }
350
352
  const u = l.clipboardData.getData("text/plain");
351
- n && Io(u, o) && (l.preventDefault(), n(u));
353
+ n && ko(u, o) && (l.preventDefault(), n(u));
352
354
  }
353
355
  };
354
- }, vo = (t) => {
356
+ }, _o = (t) => {
355
357
  t.preventDefault();
356
- }, qn = (t) => {
357
- const e = C(7), {
358
+ }, Qn = (t) => {
359
+ const e = A(7), {
358
360
  option: n
359
361
  } = t;
360
362
  let o;
361
- e[0] !== n.label ? (o = /* @__PURE__ */ c(U, { textStyle: "label/S/regular", color: "fg", children: n.label }), e[0] = n.label, e[1] = o) : o = e[1];
363
+ e[0] !== n.label ? (o = /* @__PURE__ */ c(j, { textStyle: "label/S/regular", color: "fg", children: n.label }), e[0] = n.label, e[1] = o) : o = e[1];
362
364
  let s;
363
- e[2] !== n.description ? (s = n.description ? /* @__PURE__ */ c(U, { textStyle: "label/XS/regular", color: "fg.muted", children: n.description }) : null, e[2] = n.description, e[3] = s) : s = e[3];
365
+ e[2] !== n.description ? (s = n.description ? /* @__PURE__ */ c(j, { textStyle: "label/XS/regular", color: "fg.muted", children: n.description }) : null, e[2] = n.description, e[3] = s) : s = e[3];
364
366
  let r;
365
- return e[4] !== o || e[5] !== s ? (r = /* @__PURE__ */ k(G, { gap: "0", minWidth: "0", children: [
367
+ return e[4] !== o || e[5] !== s ? (r = /* @__PURE__ */ C(G, { gap: "0", minWidth: "0", children: [
366
368
  o,
367
369
  s
368
370
  ] }), e[4] = o, e[5] = s, e[6] = r) : r = e[6], r;
369
- }, Ro = (t) => {
370
- const e = C(12), {
371
+ }, vo = (t) => {
372
+ const e = A(12), {
371
373
  option: n,
372
374
  name: o,
373
375
  checked: s,
@@ -380,11 +382,11 @@ const zn = (t) => t.trim().length > 0, Co = (t) => {
380
382
  }, e[0] = r, e[1] = u) : u = e[1];
381
383
  const d = r ? i : void 0;
382
384
  let f;
383
- e[2] !== n ? (f = /* @__PURE__ */ c(qn, { option: n }), e[2] = n, e[3] = f) : f = e[3];
384
- let p;
385
- return e[4] !== s || e[5] !== o || e[6] !== l || e[7] !== a || e[8] !== u || e[9] !== d || e[10] !== f ? (p = /* @__PURE__ */ c($n, { name: o, checked: s, readOnly: l, "aria-readonly": a, inputProps: u, alignItems: "flex-start", onCheckedChange: d, children: f }), e[4] = s, e[5] = o, e[6] = l, e[7] = a, e[8] = u, e[9] = d, e[10] = f, e[11] = p) : p = e[11], p;
386
- }, Mo = (t) => {
387
- const e = C(17), {
385
+ e[2] !== n ? (f = /* @__PURE__ */ c(Qn, { option: n }), e[2] = n, e[3] = f) : f = e[3];
386
+ let m;
387
+ return e[4] !== s || e[5] !== o || e[6] !== l || e[7] !== a || e[8] !== u || e[9] !== d || e[10] !== f ? (m = /* @__PURE__ */ c(Ln, { name: o, checked: s, readOnly: l, "aria-readonly": a, inputProps: u, alignItems: "flex-start", onCheckedChange: d, children: f }), e[4] = s, e[5] = o, e[6] = l, e[7] = a, e[8] = u, e[9] = d, e[10] = f, e[11] = m) : m = e[11], m;
388
+ }, Ro = (t) => {
389
+ const e = A(17), {
388
390
  question: n,
389
391
  questionIndex: o,
390
392
  name: s,
@@ -396,26 +398,26 @@ const zn = (t) => t.trim().length > 0, Co = (t) => {
396
398
  e[0] !== i || e[1] !== l || e[2] !== n || e[3] !== o ? (f = i ? (h) => {
397
399
  h.value && l?.(n, o, h.value);
398
400
  } : void 0, e[0] = i, e[1] = l, e[2] = n, e[3] = o, e[4] = f) : f = e[4];
399
- let p;
401
+ let m;
400
402
  if (e[5] !== i || e[6] !== n.options) {
401
403
  let h;
402
- e[8] !== i ? (h = (g) => /* @__PURE__ */ c(eo, { value: g.label, inputProps: i ? void 0 : {
404
+ e[8] !== i ? (h = (g) => /* @__PURE__ */ c(Zs, { value: g.label, inputProps: i ? void 0 : {
403
405
  tabIndex: -1
404
- }, alignItems: "flex-start", children: /* @__PURE__ */ c(qn, { option: g }) }, g.label), e[8] = i, e[9] = h) : h = e[9], p = n.options.map(h), e[5] = i, e[6] = n.options, e[7] = p;
406
+ }, alignItems: "flex-start", children: /* @__PURE__ */ c(Qn, { option: g }) }, g.label), e[8] = i, e[9] = h) : h = e[9], m = n.options.map(h), e[5] = i, e[6] = n.options, e[7] = m;
405
407
  } else
406
- p = e[7];
407
- let m;
408
- return e[10] !== s || e[11] !== a || e[12] !== u || e[13] !== d || e[14] !== f || e[15] !== p ? (m = /* @__PURE__ */ c(to, { name: s, value: a, readOnly: u, "aria-readonly": d, display: "flex", flexDirection: "column", gap: "xs", onValueChange: f, children: p }), e[10] = s, e[11] = a, e[12] = u, e[13] = d, e[14] = f, e[15] = p, e[16] = m) : m = e[16], m;
409
- }, Po = (t) => {
410
- const e = C(4), {
408
+ m = e[7];
409
+ let p;
410
+ return e[10] !== s || e[11] !== a || e[12] !== u || e[13] !== d || e[14] !== f || e[15] !== m ? (p = /* @__PURE__ */ c(eo, { name: s, value: a, readOnly: u, "aria-readonly": d, display: "flex", flexDirection: "column", gap: "xs", onValueChange: f, children: m }), e[10] = s, e[11] = a, e[12] = u, e[13] = d, e[14] = f, e[15] = m, e[16] = p) : p = e[16], p;
411
+ }, Mo = (t) => {
412
+ const e = A(4), {
411
413
  items: n
412
414
  } = t;
413
415
  let o;
414
- e[0] !== n ? (o = n.map(Eo), e[0] = n, e[1] = o) : o = e[1];
416
+ e[0] !== n ? (o = n.map(Po), e[0] = n, e[1] = o) : o = e[1];
415
417
  let s;
416
418
  return e[2] !== o ? (s = /* @__PURE__ */ c(G, { as: "ul", gap: "0", listStyleType: "none", margin: "0", padding: "0", children: o }), e[2] = o, e[3] = s) : s = e[3], s;
417
- }, Wn = (t) => {
418
- const e = C(19), {
419
+ }, qn = (t) => {
420
+ const e = A(19), {
419
421
  questions: n,
420
422
  editable: o,
421
423
  selectedOptionsByQuestion: s,
@@ -428,29 +430,38 @@ const zn = (t) => t.trim().length > 0, Co = (t) => {
428
430
  const d = u;
429
431
  let f;
430
432
  e[2] !== r ? (f = r === void 0 ? {} : r, e[2] = r, e[3] = f) : f = e[3];
431
- const p = f;
432
- let m;
433
- if (e[4] !== p || e[5] !== a || e[6] !== l || e[7] !== i || e[8] !== n || e[9] !== d) {
433
+ const m = f;
434
+ let p;
435
+ if (e[4] !== m || e[5] !== a || e[6] !== l || e[7] !== i || e[8] !== n || e[9] !== d) {
434
436
  let g;
435
- e[11] !== p || e[12] !== a || e[13] !== l || e[14] !== i || e[15] !== d ? (g = (y, x) => {
436
- const b = y.id ?? `question-${x}`, S = y.multiple ? "checkbox" : "radio", w = d[b] ?? [];
437
- return /* @__PURE__ */ k(G, { as: "fieldset", gap: "xs", borderWidth: "1px", borderColor: "border.subtle", borderRadius: "sm", padding: "sm", minWidth: "0", children: [
438
- /* @__PURE__ */ c(U, { as: "legend", textStyle: "label/S/medium", color: "fg", paddingX: "2xs", children: y.question }),
439
- S === "radio" ? /* @__PURE__ */ c(Mo, { question: y, questionIndex: x, name: b, selectedOption: w[0], editable: a, onToggleOption: i }) : y.options.map((T) => /* @__PURE__ */ c(Ro, { option: T, name: b, checked: w.includes(T.label), editable: a, onToggle: () => i?.(y, x, T.label) }, T.label)),
440
- y.allowCustomAnswer ? /* @__PURE__ */ c(ws, { readOnly: !a, "aria-readonly": a ? void 0 : "true", value: p[b] ?? "", placeholder: a ? "Answer..." : "Custom answer", "aria-label": y.question, rows: 2, borderWidth: "1px", borderColor: "border.subtle", borderRadius: "sm", padding: "xs", resize: a ? "vertical" : "none", color: "fg", onChange: (T) => l?.(y, x, T.currentTarget.value) }) : null
441
- ] }, b);
442
- }, e[11] = p, e[12] = a, e[13] = l, e[14] = i, e[15] = d, e[16] = g) : g = e[16], m = n.map(g), e[4] = p, e[5] = a, e[6] = l, e[7] = i, e[8] = n, e[9] = d, e[10] = m;
437
+ e[11] !== m || e[12] !== a || e[13] !== l || e[14] !== i || e[15] !== d ? (g = (b, y) => {
438
+ const w = b.id ?? `question-${y}`, x = b.multiple ? "checkbox" : "radio", S = d[w] ?? [];
439
+ return /* @__PURE__ */ C(G, { as: "fieldset", gap: "xs", borderWidth: "1px", borderColor: "border.subtle", borderRadius: "sm", padding: "sm", minWidth: "0", children: [
440
+ /* @__PURE__ */ c(j, { as: "legend", textStyle: "label/S/medium", color: "fg", paddingX: "2xs", children: b.question }),
441
+ x === "radio" ? /* @__PURE__ */ c(Ro, { question: b, questionIndex: y, name: w, selectedOption: S[0], editable: a, onToggleOption: i }) : b.options.map((T) => /* @__PURE__ */ c(vo, { option: T, name: w, checked: S.includes(T.label), editable: a, onToggle: () => i?.(b, y, T.label) }, T.label)),
442
+ b.allowCustomAnswer ? /* @__PURE__ */ c(Ss, { readOnly: !a, "aria-readonly": a ? void 0 : "true", value: m[w] ?? "", placeholder: a ? "Answer..." : "Custom answer", "aria-label": b.question, rows: 2, borderWidth: "1px", borderColor: "border.subtle", borderRadius: "sm", padding: "xs", resize: a ? "vertical" : "none", color: "fg", onChange: (T) => l?.(b, y, T.currentTarget.value) }) : null
443
+ ] }, w);
444
+ }, e[11] = m, e[12] = a, e[13] = l, e[14] = i, e[15] = d, e[16] = g) : g = e[16], p = n.map(g), e[4] = m, e[5] = a, e[6] = l, e[7] = i, e[8] = n, e[9] = d, e[10] = p;
443
445
  } else
444
- m = e[10];
446
+ p = e[10];
445
447
  let h;
446
- return e[17] !== m ? (h = /* @__PURE__ */ c(G, { as: "form", gap: "sm", onSubmit: vo, "aria-label": "Question form", children: m }), e[17] = m, e[18] = h) : h = e[18], h;
448
+ return e[17] !== p ? (h = /* @__PURE__ */ c(G, { as: "form", gap: "sm", onSubmit: _o, "aria-label": "Question form", children: p }), e[17] = p, e[18] = h) : h = e[18], h;
447
449
  };
448
- function Eo(t, e) {
449
- return /* @__PURE__ */ c(B, { as: "li", children: /* @__PURE__ */ c($n, { checked: t.checked, readOnly: !0, "aria-readonly": "true", inputProps: {
450
+ function Po(t, e) {
451
+ return /* @__PURE__ */ c(B, { as: "li", children: /* @__PURE__ */ c(Ln, { checked: t.checked, readOnly: !0, "aria-readonly": "true", inputProps: {
450
452
  tabIndex: -1
451
- }, size: "xs", children: /* @__PURE__ */ c(U, { textStyle: "label/XS/regular", color: "fg", children: t.label }) }) }, `${t.label}-${e}`);
453
+ }, size: "xs", children: /* @__PURE__ */ c(j, { textStyle: "label/XS/regular", color: "fg", children: t.label }) }) }, `${t.label}-${e}`);
452
454
  }
453
- const Ae = (t, e) => t.id ?? `question-${e}`, Xt = (t) => t ? JSON.stringify(t.questions.map((e, n) => ({
455
+ const Ae = (t, e) => t.id ?? `question-${e}`, Do = (t, e, n, o) => {
456
+ const s = Ae(e, n), r = t[s] ?? [], i = r.includes(o);
457
+ return e.multiple ? {
458
+ ...t,
459
+ [s]: i ? r.filter((l) => l !== o) : [...r, o]
460
+ } : {
461
+ ...t,
462
+ [s]: i ? [] : [o]
463
+ };
464
+ }, Xt = (t) => t ? JSON.stringify(t.questions.map((e, n) => ({
454
465
  id: Ae(e, n),
455
466
  question: e.question,
456
467
  multiple: !!e.multiple,
@@ -460,7 +471,7 @@ const Ae = (t, e) => t.id ?? `question-${e}`, Xt = (t) => t ? JSON.stringify(t.q
460
471
  label: o.label,
461
472
  description: o.description ?? ""
462
473
  }))
463
- }))) : "", Do = (t, e, n) => {
474
+ }))) : "", Eo = (t, e, n) => {
464
475
  const o = [];
465
476
  for (let s = 0; s < t.questions.length; s += 1) {
466
477
  const r = t.questions[s], i = Ae(r, s), l = e[i] ?? [], a = n[i]?.trim(), u = a ? [...l, a] : l;
@@ -479,7 +490,7 @@ const Ae = (t, e) => t.id ?? `question-${e}`, Xt = (t) => t ? JSON.stringify(t.q
479
490
  return o;
480
491
  }, Fo = (t, e, n) => {
481
492
  if (!t) return typeof n == "string" ? n.trim() : "";
482
- const o = rn(t, n), s = Do(t, e, o), r = typeof n == "string" ? n.trim() : "", i = t.questions.some((l) => l.allowCustomAnswer);
493
+ const o = rn(t, n), s = Eo(t, e, o), r = typeof n == "string" ? n.trim() : "", i = t.questions.some((l) => l.allowCustomAnswer);
483
494
  return r.length > 0 && !i && s.push(`Additional response: ${r}`), s.join(`
484
495
  `);
485
496
  }, Lo = (t, e, n) => {
@@ -510,7 +521,7 @@ const Ae = (t, e) => t.id ?? `question-${e}`, Xt = (t) => t ? JSON.stringify(t.q
510
521
  const s = Ae(t, e);
511
522
  return (n[s] ?? []).length > 0 || !!o[s]?.trim();
512
523
  }, Qo = (t) => {
513
- const e = C(22), {
524
+ const e = A(22), {
514
525
  question: n,
515
526
  sourceQuestion: o,
516
527
  questionIndex: s,
@@ -521,17 +532,17 @@ const Ae = (t, e) => t.id ?? `question-${e}`, Xt = (t) => t ? JSON.stringify(t.q
521
532
  } = t;
522
533
  let u;
523
534
  e[0] !== l || e[1] !== s || e[2] !== i || e[3] !== o ? (u = zo(o, s, i, l), e[0] = l, e[1] = s, e[2] = i, e[3] = o, e[4] = u) : u = e[4];
524
- const d = u, f = d ? "answered" : "not answered", p = r ? "outline" : "ghost", m = `question-step-tab-${n.id}`, h = `${n.question} (${f})`, g = `question-step-panel-${n.id}`;
535
+ const d = u, f = d ? "answered" : "not answered", m = r ? "outline" : "ghost", p = `question-step-tab-${n.id}`, h = `${n.question} (${f})`, g = `question-step-panel-${n.id}`;
536
+ let b;
537
+ e[5] !== a || e[6] !== s ? (b = () => a(s), e[5] = a, e[6] = s, e[7] = b) : b = e[7];
525
538
  let y;
526
- e[5] !== a || e[6] !== s ? (y = () => a(s), e[5] = a, e[6] = s, e[7] = y) : y = e[7];
539
+ e[8] !== d || e[9] !== s ? (y = d ? /* @__PURE__ */ c(Dn, { "aria-hidden": "true" }) : s + 1, e[8] = d, e[9] = s, e[10] = y) : y = e[10];
540
+ let w;
541
+ e[11] !== r || e[12] !== p || e[13] !== h || e[14] !== g || e[15] !== b || e[16] !== y || e[17] !== m ? (w = /* @__PURE__ */ c(ft, { id: p, role: "tab", "aria-label": h, "aria-selected": r, "aria-controls": g, size: "xs", variant: m, minW: "8", onClick: b, children: y }), e[11] = r, e[12] = p, e[13] = h, e[14] = g, e[15] = b, e[16] = y, e[17] = m, e[18] = w) : w = e[18];
527
542
  let x;
528
- e[8] !== d || e[9] !== s ? (x = d ? /* @__PURE__ */ c(Dn, { "aria-hidden": "true" }) : s + 1, e[8] = d, e[9] = s, e[10] = x) : x = e[10];
529
- let b;
530
- e[11] !== r || e[12] !== m || e[13] !== h || e[14] !== g || e[15] !== y || e[16] !== x || e[17] !== p ? (b = /* @__PURE__ */ c(ft, { id: m, role: "tab", "aria-label": h, "aria-selected": r, "aria-controls": g, size: "xs", variant: p, minW: "8", onClick: y, children: x }), e[11] = r, e[12] = m, e[13] = h, e[14] = g, e[15] = y, e[16] = x, e[17] = p, e[18] = b) : b = e[18];
531
- let S;
532
- return e[19] !== n.question || e[20] !== b ? (S = /* @__PURE__ */ c(sn, { content: n.question, children: b }), e[19] = n.question, e[20] = b, e[21] = S) : S = e[21], S;
543
+ return e[19] !== n.question || e[20] !== w ? (x = /* @__PURE__ */ c(sn, { content: n.question, children: w }), e[19] = n.question, e[20] = w, e[21] = x) : x = e[21], x;
533
544
  }, qo = (t) => {
534
- const e = C(31), {
545
+ const e = A(31), {
535
546
  questionPrompt: n,
536
547
  selectedOptionsByQuestion: o,
537
548
  customAnswersByQuestion: s,
@@ -539,31 +550,31 @@ const Ae = (t, e) => t.id ?? `question-${e}`, Xt = (t) => t ? JSON.stringify(t.q
539
550
  onCustomAnswerChange: i
540
551
  } = t, {
541
552
  questions: l
542
- } = t, [a, u] = H(0), d = Math.min(a, l.length - 1), f = l[d], p = l.length > 1;
543
- let m;
544
- e[0] !== s || e[1] !== p || e[2] !== n.questions || e[3] !== l || e[4] !== d || e[5] !== o ? (m = p ? /* @__PURE__ */ c(ae, { role: "tablist", "aria-label": "Question steps", gap: "1", minWidth: "0", children: l.map((_, v) => /* @__PURE__ */ c(Qo, { question: _, sourceQuestion: n.questions[v], questionIndex: v, isActive: v === d, selectedOptionsByQuestion: o, customAnswersByQuestion: s, onSelectStep: u }, _.id)) }) : null, e[0] = s, e[1] = p, e[2] = n.questions, e[3] = l, e[4] = d, e[5] = o, e[6] = m) : m = e[6];
545
- const h = `question-step-panel-${f.id}`, g = p ? "tabpanel" : void 0, y = p ? `question-step-tab-${f.id}` : void 0;
553
+ } = t, [a, u] = V(0), d = Math.min(a, l.length - 1), f = l[d], m = l.length > 1;
554
+ let p;
555
+ e[0] !== s || e[1] !== m || e[2] !== n.questions || e[3] !== l || e[4] !== d || e[5] !== o ? (p = m ? /* @__PURE__ */ c(ce, { role: "tablist", "aria-label": "Question steps", gap: "1", minWidth: "0", children: l.map((I, v) => /* @__PURE__ */ c(Qo, { question: I, sourceQuestion: n.questions[v], questionIndex: v, isActive: v === d, selectedOptionsByQuestion: o, customAnswersByQuestion: s, onSelectStep: u }, I.id)) }) : null, e[0] = s, e[1] = m, e[2] = n.questions, e[3] = l, e[4] = d, e[5] = o, e[6] = p) : p = e[6];
556
+ const h = `question-step-panel-${f.id}`, g = m ? "tabpanel" : void 0, b = m ? `question-step-tab-${f.id}` : void 0;
557
+ let y;
558
+ e[7] !== f ? (y = [f], e[7] = f, e[8] = y) : y = e[8];
559
+ let w;
560
+ e[9] !== r || e[10] !== n.questions || e[11] !== d ? (w = (I, v, L) => {
561
+ r(n.questions[d], d, L);
562
+ }, e[9] = r, e[10] = n.questions, e[11] = d, e[12] = w) : w = e[12];
546
563
  let x;
547
- e[7] !== f ? (x = [f], e[7] = f, e[8] = x) : x = e[8];
548
- let b;
549
- e[9] !== r || e[10] !== n.questions || e[11] !== d ? (b = (_, v, F) => {
550
- r(n.questions[d], d, F);
551
- }, e[9] = r, e[10] = n.questions, e[11] = d, e[12] = b) : b = e[12];
564
+ e[13] !== i || e[14] !== n.questions || e[15] !== d ? (x = (I, v, L) => {
565
+ i(n.questions[d], d, L);
566
+ }, e[13] = i, e[14] = n.questions, e[15] = d, e[16] = x) : x = e[16];
552
567
  let S;
553
- e[13] !== i || e[14] !== n.questions || e[15] !== d ? (S = (_, v, F) => {
554
- i(n.questions[d], d, F);
555
- }, e[13] = i, e[14] = n.questions, e[15] = d, e[16] = S) : S = e[16];
556
- let w;
557
- e[17] !== s || e[18] !== o || e[19] !== x || e[20] !== b || e[21] !== S ? (w = /* @__PURE__ */ c(Wn, { questions: x, editable: !0, selectedOptionsByQuestion: o, customAnswersByQuestion: s, onToggleOption: b, onCustomAnswerChange: S }), e[17] = s, e[18] = o, e[19] = x, e[20] = b, e[21] = S, e[22] = w) : w = e[22];
568
+ e[17] !== s || e[18] !== o || e[19] !== y || e[20] !== w || e[21] !== x ? (S = /* @__PURE__ */ c(qn, { questions: y, editable: !0, selectedOptionsByQuestion: o, customAnswersByQuestion: s, onToggleOption: w, onCustomAnswerChange: x }), e[17] = s, e[18] = o, e[19] = y, e[20] = w, e[21] = x, e[22] = S) : S = e[22];
558
569
  let T;
559
- e[23] !== h || e[24] !== g || e[25] !== y || e[26] !== w ? (T = /* @__PURE__ */ c(G, { id: h, role: g, "aria-labelledby": y, gap: "0", children: w }), e[23] = h, e[24] = g, e[25] = y, e[26] = w, e[27] = T) : T = e[27];
560
- let A;
561
- return e[28] !== m || e[29] !== T ? (A = /* @__PURE__ */ k(G, { gap: "xs", pb: "sm", children: [
562
- m,
570
+ e[23] !== h || e[24] !== g || e[25] !== b || e[26] !== S ? (T = /* @__PURE__ */ c(G, { id: h, role: g, "aria-labelledby": b, gap: "0", children: S }), e[23] = h, e[24] = g, e[25] = b, e[26] = S, e[27] = T) : T = e[27];
571
+ let k;
572
+ return e[28] !== p || e[29] !== T ? (k = /* @__PURE__ */ C(G, { gap: "xs", pb: "sm", children: [
573
+ p,
563
574
  T
564
- ] }), e[28] = m, e[29] = T, e[30] = A) : A = e[30], A;
575
+ ] }), e[28] = p, e[29] = T, e[30] = k) : k = e[30], k;
565
576
  }, Wo = (t) => {
566
- const e = C(8), {
577
+ const e = A(8), {
567
578
  questionPrompt: n
568
579
  } = t;
569
580
  let o;
@@ -574,8 +585,8 @@ const Ae = (t, e) => t.id ?? `question-${e}`, Xt = (t) => t ? JSON.stringify(t.q
574
585
  const i = r;
575
586
  let l;
576
587
  return e[4] !== t || e[5] !== i || e[6] !== s ? (l = /* @__PURE__ */ c(qo, { ...t, questions: s }, i), e[4] = t, e[5] = i, e[6] = s, e[7] = l) : l = e[7], l;
577
- }, hn = "7", Ho = (t) => {
578
- const e = C(22);
588
+ }, mn = "7", Ho = (t) => {
589
+ const e = A(22);
579
590
  let n, o, s, r;
580
591
  e[0] !== t ? ({
581
592
  title: r,
@@ -585,45 +596,45 @@ const Ae = (t, e) => t.id ?? `question-${e}`, Xt = (t) => t ? JSON.stringify(t.q
585
596
  } = t, e[0] = t, e[1] = n, e[2] = o, e[3] = s, e[4] = r) : (n = e[1], o = e[2], s = e[3], r = e[4]);
586
597
  const i = o["aria-label"] ?? r;
587
598
  let l;
588
- e[5] !== n ? (l = n ? /* @__PURE__ */ c(Ms, { size: 16, strokeWidth: 2, fill: "currentColor" }) : /* @__PURE__ */ c(Ps, { size: 16, strokeWidth: 2 }), e[5] = n, e[6] = l) : l = e[6];
599
+ e[5] !== n ? (l = n ? /* @__PURE__ */ c(Rs, { size: 16, strokeWidth: 2, fill: "currentColor" }) : /* @__PURE__ */ c(Ms, { size: 16, strokeWidth: 2 }), e[5] = n, e[6] = l) : l = e[6];
589
600
  const a = l;
590
601
  let u;
591
- e[7] !== i || e[8] !== a || e[9] !== o || e[10] !== r ? (u = /* @__PURE__ */ c(nt, { "data-testid": "send-message-button", size: "xs", variant: "primary", "aria-label": i, title: r, ...o, children: a }), e[7] = i, e[8] = a, e[9] = o, e[10] = r, e[11] = u) : u = e[11];
602
+ e[7] !== i || e[8] !== a || e[9] !== o || e[10] !== r ? (u = /* @__PURE__ */ c(ot, { "data-testid": "send-message-button", size: "xs", variant: "primary", "aria-label": i, title: r, ...o, children: a }), e[7] = i, e[8] = a, e[9] = o, e[10] = r, e[11] = u) : u = e[11];
592
603
  const d = u;
593
604
  if (r) {
594
605
  let f;
595
- e[12] !== s || e[13] !== r ? (f = s ? /* @__PURE__ */ k(tn, { children: [
606
+ e[12] !== s || e[13] !== r ? (f = s ? /* @__PURE__ */ C(tn, { children: [
596
607
  r,
597
608
  " ",
598
- /* @__PURE__ */ c(Ts, { fontSize: "xs", children: s })
609
+ /* @__PURE__ */ c(ws, { fontSize: "xs", children: s })
599
610
  ] }) : r, e[12] = s, e[13] = r, e[14] = f) : f = e[14];
600
- const p = f;
601
- let m;
602
- e[15] !== d ? (m = /* @__PURE__ */ c(Ct.Trigger, { asChild: !0, children: d }), e[15] = d, e[16] = m) : m = e[16];
611
+ const m = f;
612
+ let p;
613
+ e[15] !== d ? (p = /* @__PURE__ */ c(Ct.Trigger, { asChild: !0, children: d }), e[15] = d, e[16] = p) : p = e[16];
603
614
  let h;
604
- e[17] !== p ? (h = /* @__PURE__ */ c(Mn, { children: /* @__PURE__ */ c(Ct.Positioner, { children: /* @__PURE__ */ c(Ct.Content, { children: p }) }) }), e[17] = p, e[18] = h) : h = e[18];
615
+ e[17] !== m ? (h = /* @__PURE__ */ c(Rn, { children: /* @__PURE__ */ c(Ct.Positioner, { children: /* @__PURE__ */ c(Ct.Content, { children: m }) }) }), e[17] = m, e[18] = h) : h = e[18];
605
616
  let g;
606
- return e[19] !== m || e[20] !== h ? (g = /* @__PURE__ */ k(Ct.Root, { closeDelay: 50, openDelay: 100, children: [
607
- m,
617
+ return e[19] !== p || e[20] !== h ? (g = /* @__PURE__ */ C(Ct.Root, { closeDelay: 50, openDelay: 100, children: [
618
+ p,
608
619
  h
609
- ] }), e[19] = m, e[20] = h, e[21] = g) : g = e[21], g;
620
+ ] }), e[19] = p, e[20] = h, e[21] = g) : g = e[21], g;
610
621
  }
611
622
  return d;
612
623
  }, Vo = (t) => {
613
- const e = C(2), {
624
+ const e = A(2), {
614
625
  placeholder: n
615
626
  } = t;
616
627
  if (!n)
617
628
  return null;
618
629
  let o;
619
- return e[0] !== n ? (o = /* @__PURE__ */ c(U, { textStyle: "label/M/regular", color: "fg.subtle", pointerEvents: "none", position: "absolute", top: "0", children: n }), e[0] = n, e[1] = o) : o = e[1], o;
630
+ return e[0] !== n ? (o = /* @__PURE__ */ c(j, { textStyle: "label/M/regular", color: "fg.subtle", pointerEvents: "none", position: "absolute", top: "0", children: n }), e[0] = n, e[1] = o) : o = e[1], o;
620
631
  }, Ut = "border.accent-light", Gt = (t) => {
621
632
  const e = t?.querySelector('[contenteditable="true"]');
622
633
  e instanceof HTMLElement && e.focus();
623
- }, gn = (t, e) => requestAnimationFrame(() => {
634
+ }, hn = (t, e) => requestAnimationFrame(() => {
624
635
  Gt(t), e?.();
625
636
  }), No = (t) => {
626
- const e = C(106), {
637
+ const e = A(107), {
627
638
  defaultState: n,
628
639
  onSubmit: o,
629
640
  onInterrupt: s,
@@ -634,191 +645,183 @@ const Ae = (t, e) => t.id ?? `question-${e}`, Xt = (t) => t ? JSON.stringify(t.q
634
645
  attachedResources: u,
635
646
  onClearAttachments: d,
636
647
  isDisabled: f,
648
+ submitDisabled: m,
637
649
  onChange: p,
638
- placeholder: m,
639
- attachmentList: h,
640
- actions: g,
650
+ placeholder: h,
651
+ attachmentList: g,
652
+ actions: b,
641
653
  attachedToTop: y,
642
- recessed: x,
643
- questionPrompt: b,
654
+ recessed: w,
655
+ questionPrompt: x,
644
656
  autoFocus: S,
645
- focusSignal: w,
646
- submitTitle: T,
647
- references: A,
648
- onAddReference: _
649
- } = t, v = o === void 0 ? Uo : o, F = l === void 0 ? Qn : l, M = a === void 0 ? !1 : a;
650
- let L;
651
- e[0] !== u ? (L = u === void 0 ? [] : u, e[0] = u, e[1] = L) : L = e[1];
652
- const P = L, E = f === void 0 ? !1 : f, O = y === void 0 ? !1 : y, z = x === void 0 ? !1 : x, D = S === void 0 ? !1 : S, $ = w === void 0 ? 0 : w;
653
- let R;
654
- e[2] !== A ? (R = A === void 0 ? [] : A, e[2] = A, e[3] = R) : R = e[3];
655
- const q = R, j = z ? "border.subtle" : "border", [W, _e] = H(!1), [ve, ue] = H(n), [Re, Ne] = H(0);
657
+ focusSignal: T,
658
+ submitTitle: k,
659
+ references: I,
660
+ onAddReference: v
661
+ } = t, L = o === void 0 ? Uo : o, D = l === void 0 ? zn : l, $ = a === void 0 ? !1 : a;
662
+ let E;
663
+ e[0] !== u ? (E = u === void 0 ? [] : u, e[0] = u, e[1] = E) : E = e[1];
664
+ const M = E, P = f === void 0 ? !1 : f, F = m === void 0 ? !1 : m, Q = y === void 0 ? !1 : y, O = w === void 0 ? !1 : w, z = S === void 0 ? !1 : S, R = T === void 0 ? 0 : T;
665
+ let W;
666
+ e[2] !== I ? (W = I === void 0 ? [] : I, e[2] = I, e[3] = W) : W = e[3];
667
+ const H = W, ne = O ? "border.subtle" : "border", [We, _e] = V(!1), [ve, de] = V(n), [Re, Ue] = V(0);
656
668
  let Y;
657
669
  e[4] !== n ? (Y = () => Vt(n), e[4] = n, e[5] = Y) : Y = e[5];
658
- const [ee, de] = H(Y);
659
- let fe;
660
- e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (fe = {}, e[6] = fe) : fe = e[6];
661
- const [N, Me] = H(fe);
670
+ const [ee, fe] = V(Y);
671
+ let pe;
672
+ e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (pe = {}, e[6] = pe) : pe = e[6];
673
+ const [U, Me] = V(pe);
662
674
  let Pe;
663
675
  e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Pe = {}, e[7] = Pe) : Pe = e[7];
664
- const [J, Ue] = H(Pe), We = Te(null), rt = Te(p);
665
- let je;
666
- e[8] !== b ? (je = Xt(b), e[8] = b, e[9] = je) : je = e[9];
667
- const He = Te(je);
668
- let pe, it;
669
- e[10] !== p ? (pe = () => {
670
- rt.current = p;
671
- }, it = [p], e[10] = p, e[11] = pe, e[12] = it) : (pe = e[11], it = e[12]), le(pe, it);
672
- let Ee, De;
673
- e[13] !== n ? (Ee = () => {
674
- const Q = Vt(n);
675
- ue(n), Ne(jo), de(Q), Me({}), Ue({}), rt.current?.(Q);
676
- }, De = [n], e[13] = n, e[14] = Ee, e[15] = De) : (Ee = e[14], De = e[15]), le(Ee, De);
677
- let me;
678
- e[16] !== b ? (me = Xt(b), e[16] = b, e[17] = me) : me = e[17];
679
- const ne = me;
676
+ const [J, je] = V(Pe), He = Te(null), lt = Te(p);
677
+ let Ke;
678
+ e[8] !== x ? (Ke = Xt(x), e[8] = x, e[9] = Ke) : Ke = e[9];
679
+ const Ve = Te(Ke);
680
+ let me, at;
681
+ e[10] !== p ? (me = () => {
682
+ lt.current = p;
683
+ }, at = [p], e[10] = p, e[11] = me, e[12] = at) : (me = e[11], at = e[12]), ae(me, at);
684
+ let De, Ee;
685
+ e[13] !== n ? (De = () => {
686
+ const q = Vt(n);
687
+ de(n), Ue(jo), fe(q), Me({}), je({}), lt.current?.(q);
688
+ }, Ee = [n], e[13] = n, e[14] = De, e[15] = Ee) : (De = e[14], Ee = e[15]), ae(De, Ee);
689
+ let he;
690
+ e[16] !== x ? (he = Xt(x), e[16] = x, e[17] = he) : he = e[17];
691
+ const se = he;
680
692
  let Be, Fe;
681
- e[18] !== ne ? (Be = () => {
682
- He.current !== ne && (He.current = ne, Me({}), Ue({}));
683
- }, Fe = [ne], e[18] = ne, e[19] = Be, e[20] = Fe) : (Be = e[19], Fe = e[20]), le(Be, Fe);
684
- let he, ge;
685
- e[21] !== D ? (he = () => {
686
- if (!D)
693
+ e[18] !== se ? (Be = () => {
694
+ Ve.current !== se && (Ve.current = se, Me({}), je({}));
695
+ }, Fe = [se], e[18] = se, e[19] = Be, e[20] = Fe) : (Be = e[19], Fe = e[20]), ae(Be, Fe);
696
+ let ge, be;
697
+ e[21] !== z ? (ge = () => {
698
+ if (!z)
687
699
  return;
688
- const Q = gn(We.current, () => _e(!0));
689
- return () => cancelAnimationFrame(Q);
690
- }, ge = [D], e[21] = D, e[22] = he, e[23] = ge) : (he = e[22], ge = e[23]), le(he, ge);
691
- let Le, be;
692
- e[24] !== $ ? (Le = () => {
693
- if ($ === 0)
700
+ const q = hn(He.current, () => _e(!0));
701
+ return () => cancelAnimationFrame(q);
702
+ }, be = [z], e[21] = z, e[22] = ge, e[23] = be) : (ge = e[22], be = e[23]), ae(ge, be);
703
+ let Le, ye;
704
+ e[24] !== R ? (Le = () => {
705
+ if (R === 0)
694
706
  return;
695
- const Q = gn(We.current, () => _e(!0));
696
- return () => cancelAnimationFrame(Q);
697
- }, be = [$], e[24] = $, e[25] = Le, e[26] = be) : (Le = e[25], be = e[26]), le(Le, be);
698
- let Ke;
699
- e[27] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Ke = () => {
700
- _e(!0), Gt(We.current);
701
- }, e[27] = Ke) : Ke = e[27];
702
- const lt = Ke;
703
- let se;
704
- e[28] !== n ? (se = (Q) => {
705
- const at = Q === void 0 ? !1 : Q;
706
- ue(n), Ne(Ko);
707
- const Se = Vt(n);
708
- de(Se), Me({}), Ue({}), rt.current?.(Se), at && requestAnimationFrame(() => {
709
- Gt(We.current);
707
+ const q = hn(He.current, () => _e(!0));
708
+ return () => cancelAnimationFrame(q);
709
+ }, ye = [R], e[24] = R, e[25] = Le, e[26] = ye) : (Le = e[25], ye = e[26]), ae(Le, ye);
710
+ let Xe;
711
+ e[27] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Xe = () => {
712
+ _e(!0), Gt(He.current);
713
+ }, e[27] = Xe) : Xe = e[27];
714
+ const ct = Xe;
715
+ let oe;
716
+ e[28] !== n ? (oe = (q) => {
717
+ const ut = q === void 0 ? !1 : q;
718
+ de(n), Ue(Ko);
719
+ const st = Vt(n);
720
+ fe(st), Me({}), je({}), lt.current?.(st), ut && requestAnimationFrame(() => {
721
+ Gt(He.current);
710
722
  });
711
- }, e[28] = n, e[29] = se) : se = e[29];
712
- const Ve = se;
713
- let Z, K, oe;
714
- if (e[30] !== J || e[31] !== E || e[32] !== s || e[33] !== b || e[34] !== N || e[35] !== M || e[36] !== ee) {
715
- K = b ? Fo(b, N, J) : ee.trim();
716
- const Q = $o(b, N, J);
723
+ }, e[28] = n, e[29] = oe) : oe = e[29];
724
+ const Ne = oe;
725
+ let Z, K, re;
726
+ if (e[30] !== J || e[31] !== P || e[32] !== s || e[33] !== x || e[34] !== U || e[35] !== $ || e[36] !== F || e[37] !== ee) {
727
+ K = x ? Fo(x, U, J) : ee.trim();
728
+ const q = $o(x, U, J);
717
729
  Z = {
718
- canInterrupt: M && !b && !!s,
719
- hasQuestionPrompt: !!b,
720
- isDisabled: E || Q,
721
- streaming: M,
730
+ canInterrupt: $ && !x && !!s,
731
+ canSubmit: !F,
732
+ hasQuestionPrompt: !!x,
733
+ isDisabled: P || q,
734
+ streaming: $,
722
735
  text: K
723
- }, oe = ko(Z), e[30] = J, e[31] = E, e[32] = s, e[33] = b, e[34] = N, e[35] = M, e[36] = ee, e[37] = Z, e[38] = K, e[39] = oe;
736
+ }, re = Co(Z), e[30] = J, e[31] = P, e[32] = s, e[33] = x, e[34] = U, e[35] = $, e[36] = F, e[37] = ee, e[38] = Z, e[39] = K, e[40] = re;
724
737
  } else
725
- Z = e[37], K = e[38], oe = e[39];
726
- const te = oe;
727
- let re;
728
- e[40] !== P || e[41] !== J || e[42] !== d || e[43] !== v || e[44] !== b || e[45] !== Ve || e[46] !== K || e[47] !== N ? (re = () => {
738
+ Z = e[38], K = e[39], re = e[40];
739
+ const te = re;
740
+ let ie;
741
+ e[41] !== M || e[42] !== J || e[43] !== d || e[44] !== L || e[45] !== x || e[46] !== Ne || e[47] !== K || e[48] !== U ? (ie = () => {
729
742
  if (!K)
730
743
  return;
731
- const Q = b ? {
732
- answers: Lo(b, N, J)
744
+ const q = x ? {
745
+ answers: Lo(x, U, J)
733
746
  } : void 0;
734
- v(K, P, Q), Ve(!0), d?.();
735
- }, e[40] = P, e[41] = J, e[42] = d, e[43] = v, e[44] = b, e[45] = Ve, e[46] = K, e[47] = N, e[48] = re) : re = e[48];
736
- const ce = re;
737
- let ye;
738
- e[49] !== s || e[50] !== ce ? (ye = (Q) => {
739
- if (Q === "interrupt") {
747
+ L(K, M, q), Ne(!0), d?.();
748
+ }, e[41] = M, e[42] = J, e[43] = d, e[44] = L, e[45] = x, e[46] = Ne, e[47] = K, e[48] = U, e[49] = ie) : ie = e[49];
749
+ const ue = ie;
750
+ let xe;
751
+ e[50] !== s || e[51] !== ue ? (xe = (q) => {
752
+ if (q === "interrupt") {
740
753
  s?.();
741
754
  return;
742
755
  }
743
- Q === "submit" && ce();
744
- }, e[49] = s, e[50] = ce, e[51] = ye) : ye = e[51];
745
- const X = ye;
746
- let Xe;
747
- e[52] !== Z || e[53] !== X ? (Xe = () => X(Co(Z)), e[52] = Z, e[53] = X, e[54] = Xe) : Xe = e[54];
748
- const $e = Xe;
756
+ q === "submit" && ue();
757
+ }, e[50] = s, e[51] = ue, e[52] = xe) : xe = e[52];
758
+ const X = xe;
759
+ let Ge;
760
+ e[53] !== Z || e[54] !== X ? (Ge = () => X(Ao(Z)), e[53] = Z, e[54] = X, e[55] = Ge) : Ge = e[55];
761
+ const $e = Ge;
749
762
  let gt;
750
- e[55] !== te || e[56] !== X ? (gt = () => X(te), e[55] = te, e[56] = X, e[57] = gt) : gt = e[57];
751
- const Et = gt;
763
+ e[56] !== te || e[57] !== X ? (gt = () => X(te), e[56] = te, e[57] = X, e[58] = gt) : gt = e[58];
764
+ const Dt = gt;
752
765
  let bt;
753
- e[58] !== r || e[59] !== i || e[60] !== F ? (bt = _o({
766
+ e[59] !== r || e[60] !== i || e[61] !== D ? (bt = Io({
754
767
  onAttachFiles: r,
755
768
  onAttachText: i,
756
- textAttachmentPasteLineThreshold: F
757
- }), e[58] = r, e[59] = i, e[60] = F, e[61] = bt) : bt = e[61];
758
- const xe = bt;
769
+ textAttachmentPasteLineThreshold: D
770
+ }), e[59] = r, e[60] = i, e[61] = D, e[62] = bt) : bt = e[62];
771
+ const Se = bt;
759
772
  let yt;
760
- e[62] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (yt = (Q, at, Se) => {
761
- const ct = Ae(Q, at);
762
- Me((ut) => {
763
- const Wt = ut[ct] ?? [], fn = Wt.includes(Se);
764
- return Q.multiple ? {
765
- ...ut,
766
- [ct]: fn ? Wt.filter((bs) => bs !== Se) : [...Wt, Se]
767
- } : {
768
- ...ut,
769
- [ct]: fn ? [] : [Se]
770
- };
771
- });
772
- }, e[62] = yt) : yt = e[62];
773
- const hs = yt;
773
+ e[63] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (yt = (q, ut, st) => {
774
+ Me((Wt) => Do(Wt, q, ut, st));
775
+ }, e[63] = yt) : yt = e[63];
776
+ const ms = yt;
774
777
  let xt;
775
- e[63] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (xt = (Q, at, Se) => {
776
- const ct = Ae(Q, at);
777
- Ue((ut) => ({
778
- ...ut,
779
- [ct]: Se
778
+ e[64] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (xt = (q, ut, st) => {
779
+ const Wt = Ae(q, ut);
780
+ je((gs) => ({
781
+ ...gs,
782
+ [Wt]: st
780
783
  }));
781
- }, e[63] = xt) : xt = e[63];
782
- const gs = xt, Dt = O ? "-1px" : void 0, Bt = O ? "0" : void 0, Ft = W ? Ut : j, Lt = W ? 1 : 0, $t = W ? Ut : j;
783
- let Ge;
784
- e[64] !== $t ? (Ge = {
784
+ }, e[64] = xt) : xt = e[64];
785
+ const hs = xt, Et = Q ? "-1px" : void 0, Bt = Q ? "0" : void 0, Ft = We ? Ut : ne, Lt = We ? 1 : 0, $t = We ? Ut : ne;
786
+ let Ye;
787
+ e[65] !== $t ? (Ye = {
785
788
  borderColor: $t,
786
789
  zIndex: 1
787
- }, e[64] = $t, e[65] = Ge) : Ge = e[65];
790
+ }, e[65] = $t, e[66] = Ye) : Ye = e[66];
788
791
  let St;
789
- e[66] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (St = {
792
+ e[67] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (St = {
790
793
  borderColor: Ut,
791
794
  zIndex: 1
792
- }, e[66] = St) : St = e[66];
795
+ }, e[67] = St) : St = e[67];
793
796
  let wt;
794
- e[67] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (wt = () => _e(!1), e[67] = wt) : wt = e[67];
795
- let Ye;
796
- e[68] !== h ? (Ye = h ? /* @__PURE__ */ c(B, { children: h }) : null, e[68] = h, e[69] = Ye) : Ye = e[69];
797
+ e[68] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (wt = () => _e(!1), e[68] = wt) : wt = e[68];
797
798
  let Je;
798
- e[70] !== J || e[71] !== Re || e[72] !== ve || e[73] !== $e || e[74] !== E || e[75] !== _ || e[76] !== p || e[77] !== m || e[78] !== b || e[79] !== q || e[80] !== N ? (Je = b ? /* @__PURE__ */ c(Wo, { questionPrompt: b, selectedOptionsByQuestion: N, customAnswersByQuestion: J, onToggleOption: hs, onCustomAnswerChange: gs }) : /* @__PURE__ */ c(_t, { maxH: "10rem", showHorizontalScrollbar: !1, contentProps: {
799
+ e[69] !== g ? (Je = g ? /* @__PURE__ */ c(B, { children: g }) : null, e[69] = g, e[70] = Je) : Je = e[70];
800
+ let Ze;
801
+ e[71] !== J || e[72] !== Re || e[73] !== ve || e[74] !== $e || e[75] !== P || e[76] !== v || e[77] !== p || e[78] !== h || e[79] !== x || e[80] !== H || e[81] !== U ? (Ze = x ? /* @__PURE__ */ c(Wo, { questionPrompt: x, selectedOptionsByQuestion: U, customAnswersByQuestion: J, onToggleOption: ms, onCustomAnswerChange: hs }) : /* @__PURE__ */ c(_t, { maxH: "10rem", showHorizontalScrollbar: !1, contentProps: {
799
802
  pr: "2xs"
800
- }, children: /* @__PURE__ */ c(Qe, { minH: hn, align: "center", children: /* @__PURE__ */ c(Js, { defaultState: ve, isEditable: !E, placeholder: /* @__PURE__ */ c(Vo, { placeholder: m }), onChange: (Q) => {
801
- de(Q), p?.(Q);
802
- }, onSubmit: $e, references: q, onAddReference: _ }, Re) }) }), e[70] = J, e[71] = Re, e[72] = ve, e[73] = $e, e[74] = E, e[75] = _, e[76] = p, e[77] = m, e[78] = b, e[79] = q, e[80] = N, e[81] = Je) : Je = e[81];
803
+ }, children: /* @__PURE__ */ c(Qe, { minH: mn, align: "center", children: /* @__PURE__ */ c(Ys, { defaultState: ve, isEditable: !P, placeholder: /* @__PURE__ */ c(Vo, { placeholder: h }), onChange: (q) => {
804
+ fe(q), p?.(q);
805
+ }, onSubmit: $e, references: H, onAddReference: v }, Re) }) }), e[71] = J, e[72] = Re, e[73] = ve, e[74] = $e, e[75] = P, e[76] = v, e[77] = p, e[78] = h, e[79] = x, e[80] = H, e[81] = U, e[82] = Ze) : Ze = e[82];
803
806
  let Tt;
804
- e[82] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Tt = /* @__PURE__ */ c(As, {}), e[82] = Tt) : Tt = e[82];
805
- const Ot = te === "interrupt", zt = te === "interrupt" ? "Stop Response" : T ?? "Send message", Qt = M && !b ? void 0 : "Enter", qt = te === "none";
806
- let Ze;
807
- e[83] !== Et || e[84] !== Ot || e[85] !== zt || e[86] !== Qt || e[87] !== qt ? (Ze = /* @__PURE__ */ c(Ho, { canInterrupt: Ot, title: zt, shortcut: Qt, onClick: Et, disabled: qt }), e[83] = Et, e[84] = Ot, e[85] = zt, e[86] = Qt, e[87] = qt, e[88] = Ze) : Ze = e[88];
807
+ e[83] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Tt = /* @__PURE__ */ c(Ts, {}), e[83] = Tt) : Tt = e[83];
808
+ const Ot = te === "interrupt", zt = te === "interrupt" ? "Stop Response" : k ?? "Send message", Qt = $ && !x ? void 0 : "Enter", qt = te === "none";
808
809
  let et;
809
- e[89] !== g || e[90] !== Ze ? (et = /* @__PURE__ */ k(ae, { gap: "1", minH: hn, align: "center", children: [
810
- g,
811
- Tt,
812
- Ze
813
- ] }), e[89] = g, e[90] = Ze, e[91] = et) : et = e[91];
810
+ e[84] !== Dt || e[85] !== Ot || e[86] !== zt || e[87] !== Qt || e[88] !== qt ? (et = /* @__PURE__ */ c(Ho, { canInterrupt: Ot, title: zt, shortcut: Qt, onClick: Dt, disabled: qt }), e[84] = Dt, e[85] = Ot, e[86] = zt, e[87] = Qt, e[88] = qt, e[89] = et) : et = e[89];
814
811
  let tt;
815
- e[92] !== Ye || e[93] !== Je || e[94] !== et ? (tt = /* @__PURE__ */ k(Qe, { direction: "column", color: "fg", gap: "xs", children: [
816
- Ye,
817
- Je,
812
+ e[90] !== b || e[91] !== et ? (tt = /* @__PURE__ */ C(ce, { gap: "1", minH: mn, align: "center", children: [
813
+ b,
814
+ Tt,
818
815
  et
819
- ] }), e[92] = Ye, e[93] = Je, e[94] = et, e[95] = tt) : tt = e[95];
816
+ ] }), e[90] = b, e[91] = et, e[92] = tt) : tt = e[92];
817
+ let nt;
818
+ e[93] !== Je || e[94] !== Ze || e[95] !== tt ? (nt = /* @__PURE__ */ C(Qe, { direction: "column", color: "fg", gap: "xs", children: [
819
+ Je,
820
+ Ze,
821
+ tt
822
+ ] }), e[93] = Je, e[94] = Ze, e[95] = tt, e[96] = nt) : nt = e[96];
820
823
  let At;
821
- return e[96] !== xe.onDragOver || e[97] !== xe.onDropCapture || e[98] !== xe.onPasteCapture || e[99] !== Dt || e[100] !== Bt || e[101] !== Ft || e[102] !== Lt || e[103] !== Ge || e[104] !== tt ? (At = /* @__PURE__ */ c(B, { ref: We, position: "relative", width: "100%", paddingX: "xs", paddingY: "xs", mt: Dt, bg: "bg", borderRadius: "xs", borderTopRadius: Bt, borderWidth: "1px", borderStyle: "solid", borderColor: Ft, zIndex: Lt, transition: "border-color 0.2s ease-in-out", _hover: Ge, _focusWithin: St, onPasteCapture: xe.onPasteCapture, onDropCapture: xe.onDropCapture, onDragOver: xe.onDragOver, onClick: lt, onBlur: wt, children: tt }), e[96] = xe.onDragOver, e[97] = xe.onDropCapture, e[98] = xe.onPasteCapture, e[99] = Dt, e[100] = Bt, e[101] = Ft, e[102] = Lt, e[103] = Ge, e[104] = tt, e[105] = At) : At = e[105], At;
824
+ return e[97] !== Se.onDragOver || e[98] !== Se.onDropCapture || e[99] !== Se.onPasteCapture || e[100] !== Et || e[101] !== Bt || e[102] !== Ft || e[103] !== Lt || e[104] !== Ye || e[105] !== nt ? (At = /* @__PURE__ */ c(B, { ref: He, position: "relative", width: "100%", paddingX: "xs", paddingY: "xs", mt: Et, bg: "bg", borderRadius: "xs", borderTopRadius: Bt, borderWidth: "1px", borderStyle: "solid", borderColor: Ft, zIndex: Lt, transition: "border-color 0.2s ease-in-out", _hover: Ye, _focusWithin: St, onPasteCapture: Se.onPasteCapture, onDropCapture: Se.onDropCapture, onDragOver: Se.onDragOver, onClick: ct, onBlur: wt, children: nt }), e[97] = Se.onDragOver, e[98] = Se.onDropCapture, e[99] = Se.onPasteCapture, e[100] = Et, e[101] = Bt, e[102] = Ft, e[103] = Lt, e[104] = Ye, e[105] = nt, e[106] = At) : At = e[106], At;
822
825
  };
823
826
  function Uo() {
824
827
  }
@@ -835,8 +838,8 @@ const mt = (t) => typeof t == "object" && t !== null && !Array.isArray(t), Xo =
835
838
  } catch {
836
839
  return null;
837
840
  }
838
- }, Go = (t) => mt(t) ? t : typeof t == "string" && t.trim().length > 0 ? Xo(t) : null, ot = (t) => typeof t == "string" && t.trim().length > 0 ? t : null, we = (t) => {
839
- const e = ot(t);
841
+ }, Go = (t) => mt(t) ? t : typeof t == "string" && t.trim().length > 0 ? Xo(t) : null, it = (t) => typeof t == "string" && t.trim().length > 0 ? t : null, we = (t) => {
842
+ const e = it(t);
840
843
  if (e) return e;
841
844
  if (Array.isArray(t)) {
842
845
  const n = t.map(we).filter((o) => o !== null);
@@ -851,25 +854,25 @@ const mt = (t) => typeof t == "object" && t !== null && !Array.isArray(t), Xo =
851
854
  description: void 0
852
855
  };
853
856
  if (!mt(t)) return null;
854
- const e = ot(t.label);
857
+ const e = it(t.label);
855
858
  return e ? {
856
859
  label: e,
857
- description: ot(t.description) ?? void 0
860
+ description: it(t.description) ?? void 0
858
861
  } : null;
859
862
  }, Jo = (t, e) => {
860
863
  if (!mt(t)) return null;
861
- const n = ot(t.question);
864
+ const n = it(t.question);
862
865
  if (!n) return null;
863
- const o = Array.isArray(t.options) ? t.options.map(Yo).filter((i) => i !== null) : [], s = ot(t.type), r = typeof t.custom == "boolean" ? t.custom : typeof t.allowCustomAnswer == "boolean" ? t.allowCustomAnswer : o.length === 0 || s === "freeform" || s === "text";
866
+ const o = Array.isArray(t.options) ? t.options.map(Yo).filter((i) => i !== null) : [], s = it(t.type), r = typeof t.custom == "boolean" ? t.custom : typeof t.allowCustomAnswer == "boolean" ? t.allowCustomAnswer : o.length === 0 || s === "freeform" || s === "text";
864
867
  return {
865
- id: ot(t.id) ?? `question-${e}`,
868
+ id: it(t.id) ?? `question-${e}`,
866
869
  question: n,
867
870
  options: o,
868
871
  multiple: typeof t.multiple == "boolean" ? t.multiple : s === "multi_choice" || s === "multiple_choice",
869
872
  required: typeof t.required == "boolean" ? t.required : !0,
870
873
  allowCustomAnswer: r
871
874
  };
872
- }, Hn = (t) => {
875
+ }, Wn = (t) => {
873
876
  const e = Go(t);
874
877
  if (!e || !Array.isArray(e.questions)) return null;
875
878
  const n = e.questions.map(Jo).filter((o) => o !== null);
@@ -883,10 +886,10 @@ const mt = (t) => typeof t == "object" && t !== null && !Array.isArray(t), Xo =
883
886
  for (let o = n.parts.length - 1; o >= 0; o -= 1) {
884
887
  const s = n.parts[o];
885
888
  if (s.type !== "tool" || !Zo(s)) continue;
886
- return we(s.state?.output) ?? we(s.state?.metadata) ? void 0 : Hn(s.state?.input) ?? void 0;
889
+ return we(s.state?.output) ?? we(s.state?.metadata) ? void 0 : Wn(s.state?.input) ?? void 0;
887
890
  }
888
891
  }
889
- }, tr = (t = "") => JSON.stringify(Zs(t)), Vn = {
892
+ }, tr = (t = "") => JSON.stringify(Js(t)), Hn = {
890
893
  animationName: "message-fade-in",
891
894
  animationDuration: "200ms",
892
895
  animationTimingFunction: "ease-out"
@@ -927,44 +930,44 @@ const mt = (t) => typeof t == "object" && t !== null && !Array.isArray(t), Xo =
927
930
  minute: "2-digit",
928
931
  timeZone: n
929
932
  }).format(new Date(t.createdAt)) : "", Yt = (t) => {
930
- const e = C(20), {
933
+ const e = A(20), {
931
934
  message: n,
932
935
  alwaysVisible: o,
933
936
  copyAlwaysVisible: s
934
- } = t, r = o === void 0 ? !1 : o, i = s === void 0 ? r : s, [l, a] = H(!1), u = Te(null);
937
+ } = t, r = o === void 0 ? !1 : o, i = s === void 0 ? r : s, [l, a] = V(!1), u = Te(null);
935
938
  let d;
936
939
  e[0] !== n ? (d = ir(n), e[0] = n, e[1] = d) : d = e[1];
937
940
  const f = d;
938
- let p;
939
- e[2] !== n ? (p = lr(n), e[2] = n, e[3] = p) : p = e[3];
940
- const m = p;
941
+ let m;
942
+ e[2] !== n ? (m = lr(n), e[2] = n, e[3] = m) : m = e[3];
943
+ const p = m;
941
944
  let h, g;
942
945
  e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = () => () => {
943
946
  u.current !== null && window.clearTimeout(u.current);
944
- }, g = [], e[4] = h, e[5] = g) : (h = e[4], g = e[5]), le(h, g);
945
- let y;
946
- e[6] !== f ? (y = async () => {
947
+ }, g = [], e[4] = h, e[5] = g) : (h = e[4], g = e[5]), ae(h, g);
948
+ let b;
949
+ e[6] !== f ? (b = async () => {
947
950
  if (f)
948
951
  try {
949
952
  await navigator.clipboard.writeText(f), a(!0), u.current !== null && window.clearTimeout(u.current), u.current = window.setTimeout(() => a(!1), 1200);
950
953
  } catch {
951
954
  a(!1);
952
955
  }
953
- }, e[6] = f, e[7] = y) : y = e[7];
954
- const x = y;
955
- if (!f && !m)
956
+ }, e[6] = f, e[7] = b) : b = e[7];
957
+ const y = b;
958
+ if (!f && !p)
956
959
  return null;
957
- const b = r ? "1" : "0", S = r ? "auto" : "none";
958
- let w;
959
- e[8] !== m ? (w = m ? /* @__PURE__ */ c(U, { textStyle: "label/XS/regular", color: "fg.muted", children: m }) : null, e[8] = m, e[9] = w) : w = e[9];
960
+ const w = r ? "1" : "0", x = r ? "auto" : "none";
961
+ let S;
962
+ e[8] !== p ? (S = p ? /* @__PURE__ */ c(j, { textStyle: "label/XS/regular", color: "fg.muted", children: p }) : null, e[8] = p, e[9] = S) : S = e[9];
960
963
  let T;
961
- e[10] !== i || e[11] !== x || e[12] !== f || e[13] !== l ? (T = f ? /* @__PURE__ */ c(B, { opacity: i ? "1" : "0", pointerEvents: i ? "auto" : "none", transition: "opacity 120ms ease", css: bn, children: /* @__PURE__ */ c(sn, { content: l ? "Copied" : "Copy message", children: /* @__PURE__ */ c(nt, { "aria-label": l ? "Copied" : "Copy message", variant: "ghost", size: "2xs", onClick: x, children: l ? /* @__PURE__ */ c(Dn, { size: 12 }) : /* @__PURE__ */ c(Es, { size: 12 }) }) }) }) : null, e[10] = i, e[11] = x, e[12] = f, e[13] = l, e[14] = T) : T = e[14];
962
- let A;
963
- return e[15] !== T || e[16] !== b || e[17] !== S || e[18] !== w ? (A = /* @__PURE__ */ k(ae, { "data-chat-message-action-panel": "true", gap: "2xs", minH: "6", opacity: b, pointerEvents: S, transition: "opacity 120ms ease", css: bn, children: [
964
- w,
964
+ e[10] !== i || e[11] !== y || e[12] !== f || e[13] !== l ? (T = f ? /* @__PURE__ */ c(B, { opacity: i ? "1" : "0", pointerEvents: i ? "auto" : "none", transition: "opacity 120ms ease", css: gn, children: /* @__PURE__ */ c(sn, { content: l ? "Copied" : "Copy message", children: /* @__PURE__ */ c(ot, { "aria-label": l ? "Copied" : "Copy message", variant: "ghost", size: "2xs", onClick: y, children: l ? /* @__PURE__ */ c(Dn, { size: 12 }) : /* @__PURE__ */ c(Ps, { size: 12 }) }) }) }) : null, e[10] = i, e[11] = y, e[12] = f, e[13] = l, e[14] = T) : T = e[14];
965
+ let k;
966
+ return e[15] !== T || e[16] !== w || e[17] !== x || e[18] !== S ? (k = /* @__PURE__ */ C(ce, { "data-chat-message-action-panel": "true", gap: "2xs", minH: "6", opacity: w, pointerEvents: x, transition: "opacity 120ms ease", css: gn, children: [
967
+ S,
965
968
  T
966
- ] }), e[15] = T, e[16] = b, e[17] = S, e[18] = w, e[19] = A) : A = e[19], A;
967
- }, bn = {
969
+ ] }), e[15] = T, e[16] = w, e[17] = x, e[18] = S, e[19] = k) : k = e[19], k;
970
+ }, gn = {
968
971
  "[data-chat-message-with-actions]:hover &, [data-chat-message-with-actions]:focus-within &": {
969
972
  opacity: 1,
970
973
  pointerEvents: "auto"
@@ -978,41 +981,41 @@ const mt = (t) => typeof t == "object" && t !== null && !Array.isArray(t), Xo =
978
981
  pointerEvents: "auto"
979
982
  }
980
983
  }, ar = (t) => {
981
- const e = C(8);
984
+ const e = A(8);
982
985
  let n, o;
983
986
  e[0] !== t ? ({
984
987
  children: n,
985
988
  ...o
986
989
  } = t, e[0] = t, e[1] = n, e[2] = o) : (n = e[1], o = e[2]);
987
990
  let s;
988
- e[3] !== n ? (s = /* @__PURE__ */ c(On, { defaultState: n, fullWidth: !0 }), e[3] = n, e[4] = s) : s = e[4];
991
+ e[3] !== n ? (s = /* @__PURE__ */ c($n, { defaultState: n, fullWidth: !0 }), e[3] = n, e[4] = s) : s = e[4];
989
992
  let r;
990
993
  return e[5] !== o || e[6] !== s ? (r = /* @__PURE__ */ c(B, { ...o, children: s }), e[5] = o, e[6] = s, e[7] = r) : r = e[7], r;
991
994
  }, cr = ar, vt = (t) => t.replace(/^tool-/i, "").replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[\s-]+/g, "_").toLowerCase(), ur = (t) => {
992
995
  const e = vt(t), n = e.replace(/_/g, "");
993
996
  return [.../* @__PURE__ */ new Set([t, e, n])];
994
- }, Nn = {
995
- shell: Fn,
996
- ls: zs,
997
- read_file: Os,
998
- write_file: $s,
999
- delete_file: Bn,
1000
- patch: Ls,
1001
- upload_files: Fs,
1002
- download_file: Bs,
997
+ }, Vn = {
998
+ shell: Bn,
999
+ ls: Os,
1000
+ read_file: $s,
1001
+ write_file: Ls,
1002
+ delete_file: En,
1003
+ patch: Fs,
1004
+ upload_files: Bs,
1005
+ download_file: Es,
1003
1006
  move_file: Ds
1004
1007
  }, dr = {
1005
- dot: Ns,
1006
- danger: Ln,
1007
- search: Vs,
1008
- browser: Hs,
1009
- file: Ws,
1010
- question: qs,
1011
- todo: Qs,
1012
- terminal: Fn,
1013
- ...Nn
1014
- }, yn = "dot", fr = (t) => Object.hasOwn(Nn, t), pr = (t) => dr[t], Un = (t) => {
1015
- if (!t) return yn;
1008
+ dot: Vs,
1009
+ danger: Fn,
1010
+ search: Hs,
1011
+ browser: Ws,
1012
+ file: qs,
1013
+ question: Qs,
1014
+ todo: zs,
1015
+ terminal: Bn,
1016
+ ...Vn
1017
+ }, bn = "dot", fr = (t) => Object.hasOwn(Vn, t), pr = (t) => dr[t], Nn = (t) => {
1018
+ if (!t) return bn;
1016
1019
  const e = vt(t);
1017
1020
  if (fr(e)) return e;
1018
1021
  const n = e.replace(/_/g, "");
@@ -1041,7 +1044,7 @@ const mt = (t) => typeof t == "object" && t !== null && !Array.isArray(t), Xo =
1041
1044
  case "file":
1042
1045
  return "file";
1043
1046
  default:
1044
- return n === "todowrite" || n === "todo" ? "todo" : yn;
1047
+ return n === "todowrite" || n === "todo" ? "todo" : bn;
1045
1048
  }
1046
1049
  };
1047
1050
  function ln(t) {
@@ -1086,7 +1089,7 @@ const Rt = (t) => t.startsWith("--- "), an = (t) => t.startsWith("+++ "), cn = (
1086
1089
  inHunk: !0
1087
1090
  } : e.inHunk ? mr(t) ? (br(n, e.currentPath), e) : (hr(t) && yr(n, e.currentPath), e) : e : e;
1088
1091
  };
1089
- function jn(t) {
1092
+ function Un(t) {
1090
1093
  if (!t || typeof t != "string") return [];
1091
1094
  const e = /* @__PURE__ */ new Map();
1092
1095
  let n = {
@@ -1107,7 +1110,7 @@ function jn(t) {
1107
1110
  }));
1108
1111
  }
1109
1112
  function Sr(t) {
1110
- return jn(t).map((e) => ({
1113
+ return Un(t).map((e) => ({
1111
1114
  kind: "diff",
1112
1115
  fileName: ln(e.filePath),
1113
1116
  filePath: e.filePath,
@@ -1116,9 +1119,9 @@ function Sr(t) {
1116
1119
  }));
1117
1120
  }
1118
1121
  function wr(t) {
1119
- return jn(t).map((e) => e.filePath);
1122
+ return Un(t).map((e) => e.filePath);
1120
1123
  }
1121
- const Kn = (t) => Rt(t) || t.startsWith("diff --git "), Tr = (t) => t.startsWith(" ") || t.startsWith("+") || t.startsWith("-") ? !1 : t.trim() !== "", Ar = (t, e, n) => {
1124
+ const jn = (t) => Rt(t) || t.startsWith("diff --git "), Tr = (t) => t.startsWith(" ") || t.startsWith("+") || t.startsWith("-") ? !1 : t.trim() !== "", Ar = (t, e, n) => {
1122
1125
  if (t.startsWith(" ")) {
1123
1126
  const o = t.slice(1);
1124
1127
  e.push(o), n.push(o);
@@ -1133,7 +1136,7 @@ const Kn = (t) => Rt(t) || t.startsWith("diff --git "), Tr = (t) => t.startsWith
1133
1136
  let s = e;
1134
1137
  for (; s < t.length; ) {
1135
1138
  const r = t[s] || "";
1136
- if (Kn(r) || cn(r) || Tr(r))
1139
+ if (jn(r) || cn(r) || Tr(r))
1137
1140
  break;
1138
1141
  Ar(r, n, o), s += 1;
1139
1142
  }
@@ -1147,7 +1150,7 @@ const Kn = (t) => Rt(t) || t.startsWith("diff --git "), Tr = (t) => t.startsWith
1147
1150
  let a = e + 2;
1148
1151
  for (; a < t.length; ) {
1149
1152
  const u = t[a] || "";
1150
- if (Kn(u)) break;
1153
+ if (jn(u)) break;
1151
1154
  if (!cn(u)) {
1152
1155
  a += 1;
1153
1156
  continue;
@@ -1192,30 +1195,30 @@ const _r = {
1192
1195
  read: "Read file",
1193
1196
  skill: "Load skill",
1194
1197
  todowrite: "Update todos"
1195
- }, xn = {
1198
+ }, yn = {
1196
1199
  error: "failed",
1197
1200
  "output-error": "failed",
1198
1201
  input_streaming: "running",
1199
1202
  running: "running",
1200
1203
  completed: "completed",
1201
1204
  failed: "failed"
1202
- }, Xn = (t) => t.replace(/^tool-/, "").toLowerCase(), vr = (t) => t.split(" ").filter((e) => e.length > 0).map((e) => e[0].toUpperCase() + e.slice(1)).join(" "), Rr = (t) => Xn(t.tool ?? "tool"), Mr = (t) => {
1203
- const e = Xn(t);
1205
+ }, Kn = (t) => t.replace(/^tool-/, "").toLowerCase(), vr = (t) => t.split(" ").filter((e) => e.length > 0).map((e) => e[0].toUpperCase() + e.slice(1)).join(" "), Rr = (t) => Kn(t.tool ?? "tool"), Mr = (t) => {
1206
+ const e = Kn(t);
1204
1207
  return _r[e] ?? vr(e.replace(/_/g, " "));
1205
1208
  }, Pr = (t) => {
1206
1209
  const e = t.state?.status ?? t.status;
1207
1210
  if (!e || typeof e != "string") return null;
1208
1211
  const n = e.replace(/-/g, "_");
1209
- return xn[n] ? xn[n] : n.includes("stream") ? "running" : null;
1210
- }, Gn = (t) => {
1212
+ return yn[n] ? yn[n] : n.includes("stream") ? "running" : null;
1213
+ }, Xn = (t) => {
1211
1214
  const e = t.state?.status ?? t.status;
1212
1215
  return e === "error" || e === "output-error" || e === "failed";
1213
- }, Ce = (t) => Gn(t) ? {
1216
+ }, Ce = (t) => Xn(t) ? {
1214
1217
  type: "icon",
1215
1218
  icon: "danger"
1216
1219
  } : {
1217
1220
  type: "icon",
1218
- icon: Un(Rr(t))
1221
+ icon: Nn(Rr(t))
1219
1222
  }, ke = (t, e, n, o) => {
1220
1223
  const r = [{
1221
1224
  kind: "text",
@@ -1243,27 +1246,27 @@ const _r = {
1243
1246
  }, ht = (t) => {
1244
1247
  const e = t.state?.output;
1245
1248
  return !e || typeof e != "object" || Array.isArray(e) ? null : e;
1246
- }, I = (t) => typeof t == "string" && t.trim().length > 0 ? t : null, pt = (t) => !t || typeof t != "object" || Array.isArray(t) ? null : t, Er = (t, e) => {
1249
+ }, _ = (t) => typeof t == "string" && t.trim().length > 0 ? t : null, pt = (t) => !t || typeof t != "object" || Array.isArray(t) ? null : t, Dr = (t, e) => {
1247
1250
  const n = pt(t.state);
1248
1251
  return n ? pt(n[e]) : null;
1249
- }, Yn = (t) => t.replace(/\\/g, "/").replace(/^\/+/, ""), Dr = (t) => t.includes("--- ") && t.includes("+++ ") && t.includes("@@"), Jn = (t) => {
1252
+ }, Gn = (t) => t.replace(/\\/g, "/").replace(/^\/+/, ""), Er = (t) => t.includes("--- ") && t.includes("+++ ") && t.includes("@@"), Yn = (t) => {
1250
1253
  const e = ht(t);
1251
- return [Er(t, "metadata"), pt(e?.metadata)].filter(Boolean);
1254
+ return [Dr(t, "metadata"), pt(e?.metadata)].filter(Boolean);
1252
1255
  }, Br = (t) => {
1253
1256
  const e = pt(t);
1254
1257
  if (!e) return null;
1255
- const n = I(e.filePath) ?? I(e.relativePath) ?? I(e.path);
1258
+ const n = _(e.filePath) ?? _(e.relativePath) ?? _(e.path);
1256
1259
  return n ? {
1257
- filePath: Yn(n),
1260
+ filePath: Gn(n),
1258
1261
  additions: typeof e.additions == "number" ? e.additions : 0,
1259
1262
  deletions: typeof e.deletions == "number" ? e.deletions : 0,
1260
- diff: I(e.diff) ?? void 0,
1261
- before: I(e.before) ?? void 0,
1262
- after: I(e.after) ?? void 0
1263
+ diff: _(e.diff) ?? void 0,
1264
+ before: _(e.before) ?? void 0,
1265
+ after: _(e.after) ?? void 0
1263
1266
  } : null;
1264
- }, Zn = (t) => {
1267
+ }, Jn = (t) => {
1265
1268
  const e = [];
1266
- for (const n of Jn(t)) {
1269
+ for (const n of Yn(t)) {
1267
1270
  const o = Array.isArray(n.files) ? n.files : [];
1268
1271
  for (const s of o) {
1269
1272
  const r = Br(s);
@@ -1272,20 +1275,20 @@ const _r = {
1272
1275
  }
1273
1276
  return e;
1274
1277
  }, Fr = (t) => {
1275
- const e = qe(t), o = (Array.isArray(e?.changes) ? e.changes : []).map((s) => I(pt(s)?.path)).filter((s) => !!s).map(Yn);
1278
+ const e = qe(t), o = (Array.isArray(e?.changes) ? e.changes : []).map((s) => _(pt(s)?.path)).filter((s) => !!s).map(Gn);
1276
1279
  return Array.from(new Set(o));
1277
1280
  }, Lr = (t) => {
1278
- const e = qe(t), n = I(e?.diff);
1281
+ const e = qe(t), n = _(e?.diff);
1279
1282
  if (n) return n;
1280
- for (const r of Jn(t)) {
1281
- const i = I(r.diff);
1283
+ for (const r of Yn(t)) {
1284
+ const i = _(r.diff);
1282
1285
  if (i) return i;
1283
1286
  }
1284
- const o = Zn(t).map((r) => r.diff).filter((r) => !!r);
1287
+ const o = Jn(t).map((r) => r.diff).filter((r) => !!r);
1285
1288
  if (o.length > 0) return o.join(`
1286
1289
  `);
1287
- const s = I(e?.patchText);
1288
- return s && Dr(s) ? s : null;
1290
+ const s = _(e?.patchText);
1291
+ return s && Er(s) ? s : null;
1289
1292
  }, $r = (t) => {
1290
1293
  const e = /* @__PURE__ */ new Set(), n = [];
1291
1294
  for (const o of t)
@@ -1299,16 +1302,16 @@ const _r = {
1299
1302
  return n;
1300
1303
  }, Or = (t) => Array.from(new Set(t.map((e) => e.filePath))), Mt = (t) => {
1301
1304
  const e = ht(t);
1302
- return I(t.state?.output) ?? I(e?.returnDisplay) ?? I(e?.preview) ?? I(e?.stdout) ?? I(e?.content);
1305
+ return _(t.state?.output) ?? _(e?.returnDisplay) ?? _(e?.preview) ?? _(e?.stdout) ?? _(e?.content);
1303
1306
  }, zr = (t) => {
1304
1307
  const e = t.match(/<skill_content(?:\s+name="([^"]+)")?>([\s\S]*?)<\/skill_content>/);
1305
1308
  return e ? {
1306
- skillName: I(e[1]) ?? void 0,
1307
- content: I(e[2]) ?? ""
1309
+ skillName: _(e[1]) ?? void 0,
1310
+ content: _(e[2]) ?? ""
1308
1311
  } : null;
1309
1312
  }, Qr = (t) => {
1310
1313
  const e = qe(t);
1311
- return I(e?.name) ?? I(e?.skillName) ?? I(e?.skill) ?? I(e?.skill_name) ?? void 0;
1314
+ return _(e?.name) ?? _(e?.skillName) ?? _(e?.skill) ?? _(e?.skill_name) ?? void 0;
1312
1315
  }, un = (t, e) => ({
1313
1316
  kind: "link",
1314
1317
  text: ln(t),
@@ -1316,19 +1319,19 @@ const _r = {
1316
1319
  ...e ? {
1317
1320
  variant: e
1318
1321
  } : {}
1319
- }), Ie = (t, e) => !Gn(t) || !t.state?.errorText ? e : [{
1322
+ }), Ie = (t, e) => !Xn(t) || !t.state?.errorText ? e : [{
1320
1323
  type: "comment",
1321
1324
  text: t.state.errorText
1322
- }, ...e], es = (t) => Ir(t ?? void 0).map((e) => ({
1325
+ }, ...e], Zn = (t) => Ir(t ?? void 0).map((e) => ({
1323
1326
  type: "diff",
1324
1327
  language: "diff",
1325
1328
  original: e.original,
1326
1329
  modified: e.modified,
1327
1330
  sideBySide: !1
1328
1331
  })), qr = (t) => Sr(t ?? void 0), Wr = (t) => wr(t ?? void 0), Hr = (t) => {
1329
- const e = Lr(t), n = Zn(t), o = Fr(t), s = ke(t, void 0, "Apply patch"), r = qr(e);
1332
+ const e = Lr(t), n = Jn(t), o = Fr(t), s = ke(t, void 0, "Apply patch"), r = qr(e);
1330
1333
  r.length > 0 ? s.push(...r) : n.length > 0 ? s.push(...$r(n)) : s.push(...o.map((l) => un(l, "bubble")));
1331
- const i = [...es(e)];
1334
+ const i = [...Zn(e)];
1332
1335
  if (i.length === 0)
1333
1336
  for (const l of n)
1334
1337
  !l.before && !l.after || i.push({
@@ -1357,9 +1360,9 @@ const _r = {
1357
1360
  modified: e,
1358
1361
  sideBySide: !1
1359
1362
  }], Nr = (t) => {
1360
- const e = qe(t), n = ht(t), o = I(e?.filePath) ?? I(e?.file_path) ?? I(n?.filePath) ?? void 0, s = I(n?.oldString) ?? I(e?.old_string) ?? void 0, r = I(n?.newString) ?? I(e?.new_string) ?? void 0, i = ke(t, void 0, "Edit file");
1363
+ const e = qe(t), n = ht(t), o = _(e?.filePath) ?? _(e?.file_path) ?? _(n?.filePath) ?? void 0, s = _(n?.oldString) ?? _(e?.old_string) ?? void 0, r = _(n?.newString) ?? _(e?.new_string) ?? void 0, i = ke(t, void 0, "Edit file");
1361
1364
  o && i.push(un(o));
1362
- const l = s !== void 0 && r !== void 0 ? Vr(s, r) : es(I(n?.diff));
1365
+ const l = s !== void 0 && r !== void 0 ? Vr(s, r) : Zn(_(n?.diff));
1363
1366
  return {
1364
1367
  indicator: Ce(t),
1365
1368
  title: i,
@@ -1372,7 +1375,7 @@ const _r = {
1372
1375
  prependErrorBlock: o
1373
1376
  } = t;
1374
1377
  return (s) => {
1375
- const r = we(s.state?.output) ?? we(s.state?.metadata), i = Hn(s.state?.input), l = i ? {
1378
+ const r = we(s.state?.output) ?? we(s.state?.metadata), i = Wn(s.state?.input), l = i ? {
1376
1379
  type: "question-form",
1377
1380
  questions: i.questions
1378
1381
  } : null;
@@ -1386,20 +1389,20 @@ const _r = {
1386
1389
  };
1387
1390
  };
1388
1391
  }, jr = (t) => {
1389
- const e = qe(t), n = ht(t), o = I(e?.filePath) ?? I(e?.file_path) ?? I(e?.file) ?? I(n?.filePath) ?? I(n?.file) ?? I(n?.path) ?? void 0, s = ke(t, void 0, "Read file");
1392
+ const e = qe(t), n = ht(t), o = _(e?.filePath) ?? _(e?.file_path) ?? _(e?.file) ?? _(n?.filePath) ?? _(n?.file) ?? _(n?.path) ?? void 0, s = ke(t, void 0, "Read file");
1390
1393
  return o && s.push(un(o)), {
1391
1394
  indicator: Ce(t),
1392
1395
  title: s,
1393
1396
  blocks: Ie(t, [])
1394
1397
  };
1395
- }, ts = (t, e) => {
1396
- const n = qe(t), o = ht(t), s = I(n?.command) ?? void 0, r = ke(t, s, e, "monospace"), i = [], l = Mt(t);
1398
+ }, es = (t, e) => {
1399
+ const n = qe(t), o = ht(t), s = _(n?.command) ?? void 0, r = ke(t, s, e, "monospace"), i = [], l = Mt(t);
1397
1400
  l && i.push({
1398
1401
  type: "code",
1399
1402
  language: "text",
1400
1403
  code: l
1401
1404
  });
1402
- const a = I(o?.stderr);
1405
+ const a = _(o?.stderr);
1403
1406
  return a && a !== l && i.push({
1404
1407
  type: "code",
1405
1408
  language: "text",
@@ -1412,8 +1415,8 @@ const _r = {
1412
1415
  title: r,
1413
1416
  blocks: Ie(t, i)
1414
1417
  };
1415
- }, Kr = (t) => ts(t, "Run command"), Xr = (t) => ts(t, "Shell"), Gr = (t) => {
1416
- const e = qe(t), n = Mt(t), o = I(e?.pattern) ?? void 0, s = ke(t, o, "Search files"), r = n ? [{
1418
+ }, Kr = (t) => es(t, "Run command"), Xr = (t) => es(t, "Shell"), Gr = (t) => {
1419
+ const e = qe(t), n = Mt(t), o = _(e?.pattern) ?? void 0, s = ke(t, o, "Search files"), r = n ? [{
1417
1420
  type: "code",
1418
1421
  language: "text",
1419
1422
  code: n
@@ -1424,7 +1427,7 @@ const _r = {
1424
1427
  blocks: Ie(t, r)
1425
1428
  };
1426
1429
  }, Yr = (t) => {
1427
- const e = qe(t), n = Mt(t), o = I(e?.pattern) ?? void 0, s = ke(t, o, "Find files"), r = [];
1430
+ const e = qe(t), n = Mt(t), o = _(e?.pattern) ?? void 0, s = ke(t, o, "Find files"), r = [];
1428
1431
  if (n) {
1429
1432
  const i = n.split(/\r?\n/).map((l) => l.trim()).filter((l) => l.length > 0);
1430
1433
  i.length > 0 && r.push({
@@ -1448,8 +1451,8 @@ const _r = {
1448
1451
  title: s,
1449
1452
  blocks: Ie(t, i)
1450
1453
  };
1451
- }, jt = (t) => typeof t == "string" && t.trim().length > 0 ? t : null, ns = (t) => !t || typeof t != "object" || Array.isArray(t) ? null : t, Zr = (t) => {
1452
- const e = ns(t);
1454
+ }, jt = (t) => typeof t == "string" && t.trim().length > 0 ? t : null, ts = (t) => !t || typeof t != "object" || Array.isArray(t) ? null : t, Zr = (t) => {
1455
+ const e = ts(t);
1453
1456
  if (!e) return null;
1454
1457
  const n = jt(e.content) ?? jt(e.title);
1455
1458
  if (!n) return null;
@@ -1458,14 +1461,14 @@ const _r = {
1458
1461
  label: n,
1459
1462
  checked: o === "completed"
1460
1463
  };
1461
- }, Sn = (t) => {
1464
+ }, xn = (t) => {
1462
1465
  if (!t) return {
1463
1466
  items: [],
1464
1467
  explicit: !1
1465
1468
  };
1466
1469
  const e = (() => {
1467
1470
  if (Array.isArray(t)) return t;
1468
- const n = ns(t);
1471
+ const n = ts(t);
1469
1472
  return !n || !Array.isArray(n.todos) ? null : n.todos;
1470
1473
  })();
1471
1474
  return e ? {
@@ -1482,7 +1485,7 @@ const _r = {
1482
1485
  prependErrorBlock: o
1483
1486
  } = t;
1484
1487
  return (s) => {
1485
- const r = Sn(s.state?.input), i = Sn(s.state?.output), l = i.explicit ? i : r;
1488
+ const r = xn(s.state?.input), i = xn(s.state?.output), l = i.explicit ? i : r;
1486
1489
  if (!l.explicit) return null;
1487
1490
  const a = l.items, u = `${a.length} item${a.length === 1 ? "" : "s"}`, d = e(s, u, "Update todos");
1488
1491
  if (a.length === 0)
@@ -1508,11 +1511,11 @@ const _r = {
1508
1511
  buildBaseTitle: ke,
1509
1512
  buildIndicator: Ce,
1510
1513
  prependErrorBlock: Ie
1511
- }), wn = ei({
1514
+ }), Sn = ei({
1512
1515
  buildBaseTitle: ke,
1513
1516
  buildIndicator: Ce,
1514
1517
  prependErrorBlock: Ie
1515
- }), Tn = () => ({
1518
+ }), wn = () => ({
1516
1519
  apply_patch: Hr,
1517
1520
  bash: Kr,
1518
1521
  edit: Nr,
@@ -1522,22 +1525,22 @@ const _r = {
1522
1525
  read: jr,
1523
1526
  shell: Xr,
1524
1527
  skill: Jr,
1525
- todo_write: wn,
1526
- todowrite: wn
1527
- }), An = {
1528
+ todo_write: Sn,
1529
+ todowrite: Sn
1530
+ }), Tn = {
1528
1531
  error: "failed",
1529
1532
  "output-error": "failed",
1530
1533
  "input-streaming": "running"
1531
- }, ni = (t) => t.split(" ").filter((e) => e.length > 0).map((e) => e[0].toUpperCase() + e.slice(1)).join(" "), ss = (t) => {
1534
+ }, ni = (t) => t.split(" ").filter((e) => e.length > 0).map((e) => e[0].toUpperCase() + e.slice(1)).join(" "), ns = (t) => {
1532
1535
  const e = vt(t ?? "tool").replace(/_/g, " ");
1533
1536
  return ni(e);
1534
- }, os = (t) => t === "error" || t === "output-error", si = (t) => os(t.state?.status) ? {
1537
+ }, ss = (t) => t === "error" || t === "output-error", si = (t) => ss(t.state?.status) ? {
1535
1538
  type: "icon",
1536
1539
  icon: "danger"
1537
1540
  } : {
1538
1541
  type: "icon",
1539
- icon: Un(t.tool ?? "tool")
1540
- }, oi = (t) => !t || typeof t != "string" ? null : An[t] ? An[t] : t.includes("stream") ? "running" : null, ri = (t) => {
1542
+ icon: Nn(t.tool ?? "tool")
1543
+ }, oi = (t) => !t || typeof t != "string" ? null : Tn[t] ? Tn[t] : t.includes("stream") ? "running" : null, ri = (t) => {
1541
1544
  if (typeof t == "string") return t;
1542
1545
  if (t == null) return null;
1543
1546
  try {
@@ -1545,26 +1548,26 @@ const _r = {
1545
1548
  } catch {
1546
1549
  return null;
1547
1550
  }
1548
- }, Jt = (t) => t == null ? !0 : typeof t == "string" ? t.trim().length === 0 : Array.isArray(t) ? t.length === 0 || t.every(Jt) : typeof t == "object" ? Object.values(t).every(Jt) : !1, Pt = (t) => !t || typeof t != "object" || Array.isArray(t) ? null : t, V = (t) => typeof t == "string" && t.trim().length > 0 ? t : null, ii = (t) => V(t.mime_type) ?? V(t.mediaType) ?? V(t.mimeType), Cn = (t) => !!t?.startsWith("image/"), li = /\.(avif|bmp|gif|jpe?g|png|svg|webp)(\?.*)?$/i, rs = (t, e) => {
1551
+ }, Jt = (t) => t == null ? !0 : typeof t == "string" ? t.trim().length === 0 : Array.isArray(t) ? t.length === 0 || t.every(Jt) : typeof t == "object" ? Object.values(t).every(Jt) : !1, Pt = (t) => !t || typeof t != "object" || Array.isArray(t) ? null : t, N = (t) => typeof t == "string" && t.trim().length > 0 ? t : null, ii = (t) => N(t.mime_type) ?? N(t.mediaType) ?? N(t.mimeType), An = (t) => !!t?.startsWith("image/"), li = /\.(avif|bmp|gif|jpe?g|png|svg|webp)(\?.*)?$/i, os = (t, e) => {
1549
1552
  const n = Pt(t);
1550
1553
  if (!n) return null;
1551
- const o = ii(n), s = V(n.data);
1552
- if (s && Cn(o))
1554
+ const o = ii(n), s = N(n.data);
1555
+ if (s && An(o))
1553
1556
  return {
1554
1557
  type: "image",
1555
1558
  src: `data:${o};base64,${s}`,
1556
1559
  alt: e
1557
1560
  };
1558
- const r = V(n.url) ?? V(n.src);
1559
- return r && (Cn(o) || li.test(r)) ? {
1561
+ const r = N(n.url) ?? N(n.src);
1562
+ return r && (An(o) || li.test(r)) ? {
1560
1563
  type: "image",
1561
1564
  src: r,
1562
1565
  alt: e
1563
1566
  } : null;
1564
- }, is = (t) => {
1567
+ }, rs = (t) => {
1565
1568
  const e = Pt(t);
1566
1569
  if (!e) return null;
1567
- const n = V(e.path) ?? V(e.filePath) ?? V(e.filename), o = V(e.content) ?? V(e.body) ?? V(e.text);
1570
+ const n = N(e.path) ?? N(e.filePath) ?? N(e.filename), o = N(e.content) ?? N(e.body) ?? N(e.text);
1568
1571
  return !n || o === null ? null : {
1569
1572
  filePath: n,
1570
1573
  content: o
@@ -1584,20 +1587,20 @@ const _r = {
1584
1587
  }, ci = (t) => {
1585
1588
  const e = t.split(".").pop()?.toLowerCase();
1586
1589
  return e ? ai[e] ?? e : "text";
1587
- }, kn = (t, e) => e.length === 0 ? [] : [{
1590
+ }, Cn = (t, e) => e.length === 0 ? [] : [{
1588
1591
  type: "text",
1589
1592
  text: t
1590
1593
  }, ...e], ui = (t, e) => {
1591
1594
  const n = [];
1592
1595
  for (const o of t) {
1593
- const s = Pt(o), r = V(s?.type);
1596
+ const s = Pt(o), r = N(s?.type);
1594
1597
  if (r === "image") {
1595
- const i = rs(o, e);
1598
+ const i = os(o, e);
1596
1599
  i && n.push(i);
1597
1600
  continue;
1598
1601
  }
1599
1602
  if (r === "text") {
1600
- const i = V(s?.text);
1603
+ const i = N(s?.text);
1601
1604
  i && n.push({
1602
1605
  type: "text",
1603
1606
  text: i
@@ -1608,21 +1611,21 @@ const _r = {
1608
1611
  }
1609
1612
  return n;
1610
1613
  }, di = (t) => {
1611
- const e = is(t);
1614
+ const e = rs(t);
1612
1615
  return e ? [{
1613
1616
  type: "code",
1614
1617
  language: ci(e.filePath),
1615
1618
  code: e.content
1616
1619
  }] : null;
1617
1620
  }, fi = (t) => {
1618
- const e = Pt(t), n = V(e?.attachment_name) ?? V(e?.attachmentName), o = V(e?.attachment_file_id) ?? V(e?.attachmentFileId);
1621
+ const e = Pt(t), n = N(e?.attachment_name) ?? N(e?.attachmentName), o = N(e?.attachment_file_id) ?? N(e?.attachmentFileId);
1619
1622
  return !n && !o ? null : [{
1620
1623
  type: "text",
1621
1624
  text: n ?? `Attachment ${o}`
1622
1625
  }];
1623
1626
  }, Zt = (t, e) => {
1624
1627
  if (Jt(t)) return [];
1625
- const n = rs(t, e);
1628
+ const n = os(t, e);
1626
1629
  if (n) return [n];
1627
1630
  if (Array.isArray(t)) return ui(t, e);
1628
1631
  const o = di(t);
@@ -1636,17 +1639,17 @@ const _r = {
1636
1639
  code: r
1637
1640
  }] : [];
1638
1641
  }, pi = (t) => {
1639
- const e = [], n = ss(t.tool);
1640
- return os(t.state?.status) && t.state?.errorText && e.push({
1642
+ const e = [], n = ns(t.tool);
1643
+ return ss(t.state?.status) && t.state?.errorText && e.push({
1641
1644
  type: "comment",
1642
1645
  text: t.state.errorText
1643
- }), e.push(...kn("Input", Zt(t.state?.input, `${n} input`))), e.push(...kn("Output", Zt(t.state?.output, `${n} output`))), e;
1646
+ }), e.push(...Cn("Input", Zt(t.state?.input, `${n} input`))), e.push(...Cn("Output", Zt(t.state?.output, `${n} output`))), e;
1644
1647
  }, mi = (t) => {
1645
1648
  const e = [{
1646
1649
  kind: "text",
1647
- text: ss(t.tool),
1650
+ text: ns(t.tool),
1648
1651
  bold: !0
1649
- }], n = is(t.state?.output);
1652
+ }], n = rs(t.state?.output);
1650
1653
  n && e.push({
1651
1654
  kind: "link",
1652
1655
  text: n.filePath,
@@ -1686,9 +1689,9 @@ const _r = {
1686
1689
  const e = t.title.some(hi), n = (t.blocks ?? []).some(gi);
1687
1690
  return e || n;
1688
1691
  }, yi = (t) => t ? {
1689
- ...Tn(),
1692
+ ...wn(),
1690
1693
  ...t
1691
- } : Tn(), xi = (t, e) => {
1694
+ } : wn(), xi = (t, e) => {
1692
1695
  const n = t.tool ?? "tool";
1693
1696
  for (const o of ur(n)) {
1694
1697
  const s = e[o];
@@ -1706,25 +1709,25 @@ const _r = {
1706
1709
  return {
1707
1710
  items: t.map((s) => Si(s, n, e)).filter(bi)
1708
1711
  };
1709
- }, Oe = Cs, ls = (t, e, n, o = !1) => {
1712
+ }, is = (t, e, n, o = !1) => {
1710
1713
  o && t.stopPropagation(), e.href || t.preventDefault(), e.filePath && n?.(e.filePath);
1711
1714
  };
1712
1715
  function Ti(t) {
1713
- const e = C(6), {
1716
+ const e = A(6), {
1714
1717
  seg: n
1715
1718
  } = t;
1716
1719
  let o;
1717
- e[0] !== n.alt || e[1] !== n.src ? (o = /* @__PURE__ */ c(st.Image, { src: n.src, alt: n.alt }), e[0] = n.alt, e[1] = n.src, e[2] = o) : o = e[2];
1720
+ e[0] !== n.alt || e[1] !== n.src ? (o = /* @__PURE__ */ c(rt.Image, { src: n.src, alt: n.alt }), e[0] = n.alt, e[1] = n.src, e[2] = o) : o = e[2];
1718
1721
  let s;
1719
- e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ c(st.Fallback, { background: "bg.muted", color: "fg.muted" }), e[3] = s) : s = e[3];
1722
+ e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ c(rt.Fallback, { background: "bg.muted", color: "fg.muted" }), e[3] = s) : s = e[3];
1720
1723
  let r;
1721
- return e[4] !== o ? (r = /* @__PURE__ */ k(st.Root, { width: "1.5rem", height: "1.5rem", children: [
1724
+ return e[4] !== o ? (r = /* @__PURE__ */ C(rt.Root, { width: "1.5rem", height: "1.5rem", children: [
1722
1725
  o,
1723
1726
  s
1724
1727
  ] }), e[4] = o, e[5] = r) : r = e[5], r;
1725
1728
  }
1726
1729
  function Ai(t) {
1727
- const e = C(9), {
1730
+ const e = A(9), {
1728
1731
  seg: n,
1729
1732
  onOpenFile: o
1730
1733
  } = t, s = n.additions ?? 0, r = n.deletions ?? 0;
@@ -1734,31 +1737,31 @@ function Ai(t) {
1734
1737
  o?.(a);
1735
1738
  }, e[0] = o, e[1] = n.fileName, e[2] = n.filePath, e[3] = i) : i = e[3];
1736
1739
  let l;
1737
- return e[4] !== n.fileName || e[5] !== s || e[6] !== r || e[7] !== i ? (l = /* @__PURE__ */ c(ro, { fileName: n.fileName, additions: s, deletions: r, onClickFileLink: i }), e[4] = n.fileName, e[5] = s, e[6] = r, e[7] = i, e[8] = l) : l = e[8], l;
1740
+ return e[4] !== n.fileName || e[5] !== s || e[6] !== r || e[7] !== i ? (l = /* @__PURE__ */ c(so, { fileName: n.fileName, additions: s, deletions: r, onClickFileLink: i }), e[4] = n.fileName, e[5] = s, e[6] = r, e[7] = i, e[8] = l) : l = e[8], l;
1738
1741
  }
1739
1742
  function Ci(t) {
1740
- const e = C(13), {
1743
+ const e = A(13), {
1741
1744
  seg: n,
1742
1745
  onOpenFile: o
1743
1746
  } = t, s = n.bold ? "medium" : void 0, r = !!(n.href || n.filePath), i = n.href ?? "#", l = (n.muted, "fg.muted"), a = r ? "pointer" : "default";
1744
1747
  let u;
1745
- e[0] !== o || e[1] !== n ? (u = (m) => ls(m, n, o, !0), e[0] = o, e[1] = n, e[2] = u) : u = e[2];
1748
+ e[0] !== o || e[1] !== n ? (u = (p) => is(p, n, o, !0), e[0] = o, e[1] = n, e[2] = u) : u = e[2];
1746
1749
  const d = n.muted ? "fg.muted" : "fg.blue-dark";
1747
1750
  let f;
1748
1751
  e[3] !== d ? (f = {
1749
1752
  textDecoration: "underline",
1750
1753
  color: d
1751
1754
  }, e[3] = d, e[4] = f) : f = e[4];
1752
- let p;
1753
- return e[5] !== s || e[6] !== n.text || e[7] !== i || e[8] !== l || e[9] !== a || e[10] !== u || e[11] !== f ? (p = /* @__PURE__ */ c(En, { href: i, fontWeight: s, color: l, textDecoration: "none", cursor: a, onClick: u, _hover: f, children: n.text }), e[5] = s, e[6] = n.text, e[7] = i, e[8] = l, e[9] = a, e[10] = u, e[11] = f, e[12] = p) : p = e[12], p;
1755
+ let m;
1756
+ return e[5] !== s || e[6] !== n.text || e[7] !== i || e[8] !== l || e[9] !== a || e[10] !== u || e[11] !== f ? (m = /* @__PURE__ */ c(Mn, { href: i, fontWeight: s, color: l, textDecoration: "none", cursor: a, onClick: u, _hover: f, children: n.text }), e[5] = s, e[6] = n.text, e[7] = i, e[8] = l, e[9] = a, e[10] = u, e[11] = f, e[12] = m) : m = e[12], m;
1754
1757
  }
1755
1758
  function ki(t) {
1756
- const e = C(12), {
1759
+ const e = A(12), {
1757
1760
  seg: n,
1758
1761
  onOpenFile: o
1759
1762
  } = t, s = n.bold ? "medium" : void 0, r = n.href ?? "#", i = n.muted ? "fg.muted" : "accent.primary";
1760
1763
  let l;
1761
- e[0] !== o || e[1] !== n ? (l = (f) => ls(f, n, o), e[0] = o, e[1] = n, e[2] = l) : l = e[2];
1764
+ e[0] !== o || e[1] !== n ? (l = (f) => is(f, n, o), e[0] = o, e[1] = n, e[2] = l) : l = e[2];
1762
1765
  const a = n.muted ? "fg.muted" : "accent.primary";
1763
1766
  let u;
1764
1767
  e[3] !== a ? (u = {
@@ -1766,10 +1769,10 @@ function ki(t) {
1766
1769
  textDecoration: "underline"
1767
1770
  }, e[3] = a, e[4] = u) : u = e[4];
1768
1771
  let d;
1769
- return e[5] !== s || e[6] !== n.text || e[7] !== r || e[8] !== i || e[9] !== l || e[10] !== u ? (d = /* @__PURE__ */ c(En, { href: r, fontWeight: s, color: i, textDecoration: "underline", onClick: l, _hover: u, children: n.text }), e[5] = s, e[6] = n.text, e[7] = r, e[8] = i, e[9] = l, e[10] = u, e[11] = d) : d = e[11], d;
1772
+ return e[5] !== s || e[6] !== n.text || e[7] !== r || e[8] !== i || e[9] !== l || e[10] !== u ? (d = /* @__PURE__ */ c(Mn, { href: r, fontWeight: s, color: i, textDecoration: "underline", onClick: l, _hover: u, children: n.text }), e[5] = s, e[6] = n.text, e[7] = r, e[8] = i, e[9] = l, e[10] = u, e[11] = d) : d = e[11], d;
1770
1773
  }
1771
1774
  function Ii(t) {
1772
- const e = C(14), {
1775
+ const e = A(14), {
1773
1776
  seg: n,
1774
1777
  isClickable: o
1775
1778
  } = t, s = n.bold ? "medium" : void 0, r = n.monospace ? "mono/XS" : void 0, i = n.truncate ? "0" : void 0, l = n.truncate ? "hidden" : void 0, a = n.truncate ? "ellipsis" : void 0, u = n.truncate ? "nowrap" : void 0, d = o && !n.muted ? "fg" : "fg.muted";
@@ -1777,16 +1780,16 @@ function Ii(t) {
1777
1780
  e[0] !== d ? (f = {
1778
1781
  color: d
1779
1782
  }, e[0] = d, e[1] = f) : f = e[1];
1780
- let p;
1781
- e[2] !== n.text || e[3] !== s || e[4] !== r || e[5] !== i || e[6] !== l || e[7] !== a || e[8] !== u || e[9] !== f ? (p = /* @__PURE__ */ c(dt, { fontWeight: s, textStyle: r, color: "fg.muted", minW: i, overflow: l, textOverflow: a, whiteSpace: u, _groupHover: f, children: n.text }), e[2] = n.text, e[3] = s, e[4] = r, e[5] = i, e[6] = l, e[7] = a, e[8] = u, e[9] = f, e[10] = p) : p = e[10];
1782
- const m = p;
1783
+ let m;
1784
+ e[2] !== n.text || e[3] !== s || e[4] !== r || e[5] !== i || e[6] !== l || e[7] !== a || e[8] !== u || e[9] !== f ? (m = /* @__PURE__ */ c(dt, { fontWeight: s, textStyle: r, color: "fg.muted", minW: i, overflow: l, textOverflow: a, whiteSpace: u, _groupHover: f, children: n.text }), e[2] = n.text, e[3] = s, e[4] = r, e[5] = i, e[6] = l, e[7] = a, e[8] = u, e[9] = f, e[10] = m) : m = e[10];
1785
+ const p = m;
1783
1786
  if (!n.truncate)
1784
- return m;
1787
+ return p;
1785
1788
  let h;
1786
- return e[11] !== n.text || e[12] !== m ? (h = /* @__PURE__ */ c(sn, { content: n.text, children: m }), e[11] = n.text, e[12] = m, e[13] = h) : h = e[13], h;
1789
+ return e[11] !== n.text || e[12] !== p ? (h = /* @__PURE__ */ c(sn, { content: n.text, children: p }), e[11] = n.text, e[12] = p, e[13] = h) : h = e[13], h;
1787
1790
  }
1788
1791
  function _i(t) {
1789
- const e = C(11), {
1792
+ const e = A(11), {
1790
1793
  seg: n,
1791
1794
  isClickable: o,
1792
1795
  onOpenFile: s
@@ -1812,8 +1815,9 @@ function _i(t) {
1812
1815
  return null;
1813
1816
  }
1814
1817
  }
1818
+ const Oe = As;
1815
1819
  function vi(t) {
1816
- const e = C(10), {
1820
+ const e = A(10), {
1817
1821
  ind: n
1818
1822
  } = t;
1819
1823
  if (!n || n.type === "none")
@@ -1826,17 +1830,17 @@ function vi(t) {
1826
1830
  return e[2] !== l ? (a = /* @__PURE__ */ c(Oe.Indicator, { outline: "none", border: "none", background: "bg", color: "fg", children: /* @__PURE__ */ c(dt, { display: "inline-flex", alignItems: "center", children: /* @__PURE__ */ c(l, { size: 14, strokeWidth: 1 }) }) }), e[2] = l, e[3] = a) : a = e[3], a;
1827
1831
  }
1828
1832
  let o;
1829
- e[4] !== n.alt || e[5] !== n.src ? (o = /* @__PURE__ */ c(st.Image, { src: n.src, alt: n.alt }), e[4] = n.alt, e[5] = n.src, e[6] = o) : o = e[6];
1833
+ e[4] !== n.alt || e[5] !== n.src ? (o = /* @__PURE__ */ c(rt.Image, { src: n.src, alt: n.alt }), e[4] = n.alt, e[5] = n.src, e[6] = o) : o = e[6];
1830
1834
  let s;
1831
- e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ c(st.Fallback, { background: "bg.muted", color: "fg.muted" }), e[7] = s) : s = e[7];
1835
+ e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ c(rt.Fallback, { background: "bg.muted", color: "fg.muted" }), e[7] = s) : s = e[7];
1832
1836
  let r;
1833
- return e[8] !== o ? (r = /* @__PURE__ */ c(Oe.Indicator, { children: /* @__PURE__ */ k(st.Root, { boxSize: "full", children: [
1837
+ return e[8] !== o ? (r = /* @__PURE__ */ c(Oe.Indicator, { children: /* @__PURE__ */ C(rt.Root, { boxSize: "full", children: [
1834
1838
  o,
1835
1839
  s
1836
1840
  ] }) }), e[8] = o, e[9] = r) : r = e[9], r;
1837
1841
  }
1838
1842
  function Ri(t) {
1839
- const e = C(5), {
1843
+ const e = A(5), {
1840
1844
  code: n,
1841
1845
  language: o
1842
1846
  } = t, s = o ? `${o} code block` : "code block";
@@ -1846,45 +1850,45 @@ function Ri(t) {
1846
1850
  return e[2] !== s || e[3] !== r ? (i = /* @__PURE__ */ c(_t, { background: "bg.code", color: "fg.muted", borderWidth: "1px", borderColor: "border.subtle", borderRadius: "md", showHorizontalScrollbar: !0, showVerticalScrollbar: !1, children: /* @__PURE__ */ c(B, { as: "pre", padding: "sm", textStyle: "mono/XS", whiteSpace: "pre", "aria-label": s, children: r }) }), e[2] = s, e[3] = r, e[4] = i) : i = e[4], i;
1847
1851
  }
1848
1852
  function Mi(t) {
1849
- const e = C(38), {
1853
+ const e = A(38), {
1850
1854
  b: n,
1851
1855
  onOpenFile: o
1852
1856
  } = t;
1853
1857
  switch (n.type) {
1854
1858
  case "comment": {
1855
1859
  let s;
1856
- e[0] !== n.text ? (s = /* @__PURE__ */ c(ie.Body, { children: n.text }), e[0] = n.text, e[1] = s) : s = e[1];
1860
+ e[0] !== n.text ? (s = /* @__PURE__ */ c(le.Body, { children: n.text }), e[0] = n.text, e[1] = s) : s = e[1];
1857
1861
  let r;
1858
- e[2] !== n.reactions ? (r = n.reactions?.clap ? /* @__PURE__ */ c(ie.Footer, { children: /* @__PURE__ */ k(ft, { children: [
1862
+ e[2] !== n.reactions ? (r = n.reactions?.clap ? /* @__PURE__ */ c(le.Footer, { children: /* @__PURE__ */ C(ft, { children: [
1859
1863
  "👏 ",
1860
1864
  n.reactions.clap
1861
1865
  ] }) }) : null, e[2] = n.reactions, e[3] = r) : r = e[3];
1862
1866
  let i;
1863
- return e[4] !== s || e[5] !== r ? (i = /* @__PURE__ */ k(ie.Root, { children: [
1867
+ return e[4] !== s || e[5] !== r ? (i = /* @__PURE__ */ C(le.Root, { children: [
1864
1868
  s,
1865
1869
  r
1866
1870
  ] }), e[4] = s, e[5] = r, e[6] = i) : i = e[6], i;
1867
1871
  }
1868
1872
  case "code": {
1869
1873
  let s;
1870
- return e[7] !== n.code || e[8] !== n.language ? (s = /* @__PURE__ */ c(ie.Root, { border: "0", padding: "0", children: /* @__PURE__ */ c(ie.Body, { padding: "0", children: /* @__PURE__ */ c(Ri, { language: n.language, code: n.code }) }) }), e[7] = n.code, e[8] = n.language, e[9] = s) : s = e[9], s;
1874
+ return e[7] !== n.code || e[8] !== n.language ? (s = /* @__PURE__ */ c(le.Root, { border: "0", padding: "0", children: /* @__PURE__ */ c(le.Body, { padding: "0", children: /* @__PURE__ */ c(Ri, { language: n.language, code: n.code }) }) }), e[7] = n.code, e[8] = n.language, e[9] = s) : s = e[9], s;
1871
1875
  }
1872
1876
  case "diff": {
1873
1877
  const s = n.sideBySide ?? !1;
1874
1878
  let r;
1875
- return e[10] !== n.language || e[11] !== n.modified || e[12] !== n.original || e[13] !== s ? (r = /* @__PURE__ */ c(ie.Root, { border: "0", padding: "0", children: /* @__PURE__ */ c(ie.Body, { padding: "0", children: /* @__PURE__ */ c(B, { height: "240px", minW: "320px", overflow: "hidden", children: /* @__PURE__ */ c(oo, { original: n.original, modified: n.modified, language: n.language, sideBySide: s, disableScroll: !0 }) }) }) }), e[10] = n.language, e[11] = n.modified, e[12] = n.original, e[13] = s, e[14] = r) : r = e[14], r;
1879
+ return e[10] !== n.language || e[11] !== n.modified || e[12] !== n.original || e[13] !== s ? (r = /* @__PURE__ */ c(le.Root, { border: "0", padding: "0", children: /* @__PURE__ */ c(le.Body, { padding: "0", children: /* @__PURE__ */ c(B, { height: "240px", minW: "320px", overflow: "hidden", children: /* @__PURE__ */ c(oo, { original: n.original, modified: n.modified, language: n.language, sideBySide: s, disableScroll: !0 }) }) }) }), e[10] = n.language, e[11] = n.modified, e[12] = n.original, e[13] = s, e[14] = r) : r = e[14], r;
1876
1880
  }
1877
1881
  case "text": {
1878
1882
  let s;
1879
- return e[15] !== n.text ? (s = /* @__PURE__ */ c(ie.Root, { background: "transparent", children: /* @__PURE__ */ c(ie.Body, { padding: "sm", children: /* @__PURE__ */ c(U, { textStyle: "label/S/regular", children: n.text }) }) }), e[15] = n.text, e[16] = s) : s = e[16], s;
1883
+ return e[15] !== n.text ? (s = /* @__PURE__ */ c(le.Root, { background: "transparent", children: /* @__PURE__ */ c(le.Body, { padding: "sm", children: /* @__PURE__ */ c(j, { textStyle: "label/S/regular", children: n.text }) }) }), e[15] = n.text, e[16] = s) : s = e[16], s;
1880
1884
  }
1881
1885
  case "todo-list": {
1882
1886
  let s;
1883
- return e[17] !== n.items ? (s = /* @__PURE__ */ c(Po, { items: n.items }), e[17] = n.items, e[18] = s) : s = e[18], s;
1887
+ return e[17] !== n.items ? (s = /* @__PURE__ */ c(Mo, { items: n.items }), e[17] = n.items, e[18] = s) : s = e[18], s;
1884
1888
  }
1885
1889
  case "question-form": {
1886
1890
  let s;
1887
- return e[19] !== n.questions ? (s = /* @__PURE__ */ c(Wn, { questions: n.questions }), e[19] = n.questions, e[20] = s) : s = e[20], s;
1891
+ return e[19] !== n.questions ? (s = /* @__PURE__ */ c(qn, { questions: n.questions }), e[19] = n.questions, e[20] = s) : s = e[20], s;
1888
1892
  }
1889
1893
  case "references": {
1890
1894
  let s;
@@ -1898,9 +1902,9 @@ function Mi(t) {
1898
1902
  let s;
1899
1903
  e[25] !== n.alt || e[26] !== n.src ? (s = /* @__PURE__ */ c(Pn, { src: n.src, alt: n.alt, maxH: "18rem", maxW: "full", objectFit: "contain", borderRadius: "sm", borderWidth: "1px", borderColor: "border.subtle" }), e[25] = n.alt, e[26] = n.src, e[27] = s) : s = e[27];
1900
1904
  let r;
1901
- e[28] !== n.caption ? (r = n.caption ? /* @__PURE__ */ c(U, { mt: "2xs", textStyle: "label/XS/regular", color: "fg.muted", children: n.caption }) : null, e[28] = n.caption, e[29] = r) : r = e[29];
1905
+ e[28] !== n.caption ? (r = n.caption ? /* @__PURE__ */ c(j, { mt: "2xs", textStyle: "label/XS/regular", color: "fg.muted", children: n.caption }) : null, e[28] = n.caption, e[29] = r) : r = e[29];
1902
1906
  let i;
1903
- return e[30] !== s || e[31] !== r ? (i = /* @__PURE__ */ c(ie.Root, { border: "0", padding: "0", background: "transparent", children: /* @__PURE__ */ k(ie.Body, { padding: "0", children: [
1907
+ return e[30] !== s || e[31] !== r ? (i = /* @__PURE__ */ c(le.Root, { border: "0", padding: "0", background: "transparent", children: /* @__PURE__ */ C(le.Body, { padding: "0", children: [
1904
1908
  s,
1905
1909
  r
1906
1910
  ] }) }), e[30] = s, e[31] = r, e[32] = i) : i = e[32], i;
@@ -1918,8 +1922,8 @@ function Mi(t) {
1918
1922
  function Pi(t) {
1919
1923
  return /* @__PURE__ */ c(on, { fileName: t }, t);
1920
1924
  }
1921
- function Ei(t) {
1922
- const e = C(23), {
1925
+ function Di(t) {
1926
+ const e = A(23), {
1923
1927
  item: n,
1924
1928
  itemKey: o,
1925
1929
  isOpen: s,
@@ -1931,54 +1935,54 @@ function Ei(t) {
1931
1935
  let u;
1932
1936
  e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ c(Oe.Separator, {}), e[0] = u) : u = e[0];
1933
1937
  let d;
1934
- e[1] !== n.indicator ? (d = /* @__PURE__ */ k(Oe.Connector, { children: [
1938
+ e[1] !== n.indicator ? (d = /* @__PURE__ */ C(Oe.Connector, { children: [
1935
1939
  u,
1936
1940
  /* @__PURE__ */ c(vi, { ind: n.indicator })
1937
1941
  ] }), e[1] = n.indicator, e[2] = d) : d = e[2];
1938
1942
  const f = s ? "auto" : "20px";
1939
- let p;
1940
- e[3] !== r || e[4] !== s || e[5] !== n.title || e[6] !== o || e[7] !== a || e[8] !== l ? (p = n.title.length > 0 && /* @__PURE__ */ c(Oe.Title, { className: "group", fontWeight: "normal", display: "flex", alignItems: "center", minW: "0", width: "full", overflow: "hidden", cursor: r ? "pointer" : "default", onClick: r ? () => l(o) : void 0, children: /* @__PURE__ */ k(dt, { display: "flex", alignItems: "center", gap: "sm", flexWrap: "nowrap", minW: "0", width: "full", children: [
1941
- /* @__PURE__ */ c(dt, { display: "flex", alignItems: "center", gap: "xs", flexWrap: "nowrap", minW: "0", flex: "1", overflow: "hidden", children: n.title.map((y, x) => /* @__PURE__ */ c(_i, { seg: y, isClickable: r, onOpenFile: a }, x)) }),
1943
+ let m;
1944
+ e[3] !== r || e[4] !== s || e[5] !== n.title || e[6] !== o || e[7] !== a || e[8] !== l ? (m = n.title.length > 0 && /* @__PURE__ */ c(Oe.Title, { className: "group", fontWeight: "normal", display: "flex", alignItems: "center", minW: "0", width: "full", overflow: "hidden", cursor: r ? "pointer" : "default", onClick: r ? () => l(o) : void 0, children: /* @__PURE__ */ C(dt, { display: "flex", alignItems: "center", gap: "sm", flexWrap: "nowrap", minW: "0", width: "full", children: [
1945
+ /* @__PURE__ */ c(dt, { display: "flex", alignItems: "center", gap: "xs", flexWrap: "nowrap", minW: "0", flex: "1", overflow: "hidden", children: n.title.map((b, y) => /* @__PURE__ */ c(_i, { seg: b, isClickable: r, onOpenFile: a }, y)) }),
1942
1946
  r ? /* @__PURE__ */ c(dt, { display: "inline-flex", alignItems: "center", transition: "transform 200ms ease, color 200ms ease", transform: s ? "rotate(0deg)" : "rotate(-180deg)", color: "transparent", flexShrink: "0", _groupHover: {
1943
1947
  color: "fg"
1944
- }, children: /* @__PURE__ */ c(Us, { size: 12 }) }) : null
1945
- ] }) }), e[3] = r, e[4] = s, e[5] = n.title, e[6] = o, e[7] = a, e[8] = l, e[9] = p) : p = e[9];
1946
- let m;
1947
- e[10] !== i || e[11] !== s || e[12] !== n.blocks || e[13] !== a ? (m = i ? /* @__PURE__ */ c(B, { display: "grid", gridTemplateRows: s ? "1fr" : "0fr", transition: "grid-template-rows 220ms ease", children: s ? /* @__PURE__ */ c(B, { overflow: "hidden", opacity: 1, transform: "translateY(0)", transition: "opacity 200ms ease, transform 200ms ease", children: n.blocks.map((y, x) => /* @__PURE__ */ c(B, { children: /* @__PURE__ */ c(Mi, { b: y, onOpenFile: a }) }, x)) }) : null }) : null, e[10] = i, e[11] = s, e[12] = n.blocks, e[13] = a, e[14] = m) : m = e[14];
1948
+ }, children: /* @__PURE__ */ c(Ns, { size: 12 }) }) : null
1949
+ ] }) }), e[3] = r, e[4] = s, e[5] = n.title, e[6] = o, e[7] = a, e[8] = l, e[9] = m) : m = e[9];
1950
+ let p;
1951
+ e[10] !== i || e[11] !== s || e[12] !== n.blocks || e[13] !== a ? (p = i ? /* @__PURE__ */ c(B, { display: "grid", gridTemplateRows: s ? "1fr" : "0fr", transition: "grid-template-rows 220ms ease", children: s ? /* @__PURE__ */ c(B, { overflow: "hidden", opacity: 1, transform: "translateY(0)", transition: "opacity 200ms ease, transform 200ms ease", children: n.blocks.map((b, y) => /* @__PURE__ */ c(B, { children: /* @__PURE__ */ c(Mi, { b, onOpenFile: a }) }, y)) }) : null }) : null, e[10] = i, e[11] = s, e[12] = n.blocks, e[13] = a, e[14] = p) : p = e[14];
1948
1952
  let h;
1949
- e[15] !== f || e[16] !== p || e[17] !== m ? (h = /* @__PURE__ */ k(Oe.Content, { h: f, children: [
1950
- p,
1951
- m
1952
- ] }), e[15] = f, e[16] = p, e[17] = m, e[18] = h) : h = e[18];
1953
+ e[15] !== f || e[16] !== m || e[17] !== p ? (h = /* @__PURE__ */ C(Oe.Content, { h: f, children: [
1954
+ m,
1955
+ p
1956
+ ] }), e[15] = f, e[16] = m, e[17] = p, e[18] = h) : h = e[18];
1953
1957
  let g;
1954
- return e[19] !== o || e[20] !== d || e[21] !== h ? (g = /* @__PURE__ */ k(Oe.Item, { gap: "xs", children: [
1958
+ return e[19] !== o || e[20] !== d || e[21] !== h ? (g = /* @__PURE__ */ C(Oe.Item, { gap: "xs", children: [
1955
1959
  d,
1956
1960
  h
1957
1961
  ] }, o), e[19] = o, e[20] = d, e[21] = h, e[22] = g) : g = e[22], g;
1958
1962
  }
1959
- function Di(t) {
1960
- const e = C(11), {
1963
+ function Ei(t) {
1964
+ const e = A(11), {
1961
1965
  data: n,
1962
1966
  onOpenFile: o
1963
1967
  } = t;
1964
1968
  let s;
1965
1969
  e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = {}, e[0] = s) : s = e[0];
1966
- const [r, i] = H(s), l = Bi;
1970
+ const [r, i] = V(s), l = Bi;
1967
1971
  let a;
1968
- e[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = (p) => {
1969
- i((m) => ({
1970
- ...m,
1971
- [p]: !m[p]
1972
+ e[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = (m) => {
1973
+ i((p) => ({
1974
+ ...p,
1975
+ [m]: !p[m]
1972
1976
  }));
1973
1977
  }, e[1] = a) : a = e[1];
1974
1978
  const u = a;
1975
1979
  let d;
1976
1980
  if (e[2] !== n.items || e[3] !== r || e[4] !== o) {
1977
- let p;
1978
- e[6] !== r || e[7] !== o ? (p = (m, h) => {
1979
- const g = l(m, h), y = (m.blocks?.length ?? 0) > 0, x = (m.expandable ?? !0) && y, b = x ? r[g] ?? !1 : y;
1980
- return /* @__PURE__ */ c(Ei, { item: m, itemKey: g, isOpen: b, canExpand: x, hasBlocks: y, onToggle: u, onOpenFile: o }, g);
1981
- }, e[6] = r, e[7] = o, e[8] = p) : p = e[8], d = n.items.map(p), e[2] = n.items, e[3] = r, e[4] = o, e[5] = d;
1981
+ let m;
1982
+ e[6] !== r || e[7] !== o ? (m = (p, h) => {
1983
+ const g = l(p, h), b = (p.blocks?.length ?? 0) > 0, y = (p.expandable ?? !0) && b, w = y ? r[g] ?? !1 : b;
1984
+ return /* @__PURE__ */ c(Di, { item: p, itemKey: g, isOpen: w, canExpand: y, hasBlocks: b, onToggle: u, onOpenFile: o }, g);
1985
+ }, e[6] = r, e[7] = o, e[8] = m) : m = e[8], d = n.items.map(m), e[2] = n.items, e[3] = r, e[4] = o, e[5] = d;
1982
1986
  } else
1983
1987
  d = e[5];
1984
1988
  let f;
@@ -1992,7 +1996,7 @@ const Fi = (t) => vt(t.tool ?? "").replace(/_/g, "") === "question", Li = (t) =>
1992
1996
  return typeof e == "string" ? e.trim().length > 0 : Array.isArray(e) ? e.length > 0 : e && typeof e == "object" ? Object.keys(e).length > 0 : e != null;
1993
1997
  };
1994
1998
  function $i(t) {
1995
- const e = C(8), {
1999
+ const e = A(8), {
1996
2000
  invocations: n,
1997
2001
  labeledBlocks: o,
1998
2002
  hideQuestionForms: s,
@@ -2018,7 +2022,7 @@ function $i(t) {
2018
2022
  return a;
2019
2023
  const u = l;
2020
2024
  let d;
2021
- return e[5] !== u || e[6] !== r ? (d = /* @__PURE__ */ c(Di, { data: u, onOpenFile: r }), e[5] = u, e[6] = r, e[7] = d) : d = e[7], d;
2025
+ return e[5] !== u || e[6] !== r ? (d = /* @__PURE__ */ c(Ei, { data: u, onOpenFile: r }), e[5] = u, e[6] = r, e[7] = d) : d = e[7], d;
2022
2026
  }
2023
2027
  function Oi(t) {
2024
2028
  return !Fi(t) || Li(t);
@@ -2064,8 +2068,8 @@ const zi = (t) => t.type === "tool", dn = (t) => t.filename ?? t.url.split("/").
2064
2068
  nextIndex: o - 1
2065
2069
  };
2066
2070
  };
2067
- function as(t) {
2068
- const e = C(8), {
2071
+ function ls(t) {
2072
+ const e = A(8), {
2069
2073
  message: n,
2070
2074
  hideQuestionForms: o,
2071
2075
  onOpenFile: s,
@@ -2077,11 +2081,11 @@ function as(t) {
2077
2081
  let d;
2078
2082
  if (e[2] !== l || e[3] !== i || e[4] !== n.id || e[5] !== s || e[6] !== u) {
2079
2083
  const f = [];
2080
- for (let p = 0; p < u.length; p = p + 1, p) {
2081
- const m = u[p], h = `${n.id}-${p}`;
2082
- e: switch (m.type) {
2084
+ for (let m = 0; m < u.length; m = m + 1, m) {
2085
+ const p = u[m], h = `${n.id}-${m}`;
2086
+ e: switch (p.type) {
2083
2087
  case "text": {
2084
- f.push(/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(cr, { children: m.text }) }, h));
2088
+ f.push(/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(cr, { children: p.text }) }, h));
2085
2089
  break e;
2086
2090
  }
2087
2091
  case "reasoning": {
@@ -2091,29 +2095,29 @@ function as(t) {
2091
2095
  fontSize: ".75rem !important",
2092
2096
  fontWeight: "normal !important"
2093
2097
  }
2094
- }, children: /* @__PURE__ */ c(On, { defaultState: m.text, fullWidth: !0 }) }, h));
2098
+ }, children: /* @__PURE__ */ c($n, { defaultState: p.text, fullWidth: !0 }) }, h));
2095
2099
  break e;
2096
2100
  }
2097
2101
  case "tool": {
2098
2102
  const {
2099
2103
  invocations: g,
2100
- nextIndex: y
2101
- } = Ui(u, p);
2102
- p = y, f.push(/* @__PURE__ */ c(B, { width: "full", children: /* @__PURE__ */ c(l, { invocations: g, labeledBlocks: !0, hideQuestionForms: i, onOpenFile: s }) }, h));
2104
+ nextIndex: b
2105
+ } = Ui(u, m);
2106
+ m = b, f.push(/* @__PURE__ */ c(B, { width: "full", children: /* @__PURE__ */ c(l, { invocations: g, labeledBlocks: !0, hideQuestionForms: i, onOpenFile: s }) }, h));
2103
2107
  break e;
2104
2108
  }
2105
2109
  case "file": {
2106
- f.push(/* @__PURE__ */ c(B, { width: "fit-content", children: /* @__PURE__ */ c(on, { fileName: dn(m), size: "sm", tone: "neutral", icon: Wi(m), onSelect: () => Hi(m, s) }) }, h));
2110
+ f.push(/* @__PURE__ */ c(B, { width: "fit-content", children: /* @__PURE__ */ c(on, { fileName: dn(p), size: "sm", tone: "neutral", icon: Wi(p), onSelect: () => Hi(p, s) }) }, h));
2107
2111
  break e;
2108
2112
  }
2109
2113
  case "error": {
2110
- f.push(/* @__PURE__ */ c(B, { py: "2", width: "full", children: /* @__PURE__ */ c(mn, { borderRadius: "xs", status: "error", colorPalette: "red", title: Vi(m), size: "sm" }) }, h));
2114
+ f.push(/* @__PURE__ */ c(B, { py: "2", width: "full", children: /* @__PURE__ */ c(pn, { borderRadius: "xs", status: "error", colorPalette: "red", title: Vi(p), size: "sm" }) }, h));
2111
2115
  break e;
2112
2116
  }
2113
2117
  case "token_usage":
2114
2118
  break e;
2115
2119
  case "alert": {
2116
- f.push(/* @__PURE__ */ c(B, { width: "full", children: /* @__PURE__ */ c(mn, { borderRadius: "xs", status: m.status === "loading" ? "info" : m.status, colorPalette: Ni[m.status], title: m.title, icon: m.status === "loading" ? /* @__PURE__ */ c(nn, { size: "sm" }) : void 0, size: "sm", children: m.message }) }, h));
2120
+ f.push(/* @__PURE__ */ c(B, { width: "full", children: /* @__PURE__ */ c(pn, { borderRadius: "xs", status: p.status === "loading" ? "info" : p.status, colorPalette: Ni[p.status], title: p.title, icon: p.status === "loading" ? /* @__PURE__ */ c(nn, { size: "sm" }) : void 0, size: "sm", children: p.message }) }, h));
2117
2121
  break e;
2118
2122
  }
2119
2123
  default:
@@ -2125,11 +2129,11 @@ function as(t) {
2125
2129
  d = e[7];
2126
2130
  return d;
2127
2131
  }
2128
- const ji = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "assistant", cs = (t) => t.text.trim().length > 0, Ki = (t) => t.title.trim().length > 0 || !!t.message?.trim(), Xi = (t) => {
2132
+ const ji = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "assistant", as = (t) => t.text.trim().length > 0, Ki = (t) => t.title.trim().length > 0 || !!t.message?.trim(), Xi = (t) => {
2129
2133
  switch (t.type) {
2130
2134
  case "text":
2131
2135
  case "reasoning":
2132
- return cs(t);
2136
+ return as(t);
2133
2137
  case "tool":
2134
2138
  case "file":
2135
2139
  case "error":
@@ -2184,9 +2188,9 @@ const ji = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
2184
2188
  r && n.push(r);
2185
2189
  }
2186
2190
  return n;
2187
- }, us = (t) => {
2191
+ }, cs = (t) => {
2188
2192
  const e = t.at(-1);
2189
- return e?.role !== "assistant" ? null : e.parts.some((o) => o.type === "text" && cs(o)) ? e.id : null;
2193
+ return e?.role !== "assistant" ? null : e.parts.some((o) => o.type === "text" && as(o)) ? e.id : null;
2190
2194
  }, el = (t) => {
2191
2195
  const e = [], n = [];
2192
2196
  for (const o of t)
@@ -2198,8 +2202,8 @@ const ji = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
2198
2202
  groups: e,
2199
2203
  leadingResponses: n
2200
2204
  };
2201
- }, ds = (t) => {
2202
- const e = C(18), {
2205
+ }, us = (t) => {
2206
+ const e = A(18), {
2203
2207
  message: n,
2204
2208
  streaming: o,
2205
2209
  hideQuestionForms: s,
@@ -2208,20 +2212,20 @@ const ji = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
2208
2212
  } = t, l = s === void 0 ? !1 : s, a = r === void 0 ? !1 : r;
2209
2213
  let u;
2210
2214
  e[0] !== n.role ? (u = ji(n.role), e[0] = n.role, e[1] = u) : u = e[1];
2211
- const d = u, f = d === "user" || d === "assistant" && i, p = a ? Vn : void 0;
2212
- let m;
2213
- e[2] !== l || e[3] !== n || e[4] !== o ? (m = /* @__PURE__ */ c(as, { message: n, streaming: o, hideQuestionForms: l }), e[2] = l, e[3] = n, e[4] = o, e[5] = m) : m = e[5];
2215
+ const d = u, f = d === "user" || d === "assistant" && i, m = a ? Hn : void 0;
2216
+ let p;
2217
+ e[2] !== l || e[3] !== n || e[4] !== o ? (p = /* @__PURE__ */ c(ls, { message: n, streaming: o, hideQuestionForms: l }), e[2] = l, e[3] = n, e[4] = o, e[5] = p) : p = e[5];
2214
2218
  let h;
2215
2219
  e[6] !== d || e[7] !== n || e[8] !== f ? (h = f ? /* @__PURE__ */ c(Yt, { message: n, alwaysVisible: d === "user", copyAlwaysVisible: d !== "user" }) : null, e[6] = d, e[7] = n, e[8] = f, e[9] = h) : h = e[9];
2216
2220
  let g;
2217
- e[10] !== d || e[11] !== m || e[12] !== h ? (g = /* @__PURE__ */ k(ze.Content, { from: d, children: [
2218
- m,
2221
+ e[10] !== d || e[11] !== p || e[12] !== h ? (g = /* @__PURE__ */ C(ze.Content, { from: d, children: [
2222
+ p,
2219
2223
  h
2220
- ] }), e[10] = d, e[11] = m, e[12] = h, e[13] = g) : g = e[13];
2221
- let y;
2222
- return e[14] !== d || e[15] !== p || e[16] !== g ? (y = /* @__PURE__ */ c(ze.Root, { from: d, ...p, children: g }), e[14] = d, e[15] = p, e[16] = g, e[17] = y) : y = e[17], y;
2224
+ ] }), e[10] = d, e[11] = p, e[12] = h, e[13] = g) : g = e[13];
2225
+ let b;
2226
+ return e[14] !== d || e[15] !== m || e[16] !== g ? (b = /* @__PURE__ */ c(ze.Root, { from: d, ...m, children: g }), e[14] = d, e[15] = m, e[16] = g, e[17] = b) : b = e[17], b;
2223
2227
  }, tl = (t) => {
2224
- const e = C(7), {
2228
+ const e = A(7), {
2225
2229
  label: n,
2226
2230
  onClick: o,
2227
2231
  actionPanel: s
@@ -2229,11 +2233,11 @@ const ji = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
2229
2233
  let i;
2230
2234
  e[0] !== n || e[1] !== o ? (i = /* @__PURE__ */ c(ft, { size: "2xs", variant: "outline", pointerEvents: "auto", onClick: o, children: n }), e[0] = n, e[1] = o, e[2] = i) : i = e[2];
2231
2235
  let l;
2232
- return e[3] !== s || e[4] !== r || e[5] !== i ? (l = /* @__PURE__ */ k(Qe, { position: "absolute", bottom: "0", left: "0", right: "0", justifyContent: r, alignItems: "flex-end", px: "xs", pb: "xs", pt: "lg", bgGradient: "to-t", gradientFrom: "bg.subtle", gradientTo: "transparent", borderBottomRadius: "xs", pointerEvents: "none", children: [
2236
+ return e[3] !== s || e[4] !== r || e[5] !== i ? (l = /* @__PURE__ */ C(Qe, { position: "absolute", bottom: "0", left: "0", right: "0", justifyContent: r, alignItems: "flex-end", px: "xs", pb: "xs", pt: "lg", bgGradient: "to-t", gradientFrom: "bg.subtle", gradientTo: "transparent", borderBottomRadius: "xs", pointerEvents: "none", children: [
2233
2237
  s,
2234
2238
  i
2235
2239
  ] }), e[3] = s, e[4] = r, e[5] = i, e[6] = l) : l = e[6], l;
2236
- }, nl = 360, sl = 4, ol = "min(10vh, 4rem)", fs = "min(70dvh, calc(100dvh - 12rem), 22rem)", Kt = 1, rl = (t) => t.parts.reduce((e, n) => n.type !== "text" ? e : {
2240
+ }, nl = 360, sl = 4, ol = "min(10vh, 4rem)", ds = "min(70dvh, calc(100dvh - 12rem), 22rem)", Kt = 1, rl = (t) => t.parts.reduce((e, n) => n.type !== "text" ? e : {
2237
2241
  lineCount: e.lineCount + n.text.split(/\r\n|\r|\n/).length,
2238
2242
  textLength: e.textLength + n.text.length
2239
2243
  }, {
@@ -2249,8 +2253,8 @@ const ji = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
2249
2253
  }, ll = (t, e) => {
2250
2254
  const n = Math.max(0, t.scrollHeight - t.clientHeight);
2251
2255
  return e === 0 || n <= Kt ? !1 : e < 0 ? t.scrollTop > Kt : t.scrollTop < n - Kt;
2252
- }, ps = 720, al = 1, cl = 3, ul = 20, In = 1, dl = 4, ms = 8, fl = (t, e) => {
2253
- const n = us(t);
2256
+ }, fs = 720, al = 1, cl = 3, ul = 20, kn = 1, dl = 4, ps = 8, fl = (t, e) => {
2257
+ const n = cs(t);
2254
2258
  return [...t.map((o) => ({
2255
2259
  type: "leading-response",
2256
2260
  key: o.id,
@@ -2264,13 +2268,13 @@ const ji = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
2264
2268
  }))];
2265
2269
  }, pl = (t, e) => {
2266
2270
  if (t === 0) return 0;
2267
- const n = t * ps + (t - 1) * ms;
2271
+ const n = t * fs + (t - 1) * ps;
2268
2272
  return Math.max(n - e, 0);
2269
- }, ml = (t) => t?.clientHeight || al, hl = (t, e) => Math.abs(t.scrollTop - e.scrollTop) <= In && Math.abs(t.totalSize - e.totalSize) <= In, gl = (t, e) => ({
2273
+ }, ml = (t) => t?.clientHeight || al, hl = (t, e) => Math.abs(t.scrollTop - e.scrollTop) <= kn && Math.abs(t.totalSize - e.totalSize) <= kn, gl = (t, e) => ({
2270
2274
  scrollTop: t?.scrollTop ?? 0,
2271
2275
  totalSize: e
2272
2276
  }), bl = (t) => {
2273
- const e = C(8), {
2277
+ const e = A(8), {
2274
2278
  itemCount: n,
2275
2279
  onReady: o,
2276
2280
  scrollRef: s,
@@ -2279,35 +2283,35 @@ const ji = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
2279
2283
  let l, a;
2280
2284
  e[0] !== o ? (l = () => {
2281
2285
  i.current = o;
2282
- }, a = [o], e[0] = o, e[1] = l, e[2] = a) : (l = e[1], a = e[2]), le(l, a);
2286
+ }, a = [o], e[0] = o, e[1] = l, e[2] = a) : (l = e[1], a = e[2]), ae(l, a);
2283
2287
  let u, d;
2284
2288
  e[3] !== n || e[4] !== s || e[5] !== r ? (u = () => {
2285
2289
  if (n === 0 || typeof requestAnimationFrame > "u") {
2286
2290
  i.current?.();
2287
2291
  return;
2288
2292
  }
2289
- let f = 0, p = 0, m = 0, h = null;
2293
+ let f = 0, m = 0, p = 0, h = null;
2290
2294
  const g = () => {
2291
- p = p + 1;
2292
- const y = gl(s.current, r);
2293
- if (m = h && hl(y, h) ? m + 1 : 0, h = y, m >= cl || p >= ul) {
2295
+ m = m + 1;
2296
+ const b = gl(s.current, r);
2297
+ if (p = h && hl(b, h) ? p + 1 : 0, h = b, p >= cl || m >= ul) {
2294
2298
  i.current?.();
2295
2299
  return;
2296
2300
  }
2297
2301
  f = requestAnimationFrame(g);
2298
2302
  };
2299
2303
  return f = requestAnimationFrame(g), () => cancelAnimationFrame(f);
2300
- }, d = [n, s, r], e[3] = n, e[4] = s, e[5] = r, e[6] = u, e[7] = d) : (u = e[6], d = e[7]), le(u, d);
2304
+ }, d = [n, s, r], e[3] = n, e[4] = s, e[5] = r, e[6] = u, e[7] = d) : (u = e[6], d = e[7]), ae(u, d);
2301
2305
  }, yl = (t) => {
2302
2306
  ll(t.currentTarget, t.deltaY) && t.stopPropagation();
2303
2307
  }, xl = (t, e) => {
2304
2308
  if (t)
2305
- return e ? fs : ol;
2309
+ return e ? ds : ol;
2306
2310
  }, Sl = (t) => {
2307
2311
  if (t)
2308
- return fs;
2312
+ return ds;
2309
2313
  }, wl = (t) => {
2310
- const e = C(50), {
2314
+ const e = A(50), {
2311
2315
  group: n,
2312
2316
  streaming: o,
2313
2317
  hideQuestionForms: s,
@@ -2318,39 +2322,39 @@ const ji = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
2318
2322
  let a, u, d;
2319
2323
  e[0] !== n.userMessage || e[1] !== r ? (a = il(n.userMessage), u = a && r, d = xl(a, r), e[0] = n.userMessage, e[1] = r, e[2] = a, e[3] = u, e[4] = d) : (a = e[2], u = e[3], d = e[4]);
2320
2324
  const f = d;
2321
- let p;
2322
- e[5] !== n.userMessage.id || e[6] !== l ? (p = () => l(n.userMessage.id), e[5] = n.userMessage.id, e[6] = l, e[7] = p) : p = e[7];
2323
- const m = p;
2325
+ let m;
2326
+ e[5] !== n.userMessage.id || e[6] !== l ? (m = () => l(n.userMessage.id), e[5] = n.userMessage.id, e[6] = l, e[7] = m) : m = e[7];
2327
+ const p = m;
2324
2328
  let h;
2325
- e[8] !== n.responses ? (h = us(n.responses), e[8] = n.responses, e[9] = h) : h = e[9];
2326
- const g = h, y = i ? Vn : void 0, x = a ? "0" : void 0, b = a ? "relative" : void 0, S = a ? r ? "expanded" : "collapsed" : void 0;
2327
- let w;
2328
- e[10] !== u ? (w = Sl(u), e[10] = u, e[11] = w) : w = e[11];
2329
- const T = u ? "auto" : "visible", A = a ? "xs" : void 0, _ = a ? "xs" : void 0, v = u ? "3rem" : void 0, F = u ? yl : void 0;
2329
+ e[8] !== n.responses ? (h = cs(n.responses), e[8] = n.responses, e[9] = h) : h = e[9];
2330
+ const g = h, b = i ? Hn : void 0, y = a ? "0" : void 0, w = a ? "relative" : void 0, x = a ? r ? "expanded" : "collapsed" : void 0;
2331
+ let S;
2332
+ e[10] !== u ? (S = Sl(u), e[10] = u, e[11] = S) : S = e[11];
2333
+ const T = u ? "auto" : "visible", k = a ? "xs" : void 0, I = a ? "xs" : void 0, v = u ? "3rem" : void 0, L = u ? yl : void 0;
2334
+ let D;
2335
+ e[12] !== n.userMessage || e[13] !== o ? (D = /* @__PURE__ */ c(ls, { message: n.userMessage, streaming: o }), e[12] = n.userMessage, e[13] = o, e[14] = D) : D = e[14];
2336
+ let $;
2337
+ e[15] !== I || e[16] !== v || e[17] !== L || e[18] !== D || e[19] !== x || e[20] !== S || e[21] !== T || e[22] !== k ? ($ = /* @__PURE__ */ c(B, { "data-sticky-user-message-content": x, display: "flex", flexDirection: "column", gap: "sm", maxH: S, minH: "0", overflowY: T, px: k, py: I, pb: v, onWheel: L, children: D }), e[15] = I, e[16] = v, e[17] = L, e[18] = D, e[19] = x, e[20] = S, e[21] = T, e[22] = k, e[23] = $) : $ = e[23];
2338
+ let E;
2339
+ e[24] !== n.userMessage || e[25] !== a || e[26] !== r || e[27] !== p ? (E = a ? /* @__PURE__ */ c(tl, { label: r ? "Show less" : "Show more", onClick: p, actionPanel: /* @__PURE__ */ c(Yt, { message: n.userMessage, alwaysVisible: !0, copyAlwaysVisible: !1 }) }) : /* @__PURE__ */ c(Yt, { message: n.userMessage, alwaysVisible: !0, copyAlwaysVisible: !1 }), e[24] = n.userMessage, e[25] = a, e[26] = r, e[27] = p, e[28] = E) : E = e[28];
2330
2340
  let M;
2331
- e[12] !== n.userMessage || e[13] !== o ? (M = /* @__PURE__ */ c(as, { message: n.userMessage, streaming: o }), e[12] = n.userMessage, e[13] = o, e[14] = M) : M = e[14];
2332
- let L;
2333
- e[15] !== _ || e[16] !== v || e[17] !== F || e[18] !== M || e[19] !== S || e[20] !== w || e[21] !== T || e[22] !== A ? (L = /* @__PURE__ */ c(B, { "data-sticky-user-message-content": S, display: "flex", flexDirection: "column", gap: "sm", maxH: w, minH: "0", overflowY: T, px: A, py: _, pb: v, onWheel: F, children: M }), e[15] = _, e[16] = v, e[17] = F, e[18] = M, e[19] = S, e[20] = w, e[21] = T, e[22] = A, e[23] = L) : L = e[23];
2341
+ e[29] !== f || e[30] !== $ || e[31] !== E || e[32] !== y || e[33] !== w ? (M = /* @__PURE__ */ C(ze.Content, { from: "user", maxH: f, overflow: "hidden", p: y, position: w, children: [
2342
+ $,
2343
+ E
2344
+ ] }), e[29] = f, e[30] = $, e[31] = E, e[32] = y, e[33] = w, e[34] = M) : M = e[34];
2334
2345
  let P;
2335
- e[24] !== n.userMessage || e[25] !== a || e[26] !== r || e[27] !== m ? (P = a ? /* @__PURE__ */ c(tl, { label: r ? "Show less" : "Show more", onClick: m, actionPanel: /* @__PURE__ */ c(Yt, { message: n.userMessage, alwaysVisible: !0, copyAlwaysVisible: !1 }) }) : /* @__PURE__ */ c(Yt, { message: n.userMessage, alwaysVisible: !0, copyAlwaysVisible: !1 }), e[24] = n.userMessage, e[25] = a, e[26] = r, e[27] = m, e[28] = P) : P = e[28];
2336
- let E;
2337
- e[29] !== f || e[30] !== L || e[31] !== P || e[32] !== x || e[33] !== b ? (E = /* @__PURE__ */ k(ze.Content, { from: "user", maxH: f, overflow: "hidden", p: x, position: b, children: [
2338
- L,
2339
- P
2340
- ] }), e[29] = f, e[30] = L, e[31] = P, e[32] = x, e[33] = b, e[34] = E) : E = e[34];
2341
- let O;
2342
- e[35] !== E || e[36] !== y ? (O = /* @__PURE__ */ c(B, { position: "sticky", top: "0", zIndex: 1, children: /* @__PURE__ */ c(ze.Root, { from: "user", ...y, children: E }) }), e[35] = E, e[36] = y, e[37] = O) : O = e[37];
2343
- let z;
2346
+ e[35] !== M || e[36] !== b ? (P = /* @__PURE__ */ c(B, { position: "sticky", top: "0", zIndex: 1, children: /* @__PURE__ */ c(ze.Root, { from: "user", ...b, children: M }) }), e[35] = M, e[36] = b, e[37] = P) : P = e[37];
2347
+ let F;
2344
2348
  if (e[38] !== g || e[39] !== n.responses || e[40] !== s || e[41] !== o) {
2345
- let $;
2346
- e[43] !== g || e[44] !== s || e[45] !== o ? ($ = (R) => /* @__PURE__ */ c(B, { children: /* @__PURE__ */ c(ds, { message: R, streaming: o, hideQuestionForms: s, showAssistantActions: R.id === g }) }, R.id), e[43] = g, e[44] = s, e[45] = o, e[46] = $) : $ = e[46], z = n.responses.map($), e[38] = g, e[39] = n.responses, e[40] = s, e[41] = o, e[42] = z;
2349
+ let O;
2350
+ e[43] !== g || e[44] !== s || e[45] !== o ? (O = (z) => /* @__PURE__ */ c(B, { children: /* @__PURE__ */ c(us, { message: z, streaming: o, hideQuestionForms: s, showAssistantActions: z.id === g }) }, z.id), e[43] = g, e[44] = s, e[45] = o, e[46] = O) : O = e[46], F = n.responses.map(O), e[38] = g, e[39] = n.responses, e[40] = s, e[41] = o, e[42] = F;
2347
2351
  } else
2348
- z = e[42];
2349
- let D;
2350
- return e[47] !== O || e[48] !== z ? (D = /* @__PURE__ */ k(B, { children: [
2351
- O,
2352
- z
2353
- ] }), e[47] = O, e[48] = z, e[49] = D) : D = e[49], D;
2352
+ F = e[42];
2353
+ let Q;
2354
+ return e[47] !== P || e[48] !== F ? (Q = /* @__PURE__ */ C(B, { children: [
2355
+ P,
2356
+ F
2357
+ ] }), e[47] = P, e[48] = F, e[49] = Q) : Q = e[49], Q;
2354
2358
  }, Tl = (t, e) => {
2355
2359
  const {
2356
2360
  groups: n,
@@ -2360,7 +2364,7 @@ const ji = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
2360
2364
  animatedItemKeys: i,
2361
2365
  onToggleStickyMessage: l
2362
2366
  } = e;
2363
- return t.type === "leading-response" ? /* @__PURE__ */ c(ds, { message: t.message, streaming: o, hideQuestionForms: n.length > 0 || s, animate: i.has(t.key), showAssistantActions: t.showAssistantActions }) : /* @__PURE__ */ c(wl, { group: t.group, streaming: o, hideQuestionForms: t.groupIndex < n.length - 1 || s, isExpanded: r.has(t.group.userMessage.id), animate: i.has(t.key), onToggleStickyMessage: l });
2367
+ return t.type === "leading-response" ? /* @__PURE__ */ c(us, { message: t.message, streaming: o, hideQuestionForms: n.length > 0 || s, animate: i.has(t.key), showAssistantActions: t.showAssistantActions }) : /* @__PURE__ */ c(wl, { group: t.group, streaming: o, hideQuestionForms: t.groupIndex < n.length - 1 || s, isExpanded: r.has(t.group.userMessage.id), animate: i.has(t.key), onToggleStickyMessage: l });
2364
2368
  }, Al = (t) => {
2365
2369
  const {
2366
2370
  leadingResponses: e,
@@ -2372,29 +2376,29 @@ const ji = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
2372
2376
  onReady: l
2373
2377
  } = t, {
2374
2378
  scrollRef: a
2375
- } = It(), u = fl(e, n), d = or(u.map((h) => h.key)), f = ml(a.current), p = so({
2379
+ } = It(), u = fl(e, n), d = or(u.map((h) => h.key)), f = ml(a.current), m = no({
2376
2380
  count: u.length,
2377
2381
  getScrollElement: () => a.current,
2378
- estimateSize: () => ps,
2382
+ estimateSize: () => fs,
2379
2383
  getItemKey: (h) => u[h]?.key ?? h,
2380
2384
  overscan: dl,
2381
- gap: ms,
2385
+ gap: ps,
2382
2386
  initialRect: {
2383
2387
  width: 0,
2384
2388
  height: f
2385
2389
  },
2386
2390
  initialOffset: () => pl(u.length, f)
2387
- }), m = p.getTotalSize();
2391
+ }), p = m.getTotalSize();
2388
2392
  return bl({
2389
2393
  itemCount: u.length,
2390
2394
  onReady: l,
2391
2395
  scrollRef: a,
2392
- totalSize: m
2396
+ totalSize: p
2393
2397
  }), /* @__PURE__ */ c(B, { px: "xs", children: /* @__PURE__ */ c(B, { position: "relative", width: "100%", style: {
2394
- height: m
2395
- }, children: p.getVirtualItems().map((h) => {
2398
+ height: p
2399
+ }, children: m.getVirtualItems().map((h) => {
2396
2400
  const g = u[h.index];
2397
- return g ? /* @__PURE__ */ c(B, { ref: p.measureElement, "data-index": h.index, "data-chat-message-list-item": g.type, position: "absolute", top: "0", left: "0", width: "100%", style: {
2401
+ return g ? /* @__PURE__ */ c(B, { ref: m.measureElement, "data-index": h.index, "data-chat-message-list-item": g.type, position: "absolute", top: "0", left: "0", width: "100%", style: {
2398
2402
  top: h.start
2399
2403
  }, children: Tl(g, {
2400
2404
  groups: n,
@@ -2406,7 +2410,7 @@ const ji = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
2406
2410
  }) }, h.key) : null;
2407
2411
  }) }) });
2408
2412
  }, Cl = (t) => {
2409
- const e = C(48), {
2413
+ const e = A(48), {
2410
2414
  item: n,
2411
2415
  index: o,
2412
2416
  isFirst: s,
@@ -2417,98 +2421,98 @@ const ji = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
2417
2421
  onRemove: u,
2418
2422
  onDragStart: d,
2419
2423
  onDragEnd: f,
2420
- onDragOver: p,
2421
- onDrop: m
2422
- } = t, h = !!a, g = !!u, y = !s || !r, x = `Drag queued follow-up ${o + 1}`, b = s ? "0" : "1px", S = l ? "border.accent-light" : "border.subtle", w = s ? "0" : "2xs", T = i ? "bg.muted" : void 0;
2423
- let A;
2424
- e[0] !== n.id || e[1] !== p ? (A = (W) => p(W, n.id), e[0] = n.id, e[1] = p, e[2] = A) : A = e[2];
2425
- let _;
2426
- e[3] !== n.id || e[4] !== m ? (_ = (W) => m(W, n.id), e[3] = n.id, e[4] = m, e[5] = _) : _ = e[5];
2427
- const v = y ? "grab" : "default", F = !y;
2424
+ onDragOver: m,
2425
+ onDrop: p
2426
+ } = t, h = !!a, g = !!u, b = !s || !r, y = `Drag queued follow-up ${o + 1}`, w = s ? "0" : "1px", x = l ? "border.accent-light" : "border.subtle", S = s ? "0" : "2xs", T = i ? "bg.muted" : void 0;
2427
+ let k;
2428
+ e[0] !== n.id || e[1] !== m ? (k = (H) => m(H, n.id), e[0] = n.id, e[1] = m, e[2] = k) : k = e[2];
2429
+ let I;
2430
+ e[3] !== n.id || e[4] !== p ? (I = (H) => p(H, n.id), e[3] = n.id, e[4] = p, e[5] = I) : I = e[5];
2431
+ const v = b ? "grab" : "default", L = !b;
2432
+ let D;
2433
+ e[6] !== n.id || e[7] !== d ? (D = (H) => {
2434
+ H.dataTransfer.effectAllowed = "move", H.dataTransfer.setData("text/plain", n.id), d(n.id);
2435
+ }, e[6] = n.id, e[7] = d, e[8] = D) : D = e[8];
2436
+ let $;
2437
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = /* @__PURE__ */ c(Ht, { as: Us, boxSize: "14px" }), e[9] = $) : $ = e[9];
2438
+ let E;
2439
+ e[10] !== b || e[11] !== y || e[12] !== f || e[13] !== v || e[14] !== L || e[15] !== D ? (E = /* @__PURE__ */ c(ot, { size: "2xs", variant: "ghost", draggable: b, "aria-label": y, title: y, color: "fg.muted", cursor: v, disabled: L, onDragStart: D, onDragEnd: f, children: $ }), e[10] = b, e[11] = y, e[12] = f, e[13] = v, e[14] = L, e[15] = D, e[16] = E) : E = e[16];
2428
2440
  let M;
2429
- e[6] !== n.id || e[7] !== d ? (M = (W) => {
2430
- W.dataTransfer.effectAllowed = "move", W.dataTransfer.setData("text/plain", n.id), d(n.id);
2431
- }, e[6] = n.id, e[7] = d, e[8] = M) : M = e[8];
2432
- let L;
2433
- e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ c(Ht, { as: js, boxSize: "14px" }), e[9] = L) : L = e[9];
2441
+ e[17] !== n.prompt ? (M = /* @__PURE__ */ c(j, { textStyle: "label/S/regular", color: "fg", lineClamp: 2, minWidth: "0", children: n.prompt }), e[17] = n.prompt, e[18] = M) : M = e[18];
2434
2442
  let P;
2435
- e[10] !== y || e[11] !== x || e[12] !== f || e[13] !== v || e[14] !== F || e[15] !== M ? (P = /* @__PURE__ */ c(nt, { size: "2xs", variant: "ghost", draggable: y, "aria-label": x, title: x, color: "fg.muted", cursor: v, disabled: F, onDragStart: M, onDragEnd: f, children: L }), e[10] = y, e[11] = x, e[12] = f, e[13] = v, e[14] = F, e[15] = M, e[16] = P) : P = e[16];
2436
- let E;
2437
- e[17] !== n.prompt ? (E = /* @__PURE__ */ c(U, { textStyle: "label/S/regular", color: "fg", lineClamp: 2, minWidth: "0", children: n.prompt }), e[17] = n.prompt, e[18] = E) : E = e[18];
2438
- let O;
2439
- e[19] !== n.attachments ? (O = n.attachments?.length ? /* @__PURE__ */ k(ks, { width: "fit-content", size: "sm", variant: "outline", colorPalette: "gray", children: [
2443
+ e[19] !== n.attachments ? (P = n.attachments?.length ? /* @__PURE__ */ C(Cs, { width: "fit-content", size: "sm", variant: "outline", colorPalette: "gray", children: [
2440
2444
  n.attachments.length,
2441
2445
  " attachments"
2442
- ] }) : null, e[19] = n.attachments, e[20] = O) : O = e[20];
2446
+ ] }) : null, e[19] = n.attachments, e[20] = P) : P = e[20];
2447
+ let F;
2448
+ e[21] !== M || e[22] !== P ? (F = /* @__PURE__ */ C(G, { gap: "2xs", flex: "1", minWidth: "0", children: [
2449
+ M,
2450
+ P
2451
+ ] }), e[21] = M, e[22] = P, e[23] = F) : F = e[23];
2452
+ let Q;
2453
+ e[24] !== h || e[25] !== n || e[26] !== a ? (Q = h ? /* @__PURE__ */ c(ot, { size: "2xs", variant: "ghost", "aria-label": "Edit queued follow-up", onClick: () => a?.(n), children: /* @__PURE__ */ c(Ht, { as: js, boxSize: "14px" }) }) : null, e[24] = h, e[25] = n, e[26] = a, e[27] = Q) : Q = e[27];
2454
+ let O;
2455
+ e[28] !== g || e[29] !== n.id || e[30] !== u ? (O = g ? /* @__PURE__ */ c(ot, { size: "2xs", variant: "ghost", "aria-label": "Remove queued follow-up", colorPalette: "red", onClick: () => u?.(n.id), children: /* @__PURE__ */ c(Ht, { as: En, boxSize: "14px" }) }) : null, e[28] = g, e[29] = n.id, e[30] = u, e[31] = O) : O = e[31];
2443
2456
  let z;
2444
- e[21] !== E || e[22] !== O ? (z = /* @__PURE__ */ k(G, { gap: "2xs", flex: "1", minWidth: "0", children: [
2445
- E,
2457
+ e[32] !== Q || e[33] !== O ? (z = /* @__PURE__ */ C(ce, { gap: "2xs", flexShrink: 0, children: [
2458
+ Q,
2446
2459
  O
2447
- ] }), e[21] = E, e[22] = O, e[23] = z) : z = e[23];
2448
- let D;
2449
- e[24] !== h || e[25] !== n || e[26] !== a ? (D = h ? /* @__PURE__ */ c(nt, { size: "2xs", variant: "ghost", "aria-label": "Edit queued follow-up", onClick: () => a?.(n), children: /* @__PURE__ */ c(Ht, { as: Ks, boxSize: "14px" }) }) : null, e[24] = h, e[25] = n, e[26] = a, e[27] = D) : D = e[27];
2450
- let $;
2451
- e[28] !== g || e[29] !== n.id || e[30] !== u ? ($ = g ? /* @__PURE__ */ c(nt, { size: "2xs", variant: "ghost", "aria-label": "Remove queued follow-up", colorPalette: "red", onClick: () => u?.(n.id), children: /* @__PURE__ */ c(Ht, { as: Bn, boxSize: "14px" }) }) : null, e[28] = g, e[29] = n.id, e[30] = u, e[31] = $) : $ = e[31];
2460
+ ] }), e[32] = Q, e[33] = O, e[34] = z) : z = e[34];
2452
2461
  let R;
2453
- e[32] !== D || e[33] !== $ ? (R = /* @__PURE__ */ k(ae, { gap: "2xs", flexShrink: 0, children: [
2454
- D,
2455
- $
2456
- ] }), e[32] = D, e[33] = $, e[34] = R) : R = e[34];
2457
- let q;
2458
- e[35] !== P || e[36] !== z || e[37] !== R ? (q = /* @__PURE__ */ k(ae, { gap: "xs", alignItems: "flex-start", children: [
2459
- P,
2460
- z,
2461
- R
2462
- ] }), e[35] = P, e[36] = z, e[37] = R, e[38] = q) : q = e[38];
2463
- let j;
2464
- return e[39] !== n.id || e[40] !== b || e[41] !== S || e[42] !== q || e[43] !== w || e[44] !== T || e[45] !== A || e[46] !== _ ? (j = /* @__PURE__ */ c(B, { minWidth: "0", borderTopWidth: b, borderColor: S, paddingTop: w, paddingBottom: "2xs", bg: T, onDragOver: A, onDrop: _, "data-queued-follow-up-id": n.id, children: q }), e[39] = n.id, e[40] = b, e[41] = S, e[42] = q, e[43] = w, e[44] = T, e[45] = A, e[46] = _, e[47] = j) : j = e[47], j;
2462
+ e[35] !== E || e[36] !== F || e[37] !== z ? (R = /* @__PURE__ */ C(ce, { gap: "xs", alignItems: "flex-start", children: [
2463
+ E,
2464
+ F,
2465
+ z
2466
+ ] }), e[35] = E, e[36] = F, e[37] = z, e[38] = R) : R = e[38];
2467
+ let W;
2468
+ return e[39] !== n.id || e[40] !== w || e[41] !== x || e[42] !== R || e[43] !== S || e[44] !== T || e[45] !== k || e[46] !== I ? (W = /* @__PURE__ */ c(B, { minWidth: "0", borderTopWidth: w, borderColor: x, paddingTop: S, paddingBottom: "2xs", bg: T, onDragOver: k, onDrop: I, "data-queued-follow-up-id": n.id, children: R }), e[39] = n.id, e[40] = w, e[41] = x, e[42] = R, e[43] = S, e[44] = T, e[45] = k, e[46] = I, e[47] = W) : W = e[47], W;
2465
2469
  }, kl = (t) => {
2466
- const e = C(24), {
2470
+ const e = A(24), {
2467
2471
  items: n,
2468
2472
  editingItemId: o,
2469
2473
  onEdit: s,
2470
2474
  onRemove: r,
2471
2475
  onMove: i
2472
- } = t, [l, a] = H(null), [u, d] = H(null);
2476
+ } = t, [l, a] = V(null), [u, d] = V(null);
2473
2477
  if (n.length === 0)
2474
2478
  return null;
2475
2479
  let f;
2476
- e[0] !== l ? (f = (x, b) => {
2477
- !l || l === b || (x.preventDefault(), x.dataTransfer.dropEffect = "move", d(b));
2480
+ e[0] !== l ? (f = (y, w) => {
2481
+ !l || l === w || (y.preventDefault(), y.dataTransfer.dropEffect = "move", d(w));
2478
2482
  }, e[0] = l, e[1] = f) : f = e[1];
2479
- const p = f;
2480
- let m;
2481
- e[2] !== l || e[3] !== n || e[4] !== i ? (m = (x, b) => {
2482
- x.preventDefault();
2483
- const S = l ?? x.dataTransfer.getData("text/plain");
2484
- if (a(null), d(null), !S || S === b)
2483
+ const m = f;
2484
+ let p;
2485
+ e[2] !== l || e[3] !== n || e[4] !== i ? (p = (y, w) => {
2486
+ y.preventDefault();
2487
+ const x = l ?? y.dataTransfer.getData("text/plain");
2488
+ if (a(null), d(null), !x || x === w)
2485
2489
  return;
2486
- const w = n.findIndex((_) => _.id === S), T = n.findIndex((_) => _.id === b);
2487
- if (w === -1 || T === -1 || w === T)
2490
+ const S = n.findIndex((I) => I.id === x), T = n.findIndex((I) => I.id === w);
2491
+ if (S === -1 || T === -1 || S === T)
2488
2492
  return;
2489
- const A = T < w ? "up" : "down";
2490
- i?.(S, A, Math.abs(T - w));
2491
- }, e[2] = l, e[3] = n, e[4] = i, e[5] = m) : m = e[5];
2492
- const h = m;
2493
+ const k = T < S ? "up" : "down";
2494
+ i?.(x, k, Math.abs(T - S));
2495
+ }, e[2] = l, e[3] = n, e[4] = i, e[5] = p) : p = e[5];
2496
+ const h = p;
2493
2497
  let g;
2494
- if (e[6] !== u || e[7] !== o || e[8] !== p || e[9] !== h || e[10] !== n || e[11] !== s || e[12] !== r) {
2495
- let x;
2496
- e[14] !== u || e[15] !== o || e[16] !== p || e[17] !== h || e[18] !== n.length || e[19] !== s || e[20] !== r ? (x = (b, S) => /* @__PURE__ */ c(Cl, { item: b, index: S, isFirst: S === 0, isLast: S === n.length - 1, isEditing: o === b.id, isDragTarget: u === b.id, onEdit: s, onRemove: r, onDragStart: a, onDragEnd: () => {
2498
+ if (e[6] !== u || e[7] !== o || e[8] !== m || e[9] !== h || e[10] !== n || e[11] !== s || e[12] !== r) {
2499
+ let y;
2500
+ e[14] !== u || e[15] !== o || e[16] !== m || e[17] !== h || e[18] !== n.length || e[19] !== s || e[20] !== r ? (y = (w, x) => /* @__PURE__ */ c(Cl, { item: w, index: x, isFirst: x === 0, isLast: x === n.length - 1, isEditing: o === w.id, isDragTarget: u === w.id, onEdit: s, onRemove: r, onDragStart: a, onDragEnd: () => {
2497
2501
  a(null), d(null);
2498
- }, onDragOver: p, onDrop: h }, b.id), e[14] = u, e[15] = o, e[16] = p, e[17] = h, e[18] = n.length, e[19] = s, e[20] = r, e[21] = x) : x = e[21], g = n.map(x), e[6] = u, e[7] = o, e[8] = p, e[9] = h, e[10] = n, e[11] = s, e[12] = r, e[13] = g;
2502
+ }, onDragOver: m, onDrop: h }, w.id), e[14] = u, e[15] = o, e[16] = m, e[17] = h, e[18] = n.length, e[19] = s, e[20] = r, e[21] = y) : y = e[21], g = n.map(y), e[6] = u, e[7] = o, e[8] = m, e[9] = h, e[10] = n, e[11] = s, e[12] = r, e[13] = g;
2499
2503
  } else
2500
2504
  g = e[13];
2501
- let y;
2502
- return e[22] !== g ? (y = /* @__PURE__ */ c(G, { gap: "2xs", paddingX: "0", paddingY: "xs", borderWidth: "1px", borderBottomWidth: "0", borderColor: "border", borderTopRadius: "xs", background: "bg", children: g }), e[22] = g, e[23] = y) : y = e[23], y;
2505
+ let b;
2506
+ return e[22] !== g ? (b = /* @__PURE__ */ c(G, { gap: "2xs", paddingX: "0", paddingY: "xs", borderWidth: "1px", borderBottomWidth: "0", borderColor: "border", borderTopRadius: "xs", background: "bg", children: g }), e[22] = g, e[23] = b) : b = e[23], b;
2503
2507
  }, Il = (t) => {
2504
2508
  const e = Math.max(0, Math.floor(t));
2505
2509
  if (e < 60) return `${e}s`;
2506
2510
  const n = Math.floor(e / 60);
2507
2511
  return n < 60 ? `${n}m ${String(e % 60).padStart(2, "0")}s` : `${Math.floor(n / 60)}h ${String(n % 60).padStart(2, "0")}m`;
2508
2512
  }, _l = (t) => {
2509
- const e = C(9), {
2513
+ const e = A(9), {
2510
2514
  hidden: n
2511
- } = t, o = n === void 0 ? !1 : n, [s, r] = H(0);
2515
+ } = t, o = n === void 0 ? !1 : n, [s, r] = V(0);
2512
2516
  let i;
2513
2517
  e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = Date.now(), e[0] = i) : i = e[0];
2514
2518
  const l = Te(i);
@@ -2516,64 +2520,64 @@ const ji = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
2516
2520
  if (e[1] !== o ? (a = () => {
2517
2521
  if (o)
2518
2522
  return;
2519
- const m = () => r((Date.now() - l.current) / 1e3);
2520
- m();
2521
- const h = setInterval(m, 1e3);
2523
+ const p = () => r((Date.now() - l.current) / 1e3);
2524
+ p();
2525
+ const h = setInterval(p, 1e3);
2522
2526
  return () => clearInterval(h);
2523
- }, u = [o], e[1] = o, e[2] = a, e[3] = u) : (a = e[2], u = e[3]), le(a, u), o)
2527
+ }, u = [o], e[1] = o, e[2] = a, e[3] = u) : (a = e[2], u = e[3]), ae(a, u), o)
2524
2528
  return null;
2525
2529
  let d;
2526
2530
  e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ c(nn, { size: "xs", color: "fg.muted" }), e[4] = d) : d = e[4];
2527
2531
  let f;
2528
2532
  e[5] !== s ? (f = Il(s), e[5] = s, e[6] = f) : f = e[6];
2529
- let p;
2530
- return e[7] !== f ? (p = /* @__PURE__ */ k(ae, { gap: "2xs", px: "sm", py: "xs", children: [
2533
+ let m;
2534
+ return e[7] !== f ? (m = /* @__PURE__ */ C(ce, { gap: "2xs", px: "sm", py: "xs", children: [
2531
2535
  d,
2532
- /* @__PURE__ */ c(U, { fontFamily: "mono", fontSize: "xs", color: "fg.muted", letterSpacing: "-0.2px", children: f })
2533
- ] }), e[7] = f, e[8] = p) : p = e[8], p;
2536
+ /* @__PURE__ */ c(j, { fontFamily: "mono", fontSize: "xs", color: "fg.muted", letterSpacing: "-0.2px", children: f })
2537
+ ] }), e[7] = f, e[8] = m) : m = e[8], m;
2534
2538
  }, vl = (t) => {
2535
- const e = C(19), {
2539
+ const e = A(19), {
2536
2540
  queuedFollowUps: n,
2537
2541
  defaultValue: o,
2538
2542
  onChange: s,
2539
2543
  onSubmit: r,
2540
2544
  onUpdate: i
2541
- } = t, [l, a] = H(null), [u, d] = H(""), [f, p] = H(0), m = l ? u : o;
2545
+ } = t, [l, a] = V(null), [u, d] = V(""), [f, m] = V(0), p = l ? u : o;
2542
2546
  let h, g;
2543
2547
  e[0] !== l || e[1] !== n ? (h = () => {
2544
2548
  l && (n.some((v) => v.id === l) || (a(null), d("")));
2545
- }, g = [l, n], e[0] = l, e[1] = n, e[2] = h, e[3] = g) : (h = e[2], g = e[3]), le(h, g);
2546
- let y;
2547
- e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = (v) => {
2548
- a(v.id), d(v.prompt), p(Ml);
2549
- }, e[4] = y) : y = e[4];
2550
- const x = y;
2549
+ }, g = [l, n], e[0] = l, e[1] = n, e[2] = h, e[3] = g) : (h = e[2], g = e[3]), ae(h, g);
2551
2550
  let b;
2552
- e[5] !== l || e[6] !== s ? (b = (v) => {
2553
- l || s?.(v);
2554
- }, e[5] = l, e[6] = s, e[7] = b) : b = e[7];
2555
- const S = b;
2551
+ e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = (v) => {
2552
+ a(v.id), d(v.prompt), m(Ml);
2553
+ }, e[4] = b) : b = e[4];
2554
+ const y = b;
2556
2555
  let w;
2557
- e[8] !== l || e[9] !== r || e[10] !== i ? (w = (v, F, M) => {
2556
+ e[5] !== l || e[6] !== s ? (w = (v) => {
2557
+ l || s?.(v);
2558
+ }, e[5] = l, e[6] = s, e[7] = w) : w = e[7];
2559
+ const x = w;
2560
+ let S;
2561
+ e[8] !== l || e[9] !== r || e[10] !== i ? (S = (v, L, D) => {
2558
2562
  if (l) {
2559
2563
  i?.(l, v), a(null), d("");
2560
2564
  return;
2561
2565
  }
2562
- r?.(v, F, M);
2563
- }, e[8] = l, e[9] = r, e[10] = i, e[11] = w) : w = e[11];
2564
- const T = w, A = !!l;
2565
- let _;
2566
- return e[12] !== S || e[13] !== l || e[14] !== f || e[15] !== m || e[16] !== T || e[17] !== A ? (_ = {
2567
- change: S,
2568
- edit: x,
2566
+ r?.(v, L, D);
2567
+ }, e[8] = l, e[9] = r, e[10] = i, e[11] = S) : S = e[11];
2568
+ const T = S, k = !!l;
2569
+ let I;
2570
+ return e[12] !== x || e[13] !== l || e[14] !== f || e[15] !== p || e[16] !== T || e[17] !== k ? (I = {
2571
+ change: x,
2572
+ edit: y,
2569
2573
  editingItemId: l,
2570
2574
  focusSignal: f,
2571
- inputValue: m,
2572
- isEditing: A,
2575
+ inputValue: p,
2576
+ isEditing: k,
2573
2577
  submit: T
2574
- }, e[12] = S, e[13] = l, e[14] = f, e[15] = m, e[16] = T, e[17] = A, e[18] = _) : _ = e[18], _;
2578
+ }, e[12] = x, e[13] = l, e[14] = f, e[15] = p, e[16] = T, e[17] = k, e[18] = I) : I = e[18], I;
2575
2579
  }, Rl = (t) => {
2576
- const e = C(43), {
2580
+ const e = A(44), {
2577
2581
  actions: n,
2578
2582
  attachedResources: o,
2579
2583
  attachmentList: s,
@@ -2583,36 +2587,37 @@ const ji = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
2583
2587
  chatInputReferences: a,
2584
2588
  hasWorkspaceHub: u,
2585
2589
  inputDisabled: d,
2586
- onAttachFiles: f,
2590
+ submitDisabled: f,
2591
+ onAttachFiles: m,
2587
2592
  onAttachText: p,
2588
- onChatInputAddReference: m,
2589
- onClearAttachments: h,
2590
- onInterrupt: g,
2593
+ onChatInputAddReference: h,
2594
+ onClearAttachments: g,
2595
+ onInterrupt: b,
2591
2596
  onQueuedFollowUpMove: y,
2592
- onQueuedFollowUpRemove: x,
2593
- onQueuedFollowUpUpdate: b,
2597
+ onQueuedFollowUpRemove: w,
2598
+ onQueuedFollowUpUpdate: x,
2594
2599
  queuedComposer: S,
2595
- queuedFollowUps: w,
2596
- streaming: T,
2597
- workspaceHub: A
2598
- } = t, _ = w.length > 0, v = u ? "2xs" : "xs", F = u ? "2xs" : "0", M = u ? "2xs" : void 0, L = u ? "1px" : void 0, P = u ? "border" : void 0, E = u ? "sm" : void 0, O = u ? "bg.subtle" : void 0, z = b ? S.edit : void 0;
2599
- let D;
2600
- e[0] !== y || e[1] !== x || e[2] !== S.editingItemId || e[3] !== w || e[4] !== z ? (D = /* @__PURE__ */ c(kl, { items: w, editingItemId: S.editingItemId, onEdit: z, onRemove: x, onMove: y }), e[0] = y, e[1] = x, e[2] = S.editingItemId, e[3] = w, e[4] = z, e[5] = D) : D = e[5];
2601
- let $;
2602
- e[6] !== S.inputValue ? ($ = tr(S.inputValue), e[6] = S.inputValue, e[7] = $) : $ = e[7];
2600
+ queuedFollowUps: T,
2601
+ streaming: k,
2602
+ workspaceHub: I
2603
+ } = t, v = T.length > 0, L = u ? "2xs" : "xs", D = u ? "2xs" : "0", $ = u ? "2xs" : void 0, E = u ? "1px" : void 0, M = u ? "border" : void 0, P = u ? "sm" : void 0, F = u ? "bg.subtle" : void 0, Q = x ? S.edit : void 0;
2604
+ let O;
2605
+ e[0] !== y || e[1] !== w || e[2] !== S.editingItemId || e[3] !== T || e[4] !== Q ? (O = /* @__PURE__ */ c(kl, { items: T, editingItemId: S.editingItemId, onEdit: Q, onRemove: w, onMove: y }), e[0] = y, e[1] = w, e[2] = S.editingItemId, e[3] = T, e[4] = Q, e[5] = O) : O = e[5];
2606
+ let z;
2607
+ e[6] !== S.inputValue ? (z = tr(S.inputValue), e[6] = S.inputValue, e[7] = z) : z = e[7];
2603
2608
  const R = S.isEditing ? "Save queued follow-up" : void 0;
2604
- let q;
2605
- e[8] !== n || e[9] !== o || e[10] !== s || e[11] !== r || e[12] !== i || e[13] !== l || e[14] !== a || e[15] !== _ || e[16] !== u || e[17] !== d || e[18] !== f || e[19] !== p || e[20] !== m || e[21] !== h || e[22] !== g || e[23] !== S.change || e[24] !== S.focusSignal || e[25] !== S.submit || e[26] !== T || e[27] !== R || e[28] !== $ ? (q = /* @__PURE__ */ c(No, { placeholder: i, defaultState: $, streaming: T, onSubmit: S.submit, onInterrupt: g, onAttachFiles: f, onAttachText: p, onChange: S.change, actions: n, attachedResources: o, onClearAttachments: h, attachmentList: s, isDisabled: d, attachedToTop: _, recessed: u, questionPrompt: l, autoFocus: r, focusSignal: S.focusSignal, submitTitle: R, references: a, onAddReference: m }), e[8] = n, e[9] = o, e[10] = s, e[11] = r, e[12] = i, e[13] = l, e[14] = a, e[15] = _, e[16] = u, e[17] = d, e[18] = f, e[19] = p, e[20] = m, e[21] = h, e[22] = g, e[23] = S.change, e[24] = S.focusSignal, e[25] = S.submit, e[26] = T, e[27] = R, e[28] = $, e[29] = q) : q = e[29];
2606
- let j;
2607
- e[30] !== F || e[31] !== q || e[32] !== M || e[33] !== L || e[34] !== P || e[35] !== E || e[36] !== O || e[37] !== D || e[38] !== A ? (j = /* @__PURE__ */ k(G, { gap: F, p: M, borderWidth: L, borderColor: P, borderRadius: E, bg: O, children: [
2608
- A,
2609
- D,
2610
- q
2611
- ] }), e[30] = F, e[31] = q, e[32] = M, e[33] = L, e[34] = P, e[35] = E, e[36] = O, e[37] = D, e[38] = A, e[39] = j) : j = e[39];
2612
2609
  let W;
2613
- return e[40] !== v || e[41] !== j ? (W = /* @__PURE__ */ c(G, { px: v, gap: "0", children: j }), e[40] = v, e[41] = j, e[42] = W) : W = e[42], W;
2610
+ e[8] !== n || e[9] !== o || e[10] !== s || e[11] !== r || e[12] !== i || e[13] !== l || e[14] !== a || e[15] !== v || e[16] !== u || e[17] !== d || e[18] !== m || e[19] !== p || e[20] !== h || e[21] !== g || e[22] !== b || e[23] !== S.change || e[24] !== S.focusSignal || e[25] !== S.submit || e[26] !== k || e[27] !== f || e[28] !== R || e[29] !== z ? (W = /* @__PURE__ */ c(No, { placeholder: i, defaultState: z, streaming: k, onSubmit: S.submit, onInterrupt: b, onAttachFiles: m, onAttachText: p, onChange: S.change, actions: n, attachedResources: o, onClearAttachments: g, attachmentList: s, isDisabled: d, submitDisabled: f, attachedToTop: v, recessed: u, questionPrompt: l, autoFocus: r, focusSignal: S.focusSignal, submitTitle: R, references: a, onAddReference: h }), e[8] = n, e[9] = o, e[10] = s, e[11] = r, e[12] = i, e[13] = l, e[14] = a, e[15] = v, e[16] = u, e[17] = d, e[18] = m, e[19] = p, e[20] = h, e[21] = g, e[22] = b, e[23] = S.change, e[24] = S.focusSignal, e[25] = S.submit, e[26] = k, e[27] = f, e[28] = R, e[29] = z, e[30] = W) : W = e[30];
2611
+ let H;
2612
+ e[31] !== D || e[32] !== W || e[33] !== $ || e[34] !== E || e[35] !== M || e[36] !== P || e[37] !== F || e[38] !== O || e[39] !== I ? (H = /* @__PURE__ */ C(G, { gap: D, p: $, borderWidth: E, borderColor: M, borderRadius: P, bg: F, children: [
2613
+ I,
2614
+ O,
2615
+ W
2616
+ ] }), e[31] = D, e[32] = W, e[33] = $, e[34] = E, e[35] = M, e[36] = P, e[37] = F, e[38] = O, e[39] = I, e[40] = H) : H = e[40];
2617
+ let ne;
2618
+ return e[41] !== L || e[42] !== H ? (ne = /* @__PURE__ */ c(G, { px: L, gap: "0", children: H }), e[41] = L, e[42] = H, e[43] = ne) : ne = e[43], ne;
2614
2619
  }, ea = (t) => {
2615
- const e = C(77), {
2620
+ const e = A(78), {
2616
2621
  conversationKey: n,
2617
2622
  messages: o,
2618
2623
  loading: s,
@@ -2623,97 +2628,98 @@ const ji = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
2623
2628
  loaderComponent: u,
2624
2629
  chatInputPlaceholder: d,
2625
2630
  chatInputDefaultValue: f,
2626
- onSubmitMessage: p,
2627
- onInterrupt: m,
2631
+ onSubmitMessage: m,
2632
+ onInterrupt: p,
2628
2633
  onAttachFiles: h,
2629
2634
  onAttachText: g,
2630
- onChatInputChange: y,
2631
- actions: x,
2632
- attachedResources: b,
2633
- onClearAttachments: S,
2634
- attachmentList: w,
2635
+ onChatInputChange: b,
2636
+ actions: y,
2637
+ attachedResources: w,
2638
+ onClearAttachments: x,
2639
+ attachmentList: S,
2635
2640
  approvalPrompt: T,
2636
- workspaceHub: A,
2637
- workspaceInitializing: _,
2641
+ workspaceHub: k,
2642
+ workspaceInitializing: I,
2638
2643
  inputDisabled: v,
2639
- chatInputQuestionPrompt: F,
2640
- chatInputAutoFocus: M,
2641
- queuedFollowUps: L,
2642
- onQueuedFollowUpUpdate: P,
2643
- onQueuedFollowUpRemove: E,
2644
- onQueuedFollowUpMove: O,
2645
- chatInputReferences: z,
2646
- onChatInputAddReference: D
2647
- } = t, $ = s === void 0 ? !1 : s, R = r === void 0 ? !1 : r, q = f === void 0 ? "" : f, j = _ === void 0 ? !1 : _, W = v === void 0 ? !1 : v, _e = M === void 0 ? !1 : M;
2644
+ submitDisabled: L,
2645
+ chatInputQuestionPrompt: D,
2646
+ chatInputAutoFocus: $,
2647
+ queuedFollowUps: E,
2648
+ onQueuedFollowUpUpdate: M,
2649
+ onQueuedFollowUpRemove: P,
2650
+ onQueuedFollowUpMove: F,
2651
+ chatInputReferences: Q,
2652
+ onChatInputAddReference: O
2653
+ } = t, z = s === void 0 ? !1 : s, R = r === void 0 ? !1 : r, W = f === void 0 ? "" : f, H = I === void 0 ? !1 : I, ne = v === void 0 ? !1 : v, We = L === void 0 ? !1 : L, _e = $ === void 0 ? !1 : $;
2648
2654
  let ve;
2649
- e[0] !== L ? (ve = L === void 0 ? [] : L, e[0] = L, e[1] = ve) : ve = e[1];
2650
- const ue = ve;
2655
+ e[0] !== E ? (ve = E === void 0 ? [] : E, e[0] = E, e[1] = ve) : ve = e[1];
2656
+ const de = ve;
2651
2657
  let Re;
2652
- e[2] !== z ? (Re = z === void 0 ? [] : z, e[2] = z, e[3] = Re) : Re = e[3];
2653
- const Ne = Re;
2654
- let Y, ee, de, fe, N;
2658
+ e[2] !== Q ? (Re = Q === void 0 ? [] : Q, e[2] = Q, e[3] = Re) : Re = e[3];
2659
+ const Ue = Re;
2660
+ let Y, ee, fe, pe, U;
2655
2661
  if (e[4] !== n || e[5] !== o || e[6] !== R) {
2656
2662
  const X = Zi(o, {
2657
2663
  streaming: R
2658
2664
  });
2659
- Y = X.length > 0, de = n ?? X[0]?.id, ee = Y ? de ?? "active-conversation" : null, N = X.reduce(Pl, 0), fe = el(X), e[4] = n, e[5] = o, e[6] = R, e[7] = Y, e[8] = ee, e[9] = de, e[10] = fe, e[11] = N;
2665
+ Y = X.length > 0, fe = n ?? X[0]?.id, ee = Y ? fe ?? "active-conversation" : null, U = X.reduce(Pl, 0), pe = el(X), e[4] = n, e[5] = o, e[6] = R, e[7] = Y, e[8] = ee, e[9] = fe, e[10] = pe, e[11] = U;
2660
2666
  } else
2661
- Y = e[7], ee = e[8], de = e[9], fe = e[10], N = e[11];
2667
+ Y = e[7], ee = e[8], fe = e[9], pe = e[10], U = e[11];
2662
2668
  const {
2663
2669
  groups: Me,
2664
2670
  leadingResponses: Pe
2665
- } = fe, [J, Ue] = H(El), [We, rt] = H(null), je = !Y && $;
2666
- let He;
2667
- e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (He = /* @__PURE__ */ c(Xs, { size: 48, strokeWidth: 1.5 }), e[12] = He) : He = e[12];
2668
- let pe;
2669
- e[13] !== l || e[14] !== i ? (pe = /* @__PURE__ */ c(no, { icon: He, title: i, description: l }), e[13] = l, e[14] = i, e[15] = pe) : pe = e[15];
2670
- const Ee = je ? u : a ?? pe, De = !!A;
2671
+ } = pe, [J, je] = V(Dl), [He, lt] = V(null), Ke = !Y && z;
2672
+ let Ve;
2673
+ e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Ve = /* @__PURE__ */ c(Ks, { size: 48, strokeWidth: 1.5 }), e[12] = Ve) : Ve = e[12];
2671
2674
  let me;
2672
- e[16] !== F || e[17] !== o ? (me = F ?? er(o), e[16] = F, e[17] = o, e[18] = me) : me = e[18];
2673
- const ne = me, Be = !!ne, Fe = R && Y && !j && !ne, he = !ee || We === ee;
2674
- let ge;
2675
- e[19] !== q || e[20] !== y || e[21] !== P || e[22] !== p || e[23] !== ue ? (ge = {
2676
- queuedFollowUps: ue,
2677
- defaultValue: q,
2678
- onChange: y,
2679
- onSubmit: p,
2680
- onUpdate: P
2681
- }, e[19] = q, e[20] = y, e[21] = P, e[22] = p, e[23] = ue, e[24] = ge) : ge = e[24];
2682
- const Le = vl(ge);
2675
+ e[13] !== l || e[14] !== i ? (me = /* @__PURE__ */ c(to, { icon: Ve, title: i, description: l }), e[13] = l, e[14] = i, e[15] = me) : me = e[15];
2676
+ const De = Ke ? u : a ?? me, Ee = !!k;
2677
+ let he;
2678
+ e[16] !== D || e[17] !== o ? (he = D ?? er(o), e[16] = D, e[17] = o, e[18] = he) : he = e[18];
2679
+ const se = he, Be = !!se, Fe = R && Y && !H && !se, ge = !ee || He === ee;
2683
2680
  let be;
2684
- e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (be = (X) => {
2685
- Ue((Xe) => {
2686
- const $e = new Set(Xe);
2681
+ e[19] !== W || e[20] !== b || e[21] !== M || e[22] !== m || e[23] !== de ? (be = {
2682
+ queuedFollowUps: de,
2683
+ defaultValue: W,
2684
+ onChange: b,
2685
+ onSubmit: m,
2686
+ onUpdate: M
2687
+ }, e[19] = W, e[20] = b, e[21] = M, e[22] = m, e[23] = de, e[24] = be) : be = e[24];
2688
+ const Le = vl(be);
2689
+ let ye;
2690
+ e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ye = (X) => {
2691
+ je((Ge) => {
2692
+ const $e = new Set(Ge);
2687
2693
  return $e.has(X) ? $e.delete(X) : $e.add(X), $e;
2688
2694
  });
2689
- }, e[25] = be) : be = e[25];
2690
- const Ke = be, lt = de ?? null;
2691
- let se;
2692
- e[26] !== lt || e[27] !== N ? (se = /* @__PURE__ */ c(Ao, { conversationKey: lt, userMessageCount: N }), e[26] = lt, e[27] = N, e[28] = se) : se = e[28];
2693
- const Ve = he ? "visible" : "hidden";
2695
+ }, e[25] = ye) : ye = e[25];
2696
+ const Xe = ye, ct = fe ?? null;
2697
+ let oe;
2698
+ e[26] !== ct || e[27] !== U ? (oe = /* @__PURE__ */ c(To, { conversationKey: ct, userMessageCount: U }), e[26] = ct, e[27] = U, e[28] = oe) : oe = e[28];
2699
+ const Ne = ge ? "visible" : "hidden";
2694
2700
  let Z;
2695
- e[29] !== Ee || e[30] !== J || e[31] !== Me || e[32] !== Y || e[33] !== Be || e[34] !== Pe || e[35] !== ee || e[36] !== R ? (Z = Y ? /* @__PURE__ */ c(Al, { leadingResponses: Pe, groups: Me, streaming: R, hideActiveQuestionForms: Be, expandedStickyMessageIds: J, onToggleStickyMessage: Ke, onReady: () => rt(ee) }, ee) : Ee, e[29] = Ee, e[30] = J, e[31] = Me, e[32] = Y, e[33] = Be, e[34] = Pe, e[35] = ee, e[36] = R, e[37] = Z) : Z = e[37];
2701
+ e[29] !== De || e[30] !== J || e[31] !== Me || e[32] !== Y || e[33] !== Be || e[34] !== Pe || e[35] !== ee || e[36] !== R ? (Z = Y ? /* @__PURE__ */ c(Al, { leadingResponses: Pe, groups: Me, streaming: R, hideActiveQuestionForms: Be, expandedStickyMessageIds: J, onToggleStickyMessage: Xe, onReady: () => lt(ee) }, ee) : De, e[29] = De, e[30] = J, e[31] = Me, e[32] = Y, e[33] = Be, e[34] = Pe, e[35] = ee, e[36] = R, e[37] = Z) : Z = e[37];
2696
2702
  let K;
2697
- e[38] !== Ve || e[39] !== Z ? (K = /* @__PURE__ */ c(Nt.Viewport, { visibility: Ve, children: Z }), e[38] = Ve, e[39] = Z, e[40] = K) : K = e[40];
2698
- let oe;
2699
- e[41] !== he ? (oe = he ? /* @__PURE__ */ c(Nt.ScrollToBottom, { "aria-label": "Scroll to latest message" }) : null, e[41] = he, e[42] = oe) : oe = e[42];
2703
+ e[38] !== Ne || e[39] !== Z ? (K = /* @__PURE__ */ c(Nt.Viewport, { visibility: Ne, children: Z }), e[38] = Ne, e[39] = Z, e[40] = K) : K = e[40];
2704
+ let re;
2705
+ e[41] !== ge ? (re = ge ? /* @__PURE__ */ c(Nt.ScrollToBottom, { "aria-label": "Scroll to latest message" }) : null, e[41] = ge, e[42] = re) : re = e[42];
2700
2706
  let te;
2701
- e[43] !== se || e[44] !== K || e[45] !== oe ? (te = /* @__PURE__ */ k(Nt.Root, { children: [
2702
- se,
2707
+ e[43] !== oe || e[44] !== K || e[45] !== re ? (te = /* @__PURE__ */ C(Nt.Root, { children: [
2708
+ oe,
2703
2709
  K,
2704
- oe
2705
- ] }), e[43] = se, e[44] = K, e[45] = oe, e[46] = te) : te = e[46];
2706
- let re;
2707
- e[47] !== Fe || e[48] !== R ? (re = R ? /* @__PURE__ */ c(_l, { hidden: !Fe }) : null, e[47] = Fe, e[48] = R, e[49] = re) : re = e[49];
2708
- let ce;
2709
- e[50] !== x || e[51] !== ne || e[52] !== b || e[53] !== w || e[54] !== _e || e[55] !== d || e[56] !== Ne || e[57] !== De || e[58] !== W || e[59] !== h || e[60] !== g || e[61] !== D || e[62] !== S || e[63] !== m || e[64] !== O || e[65] !== E || e[66] !== P || e[67] !== Le || e[68] !== ue || e[69] !== R || e[70] !== A ? (ce = /* @__PURE__ */ c(Rl, { actions: x, attachedResources: b, attachmentList: w, chatInputAutoFocus: _e, chatInputPlaceholder: d, chatInputQuestionPrompt: ne, chatInputReferences: Ne, hasWorkspaceHub: De, inputDisabled: W, onAttachFiles: h, onAttachText: g, onChatInputAddReference: D, onClearAttachments: S, onInterrupt: m, onQueuedFollowUpMove: O, onQueuedFollowUpRemove: E, onQueuedFollowUpUpdate: P, queuedComposer: Le, queuedFollowUps: ue, streaming: R, workspaceHub: A }), e[50] = x, e[51] = ne, e[52] = b, e[53] = w, e[54] = _e, e[55] = d, e[56] = Ne, e[57] = De, e[58] = W, e[59] = h, e[60] = g, e[61] = D, e[62] = S, e[63] = m, e[64] = O, e[65] = E, e[66] = P, e[67] = Le, e[68] = ue, e[69] = R, e[70] = A, e[71] = ce) : ce = e[71];
2710
- let ye;
2711
- return e[72] !== T || e[73] !== te || e[74] !== re || e[75] !== ce ? (ye = /* @__PURE__ */ k(Qe, { position: "relative", direction: "column", w: "full", h: "full", overflow: "hidden", children: [
2710
+ re
2711
+ ] }), e[43] = oe, e[44] = K, e[45] = re, e[46] = te) : te = e[46];
2712
+ let ie;
2713
+ e[47] !== Fe || e[48] !== R ? (ie = R ? /* @__PURE__ */ c(_l, { hidden: !Fe }) : null, e[47] = Fe, e[48] = R, e[49] = ie) : ie = e[49];
2714
+ let ue;
2715
+ e[50] !== y || e[51] !== se || e[52] !== w || e[53] !== S || e[54] !== _e || e[55] !== d || e[56] !== Ue || e[57] !== Ee || e[58] !== ne || e[59] !== h || e[60] !== g || e[61] !== O || e[62] !== x || e[63] !== p || e[64] !== F || e[65] !== P || e[66] !== M || e[67] !== Le || e[68] !== de || e[69] !== R || e[70] !== We || e[71] !== k ? (ue = /* @__PURE__ */ c(Rl, { actions: y, attachedResources: w, attachmentList: S, chatInputAutoFocus: _e, chatInputPlaceholder: d, chatInputQuestionPrompt: se, chatInputReferences: Ue, hasWorkspaceHub: Ee, inputDisabled: ne, submitDisabled: We, onAttachFiles: h, onAttachText: g, onChatInputAddReference: O, onClearAttachments: x, onInterrupt: p, onQueuedFollowUpMove: F, onQueuedFollowUpRemove: P, onQueuedFollowUpUpdate: M, queuedComposer: Le, queuedFollowUps: de, streaming: R, workspaceHub: k }), e[50] = y, e[51] = se, e[52] = w, e[53] = S, e[54] = _e, e[55] = d, e[56] = Ue, e[57] = Ee, e[58] = ne, e[59] = h, e[60] = g, e[61] = O, e[62] = x, e[63] = p, e[64] = F, e[65] = P, e[66] = M, e[67] = Le, e[68] = de, e[69] = R, e[70] = We, e[71] = k, e[72] = ue) : ue = e[72];
2716
+ let xe;
2717
+ return e[73] !== T || e[74] !== te || e[75] !== ie || e[76] !== ue ? (xe = /* @__PURE__ */ C(Qe, { position: "relative", direction: "column", w: "full", h: "full", overflow: "hidden", children: [
2712
2718
  te,
2713
2719
  T,
2714
- re,
2715
- ce
2716
- ] }), e[72] = T, e[73] = te, e[74] = re, e[75] = ce, e[76] = ye) : ye = e[76], ye;
2720
+ ie,
2721
+ ue
2722
+ ] }), e[73] = T, e[74] = te, e[75] = ie, e[76] = ue, e[77] = xe) : xe = e[77], xe;
2717
2723
  };
2718
2724
  function Ml(t) {
2719
2725
  return t + 1;
@@ -2721,19 +2727,19 @@ function Ml(t) {
2721
2727
  function Pl(t, e) {
2722
2728
  return t + (e.role === "user" ? 1 : 0);
2723
2729
  }
2724
- function El() {
2730
+ function Dl() {
2725
2731
  return /* @__PURE__ */ new Set();
2726
2732
  }
2727
- const _n = (t) => /* @__PURE__ */ c(G, { gap: "xs", w: "full", children: t.map((e, n) => /* @__PURE__ */ c(Is, { height: "3", width: e, borderRadius: "xs" }, `${e}-${n}`)) }), ta = () => {
2728
- const t = C(2);
2733
+ const In = (t) => /* @__PURE__ */ c(G, { gap: "xs", w: "full", children: t.map((e, n) => /* @__PURE__ */ c(ks, { height: "3", width: e, borderRadius: "xs" }, `${e}-${n}`)) }), ta = () => {
2734
+ const t = A(2);
2729
2735
  let e;
2730
- t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ c(ze.Root, { from: "user", children: /* @__PURE__ */ c(ze.Content, { from: "user", children: _n(["72%", "46%"]) }) }), t[0] = e) : e = t[0];
2736
+ t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ c(ze.Root, { from: "user", children: /* @__PURE__ */ c(ze.Content, { from: "user", children: In(["72%", "46%"]) }) }), t[0] = e) : e = t[0];
2731
2737
  let n;
2732
- return t[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ k(G, { minH: "full", py: "xs", gap: "0", children: [
2738
+ return t[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ C(G, { minH: "full", py: "xs", gap: "0", children: [
2733
2739
  e,
2734
- /* @__PURE__ */ c(ze.Root, { from: "assistant", children: /* @__PURE__ */ c(ze.Content, { from: "assistant", children: _n(["76%", "62%", "40%"]) }) })
2740
+ /* @__PURE__ */ c(ze.Root, { from: "assistant", children: /* @__PURE__ */ c(ze.Content, { from: "assistant", children: In(["76%", "62%", "40%"]) }) })
2735
2741
  ] }), t[1] = n) : n = t[1], n;
2736
- }, Dl = 3, vn = 10, Bl = 26, en = 4, Fl = (t, e) => {
2742
+ }, El = 3, _n = 10, Bl = 26, en = 4, Fl = (t, e) => {
2737
2743
  if (e === null) return 0;
2738
2744
  const n = Math.abs(t - e);
2739
2745
  return n >= en ? 0 : (1 + Math.cos(Math.PI * n / en)) / 2;
@@ -2742,38 +2748,38 @@ const _n = (t) => /* @__PURE__ */ c(G, { gap: "xs", w: "full", children: t.map((
2742
2748
  const n = Math.abs(t - e);
2743
2749
  return n < 0.5 ? "fg" : n < en ? "fg.muted" : "fg.subtle";
2744
2750
  }, $l = (t) => {
2745
- const e = C(11), {
2751
+ const e = A(11), {
2746
2752
  item: n,
2747
2753
  position: o
2748
2754
  } = t, s = `${o.left}px`, r = `${o.top}px`;
2749
2755
  let i;
2750
- e[0] !== n.message ? (i = /* @__PURE__ */ c(U, { textStyle: "label/S/medium", color: "fg", lineClamp: 2, children: n.message }), e[0] = n.message, e[1] = i) : i = e[1];
2756
+ e[0] !== n.message ? (i = /* @__PURE__ */ c(j, { textStyle: "label/S/medium", color: "fg", lineClamp: 2, children: n.message }), e[0] = n.message, e[1] = i) : i = e[1];
2751
2757
  let l;
2752
- e[2] !== n.reply ? (l = n.reply ? /* @__PURE__ */ c(U, { textStyle: "label/XS/regular", color: "fg.muted", lineClamp: 2, children: n.reply }) : null, e[2] = n.reply, e[3] = l) : l = e[3];
2758
+ e[2] !== n.reply ? (l = n.reply ? /* @__PURE__ */ c(j, { textStyle: "label/XS/regular", color: "fg.muted", lineClamp: 2, children: n.reply }) : null, e[2] = n.reply, e[3] = l) : l = e[3];
2753
2759
  let a;
2754
- e[4] !== i || e[5] !== l ? (a = /* @__PURE__ */ k(G, { gap: "1.5", p: "3", bg: "bg.elevated", borderWidth: "1px", borderColor: "border", borderRadius: "lg", children: [
2760
+ e[4] !== i || e[5] !== l ? (a = /* @__PURE__ */ C(G, { gap: "1.5", p: "3", bg: "bg.elevated", borderWidth: "1px", borderColor: "border", borderRadius: "lg", children: [
2755
2761
  i,
2756
2762
  l
2757
2763
  ] }), e[4] = i, e[5] = l, e[6] = a) : a = e[6];
2758
2764
  let u;
2759
- return e[7] !== s || e[8] !== r || e[9] !== a ? (u = /* @__PURE__ */ c(Mn, { children: /* @__PURE__ */ c(B, { position: "fixed", left: s, ml: "2xs", top: r, transform: "translateY(-50%)", w: "80", maxW: "80", zIndex: "popover", pointerEvents: "none", children: a }) }), e[7] = s, e[8] = r, e[9] = a, e[10] = u) : u = e[10], u;
2765
+ return e[7] !== s || e[8] !== r || e[9] !== a ? (u = /* @__PURE__ */ c(Rn, { children: /* @__PURE__ */ c(B, { position: "fixed", left: s, ml: "2xs", top: r, transform: "translateY(-50%)", w: "80", maxW: "80", zIndex: "popover", pointerEvents: "none", children: a }) }), e[7] = s, e[8] = r, e[9] = a, e[10] = u) : u = e[10], u;
2760
2766
  }, na = (t) => {
2761
- const e = C(22), {
2767
+ const e = A(22), {
2762
2768
  items: n,
2763
2769
  onSelect: o,
2764
2770
  floating: s
2765
- } = t, r = s === void 0 ? !1 : s, [i, l] = H(null), [a, u] = H(null);
2766
- if (n.length < Dl)
2771
+ } = t, r = s === void 0 ? !1 : s, [i, l] = V(null), [a, u] = V(null);
2772
+ if (n.length < El)
2767
2773
  return null;
2768
2774
  let d;
2769
- e[0] !== n.length ? (d = (w) => {
2770
- const T = w.currentTarget.getBoundingClientRect(), A = (w.clientY - T.top) / T.height, _ = Math.min(n.length - 1, Math.max(0, A * n.length - 0.5)), v = Math.round(_);
2771
- l(_), u({
2775
+ e[0] !== n.length ? (d = (S) => {
2776
+ const T = S.currentTarget.getBoundingClientRect(), k = (S.clientY - T.top) / T.height, I = Math.min(n.length - 1, Math.max(0, k * n.length - 0.5)), v = Math.round(I);
2777
+ l(I), u({
2772
2778
  left: T.right,
2773
2779
  top: T.top + (v + 0.5) / n.length * T.height
2774
2780
  });
2775
2781
  }, e[0] = n.length, e[1] = d) : d = e[1];
2776
- const f = d, p = i === null ? null : Math.round(i), m = p === null ? null : n[p];
2782
+ const f = d, m = i === null ? null : Math.round(i), p = m === null ? null : n[m];
2777
2783
  let h;
2778
2784
  e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = () => l(null), e[2] = h) : h = e[2];
2779
2785
  let g;
@@ -2784,23 +2790,23 @@ const _n = (t) => /* @__PURE__ */ c(G, { gap: "xs", w: "full", children: t.map((
2784
2790
  bottom: 0,
2785
2791
  bg: "bg"
2786
2792
  } : {}, e[3] = r, e[4] = g) : g = e[4];
2787
- let y;
2793
+ let b;
2788
2794
  if (e[5] !== n || e[6] !== o || e[7] !== i) {
2789
- let w;
2790
- e[9] !== o || e[10] !== i ? (w = (T, A) => /* @__PURE__ */ c(Rn.button, { type: "button", h: "2px", w: `${vn + (Bl - vn) * Fl(A, i)}px`, bg: Ll(A, i), borderRadius: "1px", transition: "width 80ms linear, background-color 80ms linear", "aria-label": `Jump to message ${A + 1}`, onClick: () => o?.(T.id) }, T.id), e[9] = o, e[10] = i, e[11] = w) : w = e[11], y = n.map(w), e[5] = n, e[6] = o, e[7] = i, e[8] = y;
2795
+ let S;
2796
+ e[9] !== o || e[10] !== i ? (S = (T, k) => /* @__PURE__ */ c(vn.button, { type: "button", h: "2px", w: `${_n + (Bl - _n) * Fl(k, i)}px`, bg: Ll(k, i), borderRadius: "1px", transition: "width 80ms linear, background-color 80ms linear", "aria-label": `Jump to message ${k + 1}`, onClick: () => o?.(T.id) }, T.id), e[9] = o, e[10] = i, e[11] = S) : S = e[11], b = n.map(S), e[5] = n, e[6] = o, e[7] = i, e[8] = b;
2791
2797
  } else
2792
- y = e[8];
2798
+ b = e[8];
2799
+ let y;
2800
+ e[12] !== f || e[13] !== g || e[14] !== b ? (y = /* @__PURE__ */ c(Qe, { direction: "column", align: "flex-start", gap: "1.5", px: "1.5", py: "2", w: "10", onPointerMove: f, onPointerLeave: h, ...g, children: b }), e[12] = f, e[13] = g, e[14] = b, e[15] = y) : y = e[15];
2801
+ let w;
2802
+ e[16] !== p || e[17] !== a ? (w = p && a ? /* @__PURE__ */ c($l, { item: p, position: a }) : null, e[16] = p, e[17] = a, e[18] = w) : w = e[18];
2793
2803
  let x;
2794
- e[12] !== f || e[13] !== g || e[14] !== y ? (x = /* @__PURE__ */ c(Qe, { direction: "column", align: "flex-start", gap: "1.5", px: "1.5", py: "2", w: "10", onPointerMove: f, onPointerLeave: h, ...g, children: y }), e[12] = f, e[13] = g, e[14] = y, e[15] = x) : x = e[15];
2795
- let b;
2796
- e[16] !== m || e[17] !== a ? (b = m && a ? /* @__PURE__ */ c($l, { item: m, position: a }) : null, e[16] = m, e[17] = a, e[18] = b) : b = e[18];
2797
- let S;
2798
- return e[19] !== x || e[20] !== b ? (S = /* @__PURE__ */ k(B, { position: "relative", w: "10", flexShrink: 0, children: [
2799
- x,
2800
- b
2801
- ] }), e[19] = x, e[20] = b, e[21] = S) : S = e[21], S;
2804
+ return e[19] !== y || e[20] !== w ? (x = /* @__PURE__ */ C(B, { position: "relative", w: "10", flexShrink: 0, children: [
2805
+ y,
2806
+ w
2807
+ ] }), e[19] = y, e[20] = w, e[21] = x) : x = e[21], x;
2802
2808
  }, Ol = (t) => {
2803
- const e = C(13), {
2809
+ const e = A(13), {
2804
2810
  status: n,
2805
2811
  statusLabel: o,
2806
2812
  additions: s,
@@ -2811,40 +2817,40 @@ const _n = (t) => /* @__PURE__ */ c(G, { gap: "xs", w: "full", children: t.map((
2811
2817
  e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ c(nn, { size: "xs", color: "fg.muted" }), e[0] = u) : u = e[0];
2812
2818
  const d = o ?? "Setting up workspace...";
2813
2819
  let f;
2814
- return e[1] !== d ? (f = /* @__PURE__ */ k(ae, { gap: "2xs", minW: "0", children: [
2820
+ return e[1] !== d ? (f = /* @__PURE__ */ C(ce, { gap: "2xs", minW: "0", children: [
2815
2821
  u,
2816
- /* @__PURE__ */ c(U, { textStyle: "label/XS/regular", color: "fg.muted", truncate: !0, children: d })
2822
+ /* @__PURE__ */ c(j, { textStyle: "label/XS/regular", color: "fg.muted", truncate: !0, children: d })
2817
2823
  ] }), e[1] = d, e[2] = f) : f = e[2], f;
2818
2824
  }
2819
2825
  if (n === "error") {
2820
2826
  let u;
2821
- e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ c(Ln, { size: 14, color: "var(--chakra-colors-fg-error)" }), e[3] = u) : u = e[3];
2827
+ e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ c(Fn, { size: 14, color: "var(--chakra-colors-fg-error)" }), e[3] = u) : u = e[3];
2822
2828
  const d = o ?? "Workspace setup failed";
2823
2829
  let f;
2824
- return e[4] !== d ? (f = /* @__PURE__ */ k(ae, { gap: "2xs", minW: "0", children: [
2830
+ return e[4] !== d ? (f = /* @__PURE__ */ C(ce, { gap: "2xs", minW: "0", children: [
2825
2831
  u,
2826
- /* @__PURE__ */ c(U, { textStyle: "label/XS/regular", color: "fg.error", truncate: !0, children: d })
2832
+ /* @__PURE__ */ c(j, { textStyle: "label/XS/regular", color: "fg.error", truncate: !0, children: d })
2827
2833
  ] }), e[4] = d, e[5] = f) : f = e[5], f;
2828
2834
  }
2829
2835
  if (s <= 0 && r <= 0)
2830
2836
  return null;
2831
2837
  let i;
2832
- e[6] !== s ? (i = /* @__PURE__ */ k(U, { textStyle: "label/XS/medium", color: "fg.success", children: [
2838
+ e[6] !== s ? (i = /* @__PURE__ */ C(j, { textStyle: "label/XS/medium", color: "fg.success", children: [
2833
2839
  "+",
2834
2840
  s
2835
2841
  ] }), e[6] = s, e[7] = i) : i = e[7];
2836
2842
  let l;
2837
- e[8] !== r ? (l = /* @__PURE__ */ k(U, { textStyle: "label/XS/medium", color: "fg.error", children: [
2843
+ e[8] !== r ? (l = /* @__PURE__ */ C(j, { textStyle: "label/XS/medium", color: "fg.error", children: [
2838
2844
  "−",
2839
2845
  r
2840
2846
  ] }), e[8] = r, e[9] = l) : l = e[9];
2841
2847
  let a;
2842
- return e[10] !== i || e[11] !== l ? (a = /* @__PURE__ */ k(ae, { gap: "2xs", children: [
2848
+ return e[10] !== i || e[11] !== l ? (a = /* @__PURE__ */ C(ce, { gap: "2xs", children: [
2843
2849
  i,
2844
2850
  l
2845
2851
  ] }), e[10] = i, e[11] = l, e[12] = a) : a = e[12], a;
2846
2852
  }, sa = (t) => {
2847
- const e = C(13), {
2853
+ const e = A(13), {
2848
2854
  workspaceControl: n,
2849
2855
  additions: o,
2850
2856
  deletions: s,
@@ -2855,22 +2861,22 @@ const _n = (t) => /* @__PURE__ */ c(G, { gap: "xs", w: "full", children: t.map((
2855
2861
  let u;
2856
2862
  e[0] !== o || e[1] !== s || e[2] !== a || e[3] !== l ? (u = /* @__PURE__ */ c(Ol, { status: a, statusLabel: l, additions: o, deletions: s }), e[0] = o, e[1] = s, e[2] = a, e[3] = l, e[4] = u) : u = e[4];
2857
2863
  let d;
2858
- e[5] !== u || e[6] !== n ? (d = /* @__PURE__ */ k(ae, { gap: "sm", minW: "0", children: [
2864
+ e[5] !== u || e[6] !== n ? (d = /* @__PURE__ */ C(ce, { gap: "sm", minW: "0", children: [
2859
2865
  n,
2860
2866
  u
2861
2867
  ] }), e[5] = u, e[6] = n, e[7] = d) : d = e[7];
2862
2868
  let f;
2863
2869
  e[8] !== r ? (f = r ? /* @__PURE__ */ c(Qe, { flexShrink: 0, children: r }) : null, e[8] = r, e[9] = f) : f = e[9];
2864
- let p;
2865
- return e[10] !== d || e[11] !== f ? (p = /* @__PURE__ */ k(Qe, { align: "center", justify: "space-between", gap: "sm", minW: "0", pl: "xs", pr: "2xs", py: "2xs", children: [
2870
+ let m;
2871
+ return e[10] !== d || e[11] !== f ? (m = /* @__PURE__ */ C(Qe, { align: "center", justify: "space-between", gap: "sm", minW: "0", pl: "xs", pr: "2xs", py: "2xs", children: [
2866
2872
  d,
2867
2873
  f
2868
- ] }), e[10] = d, e[11] = f, e[12] = p) : p = e[12], p;
2874
+ ] }), e[10] = d, e[11] = f, e[12] = m) : m = e[12], m;
2869
2875
  };
2870
2876
  export {
2871
2877
  Jl as ApprovalPrompt,
2872
2878
  Zl as AttachmentList,
2873
- Ao as AutoScroll,
2879
+ To as AutoScroll,
2874
2880
  No as ChatInput,
2875
2881
  ze as ChatMessage,
2876
2882
  ea as ChatPanel,