@pstdio/ui 0.43.1-nightly.20261013030813 → 0.43.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 (58) hide show
  1. package/dist/{MermaidComponent-CJCip-GB.js → MermaidComponent-_cmVeKKR.js} +2 -2
  2. package/dist/{MermaidComponent-CJCip-GB.js.map → MermaidComponent-_cmVeKKR.js.map} +1 -1
  3. package/dist/chat-ui.d.ts +84 -56
  4. package/dist/chat-ui.js +792 -788
  5. package/dist/chat-ui.js.map +1 -1
  6. package/dist/{collection-view-fields-CajuwtKF.d.ts → collection-view-fields-B3fhsgn7.d.ts} +2 -0
  7. package/dist/{collection-view-grouping-Bm7Hlt5w.js → collection-view-grouping-jIqOrBG8.js} +2 -2
  8. package/dist/{collection-view-grouping-Bm7Hlt5w.js.map → collection-view-grouping-jIqOrBG8.js.map} +1 -1
  9. package/dist/{collection-view-search-BqYMZQ4q.js → collection-view-search-KbQpKHdn.js} +728 -601
  10. package/dist/collection-view-search-KbQpKHdn.js.map +1 -0
  11. package/dist/collection-view.d.ts +90 -3
  12. package/dist/collection-view.js +1 -1
  13. package/dist/{data-table-stats-row-RwLXF9EW.js → data-table-stats-row-83mX8b1B.js} +2 -2
  14. package/dist/{data-table-stats-row-RwLXF9EW.js.map → data-table-stats-row-83mX8b1B.js.map} +1 -1
  15. package/dist/data-table.d.ts +2 -3
  16. package/dist/data-table.js +6 -6
  17. package/dist/{diff-viewer-BD2PQ4SS.js → diff-viewer-C5KXwq7E.js} +3 -3
  18. package/dist/{diff-viewer-BD2PQ4SS.js.map → diff-viewer-C5KXwq7E.js.map} +1 -1
  19. package/dist/diff.js +2 -2
  20. package/dist/{display-sort-control-BSFhWHgn.js → display-sort-control-BCkgKET1.js} +3 -3
  21. package/dist/{display-sort-control-BSFhWHgn.js.map → display-sort-control-BCkgKET1.js.map} +1 -1
  22. package/dist/{edit-mode-data-table-TdIRPVU1.js → edit-mode-data-table-ScVJJT9F.js} +5 -5
  23. package/dist/{edit-mode-data-table-TdIRPVU1.js.map → edit-mode-data-table-ScVJJT9F.js.map} +1 -1
  24. package/dist/{index-DjZsR4Ey.d.ts → index-DXpADqIg.d.ts} +8 -4
  25. package/dist/index.d.ts +49 -49
  26. package/dist/index.js +451 -453
  27. package/dist/index.js.map +1 -1
  28. package/dist/kanban-renderer.d.ts +3 -3
  29. package/dist/kanban-renderer.js +934 -744
  30. package/dist/kanban-renderer.js.map +1 -1
  31. package/dist/{list-row-DCHZXCVH.js → list-row-F8kBQGB-.js} +393 -383
  32. package/dist/list-row-F8kBQGB-.js.map +1 -0
  33. package/dist/{markdown-editor-6jAy_E3r.js → markdown-editor-Dm4Fi3sX.js} +4 -4
  34. package/dist/{markdown-editor-6jAy_E3r.js.map → markdown-editor-Dm4Fi3sX.js.map} +1 -1
  35. package/dist/{param-editor-f57ea8V9.js → param-editor-B9ASM5Lv.js} +2 -2
  36. package/dist/{param-editor-f57ea8V9.js.map → param-editor-B9ASM5Lv.js.map} +1 -1
  37. package/dist/{param-editor-field-CePT5hCj.js → param-editor-field-BmNUziwI.js} +5 -3
  38. package/dist/param-editor-field-BmNUziwI.js.map +1 -0
  39. package/dist/param-editor.js +2 -2
  40. package/dist/{rich-text-bKBLAco5.js → rich-text-Dx5F8Zm1.js} +3 -3
  41. package/dist/{rich-text-bKBLAco5.js.map → rich-text-Dx5F8Zm1.js.map} +1 -1
  42. package/dist/rich-text.js +3 -3
  43. package/dist/terminal.js +1 -1
  44. package/dist/{theme-bxwJIMKe.js → theme-CWDvF5Yn.js} +164 -72
  45. package/dist/theme-CWDvF5Yn.js.map +1 -0
  46. package/dist/theme.js +1 -1
  47. package/dist/{tree-list-nFNO7MV4.js → tree-list-Ces1hpRd.js} +2 -2
  48. package/dist/{tree-list-nFNO7MV4.js.map → tree-list-Ces1hpRd.js.map} +1 -1
  49. package/dist/{workspace-badge-oFp29Gbe.d.ts → workspace-badge-De6OQjb5.d.ts} +2 -1
  50. package/dist/{workspace-badge-BgiTennO.js → workspace-badge-DqQKSUJw.js} +11 -11
  51. package/dist/workspace-badge-DqQKSUJw.js.map +1 -0
  52. package/package.json +2 -2
  53. package/dist/collection-view-search-BqYMZQ4q.js.map +0 -1
  54. package/dist/index-r6SFPkUI.d.ts +0 -91
  55. package/dist/list-row-DCHZXCVH.js.map +0 -1
  56. package/dist/param-editor-field-CePT5hCj.js.map +0 -1
  57. package/dist/theme-bxwJIMKe.js.map +0 -1
  58. package/dist/workspace-badge-BgiTennO.js.map +0 -1
package/dist/chat-ui.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./alert-MQ47wy7f.js";
2
2
  import { n as t, t as n } from "./scroll-area-IeoRS73V.js";
3
- import { a as r, t as i } from "./list-row-DCHZXCVH.js";
3
+ import { a as r, t as i } from "./list-row-F8kBQGB-.js";
4
4
  import { t as a } from "./use-virtualizer-CfDHoDer.js";
5
5
  import { i as o } from "./prism-EZSmZh-a.js";
6
6
  import { t as s } from "./drop-indicator-HjlBSIeV.js";
@@ -8,17 +8,17 @@ import { t as c } from "./empty-state-3mVV_pV-.js";
8
8
  import { t as l } from "./icon-options-Tt6Wzhtv.js";
9
9
  import { n as u, t as d } from "./radio-CiFrDN6O.js";
10
10
  import { n as f, t as p } from "./queued-follow-up-Bj_vtMgd.js";
11
- import { A as m, C as h, E as g, M as _, S as v, T as y, j as b, k as x, w as S } from "./markdown-editor-6jAy_E3r.js";
12
- import { c as C, l as w, o as T, s as E } from "./rich-text-bKBLAco5.js";
11
+ import { A as m, C as h, E as g, M as _, S as v, T as y, j as b, k as x, w as S } from "./markdown-editor-Dm4Fi3sX.js";
12
+ import { c as C, l as w, o as T, s as E } from "./rich-text-Dx5F8Zm1.js";
13
13
  import { t as D } from "./diff-bubble-DewUd_2w.js";
14
- import { AbsoluteCenter as O, Avatar as k, Box as A, Button as j, Card as M, Code as N, Field as P, Flex as F, HStack as I, Icon as L, IconButton as R, Image as z, Input as B, Kbd as V, Link as H, Menu as U, Popover as ee, Portal as te, Skeleton as ne, Span as re, Spinner as W, Stack as G, Tag as ie, Text as K, Textarea as ae, Timeline as oe, Tooltip as se, chakra as q, createSlotRecipeContext as ce, defineSlotRecipe as le, useRecipe as ue, useSlotRecipe as de } from "@chakra-ui/react";
15
- import { c as J } from "react/compiler-runtime";
16
- import { Fragment as fe, jsx as Y, jsxs as X } from "react/jsx-runtime";
17
- import { Fragment as pe, Suspense as me, createContext as he, lazy as ge, useContext as _e, useEffect as Z, useLayoutEffect as ve, useRef as ye, useState as Q } from "react";
14
+ import { AbsoluteCenter as O, Avatar as k, Box as A, Button as j, Card as M, Code as N, Field as P, Flex as F, HStack as I, Icon as L, IconButton as ee, Image as R, Input as z, Kbd as B, Link as te, Menu as V, Popover as ne, Portal as re, Skeleton as ie, Span as H, Spinner as U, Stack as W, Tag as ae, Text as G, Textarea as oe, Timeline as se, Tooltip as ce, chakra as K, createSlotRecipeContext as le, defineSlotRecipe as ue, useRecipe as de, useSlotRecipe as fe } from "@chakra-ui/react";
15
+ import { c as q } from "react/compiler-runtime";
16
+ import { Fragment as pe, jsx as J, jsxs as Y } from "react/jsx-runtime";
17
+ import { Fragment as me, Suspense as he, createContext as ge, lazy as _e, useContext as ve, useEffect as X, useLayoutEffect as ye, useRef as Z, useState as Q } from "react";
18
18
  import { AlertTriangle as be, ArrowDownIcon as xe, ArrowRight as Se, ArrowUp as Ce, Check as we, ChevronUpIcon as Te, CircleQuestionMark as Ee, Copy as De, DotIcon as Oe, File as ke, FileDiff as Ae, FileDown as je, FilePen as Me, FileText as Ne, FileUp as Pe, Globe as Fe, GripVertical as Ie, ListTodo as Le, ListTree as Re, MessageCircleIcon as ze, Move as Be, Pause as Ve, Search as He, ShieldCheck as Ue, ShieldX as We, Terminal as Ge, Trash2 as Ke } from "lucide-react";
19
19
  import { DndContext as qe, KeyboardSensor as Je, PointerSensor as Ye, pointerWithin as Xe, rectIntersection as Ze, useDraggable as Qe, useDroppable as $e, useSensor as et, useSensors as tt } from "@dnd-kit/core";
20
20
  import { StickToBottom as nt, useStickToBottomContext as rt } from "use-stick-to-bottom";
21
- var it = q(nt, { base: {
21
+ var it = K(nt, { base: {
22
22
  position: "relative",
23
23
  flex: 1,
24
24
  overflow: "hidden",
@@ -32,7 +32,7 @@ var it = q(nt, { base: {
32
32
  role: "log"
33
33
  }
34
34
  }), at = (e) => {
35
- let t = J(10), r, i;
35
+ let t = q(10), r, i;
36
36
  t[0] === e ? (r = t[1], i = t[2]) : ({children: r, ...i} = e, t[0] = e, t[1] = r, t[2] = i);
37
37
  let { contentRef: a, scrollRef: o } = rt(), s = o, c = a, l, u;
38
38
  t[3] === Symbol.for("react.memo_cache_sentinel") ? (l = { zIndex: 2 }, u = {
@@ -42,7 +42,7 @@ var it = q(nt, { base: {
42
42
  role: "list"
43
43
  }, t[3] = l, t[4] = u) : (l = t[3], u = t[4]);
44
44
  let d;
45
- return t[5] !== r || t[6] !== i || t[7] !== s || t[8] !== c ? (d = /* @__PURE__ */ Y(n, {
45
+ return t[5] !== r || t[6] !== i || t[7] !== s || t[8] !== c ? (d = /* @__PURE__ */ J(n, {
46
46
  ...i,
47
47
  height: "full",
48
48
  width: "full",
@@ -61,20 +61,20 @@ var it = q(nt, { base: {
61
61
  Root: it,
62
62
  Viewport: at,
63
63
  ScrollToBottom: (e) => {
64
- let t = J(4), { isAtBottom: n, scrollToBottom: r } = rt(), i;
65
- return t[0] !== n || t[1] !== e || t[2] !== r ? (i = !n && /* @__PURE__ */ Y(O, {
64
+ let t = q(4), { isAtBottom: n, scrollToBottom: r } = rt(), i;
65
+ return t[0] !== n || t[1] !== e || t[2] !== r ? (i = !n && /* @__PURE__ */ J(O, {
66
66
  ...ot,
67
- children: /* @__PURE__ */ Y(R, {
67
+ children: /* @__PURE__ */ J(ee, {
68
68
  rounded: "full",
69
69
  onClick: () => r(),
70
70
  variant: "outline",
71
71
  size: "xs",
72
72
  ...e,
73
- children: /* @__PURE__ */ Y(xe, { size: 16 })
73
+ children: /* @__PURE__ */ J(xe, { size: 16 })
74
74
  })
75
75
  }), t[0] = n, t[1] = e, t[2] = r, t[3] = i) : i = t[3], i;
76
76
  }
77
- }, ct = le({
77
+ }, ct = ue({
78
78
  className: "ai-message",
79
79
  slots: ["root", "content"],
80
80
  base: {
@@ -103,12 +103,8 @@ var it = q(nt, { base: {
103
103
  flexDirection: "row"
104
104
  },
105
105
  content: {
106
- borderTopWidth: "1px",
107
- borderRightWidth: "1px",
108
- borderBottomWidth: "1px",
109
- borderLeftWidth: "1px",
110
- borderColor: "border.subtle",
111
- bg: "bg.subtle",
106
+ "--chat-message-bg": "{colors.bg.subtle}",
107
+ bg: "var(--chat-message-bg)",
112
108
  px: "xs",
113
109
  py: "xs",
114
110
  width: "full",
@@ -161,7 +157,7 @@ var it = q(nt, { base: {
161
157
  shape: "rounded",
162
158
  delivery: "sent"
163
159
  }
164
- }), { withProvider: lt, withContext: ut } = ce({ recipe: ct }), dt = {
160
+ }), { withProvider: lt, withContext: ut } = le({ recipe: ct }), dt = {
165
161
  Root: lt("div", "root"),
166
162
  Content: ut("div", "content")
167
163
  }, ft = (e) => {
@@ -169,15 +165,15 @@ var it = q(nt, { base: {
169
165
  let t = typeof e == "string" ? e : JSON.stringify(e, null, 2);
170
166
  return t.length === 0 ? null : t.length > 200 ? `${t.slice(0, 200)}...` : t;
171
167
  }, pt = (e) => {
172
- let t = J(19), { toolName: r, toolInput: i, onApprove: a, onDeny: o } = e, s;
168
+ let t = q(19), { toolName: r, toolInput: i, onApprove: a, onDeny: o } = e, s;
173
169
  t[0] === i ? s = t[1] : (s = ft(i), t[0] = i, t[1] = s);
174
170
  let c = s, l;
175
- t[2] === r ? l = t[3] : (l = /* @__PURE__ */ X(K, {
171
+ t[2] === r ? l = t[3] : (l = /* @__PURE__ */ Y(G, {
176
172
  textStyle: "label/S/medium",
177
173
  color: "fg",
178
174
  children: [
179
175
  "Allow ",
180
- /* @__PURE__ */ Y(N, {
176
+ /* @__PURE__ */ J(N, {
181
177
  size: "sm",
182
178
  children: r
183
179
  }),
@@ -185,9 +181,9 @@ var it = q(nt, { base: {
185
181
  ]
186
182
  }), t[2] = r, t[3] = l);
187
183
  let u;
188
- t[4] === c ? u = t[5] : (u = c ? /* @__PURE__ */ Y(n, {
184
+ t[4] === c ? u = t[5] : (u = c ? /* @__PURE__ */ J(n, {
189
185
  maxH: "6rem",
190
- children: /* @__PURE__ */ Y(N, {
186
+ children: /* @__PURE__ */ J(N, {
191
187
  size: "sm",
192
188
  whiteSpace: "pre-wrap",
193
189
  display: "block",
@@ -196,31 +192,31 @@ var it = q(nt, { base: {
196
192
  })
197
193
  }) : null, t[4] = c, t[5] = u);
198
194
  let d;
199
- t[6] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ Y(We, { size: 14 }), t[6] = d) : d = t[6];
195
+ t[6] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ J(We, { size: 14 }), t[6] = d) : d = t[6];
200
196
  let f;
201
- t[7] === o ? f = t[8] : (f = /* @__PURE__ */ X(j, {
197
+ t[7] === o ? f = t[8] : (f = /* @__PURE__ */ Y(j, {
202
198
  size: "xs",
203
199
  variant: "outline",
204
200
  onClick: o,
205
201
  children: [d, "Deny"]
206
202
  }), t[7] = o, t[8] = f);
207
203
  let p;
208
- t[9] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ Y(Ue, { size: 14 }), t[9] = p) : p = t[9];
204
+ t[9] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ J(Ue, { size: 14 }), t[9] = p) : p = t[9];
209
205
  let m;
210
- t[10] === a ? m = t[11] : (m = /* @__PURE__ */ X(j, {
206
+ t[10] === a ? m = t[11] : (m = /* @__PURE__ */ Y(j, {
211
207
  size: "xs",
212
208
  colorPalette: "green",
213
209
  onClick: a,
214
210
  children: [p, "Allow"]
215
211
  }), t[10] = a, t[11] = m);
216
212
  let h;
217
- t[12] !== f || t[13] !== m ? (h = /* @__PURE__ */ X(I, {
213
+ t[12] !== f || t[13] !== m ? (h = /* @__PURE__ */ Y(I, {
218
214
  gap: "xs",
219
215
  justifyContent: "flex-end",
220
216
  children: [f, m]
221
217
  }), t[12] = f, t[13] = m, t[14] = h) : h = t[14];
222
218
  let g;
223
- return t[15] !== l || t[16] !== u || t[17] !== h ? (g = /* @__PURE__ */ Y(A, {
219
+ return t[15] !== l || t[16] !== u || t[17] !== h ? (g = /* @__PURE__ */ J(A, {
224
220
  px: "sm",
225
221
  py: "xs",
226
222
  mx: "sm",
@@ -228,7 +224,7 @@ var it = q(nt, { base: {
228
224
  borderColor: "border.warning",
229
225
  borderRadius: "lg",
230
226
  bg: "bg.warning",
231
- children: /* @__PURE__ */ X(F, {
227
+ children: /* @__PURE__ */ Y(F, {
232
228
  direction: "column",
233
229
  gap: "xs",
234
230
  children: [
@@ -239,7 +235,7 @@ var it = q(nt, { base: {
239
235
  })
240
236
  }), t[15] = l, t[16] = u, t[17] = h, t[18] = g) : g = t[18], g;
241
237
  }, mt = "md", ht = "neutral", gt = (e) => {
242
- let t = J(17), { attachments: n, onSelect: r, onRemove: i, renderBadge: a, size: s, tone: c } = e, l;
238
+ let t = q(17), { attachments: n, onSelect: r, onRemove: i, renderBadge: a, size: s, tone: c } = e, l;
243
239
  t[0] === n ? l = t[1] : (l = n === void 0 ? [] : n, t[0] = n, t[1] = l);
244
240
  let u = l, d = s === void 0 ? mt : s, f = c === void 0 ? ht : c;
245
241
  if (u.length === 0) return null;
@@ -256,9 +252,9 @@ var it = q(nt, { base: {
256
252
  size: d,
257
253
  tone: f
258
254
  });
259
- return /* @__PURE__ */ Y(pe, { children: r }, e);
255
+ return /* @__PURE__ */ J(me, { children: r }, e);
260
256
  }
261
- return /* @__PURE__ */ Y(o, {
257
+ return /* @__PURE__ */ J(o, {
262
258
  fileName: e,
263
259
  onSelect: t,
264
260
  onRemove: n,
@@ -268,7 +264,7 @@ var it = q(nt, { base: {
268
264
  }, t[9] = i, t[10] = r, t[11] = a, t[12] = d, t[13] = f, t[14] = e) : e = t[14], p = u.map(e), t[2] = u, t[3] = i, t[4] = r, t[5] = a, t[6] = d, t[7] = f, t[8] = p;
269
265
  } else p = t[8];
270
266
  let m;
271
- return t[15] === p ? m = t[16] : (m = /* @__PURE__ */ Y(G, {
267
+ return t[15] === p ? m = t[16] : (m = /* @__PURE__ */ J(W, {
272
268
  marginBottom: "sm",
273
269
  gap: "1",
274
270
  flexDir: "row",
@@ -301,12 +297,12 @@ var it = q(nt, { base: {
301
297
  return t.shouldScroll && e.scrollToBottom("instant"), t;
302
298
  };
303
299
  function bt(e) {
304
- let t = J(8), { conversationKey: n, userMessageCount: r } = e, { scrollToBottom: i } = rt(), a = n ?? null, o;
300
+ let t = q(8), { conversationKey: n, userMessageCount: r } = e, { scrollToBottom: i } = rt(), a = n ?? null, o;
305
301
  t[0] !== a || t[1] !== r ? (o = {
306
302
  conversationKey: a,
307
303
  userMessageCount: r
308
304
  }, t[0] = a, t[1] = r, t[2] = o) : o = t[2];
309
- let s = ye(o), c, l;
305
+ let s = Z(o), c, l;
310
306
  return t[3] !== n || t[4] !== i || t[5] !== r ? (c = () => {
311
307
  let e = yt({
312
308
  state: s.current,
@@ -319,7 +315,7 @@ function bt(e) {
319
315
  n,
320
316
  r,
321
317
  i
322
- ], t[3] = n, t[4] = i, t[5] = r, t[6] = c, t[7] = l) : (c = t[6], l = t[7]), Z(c, l), null;
318
+ ], t[3] = n, t[4] = i, t[5] = r, t[6] = c, t[7] = l) : (c = t[6], l = t[7]), X(c, l), null;
323
319
  }
324
320
  //#endregion
325
321
  //#region src/components/chat-ui/utils/editor-state.ts
@@ -350,19 +346,19 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
350
346
  }
351
347
  };
352
348
  }, Dt = (e) => {
353
- let t = J(22), n, r, i, a;
349
+ let t = q(22), n, r, i, a;
354
350
  t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4]) : ({title: a, shortcut: i, canInterrupt: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a);
355
351
  let o = r["aria-label"] ?? a, s;
356
- t[5] === n ? s = t[6] : (s = n ? /* @__PURE__ */ Y(Ve, {
352
+ t[5] === n ? s = t[6] : (s = n ? /* @__PURE__ */ J(Ve, {
357
353
  size: 16,
358
354
  strokeWidth: 2,
359
355
  fill: "currentColor"
360
- }) : /* @__PURE__ */ Y(Ce, {
356
+ }) : /* @__PURE__ */ J(Ce, {
361
357
  size: 16,
362
358
  strokeWidth: 2
363
359
  }), t[5] = n, t[6] = s);
364
360
  let c = s, l;
365
- t[7] !== o || t[8] !== c || t[9] !== r || t[10] !== a ? (l = /* @__PURE__ */ Y(R, {
361
+ t[7] !== o || t[8] !== c || t[9] !== r || t[10] !== a ? (l = /* @__PURE__ */ J(ee, {
366
362
  "data-testid": "send-message-button",
367
363
  size: "xs",
368
364
  variant: "primary",
@@ -374,23 +370,23 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
374
370
  let u = l;
375
371
  if (a) {
376
372
  let e;
377
- t[12] !== i || t[13] !== a ? (e = i ? /* @__PURE__ */ X(fe, { children: [
373
+ t[12] !== i || t[13] !== a ? (e = i ? /* @__PURE__ */ Y(pe, { children: [
378
374
  a,
379
375
  " ",
380
- /* @__PURE__ */ Y(V, {
376
+ /* @__PURE__ */ J(B, {
381
377
  fontSize: "xs",
382
378
  children: i
383
379
  })
384
380
  ] }) : a, t[12] = i, t[13] = a, t[14] = e) : e = t[14];
385
381
  let n = e, r;
386
- t[15] === u ? r = t[16] : (r = /* @__PURE__ */ Y(se.Trigger, {
382
+ t[15] === u ? r = t[16] : (r = /* @__PURE__ */ J(ce.Trigger, {
387
383
  asChild: !0,
388
384
  children: u
389
385
  }), t[15] = u, t[16] = r);
390
386
  let o;
391
- t[17] === n ? o = t[18] : (o = /* @__PURE__ */ Y(te, { children: /* @__PURE__ */ Y(se.Positioner, { children: /* @__PURE__ */ Y(se.Content, { children: n }) }) }), t[17] = n, t[18] = o);
387
+ t[17] === n ? o = t[18] : (o = /* @__PURE__ */ J(re, { children: /* @__PURE__ */ J(ce.Positioner, { children: /* @__PURE__ */ J(ce.Content, { children: n }) }) }), t[17] = n, t[18] = o);
392
388
  let s;
393
- return t[19] !== r || t[20] !== o ? (s = /* @__PURE__ */ X(se.Root, {
389
+ return t[19] !== r || t[20] !== o ? (s = /* @__PURE__ */ Y(ce.Root, {
394
390
  closeDelay: 50,
395
391
  openDelay: 100,
396
392
  children: [r, o]
@@ -398,13 +394,13 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
398
394
  }
399
395
  return u;
400
396
  }, Ot = (e) => {
401
- let t = J(18), { actions: r, submitActions: i, questionPrompt: a, skipDisabled: o, skipTitle: s, onSkip: c, buttonAction: l, submitTitle: u, submitLabel: d, messageTitle: f, runAction: p } = e, m;
402
- t[0] === r ? m = t[1] : (m = /* @__PURE__ */ Y(n, {
397
+ let t = q(18), { actions: r, submitActions: i, questionPrompt: a, skipDisabled: o, skipTitle: s, onSkip: c, buttonAction: l, submitTitle: u, submitLabel: d, messageTitle: f, runAction: p } = e, m;
398
+ t[0] === r ? m = t[1] : (m = /* @__PURE__ */ J(n, {
403
399
  flex: "1",
404
400
  minW: "0",
405
401
  showVerticalScrollbar: !1,
406
402
  showHorizontalScrollbar: !0,
407
- children: /* @__PURE__ */ Y(I, {
403
+ children: /* @__PURE__ */ J(I, {
408
404
  gap: "1",
409
405
  width: "max-content",
410
406
  minH: "7",
@@ -412,7 +408,7 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
412
408
  })
413
409
  }), t[0] = r, t[1] = m);
414
410
  let h;
415
- t[2] !== c || t[3] !== a || t[4] !== o || t[5] !== s ? (h = a ? /* @__PURE__ */ Y(j, {
411
+ t[2] !== c || t[3] !== a || t[4] !== o || t[5] !== s ? (h = a ? /* @__PURE__ */ J(j, {
416
412
  size: "xs",
417
413
  variant: "ghost",
418
414
  disabled: o,
@@ -421,13 +417,13 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
421
417
  children: "Skip"
422
418
  }) : null, t[2] = c, t[3] = a, t[4] = o, t[5] = s, t[6] = h) : h = t[6];
423
419
  let g;
424
- t[7] !== l || t[8] !== f || t[9] !== p || t[10] !== d || t[11] !== u ? (g = d ? /* @__PURE__ */ Y(j, {
420
+ t[7] !== l || t[8] !== f || t[9] !== p || t[10] !== d || t[11] !== u ? (g = d ? /* @__PURE__ */ J(j, {
425
421
  size: "xs",
426
422
  variant: "primary",
427
423
  disabled: l === "none",
428
424
  onClick: () => p(l),
429
425
  children: d
430
- }) : /* @__PURE__ */ Y(Dt, {
426
+ }) : /* @__PURE__ */ J(Dt, {
431
427
  canInterrupt: l === "interrupt",
432
428
  title: l === "interrupt" ? "Stop Response" : u ?? f,
433
429
  shortcut: l === "submit" ? "Enter" : void 0,
@@ -435,7 +431,7 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
435
431
  disabled: l === "none"
436
432
  }), t[7] = l, t[8] = f, t[9] = p, t[10] = d, t[11] = u, t[12] = g) : g = t[12];
437
433
  let _;
438
- return t[13] !== i || t[14] !== m || t[15] !== h || t[16] !== g ? (_ = /* @__PURE__ */ X(I, {
434
+ return t[13] !== i || t[14] !== m || t[15] !== h || t[16] !== g ? (_ = /* @__PURE__ */ Y(I, {
439
435
  gap: "1",
440
436
  minH: "7",
441
437
  align: "center",
@@ -510,14 +506,14 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
510
506
  }
511
507
  return !1;
512
508
  }, Zt = (e, t, n, r) => Wt(e, Pt(e, t), n, r).length > 0, Qt = (e) => {
513
- let n = J(22), { question: r, questionIndex: i, isActive: a, selectedOptionsByQuestion: o, customAnswersByQuestion: s, onSelectStep: c } = e, l;
509
+ let n = q(22), { question: r, questionIndex: i, isActive: a, selectedOptionsByQuestion: o, customAnswersByQuestion: s, onSelectStep: c } = e, l;
514
510
  n[0] !== s || n[1] !== r || n[2] !== i || n[3] !== o ? (l = Zt(r, i, o, s), n[0] = s, n[1] = r, n[2] = i, n[3] = o, n[4] = l) : l = n[4];
515
511
  let u = l, d = u ? "answered" : "not answered", f = a ? "outline" : "ghost", p = `question-step-tab-${r.id}`, m = `${r.question} (${d})`, h = `question-step-panel-${r.id}`, g;
516
512
  n[5] !== c || n[6] !== i ? (g = () => c(i), n[5] = c, n[6] = i, n[7] = g) : g = n[7];
517
513
  let _;
518
- n[8] !== u || n[9] !== i ? (_ = u ? /* @__PURE__ */ Y(we, { "aria-hidden": "true" }) : i + 1, n[8] = u, n[9] = i, n[10] = _) : _ = n[10];
514
+ n[8] !== u || n[9] !== i ? (_ = u ? /* @__PURE__ */ J(we, { "aria-hidden": "true" }) : i + 1, n[8] = u, n[9] = i, n[10] = _) : _ = n[10];
519
515
  let v;
520
- n[11] !== a || n[12] !== p || n[13] !== m || n[14] !== h || n[15] !== g || n[16] !== _ || n[17] !== f ? (v = /* @__PURE__ */ Y(j, {
516
+ n[11] !== a || n[12] !== p || n[13] !== m || n[14] !== h || n[15] !== g || n[16] !== _ || n[17] !== f ? (v = /* @__PURE__ */ J(j, {
521
517
  id: p,
522
518
  role: "tab",
523
519
  "aria-label": m,
@@ -530,7 +526,7 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
530
526
  children: _
531
527
  }), n[11] = a, n[12] = p, n[13] = m, n[14] = h, n[15] = g, n[16] = _, n[17] = f, n[18] = v) : v = n[18];
532
528
  let y;
533
- return n[19] !== r.question || n[20] !== v ? (y = /* @__PURE__ */ Y(t, {
529
+ return n[19] !== r.question || n[20] !== v ? (y = /* @__PURE__ */ J(t, {
534
530
  content: r.question,
535
531
  children: v
536
532
  }), n[19] = r.question, n[20] = v, n[21] = y) : y = n[21], y;
@@ -613,8 +609,8 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
613
609
  if (!r || !n) return e.status === "failed" || e.status === "denied" ? "Unavailable" : "Answered";
614
610
  let i = n.questions[t].question, a = r.split(/\n\n/).find((e) => e.startsWith(`${i}\n`));
615
611
  return a ? a.slice(i.length + 1).trim() || "Skipped" : n.questions.length === 1 ? r : "Answered";
616
- }, vn = he(void 0), yn = () => _e(vn), bn = (e, t) => {
617
- let n = J(14), [r, i] = Q(), a = r?.conversationKey === t ? r : void 0, o;
612
+ }, vn = ge(void 0), yn = () => ve(vn), bn = (e, t) => {
613
+ let n = q(14), [r, i] = Q(), a = r?.conversationKey === t ? r : void 0, o;
618
614
  n[0] !== a || n[1] !== e ? (o = a ? hn(e, a.key) : void 0, n[0] = a, n[1] = e, n[2] = o) : o = n[2];
619
615
  let s = o, c = s ? a?.key : void 0, l = s ? a : void 0, u;
620
616
  n[3] === t ? u = n[4] : (u = (e, n) => i((r) => ({
@@ -644,31 +640,31 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
644
640
  }, xn = (e) => {
645
641
  e.preventDefault();
646
642
  }, Sn = (e) => {
647
- let t = J(7), { option: n } = e, r;
648
- t[0] === n.label ? r = t[1] : (r = /* @__PURE__ */ Y(K, {
643
+ let t = q(7), { option: n } = e, r;
644
+ t[0] === n.label ? r = t[1] : (r = /* @__PURE__ */ J(G, {
649
645
  textStyle: "label/S/regular",
650
646
  color: "fg",
651
647
  children: n.label
652
648
  }), t[0] = n.label, t[1] = r);
653
649
  let i;
654
- t[2] === n.description ? i = t[3] : (i = n.description ? /* @__PURE__ */ Y(K, {
650
+ t[2] === n.description ? i = t[3] : (i = n.description ? /* @__PURE__ */ J(G, {
655
651
  textStyle: "label/XS/regular",
656
652
  color: "fg.muted",
657
653
  children: n.description
658
654
  }) : null, t[2] = n.description, t[3] = i);
659
655
  let a;
660
- return t[4] !== r || t[5] !== i ? (a = /* @__PURE__ */ X(G, {
656
+ return t[4] !== r || t[5] !== i ? (a = /* @__PURE__ */ Y(W, {
661
657
  gap: "0",
662
658
  minWidth: "0",
663
659
  children: [r, i]
664
660
  }), t[4] = r, t[5] = i, t[6] = a) : a = t[6], a;
665
661
  }, Cn = (e) => {
666
- let t = J(12), { option: n, name: i, checked: a, editable: o, onToggle: s } = e, c = !o, l = o ? void 0 : "true", u;
662
+ let t = q(12), { option: n, name: i, checked: a, editable: o, onToggle: s } = e, c = !o, l = o ? void 0 : "true", u;
667
663
  t[0] === o ? u = t[1] : (u = o ? void 0 : { tabIndex: -1 }, t[0] = o, t[1] = u);
668
664
  let d = o ? s : void 0, f;
669
- t[2] === n ? f = t[3] : (f = /* @__PURE__ */ Y(Sn, { option: n }), t[2] = n, t[3] = f);
665
+ t[2] === n ? f = t[3] : (f = /* @__PURE__ */ J(Sn, { option: n }), t[2] = n, t[3] = f);
670
666
  let p;
671
- return t[4] !== a || t[5] !== i || t[6] !== c || t[7] !== l || t[8] !== u || t[9] !== d || t[10] !== f ? (p = /* @__PURE__ */ Y(r, {
667
+ return t[4] !== a || t[5] !== i || t[6] !== c || t[7] !== l || t[8] !== u || t[9] !== d || t[10] !== f ? (p = /* @__PURE__ */ J(r, {
672
668
  name: i,
673
669
  checked: a,
674
670
  readOnly: c,
@@ -679,7 +675,7 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
679
675
  children: f
680
676
  }), t[4] = a, t[5] = i, t[6] = c, t[7] = l, t[8] = u, t[9] = d, t[10] = f, t[11] = p) : p = t[11], p;
681
677
  }, wn = (e) => {
682
- let t = J(30), { question: n, questionIndex: r, name: i, selectedOption: a, otherSelected: o, editable: s, onToggleOption: c, onToggleOther: l } = e, { otherField: f } = e, p;
678
+ let t = q(30), { question: n, questionIndex: r, name: i, selectedOption: a, otherSelected: o, editable: s, onToggleOption: c, onToggleOther: l } = e, { otherField: f } = e, p;
683
679
  t[0] === n ? p = t[1] : (p = Nt(n), t[0] = n, t[1] = p);
684
680
  let m = p, h;
685
681
  if (t[2] !== n.options || t[3] !== a) {
@@ -693,22 +689,22 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
693
689
  let x;
694
690
  if (t[13] !== s || t[14] !== n.options) {
695
691
  let e;
696
- t[16] === s ? e = t[17] : (e = (e, t) => /* @__PURE__ */ Y(d, {
692
+ t[16] === s ? e = t[17] : (e = (e, t) => /* @__PURE__ */ J(d, {
697
693
  value: String(t),
698
694
  inputProps: s ? void 0 : { tabIndex: -1 },
699
695
  alignItems: "flex-start",
700
- children: /* @__PURE__ */ Y(Sn, { option: e })
696
+ children: /* @__PURE__ */ J(Sn, { option: e })
701
697
  }, e.label), t[16] = s, t[17] = e), x = n.options.map(e), t[13] = s, t[14] = n.options, t[15] = x;
702
698
  } else x = t[15];
703
699
  let S;
704
- t[18] !== s || t[19] !== m ? (S = m ? /* @__PURE__ */ Y(d, {
700
+ t[18] !== s || t[19] !== m ? (S = m ? /* @__PURE__ */ J(d, {
705
701
  value: jt,
706
702
  inputProps: s ? void 0 : { tabIndex: -1 },
707
703
  alignItems: "flex-start",
708
- children: /* @__PURE__ */ Y(Sn, { option: { label: At } })
704
+ children: /* @__PURE__ */ J(Sn, { option: { label: At } })
709
705
  }) : null, t[18] = s, t[19] = m, t[20] = S) : S = t[20];
710
706
  let C = o ? f : null, w;
711
- return t[21] !== i || t[22] !== _ || t[23] !== v || t[24] !== y || t[25] !== b || t[26] !== x || t[27] !== S || t[28] !== C ? (w = /* @__PURE__ */ X(u, {
707
+ return t[21] !== i || t[22] !== _ || t[23] !== v || t[24] !== y || t[25] !== b || t[26] !== x || t[27] !== S || t[28] !== C ? (w = /* @__PURE__ */ Y(u, {
712
708
  name: i,
713
709
  value: _,
714
710
  readOnly: v,
@@ -724,10 +720,10 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
724
720
  ]
725
721
  }), t[21] = i, t[22] = _, t[23] = v, t[24] = y, t[25] = b, t[26] = x, t[27] = S, t[28] = C, t[29] = w) : w = t[29], w;
726
722
  }, Tn = (e) => {
727
- let t = J(4), { items: n } = e, r;
723
+ let t = q(4), { items: n } = e, r;
728
724
  t[0] === n ? r = t[1] : (r = n.map(An), t[0] = n, t[1] = r);
729
725
  let i;
730
- return t[2] === r ? i = t[3] : (i = /* @__PURE__ */ Y(G, {
726
+ return t[2] === r ? i = t[3] : (i = /* @__PURE__ */ J(W, {
731
727
  as: "ul",
732
728
  gap: "0",
733
729
  listStyleType: "none",
@@ -736,10 +732,10 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
736
732
  children: r
737
733
  }), t[2] = r, t[3] = i), i;
738
734
  }, En = (e) => {
739
- let t = J(12), { question: n, questionIndex: r, editable: i, customAnswer: a, onCustomAnswerChange: o, hasOtherChoice: s } = e, c = s ? "Type your answer..." : "Answer...", l = !i, u = i ? void 0 : "true", d = a ?? "", f = i ? c : "Answer", p = s ? `${n.question} (${At})` : n.question, m = i ? "vertical" : "none", h;
735
+ let t = q(12), { question: n, questionIndex: r, editable: i, customAnswer: a, onCustomAnswerChange: o, hasOtherChoice: s } = e, c = s ? "Type your answer..." : "Answer...", l = !i, u = i ? void 0 : "true", d = a ?? "", f = i ? c : "Answer", p = s ? `${n.question} (${At})` : n.question, m = i ? "vertical" : "none", h;
740
736
  t[0] !== o || t[1] !== n || t[2] !== r ? (h = (e) => o?.(n, r, e.currentTarget.value), t[0] = o, t[1] = n, t[2] = r, t[3] = h) : h = t[3];
741
737
  let g;
742
- return t[4] !== l || t[5] !== u || t[6] !== d || t[7] !== f || t[8] !== p || t[9] !== m || t[10] !== h ? (g = /* @__PURE__ */ Y(ae, {
738
+ return t[4] !== l || t[5] !== u || t[6] !== d || t[7] !== f || t[8] !== p || t[9] !== m || t[10] !== h ? (g = /* @__PURE__ */ J(oe, {
743
739
  readOnly: l,
744
740
  "aria-readonly": u,
745
741
  value: d,
@@ -755,10 +751,10 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
755
751
  onChange: h
756
752
  }), t[4] = l, t[5] = u, t[6] = d, t[7] = f, t[8] = p, t[9] = m, t[10] = h, t[11] = g) : g = t[11], g;
757
753
  }, Dn = (e) => {
758
- let t = J(21), { question: n, questionIndex: r, editable: i, selectedOptions: a, customAnswer: o, onToggleOption: s, onToggleOther: c } = e, { name: l, otherField: u } = e, d;
754
+ let t = q(21), { question: n, questionIndex: r, editable: i, selectedOptions: a, customAnswer: o, onToggleOption: s, onToggleOther: c } = e, { name: l, otherField: u } = e, d;
759
755
  t[0] === n ? d = t[1] : (d = Nt(n), t[0] = n, t[1] = d);
760
756
  let f = d, p = o !== void 0, m;
761
- t[2] !== i || t[3] !== l || t[4] !== s || t[5] !== n || t[6] !== r || t[7] !== a ? (m = n.options.map((e) => /* @__PURE__ */ Y(Cn, {
757
+ t[2] !== i || t[3] !== l || t[4] !== s || t[5] !== n || t[6] !== r || t[7] !== a ? (m = n.options.map((e) => /* @__PURE__ */ J(Cn, {
762
758
  option: e,
763
759
  name: l,
764
760
  checked: a.includes(e.label),
@@ -766,7 +762,7 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
766
762
  onToggle: () => s?.(n, r, e.label)
767
763
  }, e.label)), t[2] = i, t[3] = l, t[4] = s, t[5] = n, t[6] = r, t[7] = a, t[8] = m) : m = t[8];
768
764
  let h;
769
- t[9] !== i || t[10] !== f || t[11] !== l || t[12] !== c || t[13] !== p || t[14] !== n || t[15] !== r ? (h = f ? /* @__PURE__ */ Y(Cn, {
765
+ t[9] !== i || t[10] !== f || t[11] !== l || t[12] !== c || t[13] !== p || t[14] !== n || t[15] !== r ? (h = f ? /* @__PURE__ */ J(Cn, {
770
766
  option: { label: At },
771
767
  name: l,
772
768
  checked: p,
@@ -774,21 +770,21 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
774
770
  onToggle: () => c?.(n, r)
775
771
  }) : null, t[9] = i, t[10] = f, t[11] = l, t[12] = c, t[13] = p, t[14] = n, t[15] = r, t[16] = h) : h = t[16];
776
772
  let g = p ? u : null, _;
777
- return t[17] !== m || t[18] !== h || t[19] !== g ? (_ = /* @__PURE__ */ X(fe, { children: [
773
+ return t[17] !== m || t[18] !== h || t[19] !== g ? (_ = /* @__PURE__ */ Y(pe, { children: [
778
774
  m,
779
775
  h,
780
776
  g
781
777
  ] }), t[17] = m, t[18] = h, t[19] = g, t[20] = _) : _ = t[20], _;
782
778
  }, On = (e) => {
783
- let t = J(30), { question: n, questionIndex: r, editable: i, selectedOptions: a, customAnswer: o, onToggleOption: s, onToggleOther: c } = e, l = n.id ?? `question-${r}`, u;
779
+ let t = q(30), { question: n, questionIndex: r, editable: i, selectedOptions: a, customAnswer: o, onToggleOption: s, onToggleOther: c } = e, l = n.id ?? `question-${r}`, u;
784
780
  t[0] === n ? u = t[1] : (u = Nt(n), t[0] = n, t[1] = u);
785
781
  let d = u, f;
786
- t[2] !== d || t[3] !== e || t[4] !== n.allowCustomAnswer ? (f = n.allowCustomAnswer ? /* @__PURE__ */ Y(En, {
782
+ t[2] !== d || t[3] !== e || t[4] !== n.allowCustomAnswer ? (f = n.allowCustomAnswer ? /* @__PURE__ */ J(En, {
787
783
  ...e,
788
784
  hasOtherChoice: d
789
785
  }) : null, t[2] = d, t[3] = e, t[4] = n.allowCustomAnswer, t[5] = f) : f = t[5];
790
786
  let p = f, m = n.options.length > 0 || d, h;
791
- t[6] === n.question ? h = t[7] : (h = /* @__PURE__ */ Y(K, {
787
+ t[6] === n.question ? h = t[7] : (h = /* @__PURE__ */ J(G, {
792
788
  as: "legend",
793
789
  textStyle: "label/S/medium",
794
790
  color: "fg",
@@ -796,13 +792,13 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
796
792
  children: n.question
797
793
  }), t[6] = n.question, t[7] = h);
798
794
  let g;
799
- t[8] !== m || t[9] !== l || t[10] !== p || t[11] !== e || t[12] !== n.multiple ? (g = m && n.multiple ? /* @__PURE__ */ Y(Dn, {
795
+ t[8] !== m || t[9] !== l || t[10] !== p || t[11] !== e || t[12] !== n.multiple ? (g = m && n.multiple ? /* @__PURE__ */ J(Dn, {
800
796
  ...e,
801
797
  name: l,
802
798
  otherField: p
803
799
  }) : null, t[8] = m, t[9] = l, t[10] = p, t[11] = e, t[12] = n.multiple, t[13] = g) : g = t[13];
804
800
  let _;
805
- t[14] !== o || t[15] !== i || t[16] !== m || t[17] !== l || t[18] !== s || t[19] !== c || t[20] !== p || t[21] !== n || t[22] !== r || t[23] !== a ? (_ = m && !n.multiple ? /* @__PURE__ */ Y(wn, {
801
+ t[14] !== o || t[15] !== i || t[16] !== m || t[17] !== l || t[18] !== s || t[19] !== c || t[20] !== p || t[21] !== n || t[22] !== r || t[23] !== a ? (_ = m && !n.multiple ? /* @__PURE__ */ J(wn, {
806
802
  question: n,
807
803
  questionIndex: r,
808
804
  name: l,
@@ -814,7 +810,7 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
814
810
  otherField: p
815
811
  }) : null, t[14] = o, t[15] = i, t[16] = m, t[17] = l, t[18] = s, t[19] = c, t[20] = p, t[21] = n, t[22] = r, t[23] = a, t[24] = _) : _ = t[24];
816
812
  let v = m ? null : p, y;
817
- return t[25] !== h || t[26] !== g || t[27] !== _ || t[28] !== v ? (y = /* @__PURE__ */ X(G, {
813
+ return t[25] !== h || t[26] !== g || t[27] !== _ || t[28] !== v ? (y = /* @__PURE__ */ Y(W, {
818
814
  as: "fieldset",
819
815
  gap: "xs",
820
816
  borderWidth: "1px",
@@ -830,7 +826,7 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
830
826
  ]
831
827
  }), t[25] = h, t[26] = g, t[27] = _, t[28] = v, t[29] = y) : y = t[29], y;
832
828
  }, kn = (e) => {
833
- let t = J(21), { questions: n, editable: r, selectedOptionsByQuestion: i, customAnswersByQuestion: a, onToggleOption: o, onToggleOther: s, onCustomAnswerChange: c } = e, l = r !== void 0 && r, u;
829
+ let t = q(21), { questions: n, editable: r, selectedOptionsByQuestion: i, customAnswersByQuestion: a, onToggleOption: o, onToggleOther: s, onCustomAnswerChange: c } = e, l = r !== void 0 && r, u;
834
830
  t[0] === i ? u = t[1] : (u = i === void 0 ? {} : i, t[0] = i, t[1] = u);
835
831
  let d = u, f;
836
832
  t[2] === a ? f = t[3] : (f = a === void 0 ? {} : a, t[2] = a, t[3] = f);
@@ -839,7 +835,7 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
839
835
  let e;
840
836
  t[12] !== p || t[13] !== l || t[14] !== c || t[15] !== o || t[16] !== s || t[17] !== d ? (e = (e, t) => {
841
837
  let n = e.id ?? `question-${t}`;
842
- return /* @__PURE__ */ Y(On, {
838
+ return /* @__PURE__ */ J(On, {
843
839
  question: e,
844
840
  questionIndex: t,
845
841
  editable: l,
@@ -852,7 +848,7 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
852
848
  }, t[12] = p, t[13] = l, t[14] = c, t[15] = o, t[16] = s, t[17] = d, t[18] = e) : e = t[18], m = n.map(e), t[4] = p, t[5] = l, t[6] = c, t[7] = o, t[8] = s, t[9] = n, t[10] = d, t[11] = m;
853
849
  } else m = t[11];
854
850
  let h;
855
- return t[19] === m ? h = t[20] : (h = /* @__PURE__ */ Y(G, {
851
+ return t[19] === m ? h = t[20] : (h = /* @__PURE__ */ J(W, {
856
852
  as: "form",
857
853
  gap: "sm",
858
854
  onSubmit: xn,
@@ -861,15 +857,15 @@ var xt = (e = "") => JSON.stringify(C(e)), St = (e) => e.trim().length > 0, Ct =
861
857
  }), t[19] = m, t[20] = h), h;
862
858
  };
863
859
  function An(e, t) {
864
- return /* @__PURE__ */ Y(A, {
860
+ return /* @__PURE__ */ J(A, {
865
861
  as: "li",
866
- children: /* @__PURE__ */ Y(r, {
862
+ children: /* @__PURE__ */ J(r, {
867
863
  checked: e.checked,
868
864
  readOnly: !0,
869
865
  "aria-readonly": "true",
870
866
  inputProps: { tabIndex: -1 },
871
867
  size: "xs",
872
- children: /* @__PURE__ */ Y(K, {
868
+ children: /* @__PURE__ */ J(G, {
873
869
  textStyle: "label/XS/regular",
874
870
  color: "fg",
875
871
  children: e.label
@@ -887,21 +883,21 @@ var jn = (e) => e.questions.map((e, t) => ({
887
883
  required: !!e.required,
888
884
  allowCustomAnswer: !!e.allowCustomAnswer
889
885
  })), Mn = (e) => {
890
- let t = J(49), { questionPrompt: n, selectedOptionsByQuestion: r, customAnswersByQuestion: i, onToggleOption: a, onCustomAnswerChange: o } = e, { onToggleOther: s } = e, { questions: c, isEditable: l } = e, [u, d] = Q(0), f = ye(null), p = yn(), m = p?.selection, h = m?.revision, g, _;
886
+ let t = q(49), { questionPrompt: n, selectedOptionsByQuestion: r, customAnswersByQuestion: i, onToggleOption: a, onCustomAnswerChange: o } = e, { onToggleOther: s } = e, { questions: c, isEditable: l } = e, [u, d] = Q(0), f = Z(null), p = yn(), m = p?.selection, h = m?.revision, g, _;
891
887
  t[0] === h ? (g = t[1], _ = t[2]) : (g = () => {
892
888
  h !== void 0 && f.current?.focus();
893
- }, _ = [h], t[0] = h, t[1] = g, t[2] = _), Z(g, _);
889
+ }, _ = [h], t[0] = h, t[1] = g, t[2] = _), X(g, _);
894
890
  let v;
895
891
  t[3] !== p || t[4] !== m ? (v = (e) => {
896
892
  m ? p?.selectStep(e) : d(e);
897
893
  }, t[3] = p, t[4] = m, t[5] = v) : v = t[5];
898
894
  let y = v, b = Math.min(m?.index ?? u, c.length - 1), x = c[b], S = c.length > 1, C = S ? "0" : "xs", w;
899
- t[6] !== i || t[7] !== S || t[8] !== c || t[9] !== b || t[10] !== y || t[11] !== r ? (w = S ? /* @__PURE__ */ Y(I, {
895
+ t[6] !== i || t[7] !== S || t[8] !== c || t[9] !== b || t[10] !== y || t[11] !== r ? (w = S ? /* @__PURE__ */ J(I, {
900
896
  role: "tablist",
901
897
  "aria-label": "Question steps",
902
898
  gap: "1",
903
899
  minWidth: "0",
904
- children: c.map((e, t) => /* @__PURE__ */ Y(Qt, {
900
+ children: c.map((e, t) => /* @__PURE__ */ J(Qt, {
905
901
  question: e,
906
902
  questionIndex: t,
907
903
  isActive: t === b,
@@ -926,7 +922,7 @@ var jn = (e) => e.questions.map((e, t) => ({
926
922
  o(n.questions[b], b, r);
927
923
  }, t[28] = o, t[29] = n.questions, t[30] = b, t[31] = j) : j = t[31];
928
924
  let M;
929
- t[32] !== i || t[33] !== l || t[34] !== r || t[35] !== A || t[36] !== j || t[37] !== O || t[38] !== k ? (M = /* @__PURE__ */ Y(kn, {
925
+ t[32] !== i || t[33] !== l || t[34] !== r || t[35] !== A || t[36] !== j || t[37] !== O || t[38] !== k ? (M = /* @__PURE__ */ J(kn, {
930
926
  questions: O,
931
927
  editable: l,
932
928
  selectedOptionsByQuestion: r,
@@ -936,7 +932,7 @@ var jn = (e) => e.questions.map((e, t) => ({
936
932
  onCustomAnswerChange: j
937
933
  }), t[32] = i, t[33] = l, t[34] = r, t[35] = A, t[36] = j, t[37] = O, t[38] = k, t[39] = M) : M = t[39];
938
934
  let N;
939
- t[40] !== M || t[41] !== T || t[42] !== E || t[43] !== D ? (N = /* @__PURE__ */ Y(G, {
935
+ t[40] !== M || t[41] !== T || t[42] !== E || t[43] !== D ? (N = /* @__PURE__ */ J(W, {
940
936
  ref: f,
941
937
  tabIndex: -1,
942
938
  id: T,
@@ -946,25 +942,25 @@ var jn = (e) => e.questions.map((e, t) => ({
946
942
  children: M
947
943
  }), t[40] = M, t[41] = T, t[42] = E, t[43] = D, t[44] = N) : N = t[44];
948
944
  let P;
949
- return t[45] !== N || t[46] !== C || t[47] !== w ? (P = /* @__PURE__ */ X(G, {
945
+ return t[45] !== N || t[46] !== C || t[47] !== w ? (P = /* @__PURE__ */ Y(W, {
950
946
  gap: "xs",
951
947
  pb: "sm",
952
948
  pt: C,
953
949
  children: [w, N]
954
950
  }), t[45] = N, t[46] = C, t[47] = w, t[48] = P) : P = t[48], P;
955
951
  }, Nn = (e) => {
956
- let t = J(8), { questionPrompt: n } = e, r;
952
+ let t = q(8), { questionPrompt: n } = e, r;
957
953
  t[0] === n ? r = t[1] : (r = jn(n), t[0] = n, t[1] = r);
958
954
  let i = r, a;
959
955
  t[2] === n ? a = t[3] : (a = Ht(n), t[2] = n, t[3] = a);
960
956
  let o = a, s;
961
- return t[4] !== e || t[5] !== o || t[6] !== i ? (s = /* @__PURE__ */ Y(Mn, {
957
+ return t[4] !== e || t[5] !== o || t[6] !== i ? (s = /* @__PURE__ */ J(Mn, {
962
958
  ...e,
963
959
  questions: i
964
960
  }, o), t[4] = e, t[5] = o, t[6] = i, t[7] = s) : s = t[7], s;
965
961
  }, Pn = (e) => Object.fromEntries((e?.questions ?? []).flatMap((t, n) => e?.delivery === "async" && t.options.length ? [[Pt(t, n), [t.options[0].label]]] : [])), Fn = (e, t) => {
966
- let [n, r] = Q(() => Pn(e)), [i, a] = Q({}), o = Ht(e), s = ye(JSON.stringify([o, t ?? null]));
967
- return Z(() => {
962
+ let [n, r] = Q(() => Pn(e)), [i, a] = Q({}), o = Ht(e), s = Z(JSON.stringify([o, t ?? null]));
963
+ return X(() => {
968
964
  let n = JSON.stringify([o, t ?? null]);
969
965
  s.current !== n && (s.current = n, r(Pn(e)), a({}));
970
966
  }, [
@@ -1002,7 +998,7 @@ var jn = (e) => e.questions.map((e, t) => ({
1002
998
  buildAnswers: () => e ? Yt(e, n, i) : []
1003
999
  };
1004
1000
  }, In = (e) => {
1005
- let t = J(33), { prompt: n, actions: r, disabled: i, onSubmit: a } = e, o = Fn(n), s = yn(), [c, l] = Q(!1), u = ye(!1), d;
1001
+ let t = q(33), { prompt: n, actions: r, disabled: i, onSubmit: a } = e, o = Fn(n), s = yn(), [c, l] = Q(!1), u = Z(!1), d;
1006
1002
  t[0] !== i || t[1] !== a || t[2] !== n || t[3] !== o ? (d = async (e) => {
1007
1003
  let t = e !== void 0 && e;
1008
1004
  if (u.current || i || !t && o.hasMissingRequiredAnswer) return;
@@ -1019,7 +1015,7 @@ var jn = (e) => e.questions.map((e, t) => ({
1019
1015
  }
1020
1016
  }, t[0] = i, t[1] = a, t[2] = n, t[3] = o, t[4] = d) : d = t[4];
1021
1017
  let f = d, p = !i && !c, m;
1022
- t[5] !== n || t[6] !== o.customAnswersByQuestion || t[7] !== o.selectedOptionsByQuestion || t[8] !== o.setCustomAnswer || t[9] !== o.toggleOption || t[10] !== o.toggleOther || t[11] !== p ? (m = /* @__PURE__ */ Y(Nn, {
1018
+ t[5] !== n || t[6] !== o.customAnswersByQuestion || t[7] !== o.selectedOptionsByQuestion || t[8] !== o.setCustomAnswer || t[9] !== o.toggleOption || t[10] !== o.toggleOther || t[11] !== p ? (m = /* @__PURE__ */ J(Nn, {
1023
1019
  isEditable: p,
1024
1020
  questionPrompt: n,
1025
1021
  selectedOptionsByQuestion: o.selectedOptionsByQuestion,
@@ -1029,7 +1025,7 @@ var jn = (e) => e.questions.map((e, t) => ({
1029
1025
  onCustomAnswerChange: o.setCustomAnswer
1030
1026
  }), t[5] = n, t[6] = o.customAnswersByQuestion, t[7] = o.selectedOptionsByQuestion, t[8] = o.setCustomAnswer, t[9] = o.toggleOption, t[10] = o.toggleOther, t[11] = p, t[12] = m) : m = t[12];
1031
1027
  let h;
1032
- t[13] !== s || t[14] !== n.delivery || t[15] !== c ? (h = n.delivery === "async" && s ? /* @__PURE__ */ Y(j, {
1028
+ t[13] !== s || t[14] !== n.delivery || t[15] !== c ? (h = n.delivery === "async" && s ? /* @__PURE__ */ J(j, {
1033
1029
  size: "xs",
1034
1030
  variant: "ghost",
1035
1031
  disabled: c,
@@ -1037,7 +1033,7 @@ var jn = (e) => e.questions.map((e, t) => ({
1037
1033
  children: "Back to message"
1038
1034
  }) : null, t[13] = s, t[14] = n.delivery, t[15] = c, t[16] = h) : h = t[16];
1039
1035
  let g;
1040
- t[17] !== r || t[18] !== h ? (g = /* @__PURE__ */ X(fe, { children: [h, r] }), t[17] = r, t[18] = h, t[19] = g) : g = t[19];
1036
+ t[17] !== r || t[18] !== h ? (g = /* @__PURE__ */ Y(pe, { children: [h, r] }), t[17] = r, t[18] = h, t[19] = g) : g = t[19];
1041
1037
  let _ = i || c, v;
1042
1038
  t[20] === f ? v = t[21] : (v = () => void f(!0), t[20] = f, t[21] = v);
1043
1039
  let y = i || c || o.hasMissingRequiredAnswer || !o.responseText ? "none" : "submit", b;
@@ -1045,7 +1041,7 @@ var jn = (e) => e.questions.map((e, t) => ({
1045
1041
  e === "submit" && f();
1046
1042
  }, t[22] = f, t[23] = b);
1047
1043
  let x;
1048
- t[24] !== g || t[25] !== _ || t[26] !== v || t[27] !== y || t[28] !== b ? (x = /* @__PURE__ */ Y(Ot, {
1044
+ t[24] !== g || t[25] !== _ || t[26] !== v || t[27] !== y || t[28] !== b ? (x = /* @__PURE__ */ J(Ot, {
1049
1045
  actions: g,
1050
1046
  questionPrompt: !0,
1051
1047
  skipDisabled: _,
@@ -1056,9 +1052,9 @@ var jn = (e) => e.questions.map((e, t) => ({
1056
1052
  runAction: b
1057
1053
  }), t[24] = g, t[25] = _, t[26] = v, t[27] = y, t[28] = b, t[29] = x) : x = t[29];
1058
1054
  let S;
1059
- return t[30] !== m || t[31] !== x ? (S = /* @__PURE__ */ X(fe, { children: [m, x] }), t[30] = m, t[31] = x, t[32] = S) : S = t[32], S;
1055
+ return t[30] !== m || t[31] !== x ? (S = /* @__PURE__ */ Y(pe, { children: [m, x] }), t[30] = m, t[31] = x, t[32] = S) : S = t[32], S;
1060
1056
  }, Ln = (e) => {
1061
- let { decision: t, disabled: n } = e, [r, i] = Q(!1), a = ye(!1), o = async (e) => {
1057
+ let { decision: t, disabled: n } = e, [r, i] = Q(!1), a = Z(!1), o = async (e) => {
1062
1058
  let r = t.actions.find((t) => t.id === e);
1063
1059
  if (!(a.current || n || t.pending || !r || r.disabled)) {
1064
1060
  a.current = !0, i(!0);
@@ -1069,7 +1065,7 @@ var jn = (e) => e.questions.map((e, t) => ({
1069
1065
  }
1070
1066
  }
1071
1067
  };
1072
- return /* @__PURE__ */ X(F, {
1068
+ return /* @__PURE__ */ Y(F, {
1073
1069
  "aria-label": "Plan decision",
1074
1070
  align: "center",
1075
1071
  justify: "space-between",
@@ -1077,19 +1073,19 @@ var jn = (e) => e.questions.map((e, t) => ({
1077
1073
  wrap: "wrap",
1078
1074
  children: [
1079
1075
  t.controls,
1080
- t.model ? /* @__PURE__ */ Y(K, {
1076
+ t.model ? /* @__PURE__ */ J(G, {
1081
1077
  textStyle: "label/S/regular",
1082
1078
  minH: "7",
1083
1079
  display: "flex",
1084
1080
  alignItems: "center",
1085
1081
  children: t.model
1086
1082
  }) : null,
1087
- /* @__PURE__ */ Y(I, {
1083
+ /* @__PURE__ */ J(I, {
1088
1084
  gap: "xs",
1089
1085
  marginStart: "auto",
1090
1086
  wrap: "wrap",
1091
1087
  justify: "end",
1092
- children: t.actions.map((e) => /* @__PURE__ */ Y(j, {
1088
+ children: t.actions.map((e) => /* @__PURE__ */ J(j, {
1093
1089
  size: "xs",
1094
1090
  variant: e.variant,
1095
1091
  disabled: n || r || t.pending || e.disabled,
@@ -1100,10 +1096,10 @@ var jn = (e) => e.questions.map((e, t) => ({
1100
1096
  ]
1101
1097
  });
1102
1098
  }, Rn = (e) => {
1103
- let t = J(11), { request: n, question: r, decision: i, actions: a, disabled: o, submitDisabled: s, onSubmit: c } = e;
1099
+ let t = q(11), { request: n, question: r, decision: i, actions: a, disabled: o, submitDisabled: s, onSubmit: c } = e;
1104
1100
  if (n?.kind === "decision" && i) {
1105
1101
  let e;
1106
- return t[0] !== i || t[1] !== o ? (e = /* @__PURE__ */ Y(Ln, {
1102
+ return t[0] !== i || t[1] !== o ? (e = /* @__PURE__ */ J(Ln, {
1107
1103
  decision: i,
1108
1104
  disabled: o
1109
1105
  }, i.id), t[0] = i, t[1] = o, t[2] = e) : e = t[2], e;
@@ -1112,7 +1108,7 @@ var jn = (e) => e.questions.map((e, t) => ({
1112
1108
  let e;
1113
1109
  t[3] === r ? e = t[4] : (e = Ht(r), t[3] = r, t[4] = e);
1114
1110
  let n = o || s, i;
1115
- return t[5] !== a || t[6] !== c || t[7] !== r || t[8] !== e || t[9] !== n ? (i = /* @__PURE__ */ Y(In, {
1111
+ return t[5] !== a || t[6] !== c || t[7] !== r || t[8] !== e || t[9] !== n ? (i = /* @__PURE__ */ J(In, {
1116
1112
  prompt: r,
1117
1113
  actions: a,
1118
1114
  disabled: n,
@@ -1121,7 +1117,7 @@ var jn = (e) => e.questions.map((e, t) => ({
1121
1117
  }
1122
1118
  return null;
1123
1119
  }, zn = (e, t) => {
1124
- let n = J(7), [r, i] = Q(e || t !== 0), a;
1120
+ let n = q(7), [r, i] = Q(e || t !== 0), a;
1125
1121
  n[0] !== e || n[1] !== t ? (a = {
1126
1122
  autoFocus: e,
1127
1123
  focusSignal: t
@@ -1149,7 +1145,7 @@ var jn = (e) => e.questions.map((e, t) => ({
1149
1145
  }
1150
1146
  return t;
1151
1147
  }, Vn = (e, t, n, r) => r === 0 ? null : e === null ? t === "previous" && n === "" ? { index: 0 } : null : t === "previous" ? { index: Math.min(e + 1, r - 1) } : { index: e === 0 ? null : e - 1 }, Hn = (e) => {
1152
- let t = J(24), { recentUserMessages: n, text: r, blocked: i, resetKey: a, onChange: o } = e, s = ye(null), c = ye(null), l, u;
1148
+ let t = q(24), { recentUserMessages: n, text: r, blocked: i, resetKey: a, onChange: o } = e, s = Z(null), c = Z(null), l, u;
1153
1149
  if (t[0] !== i || t[1] !== n || t[2] !== a) {
1154
1150
  l = n.slice(0, 10);
1155
1151
  let e = JSON.stringify(l);
@@ -1159,10 +1155,10 @@ var jn = (e) => e.questions.map((e, t) => ({
1159
1155
  i
1160
1156
  ]), t[0] = i, t[1] = n, t[2] = a, t[3] = l, t[4] = u;
1161
1157
  } else l = t[3], u = t[4];
1162
- let d = u, f = ye(d), p, m;
1158
+ let d = u, f = Z(d), p, m;
1163
1159
  t[5] === d ? (p = t[6], m = t[7]) : (p = () => {
1164
1160
  f.current !== d && (f.current = d, c.current = null);
1165
- }, m = [d], t[5] = d, t[6] = p, t[7] = m), Z(p, m);
1161
+ }, m = [d], t[5] = d, t[6] = p, t[7] = m), X(p, m);
1166
1162
  let h;
1167
1163
  t[8] === Symbol.for("react.memo_cache_sentinel") ? (h = () => {
1168
1164
  c.current = null;
@@ -1191,7 +1187,7 @@ var jn = (e) => e.questions.map((e, t) => ({
1191
1187
  recallNext: S
1192
1188
  }, t[20] = v, t[21] = x, t[22] = S, t[23] = C) : C = t[23], C;
1193
1189
  }, Un = (e) => {
1194
- let t = J(7), [n, r] = Q(e), [i, a] = Q(e), [o, s] = Q(0), c;
1190
+ let t = q(7), [n, r] = Q(e), [i, a] = Q(e), [o, s] = Q(0), c;
1195
1191
  t[0] === e ? c = t[1] : (c = () => w(e), t[0] = e, t[1] = c);
1196
1192
  let [l, u] = Q(c), d;
1197
1193
  t[2] === Symbol.for("react.memo_cache_sentinel") ? (d = (e) => {
@@ -1231,10 +1227,10 @@ var Gn = (e, t, n) => {
1231
1227
  let [n, r] = Q(), i = Gn(e, t, n);
1232
1228
  return (i?.kind !== n?.kind || i?.id !== n?.id) && r(i), i;
1233
1229
  }, qn = (e) => {
1234
- let t = J(2), { placeholder: n } = e;
1230
+ let t = q(2), { placeholder: n } = e;
1235
1231
  if (!n) return null;
1236
1232
  let r;
1237
- return t[0] === n ? r = t[1] : (r = /* @__PURE__ */ Y(K, {
1233
+ return t[0] === n ? r = t[1] : (r = /* @__PURE__ */ J(G, {
1238
1234
  textStyle: "label/M/regular",
1239
1235
  color: "fg.subtle",
1240
1236
  pointerEvents: "none",
@@ -1243,50 +1239,50 @@ var Gn = (e, t, n) => {
1243
1239
  children: n
1244
1240
  }), t[0] = n, t[1] = r), r;
1245
1241
  }, Jn = "border.accent-light", Yn = (e) => {
1246
- let { defaultState: t, recentUserMessages: r = [], onSubmit: i = () => {}, onInterrupt: a, onAttachFiles: o, onAttachText: s, textAttachmentPasteLineThreshold: c = 200, streaming: l = !1, attachedResources: u = [], onClearAttachments: d, isDisabled: f = !1, submitDisabled: p = !1, onChange: m, placeholder: h, attachmentList: g, actions: _, submitActions: v, attachmentActions: y, attachedToTop: b = !1, recessed: x = !1, questionPrompt: S, decision: C, autoFocus: w = !1, focusSignal: T = 0, submitTitle: D, submitLabel: O, initialSelection: k, onSelectionChange: j, onEditorStateChange: M, retainTextUntilAcknowledged: N = !1, commands: P = [] } = e, I = Kn(S, C), L = !!I, R = x ? "border.subtle" : "border", [z, B] = Q(!1), { editorKey: V, editorState: H, remountEditor: U, setEditorState: ee, setText: te, text: ne } = Un(t), re = zn(w, T), W = Hn({
1242
+ let { defaultState: t, recentUserMessages: r = [], onSubmit: i = () => {}, onInterrupt: a, onAttachFiles: o, onAttachText: s, textAttachmentPasteLineThreshold: c = 200, streaming: l = !1, attachedResources: u = [], onClearAttachments: d, isDisabled: f = !1, submitDisabled: p = !1, onChange: m, placeholder: h, attachmentList: g, actions: _, submitActions: v, attachmentActions: y, attachedToTop: b = !1, recessed: x = !1, questionPrompt: S, decision: C, autoFocus: w = !1, focusSignal: T = 0, submitTitle: D, submitLabel: O, initialSelection: k, onSelectionChange: j, onEditorStateChange: M, retainTextUntilAcknowledged: N = !1, commands: P = [] } = e, I = Kn(S, C), L = !!I, ee = x ? "border.subtle" : "border", [R, z] = Q(!1), { editorKey: B, editorState: te, remountEditor: V, setEditorState: ne, setText: re, text: ie } = Un(t), H = zn(w, T), U = Hn({
1247
1243
  recentUserMessages: r,
1248
- text: ne,
1249
- blocked: f || z || L,
1250
- resetKey: String(V),
1244
+ text: ie,
1245
+ blocked: f || R || L,
1246
+ resetKey: String(B),
1251
1247
  onChange: (e) => {
1252
- te(e), m?.(e);
1248
+ re(e), m?.(e);
1253
1249
  }
1254
- }), G = (e) => {
1250
+ }), W = (e) => {
1255
1251
  let t = e.target;
1256
- t instanceof Element && e.currentTarget.contains(t) && (t.closest("button, input, textarea, select, a, label, [role=button], [role=combobox]") || L || re.request());
1257
- }, ie = (e) => {
1258
- U(xt(e)), W.change(e);
1259
- }, K = !f && !z && !p && !L, ae = {
1252
+ t instanceof Element && e.currentTarget.contains(t) && (t.closest("button, input, textarea, select, a, label, [role=button], [role=combobox]") || L || H.request());
1253
+ }, ae = (e) => {
1254
+ V(xt(e)), U.change(e);
1255
+ }, G = !f && !R && !p && !L, oe = {
1260
1256
  canInterrupt: !L && !!a,
1261
1257
  canSubmit: !p && !L,
1262
1258
  hasQuestionPrompt: L,
1263
- isDisabled: f || z,
1259
+ isDisabled: f || R,
1264
1260
  streaming: l,
1265
- text: ne
1266
- }, oe = wt(ae), se = l ? "Queue message" : "Send message", q = async () => {
1267
- if (!K || !ne.trim()) return;
1268
- let e = ne;
1269
- W.reset(), B(!0), N || ie("");
1261
+ text: ie
1262
+ }, se = wt(oe), ce = l ? "Queue message" : "Send message", K = async () => {
1263
+ if (!G || !ie.trim()) return;
1264
+ let e = ie;
1265
+ U.reset(), z(!0), N || ae("");
1270
1266
  try {
1271
1267
  await kt({
1272
- text: ne.trim(),
1268
+ text: ie.trim(),
1273
1269
  attachments: u,
1274
1270
  onSubmit: i,
1275
1271
  onClearAttachments: d
1276
1272
  });
1277
1273
  } catch {
1278
- N || ie(e);
1274
+ N || ae(e);
1279
1275
  } finally {
1280
- B(!1), re.request();
1276
+ z(!1), H.request();
1281
1277
  }
1282
- }, ce = (e) => {
1283
- e === "interrupt" && a?.(), e === "submit" && q();
1284
- }, le = Et({
1278
+ }, le = (e) => {
1279
+ e === "interrupt" && a?.(), e === "submit" && K();
1280
+ }, ue = Et({
1285
1281
  onAttachFiles: o,
1286
1282
  onAttachText: s,
1287
1283
  textAttachmentPasteLineThreshold: c
1288
1284
  });
1289
- return /* @__PURE__ */ Y(A, {
1285
+ return /* @__PURE__ */ J(A, {
1290
1286
  position: "relative",
1291
1287
  width: "100%",
1292
1288
  paddingX: "xs",
@@ -1297,7 +1293,7 @@ var Gn = (e, t, n) => {
1297
1293
  borderTopRadius: b ? "0" : void 0,
1298
1294
  borderWidth: "1px",
1299
1295
  borderStyle: "solid",
1300
- borderColor: R,
1296
+ borderColor: ee,
1301
1297
  zIndex: 0,
1302
1298
  transition: "border-color 0.2s ease-in-out",
1303
1299
  _hover: { zIndex: 1 },
@@ -1305,16 +1301,16 @@ var Gn = (e, t, n) => {
1305
1301
  borderColor: Jn,
1306
1302
  zIndex: 1
1307
1303
  },
1308
- onPasteCapture: L ? void 0 : le.onPasteCapture,
1309
- onDropCapture: L ? void 0 : le.onDropCapture,
1310
- onDragOver: L ? void 0 : le.onDragOver,
1311
- onClick: G,
1312
- children: /* @__PURE__ */ X(F, {
1304
+ onPasteCapture: L ? void 0 : ue.onPasteCapture,
1305
+ onDropCapture: L ? void 0 : ue.onDropCapture,
1306
+ onDragOver: L ? void 0 : ue.onDragOver,
1307
+ onClick: W,
1308
+ children: /* @__PURE__ */ Y(F, {
1313
1309
  direction: "column",
1314
1310
  color: "fg",
1315
1311
  gap: "xs",
1316
1312
  children: [
1317
- /* @__PURE__ */ Y(Rn, {
1313
+ /* @__PURE__ */ J(Rn, {
1318
1314
  request: I,
1319
1315
  question: S,
1320
1316
  decision: C,
@@ -1329,50 +1325,50 @@ var Gn = (e, t, n) => {
1329
1325
  onClearAttachments: d
1330
1326
  })
1331
1327
  }),
1332
- /* @__PURE__ */ X(A, {
1328
+ /* @__PURE__ */ Y(A, {
1333
1329
  display: L ? "none" : void 0,
1334
- children: [g ? /* @__PURE__ */ Y(A, {
1330
+ children: [g ? /* @__PURE__ */ J(A, {
1335
1331
  mb: "xs",
1336
1332
  children: g
1337
- }) : null, /* @__PURE__ */ Y(n, {
1333
+ }) : null, /* @__PURE__ */ J(n, {
1338
1334
  maxH: "10rem",
1339
1335
  showHorizontalScrollbar: !1,
1340
1336
  contentProps: { pr: "2xs" },
1341
- children: /* @__PURE__ */ Y(F, {
1337
+ children: /* @__PURE__ */ J(F, {
1342
1338
  minH: "7",
1343
1339
  align: "center",
1344
- children: /* @__PURE__ */ Y(E, {
1345
- ref: W.editorRef,
1346
- onRecallPrevious: W.recallPrevious,
1347
- onRecallNext: W.recallNext,
1348
- defaultState: H,
1340
+ children: /* @__PURE__ */ J(E, {
1341
+ ref: U.editorRef,
1342
+ onRecallPrevious: U.recallPrevious,
1343
+ onRecallNext: U.recallNext,
1344
+ defaultState: te,
1349
1345
  initialSelection: k,
1350
1346
  onSelectionChange: j,
1351
- isEditable: !f && !z && !L,
1352
- focusRequested: re.requested,
1353
- onFocusRequestComplete: re.complete,
1354
- placeholder: /* @__PURE__ */ Y(qn, { placeholder: h }),
1347
+ isEditable: !f && !R && !L,
1348
+ focusRequested: H.requested,
1349
+ onFocusRequestComplete: H.complete,
1350
+ placeholder: /* @__PURE__ */ J(qn, { placeholder: h }),
1355
1351
  onChange: (e, t) => {
1356
- ee(JSON.stringify(t)), M?.(e, JSON.stringify(t)), W.change(e);
1352
+ ne(JSON.stringify(t)), M?.(e, JSON.stringify(t)), U.change(e);
1357
1353
  },
1358
- onSubmit: () => ce(Ct(ae)),
1354
+ onSubmit: () => le(Ct(oe)),
1359
1355
  commands: P
1360
- }, V)
1356
+ }, B)
1361
1357
  })
1362
1358
  })]
1363
1359
  }),
1364
- L ? null : /* @__PURE__ */ Y(Ot, {
1365
- actions: /* @__PURE__ */ X(fe, { children: [y, _] }),
1360
+ L ? null : /* @__PURE__ */ J(Ot, {
1361
+ actions: /* @__PURE__ */ Y(pe, { children: [y, _] }),
1366
1362
  questionPrompt: !1,
1367
1363
  skipDisabled: !1,
1368
1364
  skipTitle: "",
1369
1365
  onSkip: () => {},
1370
- buttonAction: oe,
1366
+ buttonAction: se,
1371
1367
  submitTitle: D,
1372
1368
  submitLabel: O,
1373
1369
  submitActions: v,
1374
- messageTitle: se,
1375
- runAction: ce
1370
+ messageTitle: ce,
1371
+ runAction: le
1376
1372
  })
1377
1373
  ]
1378
1374
  })
@@ -1396,10 +1392,10 @@ var Gn = (e, t, n) => {
1396
1392
  for (let n = 0; n < e.length; n += 1) if (e[n] !== t[n]) return !1;
1397
1393
  return !0;
1398
1394
  }, $n = (e) => {
1399
- let t = ye({
1395
+ let t = Z({
1400
1396
  initialized: !1,
1401
1397
  seenKeys: /* @__PURE__ */ new Set()
1402
- }), n = ye(null);
1398
+ }), n = Z(null);
1403
1399
  if (n.current && Qn(n.current.itemKeys, e)) return n.current.animatedKeys;
1404
1400
  let r = Zn({
1405
1401
  itemKeys: e,
@@ -1414,14 +1410,14 @@ var Gn = (e, t, n) => {
1414
1410
  minute: "2-digit",
1415
1411
  timeZone: n
1416
1412
  }).format(new Date(e.createdAt)) : "", rr = (e) => {
1417
- let n = J(20), { message: r, alwaysVisible: i, copyAlwaysVisible: a } = e, o = i !== void 0 && i, s = a === void 0 ? o : a, [c, l] = Q(!1), u = ye(null), d;
1413
+ let n = q(20), { message: r, alwaysVisible: i, copyAlwaysVisible: a } = e, o = i !== void 0 && i, s = a === void 0 ? o : a, [c, l] = Q(!1), u = Z(null), d;
1418
1414
  n[0] === r ? d = n[1] : (d = tr(r), n[0] = r, n[1] = d);
1419
1415
  let f = d, p;
1420
1416
  n[2] === r ? p = n[3] : (p = nr(r), n[2] = r, n[3] = p);
1421
1417
  let m = p, h, g;
1422
1418
  n[4] === Symbol.for("react.memo_cache_sentinel") ? (h = () => () => {
1423
1419
  u.current !== null && window.clearTimeout(u.current);
1424
- }, g = [], n[4] = h, n[5] = g) : (h = n[4], g = n[5]), Z(h, g);
1420
+ }, g = [], n[4] = h, n[5] = g) : (h = n[4], g = n[5]), X(h, g);
1425
1421
  let _;
1426
1422
  n[6] === f ? _ = n[7] : (_ = async () => {
1427
1423
  if (f) try {
@@ -1433,30 +1429,30 @@ var Gn = (e, t, n) => {
1433
1429
  let v = _;
1434
1430
  if (!f && !m) return null;
1435
1431
  let y = o ? "1" : "0", b = o ? "auto" : "none", x;
1436
- n[8] === m ? x = n[9] : (x = m ? /* @__PURE__ */ Y(K, {
1432
+ n[8] === m ? x = n[9] : (x = m ? /* @__PURE__ */ J(G, {
1437
1433
  textStyle: "label/XS/regular",
1438
1434
  color: "fg.muted",
1439
1435
  children: m
1440
1436
  }) : null, n[8] = m, n[9] = x);
1441
1437
  let S;
1442
- n[10] !== s || n[11] !== v || n[12] !== f || n[13] !== c ? (S = f ? /* @__PURE__ */ Y(A, {
1438
+ n[10] !== s || n[11] !== v || n[12] !== f || n[13] !== c ? (S = f ? /* @__PURE__ */ J(A, {
1443
1439
  opacity: s ? "1" : "0",
1444
1440
  pointerEvents: s ? "auto" : "none",
1445
1441
  transition: "opacity 120ms ease",
1446
1442
  css: ir,
1447
- children: /* @__PURE__ */ Y(t, {
1443
+ children: /* @__PURE__ */ J(t, {
1448
1444
  content: c ? "Copied" : "Copy message",
1449
- children: /* @__PURE__ */ Y(R, {
1445
+ children: /* @__PURE__ */ J(ee, {
1450
1446
  "aria-label": c ? "Copied" : "Copy message",
1451
1447
  variant: "ghost",
1452
1448
  size: "2xs",
1453
1449
  onClick: v,
1454
- children: Y(c ? we : De, { size: 12 })
1450
+ children: J(c ? we : De, { size: 12 })
1455
1451
  })
1456
1452
  })
1457
1453
  }) : null, n[10] = s, n[11] = v, n[12] = f, n[13] = c, n[14] = S) : S = n[14];
1458
1454
  let C;
1459
- return n[15] !== S || n[16] !== y || n[17] !== b || n[18] !== x ? (C = /* @__PURE__ */ X(I, {
1455
+ return n[15] !== S || n[16] !== y || n[17] !== b || n[18] !== x ? (C = /* @__PURE__ */ Y(I, {
1460
1456
  "data-chat-message-action-panel": "true",
1461
1457
  gap: "2xs",
1462
1458
  minH: "6",
@@ -1480,31 +1476,31 @@ var Gn = (e, t, n) => {
1480
1476
  pointerEvents: "auto"
1481
1477
  }
1482
1478
  }, ar = (e) => {
1483
- let t = J(12), n, r, i, a;
1479
+ let t = q(12), n, r, i, a;
1484
1480
  t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4]) : ({children: n, linkHandler: r, streaming: a, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a);
1485
1481
  let o;
1486
- t[5] !== n || t[6] !== r || t[7] !== a ? (o = /* @__PURE__ */ Y(T, {
1482
+ t[5] !== n || t[6] !== r || t[7] !== a ? (o = /* @__PURE__ */ J(T, {
1487
1483
  defaultState: n,
1488
1484
  linkHandler: r,
1489
1485
  streaming: a,
1490
1486
  fullWidth: !0
1491
1487
  }), t[5] = n, t[6] = r, t[7] = a, t[8] = o) : o = t[8];
1492
1488
  let s;
1493
- return t[9] !== i || t[10] !== o ? (s = /* @__PURE__ */ Y(A, {
1489
+ return t[9] !== i || t[10] !== o ? (s = /* @__PURE__ */ J(A, {
1494
1490
  ...i,
1495
1491
  children: o
1496
1492
  }), t[9] = i, t[10] = o, t[11] = s) : s = t[11], s;
1497
1493
  }, or = (e) => {
1498
- let t = J(12), { part: n } = e, r = ln(n.state?.input), i = yn(), a;
1494
+ let t = q(12), { part: n } = e, r = ln(n.state?.input), i = yn(), a;
1499
1495
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (a = { recipe: f }, t[0] = a) : a = t[0];
1500
- let o = ue(a);
1496
+ let o = de(a);
1501
1497
  if (!r) return null;
1502
1498
  let s;
1503
1499
  t[1] === n ? s = t[2] : (s = pn(n), t[1] = n, t[2] = s);
1504
- let c = s, l = c && !!i, u = G, d;
1500
+ let c = s, l = c && !!i, u = W, d;
1505
1501
  t[3] !== l || t[4] !== i || t[5] !== n || t[6] !== c || t[7] !== o ? (d = (e, t) => {
1506
1502
  let r = _n(n, t) ?? e.options[0]?.label ?? "Your answer", a = i?.activeKey === fn(n) && i?.selection?.index === t;
1507
- return /* @__PURE__ */ X(q.button, {
1503
+ return /* @__PURE__ */ Y(K.button, {
1508
1504
  type: "button",
1509
1505
  css: o({ multiline: e.question.includes("\n") }),
1510
1506
  "data-state": c ? "pending" : "answered",
@@ -1512,12 +1508,12 @@ var Gn = (e, t, n) => {
1512
1508
  "aria-expanded": l ? a : void 0,
1513
1509
  "aria-label": `${e.question} → ${r}${l ? ". Open question" : ""}`,
1514
1510
  onClick: () => i?.open(n, t),
1515
- children: [/* @__PURE__ */ Y("span", {
1511
+ children: [/* @__PURE__ */ J("span", {
1516
1512
  "data-question-text": !0,
1517
1513
  children: e.question
1518
- }), /* @__PURE__ */ X("span", {
1514
+ }), /* @__PURE__ */ Y("span", {
1519
1515
  "data-question-answer-row": !0,
1520
- children: [/* @__PURE__ */ Y(Se, { "aria-hidden": "true" }), /* @__PURE__ */ Y("span", {
1516
+ children: [/* @__PURE__ */ J(Se, { "aria-hidden": "true" }), /* @__PURE__ */ J("span", {
1521
1517
  "data-question-answer": !0,
1522
1518
  children: r
1523
1519
  })]
@@ -1525,7 +1521,7 @@ var Gn = (e, t, n) => {
1525
1521
  }, e.id);
1526
1522
  }, t[3] = l, t[4] = i, t[5] = n, t[6] = c, t[7] = o, t[8] = d) : d = t[8];
1527
1523
  let p = r.questions.map(d), m;
1528
- return t[9] !== u || t[10] !== p ? (m = /* @__PURE__ */ Y(u, {
1524
+ return t[9] !== u || t[10] !== p ? (m = /* @__PURE__ */ J(u, {
1529
1525
  gap: "xs",
1530
1526
  align: "start",
1531
1527
  children: p
@@ -2196,31 +2192,31 @@ var Fr = {
2196
2192
  }, sa = (e, t) => {
2197
2193
  let n = ia(t?.toolRenderers);
2198
2194
  return { items: e.map((e) => oa(e, n, t)).filter(ra) };
2199
- }, ca = ge(() => import("./diff-editor-CGpeyoCE.js").then((e) => e.n).then((e) => ({ default: e.DiffEditor }))), la = (e) => {
2200
- let t = J(2), n;
2201
- return t[0] === e ? n = t[1] : (n = /* @__PURE__ */ Y(me, {
2195
+ }, ca = _e(() => import("./diff-editor-CGpeyoCE.js").then((e) => e.n).then((e) => ({ default: e.DiffEditor }))), la = (e) => {
2196
+ let t = q(2), n;
2197
+ return t[0] === e ? n = t[1] : (n = /* @__PURE__ */ J(he, {
2202
2198
  fallback: null,
2203
- children: /* @__PURE__ */ Y(ca, { ...e })
2199
+ children: /* @__PURE__ */ J(ca, { ...e })
2204
2200
  }), t[0] = e, t[1] = n), n;
2205
2201
  };
2206
2202
  //#endregion
2207
2203
  //#region src/components/chat-ui/components/timeline-indicator.tsx
2208
2204
  function ua(e) {
2209
- let t = J(10), { ind: n } = e;
2205
+ let t = q(10), { ind: n } = e;
2210
2206
  if (!n || n.type === "none") return null;
2211
2207
  if (n.type === "icon") {
2212
2208
  let e;
2213
2209
  t[0] === n.icon ? e = t[1] : (e = pr(n.icon), t[0] = n.icon, t[1] = e);
2214
2210
  let r = e, i;
2215
- return t[2] === r ? i = t[3] : (i = /* @__PURE__ */ Y(oe.Indicator, {
2211
+ return t[2] === r ? i = t[3] : (i = /* @__PURE__ */ J(se.Indicator, {
2216
2212
  outline: "none",
2217
2213
  border: "none",
2218
2214
  background: "bg",
2219
2215
  color: "fg",
2220
- children: /* @__PURE__ */ Y(re, {
2216
+ children: /* @__PURE__ */ J(H, {
2221
2217
  display: "inline-flex",
2222
2218
  alignItems: "center",
2223
- children: /* @__PURE__ */ Y(r, {
2219
+ children: /* @__PURE__ */ J(r, {
2224
2220
  size: 14,
2225
2221
  strokeWidth: 1
2226
2222
  })
@@ -2228,17 +2224,17 @@ function ua(e) {
2228
2224
  }), t[2] = r, t[3] = i), i;
2229
2225
  }
2230
2226
  let r;
2231
- t[4] !== n.alt || t[5] !== n.src ? (r = /* @__PURE__ */ Y(k.Image, {
2227
+ t[4] !== n.alt || t[5] !== n.src ? (r = /* @__PURE__ */ J(k.Image, {
2232
2228
  src: n.src,
2233
2229
  alt: n.alt
2234
2230
  }), t[4] = n.alt, t[5] = n.src, t[6] = r) : r = t[6];
2235
2231
  let i;
2236
- t[7] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ Y(k.Fallback, {
2232
+ t[7] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ J(k.Fallback, {
2237
2233
  background: "bg.muted",
2238
2234
  color: "fg.muted"
2239
2235
  }), t[7] = i) : i = t[7];
2240
2236
  let a;
2241
- return t[8] === r ? a = t[9] : (a = /* @__PURE__ */ Y(oe.Indicator, { children: /* @__PURE__ */ X(k.Root, {
2237
+ return t[8] === r ? a = t[9] : (a = /* @__PURE__ */ J(se.Indicator, { children: /* @__PURE__ */ Y(k.Root, {
2242
2238
  boxSize: "full",
2243
2239
  children: [r, i]
2244
2240
  }) }), t[8] = r, t[9] = a), a;
@@ -2249,31 +2245,31 @@ var da = (e, t, n, r = !1) => {
2249
2245
  r && e.stopPropagation(), t.href || e.preventDefault(), t.filePath && n?.(t.filePath);
2250
2246
  };
2251
2247
  function fa(e) {
2252
- let t = J(6), { seg: n } = e, r;
2253
- t[0] !== n.alt || t[1] !== n.src ? (r = /* @__PURE__ */ Y(k.Image, {
2248
+ let t = q(6), { seg: n } = e, r;
2249
+ t[0] !== n.alt || t[1] !== n.src ? (r = /* @__PURE__ */ J(k.Image, {
2254
2250
  src: n.src,
2255
2251
  alt: n.alt
2256
2252
  }), t[0] = n.alt, t[1] = n.src, t[2] = r) : r = t[2];
2257
2253
  let i;
2258
- t[3] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ Y(k.Fallback, {
2254
+ t[3] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ J(k.Fallback, {
2259
2255
  background: "bg.muted",
2260
2256
  color: "fg.muted"
2261
2257
  }), t[3] = i) : i = t[3];
2262
2258
  let a;
2263
- return t[4] === r ? a = t[5] : (a = /* @__PURE__ */ X(k.Root, {
2259
+ return t[4] === r ? a = t[5] : (a = /* @__PURE__ */ Y(k.Root, {
2264
2260
  width: "1.5rem",
2265
2261
  height: "1.5rem",
2266
2262
  children: [r, i]
2267
2263
  }), t[4] = r, t[5] = a), a;
2268
2264
  }
2269
2265
  function pa(e) {
2270
- let t = J(9), { seg: n, onOpenFile: r } = e, i = n.additions ?? 0, a = n.deletions ?? 0, o;
2266
+ let t = q(9), { seg: n, onOpenFile: r } = e, i = n.additions ?? 0, a = n.deletions ?? 0, o;
2271
2267
  t[0] !== r || t[1] !== n.fileName || t[2] !== n.filePath ? (o = () => {
2272
2268
  let e = n.filePath ?? n.fileName;
2273
2269
  r?.(e);
2274
2270
  }, t[0] = r, t[1] = n.fileName, t[2] = n.filePath, t[3] = o) : o = t[3];
2275
2271
  let s;
2276
- return t[4] !== n.fileName || t[5] !== i || t[6] !== a || t[7] !== o ? (s = /* @__PURE__ */ Y(D, {
2272
+ return t[4] !== n.fileName || t[5] !== i || t[6] !== a || t[7] !== o ? (s = /* @__PURE__ */ J(D, {
2277
2273
  fileName: n.fileName,
2278
2274
  additions: i,
2279
2275
  deletions: a,
@@ -2281,7 +2277,7 @@ function pa(e) {
2281
2277
  }), t[4] = n.fileName, t[5] = i, t[6] = a, t[7] = o, t[8] = s) : s = t[8], s;
2282
2278
  }
2283
2279
  function ma(e) {
2284
- let t = J(13), { seg: n, onOpenFile: r } = e, i = n.bold ? "medium" : void 0, a = !!(n.href || n.filePath), o = n.href ?? "#", s = (n.muted, "fg.muted"), c = a ? "pointer" : "default", l;
2280
+ let t = q(13), { seg: n, onOpenFile: r } = e, i = n.bold ? "medium" : void 0, a = !!(n.href || n.filePath), o = n.href ?? "#", s = (n.muted, "fg.muted"), c = a ? "pointer" : "default", l;
2285
2281
  t[0] !== r || t[1] !== n ? (l = (e) => da(e, n, r, !0), t[0] = r, t[1] = n, t[2] = l) : l = t[2];
2286
2282
  let u = n.muted ? "fg.muted" : "fg.blue-dark", d;
2287
2283
  t[3] === u ? d = t[4] : (d = {
@@ -2289,7 +2285,7 @@ function ma(e) {
2289
2285
  color: u
2290
2286
  }, t[3] = u, t[4] = d);
2291
2287
  let f;
2292
- return t[5] !== i || t[6] !== n.text || t[7] !== o || t[8] !== s || t[9] !== c || t[10] !== l || t[11] !== d ? (f = /* @__PURE__ */ Y(H, {
2288
+ return t[5] !== i || t[6] !== n.text || t[7] !== o || t[8] !== s || t[9] !== c || t[10] !== l || t[11] !== d ? (f = /* @__PURE__ */ J(te, {
2293
2289
  href: o,
2294
2290
  fontWeight: i,
2295
2291
  color: s,
@@ -2301,7 +2297,7 @@ function ma(e) {
2301
2297
  }), t[5] = i, t[6] = n.text, t[7] = o, t[8] = s, t[9] = c, t[10] = l, t[11] = d, t[12] = f) : f = t[12], f;
2302
2298
  }
2303
2299
  function ha(e) {
2304
- let t = J(12), { seg: n, onOpenFile: r } = e, i = n.bold ? "medium" : void 0, a = n.href ?? "#", o = n.muted ? "fg.muted" : "accent.primary", s;
2300
+ let t = q(12), { seg: n, onOpenFile: r } = e, i = n.bold ? "medium" : void 0, a = n.href ?? "#", o = n.muted ? "fg.muted" : "accent.primary", s;
2305
2301
  t[0] !== r || t[1] !== n ? (s = (e) => da(e, n, r), t[0] = r, t[1] = n, t[2] = s) : s = t[2];
2306
2302
  let c = n.muted ? "fg.muted" : "accent.primary", l;
2307
2303
  t[3] === c ? l = t[4] : (l = {
@@ -2309,7 +2305,7 @@ function ha(e) {
2309
2305
  textDecoration: "underline"
2310
2306
  }, t[3] = c, t[4] = l);
2311
2307
  let u;
2312
- return t[5] !== i || t[6] !== n.text || t[7] !== a || t[8] !== o || t[9] !== s || t[10] !== l ? (u = /* @__PURE__ */ Y(H, {
2308
+ return t[5] !== i || t[6] !== n.text || t[7] !== a || t[8] !== o || t[9] !== s || t[10] !== l ? (u = /* @__PURE__ */ J(te, {
2313
2309
  href: a,
2314
2310
  fontWeight: i,
2315
2311
  color: o,
@@ -2320,10 +2316,10 @@ function ha(e) {
2320
2316
  }), t[5] = i, t[6] = n.text, t[7] = a, t[8] = o, t[9] = s, t[10] = l, t[11] = u) : u = t[11], u;
2321
2317
  }
2322
2318
  function ga(e) {
2323
- let n = J(14), { seg: r, isClickable: i } = e, a = r.bold ? "medium" : void 0, o = r.monospace ? "mono/XS" : void 0, s = r.truncate ? "0" : void 0, c = r.truncate ? "hidden" : void 0, l = r.truncate ? "ellipsis" : void 0, u = r.truncate ? "nowrap" : void 0, d = i && !r.muted ? "fg" : "fg.muted", f;
2319
+ let n = q(14), { seg: r, isClickable: i } = e, a = r.bold ? "medium" : void 0, o = r.monospace ? "mono/XS" : void 0, s = r.truncate ? "0" : void 0, c = r.truncate ? "hidden" : void 0, l = r.truncate ? "ellipsis" : void 0, u = r.truncate ? "nowrap" : void 0, d = i && !r.muted ? "fg" : "fg.muted", f;
2324
2320
  n[0] === d ? f = n[1] : (f = { color: d }, n[0] = d, n[1] = f);
2325
2321
  let p;
2326
- n[2] !== r.text || n[3] !== a || n[4] !== o || n[5] !== s || n[6] !== c || n[7] !== l || n[8] !== u || n[9] !== f ? (p = /* @__PURE__ */ Y(re, {
2322
+ n[2] !== r.text || n[3] !== a || n[4] !== o || n[5] !== s || n[6] !== c || n[7] !== l || n[8] !== u || n[9] !== f ? (p = /* @__PURE__ */ J(H, {
2327
2323
  fontWeight: a,
2328
2324
  textStyle: o,
2329
2325
  color: "fg.muted",
@@ -2337,13 +2333,13 @@ function ga(e) {
2337
2333
  let m = p;
2338
2334
  if (!r.truncate) return m;
2339
2335
  let h;
2340
- return n[11] !== r.text || n[12] !== m ? (h = /* @__PURE__ */ Y(t, {
2336
+ return n[11] !== r.text || n[12] !== m ? (h = /* @__PURE__ */ J(t, {
2341
2337
  content: r.text,
2342
2338
  children: m
2343
2339
  }), n[11] = r.text, n[12] = m, n[13] = h) : h = n[13], h;
2344
2340
  }
2345
2341
  function _a(e) {
2346
- let t = J(22), { seg: n, isClickable: r, onOpenFile: i } = e;
2342
+ let t = q(22), { seg: n, isClickable: r, onOpenFile: i } = e;
2347
2343
  if (b() && (n.kind === "link" || n.kind === "diff") && (n.filePath || n.kind === "diff")) {
2348
2344
  let e = n.filePath ?? (n.kind === "diff" ? n.fileName : n.text), r;
2349
2345
  t[0] === e ? r = t[1] : (r = {
@@ -2351,13 +2347,13 @@ function _a(e) {
2351
2347
  origin: "tool"
2352
2348
  }, t[0] = e, t[1] = r);
2353
2349
  let i;
2354
- t[2] !== n.additions || t[3] !== n.deletions || t[4] !== n.fileName || t[5] !== n.kind || t[6] !== n.text ? (i = n.kind === "diff" ? /* @__PURE__ */ Y(D, {
2350
+ t[2] !== n.additions || t[3] !== n.deletions || t[4] !== n.fileName || t[5] !== n.kind || t[6] !== n.text ? (i = n.kind === "diff" ? /* @__PURE__ */ J(D, {
2355
2351
  fileName: n.fileName,
2356
2352
  additions: n.additions ?? 0,
2357
2353
  deletions: n.deletions ?? 0
2358
2354
  }) : n.text, t[2] = n.additions, t[3] = n.deletions, t[4] = n.fileName, t[5] = n.kind, t[6] = n.text, t[7] = i) : i = t[7];
2359
2355
  let a;
2360
- return t[8] !== r || t[9] !== i ? (a = /* @__PURE__ */ Y(x, {
2356
+ return t[8] !== r || t[9] !== i ? (a = /* @__PURE__ */ J(x, {
2361
2357
  candidate: r,
2362
2358
  children: i
2363
2359
  }), t[8] = r, t[9] = i, t[10] = a) : a = t[10], a;
@@ -2365,28 +2361,28 @@ function _a(e) {
2365
2361
  switch (n.kind) {
2366
2362
  case "avatar": {
2367
2363
  let e;
2368
- return t[11] === n ? e = t[12] : (e = /* @__PURE__ */ Y(fa, { seg: n }), t[11] = n, t[12] = e), e;
2364
+ return t[11] === n ? e = t[12] : (e = /* @__PURE__ */ J(fa, { seg: n }), t[11] = n, t[12] = e), e;
2369
2365
  }
2370
2366
  case "diff": {
2371
2367
  let e;
2372
- return t[13] !== i || t[14] !== n ? (e = /* @__PURE__ */ Y(pa, {
2368
+ return t[13] !== i || t[14] !== n ? (e = /* @__PURE__ */ J(pa, {
2373
2369
  seg: n,
2374
2370
  onOpenFile: i
2375
2371
  }), t[13] = i, t[14] = n, t[15] = e) : e = t[15], e;
2376
2372
  }
2377
2373
  case "link": {
2378
2374
  let e;
2379
- return t[16] !== i || t[17] !== n ? (e = n.variant === "bubble" ? /* @__PURE__ */ Y(ma, {
2375
+ return t[16] !== i || t[17] !== n ? (e = n.variant === "bubble" ? /* @__PURE__ */ J(ma, {
2380
2376
  seg: n,
2381
2377
  onOpenFile: i
2382
- }) : /* @__PURE__ */ Y(ha, {
2378
+ }) : /* @__PURE__ */ J(ha, {
2383
2379
  seg: n,
2384
2380
  onOpenFile: i
2385
2381
  }), t[16] = i, t[17] = n, t[18] = e) : e = t[18], e;
2386
2382
  }
2387
2383
  case "text": {
2388
2384
  let e;
2389
- return t[19] !== r || t[20] !== n ? (e = /* @__PURE__ */ Y(ga, {
2385
+ return t[19] !== r || t[20] !== n ? (e = /* @__PURE__ */ J(ga, {
2390
2386
  seg: n,
2391
2387
  isClickable: r
2392
2388
  }), t[19] = r, t[20] = n, t[21] = e) : e = t[21], e;
@@ -2396,15 +2392,15 @@ function _a(e) {
2396
2392
  }
2397
2393
  //#endregion
2398
2394
  //#region src/components/chat-ui/components/timeline.tsx
2399
- var va = oe;
2395
+ var va = se;
2400
2396
  function ya(e) {
2401
- let t = J(5), { code: r, language: i } = e, a = i ? `${i} code block` : "code block", o;
2402
- t[0] === r ? o = t[1] : (o = /* @__PURE__ */ Y(A, {
2397
+ let t = q(5), { code: r, language: i } = e, a = i ? `${i} code block` : "code block", o;
2398
+ t[0] === r ? o = t[1] : (o = /* @__PURE__ */ J(A, {
2403
2399
  as: "code",
2404
2400
  children: r
2405
2401
  }), t[0] = r, t[1] = o);
2406
2402
  let s;
2407
- return t[2] !== a || t[3] !== o ? (s = /* @__PURE__ */ Y(n, {
2403
+ return t[2] !== a || t[3] !== o ? (s = /* @__PURE__ */ J(n, {
2408
2404
  background: "bg.code",
2409
2405
  color: "fg.muted",
2410
2406
  borderWidth: "1px",
@@ -2412,7 +2408,7 @@ function ya(e) {
2412
2408
  borderRadius: "md",
2413
2409
  showHorizontalScrollbar: !0,
2414
2410
  showVerticalScrollbar: !1,
2415
- children: /* @__PURE__ */ Y(A, {
2411
+ children: /* @__PURE__ */ J(A, {
2416
2412
  as: "pre",
2417
2413
  padding: "sm",
2418
2414
  textStyle: "mono/XS",
@@ -2423,24 +2419,24 @@ function ya(e) {
2423
2419
  }), t[2] = a, t[3] = o, t[4] = s) : s = t[4], s;
2424
2420
  }
2425
2421
  function ba(e) {
2426
- let t = J(38), { b: n, onOpenFile: r } = e;
2422
+ let t = q(38), { b: n, onOpenFile: r } = e;
2427
2423
  switch (n.type) {
2428
2424
  case "comment": {
2429
2425
  let e;
2430
- t[0] === n.text ? e = t[1] : (e = /* @__PURE__ */ Y(M.Body, { children: n.text }), t[0] = n.text, t[1] = e);
2426
+ t[0] === n.text ? e = t[1] : (e = /* @__PURE__ */ J(M.Body, { children: n.text }), t[0] = n.text, t[1] = e);
2431
2427
  let r;
2432
- t[2] === n.reactions ? r = t[3] : (r = n.reactions?.clap ? /* @__PURE__ */ Y(M.Footer, { children: /* @__PURE__ */ X(j, { children: ["👏 ", n.reactions.clap] }) }) : null, t[2] = n.reactions, t[3] = r);
2428
+ t[2] === n.reactions ? r = t[3] : (r = n.reactions?.clap ? /* @__PURE__ */ J(M.Footer, { children: /* @__PURE__ */ Y(j, { children: ["👏 ", n.reactions.clap] }) }) : null, t[2] = n.reactions, t[3] = r);
2433
2429
  let i;
2434
- return t[4] !== e || t[5] !== r ? (i = /* @__PURE__ */ X(M.Root, { children: [e, r] }), t[4] = e, t[5] = r, t[6] = i) : i = t[6], i;
2430
+ return t[4] !== e || t[5] !== r ? (i = /* @__PURE__ */ Y(M.Root, { children: [e, r] }), t[4] = e, t[5] = r, t[6] = i) : i = t[6], i;
2435
2431
  }
2436
2432
  case "code": {
2437
2433
  let e;
2438
- return t[7] !== n.code || t[8] !== n.language ? (e = /* @__PURE__ */ Y(M.Root, {
2434
+ return t[7] !== n.code || t[8] !== n.language ? (e = /* @__PURE__ */ J(M.Root, {
2439
2435
  border: "0",
2440
2436
  padding: "0",
2441
- children: /* @__PURE__ */ Y(M.Body, {
2437
+ children: /* @__PURE__ */ J(M.Body, {
2442
2438
  padding: "0",
2443
- children: /* @__PURE__ */ Y(ya, {
2439
+ children: /* @__PURE__ */ J(ya, {
2444
2440
  language: n.language,
2445
2441
  code: n.code
2446
2442
  })
@@ -2449,16 +2445,16 @@ function ba(e) {
2449
2445
  }
2450
2446
  case "diff": {
2451
2447
  let e = n.sideBySide ?? !1, r;
2452
- return t[10] !== n.language || t[11] !== n.modified || t[12] !== n.original || t[13] !== e ? (r = /* @__PURE__ */ Y(M.Root, {
2448
+ return t[10] !== n.language || t[11] !== n.modified || t[12] !== n.original || t[13] !== e ? (r = /* @__PURE__ */ J(M.Root, {
2453
2449
  border: "0",
2454
2450
  padding: "0",
2455
- children: /* @__PURE__ */ Y(M.Body, {
2451
+ children: /* @__PURE__ */ J(M.Body, {
2456
2452
  padding: "0",
2457
- children: /* @__PURE__ */ Y(A, {
2453
+ children: /* @__PURE__ */ J(A, {
2458
2454
  height: "240px",
2459
2455
  minW: "320px",
2460
2456
  overflow: "hidden",
2461
- children: /* @__PURE__ */ Y(la, {
2457
+ children: /* @__PURE__ */ J(la, {
2462
2458
  original: n.original,
2463
2459
  modified: n.modified,
2464
2460
  language: n.language,
@@ -2471,11 +2467,11 @@ function ba(e) {
2471
2467
  }
2472
2468
  case "text": {
2473
2469
  let e;
2474
- return t[15] === n.text ? e = t[16] : (e = /* @__PURE__ */ Y(M.Root, {
2470
+ return t[15] === n.text ? e = t[16] : (e = /* @__PURE__ */ J(M.Root, {
2475
2471
  background: "transparent",
2476
- children: /* @__PURE__ */ Y(M.Body, {
2472
+ children: /* @__PURE__ */ J(M.Body, {
2477
2473
  padding: "sm",
2478
- children: /* @__PURE__ */ Y(K, {
2474
+ children: /* @__PURE__ */ J(G, {
2479
2475
  textStyle: "label/S/regular",
2480
2476
  children: n.text
2481
2477
  })
@@ -2484,17 +2480,17 @@ function ba(e) {
2484
2480
  }
2485
2481
  case "todo-list": {
2486
2482
  let e;
2487
- return t[17] === n.items ? e = t[18] : (e = /* @__PURE__ */ Y(Tn, { items: n.items }), t[17] = n.items, t[18] = e), e;
2483
+ return t[17] === n.items ? e = t[18] : (e = /* @__PURE__ */ J(Tn, { items: n.items }), t[17] = n.items, t[18] = e), e;
2488
2484
  }
2489
2485
  case "question-form": {
2490
2486
  let e;
2491
- return t[19] === n.questions ? e = t[20] : (e = /* @__PURE__ */ Y(kn, { questions: n.questions }), t[19] = n.questions, t[20] = e), e;
2487
+ return t[19] === n.questions ? e = t[20] : (e = /* @__PURE__ */ J(kn, { questions: n.questions }), t[19] = n.questions, t[20] = e), e;
2492
2488
  }
2493
2489
  case "references": {
2494
2490
  let e;
2495
2491
  t[21] === n.references ? e = t[22] : (e = n.references.map(xa), t[21] = n.references, t[22] = e);
2496
2492
  let r;
2497
- return t[23] === e ? r = t[24] : (r = /* @__PURE__ */ Y(G, {
2493
+ return t[23] === e ? r = t[24] : (r = /* @__PURE__ */ J(W, {
2498
2494
  mt: "xs",
2499
2495
  gap: "xs",
2500
2496
  flexDir: "row",
@@ -2505,7 +2501,7 @@ function ba(e) {
2505
2501
  case "image": {
2506
2502
  if (!n.src.trim()) return null;
2507
2503
  let e;
2508
- t[25] !== n.alt || t[26] !== n.src ? (e = /* @__PURE__ */ Y(z, {
2504
+ t[25] !== n.alt || t[26] !== n.src ? (e = /* @__PURE__ */ J(R, {
2509
2505
  src: n.src,
2510
2506
  alt: n.alt,
2511
2507
  maxH: "18rem",
@@ -2516,18 +2512,18 @@ function ba(e) {
2516
2512
  borderColor: "border.subtle"
2517
2513
  }), t[25] = n.alt, t[26] = n.src, t[27] = e) : e = t[27];
2518
2514
  let r;
2519
- t[28] === n.caption ? r = t[29] : (r = n.caption ? /* @__PURE__ */ Y(K, {
2515
+ t[28] === n.caption ? r = t[29] : (r = n.caption ? /* @__PURE__ */ J(G, {
2520
2516
  mt: "2xs",
2521
2517
  textStyle: "label/XS/regular",
2522
2518
  color: "fg.muted",
2523
2519
  children: n.caption
2524
2520
  }) : null, t[28] = n.caption, t[29] = r);
2525
2521
  let i;
2526
- return t[30] !== e || t[31] !== r ? (i = /* @__PURE__ */ Y(M.Root, {
2522
+ return t[30] !== e || t[31] !== r ? (i = /* @__PURE__ */ J(M.Root, {
2527
2523
  border: "0",
2528
2524
  padding: "0",
2529
2525
  background: "transparent",
2530
- children: /* @__PURE__ */ X(M.Body, {
2526
+ children: /* @__PURE__ */ Y(M.Body, {
2531
2527
  padding: "0",
2532
2528
  children: [e, r]
2533
2529
  })
@@ -2537,26 +2533,26 @@ function ba(e) {
2537
2533
  let e;
2538
2534
  t[33] !== n || t[34] !== r ? (e = n.render({ onOpenFile: r }), t[33] = n, t[34] = r, t[35] = e) : e = t[35];
2539
2535
  let i;
2540
- return t[36] === e ? i = t[37] : (i = /* @__PURE__ */ Y(fe, { children: e }), t[36] = e, t[37] = i), i;
2536
+ return t[36] === e ? i = t[37] : (i = /* @__PURE__ */ J(pe, { children: e }), t[36] = e, t[37] = i), i;
2541
2537
  }
2542
2538
  }
2543
2539
  }
2544
2540
  function xa(e) {
2545
- return /* @__PURE__ */ Y(x, {
2541
+ return /* @__PURE__ */ J(x, {
2546
2542
  candidate: {
2547
2543
  source: e,
2548
2544
  origin: "tool"
2549
2545
  },
2550
- children: /* @__PURE__ */ Y(o, { fileName: e })
2546
+ children: /* @__PURE__ */ J(o, { fileName: e })
2551
2547
  }, e);
2552
2548
  }
2553
2549
  function Sa(e) {
2554
- let t = J(23), { item: n, itemKey: r, isOpen: i, canExpand: a, hasBlocks: o, onToggle: s, onOpenFile: c } = e, l;
2555
- t[0] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ Y(va.Separator, {}), t[0] = l) : l = t[0];
2550
+ let t = q(23), { item: n, itemKey: r, isOpen: i, canExpand: a, hasBlocks: o, onToggle: s, onOpenFile: c } = e, l;
2551
+ t[0] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ J(va.Separator, {}), t[0] = l) : l = t[0];
2556
2552
  let u;
2557
- t[1] === n.indicator ? u = t[2] : (u = /* @__PURE__ */ X(va.Connector, { children: [l, /* @__PURE__ */ Y(ua, { ind: n.indicator })] }), t[1] = n.indicator, t[2] = u);
2553
+ t[1] === n.indicator ? u = t[2] : (u = /* @__PURE__ */ Y(va.Connector, { children: [l, /* @__PURE__ */ J(ua, { ind: n.indicator })] }), t[1] = n.indicator, t[2] = u);
2558
2554
  let d = i ? "auto" : "20px", f;
2559
- t[3] !== a || t[4] !== i || t[5] !== n.title || t[6] !== r || t[7] !== c || t[8] !== s ? (f = n.title.length > 0 && /* @__PURE__ */ Y(va.Title, {
2555
+ t[3] !== a || t[4] !== i || t[5] !== n.title || t[6] !== r || t[7] !== c || t[8] !== s ? (f = n.title.length > 0 && /* @__PURE__ */ J(va.Title, {
2560
2556
  className: "group",
2561
2557
  fontWeight: "normal",
2562
2558
  display: "flex",
@@ -2566,14 +2562,14 @@ function Sa(e) {
2566
2562
  overflow: "hidden",
2567
2563
  cursor: a ? "pointer" : "default",
2568
2564
  onClick: a ? () => s(r) : void 0,
2569
- children: /* @__PURE__ */ X(re, {
2565
+ children: /* @__PURE__ */ Y(H, {
2570
2566
  display: "flex",
2571
2567
  alignItems: "center",
2572
2568
  gap: "sm",
2573
2569
  flexWrap: "nowrap",
2574
2570
  minW: "0",
2575
2571
  width: "full",
2576
- children: [/* @__PURE__ */ Y(re, {
2572
+ children: [/* @__PURE__ */ J(H, {
2577
2573
  display: "flex",
2578
2574
  alignItems: "center",
2579
2575
  gap: "xs",
@@ -2581,12 +2577,12 @@ function Sa(e) {
2581
2577
  minW: "0",
2582
2578
  flex: "1",
2583
2579
  overflow: "hidden",
2584
- children: n.title.map((e, t) => /* @__PURE__ */ Y(_a, {
2580
+ children: n.title.map((e, t) => /* @__PURE__ */ J(_a, {
2585
2581
  seg: e,
2586
2582
  isClickable: a,
2587
2583
  onOpenFile: c
2588
2584
  }, t))
2589
- }), a ? /* @__PURE__ */ Y(re, {
2585
+ }), a ? /* @__PURE__ */ J(H, {
2590
2586
  display: "inline-flex",
2591
2587
  alignItems: "center",
2592
2588
  transition: "transform 200ms ease, color 200ms ease",
@@ -2594,48 +2590,48 @@ function Sa(e) {
2594
2590
  color: "transparent",
2595
2591
  flexShrink: "0",
2596
2592
  _groupHover: { color: "fg" },
2597
- children: /* @__PURE__ */ Y(Te, { size: 12 })
2593
+ children: /* @__PURE__ */ J(Te, { size: 12 })
2598
2594
  }) : null]
2599
2595
  })
2600
2596
  }), t[3] = a, t[4] = i, t[5] = n.title, t[6] = r, t[7] = c, t[8] = s, t[9] = f) : f = t[9];
2601
2597
  let p;
2602
- t[10] !== o || t[11] !== i || t[12] !== n.blocks || t[13] !== c ? (p = o ? /* @__PURE__ */ Y(A, {
2598
+ t[10] !== o || t[11] !== i || t[12] !== n.blocks || t[13] !== c ? (p = o ? /* @__PURE__ */ J(A, {
2603
2599
  display: "grid",
2604
2600
  gridTemplateRows: i ? "1fr" : "0fr",
2605
2601
  transition: "grid-template-rows 220ms ease",
2606
- children: i ? /* @__PURE__ */ Y(A, {
2602
+ children: i ? /* @__PURE__ */ J(A, {
2607
2603
  overflow: "hidden",
2608
2604
  opacity: 1,
2609
2605
  transform: "translateY(0)",
2610
2606
  transition: "opacity 200ms ease, transform 200ms ease",
2611
- children: n.blocks.map((e, t) => /* @__PURE__ */ Y(A, { children: /* @__PURE__ */ Y(ba, {
2607
+ children: n.blocks.map((e, t) => /* @__PURE__ */ J(A, { children: /* @__PURE__ */ J(ba, {
2612
2608
  b: e,
2613
2609
  onOpenFile: c
2614
2610
  }) }, t))
2615
2611
  }) : null
2616
2612
  }) : null, t[10] = o, t[11] = i, t[12] = n.blocks, t[13] = c, t[14] = p) : p = t[14];
2617
2613
  let m;
2618
- t[15] !== d || t[16] !== f || t[17] !== p ? (m = /* @__PURE__ */ X(va.Content, {
2614
+ t[15] !== d || t[16] !== f || t[17] !== p ? (m = /* @__PURE__ */ Y(va.Content, {
2619
2615
  h: d,
2620
2616
  children: [f, p]
2621
2617
  }), t[15] = d, t[16] = f, t[17] = p, t[18] = m) : m = t[18];
2622
2618
  let h;
2623
- return t[19] !== r || t[20] !== u || t[21] !== m ? (h = /* @__PURE__ */ X(va.Item, {
2619
+ return t[19] !== r || t[20] !== u || t[21] !== m ? (h = /* @__PURE__ */ Y(va.Item, {
2624
2620
  gap: "xs",
2625
2621
  children: [u, m]
2626
2622
  }, r), t[19] = r, t[20] = u, t[21] = m, t[22] = h) : h = t[22], h;
2627
2623
  }
2628
2624
  function Ca(e) {
2629
- let t = J(5), n = b(), r = e.linkHandler ?? n, i;
2630
- t[0] === e ? i = t[1] : (i = /* @__PURE__ */ Y(wa, { ...e }), t[0] = e, t[1] = i);
2625
+ let t = q(5), n = b(), r = e.linkHandler ?? n, i;
2626
+ t[0] === e ? i = t[1] : (i = /* @__PURE__ */ J(wa, { ...e }), t[0] = e, t[1] = i);
2631
2627
  let a;
2632
- return t[2] !== r || t[3] !== i ? (a = /* @__PURE__ */ Y(m, {
2628
+ return t[2] !== r || t[3] !== i ? (a = /* @__PURE__ */ J(m, {
2633
2629
  handler: r,
2634
2630
  children: i
2635
2631
  }), t[2] = r, t[3] = i, t[4] = a) : a = t[4], a;
2636
2632
  }
2637
2633
  function wa(e) {
2638
- let t = J(14), { data: n, onOpenFile: r } = e, i = b(), a;
2634
+ let t = q(14), { data: n, onOpenFile: r } = e, i = b(), a;
2639
2635
  t[0] !== i || t[1] !== r ? (a = i ? (e) => {
2640
2636
  i.open({
2641
2637
  source: e,
@@ -2656,7 +2652,7 @@ function wa(e) {
2656
2652
  let e;
2657
2653
  t[9] !== c || t[10] !== o ? (e = (e, t) => {
2658
2654
  let n = u(e, t), r = (e.blocks?.length ?? 0) > 0, i = (e.expandable ?? !0) && r, a = i ? c[n] ?? !1 : r;
2659
- return /* @__PURE__ */ Y(Sa, {
2655
+ return /* @__PURE__ */ J(Sa, {
2660
2656
  item: e,
2661
2657
  itemKey: n,
2662
2658
  isOpen: a,
@@ -2668,7 +2664,7 @@ function wa(e) {
2668
2664
  }, t[9] = c, t[10] = o, t[11] = e) : e = t[11], p = n.items.map(e), t[5] = n.items, t[6] = c, t[7] = o, t[8] = p;
2669
2665
  } else p = t[8];
2670
2666
  let m;
2671
- return t[12] === p ? m = t[13] : (m = /* @__PURE__ */ Y(va.Root, {
2667
+ return t[12] === p ? m = t[13] : (m = /* @__PURE__ */ J(va.Root, {
2672
2668
  variant: "tool",
2673
2669
  children: p
2674
2670
  }), t[12] = p, t[13] = m), m;
@@ -2683,7 +2679,7 @@ var Ea = (e) => sr(e.tool ?? "").replace(/_/g, "") === "question", Da = (e) => {
2683
2679
  return typeof t == "string" ? t.trim().length > 0 : Array.isArray(t) ? t.length > 0 : t && typeof t == "object" ? Object.keys(t).length > 0 : t != null;
2684
2680
  };
2685
2681
  function Oa(e) {
2686
- let t = J(9), { invocations: n, labeledBlocks: r, hideQuestionForms: i, onOpenFile: a, linkHandler: o } = e, s = i !== void 0 && i, c, l;
2682
+ let t = q(9), { invocations: n, labeledBlocks: r, hideQuestionForms: i, onOpenFile: a, linkHandler: o } = e, s = i !== void 0 && i, c, l;
2687
2683
  if (t[0] !== s || t[1] !== n || t[2] !== r) {
2688
2684
  l = Symbol.for("react.early_return_sentinel");
2689
2685
  bb0: {
@@ -2698,7 +2694,7 @@ function Oa(e) {
2698
2694
  } else c = t[3], l = t[4];
2699
2695
  if (l !== Symbol.for("react.early_return_sentinel")) return l;
2700
2696
  let u = c, d;
2701
- return t[5] !== u || t[6] !== o || t[7] !== a ? (d = /* @__PURE__ */ Y(Ca, {
2697
+ return t[5] !== u || t[6] !== o || t[7] !== a ? (d = /* @__PURE__ */ J(Ca, {
2702
2698
  data: u,
2703
2699
  linkHandler: o,
2704
2700
  onOpenFile: a
@@ -2709,7 +2705,7 @@ function ka(e) {
2709
2705
  }
2710
2706
  //#endregion
2711
2707
  //#region src/components/chat-ui/components/message-parts-renderer.tsx
2712
- var Aa = (e) => e.type === "tool", ja = (e) => e.filename ?? e.url.split("/").pop() ?? "attachment", Ma = /\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i, Na = (e) => e.mediaType?.startsWith("image/") || Ma.test(ja(e)), Pa = (e) => Na(e) ? /* @__PURE__ */ Y(z, {
2708
+ var Aa = (e) => e.type === "tool", ja = (e) => e.filename ?? e.url.split("/").pop() ?? "attachment", Ma = /\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i, Na = (e) => e.mediaType?.startsWith("image/") || Ma.test(ja(e)), Pa = (e) => Na(e) ? /* @__PURE__ */ J(R, {
2713
2709
  src: e.url,
2714
2710
  alt: `${ja(e)} preview thumbnail`,
2715
2711
  boxSize: "18px",
@@ -2749,16 +2745,16 @@ var Aa = (e) => e.type === "tool", ja = (e) => e.filename ?? e.url.split("/").po
2749
2745
  };
2750
2746
  };
2751
2747
  function za(e) {
2752
- let t = J(5), n = b(), r = e.linkHandler ?? n, i;
2753
- t[0] === e ? i = t[1] : (i = /* @__PURE__ */ Y(Ba, { ...e }), t[0] = e, t[1] = i);
2748
+ let t = q(5), n = b(), r = e.linkHandler ?? n, i;
2749
+ t[0] === e ? i = t[1] : (i = /* @__PURE__ */ J(Ba, { ...e }), t[0] = e, t[1] = i);
2754
2750
  let a;
2755
- return t[2] !== r || t[3] !== i ? (a = /* @__PURE__ */ Y(m, {
2751
+ return t[2] !== r || t[3] !== i ? (a = /* @__PURE__ */ J(m, {
2756
2752
  handler: r,
2757
2753
  children: i
2758
2754
  }), t[2] = r, t[3] = i, t[4] = a) : a = t[4], a;
2759
2755
  }
2760
2756
  function Ba(t) {
2761
- let n = J(10), { message: r, streaming: i, hideQuestionForms: a, onOpenFile: s, toolInvocationTimeline: c } = t, l = i !== void 0 && i, u = a !== void 0 && a, d = b(), f = g(), p;
2757
+ let n = q(10), { message: r, streaming: i, hideQuestionForms: a, onOpenFile: s, toolInvocationTimeline: c } = t, l = i !== void 0 && i, u = a !== void 0 && a, d = b(), f = g(), p;
2762
2758
  if (n[0] !== u || n[1] !== f || n[2] !== d || n[3] !== r || n[4] !== s || n[5] !== l || n[6] !== c) {
2763
2759
  let t = y([r], d), i = c ?? Oa, a;
2764
2760
  n[8] === r.parts ? a = n[9] : (a = r.parts ?? [], n[8] = r.parts, n[9] = a);
@@ -2767,23 +2763,23 @@ function Ba(t) {
2767
2763
  let a = m[n], c = `${r.id}-${n}`;
2768
2764
  bb0: switch (a.type) {
2769
2765
  case "text":
2770
- g.push(/* @__PURE__ */ Y(h, {
2766
+ g.push(/* @__PURE__ */ J(h, {
2771
2767
  value: f.get(a) ?? t.get(a) ?? S,
2772
- children: /* @__PURE__ */ Y("div", { children: /* @__PURE__ */ Y(ar, {
2768
+ children: /* @__PURE__ */ J("div", { children: /* @__PURE__ */ J(ar, {
2773
2769
  streaming: l,
2774
2770
  children: a.text
2775
2771
  }) })
2776
2772
  }, c));
2777
2773
  break bb0;
2778
2774
  case "reasoning":
2779
- g.push(/* @__PURE__ */ Y(A, {
2775
+ g.push(/* @__PURE__ */ J(A, {
2780
2776
  padding: "0",
2781
2777
  css: { "& .rich-text, & .rich-text *": {
2782
2778
  color: "fg.subtle !important",
2783
2779
  fontSize: ".75rem !important",
2784
2780
  fontWeight: "normal !important"
2785
2781
  } },
2786
- children: /* @__PURE__ */ Y(T, {
2782
+ children: /* @__PURE__ */ J(T, {
2787
2783
  defaultState: a.text,
2788
2784
  fullWidth: !0
2789
2785
  })
@@ -2791,13 +2787,13 @@ function Ba(t) {
2791
2787
  break bb0;
2792
2788
  case "tool": {
2793
2789
  if (a.tool === "question" && ln(a.state?.input)) {
2794
- g.push(/* @__PURE__ */ Y(or, { part: a }, c));
2790
+ g.push(/* @__PURE__ */ J(or, { part: a }, c));
2795
2791
  break bb0;
2796
2792
  }
2797
2793
  let { invocations: e, nextIndex: t } = Ra(m, n);
2798
- n = t, g.push(/* @__PURE__ */ Y(A, {
2794
+ n = t, g.push(/* @__PURE__ */ J(A, {
2799
2795
  width: "full",
2800
- children: /* @__PURE__ */ Y(i, {
2796
+ children: /* @__PURE__ */ J(i, {
2801
2797
  invocations: e,
2802
2798
  linkHandler: d,
2803
2799
  labeledBlocks: !0,
@@ -2808,9 +2804,9 @@ function Ba(t) {
2808
2804
  break bb0;
2809
2805
  }
2810
2806
  case "file":
2811
- g.push(/* @__PURE__ */ Y(A, {
2807
+ g.push(/* @__PURE__ */ J(A, {
2812
2808
  width: "fit-content",
2813
- children: /* @__PURE__ */ Y(o, {
2809
+ children: /* @__PURE__ */ J(o, {
2814
2810
  fileName: ja(a),
2815
2811
  size: "sm",
2816
2812
  tone: "neutral",
@@ -2820,10 +2816,10 @@ function Ba(t) {
2820
2816
  }, c));
2821
2817
  break bb0;
2822
2818
  case "error":
2823
- g.push(/* @__PURE__ */ Y(A, {
2819
+ g.push(/* @__PURE__ */ J(A, {
2824
2820
  py: "2",
2825
2821
  width: "full",
2826
- children: /* @__PURE__ */ Y(e, {
2822
+ children: /* @__PURE__ */ J(e, {
2827
2823
  borderRadius: "xs",
2828
2824
  status: "error",
2829
2825
  colorPalette: "red",
@@ -2834,14 +2830,14 @@ function Ba(t) {
2834
2830
  break bb0;
2835
2831
  case "token_usage": break bb0;
2836
2832
  case "alert":
2837
- g.push(/* @__PURE__ */ Y(A, {
2833
+ g.push(/* @__PURE__ */ J(A, {
2838
2834
  width: "full",
2839
- children: /* @__PURE__ */ Y(e, {
2835
+ children: /* @__PURE__ */ J(e, {
2840
2836
  borderRadius: "xs",
2841
2837
  status: a.status === "loading" ? "info" : a.status,
2842
2838
  colorPalette: La[a.status],
2843
2839
  title: a.title,
2844
- icon: a.status === "loading" ? /* @__PURE__ */ Y(W, { size: "sm" }) : void 0,
2840
+ icon: a.status === "loading" ? /* @__PURE__ */ J(U, { size: "sm" }) : void 0,
2845
2841
  size: "sm",
2846
2842
  children: a.message
2847
2843
  })
@@ -2850,7 +2846,7 @@ function Ba(t) {
2850
2846
  default: g.push(null);
2851
2847
  }
2852
2848
  }
2853
- p = /* @__PURE__ */ Y(fe, { children: g }), n[0] = u, n[1] = f, n[2] = d, n[3] = r, n[4] = s, n[5] = l, n[6] = c, n[7] = p;
2849
+ p = /* @__PURE__ */ J(pe, { children: g }), n[0] = u, n[1] = f, n[2] = d, n[3] = r, n[4] = s, n[5] = l, n[6] = c, n[7] = p;
2854
2850
  } else p = n[7];
2855
2851
  return p;
2856
2852
  }
@@ -2923,34 +2919,34 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
2923
2919
  leadingResponses: n
2924
2920
  };
2925
2921
  }, Za = (e) => {
2926
- let t = J(18), { message: n, streaming: r, hideQuestionForms: i, animate: a, showAssistantActions: o } = e, s = i !== void 0 && i, c = a !== void 0 && a, l;
2922
+ let t = q(18), { message: n, streaming: r, hideQuestionForms: i, animate: a, showAssistantActions: o } = e, s = i !== void 0 && i, c = a !== void 0 && a, l;
2927
2923
  t[0] === n.role ? l = t[1] : (l = Va(n.role), t[0] = n.role, t[1] = l);
2928
2924
  let u = l, d = u === "user" || u === "assistant" && o, f = c ? Xn : void 0, p = r && u === "assistant", m;
2929
- t[2] !== s || t[3] !== n || t[4] !== p ? (m = /* @__PURE__ */ Y(za, {
2925
+ t[2] !== s || t[3] !== n || t[4] !== p ? (m = /* @__PURE__ */ J(za, {
2930
2926
  message: n,
2931
2927
  streaming: p,
2932
2928
  hideQuestionForms: s
2933
2929
  }), t[2] = s, t[3] = n, t[4] = p, t[5] = m) : m = t[5];
2934
2930
  let h;
2935
- t[6] !== u || t[7] !== n || t[8] !== d ? (h = d ? /* @__PURE__ */ Y(rr, {
2931
+ t[6] !== u || t[7] !== n || t[8] !== d ? (h = d ? /* @__PURE__ */ J(rr, {
2936
2932
  message: n,
2937
2933
  alwaysVisible: u === "user",
2938
2934
  copyAlwaysVisible: u !== "user"
2939
2935
  }) : null, t[6] = u, t[7] = n, t[8] = d, t[9] = h) : h = t[9];
2940
2936
  let g;
2941
- t[10] !== u || t[11] !== m || t[12] !== h ? (g = /* @__PURE__ */ X(dt.Content, {
2937
+ t[10] !== u || t[11] !== m || t[12] !== h ? (g = /* @__PURE__ */ Y(dt.Content, {
2942
2938
  from: u,
2943
2939
  children: [m, h]
2944
2940
  }), t[10] = u, t[11] = m, t[12] = h, t[13] = g) : g = t[13];
2945
2941
  let _;
2946
- return t[14] !== u || t[15] !== f || t[16] !== g ? (_ = /* @__PURE__ */ Y(dt.Root, {
2942
+ return t[14] !== u || t[15] !== f || t[16] !== g ? (_ = /* @__PURE__ */ J(dt.Root, {
2947
2943
  from: u,
2948
2944
  ...f,
2949
2945
  children: g
2950
2946
  }), t[14] = u, t[15] = f, t[16] = g, t[17] = _) : _ = t[17], _;
2951
2947
  }, Qa = (e) => {
2952
- let t = J(6), { message: n, streaming: r, hideQuestionForms: i, animate: a, showAssistantActions: o } = e, s;
2953
- return t[0] !== a || t[1] !== i || t[2] !== n || t[3] !== o || t[4] !== r ? (s = /* @__PURE__ */ Y(A, { children: /* @__PURE__ */ Y(Za, {
2948
+ let t = q(6), { message: n, streaming: r, hideQuestionForms: i, animate: a, showAssistantActions: o } = e, s;
2949
+ return t[0] !== a || t[1] !== i || t[2] !== n || t[3] !== o || t[4] !== r ? (s = /* @__PURE__ */ J(A, { children: /* @__PURE__ */ J(Za, {
2954
2950
  message: n,
2955
2951
  streaming: r,
2956
2952
  hideQuestionForms: i,
@@ -2958,63 +2954,129 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
2958
2954
  showAssistantActions: o
2959
2955
  }) }), t[0] = a, t[1] = i, t[2] = n, t[3] = o, t[4] = r, t[5] = s) : s = t[5], s;
2960
2956
  }, $a = (e) => {
2961
- let t = J(7), { label: n, onClick: r, actionPanel: i } = e, a = i ? "space-between" : "flex-end", o;
2962
- t[0] !== n || t[1] !== r ? (o = /* @__PURE__ */ Y(j, {
2957
+ let t = q(11), { expanded: n, label: r, onClick: i, actionPanel: a } = e, o;
2958
+ t[0] === Symbol.for("react.memo_cache_sentinel") ? (o = { key: "stickyUserMessage" }, t[0] = o) : o = t[0];
2959
+ let s = fe(o), c;
2960
+ t[1] !== n || t[2] !== s ? (c = s({ expanded: n }), t[1] = n, t[2] = s, t[3] = c) : c = t[3];
2961
+ let l = c, u;
2962
+ t[4] !== r || t[5] !== i ? (u = /* @__PURE__ */ J(j, {
2963
2963
  size: "2xs",
2964
2964
  variant: "outline",
2965
2965
  pointerEvents: "auto",
2966
- onClick: r,
2967
- children: n
2968
- }), t[0] = n, t[1] = r, t[2] = o) : o = t[2];
2969
- let s;
2970
- return t[3] !== i || t[4] !== a || t[5] !== o ? (s = /* @__PURE__ */ X(F, {
2971
- position: "absolute",
2972
- bottom: "0",
2973
- left: "0",
2974
- right: "0",
2975
- justifyContent: a,
2976
- alignItems: "flex-end",
2977
- px: "xs",
2978
- pb: "xs",
2979
- pt: "lg",
2980
- bgGradient: "to-t",
2981
- gradientFrom: "bg.subtle",
2982
- gradientTo: "transparent",
2983
- borderBottomRadius: "xs",
2984
- pointerEvents: "none",
2985
- children: [i, o]
2986
- }), t[3] = i, t[4] = a, t[5] = o, t[6] = s) : s = t[6], s;
2987
- }, eo = "min(10vh, 4rem)", to = "min(70dvh, calc(100dvh - 12rem), 22rem)", no = 1, ro = (e) => e.parts.reduce((e, t) => t.type === "text" ? {
2988
- lineCount: e.lineCount + t.text.split(/\r\n|\r|\n/).length,
2989
- textLength: e.textLength + t.text.length
2990
- } : e, {
2991
- lineCount: 0,
2992
- textLength: 0
2993
- }), io = (e) => {
2994
- if (e.role !== "user") return !1;
2995
- let { lineCount: t, textLength: n } = ro(e);
2996
- return n > 360 || t > 4;
2997
- }, ao = (e, t) => {
2966
+ onClick: i,
2967
+ children: r
2968
+ }), t[4] = r, t[5] = i, t[6] = u) : u = t[6];
2969
+ let d;
2970
+ return t[7] !== a || t[8] !== l.footer || t[9] !== u ? (d = /* @__PURE__ */ Y(F, {
2971
+ css: l.footer,
2972
+ children: [a, u]
2973
+ }), t[7] = a, t[8] = l.footer, t[9] = u, t[10] = d) : d = t[10], d;
2974
+ }, eo = 1, to = (e, t) => {
2998
2975
  let n = Math.max(0, e.scrollHeight - e.clientHeight);
2999
- return t === 0 || n <= no ? !1 : t < 0 ? e.scrollTop > no : e.scrollTop < n - no;
3000
- }, oo = 3, so = 20, co = 1, lo = (e, t) => Math.abs(e.scrollTop - t.scrollTop) <= co && Math.abs(e.totalSize - t.totalSize) <= co, uo = (e, t) => !!e && Math.max(e.scrollHeight, t) <= e.clientHeight, fo = (e, t) => ({
2976
+ return t === 0 || n <= eo ? !1 : t < 0 ? e.scrollTop > eo : e.scrollTop < n - eo;
2977
+ }, no = (e) => {
2978
+ to(e.currentTarget, e.deltaY) && e.stopPropagation();
2979
+ };
2980
+ function ro(e) {
2981
+ let t = q(46), { message: r, expanded: i, animate: a, onToggle: o } = e, s = Z(null), c = Z(null), l = Z(null), [u, d] = Q(!1), f = u && i, p;
2982
+ t[0] === Symbol.for("react.memo_cache_sentinel") ? (p = { key: "stickyUserMessage" }, t[0] = p) : p = t[0];
2983
+ let m = fe(p), h;
2984
+ t[1] !== f || t[2] !== m ? (h = m({ expanded: f }), t[1] = f, t[2] = m, t[3] = h) : h = t[3];
2985
+ let g = h, _ = f ? "expanded" : "collapsed", v = f ? no : void 0, y;
2986
+ t[4] !== g.viewport || t[5] !== _ || t[6] !== v ? (y = {
2987
+ css: g.viewport,
2988
+ "data-sticky-user-message-content": _,
2989
+ onWheel: v
2990
+ }, t[4] = g.viewport, t[5] = _, t[6] = v, t[7] = y) : y = t[7];
2991
+ let b = y, x, S;
2992
+ t[8] === Symbol.for("react.memo_cache_sentinel") ? (x = () => {
2993
+ let e = c.current, t = l.current, n = () => {
2994
+ d(e.getBoundingClientRect().height > t.getBoundingClientRect().height + 1);
2995
+ }, r = new ResizeObserver(n);
2996
+ return r.observe(e), r.observe(t), n(), () => r.disconnect();
2997
+ }, S = [], t[8] = x, t[9] = S) : (x = t[8], S = t[9]), ye(x, S);
2998
+ let C, w;
2999
+ t[10] === f ? (C = t[11], w = t[12]) : (C = () => {
3000
+ f || (s.current.scrollTop = 0);
3001
+ }, w = [f], t[10] = f, t[11] = C, t[12] = w), ye(C, w);
3002
+ let T;
3003
+ t[13] === r ? T = t[14] : (T = /* @__PURE__ */ J(rr, {
3004
+ message: r,
3005
+ alwaysVisible: !0,
3006
+ copyAlwaysVisible: !1
3007
+ }), t[13] = r, t[14] = T);
3008
+ let E = T, D = r.delivery ?? "sent", O = a ? Xn : void 0, k;
3009
+ t[15] === g.preview ? k = t[16] : (k = /* @__PURE__ */ J(A, {
3010
+ ref: l,
3011
+ css: g.preview,
3012
+ "aria-hidden": "true"
3013
+ }), t[15] = g.preview, t[16] = k);
3014
+ let j;
3015
+ t[17] === r ? j = t[18] : (j = /* @__PURE__ */ J(za, { message: r }), t[17] = r, t[18] = j);
3016
+ let M;
3017
+ t[19] !== g.body || t[20] !== j ? (M = /* @__PURE__ */ J(A, {
3018
+ ref: c,
3019
+ css: g.body,
3020
+ children: j
3021
+ }), t[19] = g.body, t[20] = j, t[21] = M) : M = t[21];
3022
+ let N;
3023
+ t[22] !== f || t[23] !== M || t[24] !== b ? (N = /* @__PURE__ */ J(n, {
3024
+ viewportRef: s,
3025
+ showVerticalScrollbar: f,
3026
+ viewportProps: b,
3027
+ children: M
3028
+ }), t[22] = f, t[23] = M, t[24] = b, t[25] = N) : N = t[25];
3029
+ let P;
3030
+ t[26] !== E || t[27] !== u || t[28] !== g.actions ? (P = u ? null : /* @__PURE__ */ J(A, {
3031
+ css: g.actions,
3032
+ children: E
3033
+ }), t[26] = E, t[27] = u, t[28] = g.actions, t[29] = P) : P = t[29];
3034
+ let F;
3035
+ t[30] !== E || t[31] !== u || t[32] !== f || t[33] !== r.id || t[34] !== o ? (F = u ? /* @__PURE__ */ J($a, {
3036
+ expanded: f,
3037
+ label: f ? "Show less" : "Show more",
3038
+ onClick: () => o(r.id),
3039
+ actionPanel: E
3040
+ }) : null, t[30] = E, t[31] = u, t[32] = f, t[33] = r.id, t[34] = o, t[35] = F) : F = t[35];
3041
+ let I;
3042
+ t[36] !== g.root || t[37] !== k || t[38] !== N || t[39] !== P || t[40] !== F ? (I = /* @__PURE__ */ Y(dt.Content, {
3043
+ from: "user",
3044
+ css: g.root,
3045
+ children: [
3046
+ k,
3047
+ N,
3048
+ P,
3049
+ F
3050
+ ]
3051
+ }), t[36] = g.root, t[37] = k, t[38] = N, t[39] = P, t[40] = F, t[41] = I) : I = t[41];
3052
+ let L;
3053
+ return t[42] !== D || t[43] !== O || t[44] !== I ? (L = /* @__PURE__ */ J(dt.Root, {
3054
+ from: "user",
3055
+ delivery: D,
3056
+ ...O,
3057
+ children: I
3058
+ }), t[42] = D, t[43] = O, t[44] = I, t[45] = L) : L = t[45], L;
3059
+ }
3060
+ //#endregion
3061
+ //#region src/components/chat-ui/components/use-chat-tail-ready.ts
3062
+ var io = 3, ao = 20, oo = 1, so = (e, t) => Math.abs(e.scrollTop - t.scrollTop) <= oo && Math.abs(e.totalSize - t.totalSize) <= oo, co = (e, t) => !!e && Math.max(e.scrollHeight, t) <= e.clientHeight, lo = (e, t) => ({
3001
3063
  scrollTop: e?.scrollTop ?? 0,
3002
3064
  totalSize: t
3003
- }), po = (e) => {
3004
- let t = J(8), { itemCount: n, onReady: r, scrollRef: i, totalSize: a } = e, o = ye(r), s, c;
3065
+ }), uo = (e) => {
3066
+ let t = q(8), { itemCount: n, onReady: r, scrollRef: i, totalSize: a } = e, o = Z(r), s, c;
3005
3067
  t[0] === r ? (s = t[1], c = t[2]) : (s = () => {
3006
3068
  o.current = r;
3007
- }, c = [r], t[0] = r, t[1] = s, t[2] = c), Z(s, c);
3069
+ }, c = [r], t[0] = r, t[1] = s, t[2] = c), X(s, c);
3008
3070
  let l, u;
3009
3071
  t[3] !== n || t[4] !== i || t[5] !== a ? (l = () => {
3010
- if (n === 0 || typeof requestAnimationFrame > "u" || uo(i.current, a)) {
3072
+ if (n === 0 || typeof requestAnimationFrame > "u" || co(i.current, a)) {
3011
3073
  o.current?.();
3012
3074
  return;
3013
3075
  }
3014
3076
  let e = 0, t = 0, r = 0, s = null, c = () => {
3015
3077
  t += 1;
3016
- let n = fo(i.current, a);
3017
- if (r = s && lo(n, s) ? r + 1 : 0, s = n, r >= oo || t >= so) {
3078
+ let n = lo(i.current, a);
3079
+ if (r = s && so(n, s) ? r + 1 : 0, s = n, r >= io || t >= ao) {
3018
3080
  o.current?.();
3019
3081
  return;
3020
3082
  }
@@ -3025,8 +3087,8 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
3025
3087
  n,
3026
3088
  i,
3027
3089
  a
3028
- ], t[3] = n, t[4] = i, t[5] = a, t[6] = l, t[7] = u) : (l = t[6], u = t[7]), ve(l, u);
3029
- }, mo = 720, ho = 1, go = 4, _o = 8, vo = (e, t) => {
3090
+ ], t[3] = n, t[4] = i, t[5] = a, t[6] = l, t[7] = u) : (l = t[6], u = t[7]), ye(l, u);
3091
+ }, fo = 720, po = 1, mo = 4, ho = 8, go = (e, t) => {
3030
3092
  let n = Ya(e);
3031
3093
  return [...e.map((e) => ({
3032
3094
  type: "leading-response",
@@ -3039,100 +3101,42 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
3039
3101
  group: e,
3040
3102
  groupIndex: t
3041
3103
  }))];
3042
- }, yo = (e, t) => {
3104
+ }, _o = (e, t) => {
3043
3105
  if (e === 0) return 0;
3044
- let n = e * mo + (e - 1) * _o;
3106
+ let n = e * fo + (e - 1) * ho;
3045
3107
  return Math.max(n - t, 0);
3046
- }, bo = (e) => e?.clientHeight || ho, xo = (e) => {
3047
- ao(e.currentTarget, e.deltaY) && e.stopPropagation();
3048
- }, So = (e, t) => {
3049
- if (e) return t ? to : eo;
3050
- }, Co = (e) => {
3051
- if (e) return to;
3052
- }, wo = (e, t) => {
3053
- if (e) return t ? "expanded" : "collapsed";
3054
- }, To = (e) => {
3055
- let t = J(84), { group: n, streaming: r, hideQuestionForms: i, isExpanded: a, animate: o, onToggleStickyMessage: s } = e, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T, E, D, O;
3056
- if (t[0] !== o || t[1] !== n.responses || t[2] !== n.userMessage || t[3] !== a || t[4] !== s) {
3057
- m = io(n.userMessage), h = m && a;
3058
- let e = So(m, a), r;
3059
- t[26] !== n.userMessage.id || t[27] !== s ? (r = () => s(n.userMessage.id), t[26] = n.userMessage.id, t[27] = s, t[28] = r) : r = t[28], O = r;
3060
- let i;
3061
- t[29] === n.responses ? i = t[30] : (i = Ya(n.responses), t[29] = n.responses, t[30] = i), p = i, f = A, d = A, D = "sticky", v = "0", y = 1, u = dt.Root, w = "user", T = n.userMessage.delivery ?? "sent", E = o ? Xn : void 0, l = dt.Content, _ = "user", b = e, x = "hidden", S = m ? "0" : void 0, C = m ? "relative" : void 0, c = A, g = wo(m, a), t[0] = o, t[1] = n.responses, t[2] = n.userMessage, t[3] = a, t[4] = s, t[5] = c, t[6] = l, t[7] = u, t[8] = d, t[9] = f, t[10] = p, t[11] = m, t[12] = h, t[13] = g, t[14] = _, t[15] = v, t[16] = y, t[17] = b, t[18] = x, t[19] = S, t[20] = C, t[21] = w, t[22] = T, t[23] = E, t[24] = D, t[25] = O;
3062
- } else c = t[5], l = t[6], u = t[7], d = t[8], f = t[9], p = t[10], m = t[11], h = t[12], g = t[13], _ = t[14], v = t[15], y = t[16], b = t[17], x = t[18], S = t[19], C = t[20], w = t[21], T = t[22], E = t[23], D = t[24], O = t[25];
3063
- let k;
3064
- t[31] === h ? k = t[32] : (k = Co(h), t[31] = h, t[32] = k);
3065
- let j = h ? "auto" : "visible", M = m ? "xs" : void 0, N = m ? "xs" : void 0, P = h ? "3rem" : void 0, F = h ? xo : void 0, I;
3066
- t[33] === n.userMessage ? I = t[34] : (I = /* @__PURE__ */ Y(za, { message: n.userMessage }), t[33] = n.userMessage, t[34] = I);
3067
- let L;
3068
- t[35] !== c || t[36] !== g || t[37] !== k || t[38] !== j || t[39] !== M || t[40] !== N || t[41] !== P || t[42] !== F || t[43] !== I ? (L = /* @__PURE__ */ Y(c, {
3069
- "data-sticky-user-message-content": g,
3070
- display: "flex",
3071
- flexDirection: "column",
3072
- gap: "sm",
3073
- maxH: k,
3074
- minH: "0",
3075
- overflowY: j,
3076
- px: M,
3077
- py: N,
3078
- pb: P,
3079
- onWheel: F,
3080
- children: I
3081
- }), t[35] = c, t[36] = g, t[37] = k, t[38] = j, t[39] = M, t[40] = N, t[41] = P, t[42] = F, t[43] = I, t[44] = L) : L = t[44];
3082
- let R;
3083
- t[45] !== n.userMessage || t[46] !== m || t[47] !== a || t[48] !== O ? (R = m ? /* @__PURE__ */ Y($a, {
3084
- label: a ? "Show less" : "Show more",
3085
- onClick: O,
3086
- actionPanel: /* @__PURE__ */ Y(rr, {
3108
+ }, vo = (e) => e?.clientHeight || po, yo = (e) => {
3109
+ let t = q(19), { group: n, streaming: r, hideQuestionForms: i, isExpanded: a, animate: o, onToggleStickyMessage: s } = e, c;
3110
+ t[0] === n.responses ? c = t[1] : (c = Ya(n.responses), t[0] = n.responses, t[1] = c);
3111
+ let l = c, u;
3112
+ t[2] !== o || t[3] !== n.userMessage || t[4] !== a || t[5] !== s ? (u = /* @__PURE__ */ J(A, {
3113
+ position: "sticky",
3114
+ top: "0",
3115
+ zIndex: 1,
3116
+ children: /* @__PURE__ */ J(ro, {
3087
3117
  message: n.userMessage,
3088
- alwaysVisible: !0,
3089
- copyAlwaysVisible: !1
3118
+ expanded: a,
3119
+ animate: o,
3120
+ onToggle: s
3090
3121
  })
3091
- }) : /* @__PURE__ */ Y(rr, {
3092
- message: n.userMessage,
3093
- alwaysVisible: !0,
3094
- copyAlwaysVisible: !1
3095
- }), t[45] = n.userMessage, t[46] = m, t[47] = a, t[48] = O, t[49] = R) : R = t[49];
3096
- let z;
3097
- t[50] !== l || t[51] !== _ || t[52] !== L || t[53] !== b || t[54] !== R || t[55] !== x || t[56] !== S || t[57] !== C ? (z = /* @__PURE__ */ X(l, {
3098
- from: _,
3099
- maxH: b,
3100
- overflow: x,
3101
- p: S,
3102
- position: C,
3103
- children: [L, R]
3104
- }), t[50] = l, t[51] = _, t[52] = L, t[53] = b, t[54] = R, t[55] = x, t[56] = S, t[57] = C, t[58] = z) : z = t[58];
3105
- let B;
3106
- t[59] !== u || t[60] !== z || t[61] !== w || t[62] !== T || t[63] !== E ? (B = /* @__PURE__ */ Y(u, {
3107
- from: w,
3108
- delivery: T,
3109
- ...E,
3110
- children: z
3111
- }), t[59] = u, t[60] = z, t[61] = w, t[62] = T, t[63] = E, t[64] = B) : B = t[64];
3112
- let V;
3113
- t[65] !== d || t[66] !== v || t[67] !== y || t[68] !== B || t[69] !== D ? (V = /* @__PURE__ */ Y(d, {
3114
- position: D,
3115
- top: v,
3116
- zIndex: y,
3117
- children: B
3118
- }), t[65] = d, t[66] = v, t[67] = y, t[68] = B, t[69] = D, t[70] = V) : V = t[70];
3119
- let H;
3120
- if (t[71] !== p || t[72] !== n.responses || t[73] !== i || t[74] !== r) {
3122
+ }), t[2] = o, t[3] = n.userMessage, t[4] = a, t[5] = s, t[6] = u) : u = t[6];
3123
+ let d;
3124
+ if (t[7] !== l || t[8] !== n.responses || t[9] !== i || t[10] !== r) {
3121
3125
  let e;
3122
- t[76] !== p || t[77] !== i || t[78] !== r ? (e = (e) => /* @__PURE__ */ Y(Qa, {
3126
+ t[12] !== l || t[13] !== i || t[14] !== r ? (e = (e) => /* @__PURE__ */ J(Qa, {
3123
3127
  message: e,
3124
- streaming: r && e.id === p,
3128
+ streaming: r && e.id === l,
3125
3129
  hideQuestionForms: i,
3126
- showAssistantActions: e.id === p
3127
- }, e.id), t[76] = p, t[77] = i, t[78] = r, t[79] = e) : e = t[79], H = n.responses.map(e), t[71] = p, t[72] = n.responses, t[73] = i, t[74] = r, t[75] = H;
3128
- } else H = t[75];
3129
- let U;
3130
- return t[80] !== f || t[81] !== V || t[82] !== H ? (U = /* @__PURE__ */ X(f, { children: [V, H] }), t[80] = f, t[81] = V, t[82] = H, t[83] = U) : U = t[83], U;
3131
- }, Eo = (e) => {
3132
- let t = J(16), { item: n, groupCount: r, streaming: i, hideActiveQuestionForms: a, expandedStickyMessageIds: o, animate: s, onToggleStickyMessage: c } = e;
3130
+ showAssistantActions: e.id === l
3131
+ }, e.id), t[12] = l, t[13] = i, t[14] = r, t[15] = e) : e = t[15], d = n.responses.map(e), t[7] = l, t[8] = n.responses, t[9] = i, t[10] = r, t[11] = d;
3132
+ } else d = t[11];
3133
+ let f;
3134
+ return t[16] !== u || t[17] !== d ? (f = /* @__PURE__ */ Y(A, { children: [u, d] }), t[16] = u, t[17] = d, t[18] = f) : f = t[18], f;
3135
+ }, bo = (e) => {
3136
+ let t = q(16), { item: n, groupCount: r, streaming: i, hideActiveQuestionForms: a, expandedStickyMessageIds: o, animate: s, onToggleStickyMessage: c } = e;
3133
3137
  if (n.type === "leading-response") {
3134
3138
  let e = i && r === 0 && n.showAssistantActions, o = r > 0 || a, c;
3135
- return t[0] !== s || t[1] !== n.message || t[2] !== n.showAssistantActions || t[3] !== e || t[4] !== o ? (c = /* @__PURE__ */ Y(Za, {
3139
+ return t[0] !== s || t[1] !== n.message || t[2] !== n.showAssistantActions || t[3] !== e || t[4] !== o ? (c = /* @__PURE__ */ J(Za, {
3136
3140
  message: n.message,
3137
3141
  streaming: e,
3138
3142
  hideQuestionForms: o,
@@ -3143,7 +3147,7 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
3143
3147
  let l = n.group, u = i && n.groupIndex === r - 1, d = n.groupIndex < r - 1 || a, f;
3144
3148
  t[6] !== o || t[7] !== n.group.userMessage.id ? (f = o.has(n.group.userMessage.id), t[6] = o, t[7] = n.group.userMessage.id, t[8] = f) : f = t[8];
3145
3149
  let p;
3146
- return t[9] !== s || t[10] !== n.group || t[11] !== c || t[12] !== u || t[13] !== d || t[14] !== f ? (p = /* @__PURE__ */ Y(To, {
3150
+ return t[9] !== s || t[10] !== n.group || t[11] !== c || t[12] !== u || t[13] !== d || t[14] !== f ? (p = /* @__PURE__ */ J(yo, {
3147
3151
  group: l,
3148
3152
  streaming: u,
3149
3153
  hideQuestionForms: d,
@@ -3151,34 +3155,34 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
3151
3155
  animate: s,
3152
3156
  onToggleStickyMessage: c
3153
3157
  }), t[9] = s, t[10] = n.group, t[11] = c, t[12] = u, t[13] = d, t[14] = f, t[15] = p) : p = t[15], p;
3154
- }, Do = (e) => {
3155
- let { leadingResponses: t, groups: n, streaming: r, hideActiveQuestionForms: i, expandedStickyMessageIds: o, onToggleStickyMessage: s, onReady: c } = e, { scrollRef: l } = rt(), u = vo(t, n), d = $n(u.map((e) => e.key)), f = bo(l.current), p = a({
3158
+ }, xo = (e) => {
3159
+ let { leadingResponses: t, groups: n, streaming: r, hideActiveQuestionForms: i, expandedStickyMessageIds: o, onToggleStickyMessage: s, onReady: c } = e, { scrollRef: l } = rt(), u = go(t, n), d = $n(u.map((e) => e.key)), f = vo(l.current), p = a({
3156
3160
  count: u.length,
3157
3161
  getScrollElement: () => l.current,
3158
- estimateSize: () => mo,
3162
+ estimateSize: () => fo,
3159
3163
  getItemKey: (e) => u[e]?.key ?? e,
3160
- overscan: go,
3161
- gap: _o,
3164
+ overscan: mo,
3165
+ gap: ho,
3162
3166
  initialRect: {
3163
3167
  width: 0,
3164
3168
  height: f
3165
3169
  },
3166
- initialOffset: () => yo(u.length, f)
3170
+ initialOffset: () => _o(u.length, f)
3167
3171
  }), m = p.getTotalSize();
3168
- return po({
3172
+ return uo({
3169
3173
  itemCount: u.length,
3170
3174
  onReady: c,
3171
3175
  scrollRef: l,
3172
3176
  totalSize: m
3173
- }), /* @__PURE__ */ Y(A, {
3177
+ }), /* @__PURE__ */ J(A, {
3174
3178
  px: "xs",
3175
- children: /* @__PURE__ */ Y(A, {
3179
+ children: /* @__PURE__ */ J(A, {
3176
3180
  position: "relative",
3177
3181
  width: "100%",
3178
3182
  style: { height: m },
3179
3183
  children: p.getVirtualItems().map((e) => {
3180
3184
  let t = u[e.index];
3181
- return t ? /* @__PURE__ */ Y(A, {
3185
+ return t ? /* @__PURE__ */ J(A, {
3182
3186
  ref: p.measureElement,
3183
3187
  "data-index": e.index,
3184
3188
  "data-chat-message-list-item": t.type,
@@ -3187,7 +3191,7 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
3187
3191
  left: "0",
3188
3192
  width: "100%",
3189
3193
  style: { top: e.start },
3190
- children: /* @__PURE__ */ Y(Eo, {
3194
+ children: /* @__PURE__ */ J(bo, {
3191
3195
  item: t,
3192
3196
  groupCount: n.length,
3193
3197
  streaming: r,
@@ -3200,11 +3204,11 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
3200
3204
  })
3201
3205
  })
3202
3206
  });
3203
- }, Oo = (e) => {
3207
+ }, So = (e) => {
3204
3208
  let { queuedFollowUps: t, defaultValue: n, onChange: r, onSubmit: i, onUpdate: a, onCreate: o, onRestoreDraft: s, canRestoreDraft: c = !1, disabled: l = !1, onSelect: u, onDiscard: d } = e, [f, p] = Q(null), [m, h] = Q({}), [g, _] = Q(null), [v, y] = Q(0), [b, x] = Q({}), [S, C] = Q(null), [w, T] = Q(!1), [E, D] = Q(null), [O, k] = Q(null), A = t.find((e) => e.id === f?.id), j = !(!f || A), M = !!(f && A && f.revision && f.revision !== A.revision), N = f ? m[f.id]?.text ?? f.prompt : n, P = g?.text === n ? g.state : void 0, F = f ? m[f.id]?.state : P, I = (e) => {
3205
3209
  p(e), C(null), k(null), u?.(e), y((e) => e + 1);
3206
3210
  };
3207
- Z(() => {
3211
+ X(() => {
3208
3212
  !f || A || w || l || E === f.id || (D(f.id), c && r && !n.trim() && !t.length && (s?.(f.id), _({
3209
3213
  text: N,
3210
3214
  state: F ?? xt(N)
@@ -3242,7 +3246,7 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
3242
3246
  state: xt(e)
3243
3247
  }
3244
3248
  }));
3245
- }, R = (e, t) => {
3249
+ }, ee = (e, t) => {
3246
3250
  if (!f) {
3247
3251
  _({
3248
3252
  text: e,
@@ -3257,12 +3261,12 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
3257
3261
  state: t
3258
3262
  }
3259
3263
  }));
3260
- }, z = () => {
3264
+ }, R = () => {
3261
3265
  f && (d?.(f.id), h((e) => {
3262
3266
  let t = { ...e };
3263
3267
  return delete t[f.id], t;
3264
3268
  })), I(null);
3265
- }, B = async (e, t, n) => {
3269
+ }, z = async (e, t, n) => {
3266
3270
  if (n) return i?.(e, t, n);
3267
3271
  if (!f) return i?.(e, t);
3268
3272
  if (M || w) throw Error("Select the saved request again before updating.");
@@ -3281,30 +3285,30 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
3281
3285
  } finally {
3282
3286
  T(!1);
3283
3287
  }
3284
- }, V = f?.id ?? "draft";
3288
+ }, B = f?.id ?? "draft";
3285
3289
  return {
3286
- initialSelection: b[V],
3290
+ initialSelection: b[B],
3287
3291
  changeSelection: (e) => x((t) => ({
3288
3292
  ...t,
3289
- [V]: e
3293
+ [B]: e
3290
3294
  })),
3291
3295
  draftValue: n,
3292
3296
  change: L,
3293
- changeState: R,
3297
+ changeState: ee,
3294
3298
  edit: (e) => {
3295
3299
  w || I(e);
3296
3300
  },
3297
3301
  selectDraft: () => {
3298
3302
  w || I(null);
3299
3303
  },
3300
- discard: z,
3304
+ discard: R,
3301
3305
  editingItem: f,
3302
3306
  editingItemId: f?.id ?? null,
3303
3307
  focusSignal: v,
3304
3308
  inputValue: N,
3305
3309
  editorState: F,
3306
3310
  isEditing: !!f,
3307
- submit: B,
3311
+ submit: z,
3308
3312
  error: S,
3309
3313
  notice: O ?? (j ? "This request was sent. Create a new queue item to keep your edits." : null),
3310
3314
  createNew: j,
@@ -3312,23 +3316,23 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
3312
3316
  stale: M,
3313
3317
  dirtyItemIds: Object.keys(m).filter((e) => m[e].text !== t.find((t) => t.id === e)?.prompt)
3314
3318
  };
3315
- }, ko = (e) => {
3316
- let t = J(51), { conversationKey: n, recentUserMessages: r, actions: i, attachmentActions: a, attachedResources: o, attachmentList: s, chatInputAutoFocus: c, chatInputPlaceholder: l, chatInputQuestionPrompt: u, composerDecision: d, chatInputCommands: f, hasWorkspaceHub: p, inputDisabled: m, submitDisabled: h, onAttachFiles: g, onAttachText: _, onClearAttachments: v, onInterrupt: y, queuedComposer: b, streaming: x } = e, { editing: S, hasQueuedFollowUps: C } = e, w = b.createNew ? "Create new queue item" : "Update", T = b.updating ? "Saving…" : w, E;
3319
+ }, Co = (e) => {
3320
+ let t = q(51), { conversationKey: n, recentUserMessages: r, actions: i, attachmentActions: a, attachedResources: o, attachmentList: s, chatInputAutoFocus: c, chatInputPlaceholder: l, chatInputQuestionPrompt: u, composerDecision: d, chatInputCommands: f, hasWorkspaceHub: p, inputDisabled: m, submitDisabled: h, onAttachFiles: g, onAttachText: _, onClearAttachments: v, onInterrupt: y, queuedComposer: b, streaming: x } = e, { editing: S, hasQueuedFollowUps: C } = e, w = b.createNew ? "Create new queue item" : "Update", T = b.updating ? "Saving…" : w, E;
3317
3321
  t[0] !== S || t[1] !== m || t[2] !== b ? (E = (e) => {
3318
3322
  e.key !== "Escape" || e.defaultPrevented || e.nativeEvent.isComposing || !S || m || b.updating || !e.currentTarget.contains(e.target) || (e.preventDefault(), e.stopPropagation(), b.discard());
3319
3323
  }, t[0] = S, t[1] = m, t[2] = b, t[3] = E) : E = t[3];
3320
3324
  let D = `${n ?? ""}:${b.editingItemId ?? "draft"}`, O;
3321
3325
  t[4] !== b.editorState || t[5] !== b.inputValue ? (O = b.editorState ?? xt(b.inputValue), t[4] = b.editorState, t[5] = b.inputValue, t[6] = O) : O = t[6];
3322
3326
  let k = !S && x, M = S ? void 0 : y, N;
3323
- t[7] !== S || t[8] !== m || t[9] !== b.discard || t[10] !== b.updating ? (N = S ? /* @__PURE__ */ Y(j, {
3327
+ t[7] !== S || t[8] !== m || t[9] !== b.discard || t[10] !== b.updating ? (N = S ? /* @__PURE__ */ J(j, {
3324
3328
  size: "xs",
3325
3329
  variant: "ghost",
3326
3330
  onClick: b.discard,
3327
3331
  disabled: b.updating || m,
3328
3332
  children: "Cancel"
3329
3333
  }) : null, t[7] = S, t[8] = m, t[9] = b.discard, t[10] = b.updating, t[11] = N) : N = t[11];
3330
- let P = m || b.updating, F = h || S && b.stale, I = !S && C, L = S ? w : void 0, R = S ? T : void 0, z;
3331
- t[12] !== i || t[13] !== o || t[14] !== a || t[15] !== s || t[16] !== c || t[17] !== f || t[18] !== l || t[19] !== u || t[20] !== d || t[21] !== S || t[22] !== p || t[23] !== g || t[24] !== _ || t[25] !== v || t[26] !== b.change || t[27] !== b.changeSelection || t[28] !== b.changeState || t[29] !== b.focusSignal || t[30] !== b.initialSelection || t[31] !== b.submit || t[32] !== r || t[33] !== D || t[34] !== R || t[35] !== O || t[36] !== k || t[37] !== M || t[38] !== N || t[39] !== P || t[40] !== F || t[41] !== I || t[42] !== L ? (z = /* @__PURE__ */ Y(Yn, {
3334
+ let P = m || b.updating, F = h || S && b.stale, I = !S && C, L = S ? w : void 0, ee = S ? T : void 0, R;
3335
+ t[12] !== i || t[13] !== o || t[14] !== a || t[15] !== s || t[16] !== c || t[17] !== f || t[18] !== l || t[19] !== u || t[20] !== d || t[21] !== S || t[22] !== p || t[23] !== g || t[24] !== _ || t[25] !== v || t[26] !== b.change || t[27] !== b.changeSelection || t[28] !== b.changeState || t[29] !== b.focusSignal || t[30] !== b.initialSelection || t[31] !== b.submit || t[32] !== r || t[33] !== D || t[34] !== ee || t[35] !== O || t[36] !== k || t[37] !== M || t[38] !== N || t[39] !== P || t[40] !== F || t[41] !== I || t[42] !== L ? (R = /* @__PURE__ */ J(Yn, {
3332
3336
  recentUserMessages: r,
3333
3337
  placeholder: l,
3334
3338
  defaultState: O,
@@ -3356,25 +3360,25 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
3356
3360
  autoFocus: c,
3357
3361
  focusSignal: b.focusSignal,
3358
3362
  submitTitle: L,
3359
- submitLabel: R,
3363
+ submitLabel: ee,
3360
3364
  retainTextUntilAcknowledged: S,
3361
3365
  commands: f
3362
- }, D), t[12] = i, t[13] = o, t[14] = a, t[15] = s, t[16] = c, t[17] = f, t[18] = l, t[19] = u, t[20] = d, t[21] = S, t[22] = p, t[23] = g, t[24] = _, t[25] = v, t[26] = b.change, t[27] = b.changeSelection, t[28] = b.changeState, t[29] = b.focusSignal, t[30] = b.initialSelection, t[31] = b.submit, t[32] = r, t[33] = D, t[34] = R, t[35] = O, t[36] = k, t[37] = M, t[38] = N, t[39] = P, t[40] = F, t[41] = I, t[42] = L, t[43] = z) : z = t[43];
3363
- let B;
3364
- t[44] !== S || t[45] !== b ? (B = /* @__PURE__ */ Y(Ao, {
3366
+ }, D), t[12] = i, t[13] = o, t[14] = a, t[15] = s, t[16] = c, t[17] = f, t[18] = l, t[19] = u, t[20] = d, t[21] = S, t[22] = p, t[23] = g, t[24] = _, t[25] = v, t[26] = b.change, t[27] = b.changeSelection, t[28] = b.changeState, t[29] = b.focusSignal, t[30] = b.initialSelection, t[31] = b.submit, t[32] = r, t[33] = D, t[34] = ee, t[35] = O, t[36] = k, t[37] = M, t[38] = N, t[39] = P, t[40] = F, t[41] = I, t[42] = L, t[43] = R) : R = t[43];
3367
+ let z;
3368
+ t[44] !== S || t[45] !== b ? (z = /* @__PURE__ */ J(wo, {
3365
3369
  queuedComposer: b,
3366
3370
  editing: S
3367
- }), t[44] = S, t[45] = b, t[46] = B) : B = t[46];
3368
- let V;
3369
- return t[47] !== E || t[48] !== z || t[49] !== B ? (V = /* @__PURE__ */ X(A, {
3371
+ }), t[44] = S, t[45] = b, t[46] = z) : z = t[46];
3372
+ let B;
3373
+ return t[47] !== E || t[48] !== R || t[49] !== z ? (B = /* @__PURE__ */ Y(A, {
3370
3374
  onKeyDown: E,
3371
- children: [z, B]
3372
- }), t[47] = E, t[48] = z, t[49] = B, t[50] = V) : V = t[50], V;
3373
- }, Ao = (e) => {
3374
- let t = J(4), { queuedComposer: n, editing: r } = e, i = r && n.stale, a = n.error ?? (i ? "This request changed. Your edit is kept; select the saved request again before updating." : n.notice);
3375
+ children: [R, z]
3376
+ }), t[47] = E, t[48] = R, t[49] = z, t[50] = B) : B = t[50], B;
3377
+ }, wo = (e) => {
3378
+ let t = q(4), { queuedComposer: n, editing: r } = e, i = r && n.stale, a = n.error ?? (i ? "This request changed. Your edit is kept; select the saved request again before updating." : n.notice);
3375
3379
  if (!a) return null;
3376
3380
  let o = !!(n.error || i), s = o ? "fg.error" : "fg.muted", c = o ? "alert" : "status", l;
3377
- return t[0] !== a || t[1] !== s || t[2] !== c ? (l = /* @__PURE__ */ Y(K, {
3381
+ return t[0] !== a || t[1] !== s || t[2] !== c ? (l = /* @__PURE__ */ J(G, {
3378
3382
  mt: "2xs",
3379
3383
  color: s,
3380
3384
  textStyle: "label/S/regular",
@@ -3382,7 +3386,7 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
3382
3386
  "aria-label": "Queued edit notice",
3383
3387
  children: a
3384
3388
  }), t[0] = a, t[1] = s, t[2] = c, t[3] = l) : l = t[3], l;
3385
- }, jo = (e, { context: t }, n) => {
3389
+ }, To = (e, { context: t }, n) => {
3386
3390
  if (![
3387
3391
  "ArrowUp",
3388
3392
  "ArrowDown",
@@ -3397,7 +3401,7 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
3397
3401
  x: o.left + (o.width - (t.collisionRect?.width ?? 0)) / 2,
3398
3402
  y: o.top + (o.height - (t.collisionRect?.height ?? 0)) / 2
3399
3403
  };
3400
- }, Mo = (e) => {
3404
+ }, Eo = (e) => {
3401
3405
  let { item: t, index: n, kind: r } = e, i = $e({
3402
3406
  id: `${t.id}:${r}`,
3403
3407
  disabled: !!(t.sending || t.steeringDelivery),
@@ -3424,14 +3428,14 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
3424
3428
  height: "25%"
3425
3429
  }
3426
3430
  }[r];
3427
- return /* @__PURE__ */ Y(A, {
3431
+ return /* @__PURE__ */ J(A, {
3428
3432
  ref: i.setNodeRef,
3429
3433
  position: "absolute",
3430
3434
  insetX: "0",
3431
3435
  pointerEvents: "none",
3432
3436
  ...a
3433
3437
  });
3434
- }, No = (e) => {
3438
+ }, Do = (e) => {
3435
3439
  let { visible: t, targeted: n, reason: r } = e, i = $e({
3436
3440
  id: "queue-send-now",
3437
3441
  disabled: !t,
@@ -3439,33 +3443,33 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
3439
3443
  kind: "steer",
3440
3444
  order: -1
3441
3445
  }
3442
- }), a = de({ recipe: p })();
3443
- return t ? /* @__PURE__ */ Y(A, {
3446
+ }), a = fe({ recipe: p })();
3447
+ return t ? /* @__PURE__ */ J(A, {
3444
3448
  ref: i.setNodeRef,
3445
3449
  css: a.sendNowHit,
3446
- children: /* @__PURE__ */ X(A, {
3450
+ children: /* @__PURE__ */ Y(A, {
3447
3451
  css: a.sendNow,
3448
3452
  bottom: "0",
3449
3453
  title: r ?? void 0,
3450
3454
  "aria-disabled": !!r,
3451
3455
  "data-targeted": n && !r,
3452
3456
  "data-queue-send-now": !0,
3453
- children: [/* @__PURE__ */ Y(Ce, { size: 14 }), /* @__PURE__ */ Y(K, { children: "drop here to send now" })]
3457
+ children: [/* @__PURE__ */ J(Ce, { size: 14 }), /* @__PURE__ */ J(G, { children: "drop here to send now" })]
3454
3458
  })
3455
3459
  }) : null;
3456
- }, Po = (e) => {
3460
+ }, Oo = (e) => {
3457
3461
  let { item: t, index: n, editor: r, source: i, destination: a, unavailableReason: o, editing: c, onEdit: l, onRemove: u } = e, d = !!(t.sending || t.steeringDelivery), f = Qe({
3458
3462
  id: t.id,
3459
3463
  data: { item: t },
3460
3464
  disabled: d
3461
- }), m = de({ recipe: p })(), [h, g] = Q(!1), [_, v] = Q(!1), y = ye(void 0), b = ye(null);
3462
- Z(() => () => clearTimeout(y.current), []), Z(() => {
3465
+ }), m = fe({ recipe: p })(), [h, g] = Q(!1), [_, v] = Q(!1), y = Z(void 0), b = Z(null);
3466
+ X(() => () => clearTimeout(y.current), []), X(() => {
3463
3467
  c && b.current?.scrollIntoView({ block: "nearest" });
3464
3468
  }, [c]);
3465
3469
  let x = () => {
3466
3470
  clearTimeout(y.current), g(!0);
3467
3471
  }, S = !r;
3468
- return /* @__PURE__ */ X(A, {
3472
+ return /* @__PURE__ */ Y(A, {
3469
3473
  className: "group",
3470
3474
  ref: (e) => {
3471
3475
  f.setNodeRef(e), b.current = e;
@@ -3490,7 +3494,7 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
3490
3494
  !t.sending && S && !e.target.closest("button") && l?.(t);
3491
3495
  },
3492
3496
  children: [
3493
- /* @__PURE__ */ Y(R, {
3497
+ /* @__PURE__ */ J(ee, {
3494
3498
  ref: f.setActivatorNodeRef,
3495
3499
  ...f.listeners,
3496
3500
  ...f.attributes,
@@ -3500,24 +3504,24 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
3500
3504
  css: m.handle,
3501
3505
  disabled: d,
3502
3506
  onClick: (e) => e.stopPropagation(),
3503
- children: /* @__PURE__ */ Y(Ie, { size: 14 })
3507
+ children: /* @__PURE__ */ J(Ie, { size: 14 })
3504
3508
  }),
3505
- /* @__PURE__ */ X(G, {
3509
+ /* @__PURE__ */ Y(W, {
3506
3510
  flex: "1",
3507
3511
  minW: "0",
3508
3512
  gap: "2xs",
3509
- children: [r ?? /* @__PURE__ */ Y(A, {
3513
+ children: [r ?? /* @__PURE__ */ J(A, {
3510
3514
  asChild: !0,
3511
3515
  css: m.content,
3512
- children: /* @__PURE__ */ X("button", {
3516
+ children: /* @__PURE__ */ Y("button", {
3513
3517
  type: "button",
3514
3518
  disabled: t.sending,
3515
3519
  "aria-label": `Edit queued message: ${t.prompt}`,
3516
3520
  onClick: () => l?.(t),
3517
- children: [/* @__PURE__ */ Y(K, {
3521
+ children: [/* @__PURE__ */ J(G, {
3518
3522
  lineClamp: 2,
3519
3523
  children: t.prompt
3520
- }), /* @__PURE__ */ Y(K, {
3524
+ }), /* @__PURE__ */ J(G, {
3521
3525
  color: "fg.muted",
3522
3526
  textStyle: "label/XS",
3523
3527
  lineClamp: 1,
@@ -3529,204 +3533,204 @@ var Va = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
3529
3533
  ].filter(Boolean).join(" · ") || "Saved request"
3530
3534
  })]
3531
3535
  })
3532
- }), t.steeringDelivery ? /* @__PURE__ */ Y(K, {
3536
+ }), t.steeringDelivery ? /* @__PURE__ */ J(G, {
3533
3537
  css: m.notice,
3534
3538
  children: "Delivery is unconfirmed. Saved input is kept and will not be replayed."
3535
3539
  }) : null]
3536
3540
  }),
3537
- u && !r && !d ? /* @__PURE__ */ Y(I, {
3541
+ u && !r && !d ? /* @__PURE__ */ J(I, {
3538
3542
  css: m.actions,
3539
3543
  "data-visible": h || _ || c,
3540
- children: /* @__PURE__ */ Y(R, {
3544
+ children: /* @__PURE__ */ J(ee, {
3541
3545
  "aria-label": "Remove queued follow-up",
3542
3546
  size: "2xs",
3543
3547
  variant: "destructive-ghost",
3544
3548
  onClick: (e) => {
3545
3549
  e.stopPropagation(), u(t.id);
3546
3550
  },
3547
- children: /* @__PURE__ */ Y(Ke, { size: 14 })
3551
+ children: /* @__PURE__ */ J(Ke, { size: 14 })
3548
3552
  })
3549
3553
  }) : null,
3550
- /* @__PURE__ */ Y(Mo, {
3554
+ /* @__PURE__ */ J(Eo, {
3551
3555
  item: t,
3552
3556
  index: n,
3553
3557
  kind: "before"
3554
3558
  }),
3555
- /* @__PURE__ */ Y(Mo, {
3559
+ /* @__PURE__ */ J(Eo, {
3556
3560
  item: t,
3557
3561
  index: n,
3558
3562
  kind: "combine"
3559
3563
  }),
3560
- /* @__PURE__ */ Y(Mo, {
3564
+ /* @__PURE__ */ J(Eo, {
3561
3565
  item: t,
3562
3566
  index: n,
3563
3567
  kind: "after"
3564
3568
  }),
3565
- a === "before" ? /* @__PURE__ */ Y(s, { top: "0" }) : null,
3566
- a === "after" ? /* @__PURE__ */ Y(s, { bottom: "0" }) : null
3569
+ a === "before" ? /* @__PURE__ */ J(s, { top: "0" }) : null,
3570
+ a === "after" ? /* @__PURE__ */ J(s, { bottom: "0" }) : null
3567
3571
  ]
3568
3572
  });
3569
- }, Fo = (e) => JSON.stringify([e.model, Object.entries(e.params ?? {}).sort(([e], [t]) => e.localeCompare(t))]), Io = (e) => {
3570
- let t = J(87), { items: r, editingItemId: i, editor: a, retainedEditor: o, retainedEditorPosition: s, dirtyItemIds: c, steeringUnavailableReason: l, onEdit: u, onRemove: d, onMove: f, onSteer: m, onCombine: h } = e, g;
3573
+ }, ko = (e) => JSON.stringify([e.model, Object.entries(e.params ?? {}).sort(([e], [t]) => e.localeCompare(t))]), Ao = (e) => {
3574
+ let t = q(87), { items: r, editingItemId: i, editor: a, retainedEditor: o, retainedEditorPosition: s, dirtyItemIds: c, steeringUnavailableReason: l, onEdit: u, onRemove: d, onMove: f, onSteer: m, onCombine: h } = e, g;
3571
3575
  t[0] === c ? g = t[1] : (g = c === void 0 ? [] : c, t[0] = c, t[1] = g);
3572
3576
  let _ = g, v;
3573
3577
  t[2] === Symbol.for("react.memo_cache_sentinel") ? (v = { recipe: p }, t[2] = v) : v = t[2];
3574
- let y = de(v), b;
3578
+ let y = fe(v), b;
3575
3579
  t[3] === y ? b = t[4] : (b = y(), t[3] = y, t[4] = b);
3576
3580
  let x = b, [S, C] = Q(null), w;
3577
3581
  t[5] === Symbol.for("react.memo_cache_sentinel") ? (w = { activationConstraint: { distance: 4 } }, t[5] = w) : w = t[5];
3578
3582
  let T;
3579
- t[6] === Symbol.for("react.memo_cache_sentinel") ? (T = { coordinateGetter: (e, t) => jo(e, t, C) }, t[6] = T) : T = t[6];
3583
+ t[6] === Symbol.for("react.memo_cache_sentinel") ? (T = { coordinateGetter: (e, t) => To(e, t, C) }, t[6] = T) : T = t[6];
3580
3584
  let E = tt(et(Ye, w), et(Je, T)), [D, O] = Q(null), k;
3581
3585
  t[7] === Symbol.for("react.memo_cache_sentinel") ? (k = [], t[7] = k) : k = t[7];
3582
- let [j, M] = Q(k), [N, P] = Q(null), [F, I] = Q(null), [L, R] = Q(!1);
3586
+ let [j, M] = Q(k), [N, P] = Q(null), [F, I] = Q(null), [L, ee] = Q(!1);
3583
3587
  if (!r.length && !o) return null;
3584
- let z;
3585
- t[8] !== r || t[9] !== s ? (z = Lo(r, s), t[8] = r, t[9] = s, t[10] = z) : z = t[10];
3586
- let B = z, V;
3587
- t[11] !== _ || t[12] !== m || t[13] !== D || t[14] !== l ? (V = D?.steeringUnavailableReason ?? l ?? (D && _.includes(D.id) ? "Update or Cancel this edit before sending." : null) ?? (m ? null : "This conversation cannot accept live input."), t[11] = _, t[12] = m, t[13] = D, t[14] = l, t[15] = V) : V = t[15];
3588
- let H = V, U = !!(D && m && !l), ee;
3589
- t[16] !== _ || t[17] !== D ? (ee = (e) => !D || D.id === e.id ? "Choose another request." : _.includes(D.id) || _.includes(e.id) ? "Update or Cancel the edits first." : Fo(D) === Fo(e) ? e.steeringDelivery ? "Delivery is still being confirmed." : null : "Model and thinking settings must match.", t[16] = _, t[17] = D, t[18] = ee) : ee = t[18];
3590
- let te = ee, ne;
3591
- t[19] !== j || t[20] !== f ? (ne = (e, t, n) => {
3592
- let r = j.filter(zo), i = r.findIndex((t) => t.id === e.id), a = r.findIndex((e) => e.id === t.id);
3588
+ let R;
3589
+ t[8] !== r || t[9] !== s ? (R = jo(r, s), t[8] = r, t[9] = s, t[10] = R) : R = t[10];
3590
+ let z = R, B;
3591
+ t[11] !== _ || t[12] !== m || t[13] !== D || t[14] !== l ? (B = D?.steeringUnavailableReason ?? l ?? (D && _.includes(D.id) ? "Update or Cancel this edit before sending." : null) ?? (m ? null : "This conversation cannot accept live input."), t[11] = _, t[12] = m, t[13] = D, t[14] = l, t[15] = B) : B = t[15];
3592
+ let te = B, V = !!(D && m && !l), ne;
3593
+ t[16] !== _ || t[17] !== D ? (ne = (e) => !D || D.id === e.id ? "Choose another request." : _.includes(D.id) || _.includes(e.id) ? "Update or Cancel the edits first." : ko(D) === ko(e) ? e.steeringDelivery ? "Delivery is still being confirmed." : null : "Model and thinking settings must match.", t[16] = _, t[17] = D, t[18] = ne) : ne = t[18];
3594
+ let re = ne, ie;
3595
+ t[19] !== j || t[20] !== f ? (ie = (e, t, n) => {
3596
+ let r = j.filter(No), i = r.findIndex((t) => t.id === e.id), a = r.findIndex((e) => e.id === t.id);
3593
3597
  if (i < 0 || a < 0 || i === a) return;
3594
3598
  let o = a + +(n === "after"), s = o - +(i < o);
3595
3599
  if (s !== i) return f?.(e.id, s < i ? "up" : "down", Math.abs(s - i), {
3596
3600
  source: e,
3597
3601
  items: j
3598
3602
  });
3599
- }, t[19] = j, t[20] = f, t[21] = ne) : ne = t[21];
3600
- let re = ne, W;
3601
- t[22] !== te || t[23] !== h || t[24] !== m || t[25] !== re || t[26] !== H ? (W = (e, t) => {
3603
+ }, t[19] = j, t[20] = f, t[21] = ie) : ie = t[21];
3604
+ let H = ie, U;
3605
+ t[22] !== re || t[23] !== h || t[24] !== m || t[25] !== H || t[26] !== te ? (U = (e, t) => {
3602
3606
  if (t.kind === "steer") {
3603
- if (!H) return m?.(e);
3604
- I(H);
3607
+ if (!te) return m?.(e);
3608
+ I(te);
3605
3609
  return;
3606
3610
  }
3607
- if (t.item) return t.kind === "combine" ? te(t.item) ? void 0 : h?.(e, t.item) : re(e, t.item, t.kind);
3608
- }, t[22] = te, t[23] = h, t[24] = m, t[25] = re, t[26] = H, t[27] = W) : W = t[27];
3609
- let G = W, ie;
3610
- t[28] === S ? ie = t[29] : (ie = (e) => {
3611
+ if (t.item) return t.kind === "combine" ? re(t.item) ? void 0 : h?.(e, t.item) : H(e, t.item, t.kind);
3612
+ }, t[22] = re, t[23] = h, t[24] = m, t[25] = H, t[26] = te, t[27] = U) : U = t[27];
3613
+ let W = U, ae;
3614
+ t[28] === S ? ae = t[29] : (ae = (e) => {
3611
3615
  if (!e.pointerCoordinates && S !== null) return [{ id: S }];
3612
3616
  let t = Xe(e);
3613
3617
  return t.length ? t : Ze(e);
3614
- }, t[28] = S, t[29] = ie);
3615
- let ae;
3616
- t[30] === r ? ae = t[31] : (ae = (e) => {
3618
+ }, t[28] = S, t[29] = ae);
3619
+ let oe;
3620
+ t[30] === r ? oe = t[31] : (oe = (e) => {
3617
3621
  C(null), O(e.active.data.current?.item ?? null), M(r), I(null);
3618
- }, t[30] = r, t[31] = ae);
3619
- let oe, se;
3620
- t[32] === Symbol.for("react.memo_cache_sentinel") ? (oe = (e) => P(e.over?.data.current ?? null), se = () => {
3622
+ }, t[30] = r, t[31] = oe);
3623
+ let se, ce;
3624
+ t[32] === Symbol.for("react.memo_cache_sentinel") ? (se = (e) => P(e.over?.data.current ?? null), ce = () => {
3621
3625
  C(null), O(null), P(null);
3622
- }, t[32] = oe, t[33] = se) : (oe = t[32], se = t[33]);
3623
- let q;
3624
- t[34] !== L || t[35] !== G || t[36] !== D ? (q = (e) => {
3626
+ }, t[32] = se, t[33] = ce) : (se = t[32], ce = t[33]);
3627
+ let K;
3628
+ t[34] !== L || t[35] !== W || t[36] !== D ? (K = (e) => {
3625
3629
  let t = D, n = e.over?.data.current;
3626
- O(null), P(null), t && n && !L && (R(!0), Promise.resolve().then(() => G(t, n)).catch((e) => I(e instanceof Error ? e.message : "Could not change the queue. Saved input is kept.")).finally(() => R(!1)));
3627
- }, t[34] = L, t[35] = G, t[36] = D, t[37] = q) : q = t[37];
3628
- let ce = x.root, le = N?.kind === "steer", ue;
3629
- t[38] !== U || t[39] !== H || t[40] !== le ? (ue = /* @__PURE__ */ Y(No, {
3630
- visible: U,
3631
- targeted: le,
3632
- reason: H
3633
- }), t[38] = U, t[39] = H, t[40] = le, t[41] = ue) : ue = t[41];
3634
- let fe;
3635
- t[42] === Symbol.for("react.memo_cache_sentinel") ? (fe = { maxH: "queue-viewport" }, t[42] = fe) : fe = t[42];
3636
- let me;
3637
- if (t[43] !== te || t[44] !== N || t[45] !== i || t[46] !== a || t[47] !== r || t[48] !== u || t[49] !== d || t[50] !== o || t[51] !== B || t[52] !== D?.id) {
3630
+ O(null), P(null), t && n && !L && (ee(!0), Promise.resolve().then(() => W(t, n)).catch((e) => I(e instanceof Error ? e.message : "Could not change the queue. Saved input is kept.")).finally(() => ee(!1)));
3631
+ }, t[34] = L, t[35] = W, t[36] = D, t[37] = K) : K = t[37];
3632
+ let le = x.root, ue = N?.kind === "steer", de;
3633
+ t[38] !== V || t[39] !== te || t[40] !== ue ? (de = /* @__PURE__ */ J(Do, {
3634
+ visible: V,
3635
+ targeted: ue,
3636
+ reason: te
3637
+ }), t[38] = V, t[39] = te, t[40] = ue, t[41] = de) : de = t[41];
3638
+ let pe;
3639
+ t[42] === Symbol.for("react.memo_cache_sentinel") ? (pe = { maxH: "queue-viewport" }, t[42] = pe) : pe = t[42];
3640
+ let he;
3641
+ if (t[43] !== re || t[44] !== N || t[45] !== i || t[46] !== a || t[47] !== r || t[48] !== u || t[49] !== d || t[50] !== o || t[51] !== z || t[52] !== D?.id) {
3638
3642
  let e;
3639
- t[54] !== te || t[55] !== N || t[56] !== i || t[57] !== a || t[58] !== u || t[59] !== d || t[60] !== o || t[61] !== B || t[62] !== D?.id ? (e = (e, t) => /* @__PURE__ */ X(pe, { children: [o && t === B ? /* @__PURE__ */ Y(Ro, { children: o }) : null, /* @__PURE__ */ Y(Po, {
3643
+ t[54] !== re || t[55] !== N || t[56] !== i || t[57] !== a || t[58] !== u || t[59] !== d || t[60] !== o || t[61] !== z || t[62] !== D?.id ? (e = (e, t) => /* @__PURE__ */ Y(me, { children: [o && t === z ? /* @__PURE__ */ J(Mo, { children: o }) : null, /* @__PURE__ */ J(Oo, {
3640
3644
  item: e,
3641
3645
  index: t,
3642
3646
  source: D?.id === e.id,
3643
3647
  destination: N?.item?.id === e.id ? N.kind : void 0,
3644
- unavailableReason: N?.kind === "combine" ? te(e) : null,
3648
+ unavailableReason: N?.kind === "combine" ? re(e) : null,
3645
3649
  editing: i === e.id,
3646
3650
  editor: i === e.id ? a : void 0,
3647
3651
  onEdit: u,
3648
3652
  onRemove: d
3649
- })] }, e.id), t[54] = te, t[55] = N, t[56] = i, t[57] = a, t[58] = u, t[59] = d, t[60] = o, t[61] = B, t[62] = D?.id, t[63] = e) : e = t[63], me = r.map(e), t[43] = te, t[44] = N, t[45] = i, t[46] = a, t[47] = r, t[48] = u, t[49] = d, t[50] = o, t[51] = B, t[52] = D?.id, t[53] = me;
3650
- } else me = t[53];
3651
- let he;
3652
- t[64] !== r.length || t[65] !== o || t[66] !== B ? (he = o && B === r.length ? /* @__PURE__ */ Y(Ro, { children: o }) : null, t[64] = r.length, t[65] = o, t[66] = B, t[67] = he) : he = t[67];
3653
+ })] }, e.id), t[54] = re, t[55] = N, t[56] = i, t[57] = a, t[58] = u, t[59] = d, t[60] = o, t[61] = z, t[62] = D?.id, t[63] = e) : e = t[63], he = r.map(e), t[43] = re, t[44] = N, t[45] = i, t[46] = a, t[47] = r, t[48] = u, t[49] = d, t[50] = o, t[51] = z, t[52] = D?.id, t[53] = he;
3654
+ } else he = t[53];
3653
3655
  let ge;
3654
- t[68] !== me || t[69] !== he ? (ge = /* @__PURE__ */ X(n, {
3656
+ t[64] !== r.length || t[65] !== o || t[66] !== z ? (ge = o && z === r.length ? /* @__PURE__ */ J(Mo, { children: o }) : null, t[64] = r.length, t[65] = o, t[66] = z, t[67] = ge) : ge = t[67];
3657
+ let _e;
3658
+ t[68] !== he || t[69] !== ge ? (_e = /* @__PURE__ */ Y(n, {
3655
3659
  maxH: "queue-viewport",
3656
3660
  minH: "0",
3657
- viewportProps: fe,
3658
- children: [me, he]
3659
- }), t[68] = me, t[69] = he, t[70] = ge) : ge = t[70];
3660
- let _e;
3661
- t[71] !== F || t[72] !== x.notice ? (_e = F ? /* @__PURE__ */ Y(K, {
3661
+ viewportProps: pe,
3662
+ children: [he, ge]
3663
+ }), t[68] = he, t[69] = ge, t[70] = _e) : _e = t[70];
3664
+ let ve;
3665
+ t[71] !== F || t[72] !== x.notice ? (ve = F ? /* @__PURE__ */ J(G, {
3662
3666
  css: x.notice,
3663
3667
  role: "alert",
3664
3668
  children: F
3665
- }) : null, t[71] = F, t[72] = x.notice, t[73] = _e) : _e = t[73];
3666
- let Z;
3667
- t[74] !== L || t[75] !== U || t[76] !== x.root || t[77] !== ue || t[78] !== ge || t[79] !== _e ? (Z = /* @__PURE__ */ X(A, {
3668
- css: ce,
3669
- "data-send-now-visible": U,
3669
+ }) : null, t[71] = F, t[72] = x.notice, t[73] = ve) : ve = t[73];
3670
+ let X;
3671
+ t[74] !== L || t[75] !== V || t[76] !== x.root || t[77] !== de || t[78] !== _e || t[79] !== ve ? (X = /* @__PURE__ */ Y(A, {
3672
+ css: le,
3673
+ "data-send-now-visible": V,
3670
3674
  "aria-busy": L,
3671
3675
  children: [
3672
- ue,
3673
- ge,
3674
- _e
3676
+ de,
3677
+ _e,
3678
+ ve
3675
3679
  ]
3676
- }), t[74] = L, t[75] = U, t[76] = x.root, t[77] = ue, t[78] = ge, t[79] = _e, t[80] = Z) : Z = t[80];
3677
- let ve;
3678
- return t[81] !== E || t[82] !== ie || t[83] !== ae || t[84] !== q || t[85] !== Z ? (ve = /* @__PURE__ */ Y(qe, {
3680
+ }), t[74] = L, t[75] = V, t[76] = x.root, t[77] = de, t[78] = _e, t[79] = ve, t[80] = X) : X = t[80];
3681
+ let ye;
3682
+ return t[81] !== E || t[82] !== ae || t[83] !== oe || t[84] !== K || t[85] !== X ? (ye = /* @__PURE__ */ J(qe, {
3679
3683
  sensors: E,
3680
- collisionDetection: ie,
3684
+ collisionDetection: ae,
3681
3685
  autoScroll: !0,
3682
- onDragStart: ae,
3683
- onDragOver: oe,
3684
- onDragCancel: se,
3685
- onDragEnd: q,
3686
- children: Z
3687
- }), t[81] = E, t[82] = ie, t[83] = ae, t[84] = q, t[85] = Z, t[86] = ve) : ve = t[86], ve;
3688
- }, Lo = (e, t = Infinity) => {
3686
+ onDragStart: oe,
3687
+ onDragOver: se,
3688
+ onDragCancel: ce,
3689
+ onDragEnd: K,
3690
+ children: X
3691
+ }), t[81] = E, t[82] = ae, t[83] = oe, t[84] = K, t[85] = X, t[86] = ye) : ye = t[86], ye;
3692
+ }, jo = (e, t = Infinity) => {
3689
3693
  let n = e.findIndex((e) => (e.position ?? Infinity) > t);
3690
3694
  return n < 0 ? e.length : n;
3691
- }, Ro = (e) => {
3692
- let t = J(8), { children: n } = e, r;
3695
+ }, Mo = (e) => {
3696
+ let t = q(8), { children: n } = e, r;
3693
3697
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (r = { recipe: p }, t[0] = r) : r = t[0];
3694
- let i = de(r), a;
3698
+ let i = fe(r), a;
3695
3699
  t[1] === i ? a = t[2] : (a = i(), t[1] = i, t[2] = a);
3696
3700
  let o = a, s;
3697
- t[3] === n ? s = t[4] : (s = /* @__PURE__ */ Y(A, {
3701
+ t[3] === n ? s = t[4] : (s = /* @__PURE__ */ J(A, {
3698
3702
  flex: "1",
3699
3703
  minW: "0",
3700
3704
  children: n
3701
3705
  }), t[3] = n, t[4] = s);
3702
3706
  let c;
3703
- return t[5] !== o.row || t[6] !== s ? (c = /* @__PURE__ */ Y(A, {
3707
+ return t[5] !== o.row || t[6] !== s ? (c = /* @__PURE__ */ J(A, {
3704
3708
  css: o.row,
3705
3709
  children: s
3706
3710
  }), t[5] = o.row, t[6] = s, t[7] = c) : c = t[7], c;
3707
3711
  };
3708
- function zo(e) {
3712
+ function No(e) {
3709
3713
  return !e.sending && !e.steeringDelivery;
3710
3714
  }
3711
3715
  //#endregion
3712
3716
  //#region src/components/chat-ui/components/chat-panel-composer.tsx
3713
- var Bo = (e) => {
3714
- let t = J(42), { composerHeader: n, chatInputQuestionPrompt: r, composerDecision: i, hasWorkspaceHub: a, onQueuedFollowUpMove: o, onQueuedFollowUpRemove: s, onQueuedFollowUpUpdate: c, onQueuedFollowUpSteer: l, onQueuedFollowUpCombine: u, queueSteeringUnavailableReason: d, unsavedQueueItemIds: f, queuedComposer: m, queuedFollowUps: h, workspaceHub: g } = e, _;
3717
+ var Po = (e) => {
3718
+ let t = q(42), { composerHeader: n, chatInputQuestionPrompt: r, composerDecision: i, hasWorkspaceHub: a, onQueuedFollowUpMove: o, onQueuedFollowUpRemove: s, onQueuedFollowUpUpdate: c, onQueuedFollowUpSteer: l, onQueuedFollowUpCombine: u, queueSteeringUnavailableReason: d, unsavedQueueItemIds: f, queuedComposer: m, queuedFollowUps: h, workspaceHub: g } = e, _;
3715
3719
  t[0] === f ? _ = t[1] : (_ = f === void 0 ? [] : f, t[0] = f, t[1] = _);
3716
3720
  let v = _, y;
3717
3721
  t[2] === Symbol.for("react.memo_cache_sentinel") ? (y = { recipe: p }, t[2] = y) : y = t[2];
3718
- let b = de(y), x;
3722
+ let b = fe(y), x;
3719
3723
  t[3] === b ? x = t[4] : (x = b(), t[3] = b, t[4] = x);
3720
3724
  let S = x, C = h.length > 0, w = m.isEditing && !r && !i, T;
3721
- t[5] !== w || t[6] !== C || t[7] !== e ? (T = /* @__PURE__ */ Y(ko, {
3725
+ t[5] !== w || t[6] !== C || t[7] !== e ? (T = /* @__PURE__ */ J(Co, {
3722
3726
  ...e,
3723
3727
  editing: w,
3724
3728
  hasQueuedFollowUps: C
3725
3729
  }), t[5] = w, t[6] = C, t[7] = e, t[8] = T) : T = t[8];
3726
3730
  let E = T, D = a ? "2xs" : "0", O = a ? "2xs" : void 0, k = a ? "1px" : void 0, j = a ? "border" : void 0, M = a ? "xs" : void 0, N = a ? "bg.subtle" : void 0, P = w ? E : void 0, F = w && m.createNew ? E : void 0, I = m.editingItem?.position, L;
3727
3731
  t[9] !== m.dirtyItemIds || t[10] !== v ? (L = [...m.dirtyItemIds, ...v], t[9] = m.dirtyItemIds, t[10] = v, t[11] = L) : L = t[11];
3728
- let R = c ? m.edit : void 0, z;
3729
- t[12] !== u || t[13] !== o || t[14] !== s || t[15] !== l || t[16] !== d || t[17] !== m.editingItemId || t[18] !== h || t[19] !== P || t[20] !== F || t[21] !== I || t[22] !== L || t[23] !== R ? (z = /* @__PURE__ */ Y(Io, {
3732
+ let ee = c ? m.edit : void 0, R;
3733
+ t[12] !== u || t[13] !== o || t[14] !== s || t[15] !== l || t[16] !== d || t[17] !== m.editingItemId || t[18] !== h || t[19] !== P || t[20] !== F || t[21] !== I || t[22] !== L || t[23] !== ee ? (R = /* @__PURE__ */ J(Ao, {
3730
3734
  items: h,
3731
3735
  editor: P,
3732
3736
  retainedEditor: F,
@@ -3736,26 +3740,26 @@ var Bo = (e) => {
3736
3740
  onSteer: l,
3737
3741
  onCombine: u,
3738
3742
  editingItemId: m.editingItemId,
3739
- onEdit: R,
3743
+ onEdit: ee,
3740
3744
  onRemove: s,
3741
3745
  onMove: o
3742
- }), t[12] = u, t[13] = o, t[14] = s, t[15] = l, t[16] = d, t[17] = m.editingItemId, t[18] = h, t[19] = P, t[20] = F, t[21] = I, t[22] = L, t[23] = R, t[24] = z) : z = t[24];
3743
- let B;
3744
- t[25] !== w || t[26] !== E || t[27] !== m.draftValue || t[28] !== m.selectDraft || t[29] !== S ? (B = w ? /* @__PURE__ */ Y(A, {
3746
+ }), t[12] = u, t[13] = o, t[14] = s, t[15] = l, t[16] = d, t[17] = m.editingItemId, t[18] = h, t[19] = P, t[20] = F, t[21] = I, t[22] = L, t[23] = ee, t[24] = R) : R = t[24];
3747
+ let z;
3748
+ t[25] !== w || t[26] !== E || t[27] !== m.draftValue || t[28] !== m.selectDraft || t[29] !== S ? (z = w ? /* @__PURE__ */ J(A, {
3745
3749
  css: S.draft,
3746
3750
  asChild: !0,
3747
- children: /* @__PURE__ */ Y("button", {
3751
+ children: /* @__PURE__ */ J("button", {
3748
3752
  type: "button",
3749
3753
  onClick: m.selectDraft,
3750
3754
  "aria-label": "Edit saved draft",
3751
3755
  children: m.draftValue || "Saved draft · select to edit"
3752
3756
  })
3753
- }) : E, t[25] = w, t[26] = E, t[27] = m.draftValue, t[28] = m.selectDraft, t[29] = S, t[30] = B) : B = t[30];
3754
- let V;
3755
- return t[31] !== n || t[32] !== M || t[33] !== N || t[34] !== z || t[35] !== B || t[36] !== D || t[37] !== O || t[38] !== k || t[39] !== j || t[40] !== g ? (V = /* @__PURE__ */ Y(G, {
3757
+ }) : E, t[25] = w, t[26] = E, t[27] = m.draftValue, t[28] = m.selectDraft, t[29] = S, t[30] = z) : z = t[30];
3758
+ let B;
3759
+ return t[31] !== n || t[32] !== M || t[33] !== N || t[34] !== R || t[35] !== z || t[36] !== D || t[37] !== O || t[38] !== k || t[39] !== j || t[40] !== g ? (B = /* @__PURE__ */ J(W, {
3756
3760
  p: "xs",
3757
3761
  gap: "0",
3758
- children: /* @__PURE__ */ X(G, {
3762
+ children: /* @__PURE__ */ Y(W, {
3759
3763
  gap: D,
3760
3764
  p: O,
3761
3765
  borderWidth: k,
@@ -3765,38 +3769,38 @@ var Bo = (e) => {
3765
3769
  children: [
3766
3770
  g,
3767
3771
  n,
3768
- z,
3769
- B
3772
+ R,
3773
+ z
3770
3774
  ]
3771
3775
  })
3772
- }), t[31] = n, t[32] = M, t[33] = N, t[34] = z, t[35] = B, t[36] = D, t[37] = O, t[38] = k, t[39] = j, t[40] = g, t[41] = V) : V = t[41], V;
3773
- }, Vo = (e) => {
3776
+ }), t[31] = n, t[32] = M, t[33] = N, t[34] = R, t[35] = z, t[36] = D, t[37] = O, t[38] = k, t[39] = j, t[40] = g, t[41] = B) : B = t[41], B;
3777
+ }, Fo = (e) => {
3774
3778
  let t = Math.max(0, Math.floor(e));
3775
3779
  if (t < 60) return `${t}s`;
3776
3780
  let n = Math.floor(t / 60);
3777
3781
  return n < 60 ? `${n}m ${String(t % 60).padStart(2, "0")}s` : `${Math.floor(n / 60)}h ${String(n % 60).padStart(2, "0")}m`;
3778
- }, Ho = (e) => {
3779
- let t = J(8), { startedAt: n, hidden: r } = e, i = r !== void 0 && r, [a] = Q(Date.now), [o, s] = Q(Date.now), c, l;
3782
+ }, Io = (e) => {
3783
+ let t = q(8), { startedAt: n, hidden: r } = e, i = r !== void 0 && r, [a] = Q(Date.now), [o, s] = Q(Date.now), c, l;
3780
3784
  if (t[0] === i ? (c = t[1], l = t[2]) : (c = () => {
3781
3785
  if (i) return;
3782
3786
  let e = () => s(Date.now());
3783
3787
  e();
3784
3788
  let t = setInterval(e, 1e3);
3785
3789
  return () => clearInterval(t);
3786
- }, l = [i], t[0] = i, t[1] = c, t[2] = l), Z(c, l), i) return null;
3790
+ }, l = [i], t[0] = i, t[1] = c, t[2] = l), X(c, l), i) return null;
3787
3791
  let u;
3788
- t[3] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ Y(W, {
3792
+ t[3] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ J(U, {
3789
3793
  size: "xs",
3790
3794
  color: "fg.muted"
3791
3795
  }), t[3] = u) : u = t[3];
3792
3796
  let d = (o - (n ?? a)) / 1e3, f;
3793
- t[4] === d ? f = t[5] : (f = Vo(d), t[4] = d, t[5] = f);
3797
+ t[4] === d ? f = t[5] : (f = Fo(d), t[4] = d, t[5] = f);
3794
3798
  let p;
3795
- return t[6] === f ? p = t[7] : (p = /* @__PURE__ */ X(I, {
3799
+ return t[6] === f ? p = t[7] : (p = /* @__PURE__ */ Y(I, {
3796
3800
  gap: "2xs",
3797
3801
  px: "sm",
3798
3802
  py: "xs",
3799
- children: [u, /* @__PURE__ */ Y(K, {
3803
+ children: [u, /* @__PURE__ */ J(G, {
3800
3804
  fontFamily: "mono",
3801
3805
  fontSize: "xs",
3802
3806
  color: "fg.muted",
@@ -3804,44 +3808,44 @@ var Bo = (e) => {
3804
3808
  children: f
3805
3809
  })]
3806
3810
  }), t[6] = f, t[7] = p), p;
3807
- }, Uo = (e) => {
3808
- let t = J(112), { conversationKey: n, linkHandler: r, messages: i, loading: a, streaming: o, streamingStartedAt: s, emptyStateTitle: l, emptyStateDescription: u, emptyStateContent: d, loaderComponent: f, chatInputPlaceholder: p, chatInputDefaultValue: h, onSubmitMessage: g, onInterrupt: _, onAttachFiles: b, onAttachText: x, onChatInputChange: S, actions: C, attachmentActions: w, composerHeader: T, attachedResources: E, onClearAttachments: D, attachmentList: O, approvalPrompt: k, conversationNotices: j, workspaceHub: M, workspaceInitializing: N, inputDisabled: P, submitDisabled: I, chatInputQuestionPrompt: L, composerDecision: R, chatInputAutoFocus: z, queuedFollowUps: B, onQueuedFollowUpUpdate: V, onQueuedFollowUpCreate: H, onQueuedFollowUpRestoreDraft: U, canRestoreQueuedEditToDraft: ee, onQueuedFollowUpSelect: te, onQueuedFollowUpDiscard: ne, onQueuedFollowUpSteer: re, onQueuedFollowUpCombine: W, queueSteeringUnavailableReason: G, unsavedQueueItemIds: ie, onQueuedFollowUpRemove: K, onQueuedFollowUpMove: ae, chatInputCommands: oe } = e, se = a !== void 0 && a, q = o !== void 0 && o, ce = h === void 0 ? "" : h, le = N !== void 0 && N, ue = P !== void 0 && P, de = I !== void 0 && I, pe = z !== void 0 && z, me;
3809
- t[0] === B ? me = t[1] : (me = B === void 0 ? [] : B, t[0] = B, t[1] = me);
3810
- let he = me, ge;
3811
- t[2] === oe ? ge = t[3] : (ge = oe === void 0 ? [] : oe, t[2] = oe, t[3] = ge);
3812
- let _e = ge, Z, ve, ye, be, xe;
3813
- if (t[4] !== n || t[5] !== i || t[6] !== q) {
3814
- let e = Ja(i, { streaming: q });
3815
- Z = e.length > 0, ye = n ?? e[0]?.id, ve = Z ? ye ?? "active-conversation" : null, xe = e.reduce(Wo, 0), be = Xa(e), t[4] = n, t[5] = i, t[6] = q, t[7] = Z, t[8] = ve, t[9] = ye, t[10] = be, t[11] = xe;
3816
- } else Z = t[7], ve = t[8], ye = t[9], be = t[10], xe = t[11];
3817
- let { groups: Se, leadingResponses: Ce } = be, [we, Te] = Q(Go), [Ee, De] = Q(null), Oe = !Z && se, ke;
3818
- t[12] === Symbol.for("react.memo_cache_sentinel") ? (ke = /* @__PURE__ */ Y(ze, {
3811
+ }, Lo = (e) => {
3812
+ let t = q(112), { conversationKey: n, linkHandler: r, messages: i, loading: a, streaming: o, streamingStartedAt: s, emptyStateTitle: l, emptyStateDescription: u, emptyStateContent: d, loaderComponent: f, chatInputPlaceholder: p, chatInputDefaultValue: h, onSubmitMessage: g, onInterrupt: _, onAttachFiles: b, onAttachText: x, onChatInputChange: S, actions: C, attachmentActions: w, composerHeader: T, attachedResources: E, onClearAttachments: D, attachmentList: O, approvalPrompt: k, conversationNotices: j, workspaceHub: M, workspaceInitializing: N, inputDisabled: P, submitDisabled: I, chatInputQuestionPrompt: L, composerDecision: ee, chatInputAutoFocus: R, queuedFollowUps: z, onQueuedFollowUpUpdate: B, onQueuedFollowUpCreate: te, onQueuedFollowUpRestoreDraft: V, canRestoreQueuedEditToDraft: ne, onQueuedFollowUpSelect: re, onQueuedFollowUpDiscard: ie, onQueuedFollowUpSteer: H, onQueuedFollowUpCombine: U, queueSteeringUnavailableReason: W, unsavedQueueItemIds: ae, onQueuedFollowUpRemove: G, onQueuedFollowUpMove: oe, chatInputCommands: se } = e, ce = a !== void 0 && a, K = o !== void 0 && o, le = h === void 0 ? "" : h, ue = N !== void 0 && N, de = P !== void 0 && P, fe = I !== void 0 && I, me = R !== void 0 && R, he;
3813
+ t[0] === z ? he = t[1] : (he = z === void 0 ? [] : z, t[0] = z, t[1] = he);
3814
+ let ge = he, _e;
3815
+ t[2] === se ? _e = t[3] : (_e = se === void 0 ? [] : se, t[2] = se, t[3] = _e);
3816
+ let ve = _e, X, ye, Z, be, xe;
3817
+ if (t[4] !== n || t[5] !== i || t[6] !== K) {
3818
+ let e = Ja(i, { streaming: K });
3819
+ X = e.length > 0, Z = n ?? e[0]?.id, ye = X ? Z ?? "active-conversation" : null, xe = e.reduce(Ro, 0), be = Xa(e), t[4] = n, t[5] = i, t[6] = K, t[7] = X, t[8] = ye, t[9] = Z, t[10] = be, t[11] = xe;
3820
+ } else X = t[7], ye = t[8], Z = t[9], be = t[10], xe = t[11];
3821
+ let { groups: Se, leadingResponses: Ce } = be, [we, Te] = Q(zo), [Ee, De] = Q(null), Oe = !X && ce, ke;
3822
+ t[12] === Symbol.for("react.memo_cache_sentinel") ? (ke = /* @__PURE__ */ J(ze, {
3819
3823
  size: 48,
3820
3824
  strokeWidth: 1.5
3821
3825
  }), t[12] = ke) : ke = t[12];
3822
3826
  let Ae;
3823
- t[13] !== u || t[14] !== l ? (Ae = /* @__PURE__ */ Y(c, {
3827
+ t[13] !== u || t[14] !== l ? (Ae = /* @__PURE__ */ J(c, {
3824
3828
  icon: ke,
3825
3829
  title: l,
3826
3830
  description: u
3827
3831
  }), t[13] = u, t[14] = l, t[15] = Ae) : Ae = t[15];
3828
3832
  let je = Oe ? f : d ?? Ae, Me = !!M, Ne = bn(i, n ?? i[0]?.id), Pe;
3829
3833
  t[16] !== L || t[17] !== i || t[18] !== Ne.prompt ? (Pe = Ne.prompt ?? L ?? gn(i), t[16] = L, t[17] = i, t[18] = Ne.prompt, t[19] = Pe) : Pe = t[19];
3830
- let Fe = Pe, Ie = !!Fe, Le = q && Z && !le && !Fe, Re = !ve || Ee === ve, Be;
3831
- t[20] !== ee || t[21] !== ce || t[22] !== ue || t[23] !== S || t[24] !== H || t[25] !== ne || t[26] !== U || t[27] !== te || t[28] !== V || t[29] !== g || t[30] !== he ? (Be = {
3832
- queuedFollowUps: he,
3833
- defaultValue: ce,
3834
+ let Fe = Pe, Ie = !!Fe, Le = K && X && !ue && !Fe, Re = !ye || Ee === ye, Be;
3835
+ t[20] !== ne || t[21] !== le || t[22] !== de || t[23] !== S || t[24] !== te || t[25] !== ie || t[26] !== V || t[27] !== re || t[28] !== B || t[29] !== g || t[30] !== ge ? (Be = {
3836
+ queuedFollowUps: ge,
3837
+ defaultValue: le,
3834
3838
  onChange: S,
3835
3839
  onSubmit: g,
3836
- onUpdate: V,
3837
- onCreate: H,
3838
- onRestoreDraft: U,
3839
- canRestoreDraft: ee,
3840
- disabled: ue,
3841
- onSelect: te,
3842
- onDiscard: ne
3843
- }, t[20] = ee, t[21] = ce, t[22] = ue, t[23] = S, t[24] = H, t[25] = ne, t[26] = U, t[27] = te, t[28] = V, t[29] = g, t[30] = he, t[31] = Be) : Be = t[31];
3844
- let Ve = Oo(Be), He;
3840
+ onUpdate: B,
3841
+ onCreate: te,
3842
+ onRestoreDraft: V,
3843
+ canRestoreDraft: ne,
3844
+ disabled: de,
3845
+ onSelect: re,
3846
+ onDiscard: ie
3847
+ }, t[20] = ne, t[21] = le, t[22] = de, t[23] = S, t[24] = te, t[25] = ie, t[26] = V, t[27] = re, t[28] = B, t[29] = g, t[30] = ge, t[31] = Be) : Be = t[31];
3848
+ let Ve = So(Be), He;
3845
3849
  t[32] === Symbol.for("react.memo_cache_sentinel") ? (He = (e) => {
3846
3850
  Te((t) => {
3847
3851
  let n = new Set(t);
@@ -3850,43 +3854,43 @@ var Bo = (e) => {
3850
3854
  }, t[32] = He) : He = t[32];
3851
3855
  let Ue = He, We;
3852
3856
  t[33] !== r || t[34] !== i ? (We = y(i, r), t[33] = r, t[34] = i, t[35] = We) : We = t[35];
3853
- let Ge = Ne.value, Ke = ye ?? null, qe;
3854
- t[36] !== Ke || t[37] !== xe ? (qe = /* @__PURE__ */ Y(bt, {
3857
+ let Ge = Ne.value, Ke = Z ?? null, qe;
3858
+ t[36] !== Ke || t[37] !== xe ? (qe = /* @__PURE__ */ J(bt, {
3855
3859
  conversationKey: Ke,
3856
3860
  userMessageCount: xe
3857
3861
  }), t[36] = Ke, t[37] = xe, t[38] = qe) : qe = t[38];
3858
3862
  let Je = Re ? "visible" : "hidden", Ye;
3859
- t[39] !== j || t[40] !== je || t[41] !== we || t[42] !== Se || t[43] !== Z || t[44] !== Ie || t[45] !== Ce || t[46] !== ve || t[47] !== q ? (Ye = Z ? /* @__PURE__ */ X(fe, { children: [/* @__PURE__ */ Y(Do, {
3863
+ t[39] !== j || t[40] !== je || t[41] !== we || t[42] !== Se || t[43] !== X || t[44] !== Ie || t[45] !== Ce || t[46] !== ye || t[47] !== K ? (Ye = X ? /* @__PURE__ */ Y(pe, { children: [/* @__PURE__ */ J(xo, {
3860
3864
  leadingResponses: Ce,
3861
3865
  groups: Se,
3862
- streaming: q,
3866
+ streaming: K,
3863
3867
  hideActiveQuestionForms: Ie,
3864
3868
  expandedStickyMessageIds: we,
3865
3869
  onToggleStickyMessage: Ue,
3866
- onReady: () => De(ve)
3867
- }, ve), j] }) : /* @__PURE__ */ X(fe, { children: [j, je] }), t[39] = j, t[40] = je, t[41] = we, t[42] = Se, t[43] = Z, t[44] = Ie, t[45] = Ce, t[46] = ve, t[47] = q, t[48] = Ye) : Ye = t[48];
3870
+ onReady: () => De(ye)
3871
+ }, ye), j] }) : /* @__PURE__ */ Y(pe, { children: [j, je] }), t[39] = j, t[40] = je, t[41] = we, t[42] = Se, t[43] = X, t[44] = Ie, t[45] = Ce, t[46] = ye, t[47] = K, t[48] = Ye) : Ye = t[48];
3868
3872
  let Xe;
3869
- t[49] !== Je || t[50] !== Ye ? (Xe = /* @__PURE__ */ Y(st.Viewport, {
3873
+ t[49] !== Je || t[50] !== Ye ? (Xe = /* @__PURE__ */ J(st.Viewport, {
3870
3874
  visibility: Je,
3871
3875
  children: Ye
3872
3876
  }), t[49] = Je, t[50] = Ye, t[51] = Xe) : Xe = t[51];
3873
3877
  let Ze;
3874
- t[52] === Re ? Ze = t[53] : (Ze = Re ? /* @__PURE__ */ Y(st.ScrollToBottom, { "aria-label": "Scroll to latest message" }) : null, t[52] = Re, t[53] = Ze);
3878
+ t[52] === Re ? Ze = t[53] : (Ze = Re ? /* @__PURE__ */ J(st.ScrollToBottom, { "aria-label": "Scroll to latest message" }) : null, t[52] = Re, t[53] = Ze);
3875
3879
  let Qe;
3876
- t[54] !== qe || t[55] !== Xe || t[56] !== Ze ? (Qe = /* @__PURE__ */ X(st.Root, { children: [
3880
+ t[54] !== qe || t[55] !== Xe || t[56] !== Ze ? (Qe = /* @__PURE__ */ Y(st.Root, { children: [
3877
3881
  qe,
3878
3882
  Xe,
3879
3883
  Ze
3880
3884
  ] }), t[54] = qe, t[55] = Xe, t[56] = Ze, t[57] = Qe) : Qe = t[57];
3881
3885
  let $e;
3882
- t[58] !== ye || t[59] !== Le || t[60] !== q || t[61] !== s ? ($e = q ? /* @__PURE__ */ Y(Ho, {
3886
+ t[58] !== Z || t[59] !== Le || t[60] !== K || t[61] !== s ? ($e = K ? /* @__PURE__ */ J(Io, {
3883
3887
  startedAt: s,
3884
3888
  hidden: !Le
3885
- }, ye) : null, t[58] = ye, t[59] = Le, t[60] = q, t[61] = s, t[62] = $e) : $e = t[62];
3889
+ }, Z) : null, t[58] = Z, t[59] = Le, t[60] = K, t[61] = s, t[62] = $e) : $e = t[62];
3886
3890
  let et = n ?? i[0]?.id, tt;
3887
3891
  t[63] === i ? tt = t[64] : (tt = Bn(i), t[63] = i, t[64] = tt);
3888
- let nt = Ne.prompt ? void 0 : R, rt;
3889
- t[65] !== C || t[66] !== Fe || t[67] !== E || t[68] !== w || t[69] !== O || t[70] !== pe || t[71] !== _e || t[72] !== p || t[73] !== T || t[74] !== Me || t[75] !== ue || t[76] !== b || t[77] !== x || t[78] !== D || t[79] !== _ || t[80] !== W || t[81] !== ae || t[82] !== K || t[83] !== re || t[84] !== V || t[85] !== G || t[86] !== Ve || t[87] !== he || t[88] !== q || t[89] !== de || t[90] !== et || t[91] !== tt || t[92] !== nt || t[93] !== ie || t[94] !== M ? (rt = /* @__PURE__ */ Y(Bo, {
3892
+ let nt = Ne.prompt ? void 0 : ee, rt;
3893
+ t[65] !== C || t[66] !== Fe || t[67] !== E || t[68] !== w || t[69] !== O || t[70] !== me || t[71] !== ve || t[72] !== p || t[73] !== T || t[74] !== Me || t[75] !== de || t[76] !== b || t[77] !== x || t[78] !== D || t[79] !== _ || t[80] !== U || t[81] !== oe || t[82] !== G || t[83] !== H || t[84] !== B || t[85] !== W || t[86] !== Ve || t[87] !== ge || t[88] !== K || t[89] !== fe || t[90] !== et || t[91] !== tt || t[92] !== nt || t[93] !== ae || t[94] !== M ? (rt = /* @__PURE__ */ J(Po, {
3890
3894
  conversationKey: et,
3891
3895
  recentUserMessages: tt,
3892
3896
  actions: C,
@@ -3894,32 +3898,32 @@ var Bo = (e) => {
3894
3898
  composerHeader: T,
3895
3899
  attachedResources: E,
3896
3900
  attachmentList: O,
3897
- chatInputAutoFocus: pe,
3901
+ chatInputAutoFocus: me,
3898
3902
  chatInputPlaceholder: p,
3899
3903
  chatInputQuestionPrompt: Fe,
3900
3904
  composerDecision: nt,
3901
- chatInputCommands: _e,
3905
+ chatInputCommands: ve,
3902
3906
  hasWorkspaceHub: Me,
3903
- inputDisabled: ue,
3904
- submitDisabled: de,
3907
+ inputDisabled: de,
3908
+ submitDisabled: fe,
3905
3909
  onAttachFiles: b,
3906
3910
  onAttachText: x,
3907
3911
  onClearAttachments: D,
3908
3912
  onInterrupt: _,
3909
- onQueuedFollowUpMove: ae,
3910
- onQueuedFollowUpRemove: K,
3911
- onQueuedFollowUpUpdate: V,
3912
- onQueuedFollowUpSteer: re,
3913
- onQueuedFollowUpCombine: W,
3914
- queueSteeringUnavailableReason: G,
3915
- unsavedQueueItemIds: ie,
3913
+ onQueuedFollowUpMove: oe,
3914
+ onQueuedFollowUpRemove: G,
3915
+ onQueuedFollowUpUpdate: B,
3916
+ onQueuedFollowUpSteer: H,
3917
+ onQueuedFollowUpCombine: U,
3918
+ queueSteeringUnavailableReason: W,
3919
+ unsavedQueueItemIds: ae,
3916
3920
  queuedComposer: Ve,
3917
- queuedFollowUps: he,
3918
- streaming: q,
3921
+ queuedFollowUps: ge,
3922
+ streaming: K,
3919
3923
  workspaceHub: M
3920
- }), t[65] = C, t[66] = Fe, t[67] = E, t[68] = w, t[69] = O, t[70] = pe, t[71] = _e, t[72] = p, t[73] = T, t[74] = Me, t[75] = ue, t[76] = b, t[77] = x, t[78] = D, t[79] = _, t[80] = W, t[81] = ae, t[82] = K, t[83] = re, t[84] = V, t[85] = G, t[86] = Ve, t[87] = he, t[88] = q, t[89] = de, t[90] = et, t[91] = tt, t[92] = nt, t[93] = ie, t[94] = M, t[95] = rt) : rt = t[95];
3924
+ }), t[65] = C, t[66] = Fe, t[67] = E, t[68] = w, t[69] = O, t[70] = me, t[71] = ve, t[72] = p, t[73] = T, t[74] = Me, t[75] = de, t[76] = b, t[77] = x, t[78] = D, t[79] = _, t[80] = U, t[81] = oe, t[82] = G, t[83] = H, t[84] = B, t[85] = W, t[86] = Ve, t[87] = ge, t[88] = K, t[89] = fe, t[90] = et, t[91] = tt, t[92] = nt, t[93] = ae, t[94] = M, t[95] = rt) : rt = t[95];
3921
3925
  let it;
3922
- t[96] !== k || t[97] !== $e || t[98] !== rt ? (it = /* @__PURE__ */ X(A, {
3926
+ t[96] !== k || t[97] !== $e || t[98] !== rt ? (it = /* @__PURE__ */ Y(A, {
3923
3927
  layerStyle: "chatContent",
3924
3928
  flexShrink: "0",
3925
3929
  children: [
@@ -3929,7 +3933,7 @@ var Bo = (e) => {
3929
3933
  ]
3930
3934
  }), t[96] = k, t[97] = $e, t[98] = rt, t[99] = it) : it = t[99];
3931
3935
  let at;
3932
- t[100] !== Qe || t[101] !== it ? (at = /* @__PURE__ */ X(F, {
3936
+ t[100] !== Qe || t[101] !== it ? (at = /* @__PURE__ */ Y(F, {
3933
3937
  position: "relative",
3934
3938
  direction: "column",
3935
3939
  w: "full",
@@ -3938,57 +3942,57 @@ var Bo = (e) => {
3938
3942
  children: [Qe, it]
3939
3943
  }), t[100] = Qe, t[101] = it, t[102] = at) : at = t[102];
3940
3944
  let ot;
3941
- t[103] !== Ne.value || t[104] !== at ? (ot = /* @__PURE__ */ Y(vn, {
3945
+ t[103] !== Ne.value || t[104] !== at ? (ot = /* @__PURE__ */ J(vn, {
3942
3946
  value: Ge,
3943
3947
  children: at
3944
3948
  }), t[103] = Ne.value, t[104] = at, t[105] = ot) : ot = t[105];
3945
3949
  let ct;
3946
- t[106] !== r || t[107] !== ot ? (ct = /* @__PURE__ */ Y(m, {
3950
+ t[106] !== r || t[107] !== ot ? (ct = /* @__PURE__ */ J(m, {
3947
3951
  handler: r,
3948
3952
  children: ot
3949
3953
  }), t[106] = r, t[107] = ot, t[108] = ct) : ct = t[108];
3950
3954
  let lt;
3951
- return t[109] !== We || t[110] !== ct ? (lt = /* @__PURE__ */ Y(v, {
3955
+ return t[109] !== We || t[110] !== ct ? (lt = /* @__PURE__ */ J(v, {
3952
3956
  value: We,
3953
3957
  children: ct
3954
3958
  }), t[109] = We, t[110] = ct, t[111] = lt) : lt = t[111], lt;
3955
3959
  };
3956
- function Wo(e, t) {
3960
+ function Ro(e, t) {
3957
3961
  return e + +(t.role === "user");
3958
3962
  }
3959
- function Go() {
3963
+ function zo() {
3960
3964
  return /* @__PURE__ */ new Set();
3961
3965
  }
3962
3966
  //#endregion
3963
3967
  //#region src/components/chat-ui/components/chat-skeleton.tsx
3964
- var Ko = (e) => {
3965
- let t = J(4), { widths: n } = e, r;
3966
- t[0] === n ? r = t[1] : (r = n.map(Jo), t[0] = n, t[1] = r);
3968
+ var Bo = (e) => {
3969
+ let t = q(4), { widths: n } = e, r;
3970
+ t[0] === n ? r = t[1] : (r = n.map(Ho), t[0] = n, t[1] = r);
3967
3971
  let i;
3968
- return t[2] === r ? i = t[3] : (i = /* @__PURE__ */ Y(G, {
3972
+ return t[2] === r ? i = t[3] : (i = /* @__PURE__ */ J(W, {
3969
3973
  gap: "xs",
3970
3974
  w: "full",
3971
3975
  children: r
3972
3976
  }), t[2] = r, t[3] = i), i;
3973
- }, qo = () => {
3974
- let e = J(2), t;
3975
- e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ Y(dt.Root, {
3977
+ }, Vo = () => {
3978
+ let e = q(2), t;
3979
+ e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ J(dt.Root, {
3976
3980
  from: "user",
3977
- children: /* @__PURE__ */ Y(dt.Content, {
3981
+ children: /* @__PURE__ */ J(dt.Content, {
3978
3982
  from: "user",
3979
- children: /* @__PURE__ */ Y(Ko, { widths: ["72%", "46%"] })
3983
+ children: /* @__PURE__ */ J(Bo, { widths: ["72%", "46%"] })
3980
3984
  })
3981
3985
  }), e[0] = t) : t = e[0];
3982
3986
  let n;
3983
- return e[1] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ X(G, {
3987
+ return e[1] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ Y(W, {
3984
3988
  minH: "full",
3985
3989
  py: "xs",
3986
3990
  gap: "0",
3987
- children: [t, /* @__PURE__ */ Y(dt.Root, {
3991
+ children: [t, /* @__PURE__ */ J(dt.Root, {
3988
3992
  from: "assistant",
3989
- children: /* @__PURE__ */ Y(dt.Content, {
3993
+ children: /* @__PURE__ */ J(dt.Content, {
3990
3994
  from: "assistant",
3991
- children: /* @__PURE__ */ Y(Ko, { widths: [
3995
+ children: /* @__PURE__ */ J(Bo, { widths: [
3992
3996
  "76%",
3993
3997
  "62%",
3994
3998
  "40%"
@@ -3997,8 +4001,8 @@ var Ko = (e) => {
3997
4001
  })]
3998
4002
  }), e[1] = n) : n = e[1], n;
3999
4003
  };
4000
- function Jo(e, t) {
4001
- return /* @__PURE__ */ Y(ne, {
4004
+ function Ho(e, t) {
4005
+ return /* @__PURE__ */ J(ie, {
4002
4006
  height: "3",
4003
4007
  width: e,
4004
4008
  borderRadius: "xs"
@@ -4006,31 +4010,31 @@ function Jo(e, t) {
4006
4010
  }
4007
4011
  //#endregion
4008
4012
  //#region src/components/chat-ui/components/conversation-browse.tsx
4009
- var Yo = 3, Xo = 10, Zo = 4, Qo = (e, t) => {
4013
+ var Uo = 3, Wo = 10, Go = 4, Ko = (e, t) => {
4010
4014
  if (t === null) return 0;
4011
4015
  let n = Math.abs(e - t);
4012
- return n >= Zo ? 0 : (1 + Math.cos(Math.PI * n / Zo)) / 2;
4013
- }, $o = (e, t) => {
4016
+ return n >= Go ? 0 : (1 + Math.cos(Math.PI * n / Go)) / 2;
4017
+ }, qo = (e, t) => {
4014
4018
  if (t === null) return "fg.subtle";
4015
4019
  let n = Math.abs(e - t);
4016
- return n < .5 ? "fg" : n < Zo ? "fg.muted" : "fg.subtle";
4017
- }, es = (e) => {
4018
- let t = J(11), { item: n, position: r } = e, i = `${r.left}px`, a = `${r.top}px`, o;
4019
- t[0] === n.message ? o = t[1] : (o = /* @__PURE__ */ Y(K, {
4020
+ return n < .5 ? "fg" : n < Go ? "fg.muted" : "fg.subtle";
4021
+ }, Jo = (e) => {
4022
+ let t = q(11), { item: n, position: r } = e, i = `${r.left}px`, a = `${r.top}px`, o;
4023
+ t[0] === n.message ? o = t[1] : (o = /* @__PURE__ */ J(G, {
4020
4024
  textStyle: "label/S/medium",
4021
4025
  color: "fg",
4022
4026
  lineClamp: 2,
4023
4027
  children: n.message
4024
4028
  }), t[0] = n.message, t[1] = o);
4025
4029
  let s;
4026
- t[2] === n.reply ? s = t[3] : (s = n.reply ? /* @__PURE__ */ Y(K, {
4030
+ t[2] === n.reply ? s = t[3] : (s = n.reply ? /* @__PURE__ */ J(G, {
4027
4031
  textStyle: "label/XS/regular",
4028
4032
  color: "fg.muted",
4029
4033
  lineClamp: 2,
4030
4034
  children: n.reply
4031
4035
  }) : null, t[2] = n.reply, t[3] = s);
4032
4036
  let c;
4033
- t[4] !== o || t[5] !== s ? (c = /* @__PURE__ */ X(G, {
4037
+ t[4] !== o || t[5] !== s ? (c = /* @__PURE__ */ Y(W, {
4034
4038
  gap: "1.5",
4035
4039
  p: "3",
4036
4040
  bg: "bg.elevated",
@@ -4040,7 +4044,7 @@ var Yo = 3, Xo = 10, Zo = 4, Qo = (e, t) => {
4040
4044
  children: [o, s]
4041
4045
  }), t[4] = o, t[5] = s, t[6] = c) : c = t[6];
4042
4046
  let l;
4043
- return t[7] !== i || t[8] !== a || t[9] !== c ? (l = /* @__PURE__ */ Y(te, { children: /* @__PURE__ */ Y(A, {
4047
+ return t[7] !== i || t[8] !== a || t[9] !== c ? (l = /* @__PURE__ */ J(re, { children: /* @__PURE__ */ J(A, {
4044
4048
  position: "fixed",
4045
4049
  left: i,
4046
4050
  ml: "2xs",
@@ -4052,9 +4056,9 @@ var Yo = 3, Xo = 10, Zo = 4, Qo = (e, t) => {
4052
4056
  pointerEvents: "none",
4053
4057
  children: c
4054
4058
  }) }), t[7] = i, t[8] = a, t[9] = c, t[10] = l) : l = t[10], l;
4055
- }, ts = (e) => {
4056
- let t = J(22), { items: n, onSelect: r, floating: i } = e, a = i !== void 0 && i, [o, s] = Q(null), [c, l] = Q(null);
4057
- if (n.length < Yo) return null;
4059
+ }, Yo = (e) => {
4060
+ let t = q(22), { items: n, onSelect: r, floating: i } = e, a = i !== void 0 && i, [o, s] = Q(null), [c, l] = Q(null);
4061
+ if (n.length < Uo) return null;
4058
4062
  let u;
4059
4063
  t[0] === n.length ? u = t[1] : (u = (e) => {
4060
4064
  let t = e.currentTarget.getBoundingClientRect(), r = (e.clientY - t.top) / t.height, i = Math.min(n.length - 1, Math.max(0, r * n.length - .5)), a = Math.round(i);
@@ -4076,11 +4080,11 @@ var Yo = 3, Xo = 10, Zo = 4, Qo = (e, t) => {
4076
4080
  let g;
4077
4081
  if (t[5] !== n || t[6] !== r || t[7] !== o) {
4078
4082
  let e;
4079
- t[9] !== r || t[10] !== o ? (e = (e, t) => /* @__PURE__ */ Y(q.button, {
4083
+ t[9] !== r || t[10] !== o ? (e = (e, t) => /* @__PURE__ */ J(K.button, {
4080
4084
  type: "button",
4081
4085
  h: "2px",
4082
- w: `${Xo + 16 * Qo(t, o)}px`,
4083
- bg: $o(t, o),
4086
+ w: `${Wo + 16 * Ko(t, o)}px`,
4087
+ bg: qo(t, o),
4084
4088
  borderRadius: "1px",
4085
4089
  transition: "width 80ms linear, background-color 80ms linear",
4086
4090
  "aria-label": `Jump to message ${t + 1}`,
@@ -4088,7 +4092,7 @@ var Yo = 3, Xo = 10, Zo = 4, Qo = (e, t) => {
4088
4092
  }, e.id), t[9] = r, t[10] = o, t[11] = e) : e = t[11], g = n.map(e), t[5] = n, t[6] = r, t[7] = o, t[8] = g;
4089
4093
  } else g = t[8];
4090
4094
  let _;
4091
- t[12] !== d || t[13] !== h || t[14] !== g ? (_ = /* @__PURE__ */ Y(F, {
4095
+ t[12] !== d || t[13] !== h || t[14] !== g ? (_ = /* @__PURE__ */ J(F, {
4092
4096
  direction: "column",
4093
4097
  align: "flex-start",
4094
4098
  gap: "1.5",
@@ -4101,24 +4105,24 @@ var Yo = 3, Xo = 10, Zo = 4, Qo = (e, t) => {
4101
4105
  children: g
4102
4106
  }), t[12] = d, t[13] = h, t[14] = g, t[15] = _) : _ = t[15];
4103
4107
  let v;
4104
- t[16] !== p || t[17] !== c ? (v = p && c ? /* @__PURE__ */ Y(es, {
4108
+ t[16] !== p || t[17] !== c ? (v = p && c ? /* @__PURE__ */ J(Jo, {
4105
4109
  item: p,
4106
4110
  position: c
4107
4111
  }) : null, t[16] = p, t[17] = c, t[18] = v) : v = t[18];
4108
4112
  let y;
4109
- return t[19] !== _ || t[20] !== v ? (y = /* @__PURE__ */ X(A, {
4113
+ return t[19] !== _ || t[20] !== v ? (y = /* @__PURE__ */ Y(A, {
4110
4114
  position: "relative",
4111
4115
  w: "10",
4112
4116
  flexShrink: 0,
4113
4117
  children: [_, v]
4114
4118
  }), t[19] = _, t[20] = v, t[21] = y) : y = t[21], y;
4115
- }, ns = (e) => {
4116
- let n = J(17), { tag: r } = e, i;
4117
- n[0] !== r.description || n[1] !== r.label ? (i = /* @__PURE__ */ Y(U.Trigger, {
4119
+ }, Xo = (e) => {
4120
+ let n = q(17), { tag: r } = e, i;
4121
+ n[0] !== r.description || n[1] !== r.label ? (i = /* @__PURE__ */ J(V.Trigger, {
4118
4122
  asChild: !0,
4119
- children: /* @__PURE__ */ Y(ie.Label, {
4123
+ children: /* @__PURE__ */ J(ae.Label, {
4120
4124
  asChild: !0,
4121
- children: /* @__PURE__ */ Y("button", {
4125
+ children: /* @__PURE__ */ J("button", {
4122
4126
  type: "button",
4123
4127
  "aria-label": r.description,
4124
4128
  children: r.label
@@ -4126,36 +4130,36 @@ var Yo = 3, Xo = 10, Zo = 4, Qo = (e, t) => {
4126
4130
  })
4127
4131
  }), n[0] = r.description, n[1] = r.label, n[2] = i) : i = n[2];
4128
4132
  let a = r.closeLabel ?? `Remove ${r.label}`, o;
4129
- n[3] !== a || n[4] !== r.onClose ? (o = /* @__PURE__ */ Y(ie.CloseTrigger, {
4133
+ n[3] !== a || n[4] !== r.onClose ? (o = /* @__PURE__ */ J(ae.CloseTrigger, {
4130
4134
  "aria-label": a,
4131
4135
  onClick: r.onClose
4132
4136
  }), n[3] = a, n[4] = r.onClose, n[5] = o) : o = n[5];
4133
4137
  let s;
4134
- n[6] !== i || n[7] !== o ? (s = /* @__PURE__ */ X(ie.Root, {
4138
+ n[6] !== i || n[7] !== o ? (s = /* @__PURE__ */ Y(ae.Root, {
4135
4139
  variant: "ticket",
4136
4140
  size: "composer",
4137
4141
  children: [i, o]
4138
4142
  }), n[6] = i, n[7] = o, n[8] = s) : s = n[8];
4139
4143
  let c;
4140
- n[9] !== s || n[10] !== r.description ? (c = /* @__PURE__ */ Y(t, {
4144
+ n[9] !== s || n[10] !== r.description ? (c = /* @__PURE__ */ J(t, {
4141
4145
  content: r.description,
4142
4146
  openDelay: 300,
4143
4147
  closeDelay: 150,
4144
4148
  children: s
4145
4149
  }), n[9] = s, n[10] = r.description, n[11] = c) : c = n[11];
4146
4150
  let l;
4147
- n[12] === r.description ? l = n[13] : (l = /* @__PURE__ */ Y(te, { children: /* @__PURE__ */ Y(U.Positioner, { children: /* @__PURE__ */ Y(U.Content, { children: /* @__PURE__ */ Y(K, {
4151
+ n[12] === r.description ? l = n[13] : (l = /* @__PURE__ */ J(re, { children: /* @__PURE__ */ J(V.Positioner, { children: /* @__PURE__ */ J(V.Content, { children: /* @__PURE__ */ J(G, {
4148
4152
  p: "sm",
4149
4153
  textStyle: "label/S/regular",
4150
4154
  overflowWrap: "anywhere",
4151
4155
  children: r.description
4152
4156
  }) }) }) }), n[12] = r.description, n[13] = l);
4153
4157
  let u;
4154
- return n[14] !== c || n[15] !== l ? (u = /* @__PURE__ */ X(U.Root, { children: [c, l] }), n[14] = c, n[15] = l, n[16] = u) : u = n[16], u;
4155
- }, rs = (e) => {
4156
- let n = J(64), { mode: r, pending: a, unavailable: o, onRequestConfirmation: s, onAction: c } = e, u;
4158
+ return n[14] !== c || n[15] !== l ? (u = /* @__PURE__ */ Y(V.Root, { children: [c, l] }), n[14] = c, n[15] = l, n[16] = u) : u = n[16], u;
4159
+ }, Zo = (e) => {
4160
+ let n = q(64), { mode: r, pending: a, unavailable: o, onRequestConfirmation: s, onAction: c } = e, u;
4157
4161
  n[0] === Symbol.for("react.memo_cache_sentinel") ? (u = { key: "menu" }, n[0] = u) : u = n[0];
4158
- let d = de(u), f;
4162
+ let d = fe(u), f;
4159
4163
  n[1] === d ? f = n[2] : (f = d(), n[1] = d, n[2] = f);
4160
4164
  let p = f, [m, h] = Q(null), [g, _] = Q(""), [v, y] = Q(!1), b;
4161
4165
  if (n[3] !== r.actions || n[4] !== r.closeActionId) {
@@ -4178,18 +4182,18 @@ var Yo = 3, Xo = 10, Zo = 4, Qo = (e, t) => {
4178
4182
  y(e.open), e.open || h(null);
4179
4183
  }, n[11] = T, n[12] = E) : (T = n[11], E = n[12]);
4180
4184
  let D = `${r.label}: ${r.description} · ${w}`, O;
4181
- n[13] !== r.indicator || n[14] !== o ? (O = r.indicator ? /* @__PURE__ */ Y(ie.StartElement, { children: /* @__PURE__ */ Y(q.span, {
4185
+ n[13] !== r.indicator || n[14] !== o ? (O = r.indicator ? /* @__PURE__ */ J(ae.StartElement, { children: /* @__PURE__ */ J(K.span, {
4182
4186
  role: "img",
4183
4187
  "aria-label": o ? "Status unavailable" : r.indicator.label,
4184
4188
  "data-status-dot": "",
4185
4189
  "data-tone": o ? "neutral" : r.indicator.tone
4186
4190
  }) }) : null, n[13] = r.indicator, n[14] = o, n[15] = O) : O = n[15];
4187
4191
  let k = `${r.label} details`, A;
4188
- n[16] !== r.label || n[17] !== k ? (A = /* @__PURE__ */ Y(ee.Trigger, {
4192
+ n[16] !== r.label || n[17] !== k ? (A = /* @__PURE__ */ J(ne.Trigger, {
4189
4193
  asChild: !0,
4190
- children: /* @__PURE__ */ Y(ie.Label, {
4194
+ children: /* @__PURE__ */ J(ae.Label, {
4191
4195
  asChild: !0,
4192
- children: /* @__PURE__ */ Y("button", {
4196
+ children: /* @__PURE__ */ J("button", {
4193
4197
  type: "button",
4194
4198
  "aria-label": k,
4195
4199
  children: r.label
@@ -4197,13 +4201,13 @@ var Yo = 3, Xo = 10, Zo = 4, Qo = (e, t) => {
4197
4201
  })
4198
4202
  }), n[16] = r.label, n[17] = k, n[18] = A) : A = n[18];
4199
4203
  let M;
4200
- n[19] !== x || n[20] !== C || n[21] !== a || n[22] !== o ? (M = x ? /* @__PURE__ */ Y(ie.CloseTrigger, {
4204
+ n[19] !== x || n[20] !== C || n[21] !== a || n[22] !== o ? (M = x ? /* @__PURE__ */ J(ae.CloseTrigger, {
4201
4205
  "aria-label": x.label,
4202
4206
  disabled: a || o,
4203
4207
  onClick: () => void C(x)
4204
4208
  }) : null, n[19] = x, n[20] = C, n[21] = a, n[22] = o, n[23] = M) : M = n[23];
4205
4209
  let N;
4206
- n[24] !== A || n[25] !== M || n[26] !== O ? (N = /* @__PURE__ */ X(ie.Root, {
4210
+ n[24] !== A || n[25] !== M || n[26] !== O ? (N = /* @__PURE__ */ Y(ae.Root, {
4207
4211
  variant: "ticket",
4208
4212
  size: "composer",
4209
4213
  children: [
@@ -4213,68 +4217,68 @@ var Yo = 3, Xo = 10, Zo = 4, Qo = (e, t) => {
4213
4217
  ]
4214
4218
  }), n[24] = A, n[25] = M, n[26] = O, n[27] = N) : N = n[27];
4215
4219
  let F;
4216
- n[28] !== N || n[29] !== D ? (F = /* @__PURE__ */ Y(t, {
4220
+ n[28] !== N || n[29] !== D ? (F = /* @__PURE__ */ J(t, {
4217
4221
  content: D,
4218
4222
  openDelay: 300,
4219
4223
  closeDelay: 150,
4220
4224
  children: N
4221
4225
  }), n[28] = N, n[29] = D, n[30] = F) : F = n[30];
4222
- let R = `${r.label} details`, z;
4223
- n[31] === r.label ? z = n[32] : (z = /* @__PURE__ */ Y(K, {
4226
+ let ee = `${r.label} details`, R;
4227
+ n[31] === r.label ? R = n[32] : (R = /* @__PURE__ */ J(G, {
4224
4228
  textStyle: "label/S/medium",
4225
4229
  children: r.label
4226
- }), n[31] = r.label, n[32] = z);
4227
- let V;
4228
- n[33] === r.description ? V = n[34] : (V = /* @__PURE__ */ Y(K, {
4230
+ }), n[31] = r.label, n[32] = R);
4231
+ let B;
4232
+ n[33] === r.description ? B = n[34] : (B = /* @__PURE__ */ J(G, {
4229
4233
  textStyle: "label/S/regular",
4230
4234
  overflowWrap: "anywhere",
4231
4235
  children: r.description
4232
- }), n[33] = r.description, n[34] = V);
4233
- let H;
4234
- n[35] === w ? H = n[36] : (H = /* @__PURE__ */ Y(K, {
4236
+ }), n[33] = r.description, n[34] = B);
4237
+ let te;
4238
+ n[35] === w ? te = n[36] : (te = /* @__PURE__ */ J(G, {
4235
4239
  textStyle: "label/XS/regular",
4236
4240
  color: "fg.muted",
4237
4241
  children: w
4238
- }), n[35] = w, n[36] = H);
4239
- let U;
4240
- n[37] !== g || n[38] !== m || n[39] !== C || n[40] !== a || n[41] !== o ? (U = m?.action.argument ? /* @__PURE__ */ X(P.Root, { children: [
4241
- /* @__PURE__ */ Y(P.Label, { children: m.action.argument.label }),
4242
- /* @__PURE__ */ Y(B, {
4242
+ }), n[35] = w, n[36] = te);
4243
+ let V;
4244
+ n[37] !== g || n[38] !== m || n[39] !== C || n[40] !== a || n[41] !== o ? (V = m?.action.argument ? /* @__PURE__ */ Y(P.Root, { children: [
4245
+ /* @__PURE__ */ J(P.Label, { children: m.action.argument.label }),
4246
+ /* @__PURE__ */ J(z, {
4243
4247
  autoFocus: !0,
4244
4248
  size: "sm",
4245
4249
  value: g,
4246
4250
  onChange: (e) => _(e.target.value)
4247
4251
  }),
4248
- /* @__PURE__ */ X(I, { children: [/* @__PURE__ */ Y(j, {
4252
+ /* @__PURE__ */ Y(I, { children: [/* @__PURE__ */ J(j, {
4249
4253
  size: "xs",
4250
4254
  variant: "ghost",
4251
4255
  onClick: () => h(null),
4252
4256
  children: "Cancel"
4253
- }), /* @__PURE__ */ Y(j, {
4257
+ }), /* @__PURE__ */ J(j, {
4254
4258
  size: "xs",
4255
4259
  variant: "ghost",
4256
4260
  disabled: a || o || !g.trim(),
4257
4261
  onClick: () => void C(m.action, g, m.mode),
4258
4262
  children: "Apply"
4259
4263
  })] })
4260
- ] }) : null, n[37] = g, n[38] = m, n[39] = C, n[40] = a, n[41] = o, n[42] = U) : U = n[42];
4261
- let ne;
4262
- n[43] !== z || n[44] !== V || n[45] !== H || n[46] !== U ? (ne = /* @__PURE__ */ X(G, {
4264
+ ] }) : null, n[37] = g, n[38] = m, n[39] = C, n[40] = a, n[41] = o, n[42] = V) : V = n[42];
4265
+ let ie;
4266
+ n[43] !== R || n[44] !== B || n[45] !== te || n[46] !== V ? (ie = /* @__PURE__ */ Y(W, {
4263
4267
  p: "sm",
4264
4268
  gap: "xs",
4265
4269
  children: [
4266
- z,
4267
- V,
4268
- H,
4269
- U
4270
+ R,
4271
+ B,
4272
+ te,
4273
+ V
4270
4274
  ]
4271
- }), n[43] = z, n[44] = V, n[45] = H, n[46] = U, n[47] = ne) : ne = n[47];
4272
- let re;
4273
- n[48] !== m || n[49] !== C || n[50] !== r || n[51] !== s || n[52] !== a || n[53] !== o ? (re = m ? null : r.actions.map((e) => /* @__PURE__ */ Y(i, {
4275
+ }), n[43] = R, n[44] = B, n[45] = te, n[46] = V, n[47] = ie) : ie = n[47];
4276
+ let H;
4277
+ n[48] !== m || n[49] !== C || n[50] !== r || n[51] !== s || n[52] !== a || n[53] !== o ? (H = m ? null : r.actions.map((e) => /* @__PURE__ */ J(i, {
4274
4278
  role: "button",
4275
4279
  variant: "full-width",
4276
4280
  label: e.label,
4277
- icon: e.icon ? /* @__PURE__ */ Y(L, {
4281
+ icon: e.icon ? /* @__PURE__ */ J(L, {
4278
4282
  as: l(e.icon),
4279
4283
  boxSize: "icon-xs"
4280
4284
  }) : void 0,
@@ -4285,25 +4289,25 @@ var Yo = 3, Xo = 10, Zo = 4, Qo = (e, t) => {
4285
4289
  mode: r
4286
4290
  })) : C(e);
4287
4291
  }
4288
- }, e.id)), n[48] = m, n[49] = C, n[50] = r, n[51] = s, n[52] = a, n[53] = o, n[54] = re) : re = n[54];
4289
- let W;
4290
- n[55] !== p.content || n[56] !== R || n[57] !== ne || n[58] !== re ? (W = /* @__PURE__ */ Y(te, { children: /* @__PURE__ */ Y(ee.Positioner, { children: /* @__PURE__ */ X(ee.Content, {
4292
+ }, e.id)), n[48] = m, n[49] = C, n[50] = r, n[51] = s, n[52] = a, n[53] = o, n[54] = H) : H = n[54];
4293
+ let U;
4294
+ n[55] !== p.content || n[56] !== ee || n[57] !== ie || n[58] !== H ? (U = /* @__PURE__ */ J(re, { children: /* @__PURE__ */ J(ne.Positioner, { children: /* @__PURE__ */ Y(ne.Content, {
4291
4295
  css: p.content,
4292
- "aria-label": R,
4293
- children: [ne, re]
4294
- }) }) }), n[55] = p.content, n[56] = R, n[57] = ne, n[58] = re, n[59] = W) : W = n[59];
4295
- let ae;
4296
- return n[60] !== v || n[61] !== F || n[62] !== W ? (ae = /* @__PURE__ */ X(ee.Root, {
4296
+ "aria-label": ee,
4297
+ children: [ie, H]
4298
+ }) }) }), n[55] = p.content, n[56] = ee, n[57] = ie, n[58] = H, n[59] = U) : U = n[59];
4299
+ let oe;
4300
+ return n[60] !== v || n[61] !== F || n[62] !== U ? (oe = /* @__PURE__ */ Y(ne.Root, {
4297
4301
  open: v,
4298
4302
  positioning: T,
4299
4303
  onOpenChange: E,
4300
- children: [F, W]
4301
- }), n[60] = v, n[61] = F, n[62] = W, n[63] = ae) : ae = n[63], ae;
4302
- }, is = (e) => {
4303
- let t = J(19), { modes: n, draftTag: r, sentTag: i, pending: a, unavailable: o, onRequestConfirmation: s, onAction: c } = e, l;
4304
+ children: [F, U]
4305
+ }), n[60] = v, n[61] = F, n[62] = U, n[63] = oe) : oe = n[63], oe;
4306
+ }, Qo = (e) => {
4307
+ let t = q(19), { modes: n, draftTag: r, sentTag: i, pending: a, unavailable: o, onRequestConfirmation: s, onAction: c } = e, l;
4304
4308
  if (t[0] !== n || t[1] !== c || t[2] !== s || t[3] !== a || t[4] !== o) {
4305
4309
  let e;
4306
- t[6] !== c || t[7] !== s || t[8] !== a || t[9] !== o ? (e = (e) => /* @__PURE__ */ Y(rs, {
4310
+ t[6] !== c || t[7] !== s || t[8] !== a || t[9] !== o ? (e = (e) => /* @__PURE__ */ J(Zo, {
4307
4311
  mode: e,
4308
4312
  pending: a,
4309
4313
  unavailable: o,
@@ -4312,11 +4316,11 @@ var Yo = 3, Xo = 10, Zo = 4, Qo = (e, t) => {
4312
4316
  }, e.id), t[6] = c, t[7] = s, t[8] = a, t[9] = o, t[10] = e) : e = t[10], l = n.map(e), t[0] = n, t[1] = c, t[2] = s, t[3] = a, t[4] = o, t[5] = l;
4313
4317
  } else l = t[5];
4314
4318
  let u;
4315
- t[11] === r ? u = t[12] : (u = r ? /* @__PURE__ */ Y(ns, { tag: r }) : null, t[11] = r, t[12] = u);
4319
+ t[11] === r ? u = t[12] : (u = r ? /* @__PURE__ */ J(Xo, { tag: r }) : null, t[11] = r, t[12] = u);
4316
4320
  let d;
4317
- t[13] === i ? d = t[14] : (d = i ? /* @__PURE__ */ Y(ns, { tag: i }) : null, t[13] = i, t[14] = d);
4321
+ t[13] === i ? d = t[14] : (d = i ? /* @__PURE__ */ J(Xo, { tag: i }) : null, t[13] = i, t[14] = d);
4318
4322
  let f;
4319
- return t[15] !== l || t[16] !== u || t[17] !== d ? (f = /* @__PURE__ */ X(I, {
4323
+ return t[15] !== l || t[16] !== u || t[17] !== d ? (f = /* @__PURE__ */ Y(I, {
4320
4324
  gap: "2xs",
4321
4325
  minW: "0",
4322
4326
  "aria-label": "Harness controls",
@@ -4326,19 +4330,19 @@ var Yo = 3, Xo = 10, Zo = 4, Qo = (e, t) => {
4326
4330
  d
4327
4331
  ]
4328
4332
  }), t[15] = l, t[16] = u, t[17] = d, t[18] = f) : f = t[18], f;
4329
- }, as = (e) => {
4330
- let t = J(13), { status: n, statusLabel: r, additions: i, deletions: a } = e;
4333
+ }, $o = (e) => {
4334
+ let t = q(13), { status: n, statusLabel: r, additions: i, deletions: a } = e;
4331
4335
  if (n === "loading") {
4332
4336
  let e;
4333
- t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Y(W, {
4337
+ t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ J(U, {
4334
4338
  size: "xs",
4335
4339
  color: "fg.muted"
4336
4340
  }), t[0] = e) : e = t[0];
4337
4341
  let n = r ?? "Setting up workspace...", i;
4338
- return t[1] === n ? i = t[2] : (i = /* @__PURE__ */ X(I, {
4342
+ return t[1] === n ? i = t[2] : (i = /* @__PURE__ */ Y(I, {
4339
4343
  gap: "2xs",
4340
4344
  minW: "0",
4341
- children: [e, /* @__PURE__ */ Y(K, {
4345
+ children: [e, /* @__PURE__ */ J(G, {
4342
4346
  textStyle: "label/XS/regular",
4343
4347
  color: "fg.muted",
4344
4348
  truncate: !0,
@@ -4348,15 +4352,15 @@ var Yo = 3, Xo = 10, Zo = 4, Qo = (e, t) => {
4348
4352
  }
4349
4353
  if (n === "error") {
4350
4354
  let e;
4351
- t[3] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Y(be, {
4355
+ t[3] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ J(be, {
4352
4356
  size: 14,
4353
4357
  color: "var(--chakra-colors-fg-error)"
4354
4358
  }), t[3] = e) : e = t[3];
4355
4359
  let n = r ?? "Workspace setup failed", i;
4356
- return t[4] === n ? i = t[5] : (i = /* @__PURE__ */ X(I, {
4360
+ return t[4] === n ? i = t[5] : (i = /* @__PURE__ */ Y(I, {
4357
4361
  gap: "2xs",
4358
4362
  minW: "0",
4359
- children: [e, /* @__PURE__ */ Y(K, {
4363
+ children: [e, /* @__PURE__ */ J(G, {
4360
4364
  textStyle: "label/XS/regular",
4361
4365
  color: "fg.error",
4362
4366
  truncate: !0,
@@ -4366,43 +4370,43 @@ var Yo = 3, Xo = 10, Zo = 4, Qo = (e, t) => {
4366
4370
  }
4367
4371
  if (i <= 0 && a <= 0) return null;
4368
4372
  let o;
4369
- t[6] === i ? o = t[7] : (o = /* @__PURE__ */ X(K, {
4373
+ t[6] === i ? o = t[7] : (o = /* @__PURE__ */ Y(G, {
4370
4374
  textStyle: "label/XS/medium",
4371
4375
  color: "fg.success",
4372
4376
  children: ["+", i]
4373
4377
  }), t[6] = i, t[7] = o);
4374
4378
  let s;
4375
- t[8] === a ? s = t[9] : (s = /* @__PURE__ */ X(K, {
4379
+ t[8] === a ? s = t[9] : (s = /* @__PURE__ */ Y(G, {
4376
4380
  textStyle: "label/XS/medium",
4377
4381
  color: "fg.error",
4378
4382
  children: ["−", a]
4379
4383
  }), t[8] = a, t[9] = s);
4380
4384
  let c;
4381
- return t[10] !== o || t[11] !== s ? (c = /* @__PURE__ */ X(I, {
4385
+ return t[10] !== o || t[11] !== s ? (c = /* @__PURE__ */ Y(I, {
4382
4386
  gap: "2xs",
4383
4387
  children: [o, s]
4384
4388
  }), t[10] = o, t[11] = s, t[12] = c) : c = t[12], c;
4385
- }, os = (e) => {
4386
- let t = J(13), { workspaceControl: n, additions: r, deletions: i, action: a, status: o, statusLabel: s } = e, c = o === void 0 ? "ready" : o, l;
4387
- t[0] !== r || t[1] !== i || t[2] !== c || t[3] !== s ? (l = /* @__PURE__ */ Y(as, {
4389
+ }, es = (e) => {
4390
+ let t = q(13), { workspaceControl: n, additions: r, deletions: i, action: a, status: o, statusLabel: s } = e, c = o === void 0 ? "ready" : o, l;
4391
+ t[0] !== r || t[1] !== i || t[2] !== c || t[3] !== s ? (l = /* @__PURE__ */ J($o, {
4388
4392
  status: c,
4389
4393
  statusLabel: s,
4390
4394
  additions: r,
4391
4395
  deletions: i
4392
4396
  }), t[0] = r, t[1] = i, t[2] = c, t[3] = s, t[4] = l) : l = t[4];
4393
4397
  let u;
4394
- t[5] !== l || t[6] !== n ? (u = /* @__PURE__ */ X(I, {
4398
+ t[5] !== l || t[6] !== n ? (u = /* @__PURE__ */ Y(I, {
4395
4399
  gap: "sm",
4396
4400
  minW: "0",
4397
4401
  children: [n, l]
4398
4402
  }), t[5] = l, t[6] = n, t[7] = u) : u = t[7];
4399
4403
  let d;
4400
- t[8] === a ? d = t[9] : (d = a ? /* @__PURE__ */ Y(F, {
4404
+ t[8] === a ? d = t[9] : (d = a ? /* @__PURE__ */ J(F, {
4401
4405
  flexShrink: 0,
4402
4406
  children: a
4403
4407
  }) : null, t[8] = a, t[9] = d);
4404
4408
  let f;
4405
- return t[10] !== u || t[11] !== d ? (f = /* @__PURE__ */ X(F, {
4409
+ return t[10] !== u || t[11] !== d ? (f = /* @__PURE__ */ Y(F, {
4406
4410
  align: "center",
4407
4411
  justify: "space-between",
4408
4412
  gap: "sm",
@@ -4414,6 +4418,6 @@ var Yo = 3, Xo = 10, Zo = 4, Qo = (e, t) => {
4414
4418
  }), t[10] = u, t[11] = d, t[12] = f) : f = t[12], f;
4415
4419
  };
4416
4420
  //#endregion
4417
- export { pt as ApprovalPrompt, gt as AttachmentList, bt as AutoScroll, Yn as ChatInput, dt as ChatMessage, Uo as ChatPanel, st as ChatPrimitives, qo as ChatSkeleton, os as ChatWorkspaceHub, ts as ConversationBrowse, is as HarnessControls, Dt as SendButton, xt as createSerializedPromptState, _ as parseChatLink };
4421
+ export { pt as ApprovalPrompt, gt as AttachmentList, bt as AutoScroll, Yn as ChatInput, dt as ChatMessage, Lo as ChatPanel, st as ChatPrimitives, Vo as ChatSkeleton, es as ChatWorkspaceHub, Yo as ConversationBrowse, Qo as HarnessControls, Nn as QuestionPromptControls, Dt as SendButton, xt as createSerializedPromptState, _ as parseChatLink, Fn as useQuestionPromptState };
4418
4422
 
4419
4423
  //# sourceMappingURL=chat-ui.js.map