@pstdio/ui 0.14.0 → 0.16.0

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 (226) hide show
  1. package/dist/{MermaidComponent-CatfVUxA.js → MermaidComponent-BCMQqPqu.js} +11 -11
  2. package/dist/{MermaidComponent-CatfVUxA.js.map → MermaidComponent-BCMQqPqu.js.map} +1 -1
  3. package/dist/browser-storage-BinyFNJX.js +40 -0
  4. package/dist/browser-storage-BinyFNJX.js.map +1 -0
  5. package/dist/chat-ui.js +1160 -1120
  6. package/dist/chat-ui.js.map +1 -1
  7. package/dist/checkbox-D5AzFRlb.js +70 -0
  8. package/dist/checkbox-D5AzFRlb.js.map +1 -0
  9. package/dist/components/chat-ui/components/ai-conversation.d.ts +1 -1
  10. package/dist/components/chat-ui/components/ai-message.d.ts +1 -1
  11. package/dist/components/chat-ui/components/ai-response.d.ts +0 -1
  12. package/dist/components/chat-ui/components/attachment-list.d.ts +1 -1
  13. package/dist/components/chat-ui/components/auto-scroll.d.ts +27 -0
  14. package/dist/components/chat-ui/components/chat-message-animation.d.ts +22 -0
  15. package/dist/components/chat-ui/components/timeline.d.ts +0 -2
  16. package/dist/components/chat-ui/performance/chat-performance-fixtures.d.ts +0 -1
  17. package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +2 -12
  18. package/dist/components/chat-ui/tool-rendering/shared.d.ts +1 -1
  19. package/dist/components/chat-ui/tool-rendering/types.d.ts +1 -2
  20. package/dist/components/command-palette/index.d.ts +4 -0
  21. package/dist/components/data-renderer/data-renderer-board.d.ts +1 -1
  22. package/dist/components/data-renderer/data-renderer-card.d.ts +1 -1
  23. package/dist/components/data-renderer/data-renderer-enum-helpers.d.ts +3 -3
  24. package/dist/components/data-renderer/data-renderer-helpers.d.ts +2 -0
  25. package/dist/components/data-renderer/data-renderer-list.d.ts +1 -1
  26. package/dist/components/data-renderer/data-renderer.d.ts +1 -1
  27. package/dist/components/data-renderer/index.d.ts +18 -0
  28. package/dist/components/data-renderer/types.d.ts +0 -6
  29. package/dist/components/diff-viewer/diff-card.d.ts +1 -0
  30. package/dist/components/diff-viewer/diff-drawer-scroll.d.ts +0 -19
  31. package/dist/components/diff-viewer/diff-drawer.d.ts +1 -0
  32. package/dist/components/diff-viewer/diff-viewer-options-menu.d.ts +16 -0
  33. package/dist/components/diff-viewer/index.d.ts +2 -0
  34. package/dist/components/diff-viewer/use-selected-diff-scroll.d.ts +7 -3
  35. package/dist/components/internal/style-guide.d.ts +14 -0
  36. package/dist/components/internal/token-editor-controls.d.ts +8 -0
  37. package/dist/components/internal/token-editor-data.d.ts +40 -0
  38. package/dist/components/internal/token-editor-state.d.ts +22 -0
  39. package/dist/components/layout/index.d.ts +6 -0
  40. package/dist/components/list-row/list-row.types.d.ts +1 -1
  41. package/dist/components/notification-center/index.d.ts +2 -0
  42. package/dist/components/notification-center/notification-center.d.ts +2 -0
  43. package/dist/components/notification-center/notification-center.types.d.ts +37 -0
  44. package/dist/components/{bubble-button.d.ts → overlays/bubble-button.d.ts} +1 -1
  45. package/dist/components/overlays/index.d.ts +12 -0
  46. package/dist/components/overlays/search-modal-content.d.ts +20 -0
  47. package/dist/components/{searchable-menu.d.ts → overlays/searchable-menu.d.ts} +1 -1
  48. package/dist/components/param-editor/index.d.ts +23 -0
  49. package/dist/components/param-editor/inputs/action-input.d.ts +13 -0
  50. package/dist/components/param-editor/inputs/anchor-grid-input.d.ts +12 -0
  51. package/dist/components/param-editor/inputs/anchor-grid.d.ts +4 -0
  52. package/dist/components/param-editor/inputs/file-accept.d.ts +22 -0
  53. package/dist/components/param-editor/inputs/file-drop-input.d.ts +14 -0
  54. package/dist/components/param-editor/inputs/numeric-value.d.ts +6 -0
  55. package/dist/components/param-editor/inputs/range-input.d.ts +17 -0
  56. package/dist/components/param-editor/inputs/range-value.d.ts +5 -0
  57. package/dist/components/param-editor/inputs/resource-input-chips.d.ts +15 -0
  58. package/dist/components/param-editor/inputs/resource-input.d.ts +18 -0
  59. package/dist/components/param-editor/inputs/segmented-input.d.ts +14 -0
  60. package/dist/components/param-editor/inputs/slider-marks.d.ts +5 -0
  61. package/dist/components/param-editor/inputs/vector-input.d.ts +17 -0
  62. package/dist/components/param-editor/inputs/vector-value.d.ts +7 -0
  63. package/dist/components/param-editor/param-editor-control-item.d.ts +15 -0
  64. package/dist/components/param-editor/param-editor-control-list.d.ts +5 -0
  65. package/dist/components/param-editor/param-editor-field-label.d.ts +1 -0
  66. package/dist/components/param-editor/param-editor-field.d.ts +11 -0
  67. package/dist/components/param-editor/param-editor-inline-group.d.ts +5 -0
  68. package/dist/components/param-editor/param-editor-section.d.ts +16 -0
  69. package/dist/components/param-editor/param-editor.d.ts +2 -1
  70. package/dist/components/param-editor/param-editor.types.d.ts +101 -19
  71. package/dist/components/{breadcrumb.d.ts → primitives/breadcrumb.d.ts} +1 -1
  72. package/dist/components/{icon-color-picker.d.ts → primitives/icon-color-picker.d.ts} +2 -6
  73. package/dist/components/primitives/index.d.ts +28 -0
  74. package/dist/components/{number-input.d.ts → primitives/number-input.d.ts} +0 -2
  75. package/dist/components/{session-indicator.d.ts → primitives/session-indicator.d.ts} +2 -1
  76. package/dist/components/{tooltip.d.ts → primitives/tooltip.d.ts} +0 -1
  77. package/dist/components/rich-text/prompt-input/commands.d.ts +0 -17
  78. package/dist/components/rich-text/prompt-input/events.d.ts +0 -13
  79. package/dist/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.d.ts +1 -2
  80. package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.d.ts +1 -2
  81. package/dist/components/rich-text/prompt-input/utils.d.ts +1 -2
  82. package/dist/components/rich-text/shared/plugins/MermaidPlugin/MermaidNode.d.ts +0 -1
  83. package/dist/components/rich-text/utils/inferResourceType.d.ts +1 -1
  84. package/dist/components/sidebar/sidebar.types.d.ts +1 -1
  85. package/dist/components/tab-strip/tab-visibility-filter.d.ts +5 -3
  86. package/dist/components/tag-editor/tag-editor-row.d.ts +1 -1
  87. package/dist/components/tag-editor/tag-editor.types.d.ts +1 -1
  88. package/dist/components/terminal/bind-session.d.ts +33 -0
  89. package/dist/components/terminal/index.d.ts +6 -0
  90. package/dist/components/terminal/scripted-bridge.d.ts +35 -0
  91. package/dist/components/terminal/terminal-contract.d.ts +22 -0
  92. package/dist/components/terminal/terminal-theme.d.ts +12 -0
  93. package/dist/components/terminal/terminal.d.ts +45 -0
  94. package/dist/components/terminal/types.d.ts +35 -0
  95. package/dist/components/terminal/use-terminal-session.d.ts +21 -0
  96. package/dist/components/tree-list/tree-list-order-filter.d.ts +1 -2
  97. package/dist/components/tree-list/tree-list-visibility-filter.d.ts +12 -4
  98. package/dist/components/tree-list/tree-list.d.ts +1 -1
  99. package/dist/components/tree-list/tree-list.types.d.ts +7 -2
  100. package/dist/data-renderer.js +1669 -0
  101. package/dist/data-renderer.js.map +1 -0
  102. package/dist/diff-editor-BnfV8cYB.js +182 -0
  103. package/dist/diff-editor-BnfV8cYB.js.map +1 -0
  104. package/dist/diff.js +1313 -0
  105. package/dist/diff.js.map +1 -0
  106. package/dist/empty-state-Bo4HVrgr.js +34 -0
  107. package/dist/empty-state-Bo4HVrgr.js.map +1 -0
  108. package/dist/foundations/gallery/gallery-frame.d.ts +21 -0
  109. package/dist/foundations/gallery/sections/badges-section.d.ts +1 -0
  110. package/dist/foundations/gallery/sections/buttons-section.d.ts +1 -0
  111. package/dist/foundations/gallery/sections/composite-chat-section.d.ts +1 -0
  112. package/dist/foundations/gallery/sections/composites-section.d.ts +1 -0
  113. package/dist/foundations/gallery/sections/feedback-section.d.ts +1 -0
  114. package/dist/foundations/gallery/sections/input-authoring-card.d.ts +1 -0
  115. package/dist/foundations/gallery/sections/inputs-section.d.ts +1 -0
  116. package/dist/foundations/gallery/sections/layout-section.d.ts +1 -0
  117. package/dist/foundations/gallery/sections/navigation-identity-section.d.ts +1 -0
  118. package/dist/foundations/gallery/sections/overlays-section.d.ts +1 -0
  119. package/dist/foundations/gallery/sections/panels-section.d.ts +1 -0
  120. package/dist/foundations/gallery/sections/param-editor-composite-card.d.ts +1 -0
  121. package/dist/foundations/gallery/sections/settings-composite-cards.d.ts +1 -0
  122. package/dist/index.d.ts +15 -84
  123. package/dist/index.js +3594 -7450
  124. package/dist/index.js.map +1 -1
  125. package/dist/list-row-mi3Hn-Um.js +740 -0
  126. package/dist/list-row-mi3Hn-Um.js.map +1 -0
  127. package/dist/mermaid-renderer-DZo3qj6D.js +425 -0
  128. package/dist/mermaid-renderer-DZo3qj6D.js.map +1 -0
  129. package/dist/mermaid.js +5 -0
  130. package/dist/mermaid.js.map +1 -0
  131. package/dist/radio-cLMEBBZk.js +76 -0
  132. package/dist/radio-cLMEBBZk.js.map +1 -0
  133. package/dist/resource-badge-qCWHP-wQ.js +99 -0
  134. package/dist/resource-badge-qCWHP-wQ.js.map +1 -0
  135. package/dist/{rich-message-BFtvH9H7.js → rich-message-DBf_5YlW.js} +462 -481
  136. package/dist/rich-message-DBf_5YlW.js.map +1 -0
  137. package/dist/rich-text.js +397 -390
  138. package/dist/rich-text.js.map +1 -1
  139. package/dist/scroll-area-BMbg1WcD.js +91 -0
  140. package/dist/scroll-area-BMbg1WcD.js.map +1 -0
  141. package/dist/style.css +1 -1
  142. package/dist/terminal.js +339 -0
  143. package/dist/terminal.js.map +1 -0
  144. package/dist/theme/global.d.ts +3 -0
  145. package/dist/theme/recipes/badge.d.ts +50 -0
  146. package/dist/theme/recipes/button.d.ts +24 -19
  147. package/dist/theme/recipes/color-picker.d.ts +1 -0
  148. package/dist/theme/recipes/dialog.d.ts +1 -1
  149. package/dist/theme/recipes/drawer.d.ts +1 -1
  150. package/dist/theme/recipes/input.d.ts +55 -0
  151. package/dist/theme/recipes/number-input.d.ts +98 -0
  152. package/dist/theme/recipes/tabs.d.ts +49 -28
  153. package/dist/theme/recipes/textarea.d.ts +62 -1
  154. package/dist/theme/recipes/timeline.d.ts +74 -0
  155. package/dist/theme/shadowless-default-config.d.ts +2 -0
  156. package/dist/theme/tokens/borders.d.ts +0 -3
  157. package/dist/theme/tokens/colors.d.ts +100 -70
  158. package/dist/{theme-C5qHTCU9.js → theme-CJBYBJaA.js} +1264 -415
  159. package/dist/theme-CJBYBJaA.js.map +1 -0
  160. package/dist/theme-preference-DOzHx64J.js +123 -0
  161. package/dist/theme-preference-DOzHx64J.js.map +1 -0
  162. package/dist/theme.js +1 -1
  163. package/dist/tree-list-CcuZMLS5.js +930 -0
  164. package/dist/tree-list-CcuZMLS5.js.map +1 -0
  165. package/dist/workspace-badge-Fuo-1zPj.js +314 -0
  166. package/dist/workspace-badge-Fuo-1zPj.js.map +1 -0
  167. package/package.json +23 -3
  168. package/dist/components/file-tree-helpers.d.ts +0 -8
  169. package/dist/components/open-source-notices-screen.d.ts +0 -20
  170. package/dist/components/param-editor/input-group.d.ts +0 -10
  171. package/dist/components/rich-text/shared/plugins/MermaidPlugin/index.d.ts +0 -1
  172. package/dist/components/rich-text/shared/plugins/TableActionMenuPlugin/TableActionMenuPlugin.d.ts +0 -5
  173. package/dist/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.d.ts +0 -2
  174. package/dist/components/rich-text/theme/report-theme.d.ts +0 -3
  175. package/dist/components/sidebar/sidebar-project-menu.d.ts +0 -7
  176. package/dist/components/style-guide-data.d.ts +0 -46
  177. package/dist/components/style-guide.d.ts +0 -1
  178. package/dist/mermaid-renderer-DYEiYmYQ.js +0 -411
  179. package/dist/mermaid-renderer-DYEiYmYQ.js.map +0 -1
  180. package/dist/radio-DJtQY9po.js +0 -286
  181. package/dist/radio-DJtQY9po.js.map +0 -1
  182. package/dist/resource-badge-D33IFv74.js +0 -188
  183. package/dist/resource-badge-D33IFv74.js.map +0 -1
  184. package/dist/rich-message-BFtvH9H7.js.map +0 -1
  185. package/dist/theme/tokens/shadows.d.ts +0 -64
  186. package/dist/theme-C5qHTCU9.js.map +0 -1
  187. package/dist/utils/formats.d.ts +0 -7
  188. /package/dist/components/{palette-filter.d.ts → command-palette/palette-filter.d.ts} +0 -0
  189. /package/dist/components/{palette-list.d.ts → command-palette/palette-list.d.ts} +0 -0
  190. /package/dist/components/{palette-shortcut.d.ts → command-palette/palette-shortcut.d.ts} +0 -0
  191. /package/dist/components/{palette.d.ts → command-palette/palette.d.ts} +0 -0
  192. /package/dist/components/{code-editor.d.ts → diff-viewer/code-editor.d.ts} +0 -0
  193. /package/dist/components/{column-file-browser.d.ts → file-browser/column-file-browser.d.ts} +0 -0
  194. /package/dist/components/{performance-panel.d.ts → internal/performance-panel.d.ts} +0 -0
  195. /package/dist/components/{header.d.ts → layout/header.d.ts} +0 -0
  196. /package/dist/components/{horizontal-menu-stack.d.ts → layout/horizontal-menu-stack.d.ts} +0 -0
  197. /package/dist/components/{item-section.d.ts → layout/item-section.d.ts} +0 -0
  198. /package/dist/components/{panel-header.constants.d.ts → layout/panel-header.constants.d.ts} +0 -0
  199. /package/dist/components/{resizable-split-layout.d.ts → layout/resizable-split-layout.d.ts} +0 -0
  200. /package/dist/components/{resizable-split-layout.handle.d.ts → layout/resizable-split-layout.handle.d.ts} +0 -0
  201. /package/dist/components/{attached-panel.d.ts → overlays/attached-panel.d.ts} +0 -0
  202. /package/dist/components/{bubble-panel.d.ts → overlays/bubble-panel.d.ts} +0 -0
  203. /package/dist/components/{delete-confirmation-modal.d.ts → overlays/delete-confirmation-modal.d.ts} +0 -0
  204. /package/dist/components/{repo-picker-dialog.d.ts → overlays/repo-picker-dialog.d.ts} +0 -0
  205. /package/dist/components/{resource-context-menu.d.ts → overlays/resource-context-menu.d.ts} +0 -0
  206. /package/dist/components/param-editor/{color-input.d.ts → inputs/color-input.d.ts} +0 -0
  207. /package/dist/components/param-editor/{date-input.d.ts → inputs/date-input.d.ts} +0 -0
  208. /package/dist/components/param-editor/{horizontal-text-input.d.ts → inputs/horizontal-text-input.d.ts} +0 -0
  209. /package/dist/components/param-editor/{number-input.d.ts → inputs/number-input.d.ts} +0 -0
  210. /package/dist/components/param-editor/{selection-input.d.ts → inputs/selection-input.d.ts} +0 -0
  211. /package/dist/components/param-editor/{text-input.d.ts → inputs/text-input.d.ts} +0 -0
  212. /package/dist/components/{alert.d.ts → primitives/alert.d.ts} +0 -0
  213. /package/dist/components/{checkbox.d.ts → primitives/checkbox.d.ts} +0 -0
  214. /package/dist/components/{content-placeholder.d.ts → primitives/content-placeholder.d.ts} +0 -0
  215. /package/dist/components/{empty-state.d.ts → primitives/empty-state.d.ts} +0 -0
  216. /package/dist/components/{error-boundary.d.ts → primitives/error-boundary.d.ts} +0 -0
  217. /package/dist/components/{info-card.d.ts → primitives/info-card.d.ts} +0 -0
  218. /package/dist/components/{integration-card.d.ts → primitives/integration-card.d.ts} +0 -0
  219. /package/dist/components/{radio.d.ts → primitives/radio.d.ts} +0 -0
  220. /package/dist/components/{resource-badge.d.ts → primitives/resource-badge.d.ts} +0 -0
  221. /package/dist/components/{scroll-area.d.ts → primitives/scroll-area.d.ts} +0 -0
  222. /package/dist/components/{simple-card.d.ts → primitives/simple-card.d.ts} +0 -0
  223. /package/dist/components/{slider.d.ts → primitives/slider.d.ts} +0 -0
  224. /package/dist/components/{switch.d.ts → primitives/switch.d.ts} +0 -0
  225. /package/dist/components/{toaster.d.ts → primitives/toaster.d.ts} +0 -0
  226. /package/dist/components/{workspace-badge.d.ts → primitives/workspace-badge.d.ts} +0 -0
package/dist/chat-ui.js CHANGED
@@ -1,46 +1,23 @@
1
- import { jsx as a, jsxs as k, Fragment as $t } from "react/jsx-runtime";
1
+ import { jsx as l, jsxs as k, Fragment as $t } from "react/jsx-runtime";
2
2
  import { c as T } from "react/compiler-runtime";
3
- import { chakra as zn, AbsoluteCenter as qn, IconButton as Ft, defineSlotRecipe as Hn, createSlotRecipeContext as Qn, Text as X, Code as Ut, Button as Ze, HStack as Me, Box as I, Flex as Re, Stack as Y, Textarea as Wn, Tooltip as dt, Portal as Nn, Kbd as Vn, Spacer as jn, Timeline as Un, Span as Je, Avatar as We, Card as ue, Link as rn, Spinner as zt, Image as Kn, Skeleton as Gn } from "@chakra-ui/react";
4
- import { ArrowDownIcon as Xn, ShieldX as Yn, ShieldCheck as Jn, Check as ln, Square as Zn, ArrowUp as eo, Copy as to, Move as no, FileDown as oo, FileUp as so, FileDiff as ro, Trash2 as io, FilePen as lo, FileText as ao, ListTree as co, Terminal as an, ListTodo as uo, CircleQuestionMark as fo, File as po, Globe as mo, Search as ho, AlertTriangle as cn, DotIcon as go, ChevronUpIcon as bo, MessageCircleIcon as yo } from "lucide-react";
5
- import { StickToBottom as xo, useStickToBottomContext as mt } from "use-stick-to-bottom";
6
- import { S as ht, R as qt, T as un } from "./resource-badge-D33IFv74.js";
7
- import { Fragment as So, useRef as Ne, useEffect as Ae, useState as G } from "react";
8
- import { i as Et, P as To, h as wo, R as dn } from "./rich-message-BFtvH9H7.js";
9
- import "@lexical/react/LexicalCollaborationContext";
10
- import "@lexical/react/LexicalCollaborationPlugin";
11
- import "@lexical/react/LexicalComposer";
12
- import "@lexical/react/LexicalErrorBoundary";
13
- import "@lexical/react/LexicalHorizontalRulePlugin";
14
- import "@lexical/react/LexicalLinkPlugin";
15
- import "@lexical/react/LexicalListPlugin";
16
- import "@lexical/react/LexicalRichTextPlugin";
17
- import "@lexical/react/LexicalTabIndentationPlugin";
18
- import "y-websocket";
19
- import "yjs";
20
- import "@lexical/react/LexicalComposerContext";
21
- import "@lexical/utils";
22
- import "lexical";
23
- import "react-dom";
24
- import "@lexical/code";
25
- import "@lexical/link";
26
- import "@lexical/list";
27
- import "@lexical/rich-text";
28
- import "@lexical/selection";
29
- import "@lexical/markdown";
30
- import "@lexical/react/LexicalAutoFocusPlugin";
31
- import "@lexical/react/LexicalCheckListPlugin";
32
- import "@lexical/react/LexicalHistoryPlugin";
33
- import "@lexical/react/LexicalOnChangePlugin";
34
- import "@lexical/react/LexicalTreeView";
35
- import "@lexical/react/LexicalClickableLinkPlugin";
36
- import { C as fn, R as ko, a as Co, D as Ao, b as pn, A as Kt, E as _o } from "./radio-DJtQY9po.js";
37
- import { useVirtualizer as Ro } from "@tanstack/react-virtual";
38
- const Io = {
3
+ import { AbsoluteCenter as qn, IconButton as Ft, chakra as Hn, createSlotRecipeContext as Qn, defineSlotRecipe as Wn, Text as J, Code as Kt, Button as Ze, HStack as De, Box as R, Flex as Ee, Stack as Z, Textarea as Nn, Tooltip as ft, Portal as Vn, Kbd as jn, Spacer as Kn, Timeline as Un, Span as Je, Avatar as Ve, Card as me, Link as rn, Spinner as zt, Image as Gn, Skeleton as Xn } from "@chakra-ui/react";
4
+ import { ArrowDownIcon as Yn, ShieldX as Jn, ShieldCheck as Zn, Check as ln, Square as es, ArrowUp as ts, Copy as ns, Move as ss, FileDown as os, FileUp as rs, FileDiff as is, Trash2 as ls, FilePen as as, FileText as cs, ListTree as us, Terminal as an, ListTodo as ds, CircleQuestionMark as fs, File as ps, Globe as ms, Search as hs, AlertTriangle as cn, DotIcon as gs, ChevronUpIcon as bs, MessageCircleIcon as ys } from "lucide-react";
5
+ import { useStickToBottomContext as ht, StickToBottom as xs } from "use-stick-to-bottom";
6
+ import { S as gt, T as un } from "./scroll-area-BMbg1WcD.js";
7
+ import { Fragment as Ss, useRef as Le, useEffect as Pe, useState as Y } from "react";
8
+ import { R as qt } from "./resource-badge-qCWHP-wQ.js";
9
+ import { h as Pt, P as Ts, g as ws, R as dn } from "./rich-message-DBf_5YlW.js";
10
+ import { C as fn } from "./checkbox-D5AzFRlb.js";
11
+ import { R as ks, a as Cs, A as Ut } from "./radio-cLMEBBZk.js";
12
+ import { E as As } from "./empty-state-Bo4HVrgr.js";
13
+ import { useVirtualizer as _s } from "@tanstack/react-virtual";
14
+ import { D as Rs, a as pn } from "./diff-editor-BnfV8cYB.js";
15
+ const Is = {
39
16
  "aria-roledescription": "conversation",
40
17
  initial: "instant",
41
18
  resize: "instant",
42
19
  role: "log"
43
- }, Po = zn(xo, {
20
+ }, Ms = Hn(xs, {
44
21
  base: {
45
22
  position: "relative",
46
23
  flex: 1,
@@ -49,18 +26,18 @@ const Io = {
49
26
  }
50
27
  }, {
51
28
  forwardProps: ["initial", "resize"],
52
- defaultProps: Io
53
- }), Mo = (t) => {
29
+ defaultProps: Is
30
+ }), Ps = (t) => {
54
31
  const e = T(10);
55
- let n, s;
32
+ let n, o;
56
33
  e[0] !== t ? ({
57
34
  children: n,
58
- ...s
59
- } = t, e[0] = t, e[1] = n, e[2] = s) : (n = e[1], s = e[2]);
35
+ ...o
36
+ } = t, e[0] = t, e[1] = n, e[2] = o) : (n = e[1], o = e[2]);
60
37
  const {
61
- contentRef: o,
38
+ contentRef: s,
62
39
  scrollRef: r
63
- } = mt(), i = r, l = o;
40
+ } = ht(), i = r, a = s;
64
41
  let c, u;
65
42
  e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = {
66
43
  zIndex: 2
@@ -70,23 +47,23 @@ const Io = {
70
47
  role: "list"
71
48
  }, e[3] = c, e[4] = u) : (c = e[3], u = e[4]);
72
49
  let d;
73
- return e[5] !== n || e[6] !== s || e[7] !== i || e[8] !== l ? (d = /* @__PURE__ */ a(ht, { ...s, height: "full", width: "full", showHorizontalScrollbar: !1, viewportRef: i, contentRef: l, verticalScrollbarProps: c, contentProps: u, children: n }), e[5] = n, e[6] = s, e[7] = i, e[8] = l, e[9] = d) : d = e[9], d;
74
- }, Eo = {
50
+ return e[5] !== n || e[6] !== o || e[7] !== i || e[8] !== a ? (d = /* @__PURE__ */ l(gt, { ...o, height: "full", width: "full", showHorizontalScrollbar: !1, viewportRef: i, contentRef: a, verticalScrollbarProps: c, contentProps: u, children: n }), e[5] = n, e[6] = o, e[7] = i, e[8] = a, e[9] = d) : d = e[9], d;
51
+ }, vs = {
75
52
  axis: "horizontal",
76
53
  bottom: "md",
77
54
  zIndex: 2
78
- }, vo = (t) => {
55
+ }, Es = (t) => {
79
56
  const e = T(4), {
80
57
  isAtBottom: n,
81
- scrollToBottom: s
82
- } = mt();
83
- let o;
84
- return e[0] !== n || e[1] !== t || e[2] !== s ? (o = !n && /* @__PURE__ */ a(qn, { ...Eo, children: /* @__PURE__ */ a(Ft, { rounded: "full", onClick: () => s(), variant: "outline", size: "xs", ...t, children: /* @__PURE__ */ a(Xn, { size: 16 }) }) }), e[0] = n, e[1] = t, e[2] = s, e[3] = o) : o = e[3], o;
58
+ scrollToBottom: o
59
+ } = ht();
60
+ let s;
61
+ return e[0] !== n || e[1] !== t || e[2] !== o ? (s = !n && /* @__PURE__ */ l(qn, { ...vs, children: /* @__PURE__ */ l(Ft, { rounded: "full", onClick: () => o(), variant: "outline", size: "xs", ...t, children: /* @__PURE__ */ l(Yn, { size: 16 }) }) }), e[0] = n, e[1] = t, e[2] = o, e[3] = s) : s = e[3], s;
85
62
  }, vt = {
86
- Root: Po,
87
- Viewport: Mo,
88
- ScrollToBottom: vo
89
- }, Lo = Hn({
63
+ Root: Ms,
64
+ Viewport: Ps,
65
+ ScrollToBottom: Es
66
+ }, Ls = Wn({
90
67
  className: "ai-message",
91
68
  slots: ["root", "content"],
92
69
  base: {
@@ -96,9 +73,6 @@ const Io = {
96
73
  alignItems: "end",
97
74
  justifyContent: "end",
98
75
  gap: "sm",
99
- animationName: "message-fade-in",
100
- animationDuration: "200ms",
101
- animationTimingFunction: "ease-out",
102
76
  "&:has(+ [data-scope='ai-message'][data-part='root'])": {
103
77
  mb: 0
104
78
  }
@@ -124,7 +98,7 @@ const Io = {
124
98
  borderRightWidth: "1px",
125
99
  borderBottomWidth: "1px",
126
100
  borderLeftWidth: "1px",
127
- borderColor: "border.muted",
101
+ borderColor: "border.subtle",
128
102
  bg: "bg.subtle",
129
103
  px: "xs",
130
104
  py: "xs",
@@ -196,682 +170,745 @@ const Io = {
196
170
  shape: "rounded"
197
171
  }
198
172
  }), {
199
- withProvider: Do,
200
- withContext: Bo
173
+ withProvider: Bs,
174
+ withContext: Ds
201
175
  } = Qn({
202
- recipe: Lo
203
- }), Oo = Do("div", "root"), $o = Bo("div", "content"), _e = {
204
- Root: Oo,
205
- Content: $o
206
- }, Fo = (t) => {
176
+ recipe: Ls
177
+ }), Os = Bs("div", "root"), $s = Ds("div", "content"), ve = {
178
+ Root: Os,
179
+ Content: $s
180
+ }, Fs = (t) => {
207
181
  if (t == null) return null;
208
182
  const e = typeof t == "string" ? t : JSON.stringify(t, null, 2);
209
183
  return e.length === 0 ? null : e.length > 200 ? `${e.slice(0, 200)}...` : e;
210
- }, cl = (t) => {
184
+ }, ji = (t) => {
211
185
  const e = T(19), {
212
186
  toolName: n,
213
- toolInput: s,
214
- onApprove: o,
187
+ toolInput: o,
188
+ onApprove: s,
215
189
  onDeny: r
216
190
  } = t;
217
191
  let i;
218
- e[0] !== s ? (i = Fo(s), e[0] = s, e[1] = i) : i = e[1];
219
- const l = i;
192
+ e[0] !== o ? (i = Fs(o), e[0] = o, e[1] = i) : i = e[1];
193
+ const a = i;
220
194
  let c;
221
- e[2] !== n ? (c = /* @__PURE__ */ k(X, { textStyle: "label/S/medium", color: "fg", children: [
195
+ e[2] !== n ? (c = /* @__PURE__ */ k(J, { textStyle: "label/S/medium", color: "fg", children: [
222
196
  "Allow ",
223
- /* @__PURE__ */ a(Ut, { size: "sm", children: n }),
197
+ /* @__PURE__ */ l(Kt, { size: "sm", children: n }),
224
198
  "?"
225
199
  ] }), e[2] = n, e[3] = c) : c = e[3];
226
200
  let u;
227
- e[4] !== l ? (u = l ? /* @__PURE__ */ a(ht, { maxH: "6rem", children: /* @__PURE__ */ a(Ut, { size: "sm", whiteSpace: "pre-wrap", display: "block", width: "100%", children: l }) }) : null, e[4] = l, e[5] = u) : u = e[5];
201
+ e[4] !== a ? (u = a ? /* @__PURE__ */ l(gt, { maxH: "6rem", children: /* @__PURE__ */ l(Kt, { size: "sm", whiteSpace: "pre-wrap", display: "block", width: "100%", children: a }) }) : null, e[4] = a, e[5] = u) : u = e[5];
228
202
  let d;
229
- e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ a(Yn, { size: 14 }), e[6] = d) : d = e[6];
230
- let f;
231
- e[7] !== r ? (f = /* @__PURE__ */ k(Ze, { size: "xs", variant: "outline", onClick: r, children: [
203
+ e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ l(Jn, { size: 14 }), e[6] = d) : d = e[6];
204
+ let p;
205
+ e[7] !== r ? (p = /* @__PURE__ */ k(Ze, { size: "xs", variant: "outline", onClick: r, children: [
232
206
  d,
233
207
  "Deny"
234
- ] }), e[7] = r, e[8] = f) : f = e[8];
208
+ ] }), e[7] = r, e[8] = p) : p = e[8];
209
+ let f;
210
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ l(Zn, { size: 14 }), e[9] = f) : f = e[9];
235
211
  let m;
236
- e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ a(Jn, { size: 14 }), e[9] = m) : m = e[9];
237
- let p;
238
- e[10] !== o ? (p = /* @__PURE__ */ k(Ze, { size: "xs", colorPalette: "green", onClick: o, children: [
239
- m,
212
+ e[10] !== s ? (m = /* @__PURE__ */ k(Ze, { size: "xs", colorPalette: "green", onClick: s, children: [
213
+ f,
240
214
  "Allow"
241
- ] }), e[10] = o, e[11] = p) : p = e[11];
215
+ ] }), e[10] = s, e[11] = m) : m = e[11];
242
216
  let h;
243
- e[12] !== f || e[13] !== p ? (h = /* @__PURE__ */ k(Me, { gap: "xs", justifyContent: "flex-end", children: [
244
- f,
245
- p
246
- ] }), e[12] = f, e[13] = p, e[14] = h) : h = e[14];
217
+ e[12] !== p || e[13] !== m ? (h = /* @__PURE__ */ k(De, { gap: "xs", justifyContent: "flex-end", children: [
218
+ p,
219
+ m
220
+ ] }), e[12] = p, e[13] = m, e[14] = h) : h = e[14];
247
221
  let g;
248
- return e[15] !== c || e[16] !== u || e[17] !== h ? (g = /* @__PURE__ */ a(I, { px: "sm", py: "xs", mx: "sm", borderWidth: "1px", borderColor: "border.warning", borderRadius: "lg", bg: "bg.warning", children: /* @__PURE__ */ k(Re, { direction: "column", gap: "xs", children: [
222
+ return e[15] !== c || e[16] !== u || e[17] !== h ? (g = /* @__PURE__ */ l(R, { px: "sm", py: "xs", mx: "sm", borderWidth: "1px", borderColor: "border.warning", borderRadius: "lg", bg: "bg.warning", children: /* @__PURE__ */ k(Ee, { direction: "column", gap: "xs", children: [
249
223
  c,
250
224
  u,
251
225
  h
252
226
  ] }) }), e[15] = c, e[16] = u, e[17] = h, e[18] = g) : g = e[18], g;
253
- }, zo = "md", qo = "neutral", ul = (t) => {
227
+ }, zs = "md", qs = "neutral", Ki = (t) => {
254
228
  const e = T(17), {
255
229
  attachments: n,
256
- onSelect: s,
257
- onRemove: o,
230
+ onSelect: o,
231
+ onRemove: s,
258
232
  renderBadge: r,
259
233
  size: i,
260
- tone: l
234
+ tone: a
261
235
  } = t;
262
236
  let c;
263
237
  e[0] !== n ? (c = n === void 0 ? [] : n, e[0] = n, e[1] = c) : c = e[1];
264
- const u = c, d = i === void 0 ? zo : i, f = l === void 0 ? qo : l;
238
+ const u = c, d = i === void 0 ? zs : i, p = a === void 0 ? qs : a;
265
239
  if (u.length === 0)
266
240
  return null;
267
- let m;
268
- if (e[2] !== u || e[3] !== o || e[4] !== s || e[5] !== r || e[6] !== d || e[7] !== f) {
241
+ let f;
242
+ if (e[2] !== u || e[3] !== s || e[4] !== o || e[5] !== r || e[6] !== d || e[7] !== p) {
269
243
  let h;
270
- e[9] !== o || e[10] !== s || e[11] !== r || e[12] !== d || e[13] !== f ? (h = (g) => {
271
- const y = s ? () => s(g) : void 0, b = o ? () => o(g) : void 0;
244
+ e[9] !== s || e[10] !== o || e[11] !== r || e[12] !== d || e[13] !== p ? (h = (g) => {
245
+ const y = o ? () => o(g) : void 0, b = s ? () => s(g) : void 0;
272
246
  if (r) {
273
247
  const x = r({
274
248
  attachmentId: g,
275
249
  onSelect: y,
276
250
  onRemove: b,
277
251
  size: d,
278
- tone: f
252
+ tone: p
279
253
  });
280
- return /* @__PURE__ */ a(So, { children: x }, g);
254
+ return /* @__PURE__ */ l(Ss, { children: x }, g);
281
255
  }
282
- return /* @__PURE__ */ a(qt, { fileName: g, onSelect: y, onRemove: b, size: d, tone: f }, g);
283
- }, e[9] = o, e[10] = s, e[11] = r, e[12] = d, e[13] = f, e[14] = h) : h = e[14], m = u.map(h), e[2] = u, e[3] = o, e[4] = s, e[5] = r, e[6] = d, e[7] = f, e[8] = m;
256
+ return /* @__PURE__ */ l(qt, { fileName: g, onSelect: y, onRemove: b, size: d, tone: p }, g);
257
+ }, e[9] = s, e[10] = o, e[11] = r, e[12] = d, e[13] = p, e[14] = h) : h = e[14], f = u.map(h), e[2] = u, e[3] = s, e[4] = o, e[5] = r, e[6] = d, e[7] = p, e[8] = f;
284
258
  } else
285
- m = e[8];
286
- let p;
287
- return e[15] !== m ? (p = /* @__PURE__ */ a(Y, { marginBottom: "sm", gap: "1", flexDir: "row", flexWrap: "wrap", children: m }), e[15] = m, e[16] = p) : p = e[16], p;
288
- }, Ho = (t) => {
259
+ f = e[8];
260
+ let m;
261
+ return e[15] !== f ? (m = /* @__PURE__ */ l(Z, { marginBottom: "sm", gap: "1", flexDir: "row", flexWrap: "wrap", children: f }), e[15] = f, e[16] = m) : m = e[16], m;
262
+ }, Hs = (t) => {
289
263
  const {
290
264
  previousUserMessageCount: e,
291
265
  userMessageCount: n
292
266
  } = t;
293
267
  return e === 0 ? !1 : n > e;
268
+ }, Qs = (t) => {
269
+ const e = t.conversationKey ?? null;
270
+ return t.state.conversationKey !== e ? {
271
+ shouldScroll: !1,
272
+ state: {
273
+ conversationKey: e,
274
+ userMessageCount: t.userMessageCount
275
+ }
276
+ } : {
277
+ shouldScroll: Hs({
278
+ previousUserMessageCount: t.state.userMessageCount,
279
+ userMessageCount: t.userMessageCount
280
+ }),
281
+ state: {
282
+ conversationKey: e,
283
+ userMessageCount: Math.max(t.state.userMessageCount, t.userMessageCount)
284
+ }
285
+ };
286
+ }, Ws = (t) => {
287
+ const e = Qs(t);
288
+ return e.shouldScroll && t.scrollToBottom("instant"), e;
294
289
  };
295
- function Qo(t) {
296
- const e = T(4), {
297
- userMessageCount: n
290
+ function Ns(t) {
291
+ const e = T(8), {
292
+ conversationKey: n,
293
+ userMessageCount: o
298
294
  } = t, {
299
295
  scrollToBottom: s
300
- } = mt(), o = Ne(n);
301
- let r, i;
302
- return e[0] !== s || e[1] !== n ? (r = () => {
303
- Ho({
304
- previousUserMessageCount: o.current,
305
- userMessageCount: n
306
- }) && s(), o.current = n;
307
- }, i = [n, s], e[0] = s, e[1] = n, e[2] = r, e[3] = i) : (r = e[2], i = e[3]), Ae(r, i), null;
296
+ } = ht(), r = n ?? null;
297
+ let i;
298
+ e[0] !== r || e[1] !== o ? (i = {
299
+ conversationKey: r,
300
+ userMessageCount: o
301
+ }, e[0] = r, e[1] = o, e[2] = i) : i = e[2];
302
+ const a = Le(i);
303
+ let c, u;
304
+ return e[3] !== n || e[4] !== s || e[5] !== o ? (c = () => {
305
+ const d = Ws({
306
+ state: a.current,
307
+ conversationKey: n,
308
+ userMessageCount: o,
309
+ scrollToBottom: s
310
+ });
311
+ a.current = d.state;
312
+ }, u = [n, o, s], e[3] = n, e[4] = s, e[5] = o, e[6] = c, e[7] = u) : (c = e[6], u = e[7]), Pe(c, u), null;
308
313
  }
309
- const mn = (t) => t.trim().length > 0, Wo = (t) => {
314
+ const mn = (t) => t.trim().length > 0, Vs = (t) => {
310
315
  const {
311
316
  isDisabled: e,
312
317
  streaming: n,
313
- text: s
318
+ text: o
314
319
  } = t;
315
- return e || n || !mn(s) ? "none" : "submit";
316
- }, No = (t) => {
320
+ return e || n || !mn(o) ? "none" : "submit";
321
+ }, js = (t) => {
317
322
  const {
318
323
  canInterrupt: e,
319
324
  isDisabled: n,
320
- streaming: s,
321
- text: o
325
+ streaming: o,
326
+ text: s
322
327
  } = t;
323
- return n ? "none" : s ? e ? "interrupt" : "none" : mn(o) ? "submit" : "none";
324
- }, hn = 200, Vo = (t, e = hn) => t.length > 0 && t.split(/\r\n|\r|\n/).length > e, jo = (t) => {
328
+ return n ? "none" : o ? e ? "interrupt" : "none" : mn(s) ? "submit" : "none";
329
+ }, hn = 200, Ks = (t, e = hn) => t.length > 0 && t.split(/\r\n|\r|\n/).length > e, Us = (t) => {
325
330
  const {
326
331
  onAttachFiles: e,
327
332
  onAttachText: n,
328
- textAttachmentPasteLineThreshold: s
333
+ textAttachmentPasteLineThreshold: o
329
334
  } = t;
330
335
  return {
331
- onDragOver: (l) => {
332
- !e || !Array.from(l.dataTransfer.types).includes("Files") || l.preventDefault();
336
+ onDragOver: (a) => {
337
+ !e || !Array.from(a.dataTransfer.types).includes("Files") || a.preventDefault();
333
338
  },
334
- onDropCapture: (l) => {
335
- const c = Array.from(l.dataTransfer.files ?? []);
336
- c.length === 0 || !e || (l.preventDefault(), e(c));
339
+ onDropCapture: (a) => {
340
+ const c = Array.from(a.dataTransfer.files ?? []);
341
+ c.length === 0 || !e || (a.preventDefault(), e(c));
337
342
  },
338
- onPasteCapture: (l) => {
339
- const c = Array.from(l.clipboardData.files ?? []);
343
+ onPasteCapture: (a) => {
344
+ const c = Array.from(a.clipboardData.files ?? []);
340
345
  if (c.length > 0 && e) {
341
- l.preventDefault(), e(c);
346
+ a.preventDefault(), e(c);
342
347
  return;
343
348
  }
344
- const u = l.clipboardData.getData("text/plain");
345
- n && Vo(u, s) && (l.preventDefault(), n(u));
349
+ const u = a.clipboardData.getData("text/plain");
350
+ n && Ks(u, o) && (a.preventDefault(), n(u));
346
351
  }
347
352
  };
348
- }, Uo = (t) => {
353
+ }, Gs = (t) => {
349
354
  t.preventDefault();
350
355
  }, gn = (t) => {
351
356
  const e = T(7), {
352
357
  option: n
353
358
  } = t;
354
- let s;
355
- e[0] !== n.label ? (s = /* @__PURE__ */ a(X, { textStyle: "label/S/regular", color: "fg", children: n.label }), e[0] = n.label, e[1] = s) : s = e[1];
356
359
  let o;
357
- e[2] !== n.description ? (o = n.description ? /* @__PURE__ */ a(X, { textStyle: "label/XS/regular", color: "fg.muted", children: n.description }) : null, e[2] = n.description, e[3] = o) : o = e[3];
360
+ e[0] !== n.label ? (o = /* @__PURE__ */ l(J, { textStyle: "label/S/regular", color: "fg", children: n.label }), e[0] = n.label, e[1] = o) : o = e[1];
361
+ let s;
362
+ e[2] !== n.description ? (s = n.description ? /* @__PURE__ */ l(J, { textStyle: "label/XS/regular", color: "fg.muted", children: n.description }) : null, e[2] = n.description, e[3] = s) : s = e[3];
358
363
  let r;
359
- return e[4] !== s || e[5] !== o ? (r = /* @__PURE__ */ k(Y, { gap: "0", minWidth: "0", children: [
360
- s,
361
- o
362
- ] }), e[4] = s, e[5] = o, e[6] = r) : r = e[6], r;
363
- }, Ko = (t) => {
364
+ return e[4] !== o || e[5] !== s ? (r = /* @__PURE__ */ k(Z, { gap: "0", minWidth: "0", children: [
365
+ o,
366
+ s
367
+ ] }), e[4] = o, e[5] = s, e[6] = r) : r = e[6], r;
368
+ }, Xs = (t) => {
364
369
  const e = T(12), {
365
370
  option: n,
366
- name: s,
367
- checked: o,
371
+ name: o,
372
+ checked: s,
368
373
  editable: r,
369
374
  onToggle: i
370
- } = t, l = !r, c = r ? void 0 : "true";
375
+ } = t, a = !r, c = r ? void 0 : "true";
371
376
  let u;
372
377
  e[0] !== r ? (u = r ? void 0 : {
373
378
  tabIndex: -1
374
379
  }, e[0] = r, e[1] = u) : u = e[1];
375
380
  const d = r ? i : void 0;
381
+ let p;
382
+ e[2] !== n ? (p = /* @__PURE__ */ l(gn, { option: n }), e[2] = n, e[3] = p) : p = e[3];
376
383
  let f;
377
- e[2] !== n ? (f = /* @__PURE__ */ a(gn, { option: n }), e[2] = n, e[3] = f) : f = e[3];
378
- let m;
379
- return e[4] !== o || e[5] !== s || e[6] !== l || e[7] !== c || e[8] !== u || e[9] !== d || e[10] !== f ? (m = /* @__PURE__ */ a(fn, { name: s, checked: o, readOnly: l, "aria-readonly": c, inputProps: u, alignItems: "flex-start", onCheckedChange: d, children: f }), e[4] = o, e[5] = s, e[6] = l, e[7] = c, e[8] = u, e[9] = d, e[10] = f, e[11] = m) : m = e[11], m;
380
- }, Go = (t) => {
384
+ return e[4] !== s || e[5] !== o || e[6] !== a || e[7] !== c || e[8] !== u || e[9] !== d || e[10] !== p ? (f = /* @__PURE__ */ l(fn, { name: o, checked: s, readOnly: a, "aria-readonly": c, inputProps: u, alignItems: "flex-start", onCheckedChange: d, children: p }), e[4] = s, e[5] = o, e[6] = a, e[7] = c, e[8] = u, e[9] = d, e[10] = p, e[11] = f) : f = e[11], f;
385
+ }, Ys = (t) => {
381
386
  const e = T(17), {
382
387
  question: n,
383
- questionIndex: s,
384
- name: o,
388
+ questionIndex: o,
389
+ name: s,
385
390
  selectedOption: r,
386
391
  editable: i,
387
- onToggleOption: l
392
+ onToggleOption: a
388
393
  } = t, c = r ?? null, u = !i, d = i ? void 0 : "true";
394
+ let p;
395
+ e[0] !== i || e[1] !== a || e[2] !== n || e[3] !== o ? (p = i ? (h) => {
396
+ h.value && a?.(n, o, h.value);
397
+ } : void 0, e[0] = i, e[1] = a, e[2] = n, e[3] = o, e[4] = p) : p = e[4];
389
398
  let f;
390
- e[0] !== i || e[1] !== l || e[2] !== n || e[3] !== s ? (f = i ? (h) => {
391
- h.value && l?.(n, s, h.value);
392
- } : void 0, e[0] = i, e[1] = l, e[2] = n, e[3] = s, e[4] = f) : f = e[4];
393
- let m;
394
399
  if (e[5] !== i || e[6] !== n.options) {
395
400
  let h;
396
- e[8] !== i ? (h = (g) => /* @__PURE__ */ a(ko, { value: g.label, inputProps: i ? void 0 : {
401
+ e[8] !== i ? (h = (g) => /* @__PURE__ */ l(ks, { value: g.label, inputProps: i ? void 0 : {
397
402
  tabIndex: -1
398
- }, alignItems: "flex-start", children: /* @__PURE__ */ a(gn, { option: g }) }, g.label), e[8] = i, e[9] = h) : h = e[9], m = n.options.map(h), e[5] = i, e[6] = n.options, e[7] = m;
403
+ }, alignItems: "flex-start", children: /* @__PURE__ */ l(gn, { option: g }) }, g.label), e[8] = i, e[9] = h) : h = e[9], f = n.options.map(h), e[5] = i, e[6] = n.options, e[7] = f;
399
404
  } else
400
- m = e[7];
401
- let p;
402
- return e[10] !== o || e[11] !== c || e[12] !== u || e[13] !== d || e[14] !== f || e[15] !== m ? (p = /* @__PURE__ */ a(Co, { name: o, value: c, readOnly: u, "aria-readonly": d, display: "flex", flexDirection: "column", gap: "xs", onValueChange: f, children: m }), e[10] = o, e[11] = c, e[12] = u, e[13] = d, e[14] = f, e[15] = m, e[16] = p) : p = e[16], p;
403
- }, Xo = (t) => {
405
+ f = e[7];
406
+ let m;
407
+ return e[10] !== s || e[11] !== c || e[12] !== u || e[13] !== d || e[14] !== p || e[15] !== f ? (m = /* @__PURE__ */ l(Cs, { name: s, value: c, readOnly: u, "aria-readonly": d, display: "flex", flexDirection: "column", gap: "xs", onValueChange: p, children: f }), e[10] = s, e[11] = c, e[12] = u, e[13] = d, e[14] = p, e[15] = f, e[16] = m) : m = e[16], m;
408
+ }, Js = (t) => {
404
409
  const e = T(4), {
405
410
  items: n
406
411
  } = t;
407
- let s;
408
- e[0] !== n ? (s = n.map(Yo), e[0] = n, e[1] = s) : s = e[1];
409
412
  let o;
410
- return e[2] !== s ? (o = /* @__PURE__ */ a(Y, { as: "ul", gap: "0", listStyleType: "none", margin: "0", padding: "0", children: s }), e[2] = s, e[3] = o) : o = e[3], o;
413
+ e[0] !== n ? (o = n.map(Zs), e[0] = n, e[1] = o) : o = e[1];
414
+ let s;
415
+ return e[2] !== o ? (s = /* @__PURE__ */ l(Z, { as: "ul", gap: "0", listStyleType: "none", margin: "0", padding: "0", children: o }), e[2] = o, e[3] = s) : s = e[3], s;
411
416
  }, bn = (t) => {
412
417
  const e = T(19), {
413
418
  questions: n,
414
- editable: s,
415
- selectedOptionsByQuestion: o,
419
+ editable: o,
420
+ selectedOptionsByQuestion: s,
416
421
  customAnswersByQuestion: r,
417
422
  onToggleOption: i,
418
- onCustomAnswerChange: l
419
- } = t, c = s === void 0 ? !1 : s;
423
+ onCustomAnswerChange: a
424
+ } = t, c = o === void 0 ? !1 : o;
420
425
  let u;
421
- e[0] !== o ? (u = o === void 0 ? {} : o, e[0] = o, e[1] = u) : u = e[1];
426
+ e[0] !== s ? (u = s === void 0 ? {} : s, e[0] = s, e[1] = u) : u = e[1];
422
427
  const d = u;
423
- let f;
424
- e[2] !== r ? (f = r === void 0 ? {} : r, e[2] = r, e[3] = f) : f = e[3];
425
- const m = f;
426
428
  let p;
427
- if (e[4] !== m || e[5] !== c || e[6] !== l || e[7] !== i || e[8] !== n || e[9] !== d) {
429
+ e[2] !== r ? (p = r === void 0 ? {} : r, e[2] = r, e[3] = p) : p = e[3];
430
+ const f = p;
431
+ let m;
432
+ if (e[4] !== f || e[5] !== c || e[6] !== a || e[7] !== i || e[8] !== n || e[9] !== d) {
428
433
  let g;
429
- e[11] !== m || e[12] !== c || e[13] !== l || e[14] !== i || e[15] !== d ? (g = (y, b) => {
434
+ e[11] !== f || e[12] !== c || e[13] !== a || e[14] !== i || e[15] !== d ? (g = (y, b) => {
430
435
  const x = y.id ?? `question-${b}`, C = y.multiple ? "checkbox" : "radio", A = d[x] ?? [];
431
- return /* @__PURE__ */ k(Y, { as: "fieldset", gap: "xs", borderWidth: "1px", borderColor: "border.muted", borderRadius: "sm", padding: "sm", minWidth: "0", children: [
432
- /* @__PURE__ */ a(X, { as: "legend", textStyle: "label/S/medium", color: "fg", paddingX: "2xs", children: y.question }),
433
- C === "radio" ? /* @__PURE__ */ a(Go, { question: y, questionIndex: b, name: x, selectedOption: A[0], editable: c, onToggleOption: i }) : y.options.map((w) => /* @__PURE__ */ a(Ko, { option: w, name: x, checked: A.includes(w.label), editable: c, onToggle: () => i?.(y, b, w.label) }, w.label)),
434
- y.allowCustomAnswer ? /* @__PURE__ */ a(Wn, { readOnly: !c, "aria-readonly": c ? void 0 : "true", value: m[x] ?? "", placeholder: c ? "Answer..." : "Custom answer", "aria-label": y.question, rows: 2, borderWidth: "1px", borderColor: "border.muted", borderRadius: "sm", padding: "xs", resize: c ? "vertical" : "none", color: "fg", onChange: (w) => l?.(y, b, w.currentTarget.value) }) : null
436
+ return /* @__PURE__ */ k(Z, { as: "fieldset", gap: "xs", borderWidth: "1px", borderColor: "border.subtle", borderRadius: "sm", padding: "sm", minWidth: "0", children: [
437
+ /* @__PURE__ */ l(J, { as: "legend", textStyle: "label/S/medium", color: "fg", paddingX: "2xs", children: y.question }),
438
+ C === "radio" ? /* @__PURE__ */ l(Ys, { question: y, questionIndex: b, name: x, selectedOption: A[0], editable: c, onToggleOption: i }) : y.options.map((w) => /* @__PURE__ */ l(Xs, { option: w, name: x, checked: A.includes(w.label), editable: c, onToggle: () => i?.(y, b, w.label) }, w.label)),
439
+ y.allowCustomAnswer ? /* @__PURE__ */ l(Nn, { readOnly: !c, "aria-readonly": c ? void 0 : "true", value: f[x] ?? "", placeholder: c ? "Answer..." : "Custom answer", "aria-label": y.question, rows: 2, borderWidth: "1px", borderColor: "border.subtle", borderRadius: "sm", padding: "xs", resize: c ? "vertical" : "none", color: "fg", onChange: (w) => a?.(y, b, w.currentTarget.value) }) : null
435
440
  ] }, x);
436
- }, e[11] = m, e[12] = c, e[13] = l, e[14] = i, e[15] = d, e[16] = g) : g = e[16], p = n.map(g), e[4] = m, e[5] = c, e[6] = l, e[7] = i, e[8] = n, e[9] = d, e[10] = p;
441
+ }, e[11] = f, e[12] = c, e[13] = a, e[14] = i, e[15] = d, e[16] = g) : g = e[16], m = n.map(g), e[4] = f, e[5] = c, e[6] = a, e[7] = i, e[8] = n, e[9] = d, e[10] = m;
437
442
  } else
438
- p = e[10];
443
+ m = e[10];
439
444
  let h;
440
- return e[17] !== p ? (h = /* @__PURE__ */ a(Y, { as: "form", gap: "sm", onSubmit: Uo, "aria-label": "Question form", children: p }), e[17] = p, e[18] = h) : h = e[18], h;
445
+ return e[17] !== m ? (h = /* @__PURE__ */ l(Z, { as: "form", gap: "sm", onSubmit: Gs, "aria-label": "Question form", children: m }), e[17] = m, e[18] = h) : h = e[18], h;
441
446
  };
442
- function Yo(t, e) {
443
- return /* @__PURE__ */ a(I, { as: "li", children: /* @__PURE__ */ a(fn, { checked: t.checked, readOnly: !0, "aria-readonly": "true", inputProps: {
447
+ function Zs(t, e) {
448
+ return /* @__PURE__ */ l(R, { as: "li", children: /* @__PURE__ */ l(fn, { checked: t.checked, readOnly: !0, "aria-readonly": "true", inputProps: {
444
449
  tabIndex: -1
445
- }, size: "xs", children: /* @__PURE__ */ a(X, { textStyle: "label/XS/regular", color: "fg", children: t.label }) }) }, `${t.label}-${e}`);
450
+ }, size: "xs", children: /* @__PURE__ */ l(J, { textStyle: "label/XS/regular", color: "fg", children: t.label }) }) }, `${t.label}-${e}`);
446
451
  }
447
- const de = (t, e) => t.id ?? `question-${e}`, Bt = (t) => t ? JSON.stringify(t.questions.map((e, n) => ({
448
- id: de(e, n),
452
+ const he = (t, e) => t.id ?? `question-${e}`, Dt = (t) => t ? JSON.stringify(t.questions.map((e, n) => ({
453
+ id: he(e, n),
449
454
  question: e.question,
450
455
  multiple: !!e.multiple,
451
456
  required: !!e.required,
452
457
  allowCustomAnswer: !!e.allowCustomAnswer,
453
- options: e.options.map((s) => ({
454
- label: s.label,
455
- description: s.description ?? ""
458
+ options: e.options.map((o) => ({
459
+ label: o.label,
460
+ description: o.description ?? ""
456
461
  }))
457
- }))) : "", Jo = (t, e, n) => {
458
- const s = [];
459
- for (let o = 0; o < t.questions.length; o += 1) {
460
- const r = t.questions[o], i = de(r, o), l = e[i] ?? [], c = n[i]?.trim(), u = c ? [...l, c] : l;
461
- u.length !== 0 && s.push(`${r.question}: ${u.join(", ")}`);
462
+ }))) : "", eo = (t, e, n) => {
463
+ const o = [];
464
+ for (let s = 0; s < t.questions.length; s += 1) {
465
+ const r = t.questions[s], i = he(r, s), a = e[i] ?? [], c = n[i]?.trim(), u = c ? [...a, c] : a;
466
+ u.length !== 0 && o.push(`${r.question}: ${u.join(", ")}`);
462
467
  }
463
- return s;
464
- }, Zo = (t) => typeof t != "string", Ht = (t, e) => {
465
- if (Zo(e)) return e;
468
+ return o;
469
+ }, to = (t) => typeof t != "string", Ht = (t, e) => {
470
+ if (to(e)) return e;
466
471
  const n = e.trim();
467
472
  if (n.length === 0) return {};
468
- const s = {};
469
- for (let o = 0; o < t.questions.length; o += 1) {
470
- const r = t.questions[o];
471
- r.allowCustomAnswer && (s[de(r, o)] = n);
473
+ const o = {};
474
+ for (let s = 0; s < t.questions.length; s += 1) {
475
+ const r = t.questions[s];
476
+ r.allowCustomAnswer && (o[he(r, s)] = n);
472
477
  }
473
- return s;
474
- }, es = (t, e, n) => {
478
+ return o;
479
+ }, no = (t, e, n) => {
475
480
  if (!t) return typeof n == "string" ? n.trim() : "";
476
- const s = Ht(t, n), o = Jo(t, e, s), r = typeof n == "string" ? n.trim() : "", i = t.questions.some((l) => l.allowCustomAnswer);
477
- return r.length > 0 && !i && o.push(`Additional response: ${r}`), o.join(`
481
+ const o = Ht(t, n), s = eo(t, e, o), r = typeof n == "string" ? n.trim() : "", i = t.questions.some((a) => a.allowCustomAnswer);
482
+ return r.length > 0 && !i && s.push(`Additional response: ${r}`), s.join(`
478
483
  `);
479
- }, ts = (t, e, n) => {
480
- const s = Ht(t, n);
481
- return t.questions.map((o, r) => {
482
- const i = de(o, r), l = e[i] ?? [], c = s[i]?.trim();
483
- return c ? [...l, c] : l;
484
+ }, so = (t, e, n) => {
485
+ const o = Ht(t, n);
486
+ return t.questions.map((s, r) => {
487
+ const i = he(s, r), a = e[i] ?? [], c = o[i]?.trim();
488
+ return c ? [...a, c] : a;
484
489
  });
485
- }, ns = (t, e, n) => {
490
+ }, oo = (t, e, n) => {
486
491
  if (!t) return !1;
487
- const s = Ht(t, n);
488
- for (let o = 0; o < t.questions.length; o += 1) {
489
- const r = t.questions[o];
492
+ const o = Ht(t, n);
493
+ for (let s = 0; s < t.questions.length; s += 1) {
494
+ const r = t.questions[s];
490
495
  if (!r.required) continue;
491
- const i = de(r, o);
492
- if (!((e[i] ?? []).length > 0) && !(r.allowCustomAnswer && s[i]?.trim()))
496
+ const i = he(r, s);
497
+ if (!((e[i] ?? []).length > 0) && !(r.allowCustomAnswer && o[i]?.trim()))
493
498
  return !0;
494
499
  }
495
500
  return !1;
496
- }, os = (t) => t.questions.map((e, n) => ({
497
- id: de(e, n),
501
+ }, ro = (t) => t.questions.map((e, n) => ({
502
+ id: he(e, n),
498
503
  question: e.question,
499
504
  options: e.options,
500
505
  multiple: !!e.multiple,
501
506
  required: !!e.required,
502
507
  allowCustomAnswer: !!e.allowCustomAnswer
503
- })), ss = (t, e, n, s) => {
504
- const o = de(t, e);
505
- return (n[o] ?? []).length > 0 || !!s[o]?.trim();
506
- }, rs = (t) => {
508
+ })), io = (t, e, n, o) => {
509
+ const s = he(t, e);
510
+ return (n[s] ?? []).length > 0 || !!o[s]?.trim();
511
+ }, lo = (t) => {
507
512
  const e = T(22), {
508
513
  question: n,
509
- sourceQuestion: s,
510
- questionIndex: o,
514
+ sourceQuestion: o,
515
+ questionIndex: s,
511
516
  isActive: r,
512
517
  selectedOptionsByQuestion: i,
513
- customAnswersByQuestion: l,
518
+ customAnswersByQuestion: a,
514
519
  onSelectStep: c
515
520
  } = t;
516
521
  let u;
517
- e[0] !== l || e[1] !== o || e[2] !== i || e[3] !== s ? (u = ss(s, o, i, l), e[0] = l, e[1] = o, e[2] = i, e[3] = s, e[4] = u) : u = e[4];
518
- const d = u, f = d ? "answered" : "not answered", m = r ? "outline" : "ghost", p = `question-step-tab-${n.id}`, h = `${n.question} (${f})`, g = `question-step-panel-${n.id}`;
522
+ e[0] !== a || e[1] !== s || e[2] !== i || e[3] !== o ? (u = io(o, s, i, a), e[0] = a, e[1] = s, e[2] = i, e[3] = o, e[4] = u) : u = e[4];
523
+ const d = u, p = d ? "answered" : "not answered", f = r ? "outline" : "ghost", m = `question-step-tab-${n.id}`, h = `${n.question} (${p})`, g = `question-step-panel-${n.id}`;
519
524
  let y;
520
- e[5] !== c || e[6] !== o ? (y = () => c(o), e[5] = c, e[6] = o, e[7] = y) : y = e[7];
525
+ e[5] !== c || e[6] !== s ? (y = () => c(s), e[5] = c, e[6] = s, e[7] = y) : y = e[7];
521
526
  let b;
522
- e[8] !== d || e[9] !== o ? (b = d ? /* @__PURE__ */ a(ln, { "aria-hidden": "true" }) : o + 1, e[8] = d, e[9] = o, e[10] = b) : b = e[10];
527
+ e[8] !== d || e[9] !== s ? (b = d ? /* @__PURE__ */ l(ln, { "aria-hidden": "true" }) : s + 1, e[8] = d, e[9] = s, e[10] = b) : b = e[10];
523
528
  let x;
524
- e[11] !== r || e[12] !== p || e[13] !== h || e[14] !== g || e[15] !== y || e[16] !== b || e[17] !== m ? (x = /* @__PURE__ */ a(Ze, { id: p, role: "tab", "aria-label": h, "aria-selected": r, "aria-controls": g, size: "xs", variant: m, minW: "8", onClick: y, children: b }), e[11] = r, e[12] = p, e[13] = h, e[14] = g, e[15] = y, e[16] = b, e[17] = m, e[18] = x) : x = e[18];
529
+ e[11] !== r || e[12] !== m || e[13] !== h || e[14] !== g || e[15] !== y || e[16] !== b || e[17] !== f ? (x = /* @__PURE__ */ l(Ze, { id: m, role: "tab", "aria-label": h, "aria-selected": r, "aria-controls": g, size: "xs", variant: f, minW: "8", onClick: y, children: b }), e[11] = r, e[12] = m, e[13] = h, e[14] = g, e[15] = y, e[16] = b, e[17] = f, e[18] = x) : x = e[18];
525
530
  let C;
526
- return e[19] !== n.question || e[20] !== x ? (C = /* @__PURE__ */ a(un, { content: n.question, showArrow: !0, children: x }), e[19] = n.question, e[20] = x, e[21] = C) : C = e[21], C;
527
- }, is = (t) => {
531
+ return e[19] !== n.question || e[20] !== x ? (C = /* @__PURE__ */ l(un, { content: n.question, children: x }), e[19] = n.question, e[20] = x, e[21] = C) : C = e[21], C;
532
+ }, ao = (t) => {
528
533
  const e = T(31), {
529
534
  questionPrompt: n,
530
- selectedOptionsByQuestion: s,
531
- customAnswersByQuestion: o,
535
+ selectedOptionsByQuestion: o,
536
+ customAnswersByQuestion: s,
532
537
  onToggleOption: r,
533
538
  onCustomAnswerChange: i
534
539
  } = t, {
535
- questions: l
536
- } = t, [c, u] = G(0), d = Math.min(c, l.length - 1), f = l[d], m = l.length > 1;
537
- let p;
538
- e[0] !== o || e[1] !== m || e[2] !== n.questions || e[3] !== l || e[4] !== d || e[5] !== s ? (p = m ? /* @__PURE__ */ a(Me, { role: "tablist", "aria-label": "Question steps", gap: "1", minWidth: "0", children: l.map((M, P) => /* @__PURE__ */ a(rs, { question: M, sourceQuestion: n.questions[P], questionIndex: P, isActive: P === d, selectedOptionsByQuestion: s, customAnswersByQuestion: o, onSelectStep: u }, M.id)) }) : null, e[0] = o, e[1] = m, e[2] = n.questions, e[3] = l, e[4] = d, e[5] = s, e[6] = p) : p = e[6];
539
- const h = `question-step-panel-${f.id}`, g = m ? "tabpanel" : void 0, y = m ? `question-step-tab-${f.id}` : void 0;
540
+ questions: a
541
+ } = t, [c, u] = Y(0), d = Math.min(c, a.length - 1), p = a[d], f = a.length > 1;
542
+ let m;
543
+ e[0] !== s || e[1] !== f || e[2] !== n.questions || e[3] !== a || e[4] !== d || e[5] !== o ? (m = f ? /* @__PURE__ */ l(De, { role: "tablist", "aria-label": "Question steps", gap: "1", minWidth: "0", children: a.map((v, M) => /* @__PURE__ */ l(lo, { question: v, sourceQuestion: n.questions[M], questionIndex: M, isActive: M === d, selectedOptionsByQuestion: o, customAnswersByQuestion: s, onSelectStep: u }, v.id)) }) : null, e[0] = s, e[1] = f, e[2] = n.questions, e[3] = a, e[4] = d, e[5] = o, e[6] = m) : m = e[6];
544
+ const h = `question-step-panel-${p.id}`, g = f ? "tabpanel" : void 0, y = f ? `question-step-tab-${p.id}` : void 0;
540
545
  let b;
541
- e[7] !== f ? (b = [f], e[7] = f, e[8] = b) : b = e[8];
546
+ e[7] !== p ? (b = [p], e[7] = p, e[8] = b) : b = e[8];
542
547
  let x;
543
- e[9] !== r || e[10] !== n.questions || e[11] !== d ? (x = (M, P, v) => {
544
- r(n.questions[d], d, v);
548
+ e[9] !== r || e[10] !== n.questions || e[11] !== d ? (x = (v, M, E) => {
549
+ r(n.questions[d], d, E);
545
550
  }, e[9] = r, e[10] = n.questions, e[11] = d, e[12] = x) : x = e[12];
546
551
  let C;
547
- e[13] !== i || e[14] !== n.questions || e[15] !== d ? (C = (M, P, v) => {
548
- i(n.questions[d], d, v);
552
+ e[13] !== i || e[14] !== n.questions || e[15] !== d ? (C = (v, M, E) => {
553
+ i(n.questions[d], d, E);
549
554
  }, e[13] = i, e[14] = n.questions, e[15] = d, e[16] = C) : C = e[16];
550
555
  let A;
551
- e[17] !== o || e[18] !== s || e[19] !== b || e[20] !== x || e[21] !== C ? (A = /* @__PURE__ */ a(bn, { questions: b, editable: !0, selectedOptionsByQuestion: s, customAnswersByQuestion: o, onToggleOption: x, onCustomAnswerChange: C }), e[17] = o, e[18] = s, e[19] = b, e[20] = x, e[21] = C, e[22] = A) : A = e[22];
556
+ e[17] !== s || e[18] !== o || e[19] !== b || e[20] !== x || e[21] !== C ? (A = /* @__PURE__ */ l(bn, { questions: b, editable: !0, selectedOptionsByQuestion: o, customAnswersByQuestion: s, onToggleOption: x, onCustomAnswerChange: C }), e[17] = s, e[18] = o, e[19] = b, e[20] = x, e[21] = C, e[22] = A) : A = e[22];
552
557
  let w;
553
- e[23] !== h || e[24] !== g || e[25] !== y || e[26] !== A ? (w = /* @__PURE__ */ a(Y, { id: h, role: g, "aria-labelledby": y, gap: "0", children: A }), e[23] = h, e[24] = g, e[25] = y, e[26] = A, e[27] = w) : w = e[27];
554
- let _;
555
- return e[28] !== p || e[29] !== w ? (_ = /* @__PURE__ */ k(Y, { gap: "xs", pb: "sm", children: [
556
- p,
558
+ e[23] !== h || e[24] !== g || e[25] !== y || e[26] !== A ? (w = /* @__PURE__ */ l(Z, { id: h, role: g, "aria-labelledby": y, gap: "0", children: A }), e[23] = h, e[24] = g, e[25] = y, e[26] = A, e[27] = w) : w = e[27];
559
+ let I;
560
+ return e[28] !== m || e[29] !== w ? (I = /* @__PURE__ */ k(Z, { gap: "xs", pb: "sm", children: [
561
+ m,
557
562
  w
558
- ] }), e[28] = p, e[29] = w, e[30] = _) : _ = e[30], _;
559
- }, ls = (t) => {
563
+ ] }), e[28] = m, e[29] = w, e[30] = I) : I = e[30], I;
564
+ }, co = (t) => {
560
565
  const e = T(8), {
561
566
  questionPrompt: n
562
567
  } = t;
563
- let s;
564
- e[0] !== n ? (s = os(n), e[0] = n, e[1] = s) : s = e[1];
565
- const o = s;
568
+ let o;
569
+ e[0] !== n ? (o = ro(n), e[0] = n, e[1] = o) : o = e[1];
570
+ const s = o;
566
571
  let r;
567
- e[2] !== n ? (r = Bt(n), e[2] = n, e[3] = r) : r = e[3];
572
+ e[2] !== n ? (r = Dt(n), e[2] = n, e[3] = r) : r = e[3];
568
573
  const i = r;
569
- let l;
570
- return e[4] !== t || e[5] !== i || e[6] !== o ? (l = /* @__PURE__ */ a(is, { ...t, questions: o }, i), e[4] = t, e[5] = i, e[6] = o, e[7] = l) : l = e[7], l;
571
- }, as = (t) => {
574
+ let a;
575
+ return e[4] !== t || e[5] !== i || e[6] !== s ? (a = /* @__PURE__ */ l(ao, { ...t, questions: s }, i), e[4] = t, e[5] = i, e[6] = s, e[7] = a) : a = e[7], a;
576
+ }, uo = (t) => {
572
577
  const e = T(22);
573
- let n, s, o, r;
578
+ let n, o, s, r;
574
579
  e[0] !== t ? ({
575
580
  title: r,
576
- shortcut: o,
581
+ shortcut: s,
577
582
  canInterrupt: n,
578
- ...s
579
- } = t, e[0] = t, e[1] = n, e[2] = s, e[3] = o, e[4] = r) : (n = e[1], s = e[2], o = e[3], r = e[4]);
580
- const i = s["aria-label"] ?? r;
581
- let l;
582
- e[5] !== n ? (l = n ? /* @__PURE__ */ a(Zn, { size: 16, strokeWidth: 2, fill: "currentColor" }) : /* @__PURE__ */ a(eo, { size: 16, strokeWidth: 2 }), e[5] = n, e[6] = l) : l = e[6];
583
- const c = l;
583
+ ...o
584
+ } = t, e[0] = t, e[1] = n, e[2] = o, e[3] = s, e[4] = r) : (n = e[1], o = e[2], s = e[3], r = e[4]);
585
+ const i = o["aria-label"] ?? r;
586
+ let a;
587
+ e[5] !== n ? (a = n ? /* @__PURE__ */ l(es, { size: 16, strokeWidth: 2, fill: "currentColor" }) : /* @__PURE__ */ l(ts, { size: 16, strokeWidth: 2 }), e[5] = n, e[6] = a) : a = e[6];
588
+ const c = a;
584
589
  let u;
585
- e[7] !== i || e[8] !== c || e[9] !== s || e[10] !== r ? (u = /* @__PURE__ */ a(Ft, { "data-testid": "send-message-button", size: "sm", variant: "primary", borderRadius: "full", "aria-label": i, title: r, ...s, children: c }), e[7] = i, e[8] = c, e[9] = s, e[10] = r, e[11] = u) : u = e[11];
590
+ e[7] !== i || e[8] !== c || e[9] !== o || e[10] !== r ? (u = /* @__PURE__ */ l(Ft, { "data-testid": "send-message-button", size: "sm", variant: "primary", borderRadius: "full", "aria-label": i, title: r, ...o, children: c }), e[7] = i, e[8] = c, e[9] = o, e[10] = r, e[11] = u) : u = e[11];
586
591
  const d = u;
587
592
  if (r) {
588
- let f;
589
- e[12] !== o || e[13] !== r ? (f = o ? /* @__PURE__ */ k($t, { children: [
593
+ let p;
594
+ e[12] !== s || e[13] !== r ? (p = s ? /* @__PURE__ */ k($t, { children: [
590
595
  r,
591
596
  " ",
592
- /* @__PURE__ */ a(Vn, { fontSize: "xs", children: o })
593
- ] }) : r, e[12] = o, e[13] = r, e[14] = f) : f = e[14];
594
- const m = f;
595
- let p;
596
- e[15] !== d ? (p = /* @__PURE__ */ a(dt.Trigger, { asChild: !0, children: d }), e[15] = d, e[16] = p) : p = e[16];
597
+ /* @__PURE__ */ l(jn, { fontSize: "xs", children: s })
598
+ ] }) : r, e[12] = s, e[13] = r, e[14] = p) : p = e[14];
599
+ const f = p;
600
+ let m;
601
+ e[15] !== d ? (m = /* @__PURE__ */ l(ft.Trigger, { asChild: !0, children: d }), e[15] = d, e[16] = m) : m = e[16];
597
602
  let h;
598
- e[17] !== m ? (h = /* @__PURE__ */ a(Nn, { children: /* @__PURE__ */ a(dt.Positioner, { children: /* @__PURE__ */ a(dt.Content, { children: m }) }) }), e[17] = m, e[18] = h) : h = e[18];
603
+ e[17] !== f ? (h = /* @__PURE__ */ l(Vn, { children: /* @__PURE__ */ l(ft.Positioner, { children: /* @__PURE__ */ l(ft.Content, { children: f }) }) }), e[17] = f, e[18] = h) : h = e[18];
599
604
  let g;
600
- return e[19] !== p || e[20] !== h ? (g = /* @__PURE__ */ k(dt.Root, { closeDelay: 50, openDelay: 100, children: [
601
- p,
605
+ return e[19] !== m || e[20] !== h ? (g = /* @__PURE__ */ k(ft.Root, { closeDelay: 50, openDelay: 100, children: [
606
+ m,
602
607
  h
603
- ] }), e[19] = p, e[20] = h, e[21] = g) : g = e[21], g;
608
+ ] }), e[19] = m, e[20] = h, e[21] = g) : g = e[21], g;
604
609
  }
605
610
  return d;
606
- }, cs = (t) => {
611
+ }, fo = (t) => {
607
612
  const e = T(2), {
608
613
  placeholder: n
609
614
  } = t;
610
615
  if (!n)
611
616
  return null;
612
- let s;
613
- return e[0] !== n ? (s = /* @__PURE__ */ a(X, { textStyle: "label/M/regular", color: "fg.subtle", pointerEvents: "none", position: "absolute", top: "0", children: n }), e[0] = n, e[1] = s) : s = e[1], s;
614
- }, us = (t) => {
615
- const e = T(101), {
617
+ let o;
618
+ return e[0] !== n ? (o = /* @__PURE__ */ l(J, { textStyle: "label/M/regular", color: "fg.subtle", pointerEvents: "none", position: "absolute", top: "0", children: n }), e[0] = n, e[1] = o) : o = e[1], o;
619
+ }, Et = "border.accent-light", po = (t) => {
620
+ const e = T(100), {
616
621
  defaultState: n,
617
- onSubmit: s,
618
- onInterrupt: o,
622
+ onSubmit: o,
623
+ onInterrupt: s,
619
624
  onAttachFiles: r,
620
625
  onAttachText: i,
621
- textAttachmentPasteLineThreshold: l,
626
+ textAttachmentPasteLineThreshold: a,
622
627
  streaming: c,
623
628
  attachedResources: u,
624
629
  onClearAttachments: d,
625
- isDisabled: f,
626
- onChange: m,
627
- placeholder: p,
630
+ isDisabled: p,
631
+ onChange: f,
632
+ placeholder: m,
628
633
  attachmentList: h,
629
634
  actions: g,
630
635
  attachedToTop: y,
631
636
  questionPrompt: b,
632
637
  autoFocus: x
633
- } = t, C = s === void 0 ? ds : s, A = l === void 0 ? hn : l, w = c === void 0 ? !1 : c;
634
- let _;
635
- e[0] !== u ? (_ = u === void 0 ? [] : u, e[0] = u, e[1] = _) : _ = e[1];
636
- const M = _, P = f === void 0 ? !1 : f, v = y === void 0 ? !1 : y, L = x === void 0 ? !1 : x, [q, J] = G(!1), [B, ve] = G(n), [je, Le] = G(0);
637
- let he;
638
- e[2] !== n ? (he = () => Et(n), e[2] = n, e[3] = he) : he = e[3];
639
- const [F, z] = G(he);
640
- let ee;
641
- e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ee = {}, e[4] = ee) : ee = e[4];
642
- const [E, ge] = G(ee);
643
- let be;
644
- e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (be = {}, e[5] = be) : be = e[5];
645
- const [O, De] = G(be), Ue = Ne(null), Ke = Ne(m);
646
- let Be;
647
- e[6] !== b ? (Be = Bt(b), e[6] = b, e[7] = Be) : Be = e[7];
648
- const Ie = Ne(Be);
649
- let te, Ge;
650
- e[8] !== m ? (te = () => {
651
- Ke.current = m;
652
- }, Ge = [m], e[8] = m, e[9] = te, e[10] = Ge) : (te = e[9], Ge = e[10]), Ae(te, Ge);
653
- let ye, ne;
654
- e[11] !== n ? (ye = () => {
655
- const R = Et(n);
656
- ve(n), Le(fs), z(R), ge({}), De({}), Ke.current?.(R);
657
- }, ne = [n], e[11] = n, e[12] = ye, e[13] = ne) : (ye = e[12], ne = e[13]), Ae(ye, ne);
638
+ } = t, C = o === void 0 ? mo : o, A = a === void 0 ? hn : a, w = c === void 0 ? !1 : c;
639
+ let I;
640
+ e[0] !== u ? (I = u === void 0 ? [] : u, e[0] = u, e[1] = I) : I = e[1];
641
+ const v = I, M = p === void 0 ? !1 : p, E = y === void 0 ? !1 : y, L = x === void 0 ? !1 : x, [z, Q] = Y(!1), [P, N] = Y(n), [ee, oe] = Y(0);
658
642
  let xe;
659
- e[14] !== b ? (xe = Bt(b), e[14] = b, e[15] = xe) : xe = e[15];
660
- const oe = xe;
661
- let se, re;
662
- e[16] !== oe ? (se = () => {
663
- Ie.current !== oe && (Ie.current = oe, ge({}), De({}));
664
- }, re = [oe], e[16] = oe, e[17] = se, e[18] = re) : (se = e[17], re = e[18]), Ae(se, re);
665
- let Oe;
666
- e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Oe = () => {
667
- const R = Ue.current?.querySelector('[contenteditable="true"]');
668
- R instanceof HTMLElement && R.focus();
669
- }, e[19] = Oe) : Oe = e[19];
670
- const ie = Oe;
671
- let Se, Q;
672
- e[20] !== L ? (Se = () => {
643
+ e[2] !== n ? (xe = () => Pt(n), e[2] = n, e[3] = xe) : xe = e[3];
644
+ const [q, H] = Y(xe);
645
+ let te;
646
+ e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (te = {}, e[4] = te) : te = e[4];
647
+ const [B, V] = Y(te);
648
+ let Se;
649
+ e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Se = {}, e[5] = Se) : Se = e[5];
650
+ const [O, Te] = Y(Se), Ke = Le(null), Ue = Le(f);
651
+ let $e;
652
+ e[6] !== b ? ($e = Dt(b), e[6] = b, e[7] = $e) : $e = e[7];
653
+ const nt = Le($e);
654
+ let re, ie;
655
+ e[8] !== f ? (re = () => {
656
+ Ue.current = f;
657
+ }, ie = [f], e[8] = f, e[9] = re, e[10] = ie) : (re = e[9], ie = e[10]), Pe(re, ie);
658
+ let Ge, we;
659
+ e[11] !== n ? (Ge = () => {
660
+ const _ = Pt(n);
661
+ N(n), oe(ho), H(_), V({}), Te({}), Ue.current?.(_);
662
+ }, we = [n], e[11] = n, e[12] = Ge, e[13] = we) : (Ge = e[12], we = e[13]), Pe(Ge, we);
663
+ let le;
664
+ e[14] !== b ? (le = Dt(b), e[14] = b, e[15] = le) : le = e[15];
665
+ const ae = le;
666
+ let ke, ce;
667
+ e[16] !== ae ? (ke = () => {
668
+ nt.current !== ae && (nt.current = ae, V({}), Te({}));
669
+ }, ce = [ae], e[16] = ae, e[17] = ke, e[18] = ce) : (ke = e[17], ce = e[18]), Pe(ke, ce);
670
+ let ue;
671
+ e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ue = () => {
672
+ const _ = Ke.current?.querySelector('[contenteditable="true"]');
673
+ _ instanceof HTMLElement && _.focus();
674
+ }, e[19] = ue) : ue = e[19];
675
+ const st = ue;
676
+ let Ce, j;
677
+ e[20] !== L ? (Ce = () => {
673
678
  if (!L)
674
679
  return;
675
- const R = requestAnimationFrame(() => {
676
- const ke = Ue.current?.querySelector('[contenteditable="true"]');
677
- ke instanceof HTMLElement && ke.focus(), J(!0);
680
+ const _ = requestAnimationFrame(() => {
681
+ const Ie = Ke.current?.querySelector('[contenteditable="true"]');
682
+ Ie instanceof HTMLElement && Ie.focus(), Q(!0);
678
683
  });
679
- return () => cancelAnimationFrame(R);
680
- }, Q = [L], e[20] = L, e[21] = Se, e[22] = Q) : (Se = e[21], Q = e[22]), Ae(Se, Q);
681
- let W;
682
- e[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (W = () => {
683
- J(!0), ie();
684
- }, e[23] = W) : W = e[23];
685
- const Te = W;
686
- let N;
687
- e[24] !== n ? (N = (R) => {
688
- const ke = R === void 0 ? !1 : R;
689
- ve(n), Le(ps);
690
- const ce = Et(n);
691
- z(ce), ge({}), De({}), Ke.current?.(ce), ke && requestAnimationFrame(() => {
692
- ie();
684
+ return () => cancelAnimationFrame(_);
685
+ }, j = [L], e[20] = L, e[21] = Ce, e[22] = j) : (Ce = e[21], j = e[22]), Pe(Ce, j);
686
+ let Ae;
687
+ e[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Ae = () => {
688
+ Q(!0), st();
689
+ }, e[23] = Ae) : Ae = e[23];
690
+ const _e = Ae;
691
+ let K;
692
+ e[24] !== n ? (K = (_) => {
693
+ const Ie = _ === void 0 ? !1 : _;
694
+ N(n), oe(go);
695
+ const pe = Pt(n);
696
+ H(pe), V({}), Te({}), Ue.current?.(pe), Ie && requestAnimationFrame(() => {
697
+ st();
693
698
  });
694
- }, e[24] = n, e[25] = N) : N = e[25];
695
- const Z = N, V = w && !!o;
696
- let $, D, j;
697
- if (e[26] !== V || e[27] !== O || e[28] !== P || e[29] !== b || e[30] !== E || e[31] !== w || e[32] !== F) {
698
- D = b ? es(b, E, O) : F.trim();
699
- const R = ns(b, E, O);
700
- $ = {
701
- canInterrupt: V,
702
- isDisabled: P || R,
699
+ }, e[24] = n, e[25] = K) : K = e[25];
700
+ const ne = K, $ = w && !!s;
701
+ let F, W, U;
702
+ if (e[26] !== $ || e[27] !== O || e[28] !== M || e[29] !== b || e[30] !== B || e[31] !== w || e[32] !== q) {
703
+ W = b ? no(b, B, O) : q.trim();
704
+ const _ = oo(b, B, O);
705
+ F = {
706
+ canInterrupt: $,
707
+ isDisabled: M || _,
703
708
  streaming: w,
704
- text: D
705
- }, j = No($), e[26] = V, e[27] = O, e[28] = P, e[29] = b, e[30] = E, e[31] = w, e[32] = F, e[33] = $, e[34] = D, e[35] = j;
709
+ text: W
710
+ }, U = js(F), e[26] = $, e[27] = O, e[28] = M, e[29] = b, e[30] = B, e[31] = w, e[32] = q, e[33] = F, e[34] = W, e[35] = U;
706
711
  } else
707
- $ = e[33], D = e[34], j = e[35];
708
- const U = j;
709
- let le;
710
- e[36] !== M || e[37] !== O || e[38] !== d || e[39] !== C || e[40] !== b || e[41] !== Z || e[42] !== D || e[43] !== E ? (le = () => {
711
- if (!D)
712
+ F = e[33], W = e[34], U = e[35];
713
+ const G = U;
714
+ let X;
715
+ e[36] !== v || e[37] !== O || e[38] !== d || e[39] !== C || e[40] !== b || e[41] !== ne || e[42] !== W || e[43] !== B ? (X = () => {
716
+ if (!W)
712
717
  return;
713
- const R = b ? {
714
- answers: ts(b, E, O)
718
+ const _ = b ? {
719
+ answers: so(b, B, O)
715
720
  } : void 0;
716
- C(D, M, R), Z(!0), d?.();
717
- }, e[36] = M, e[37] = O, e[38] = d, e[39] = C, e[40] = b, e[41] = Z, e[42] = D, e[43] = E, e[44] = le) : le = e[44];
718
- const H = le;
719
- let we;
720
- e[45] !== o || e[46] !== H ? (we = (R) => {
721
- if (R === "interrupt") {
722
- o?.();
721
+ C(W, v, _), ne(!0), d?.();
722
+ }, e[36] = v, e[37] = O, e[38] = d, e[39] = C, e[40] = b, e[41] = ne, e[42] = W, e[43] = B, e[44] = X) : X = e[44];
723
+ const se = X;
724
+ let de;
725
+ e[45] !== s || e[46] !== se ? (de = (_) => {
726
+ if (_ === "interrupt") {
727
+ s?.();
723
728
  return;
724
729
  }
725
- R === "submit" && H();
726
- }, e[45] = o, e[46] = H, e[47] = we) : we = e[47];
727
- const K = we;
728
- let nt;
729
- e[48] !== $ || e[49] !== K ? (nt = () => K(Wo($)), e[48] = $, e[49] = K, e[50] = nt) : nt = e[50];
730
- const xt = nt;
730
+ _ === "submit" && se();
731
+ }, e[45] = s, e[46] = se, e[47] = de) : de = e[47];
732
+ const D = de;
733
+ let Fe;
734
+ e[48] !== F || e[49] !== D ? (Fe = () => D(Vs(F)), e[48] = F, e[49] = D, e[50] = Fe) : Fe = e[50];
735
+ const Re = Fe;
731
736
  let ot;
732
- e[51] !== U || e[52] !== K ? (ot = () => K(U), e[51] = U, e[52] = K, e[53] = ot) : ot = e[53];
737
+ e[51] !== G || e[52] !== D ? (ot = () => D(G), e[51] = G, e[52] = D, e[53] = ot) : ot = e[53];
733
738
  const St = ot;
734
- let st;
735
- e[54] !== r || e[55] !== i || e[56] !== A ? (st = jo({
739
+ let rt;
740
+ e[54] !== r || e[55] !== i || e[56] !== A ? (rt = Us({
736
741
  onAttachFiles: r,
737
742
  onAttachText: i,
738
743
  textAttachmentPasteLineThreshold: A
739
- }), e[54] = r, e[55] = i, e[56] = A, e[57] = st) : st = e[57];
740
- const ae = st;
741
- let rt;
742
- e[58] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (rt = (R, ke, ce) => {
743
- const Xe = de(R, ke);
744
- ge((Ye) => {
745
- const Mt = Ye[Xe] ?? [], jt = Mt.includes(ce);
746
- return R.multiple ? {
744
+ }), e[54] = r, e[55] = i, e[56] = A, e[57] = rt) : rt = e[57];
745
+ const fe = rt;
746
+ let it;
747
+ e[58] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (it = (_, Ie, pe) => {
748
+ const Xe = he(_, Ie);
749
+ V((Ye) => {
750
+ const Mt = Ye[Xe] ?? [], jt = Mt.includes(pe);
751
+ return _.multiple ? {
747
752
  ...Ye,
748
- [Xe]: jt ? Mt.filter((Fn) => Fn !== ce) : [...Mt, ce]
753
+ [Xe]: jt ? Mt.filter((zn) => zn !== pe) : [...Mt, pe]
749
754
  } : {
750
755
  ...Ye,
751
- [Xe]: jt ? [] : [ce]
756
+ [Xe]: jt ? [] : [pe]
752
757
  };
753
758
  });
754
- }, e[58] = rt) : rt = e[58];
755
- const On = rt;
756
- let it;
757
- e[59] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (it = (R, ke, ce) => {
758
- const Xe = de(R, ke);
759
- De((Ye) => ({
759
+ }, e[58] = it) : it = e[58];
760
+ const $n = it;
761
+ let lt;
762
+ e[59] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (lt = (_, Ie, pe) => {
763
+ const Xe = he(_, Ie);
764
+ Te((Ye) => ({
760
765
  ...Ye,
761
- [Xe]: ce
766
+ [Xe]: pe
762
767
  }));
763
- }, e[59] = it) : it = e[59];
764
- const $n = it, Tt = v ? "-1px" : void 0, wt = v ? "0" : void 0, kt = q ? "blue.border" : "border.muted", Ct = q ? "mid" : "low", At = q ? 1 : 0, _t = q ? "blue.border" : "border";
765
- let $e;
766
- e[60] !== _t ? ($e = {
767
- borderColor: _t,
768
- boxShadow: "mid",
769
- zIndex: 1
770
- }, e[60] = _t, e[61] = $e) : $e = e[61];
771
- let lt;
772
- e[62] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (lt = {
773
- borderColor: "blue.border",
774
- boxShadow: "mid",
768
+ }, e[59] = lt) : lt = e[59];
769
+ const Fn = lt, Tt = E ? "-1px" : void 0, wt = E ? "0" : void 0, kt = z ? Et : "border", Ct = z ? 1 : 0, At = z ? Et : "border";
770
+ let ze;
771
+ e[60] !== At ? (ze = {
772
+ borderColor: At,
775
773
  zIndex: 1
776
- }, e[62] = lt) : lt = e[62];
774
+ }, e[60] = At, e[61] = ze) : ze = e[61];
777
775
  let at;
778
- e[63] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (at = () => J(!1), e[63] = at) : at = e[63];
779
- let Fe;
780
- e[64] !== h ? (Fe = h ? /* @__PURE__ */ a(I, { mb: "xs", children: h }) : null, e[64] = h, e[65] = Fe) : Fe = e[65];
781
- let ze;
782
- e[66] !== O || e[67] !== je || e[68] !== B || e[69] !== xt || e[70] !== P || e[71] !== m || e[72] !== p || e[73] !== b || e[74] !== E ? (ze = b ? /* @__PURE__ */ a(ls, { questionPrompt: b, selectedOptionsByQuestion: E, customAnswersByQuestion: O, onToggleOption: On, onCustomAnswerChange: $n }) : /* @__PURE__ */ a(ht, { maxH: "10rem", showHorizontalScrollbar: !1, contentProps: {
783
- pr: "2xs"
784
- }, children: /* @__PURE__ */ a(To, { defaultState: B, isEditable: !P, placeholder: /* @__PURE__ */ a(cs, { placeholder: p }), onChange: (R) => {
785
- z(R), m?.(R);
786
- }, onSubmit: xt }, je) }), e[66] = O, e[67] = je, e[68] = B, e[69] = xt, e[70] = P, e[71] = m, e[72] = p, e[73] = b, e[74] = E, e[75] = ze) : ze = e[75];
776
+ e[62] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (at = {
777
+ borderColor: Et,
778
+ zIndex: 1
779
+ }, e[62] = at) : at = e[62];
787
780
  let ct;
788
- e[76] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ct = /* @__PURE__ */ a(jn, {}), e[76] = ct) : ct = e[76];
789
- const Rt = V ? "Stop Response" : "Message Sending", It = w ? void 0 : "Enter", Pt = U === "none";
781
+ e[63] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ct = () => Q(!1), e[63] = ct) : ct = e[63];
790
782
  let qe;
791
- e[77] !== V || e[78] !== St || e[79] !== Rt || e[80] !== It || e[81] !== Pt ? (qe = /* @__PURE__ */ a(as, { canInterrupt: V, title: Rt, shortcut: It, onClick: St, disabled: Pt }), e[77] = V, e[78] = St, e[79] = Rt, e[80] = It, e[81] = Pt, e[82] = qe) : qe = e[82];
783
+ e[64] !== h ? (qe = h ? /* @__PURE__ */ l(R, { mb: "xs", children: h }) : null, e[64] = h, e[65] = qe) : qe = e[65];
792
784
  let He;
793
- e[83] !== g || e[84] !== qe ? (He = /* @__PURE__ */ k(Me, { gap: "1", mt: "md", children: [
794
- g,
795
- ct,
796
- qe
797
- ] }), e[83] = g, e[84] = qe, e[85] = He) : He = e[85];
798
- let Qe;
799
- e[86] !== Fe || e[87] !== ze || e[88] !== He ? (Qe = /* @__PURE__ */ k(Re, { direction: "column", color: "fg", children: [
800
- Fe,
801
- ze,
802
- He
803
- ] }), e[86] = Fe, e[87] = ze, e[88] = He, e[89] = Qe) : Qe = e[89];
785
+ e[66] !== O || e[67] !== ee || e[68] !== P || e[69] !== Re || e[70] !== M || e[71] !== f || e[72] !== m || e[73] !== b || e[74] !== B ? (He = b ? /* @__PURE__ */ l(co, { questionPrompt: b, selectedOptionsByQuestion: B, customAnswersByQuestion: O, onToggleOption: $n, onCustomAnswerChange: Fn }) : /* @__PURE__ */ l(gt, { maxH: "10rem", showHorizontalScrollbar: !1, contentProps: {
786
+ pr: "2xs"
787
+ }, children: /* @__PURE__ */ l(Ts, { defaultState: P, isEditable: !M, placeholder: /* @__PURE__ */ l(fo, { placeholder: m }), onChange: (_) => {
788
+ H(_), f?.(_);
789
+ }, onSubmit: Re }, ee) }), e[66] = O, e[67] = ee, e[68] = P, e[69] = Re, e[70] = M, e[71] = f, e[72] = m, e[73] = b, e[74] = B, e[75] = He) : He = e[75];
804
790
  let ut;
805
- return e[90] !== ae.onDragOver || e[91] !== ae.onDropCapture || e[92] !== ae.onPasteCapture || e[93] !== Tt || e[94] !== wt || e[95] !== kt || e[96] !== Ct || e[97] !== At || e[98] !== $e || e[99] !== Qe ? (ut = /* @__PURE__ */ a(I, { ref: Ue, position: "relative", width: "100%", paddingX: "xs", paddingY: "xs", mt: Tt, bg: "bg", borderRadius: "md", borderTopRadius: wt, borderWidth: "1px", borderStyle: "solid", borderColor: kt, boxShadow: Ct, zIndex: At, transition: "box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out", _hover: $e, _focusWithin: lt, onPasteCapture: ae.onPasteCapture, onDropCapture: ae.onDropCapture, onDragOver: ae.onDragOver, onClick: Te, onBlur: at, children: Qe }), e[90] = ae.onDragOver, e[91] = ae.onDropCapture, e[92] = ae.onPasteCapture, e[93] = Tt, e[94] = wt, e[95] = kt, e[96] = Ct, e[97] = At, e[98] = $e, e[99] = Qe, e[100] = ut) : ut = e[100], ut;
791
+ e[76] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ut = /* @__PURE__ */ l(Kn, {}), e[76] = ut) : ut = e[76];
792
+ const _t = $ ? "Stop Response" : "Message Sending", Rt = w ? void 0 : "Enter", It = G === "none";
793
+ let Qe;
794
+ e[77] !== $ || e[78] !== St || e[79] !== _t || e[80] !== Rt || e[81] !== It ? (Qe = /* @__PURE__ */ l(uo, { canInterrupt: $, title: _t, shortcut: Rt, onClick: St, disabled: It }), e[77] = $, e[78] = St, e[79] = _t, e[80] = Rt, e[81] = It, e[82] = Qe) : Qe = e[82];
795
+ let We;
796
+ e[83] !== g || e[84] !== Qe ? (We = /* @__PURE__ */ k(De, { gap: "1", mt: "md", children: [
797
+ g,
798
+ ut,
799
+ Qe
800
+ ] }), e[83] = g, e[84] = Qe, e[85] = We) : We = e[85];
801
+ let Ne;
802
+ e[86] !== qe || e[87] !== He || e[88] !== We ? (Ne = /* @__PURE__ */ k(Ee, { direction: "column", color: "fg", children: [
803
+ qe,
804
+ He,
805
+ We
806
+ ] }), e[86] = qe, e[87] = He, e[88] = We, e[89] = Ne) : Ne = e[89];
807
+ let dt;
808
+ return e[90] !== fe.onDragOver || e[91] !== fe.onDropCapture || e[92] !== fe.onPasteCapture || e[93] !== Tt || e[94] !== wt || e[95] !== kt || e[96] !== Ct || e[97] !== ze || e[98] !== Ne ? (dt = /* @__PURE__ */ l(R, { ref: Ke, position: "relative", width: "100%", paddingX: "xs", paddingY: "xs", mt: Tt, bg: "bg", borderRadius: "xs", borderTopRadius: wt, borderWidth: "1px", borderStyle: "solid", borderColor: kt, zIndex: Ct, transition: "border-color 0.2s ease-in-out", _hover: ze, _focusWithin: at, onPasteCapture: fe.onPasteCapture, onDropCapture: fe.onDropCapture, onDragOver: fe.onDragOver, onClick: _e, onBlur: ct, children: Ne }), e[90] = fe.onDragOver, e[91] = fe.onDropCapture, e[92] = fe.onPasteCapture, e[93] = Tt, e[94] = wt, e[95] = kt, e[96] = Ct, e[97] = ze, e[98] = Ne, e[99] = dt) : dt = e[99], dt;
806
809
  };
807
- function ds() {
810
+ function mo() {
808
811
  }
809
- function fs(t) {
812
+ function ho(t) {
810
813
  return t + 1;
811
814
  }
812
- function ps(t) {
815
+ function go(t) {
813
816
  return t + 1;
814
817
  }
815
- const ms = (t = "") => JSON.stringify(wo(t)), hs = 360, gs = 4, bs = "min(10vh, 4rem)", yn = "min(70dvh, calc(100dvh - 12rem), 22rem)", Lt = 1, ys = (t) => t.parts.reduce((e, n) => n.type !== "text" ? e : {
818
+ const bo = (t = "") => JSON.stringify(ws(t)), yn = {
819
+ animationName: "message-fade-in",
820
+ animationDuration: "200ms",
821
+ animationTimingFunction: "ease-out"
822
+ }, yo = (t) => {
823
+ const e = /* @__PURE__ */ new Set(), n = new Set(t.state.seenKeys);
824
+ for (const o of t.itemKeys)
825
+ t.state.initialized && !n.has(o) && e.add(o), n.add(o);
826
+ return {
827
+ animatedKeys: e,
828
+ state: {
829
+ initialized: !0,
830
+ seenKeys: n
831
+ }
832
+ };
833
+ }, xo = (t, e) => {
834
+ if (t.length !== e.length) return !1;
835
+ for (let n = 0; n < t.length; n += 1) if (t[n] !== e[n]) return !1;
836
+ return !0;
837
+ }, So = (t) => {
838
+ const e = Le({
839
+ initialized: !1,
840
+ seenKeys: /* @__PURE__ */ new Set()
841
+ }), n = Le(null);
842
+ if (n.current && xo(n.current.itemKeys, t))
843
+ return n.current.animatedKeys;
844
+ const o = yo({
845
+ itemKeys: t,
846
+ state: e.current
847
+ });
848
+ return e.current = o.state, n.current = {
849
+ itemKeys: [...t],
850
+ animatedKeys: o.animatedKeys
851
+ }, o.animatedKeys;
852
+ }, To = 360, wo = 4, ko = "min(10vh, 4rem)", xn = "min(70dvh, calc(100dvh - 12rem), 22rem)", Lt = 1, Co = (t) => t.parts.reduce((e, n) => n.type !== "text" ? e : {
816
853
  lineCount: e.lineCount + n.text.split(/\r\n|\r|\n/).length,
817
854
  textLength: e.textLength + n.text.length
818
855
  }, {
819
856
  lineCount: 0,
820
857
  textLength: 0
821
- }), xs = (t) => {
858
+ }), Ao = (t) => {
822
859
  if (t.role !== "user") return !1;
823
860
  const {
824
861
  lineCount: e,
825
862
  textLength: n
826
- } = ys(t);
827
- return n > hs || e > gs;
828
- }, Ss = (t, e) => {
863
+ } = Co(t);
864
+ return n > To || e > wo;
865
+ }, _o = (t, e) => {
829
866
  const n = Math.max(0, t.scrollHeight - t.clientHeight);
830
867
  return e === 0 || n <= Lt ? !1 : e < 0 ? t.scrollTop > Lt : t.scrollTop < n - Lt;
831
- }, Ts = (t) => t.type === "text", ws = (t) => (t.parts ?? []).filter(Ts).map((e) => e.text.trim()).filter(Boolean).join(`
868
+ }, Ro = (t) => t.type === "text", Io = (t) => (t.parts ?? []).filter(Ro).map((e) => e.text.trim()).filter(Boolean).join(`
832
869
 
833
- `), ks = (t, e, n) => t.createdAt ? new Intl.DateTimeFormat(e, {
870
+ `), Mo = (t, e, n) => t.createdAt ? new Intl.DateTimeFormat(e, {
834
871
  hour: "numeric",
835
872
  minute: "2-digit",
836
873
  timeZone: n
837
874
  }).format(new Date(t.createdAt)) : "", Ot = (t) => {
838
875
  const e = T(20), {
839
876
  message: n,
840
- alwaysVisible: s,
841
- copyAlwaysVisible: o
842
- } = t, r = s === void 0 ? !1 : s, i = o === void 0 ? r : o, [l, c] = G(!1), u = Ne(null);
877
+ alwaysVisible: o,
878
+ copyAlwaysVisible: s
879
+ } = t, r = o === void 0 ? !1 : o, i = s === void 0 ? r : s, [a, c] = Y(!1), u = Le(null);
843
880
  let d;
844
- e[0] !== n ? (d = ws(n), e[0] = n, e[1] = d) : d = e[1];
845
- const f = d;
846
- let m;
847
- e[2] !== n ? (m = ks(n), e[2] = n, e[3] = m) : m = e[3];
848
- const p = m;
881
+ e[0] !== n ? (d = Io(n), e[0] = n, e[1] = d) : d = e[1];
882
+ const p = d;
883
+ let f;
884
+ e[2] !== n ? (f = Mo(n), e[2] = n, e[3] = f) : f = e[3];
885
+ const m = f;
849
886
  let h, g;
850
887
  e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = () => () => {
851
888
  u.current !== null && window.clearTimeout(u.current);
852
- }, g = [], e[4] = h, e[5] = g) : (h = e[4], g = e[5]), Ae(h, g);
889
+ }, g = [], e[4] = h, e[5] = g) : (h = e[4], g = e[5]), Pe(h, g);
853
890
  let y;
854
- e[6] !== f ? (y = async () => {
855
- if (f)
891
+ e[6] !== p ? (y = async () => {
892
+ if (p)
856
893
  try {
857
- await navigator.clipboard.writeText(f), c(!0), u.current !== null && window.clearTimeout(u.current), u.current = window.setTimeout(() => c(!1), 1200);
894
+ await navigator.clipboard.writeText(p), c(!0), u.current !== null && window.clearTimeout(u.current), u.current = window.setTimeout(() => c(!1), 1200);
858
895
  } catch {
859
896
  c(!1);
860
897
  }
861
- }, e[6] = f, e[7] = y) : y = e[7];
898
+ }, e[6] = p, e[7] = y) : y = e[7];
862
899
  const b = y;
863
- if (!f && !p)
900
+ if (!p && !m)
864
901
  return null;
865
902
  const x = r ? "1" : "0", C = r ? "auto" : "none";
866
903
  let A;
867
- e[8] !== p ? (A = p ? /* @__PURE__ */ a(X, { textStyle: "label/XS/regular", color: "fg.muted", children: p }) : null, e[8] = p, e[9] = A) : A = e[9];
904
+ e[8] !== m ? (A = m ? /* @__PURE__ */ l(J, { textStyle: "label/XS/regular", color: "fg.muted", children: m }) : null, e[8] = m, e[9] = A) : A = e[9];
868
905
  let w;
869
- e[10] !== i || e[11] !== b || e[12] !== f || e[13] !== l ? (w = f ? /* @__PURE__ */ a(I, { opacity: i ? "1" : "0", pointerEvents: i ? "auto" : "none", transition: "opacity 120ms ease", css: Gt, children: /* @__PURE__ */ a(un, { content: l ? "Copied" : "Copy message", children: /* @__PURE__ */ a(Ft, { "aria-label": l ? "Copied" : "Copy message", variant: "ghost", size: "2xs", onClick: b, children: l ? /* @__PURE__ */ a(ln, { size: 12 }) : /* @__PURE__ */ a(to, { size: 12 }) }) }) }) : null, e[10] = i, e[11] = b, e[12] = f, e[13] = l, e[14] = w) : w = e[14];
870
- let _;
871
- return e[15] !== w || e[16] !== x || e[17] !== C || e[18] !== A ? (_ = /* @__PURE__ */ k(Me, { "data-chat-message-action-panel": "true", gap: "2xs", minH: "6", opacity: x, pointerEvents: C, transition: "opacity 120ms ease", css: Gt, children: [
906
+ e[10] !== i || e[11] !== b || e[12] !== p || e[13] !== a ? (w = p ? /* @__PURE__ */ l(R, { opacity: i ? "1" : "0", pointerEvents: i ? "auto" : "none", transition: "opacity 120ms ease", css: Gt, children: /* @__PURE__ */ l(un, { content: a ? "Copied" : "Copy message", children: /* @__PURE__ */ l(Ft, { "aria-label": a ? "Copied" : "Copy message", variant: "ghost", size: "2xs", onClick: b, children: a ? /* @__PURE__ */ l(ln, { size: 12 }) : /* @__PURE__ */ l(ns, { size: 12 }) }) }) }) : null, e[10] = i, e[11] = b, e[12] = p, e[13] = a, e[14] = w) : w = e[14];
907
+ let I;
908
+ return e[15] !== w || e[16] !== x || e[17] !== C || e[18] !== A ? (I = /* @__PURE__ */ k(De, { "data-chat-message-action-panel": "true", gap: "2xs", minH: "6", opacity: x, pointerEvents: C, transition: "opacity 120ms ease", css: Gt, children: [
872
909
  A,
873
910
  w
874
- ] }), e[15] = w, e[16] = x, e[17] = C, e[18] = A, e[19] = _) : _ = e[19], _;
911
+ ] }), e[15] = w, e[16] = x, e[17] = C, e[18] = A, e[19] = I) : I = e[19], I;
875
912
  }, Gt = {
876
913
  "[data-chat-message-with-actions]:hover &, [data-chat-message-with-actions]:focus-within &": {
877
914
  opacity: 1,
@@ -885,44 +922,44 @@ const ms = (t = "") => JSON.stringify(wo(t)), hs = 360, gs = 4, bs = "min(10vh,
885
922
  opacity: 1,
886
923
  pointerEvents: "auto"
887
924
  }
888
- }, Cs = (t) => {
925
+ }, Po = (t) => {
889
926
  const e = T(8);
890
- let n, s;
927
+ let n, o;
891
928
  e[0] !== t ? ({
892
929
  children: n,
893
- ...s
894
- } = t, e[0] = t, e[1] = n, e[2] = s) : (n = e[1], s = e[2]);
895
- let o;
896
- e[3] !== n ? (o = /* @__PURE__ */ a(dn, { defaultState: n, fullWidth: !0 }), e[3] = n, e[4] = o) : o = e[4];
930
+ ...o
931
+ } = t, e[0] = t, e[1] = n, e[2] = o) : (n = e[1], o = e[2]);
932
+ let s;
933
+ e[3] !== n ? (s = /* @__PURE__ */ l(dn, { defaultState: n, fullWidth: !0 }), e[3] = n, e[4] = s) : s = e[4];
897
934
  let r;
898
- return e[5] !== s || e[6] !== o ? (r = /* @__PURE__ */ a(I, { ...s, children: o }), e[5] = s, e[6] = o, e[7] = r) : r = e[7], r;
899
- }, As = Cs, gt = (t) => t.replace(/^tool-/i, "").replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[\s-]+/g, "_").toLowerCase(), _s = (t) => {
900
- const e = gt(t), n = e.replace(/_/g, "");
935
+ return e[5] !== o || e[6] !== s ? (r = /* @__PURE__ */ l(R, { ...o, children: s }), e[5] = o, e[6] = s, e[7] = r) : r = e[7], r;
936
+ }, vo = Po, bt = (t) => t.replace(/^tool-/i, "").replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[\s-]+/g, "_").toLowerCase(), Eo = (t) => {
937
+ const e = bt(t), n = e.replace(/_/g, "");
901
938
  return [.../* @__PURE__ */ new Set([t, e, n])];
902
- }, xn = {
939
+ }, Sn = {
903
940
  shell: an,
904
- ls: co,
905
- read_file: ao,
906
- write_file: lo,
907
- delete_file: io,
908
- patch: ro,
909
- upload_files: so,
910
- download_file: oo,
911
- move_file: no
912
- }, Rs = {
913
- dot: go,
941
+ ls: us,
942
+ read_file: cs,
943
+ write_file: as,
944
+ delete_file: ls,
945
+ patch: is,
946
+ upload_files: rs,
947
+ download_file: os,
948
+ move_file: ss
949
+ }, Lo = {
950
+ dot: gs,
914
951
  danger: cn,
915
- search: ho,
916
- browser: mo,
917
- file: po,
918
- question: fo,
919
- todo: uo,
952
+ search: hs,
953
+ browser: ms,
954
+ file: ps,
955
+ question: fs,
956
+ todo: ds,
920
957
  terminal: an,
921
- ...xn
922
- }, Xt = "dot", Is = (t) => Object.hasOwn(xn, t), Ps = (t) => Rs[t], Sn = (t) => {
958
+ ...Sn
959
+ }, Xt = "dot", Bo = (t) => Object.hasOwn(Sn, t), Do = (t) => Lo[t], Tn = (t) => {
923
960
  if (!t) return Xt;
924
- const e = gt(t);
925
- if (Is(e)) return e;
961
+ const e = bt(t);
962
+ if (Bo(e)) return e;
926
963
  const n = e.replace(/_/g, "");
927
964
  switch (e) {
928
965
  case "read":
@@ -956,45 +993,45 @@ function Qt(t) {
956
993
  const e = t.lastIndexOf("/");
957
994
  return e >= 0 ? t.slice(e + 1) : t;
958
995
  }
959
- function ft(t) {
996
+ function pt(t) {
960
997
  if (!t) return null;
961
998
  const e = t.split(" ")[0].trim();
962
999
  if (e === "/dev/null") return null;
963
1000
  let n = e;
964
1001
  return (n.startsWith("a/") || n.startsWith("b/")) && (n = n.slice(2)), n.replace(/^\/+/, "").replace(/\\/g, "/");
965
1002
  }
966
- const bt = (t) => t.startsWith("--- "), Wt = (t) => t.startsWith("+++ "), Nt = (t) => t.startsWith("@@"), Ms = (t) => t.startsWith("+") && !(Wt(t) || t === "+++"), Es = (t) => t.startsWith("-") && !(bt(t) || t === "---"), vs = (t, e) => {
1003
+ const yt = (t) => t.startsWith("--- "), Wt = (t) => t.startsWith("+++ "), Nt = (t) => t.startsWith("@@"), Oo = (t) => t.startsWith("+") && !(Wt(t) || t === "+++"), $o = (t) => t.startsWith("-") && !(yt(t) || t === "---"), Fo = (t, e) => {
967
1004
  t.has(e) || t.set(e, {
968
1005
  additions: 0,
969
1006
  deletions: 0
970
1007
  });
971
- }, Ls = (t, e) => {
1008
+ }, zo = (t, e) => {
972
1009
  const n = t.get(e);
973
1010
  n && (n.additions += 1);
974
- }, Ds = (t, e) => {
1011
+ }, qo = (t, e) => {
975
1012
  const n = t.get(e);
976
1013
  n && (n.deletions += 1);
977
- }, Bs = (t, e, n) => {
978
- if (bt(t))
1014
+ }, Ho = (t, e, n) => {
1015
+ if (yt(t))
979
1016
  return {
980
1017
  ...e,
981
- lastMinusHeader: ft(t.slice(4)),
1018
+ lastMinusHeader: pt(t.slice(4)),
982
1019
  inHunk: !1
983
1020
  };
984
1021
  if (Wt(t)) {
985
- const o = ft(t.slice(4)) ?? e.lastMinusHeader;
986
- return o && vs(n, o), {
1022
+ const s = pt(t.slice(4)) ?? e.lastMinusHeader;
1023
+ return s && Fo(n, s), {
987
1024
  ...e,
988
- currentPath: o,
1025
+ currentPath: s,
989
1026
  inHunk: !1
990
1027
  };
991
1028
  }
992
1029
  return e.currentPath ? Nt(t) ? {
993
1030
  ...e,
994
1031
  inHunk: !0
995
- } : e.inHunk ? Ms(t) ? (Ls(n, e.currentPath), e) : (Es(t) && Ds(n, e.currentPath), e) : e : e;
1032
+ } : e.inHunk ? Oo(t) ? (zo(n, e.currentPath), e) : ($o(t) && qo(n, e.currentPath), e) : e : e;
996
1033
  };
997
- function Tn(t) {
1034
+ function wn(t) {
998
1035
  if (!t || typeof t != "string") return [];
999
1036
  const e = /* @__PURE__ */ new Map();
1000
1037
  let n = {
@@ -1002,20 +1039,20 @@ function Tn(t) {
1002
1039
  lastMinusHeader: null,
1003
1040
  inHunk: !1
1004
1041
  };
1005
- const s = t.split(/\r?\n/);
1006
- for (const o of s)
1007
- n = Bs(o, n, e);
1008
- return Array.from(e.entries()).map(([o, {
1042
+ const o = t.split(/\r?\n/);
1043
+ for (const s of o)
1044
+ n = Ho(s, n, e);
1045
+ return Array.from(e.entries()).map(([s, {
1009
1046
  additions: r,
1010
1047
  deletions: i
1011
1048
  }]) => ({
1012
- filePath: o,
1049
+ filePath: s,
1013
1050
  additions: r,
1014
1051
  deletions: i
1015
1052
  }));
1016
1053
  }
1017
- function Os(t) {
1018
- return Tn(t).map((e) => ({
1054
+ function Qo(t) {
1055
+ return wn(t).map((e) => ({
1019
1056
  kind: "diff",
1020
1057
  fileName: Qt(e.filePath),
1021
1058
  filePath: e.filePath,
@@ -1023,13 +1060,13 @@ function Os(t) {
1023
1060
  deletions: e.deletions
1024
1061
  }));
1025
1062
  }
1026
- function $s(t) {
1027
- return Tn(t).map((e) => e.filePath);
1063
+ function Wo(t) {
1064
+ return wn(t).map((e) => e.filePath);
1028
1065
  }
1029
- const wn = (t) => bt(t) || t.startsWith("diff --git "), Fs = (t) => t.startsWith(" ") || t.startsWith("+") || t.startsWith("-") ? !1 : t.trim() !== "", zs = (t, e, n) => {
1066
+ const kn = (t) => yt(t) || t.startsWith("diff --git "), No = (t) => t.startsWith(" ") || t.startsWith("+") || t.startsWith("-") ? !1 : t.trim() !== "", Vo = (t, e, n) => {
1030
1067
  if (t.startsWith(" ")) {
1031
- const s = t.slice(1);
1032
- e.push(s), n.push(s);
1068
+ const o = t.slice(1);
1069
+ e.push(o), n.push(o);
1033
1070
  return;
1034
1071
  }
1035
1072
  if (t.startsWith("-")) {
@@ -1037,30 +1074,30 @@ const wn = (t) => bt(t) || t.startsWith("diff --git "), Fs = (t) => t.startsWith
1037
1074
  return;
1038
1075
  }
1039
1076
  t.startsWith("+") && n.push(t.slice(1));
1040
- }, qs = (t, e, n, s) => {
1041
- let o = e;
1042
- for (; o < t.length; ) {
1043
- const r = t[o] || "";
1044
- if (wn(r) || Nt(r) || Fs(r))
1077
+ }, jo = (t, e, n, o) => {
1078
+ let s = e;
1079
+ for (; s < t.length; ) {
1080
+ const r = t[s] || "";
1081
+ if (kn(r) || Nt(r) || No(r))
1045
1082
  break;
1046
- zs(r, n, s), o += 1;
1083
+ Vo(r, n, o), s += 1;
1047
1084
  }
1048
- return (n.length > 0 || s.length > 0) && (n.push(""), s.push("")), o;
1049
- }, Hs = (t, e) => {
1050
- const n = ft((t[e] || "").slice(4)), s = t[e + 1] || "";
1051
- if (!Wt(s)) return {
1085
+ return (n.length > 0 || o.length > 0) && (n.push(""), o.push("")), s;
1086
+ }, Ko = (t, e) => {
1087
+ const n = pt((t[e] || "").slice(4)), o = t[e + 1] || "";
1088
+ if (!Wt(o)) return {
1052
1089
  nextIndex: e + 1
1053
1090
  };
1054
- const r = ft(s.slice(4)) ?? n ?? "", i = [], l = [];
1091
+ const r = pt(o.slice(4)) ?? n ?? "", i = [], a = [];
1055
1092
  let c = e + 2;
1056
1093
  for (; c < t.length; ) {
1057
1094
  const u = t[c] || "";
1058
- if (wn(u)) break;
1095
+ if (kn(u)) break;
1059
1096
  if (!Nt(u)) {
1060
1097
  c += 1;
1061
1098
  continue;
1062
1099
  }
1063
- c = qs(t, c + 1, i, l);
1100
+ c = jo(t, c + 1, i, a);
1064
1101
  }
1065
1102
  return {
1066
1103
  nextIndex: c,
@@ -1068,30 +1105,30 @@ const wn = (t) => bt(t) || t.startsWith("diff --git "), Fs = (t) => t.startsWith
1068
1105
  filePath: r,
1069
1106
  original: i.join(`
1070
1107
  `),
1071
- modified: l.join(`
1108
+ modified: a.join(`
1072
1109
  `)
1073
1110
  }
1074
1111
  };
1075
1112
  };
1076
- function Qs(t) {
1113
+ function Uo(t) {
1077
1114
  if (!t || typeof t != "string") return [];
1078
1115
  const e = t.split(/\r?\n/), n = [];
1079
- let s = 0;
1080
- for (; s < e.length; ) {
1081
- const o = e[s] || "";
1082
- if (!bt(o)) {
1083
- s += 1;
1116
+ let o = 0;
1117
+ for (; o < e.length; ) {
1118
+ const s = e[o] || "";
1119
+ if (!yt(s)) {
1120
+ o += 1;
1084
1121
  continue;
1085
1122
  }
1086
1123
  const {
1087
1124
  nextIndex: r,
1088
1125
  preview: i
1089
- } = Hs(e, s);
1090
- i && n.push(i), s = Math.max(r, s + 1);
1126
+ } = Ko(e, o);
1127
+ i && n.push(i), o = Math.max(r, o + 1);
1091
1128
  }
1092
1129
  return n;
1093
1130
  }
1094
- const Ws = {
1131
+ const Go = {
1095
1132
  apply_patch: "Apply patch",
1096
1133
  bash: "Run command",
1097
1134
  edit: "Edit file",
@@ -1109,126 +1146,126 @@ const Ws = {
1109
1146
  running: "running",
1110
1147
  completed: "completed",
1111
1148
  failed: "failed"
1112
- }, kn = (t) => t.replace(/^tool-/, "").toLowerCase(), Ns = (t) => t.split(" ").filter((e) => e.length > 0).map((e) => e[0].toUpperCase() + e.slice(1)).join(" "), Vs = (t) => kn(t.tool ?? "tool"), js = (t) => {
1113
- const e = kn(t);
1114
- return Ws[e] ?? Ns(e.replace(/_/g, " "));
1115
- }, Us = (t) => {
1149
+ }, Cn = (t) => t.replace(/^tool-/, "").toLowerCase(), Xo = (t) => t.split(" ").filter((e) => e.length > 0).map((e) => e[0].toUpperCase() + e.slice(1)).join(" "), Yo = (t) => Cn(t.tool ?? "tool"), Jo = (t) => {
1150
+ const e = Cn(t);
1151
+ return Go[e] ?? Xo(e.replace(/_/g, " "));
1152
+ }, Zo = (t) => {
1116
1153
  const e = t.state?.status ?? t.status;
1117
1154
  if (!e || typeof e != "string") return null;
1118
1155
  const n = e.replace(/-/g, "_");
1119
1156
  return Yt[n] ? Yt[n] : n.includes("stream") ? "running" : null;
1120
- }, Cn = (t) => {
1157
+ }, An = (t) => {
1121
1158
  const e = t.state?.status ?? t.status;
1122
1159
  return e === "error" || e === "output-error" || e === "failed";
1123
- }, fe = (t) => Cn(t) ? {
1160
+ }, ge = (t) => An(t) ? {
1124
1161
  type: "icon",
1125
1162
  icon: "danger"
1126
1163
  } : {
1127
1164
  type: "icon",
1128
- icon: Sn(Vs(t))
1129
- }, pe = (t, e, n) => {
1130
- const o = [{
1165
+ icon: Tn(Yo(t))
1166
+ }, be = (t, e, n) => {
1167
+ const s = [{
1131
1168
  kind: "text",
1132
- text: n ?? js(t.tool ?? "tool"),
1169
+ text: n ?? Jo(t.tool ?? "tool"),
1133
1170
  bold: !0
1134
1171
  }];
1135
- e && o.push({
1172
+ e && s.push({
1136
1173
  kind: "text",
1137
1174
  text: e,
1138
1175
  muted: !0
1139
1176
  });
1140
- const r = Us(t);
1141
- return r && r !== "completed" && o.push({
1177
+ const r = Zo(t);
1178
+ return r && r !== "completed" && s.push({
1142
1179
  kind: "text",
1143
1180
  text: r,
1144
1181
  muted: !0
1145
- }), o;
1146
- }, Ee = (t) => {
1182
+ }), s;
1183
+ }, Oe = (t) => {
1147
1184
  const e = t.state?.input;
1148
1185
  return !e || typeof e != "object" || Array.isArray(e) ? null : e;
1149
1186
  }, et = (t) => {
1150
1187
  const e = t.state?.output;
1151
1188
  return !e || typeof e != "object" || Array.isArray(e) ? null : e;
1152
- }, S = (t) => typeof t == "string" && t.trim().length > 0 ? t : null, pt = (t) => !t || typeof t != "object" || Array.isArray(t) ? null : t, Ks = (t, e) => {
1153
- const n = pt(t.state);
1154
- return n ? pt(n[e]) : null;
1155
- }, Gs = (t) => t.replace(/\\/g, "/").replace(/^\/+/, ""), Xs = (t) => t.includes("--- ") && t.includes("+++ ") && t.includes("@@"), An = (t) => {
1189
+ }, S = (t) => typeof t == "string" && t.trim().length > 0 ? t : null, mt = (t) => !t || typeof t != "object" || Array.isArray(t) ? null : t, er = (t, e) => {
1190
+ const n = mt(t.state);
1191
+ return n ? mt(n[e]) : null;
1192
+ }, tr = (t) => t.replace(/\\/g, "/").replace(/^\/+/, ""), nr = (t) => t.includes("--- ") && t.includes("+++ ") && t.includes("@@"), _n = (t) => {
1156
1193
  const e = et(t);
1157
- return [Ks(t, "metadata"), pt(e?.metadata)].filter(Boolean);
1158
- }, Ys = (t) => {
1159
- const e = pt(t);
1194
+ return [er(t, "metadata"), mt(e?.metadata)].filter(Boolean);
1195
+ }, sr = (t) => {
1196
+ const e = mt(t);
1160
1197
  if (!e) return null;
1161
1198
  const n = S(e.filePath) ?? S(e.relativePath) ?? S(e.path);
1162
1199
  return n ? {
1163
- filePath: Gs(n),
1200
+ filePath: tr(n),
1164
1201
  additions: typeof e.additions == "number" ? e.additions : 0,
1165
1202
  deletions: typeof e.deletions == "number" ? e.deletions : 0,
1166
1203
  diff: S(e.diff) ?? void 0,
1167
1204
  before: S(e.before) ?? void 0,
1168
1205
  after: S(e.after) ?? void 0
1169
1206
  } : null;
1170
- }, _n = (t) => {
1207
+ }, Rn = (t) => {
1171
1208
  const e = [];
1172
- for (const n of An(t)) {
1173
- const s = Array.isArray(n.files) ? n.files : [];
1174
- for (const o of s) {
1175
- const r = Ys(o);
1209
+ for (const n of _n(t)) {
1210
+ const o = Array.isArray(n.files) ? n.files : [];
1211
+ for (const s of o) {
1212
+ const r = sr(s);
1176
1213
  r && e.push(r);
1177
1214
  }
1178
1215
  }
1179
1216
  return e;
1180
- }, Js = (t) => {
1181
- const e = Ee(t), n = S(e?.diff);
1217
+ }, or = (t) => {
1218
+ const e = Oe(t), n = S(e?.diff);
1182
1219
  if (n) return n;
1183
- for (const r of An(t)) {
1220
+ for (const r of _n(t)) {
1184
1221
  const i = S(r.diff);
1185
1222
  if (i) return i;
1186
1223
  }
1187
- const s = _n(t).map((r) => r.diff).filter((r) => !!r);
1188
- if (s.length > 0) return s.join(`
1224
+ const o = Rn(t).map((r) => r.diff).filter((r) => !!r);
1225
+ if (o.length > 0) return o.join(`
1189
1226
  `);
1190
- const o = S(e?.patchText);
1191
- return o && Xs(o) ? o : null;
1192
- }, Zs = (t) => {
1227
+ const s = S(e?.patchText);
1228
+ return s && nr(s) ? s : null;
1229
+ }, rr = (t) => {
1193
1230
  const e = /* @__PURE__ */ new Set(), n = [];
1194
- for (const s of t)
1195
- e.has(s.filePath) || (e.add(s.filePath), n.push({
1231
+ for (const o of t)
1232
+ e.has(o.filePath) || (e.add(o.filePath), n.push({
1196
1233
  kind: "diff",
1197
- fileName: Qt(s.filePath),
1198
- filePath: s.filePath,
1199
- additions: s.additions,
1200
- deletions: s.deletions
1234
+ fileName: Qt(o.filePath),
1235
+ filePath: o.filePath,
1236
+ additions: o.additions,
1237
+ deletions: o.deletions
1201
1238
  }));
1202
1239
  return n;
1203
- }, er = (t) => Array.from(new Set(t.map((e) => e.filePath))), yt = (t) => {
1240
+ }, ir = (t) => Array.from(new Set(t.map((e) => e.filePath))), xt = (t) => {
1204
1241
  const e = et(t);
1205
1242
  return S(t.state?.output) ?? S(e?.returnDisplay) ?? S(e?.preview) ?? S(e?.stdout) ?? S(e?.content);
1206
- }, tr = (t) => {
1243
+ }, lr = (t) => {
1207
1244
  const e = t.match(/<skill_content(?:\s+name="([^"]+)")?>([\s\S]*?)<\/skill_content>/);
1208
1245
  return e ? {
1209
1246
  skillName: S(e[1]) ?? void 0,
1210
1247
  content: S(e[2]) ?? ""
1211
1248
  } : null;
1212
- }, nr = (t) => {
1213
- const e = Ee(t);
1249
+ }, ar = (t) => {
1250
+ const e = Oe(t);
1214
1251
  return S(e?.name) ?? S(e?.skillName) ?? S(e?.skill) ?? S(e?.skill_name) ?? void 0;
1215
- }, Rn = (t) => ({
1252
+ }, In = (t) => ({
1216
1253
  kind: "link",
1217
1254
  text: Qt(t),
1218
1255
  filePath: t
1219
- }), me = (t, e) => !Cn(t) || !t.state?.errorText ? e : [{
1256
+ }), ye = (t, e) => !An(t) || !t.state?.errorText ? e : [{
1220
1257
  type: "comment",
1221
1258
  text: t.state.errorText
1222
- }, ...e], In = (t) => Qs(t ?? void 0).map((e) => ({
1259
+ }, ...e], Mn = (t) => Uo(t ?? void 0).map((e) => ({
1223
1260
  type: "diff",
1224
1261
  language: "diff",
1225
1262
  original: e.original,
1226
1263
  modified: e.modified,
1227
1264
  sideBySide: !1
1228
- })), or = (t) => Os(t ?? void 0), sr = (t) => $s(t ?? void 0), rr = (t) => {
1229
- const e = Js(t), n = _n(t), s = pe(t, void 0, "Apply patch"), o = or(e);
1230
- o.length > 0 ? s.push(...o) : s.push(...Zs(n));
1231
- const r = [...In(e)];
1265
+ })), cr = (t) => Qo(t ?? void 0), ur = (t) => Wo(t ?? void 0), dr = (t) => {
1266
+ const e = or(t), n = Rn(t), o = be(t, void 0, "Apply patch"), s = cr(e);
1267
+ s.length > 0 ? o.push(...s) : o.push(...rr(n));
1268
+ const r = [...Mn(e)];
1232
1269
  if (r.length === 0)
1233
1270
  for (const i of n)
1234
1271
  !i.before && !i.after || r.push({
@@ -1239,170 +1276,170 @@ const Ws = {
1239
1276
  sideBySide: !1
1240
1277
  });
1241
1278
  if (r.length === 0) {
1242
- const i = sr(e);
1243
- i.length === 0 && i.push(...er(n)), i.length > 0 && r.push({
1279
+ const i = ur(e);
1280
+ i.length === 0 && i.push(...ir(n)), i.length > 0 && r.push({
1244
1281
  type: "references",
1245
1282
  references: i
1246
1283
  });
1247
1284
  }
1248
1285
  return {
1249
- indicator: fe(t),
1250
- title: s,
1251
- blocks: me(t, r)
1286
+ indicator: ge(t),
1287
+ title: o,
1288
+ blocks: ye(t, r)
1252
1289
  };
1253
- }, ir = (t, e) => [{
1290
+ }, fr = (t, e) => [{
1254
1291
  type: "diff",
1255
1292
  language: "text",
1256
1293
  original: t,
1257
1294
  modified: e,
1258
1295
  sideBySide: !1
1259
- }], lr = (t) => {
1260
- const e = Ee(t), n = et(t), s = S(e?.filePath) ?? S(e?.file_path) ?? S(n?.filePath) ?? void 0, o = S(n?.oldString) ?? S(e?.old_string) ?? void 0, r = S(n?.newString) ?? S(e?.new_string) ?? void 0, i = pe(t, void 0, "Edit file");
1261
- s && i.push(Rn(s));
1262
- const l = o !== void 0 && r !== void 0 ? ir(o, r) : In(S(n?.diff));
1296
+ }], pr = (t) => {
1297
+ const e = Oe(t), n = et(t), o = S(e?.filePath) ?? S(e?.file_path) ?? S(n?.filePath) ?? void 0, s = S(n?.oldString) ?? S(e?.old_string) ?? void 0, r = S(n?.newString) ?? S(e?.new_string) ?? void 0, i = be(t, void 0, "Edit file");
1298
+ o && i.push(In(o));
1299
+ const a = s !== void 0 && r !== void 0 ? fr(s, r) : Mn(S(n?.diff));
1263
1300
  return {
1264
- indicator: fe(t),
1301
+ indicator: ge(t),
1265
1302
  title: i,
1266
- blocks: me(t, l)
1303
+ blocks: ye(t, a)
1267
1304
  };
1268
- }, tt = (t) => typeof t == "object" && t !== null && !Array.isArray(t), ar = (t) => {
1305
+ }, tt = (t) => typeof t == "object" && t !== null && !Array.isArray(t), mr = (t) => {
1269
1306
  try {
1270
1307
  const e = JSON.parse(t);
1271
1308
  return tt(e) ? e : null;
1272
1309
  } catch {
1273
1310
  return null;
1274
1311
  }
1275
- }, cr = (t) => tt(t) ? t : typeof t == "string" && t.trim().length > 0 ? ar(t) : null, Ve = (t) => typeof t == "string" && t.trim().length > 0 ? t : null, Pe = (t) => {
1276
- const e = Ve(t);
1312
+ }, hr = (t) => tt(t) ? t : typeof t == "string" && t.trim().length > 0 ? mr(t) : null, je = (t) => typeof t == "string" && t.trim().length > 0 ? t : null, Be = (t) => {
1313
+ const e = je(t);
1277
1314
  if (e) return e;
1278
1315
  if (Array.isArray(t)) {
1279
- const n = t.map(Pe).filter((s) => s !== null);
1316
+ const n = t.map(Be).filter((o) => o !== null);
1280
1317
  return n.length > 0 ? n.join(`
1281
1318
  `) : null;
1282
1319
  }
1283
- return tt(t) ? Pe(t.response) ?? Pe(t.answer) ?? Pe(t.text) ?? Pe(t.answers) : null;
1284
- }, ur = (t) => {
1320
+ return tt(t) ? Be(t.response) ?? Be(t.answer) ?? Be(t.text) ?? Be(t.answers) : null;
1321
+ }, gr = (t) => {
1285
1322
  if (typeof t == "string" && t.trim().length > 0)
1286
1323
  return {
1287
1324
  label: t,
1288
1325
  description: void 0
1289
1326
  };
1290
1327
  if (!tt(t)) return null;
1291
- const e = Ve(t.label);
1328
+ const e = je(t.label);
1292
1329
  return e ? {
1293
1330
  label: e,
1294
- description: Ve(t.description) ?? void 0
1331
+ description: je(t.description) ?? void 0
1295
1332
  } : null;
1296
- }, dr = (t, e) => {
1333
+ }, br = (t, e) => {
1297
1334
  if (!tt(t)) return null;
1298
- const n = Ve(t.question);
1335
+ const n = je(t.question);
1299
1336
  if (!n) return null;
1300
- const s = Array.isArray(t.options) ? t.options.map(ur).filter((i) => i !== null) : [], o = Ve(t.type), r = typeof t.custom == "boolean" ? t.custom : typeof t.allowCustomAnswer == "boolean" ? t.allowCustomAnswer : o === "freeform" || o === "text";
1301
- return s.length === 0 && !r ? null : {
1302
- id: Ve(t.id) ?? `question-${e}`,
1337
+ const o = Array.isArray(t.options) ? t.options.map(gr).filter((i) => i !== null) : [], s = je(t.type), r = typeof t.custom == "boolean" ? t.custom : typeof t.allowCustomAnswer == "boolean" ? t.allowCustomAnswer : s === "freeform" || s === "text";
1338
+ return o.length === 0 && !r ? null : {
1339
+ id: je(t.id) ?? `question-${e}`,
1303
1340
  question: n,
1304
- options: s,
1305
- multiple: typeof t.multiple == "boolean" ? t.multiple : o === "multi_choice" || o === "multiple_choice",
1341
+ options: o,
1342
+ multiple: typeof t.multiple == "boolean" ? t.multiple : s === "multi_choice" || s === "multiple_choice",
1306
1343
  required: typeof t.required == "boolean" ? t.required : !1,
1307
1344
  allowCustomAnswer: r
1308
1345
  };
1309
- }, fr = (t) => {
1310
- const e = cr(t);
1346
+ }, yr = (t) => {
1347
+ const e = hr(t);
1311
1348
  if (!e || !Array.isArray(e.questions)) return null;
1312
- const n = e.questions.map(dr).filter((s) => s !== null);
1349
+ const n = e.questions.map(br).filter((o) => o !== null);
1313
1350
  return n.length === 0 ? null : {
1314
1351
  type: "question-form",
1315
1352
  questions: n
1316
1353
  };
1317
- }, pr = (t) => {
1354
+ }, xr = (t) => {
1318
1355
  const {
1319
1356
  buildBaseTitle: e,
1320
1357
  buildIndicator: n,
1321
- prependErrorBlock: s
1358
+ prependErrorBlock: o
1322
1359
  } = t;
1323
- return (o) => {
1324
- const r = Pe(o.state?.output) ?? Pe(o.state?.metadata), i = fr(o.state?.input);
1360
+ return (s) => {
1361
+ const r = Be(s.state?.output) ?? Be(s.state?.metadata), i = yr(s.state?.input);
1325
1362
  if (!r && !i) return null;
1326
- const l = i ? `${i.questions.length} field${i.questions.length === 1 ? "" : "s"}` : void 0, c = r ? [] : [i];
1363
+ const a = i ? `${i.questions.length} field${i.questions.length === 1 ? "" : "s"}` : void 0, c = r ? [] : [i];
1327
1364
  return {
1328
- indicator: n(o),
1329
- title: e(o, l, "Question"),
1330
- blocks: s(o, c),
1365
+ indicator: n(s),
1366
+ title: e(s, a, "Question"),
1367
+ blocks: o(s, c),
1331
1368
  expandable: !1
1332
1369
  };
1333
1370
  };
1334
- }, mr = (t) => {
1335
- const e = Ee(t), n = et(t), s = S(e?.filePath) ?? S(e?.file_path) ?? S(e?.file) ?? S(n?.filePath) ?? S(n?.file) ?? S(n?.path) ?? void 0, o = pe(t, void 0, "Read file");
1336
- return s && o.push(Rn(s)), {
1337
- indicator: fe(t),
1338
- title: o,
1339
- blocks: me(t, [])
1371
+ }, Sr = (t) => {
1372
+ const e = Oe(t), n = et(t), o = S(e?.filePath) ?? S(e?.file_path) ?? S(e?.file) ?? S(n?.filePath) ?? S(n?.file) ?? S(n?.path) ?? void 0, s = be(t, void 0, "Read file");
1373
+ return o && s.push(In(o)), {
1374
+ indicator: ge(t),
1375
+ title: s,
1376
+ blocks: ye(t, [])
1340
1377
  };
1341
- }, hr = (t) => {
1342
- const e = Ee(t), n = et(t), s = S(e?.command) ?? void 0, o = pe(t, s, "Run command"), r = [], i = yt(t);
1378
+ }, Tr = (t) => {
1379
+ const e = Oe(t), n = et(t), o = S(e?.command) ?? void 0, s = be(t, o, "Run command"), r = [], i = xt(t);
1343
1380
  i && r.push({
1344
1381
  type: "code",
1345
1382
  language: "text",
1346
1383
  code: i
1347
1384
  });
1348
- const l = S(n?.stderr);
1349
- return l && l !== i && r.push({
1385
+ const a = S(n?.stderr);
1386
+ return a && a !== i && r.push({
1350
1387
  type: "code",
1351
1388
  language: "text",
1352
- code: l
1389
+ code: a
1353
1390
  }), typeof n?.exitCode == "number" && r.push({
1354
1391
  type: "text",
1355
1392
  text: `Exit code: ${n.exitCode}`
1356
1393
  }), {
1357
- indicator: fe(t),
1358
- title: o,
1359
- blocks: me(t, r)
1394
+ indicator: ge(t),
1395
+ title: s,
1396
+ blocks: ye(t, r)
1360
1397
  };
1361
- }, gr = (t) => {
1362
- const e = Ee(t), n = yt(t), s = S(e?.pattern) ?? void 0, o = pe(t, s, "Search files"), r = n ? [{
1398
+ }, wr = (t) => {
1399
+ const e = Oe(t), n = xt(t), o = S(e?.pattern) ?? void 0, s = be(t, o, "Search files"), r = n ? [{
1363
1400
  type: "code",
1364
1401
  language: "text",
1365
1402
  code: n
1366
1403
  }] : [];
1367
1404
  return {
1368
- indicator: fe(t),
1369
- title: o,
1370
- blocks: me(t, r)
1405
+ indicator: ge(t),
1406
+ title: s,
1407
+ blocks: ye(t, r)
1371
1408
  };
1372
- }, br = (t) => {
1373
- const e = Ee(t), n = yt(t), s = S(e?.pattern) ?? void 0, o = pe(t, s, "Find files"), r = [];
1409
+ }, kr = (t) => {
1410
+ const e = Oe(t), n = xt(t), o = S(e?.pattern) ?? void 0, s = be(t, o, "Find files"), r = [];
1374
1411
  if (n) {
1375
- const i = n.split(/\r?\n/).map((l) => l.trim()).filter((l) => l.length > 0);
1412
+ const i = n.split(/\r?\n/).map((a) => a.trim()).filter((a) => a.length > 0);
1376
1413
  i.length > 0 && r.push({
1377
1414
  type: "references",
1378
1415
  references: i
1379
1416
  });
1380
1417
  }
1381
1418
  return {
1382
- indicator: fe(t),
1383
- title: o,
1384
- blocks: me(t, r)
1419
+ indicator: ge(t),
1420
+ title: s,
1421
+ blocks: ye(t, r)
1385
1422
  };
1386
- }, yr = (t) => {
1387
- const e = yt(t), n = e ? tr(e) : null, s = nr(t) ?? n?.skillName, o = pe(t, s, "Load skill"), r = n?.content ?? e, i = r ? [{
1423
+ }, Cr = (t) => {
1424
+ const e = xt(t), n = e ? lr(e) : null, o = ar(t) ?? n?.skillName, s = be(t, o, "Load skill"), r = n?.content ?? e, i = r ? [{
1388
1425
  type: "code",
1389
1426
  language: "markdown",
1390
1427
  code: r
1391
1428
  }] : [];
1392
1429
  return {
1393
- indicator: fe(t),
1394
- title: o,
1395
- blocks: me(t, i)
1430
+ indicator: ge(t),
1431
+ title: s,
1432
+ blocks: ye(t, i)
1396
1433
  };
1397
- }, Dt = (t) => typeof t == "string" && t.trim().length > 0 ? t : null, Pn = (t) => !t || typeof t != "object" || Array.isArray(t) ? null : t, xr = (t) => {
1434
+ }, Bt = (t) => typeof t == "string" && t.trim().length > 0 ? t : null, Pn = (t) => !t || typeof t != "object" || Array.isArray(t) ? null : t, Ar = (t) => {
1398
1435
  const e = Pn(t);
1399
1436
  if (!e) return null;
1400
- const n = Dt(e.content) ?? Dt(e.title);
1437
+ const n = Bt(e.content) ?? Bt(e.title);
1401
1438
  if (!n) return null;
1402
- const s = Dt(e.status);
1439
+ const o = Bt(e.status);
1403
1440
  return {
1404
1441
  label: n,
1405
- checked: s === "completed"
1442
+ checked: o === "completed"
1406
1443
  };
1407
1444
  }, Jt = (t) => {
1408
1445
  if (!t) return {
@@ -1415,58 +1452,58 @@ const Ws = {
1415
1452
  return !n || !Array.isArray(n.todos) ? null : n.todos;
1416
1453
  })();
1417
1454
  return e ? {
1418
- items: e.map(xr).filter((n) => n !== null),
1455
+ items: e.map(Ar).filter((n) => n !== null),
1419
1456
  explicit: !0
1420
1457
  } : {
1421
1458
  items: [],
1422
1459
  explicit: !1
1423
1460
  };
1424
- }, Sr = (t) => {
1461
+ }, _r = (t) => {
1425
1462
  const {
1426
1463
  buildBaseTitle: e,
1427
1464
  buildIndicator: n,
1428
- prependErrorBlock: s
1465
+ prependErrorBlock: o
1429
1466
  } = t;
1430
- return (o) => {
1431
- const r = Jt(o.state?.input), i = Jt(o.state?.output), l = i.explicit ? i : r;
1432
- if (!l.explicit) return null;
1433
- const c = l.items, u = `${c.length} item${c.length === 1 ? "" : "s"}`, d = e(o, u, "Update todos");
1467
+ return (s) => {
1468
+ const r = Jt(s.state?.input), i = Jt(s.state?.output), a = i.explicit ? i : r;
1469
+ if (!a.explicit) return null;
1470
+ const c = a.items, u = `${c.length} item${c.length === 1 ? "" : "s"}`, d = e(s, u, "Update todos");
1434
1471
  if (c.length === 0)
1435
1472
  return {
1436
- indicator: n(o),
1473
+ indicator: n(s),
1437
1474
  title: d,
1438
- blocks: s(o, [{
1475
+ blocks: o(s, [{
1439
1476
  type: "comment",
1440
1477
  text: "No todos"
1441
1478
  }])
1442
1479
  };
1443
- const f = [{
1480
+ const p = [{
1444
1481
  type: "todo-list",
1445
1482
  items: c
1446
1483
  }];
1447
1484
  return {
1448
- indicator: n(o),
1485
+ indicator: n(s),
1449
1486
  title: d,
1450
- blocks: s(o, f)
1487
+ blocks: o(s, p)
1451
1488
  };
1452
1489
  };
1453
- }, Tr = pr({
1454
- buildBaseTitle: pe,
1455
- buildIndicator: fe,
1456
- prependErrorBlock: me
1457
- }), Zt = Sr({
1458
- buildBaseTitle: pe,
1459
- buildIndicator: fe,
1460
- prependErrorBlock: me
1490
+ }, Rr = xr({
1491
+ buildBaseTitle: be,
1492
+ buildIndicator: ge,
1493
+ prependErrorBlock: ye
1494
+ }), Zt = _r({
1495
+ buildBaseTitle: be,
1496
+ buildIndicator: ge,
1497
+ prependErrorBlock: ye
1461
1498
  }), en = () => ({
1462
- apply_patch: rr,
1463
- bash: hr,
1464
- edit: lr,
1465
- glob: br,
1466
- grep: gr,
1467
- question: Tr,
1468
- read: mr,
1469
- skill: yr,
1499
+ apply_patch: dr,
1500
+ bash: Tr,
1501
+ edit: pr,
1502
+ glob: kr,
1503
+ grep: wr,
1504
+ question: Rr,
1505
+ read: Sr,
1506
+ skill: Cr,
1470
1507
  todo_write: Zt,
1471
1508
  todowrite: Zt
1472
1509
  }), tn = {
@@ -1475,16 +1512,16 @@ const Ws = {
1475
1512
  "output-error": "failed",
1476
1513
  "input-streaming": "running",
1477
1514
  "input-available": "queued"
1478
- }, wr = (t) => t.split(" ").filter((e) => e.length > 0).map((e) => e[0].toUpperCase() + e.slice(1)).join(" "), kr = (t) => {
1479
- const e = gt(t ?? "tool").replace(/_/g, " ");
1480
- return wr(e);
1481
- }, Mn = (t) => t === "error" || t === "output-error", Cr = (t) => Mn(t.state?.status) ? {
1515
+ }, Ir = (t) => t.split(" ").filter((e) => e.length > 0).map((e) => e[0].toUpperCase() + e.slice(1)).join(" "), Mr = (t) => {
1516
+ const e = bt(t ?? "tool").replace(/_/g, " ");
1517
+ return Ir(e);
1518
+ }, vn = (t) => t === "error" || t === "output-error", Pr = (t) => vn(t.state?.status) ? {
1482
1519
  type: "icon",
1483
1520
  icon: "danger"
1484
1521
  } : {
1485
1522
  type: "icon",
1486
- icon: Sn(t.tool ?? "tool")
1487
- }, Ar = (t) => !t || typeof t != "string" ? null : tn[t] ? tn[t] : t.includes("stream") ? "running" : null, nn = (t) => {
1523
+ icon: Tn(t.tool ?? "tool")
1524
+ }, vr = (t) => !t || typeof t != "string" ? null : tn[t] ? tn[t] : t.includes("stream") ? "running" : null, nn = (t) => {
1488
1525
  if (typeof t == "string") return t;
1489
1526
  if (t == null) return null;
1490
1527
  try {
@@ -1492,9 +1529,9 @@ const Ws = {
1492
1529
  } catch {
1493
1530
  return null;
1494
1531
  }
1495
- }, _r = (t) => {
1532
+ }, Er = (t) => {
1496
1533
  const e = [];
1497
- Mn(t.state?.status) && t.state?.errorText && e.push({
1534
+ vn(t.state?.status) && t.state?.errorText && e.push({
1498
1535
  type: "comment",
1499
1536
  text: t.state.errorText
1500
1537
  });
@@ -1504,101 +1541,101 @@ const Ws = {
1504
1541
  language: "json",
1505
1542
  code: n
1506
1543
  });
1507
- const s = nn(t.state?.output);
1508
- return s && e.push({
1544
+ const o = nn(t.state?.output);
1545
+ return o && e.push({
1509
1546
  type: "code",
1510
1547
  language: "json",
1511
- code: s
1548
+ code: o
1512
1549
  }), e;
1513
- }, Rr = (t) => {
1550
+ }, Lr = (t) => {
1514
1551
  const e = [{
1515
1552
  kind: "text",
1516
- text: kr(t.tool),
1553
+ text: Mr(t.tool),
1517
1554
  bold: !0
1518
- }], n = Ar(t.state?.status);
1555
+ }], n = vr(t.state?.status);
1519
1556
  return n && e.push({
1520
1557
  kind: "text",
1521
1558
  text: n,
1522
1559
  muted: !0
1523
1560
  }), {
1524
- indicator: Cr(t),
1561
+ indicator: Pr(t),
1525
1562
  title: e,
1526
- blocks: _r(t)
1563
+ blocks: Er(t)
1527
1564
  };
1528
- }, Ir = (t) => t ? {
1565
+ }, Br = (t) => t ? {
1529
1566
  ...en(),
1530
1567
  ...t
1531
- } : en(), Pr = (t, e) => {
1568
+ } : en(), Dr = (t, e) => {
1532
1569
  const n = t.tool ?? "tool";
1533
- for (const s of _s(n)) {
1534
- const o = e[s];
1535
- if (o) return o;
1570
+ for (const o of Eo(n)) {
1571
+ const s = e[o];
1572
+ if (s) return s;
1536
1573
  }
1537
- }, Mr = (t, e, n) => {
1538
- const s = Pr(t, e);
1539
- if (s) {
1540
- const o = s(t, n);
1541
- if (o) return o;
1574
+ }, Or = (t, e, n) => {
1575
+ const o = Dr(t, e);
1576
+ if (o) {
1577
+ const s = o(t, n);
1578
+ if (s) return s;
1542
1579
  }
1543
- return Rr(t);
1544
- }, Er = (t, e) => {
1545
- const n = Ir(e?.toolRenderers);
1580
+ return Lr(t);
1581
+ }, $r = (t, e) => {
1582
+ const n = Br(e?.toolRenderers);
1546
1583
  return {
1547
- items: t.map((o) => Mr(o, n, e))
1584
+ items: t.map((s) => Or(s, n, e))
1548
1585
  };
1549
- }, Ce = Un, En = (t, e, n, s = !1) => {
1550
- s && t.stopPropagation(), e.href || t.preventDefault(), e.filePath && n?.(e.filePath);
1586
+ }, Me = Un, En = (t, e, n, o = !1) => {
1587
+ o && t.stopPropagation(), e.href || t.preventDefault(), e.filePath && n?.(e.filePath);
1551
1588
  };
1552
- function vr(t) {
1589
+ function Fr(t) {
1553
1590
  const e = T(6), {
1554
1591
  seg: n
1555
1592
  } = t;
1556
- let s;
1557
- e[0] !== n.alt || e[1] !== n.src ? (s = /* @__PURE__ */ a(We.Image, { src: n.src, alt: n.alt }), e[0] = n.alt, e[1] = n.src, e[2] = s) : s = e[2];
1558
1593
  let o;
1559
- e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ a(We.Fallback, { background: "bg.muted", color: "fg.muted" }), e[3] = o) : o = e[3];
1594
+ e[0] !== n.alt || e[1] !== n.src ? (o = /* @__PURE__ */ l(Ve.Image, { src: n.src, alt: n.alt }), e[0] = n.alt, e[1] = n.src, e[2] = o) : o = e[2];
1595
+ let s;
1596
+ e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ l(Ve.Fallback, { background: "bg.muted", color: "fg.muted" }), e[3] = s) : s = e[3];
1560
1597
  let r;
1561
- return e[4] !== s ? (r = /* @__PURE__ */ k(We.Root, { width: "1.5rem", height: "1.5rem", children: [
1562
- s,
1563
- o
1564
- ] }), e[4] = s, e[5] = r) : r = e[5], r;
1598
+ return e[4] !== o ? (r = /* @__PURE__ */ k(Ve.Root, { width: "1.5rem", height: "1.5rem", children: [
1599
+ o,
1600
+ s
1601
+ ] }), e[4] = o, e[5] = r) : r = e[5], r;
1565
1602
  }
1566
- function Lr(t) {
1603
+ function zr(t) {
1567
1604
  const e = T(9), {
1568
1605
  seg: n,
1569
- onOpenFile: s
1570
- } = t, o = n.additions ?? 0, r = n.deletions ?? 0;
1606
+ onOpenFile: o
1607
+ } = t, s = n.additions ?? 0, r = n.deletions ?? 0;
1571
1608
  let i;
1572
- e[0] !== s || e[1] !== n.fileName || e[2] !== n.filePath ? (i = () => {
1609
+ e[0] !== o || e[1] !== n.fileName || e[2] !== n.filePath ? (i = () => {
1573
1610
  const c = n.filePath ?? n.fileName;
1574
- s?.(c);
1575
- }, e[0] = s, e[1] = n.fileName, e[2] = n.filePath, e[3] = i) : i = e[3];
1576
- let l;
1577
- return e[4] !== n.fileName || e[5] !== o || e[6] !== r || e[7] !== i ? (l = /* @__PURE__ */ a(pn, { fileName: n.fileName, additions: o, deletions: r, onClickFileLink: i }), e[4] = n.fileName, e[5] = o, e[6] = r, e[7] = i, e[8] = l) : l = e[8], l;
1611
+ o?.(c);
1612
+ }, e[0] = o, e[1] = n.fileName, e[2] = n.filePath, e[3] = i) : i = e[3];
1613
+ let a;
1614
+ return e[4] !== n.fileName || e[5] !== s || e[6] !== r || e[7] !== i ? (a = /* @__PURE__ */ l(pn, { fileName: n.fileName, additions: s, deletions: r, onClickFileLink: i }), e[4] = n.fileName, e[5] = s, e[6] = r, e[7] = i, e[8] = a) : a = e[8], a;
1578
1615
  }
1579
- function Dr(t) {
1616
+ function qr(t) {
1580
1617
  const e = T(13), {
1581
1618
  seg: n,
1582
- onOpenFile: s
1583
- } = t, o = n.bold ? "medium" : void 0, r = !!(n.href || n.filePath), i = n.href ?? "#", l = (n.muted, "fg.muted"), c = r ? "pointer" : "default";
1619
+ onOpenFile: o
1620
+ } = t, s = n.bold ? "medium" : void 0, r = !!(n.href || n.filePath), i = n.href ?? "#", a = (n.muted, "fg.muted"), c = r ? "pointer" : "default";
1584
1621
  let u;
1585
- e[0] !== s || e[1] !== n ? (u = (p) => En(p, n, s, !0), e[0] = s, e[1] = n, e[2] = u) : u = e[2];
1622
+ e[0] !== o || e[1] !== n ? (u = (m) => En(m, n, o, !0), e[0] = o, e[1] = n, e[2] = u) : u = e[2];
1586
1623
  const d = n.muted ? "fg.muted" : "fg.blue-dark";
1587
- let f;
1588
- e[3] !== d ? (f = {
1624
+ let p;
1625
+ e[3] !== d ? (p = {
1589
1626
  textDecoration: "underline",
1590
1627
  color: d
1591
- }, e[3] = d, e[4] = f) : f = e[4];
1592
- let m;
1593
- return e[5] !== o || e[6] !== n.text || e[7] !== i || e[8] !== l || e[9] !== c || e[10] !== u || e[11] !== f ? (m = /* @__PURE__ */ a(rn, { href: i, fontWeight: o, color: l, textDecoration: "none", cursor: c, onClick: u, _hover: f, children: n.text }), e[5] = o, e[6] = n.text, e[7] = i, e[8] = l, e[9] = c, e[10] = u, e[11] = f, e[12] = m) : m = e[12], m;
1628
+ }, e[3] = d, e[4] = p) : p = e[4];
1629
+ let f;
1630
+ return e[5] !== s || e[6] !== n.text || e[7] !== i || e[8] !== a || e[9] !== c || e[10] !== u || e[11] !== p ? (f = /* @__PURE__ */ l(rn, { href: i, fontWeight: s, color: a, textDecoration: "none", cursor: c, onClick: u, _hover: p, children: n.text }), e[5] = s, e[6] = n.text, e[7] = i, e[8] = a, e[9] = c, e[10] = u, e[11] = p, e[12] = f) : f = e[12], f;
1594
1631
  }
1595
- function Br(t) {
1632
+ function Hr(t) {
1596
1633
  const e = T(12), {
1597
1634
  seg: n,
1598
- onOpenFile: s
1599
- } = t, o = n.bold ? "medium" : void 0, r = n.href ?? "#", i = n.muted ? "fg.muted" : "accent.primary";
1600
- let l;
1601
- e[0] !== s || e[1] !== n ? (l = (f) => En(f, n, s), e[0] = s, e[1] = n, e[2] = l) : l = e[2];
1635
+ onOpenFile: o
1636
+ } = t, s = n.bold ? "medium" : void 0, r = n.href ?? "#", i = n.muted ? "fg.muted" : "accent.primary";
1637
+ let a;
1638
+ e[0] !== o || e[1] !== n ? (a = (p) => En(p, n, o), e[0] = o, e[1] = n, e[2] = a) : a = e[2];
1602
1639
  const c = n.muted ? "fg.muted" : "accent.primary";
1603
1640
  let u;
1604
1641
  e[3] !== c ? (u = {
@@ -1606,48 +1643,48 @@ function Br(t) {
1606
1643
  textDecoration: "underline"
1607
1644
  }, e[3] = c, e[4] = u) : u = e[4];
1608
1645
  let d;
1609
- return e[5] !== o || e[6] !== n.text || e[7] !== r || e[8] !== i || e[9] !== l || e[10] !== u ? (d = /* @__PURE__ */ a(rn, { href: r, fontWeight: o, color: i, textDecoration: "underline", onClick: l, _hover: u, children: n.text }), e[5] = o, e[6] = n.text, e[7] = r, e[8] = i, e[9] = l, e[10] = u, e[11] = d) : d = e[11], d;
1646
+ return e[5] !== s || e[6] !== n.text || e[7] !== r || e[8] !== i || e[9] !== a || e[10] !== u ? (d = /* @__PURE__ */ l(rn, { href: r, fontWeight: s, color: i, textDecoration: "underline", onClick: a, _hover: u, children: n.text }), e[5] = s, e[6] = n.text, e[7] = r, e[8] = i, e[9] = a, e[10] = u, e[11] = d) : d = e[11], d;
1610
1647
  }
1611
- function Or(t) {
1648
+ function Qr(t) {
1612
1649
  const e = T(6), {
1613
1650
  seg: n,
1614
- isClickable: s
1615
- } = t, o = n.bold ? "medium" : void 0, r = s && !n.muted ? "fg" : "fg.muted";
1651
+ isClickable: o
1652
+ } = t, s = n.bold ? "medium" : void 0, r = o && !n.muted ? "fg" : "fg.muted";
1616
1653
  let i;
1617
1654
  e[0] !== r ? (i = {
1618
1655
  color: r
1619
1656
  }, e[0] = r, e[1] = i) : i = e[1];
1620
- let l;
1621
- return e[2] !== n.text || e[3] !== o || e[4] !== i ? (l = /* @__PURE__ */ a(Je, { fontWeight: o, color: "fg.muted", _groupHover: i, children: n.text }), e[2] = n.text, e[3] = o, e[4] = i, e[5] = l) : l = e[5], l;
1657
+ let a;
1658
+ return e[2] !== n.text || e[3] !== s || e[4] !== i ? (a = /* @__PURE__ */ l(Je, { fontWeight: s, color: "fg.muted", _groupHover: i, children: n.text }), e[2] = n.text, e[3] = s, e[4] = i, e[5] = a) : a = e[5], a;
1622
1659
  }
1623
- function $r(t) {
1660
+ function Wr(t) {
1624
1661
  const e = T(11), {
1625
1662
  seg: n,
1626
- isClickable: s,
1627
- onOpenFile: o
1663
+ isClickable: o,
1664
+ onOpenFile: s
1628
1665
  } = t;
1629
1666
  switch (n.kind) {
1630
1667
  case "avatar": {
1631
1668
  let r;
1632
- return e[0] !== n ? (r = /* @__PURE__ */ a(vr, { seg: n }), e[0] = n, e[1] = r) : r = e[1], r;
1669
+ return e[0] !== n ? (r = /* @__PURE__ */ l(Fr, { seg: n }), e[0] = n, e[1] = r) : r = e[1], r;
1633
1670
  }
1634
1671
  case "diff": {
1635
1672
  let r;
1636
- return e[2] !== o || e[3] !== n ? (r = /* @__PURE__ */ a(Lr, { seg: n, onOpenFile: o }), e[2] = o, e[3] = n, e[4] = r) : r = e[4], r;
1673
+ return e[2] !== s || e[3] !== n ? (r = /* @__PURE__ */ l(zr, { seg: n, onOpenFile: s }), e[2] = s, e[3] = n, e[4] = r) : r = e[4], r;
1637
1674
  }
1638
1675
  case "link": {
1639
1676
  let r;
1640
- return e[5] !== o || e[6] !== n ? (r = n.variant === "bubble" ? /* @__PURE__ */ a(Dr, { seg: n, onOpenFile: o }) : /* @__PURE__ */ a(Br, { seg: n, onOpenFile: o }), e[5] = o, e[6] = n, e[7] = r) : r = e[7], r;
1677
+ return e[5] !== s || e[6] !== n ? (r = n.variant === "bubble" ? /* @__PURE__ */ l(qr, { seg: n, onOpenFile: s }) : /* @__PURE__ */ l(Hr, { seg: n, onOpenFile: s }), e[5] = s, e[6] = n, e[7] = r) : r = e[7], r;
1641
1678
  }
1642
1679
  case "text": {
1643
1680
  let r;
1644
- return e[8] !== s || e[9] !== n ? (r = /* @__PURE__ */ a(Or, { seg: n, isClickable: s }), e[8] = s, e[9] = n, e[10] = r) : r = e[10], r;
1681
+ return e[8] !== o || e[9] !== n ? (r = /* @__PURE__ */ l(Qr, { seg: n, isClickable: o }), e[8] = o, e[9] = n, e[10] = r) : r = e[10], r;
1645
1682
  }
1646
1683
  default:
1647
1684
  return null;
1648
1685
  }
1649
1686
  }
1650
- function Fr(t) {
1687
+ function Nr(t) {
1651
1688
  const e = T(10), {
1652
1689
  ind: n
1653
1690
  } = t;
@@ -1655,203 +1692,203 @@ function Fr(t) {
1655
1692
  return null;
1656
1693
  if (n.type === "icon") {
1657
1694
  let i;
1658
- e[0] !== n.icon ? (i = Ps(n.icon), e[0] = n.icon, e[1] = i) : i = e[1];
1659
- const l = i;
1695
+ e[0] !== n.icon ? (i = Do(n.icon), e[0] = n.icon, e[1] = i) : i = e[1];
1696
+ const a = i;
1660
1697
  let c;
1661
- return e[2] !== l ? (c = /* @__PURE__ */ a(Ce.Indicator, { outline: "none", shadow: "none", border: "none", background: "bg", color: "fg", children: /* @__PURE__ */ a(Je, { display: "inline-flex", alignItems: "center", children: /* @__PURE__ */ a(l, { size: 14, strokeWidth: 1 }) }) }), e[2] = l, e[3] = c) : c = e[3], c;
1698
+ return e[2] !== a ? (c = /* @__PURE__ */ l(Me.Indicator, { outline: "none", border: "none", background: "bg", color: "fg", children: /* @__PURE__ */ l(Je, { display: "inline-flex", alignItems: "center", children: /* @__PURE__ */ l(a, { size: 14, strokeWidth: 1 }) }) }), e[2] = a, e[3] = c) : c = e[3], c;
1662
1699
  }
1663
- let s;
1664
- e[4] !== n.alt || e[5] !== n.src ? (s = /* @__PURE__ */ a(We.Image, { src: n.src, alt: n.alt }), e[4] = n.alt, e[5] = n.src, e[6] = s) : s = e[6];
1665
1700
  let o;
1666
- e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ a(We.Fallback, { background: "bg.muted", color: "fg.muted" }), e[7] = o) : o = e[7];
1701
+ e[4] !== n.alt || e[5] !== n.src ? (o = /* @__PURE__ */ l(Ve.Image, { src: n.src, alt: n.alt }), e[4] = n.alt, e[5] = n.src, e[6] = o) : o = e[6];
1702
+ let s;
1703
+ e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ l(Ve.Fallback, { background: "bg.muted", color: "fg.muted" }), e[7] = s) : s = e[7];
1667
1704
  let r;
1668
- return e[8] !== s ? (r = /* @__PURE__ */ a(Ce.Indicator, { children: /* @__PURE__ */ k(We.Root, { boxSize: "full", children: [
1669
- s,
1670
- o
1671
- ] }) }), e[8] = s, e[9] = r) : r = e[9], r;
1705
+ return e[8] !== o ? (r = /* @__PURE__ */ l(Me.Indicator, { children: /* @__PURE__ */ k(Ve.Root, { boxSize: "full", children: [
1706
+ o,
1707
+ s
1708
+ ] }) }), e[8] = o, e[9] = r) : r = e[9], r;
1672
1709
  }
1673
- function zr(t) {
1710
+ function Vr(t) {
1674
1711
  const e = T(5), {
1675
1712
  code: n,
1676
- language: s
1677
- } = t, o = s ? `${s} code block` : "code block";
1713
+ language: o
1714
+ } = t, s = o ? `${o} code block` : "code block";
1678
1715
  let r;
1679
- e[0] !== n ? (r = /* @__PURE__ */ a(I, { as: "code", children: n }), e[0] = n, e[1] = r) : r = e[1];
1716
+ e[0] !== n ? (r = /* @__PURE__ */ l(R, { as: "code", children: n }), e[0] = n, e[1] = r) : r = e[1];
1680
1717
  let i;
1681
- return e[2] !== o || e[3] !== r ? (i = /* @__PURE__ */ a(ht, { background: "bg.code", color: "fg", borderRadius: "md", showHorizontalScrollbar: !0, showVerticalScrollbar: !1, children: /* @__PURE__ */ a(I, { as: "pre", padding: "sm", fontFamily: "mono", fontSize: "xs", lineHeight: "shorter", whiteSpace: "pre", "aria-label": o, children: r }) }), e[2] = o, e[3] = r, e[4] = i) : i = e[4], i;
1718
+ return e[2] !== s || e[3] !== r ? (i = /* @__PURE__ */ l(gt, { background: "bg.code", color: "fg", borderRadius: "md", showHorizontalScrollbar: !0, showVerticalScrollbar: !1, children: /* @__PURE__ */ l(R, { as: "pre", padding: "sm", fontFamily: "mono", fontSize: "xs", lineHeight: "shorter", whiteSpace: "pre", "aria-label": s, children: r }) }), e[2] = s, e[3] = r, e[4] = i) : i = e[4], i;
1682
1719
  }
1683
- function qr(t) {
1720
+ function jr(t) {
1684
1721
  const e = T(30), {
1685
1722
  b: n,
1686
- onOpenFile: s
1723
+ onOpenFile: o
1687
1724
  } = t;
1688
1725
  switch (n.type) {
1689
1726
  case "comment": {
1690
- let o;
1691
- e[0] !== n.text ? (o = /* @__PURE__ */ a(ue.Body, { children: n.text }), e[0] = n.text, e[1] = o) : o = e[1];
1727
+ let s;
1728
+ e[0] !== n.text ? (s = /* @__PURE__ */ l(me.Body, { children: n.text }), e[0] = n.text, e[1] = s) : s = e[1];
1692
1729
  let r;
1693
- e[2] !== n.reactions ? (r = n.reactions?.clap ? /* @__PURE__ */ a(ue.Footer, { children: /* @__PURE__ */ k(Ze, { children: [
1730
+ e[2] !== n.reactions ? (r = n.reactions?.clap ? /* @__PURE__ */ l(me.Footer, { children: /* @__PURE__ */ k(Ze, { children: [
1694
1731
  "👏 ",
1695
1732
  n.reactions.clap
1696
1733
  ] }) }) : null, e[2] = n.reactions, e[3] = r) : r = e[3];
1697
1734
  let i;
1698
- return e[4] !== o || e[5] !== r ? (i = /* @__PURE__ */ k(ue.Root, { children: [
1699
- o,
1735
+ return e[4] !== s || e[5] !== r ? (i = /* @__PURE__ */ k(me.Root, { children: [
1736
+ s,
1700
1737
  r
1701
- ] }), e[4] = o, e[5] = r, e[6] = i) : i = e[6], i;
1738
+ ] }), e[4] = s, e[5] = r, e[6] = i) : i = e[6], i;
1702
1739
  }
1703
1740
  case "code": {
1704
- let o;
1705
- return e[7] !== n.code || e[8] !== n.language ? (o = /* @__PURE__ */ a(ue.Root, { border: "0", padding: "0", children: /* @__PURE__ */ a(ue.Body, { padding: "0", children: /* @__PURE__ */ a(zr, { language: n.language, code: n.code }) }) }), e[7] = n.code, e[8] = n.language, e[9] = o) : o = e[9], o;
1741
+ let s;
1742
+ return e[7] !== n.code || e[8] !== n.language ? (s = /* @__PURE__ */ l(me.Root, { border: "0", padding: "0", children: /* @__PURE__ */ l(me.Body, { padding: "0", children: /* @__PURE__ */ l(Vr, { language: n.language, code: n.code }) }) }), e[7] = n.code, e[8] = n.language, e[9] = s) : s = e[9], s;
1706
1743
  }
1707
1744
  case "diff": {
1708
- const o = n.sideBySide ?? !1;
1745
+ const s = n.sideBySide ?? !1;
1709
1746
  let r;
1710
- return e[10] !== n.language || e[11] !== n.modified || e[12] !== n.original || e[13] !== o ? (r = /* @__PURE__ */ a(ue.Root, { border: "0", padding: "0", children: /* @__PURE__ */ a(ue.Body, { padding: "0", children: /* @__PURE__ */ a(I, { height: "240px", minW: "320px", overflow: "hidden", children: /* @__PURE__ */ a(Ao, { original: n.original, modified: n.modified, language: n.language, sideBySide: o, disableScroll: !0 }) }) }) }), e[10] = n.language, e[11] = n.modified, e[12] = n.original, e[13] = o, e[14] = r) : r = e[14], r;
1747
+ return e[10] !== n.language || e[11] !== n.modified || e[12] !== n.original || e[13] !== s ? (r = /* @__PURE__ */ l(me.Root, { border: "0", padding: "0", children: /* @__PURE__ */ l(me.Body, { padding: "0", children: /* @__PURE__ */ l(R, { height: "240px", minW: "320px", overflow: "hidden", children: /* @__PURE__ */ l(Rs, { original: n.original, modified: n.modified, language: n.language, sideBySide: s, disableScroll: !0 }) }) }) }), e[10] = n.language, e[11] = n.modified, e[12] = n.original, e[13] = s, e[14] = r) : r = e[14], r;
1711
1748
  }
1712
1749
  case "text": {
1713
- let o;
1714
- return e[15] !== n.text ? (o = /* @__PURE__ */ a(ue.Root, { background: "transparent", children: /* @__PURE__ */ a(ue.Body, { padding: "sm", children: /* @__PURE__ */ a(X, { textStyle: "label/S/regular", children: n.text }) }) }), e[15] = n.text, e[16] = o) : o = e[16], o;
1750
+ let s;
1751
+ return e[15] !== n.text ? (s = /* @__PURE__ */ l(me.Root, { background: "transparent", children: /* @__PURE__ */ l(me.Body, { padding: "sm", children: /* @__PURE__ */ l(J, { textStyle: "label/S/regular", children: n.text }) }) }), e[15] = n.text, e[16] = s) : s = e[16], s;
1715
1752
  }
1716
1753
  case "todo-list": {
1717
- let o;
1718
- return e[17] !== n.items ? (o = /* @__PURE__ */ a(Xo, { items: n.items }), e[17] = n.items, e[18] = o) : o = e[18], o;
1754
+ let s;
1755
+ return e[17] !== n.items ? (s = /* @__PURE__ */ l(Js, { items: n.items }), e[17] = n.items, e[18] = s) : s = e[18], s;
1719
1756
  }
1720
1757
  case "question-form": {
1721
- let o;
1722
- return e[19] !== n.questions ? (o = /* @__PURE__ */ a(bn, { questions: n.questions }), e[19] = n.questions, e[20] = o) : o = e[20], o;
1758
+ let s;
1759
+ return e[19] !== n.questions ? (s = /* @__PURE__ */ l(bn, { questions: n.questions }), e[19] = n.questions, e[20] = s) : s = e[20], s;
1723
1760
  }
1724
1761
  case "references": {
1725
- let o;
1726
- e[21] !== n.references ? (o = n.references.map(Hr), e[21] = n.references, e[22] = o) : o = e[22];
1762
+ let s;
1763
+ e[21] !== n.references ? (s = n.references.map(Kr), e[21] = n.references, e[22] = s) : s = e[22];
1727
1764
  let r;
1728
- return e[23] !== o ? (r = /* @__PURE__ */ a(Y, { mt: "xs", gap: "xs", flexDir: "row", flexWrap: "wrap", children: o }), e[23] = o, e[24] = r) : r = e[24], r;
1765
+ return e[23] !== s ? (r = /* @__PURE__ */ l(Z, { mt: "xs", gap: "xs", flexDir: "row", flexWrap: "wrap", children: s }), e[23] = s, e[24] = r) : r = e[24], r;
1729
1766
  }
1730
1767
  case "component": {
1731
- let o;
1732
- e[25] !== n || e[26] !== s ? (o = n.render({
1733
- onOpenFile: s
1734
- }), e[25] = n, e[26] = s, e[27] = o) : o = e[27];
1768
+ let s;
1769
+ e[25] !== n || e[26] !== o ? (s = n.render({
1770
+ onOpenFile: o
1771
+ }), e[25] = n, e[26] = o, e[27] = s) : s = e[27];
1735
1772
  let r;
1736
- return e[28] !== o ? (r = /* @__PURE__ */ a($t, { children: o }), e[28] = o, e[29] = r) : r = e[29], r;
1773
+ return e[28] !== s ? (r = /* @__PURE__ */ l($t, { children: s }), e[28] = s, e[29] = r) : r = e[29], r;
1737
1774
  }
1738
1775
  }
1739
1776
  }
1740
- function Hr(t) {
1741
- return /* @__PURE__ */ a(qt, { fileName: t }, t);
1777
+ function Kr(t) {
1778
+ return /* @__PURE__ */ l(qt, { fileName: t }, t);
1742
1779
  }
1743
- function Qr(t) {
1780
+ function Ur(t) {
1744
1781
  const e = T(23), {
1745
1782
  item: n,
1746
- itemKey: s,
1747
- isOpen: o,
1783
+ itemKey: o,
1784
+ isOpen: s,
1748
1785
  canExpand: r,
1749
1786
  hasBlocks: i,
1750
- onToggle: l,
1787
+ onToggle: a,
1751
1788
  onOpenFile: c
1752
1789
  } = t;
1753
1790
  let u;
1754
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ a(Ce.Separator, {}), e[0] = u) : u = e[0];
1791
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ l(Me.Separator, {}), e[0] = u) : u = e[0];
1755
1792
  let d;
1756
- e[1] !== n.indicator ? (d = /* @__PURE__ */ k(Ce.Connector, { children: [
1793
+ e[1] !== n.indicator ? (d = /* @__PURE__ */ k(Me.Connector, { children: [
1757
1794
  u,
1758
- /* @__PURE__ */ a(Fr, { ind: n.indicator })
1795
+ /* @__PURE__ */ l(Nr, { ind: n.indicator })
1759
1796
  ] }), e[1] = n.indicator, e[2] = d) : d = e[2];
1760
- const f = o ? "auto" : "20px";
1761
- let m;
1762
- e[3] !== r || e[4] !== o || e[5] !== n.title || e[6] !== s || e[7] !== c || e[8] !== l ? (m = n.title.length > 0 && /* @__PURE__ */ a(Ce.Title, { className: "group", fontWeight: "normal", display: "flex", alignItems: "center", justifyContent: "space-between", cursor: r ? "pointer" : "default", onClick: r ? () => l(s) : void 0, children: /* @__PURE__ */ k(Je, { display: "inline-flex", alignItems: "center", gap: "sm", flexWrap: "wrap", children: [
1763
- /* @__PURE__ */ a(Je, { display: "inline-flex", alignItems: "center", gap: "xs", flexWrap: "wrap", children: n.title.map((y, b) => /* @__PURE__ */ a($r, { seg: y, isClickable: r, onOpenFile: c }, b)) }),
1764
- r ? /* @__PURE__ */ a(Je, { display: "inline-flex", alignItems: "center", transition: "transform 200ms ease, color 200ms ease", transform: o ? "rotate(0deg)" : "rotate(-180deg)", color: "transparent", _groupHover: {
1797
+ const p = s ? "auto" : "20px";
1798
+ let f;
1799
+ e[3] !== r || e[4] !== s || e[5] !== n.title || e[6] !== o || e[7] !== c || e[8] !== a ? (f = n.title.length > 0 && /* @__PURE__ */ l(Me.Title, { className: "group", fontWeight: "normal", display: "flex", alignItems: "center", justifyContent: "space-between", cursor: r ? "pointer" : "default", onClick: r ? () => a(o) : void 0, children: /* @__PURE__ */ k(Je, { display: "inline-flex", alignItems: "center", gap: "sm", flexWrap: "wrap", children: [
1800
+ /* @__PURE__ */ l(Je, { display: "inline-flex", alignItems: "center", gap: "xs", flexWrap: "wrap", children: n.title.map((y, b) => /* @__PURE__ */ l(Wr, { seg: y, isClickable: r, onOpenFile: c }, b)) }),
1801
+ r ? /* @__PURE__ */ l(Je, { display: "inline-flex", alignItems: "center", transition: "transform 200ms ease, color 200ms ease", transform: s ? "rotate(0deg)" : "rotate(-180deg)", color: "transparent", _groupHover: {
1765
1802
  color: "fg"
1766
- }, children: /* @__PURE__ */ a(bo, { size: 12 }) }) : null
1767
- ] }) }), e[3] = r, e[4] = o, e[5] = n.title, e[6] = s, e[7] = c, e[8] = l, e[9] = m) : m = e[9];
1768
- let p;
1769
- e[10] !== i || e[11] !== o || e[12] !== n.blocks || e[13] !== c ? (p = i ? /* @__PURE__ */ a(I, { display: "grid", gridTemplateRows: o ? "1fr" : "0fr", transition: "grid-template-rows 220ms ease", children: o ? /* @__PURE__ */ a(I, { overflow: "hidden", opacity: 1, transform: "translateY(0)", transition: "opacity 200ms ease, transform 200ms ease", children: n.blocks.map((y, b) => /* @__PURE__ */ a(I, { children: /* @__PURE__ */ a(qr, { b: y, onOpenFile: c }) }, b)) }) : null }) : null, e[10] = i, e[11] = o, e[12] = n.blocks, e[13] = c, e[14] = p) : p = e[14];
1803
+ }, children: /* @__PURE__ */ l(bs, { size: 12 }) }) : null
1804
+ ] }) }), e[3] = r, e[4] = s, e[5] = n.title, e[6] = o, e[7] = c, e[8] = a, e[9] = f) : f = e[9];
1805
+ let m;
1806
+ e[10] !== i || e[11] !== s || e[12] !== n.blocks || e[13] !== c ? (m = i ? /* @__PURE__ */ l(R, { display: "grid", gridTemplateRows: s ? "1fr" : "0fr", transition: "grid-template-rows 220ms ease", children: s ? /* @__PURE__ */ l(R, { overflow: "hidden", opacity: 1, transform: "translateY(0)", transition: "opacity 200ms ease, transform 200ms ease", children: n.blocks.map((y, b) => /* @__PURE__ */ l(R, { children: /* @__PURE__ */ l(jr, { b: y, onOpenFile: c }) }, b)) }) : null }) : null, e[10] = i, e[11] = s, e[12] = n.blocks, e[13] = c, e[14] = m) : m = e[14];
1770
1807
  let h;
1771
- e[15] !== f || e[16] !== m || e[17] !== p ? (h = /* @__PURE__ */ k(Ce.Content, { pb: "xs", h: f, overflow: "hidden", children: [
1772
- m,
1773
- p
1774
- ] }), e[15] = f, e[16] = m, e[17] = p, e[18] = h) : h = e[18];
1808
+ e[15] !== p || e[16] !== f || e[17] !== m ? (h = /* @__PURE__ */ k(Me.Content, { pb: "xs", h: p, overflow: "hidden", children: [
1809
+ f,
1810
+ m
1811
+ ] }), e[15] = p, e[16] = f, e[17] = m, e[18] = h) : h = e[18];
1775
1812
  let g;
1776
- return e[19] !== s || e[20] !== d || e[21] !== h ? (g = /* @__PURE__ */ k(Ce.Item, { gap: "xs", children: [
1813
+ return e[19] !== o || e[20] !== d || e[21] !== h ? (g = /* @__PURE__ */ k(Me.Item, { gap: "xs", children: [
1777
1814
  d,
1778
1815
  h
1779
- ] }, s), e[19] = s, e[20] = d, e[21] = h, e[22] = g) : g = e[22], g;
1816
+ ] }, o), e[19] = o, e[20] = d, e[21] = h, e[22] = g) : g = e[22], g;
1780
1817
  }
1781
- function Wr(t) {
1818
+ function Gr(t) {
1782
1819
  const e = T(11), {
1783
1820
  data: n,
1784
- onOpenFile: s
1821
+ onOpenFile: o
1785
1822
  } = t;
1786
- let o;
1787
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = {}, e[0] = o) : o = e[0];
1788
- const [r, i] = G(o), l = Nr;
1823
+ let s;
1824
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = {}, e[0] = s) : s = e[0];
1825
+ const [r, i] = Y(s), a = Xr;
1789
1826
  let c;
1790
- e[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = (m) => {
1791
- i((p) => ({
1792
- ...p,
1793
- [m]: !p[m]
1827
+ e[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = (f) => {
1828
+ i((m) => ({
1829
+ ...m,
1830
+ [f]: !m[f]
1794
1831
  }));
1795
1832
  }, e[1] = c) : c = e[1];
1796
1833
  const u = c;
1797
1834
  let d;
1798
- if (e[2] !== n.items || e[3] !== r || e[4] !== s) {
1799
- let m;
1800
- e[6] !== r || e[7] !== s ? (m = (p, h) => {
1801
- const g = l(p, h), y = (p.blocks?.length ?? 0) > 0, b = (p.expandable ?? !0) && y, x = b ? r[g] ?? !1 : y;
1802
- return /* @__PURE__ */ a(Qr, { item: p, itemKey: g, isOpen: x, canExpand: b, hasBlocks: y, onToggle: u, onOpenFile: s }, g);
1803
- }, e[6] = r, e[7] = s, e[8] = m) : m = e[8], d = n.items.map(m), e[2] = n.items, e[3] = r, e[4] = s, e[5] = d;
1835
+ if (e[2] !== n.items || e[3] !== r || e[4] !== o) {
1836
+ let f;
1837
+ e[6] !== r || e[7] !== o ? (f = (m, h) => {
1838
+ const g = a(m, h), y = (m.blocks?.length ?? 0) > 0, b = (m.expandable ?? !0) && y, x = b ? r[g] ?? !1 : y;
1839
+ return /* @__PURE__ */ l(Ur, { item: m, itemKey: g, isOpen: x, canExpand: b, hasBlocks: y, onToggle: u, onOpenFile: o }, g);
1840
+ }, e[6] = r, e[7] = o, e[8] = f) : f = e[8], d = n.items.map(f), e[2] = n.items, e[3] = r, e[4] = o, e[5] = d;
1804
1841
  } else
1805
1842
  d = e[5];
1806
- let f;
1807
- return e[9] !== d ? (f = /* @__PURE__ */ a(Ce.Root, { children: d }), e[9] = d, e[10] = f) : f = e[10], f;
1843
+ let p;
1844
+ return e[9] !== d ? (p = /* @__PURE__ */ l(Me.Root, { children: d }), e[9] = d, e[10] = p) : p = e[10], p;
1808
1845
  }
1809
- function Nr(t, e) {
1846
+ function Xr(t, e) {
1810
1847
  return t.id ? `id:${t.id}` : `idx:${e}`;
1811
1848
  }
1812
- const Vr = (t) => gt(t.tool ?? "").replace(/_/g, "") === "question", jr = (t) => {
1849
+ const Yr = (t) => bt(t.tool ?? "").replace(/_/g, "") === "question", Jr = (t) => {
1813
1850
  const e = t.state?.output;
1814
1851
  return typeof e == "string" ? e.trim().length > 0 : Array.isArray(e) ? e.length > 0 : e && typeof e == "object" ? Object.keys(e).length > 0 : e != null;
1815
1852
  };
1816
- function Ur(t) {
1853
+ function Zr(t) {
1817
1854
  const e = T(8), {
1818
1855
  invocations: n,
1819
- labeledBlocks: s,
1820
- hideQuestionForms: o,
1856
+ labeledBlocks: o,
1857
+ hideQuestionForms: s,
1821
1858
  onOpenFile: r
1822
- } = t, i = o === void 0 ? !1 : o;
1823
- let l, c;
1824
- if (e[0] !== i || e[1] !== n || e[2] !== s) {
1859
+ } = t, i = s === void 0 ? !1 : s;
1860
+ let a, c;
1861
+ if (e[0] !== i || e[1] !== n || e[2] !== o) {
1825
1862
  c = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
1826
1863
  e: {
1827
- const f = i ? n.filter(Kr) : n;
1828
- if (f.length === 0) {
1864
+ const p = i ? n.filter(ei) : n;
1865
+ if (p.length === 0) {
1829
1866
  c = null;
1830
1867
  break e;
1831
1868
  }
1832
- l = Er(f, {
1833
- labeledBlocks: s
1869
+ a = $r(p, {
1870
+ labeledBlocks: o
1834
1871
  });
1835
1872
  }
1836
- e[0] = i, e[1] = n, e[2] = s, e[3] = l, e[4] = c;
1873
+ e[0] = i, e[1] = n, e[2] = o, e[3] = a, e[4] = c;
1837
1874
  } else
1838
- l = e[3], c = e[4];
1875
+ a = e[3], c = e[4];
1839
1876
  if (c !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
1840
1877
  return c;
1841
- const u = l;
1878
+ const u = a;
1842
1879
  let d;
1843
- return e[5] !== u || e[6] !== r ? (d = /* @__PURE__ */ a(Wr, { data: u, onOpenFile: r }), e[5] = u, e[6] = r, e[7] = d) : d = e[7], d;
1880
+ return e[5] !== u || e[6] !== r ? (d = /* @__PURE__ */ l(Gr, { data: u, onOpenFile: r }), e[5] = u, e[6] = r, e[7] = d) : d = e[7], d;
1844
1881
  }
1845
- function Kr(t) {
1846
- return !Vr(t) || jr(t);
1882
+ function ei(t) {
1883
+ return !Yr(t) || Jr(t);
1847
1884
  }
1848
- const Gr = (t) => t.type === "tool", Vt = (t) => t.filename ?? t.url.split("/").pop() ?? "attachment", Xr = /\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i, Yr = (t) => t.mediaType?.startsWith("image/") || Xr.test(Vt(t)), Jr = (t) => Yr(t) ? /* @__PURE__ */ a(Kn, { src: t.url, alt: `${Vt(t)} preview thumbnail`, boxSize: "18px", borderRadius: "xs", objectFit: "cover" }) : void 0, Zr = (t, e) => {
1885
+ const ti = (t) => t.type === "tool", Vt = (t) => t.filename ?? t.url.split("/").pop() ?? "attachment", ni = /\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i, si = (t) => t.mediaType?.startsWith("image/") || ni.test(Vt(t)), oi = (t) => si(t) ? /* @__PURE__ */ l(Gn, { src: t.url, alt: `${Vt(t)} preview thumbnail`, boxSize: "18px", borderRadius: "xs", objectFit: "cover" }) : void 0, ri = (t, e) => {
1849
1886
  if (e) {
1850
1887
  e(t.url);
1851
1888
  return;
1852
1889
  }
1853
1890
  typeof window < "u" && window.open(t.url, "_blank", "noopener,noreferrer");
1854
- }, ei = (t) => {
1891
+ }, ii = (t) => {
1855
1892
  if (t.message && t.message.trim().length > 0)
1856
1893
  return t.message;
1857
1894
  const {
@@ -1867,95 +1904,95 @@ const Gr = (t) => t.type === "tool", Vt = (t) => t.filename ?? t.url.split("/").
1867
1904
  default:
1868
1905
  return "An error occurred.";
1869
1906
  }
1870
- }, ti = {
1907
+ }, li = {
1871
1908
  info: "blue",
1872
1909
  warning: "orange",
1873
1910
  error: "red",
1874
1911
  success: "green",
1875
1912
  loading: "blue"
1876
- }, ni = (t, e) => {
1913
+ }, ai = (t, e) => {
1877
1914
  const n = [];
1878
- let s = e;
1879
- for (; s < t.length; ) {
1880
- const o = t[s];
1881
- if (!Gr(o)) break;
1882
- n.push(o), s += 1;
1915
+ let o = e;
1916
+ for (; o < t.length; ) {
1917
+ const s = t[o];
1918
+ if (!ti(s)) break;
1919
+ n.push(s), o += 1;
1883
1920
  }
1884
1921
  return {
1885
1922
  invocations: n,
1886
- nextIndex: s - 1
1923
+ nextIndex: o - 1
1887
1924
  };
1888
1925
  };
1889
- function vn(t) {
1926
+ function Ln(t) {
1890
1927
  const e = T(8), {
1891
1928
  message: n,
1892
- hideQuestionForms: s,
1893
- onOpenFile: o,
1929
+ hideQuestionForms: o,
1930
+ onOpenFile: s,
1894
1931
  toolInvocationTimeline: r
1895
- } = t, i = s === void 0 ? !1 : s, l = r ?? Ur;
1932
+ } = t, i = o === void 0 ? !1 : o, a = r ?? Zr;
1896
1933
  let c;
1897
1934
  e[0] !== n.parts ? (c = n.parts ?? [], e[0] = n.parts, e[1] = c) : c = e[1];
1898
1935
  const u = c;
1899
1936
  let d;
1900
- if (e[2] !== l || e[3] !== i || e[4] !== n.id || e[5] !== o || e[6] !== u) {
1901
- const f = [];
1902
- for (let m = 0; m < u.length; m = m + 1, m) {
1903
- const p = u[m], h = `${n.id}-${m}`;
1904
- e: switch (p.type) {
1937
+ if (e[2] !== a || e[3] !== i || e[4] !== n.id || e[5] !== s || e[6] !== u) {
1938
+ const p = [];
1939
+ for (let f = 0; f < u.length; f = f + 1, f) {
1940
+ const m = u[f], h = `${n.id}-${f}`;
1941
+ e: switch (m.type) {
1905
1942
  case "text": {
1906
- f.push(/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(As, { children: p.text }) }, h));
1943
+ p.push(/* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(vo, { children: m.text }) }, h));
1907
1944
  break e;
1908
1945
  }
1909
1946
  case "reasoning": {
1910
- f.push(/* @__PURE__ */ a(I, { padding: "0", css: {
1947
+ p.push(/* @__PURE__ */ l(R, { padding: "0", css: {
1911
1948
  "& .rich-text, & .rich-text *": {
1912
1949
  color: "fg.subtle !important",
1913
1950
  fontSize: ".75rem !important",
1914
1951
  fontWeight: "normal !important"
1915
1952
  }
1916
- }, children: /* @__PURE__ */ a(dn, { defaultState: p.text, fullWidth: !0 }) }, h));
1953
+ }, children: /* @__PURE__ */ l(dn, { defaultState: m.text, fullWidth: !0 }) }, h));
1917
1954
  break e;
1918
1955
  }
1919
1956
  case "tool": {
1920
1957
  const {
1921
1958
  invocations: g,
1922
1959
  nextIndex: y
1923
- } = ni(u, m);
1924
- m = y, f.push(/* @__PURE__ */ a(I, { width: "full", children: /* @__PURE__ */ a(l, { invocations: g, labeledBlocks: !0, hideQuestionForms: i, onOpenFile: o }) }, h));
1960
+ } = ai(u, f);
1961
+ f = y, p.push(/* @__PURE__ */ l(R, { width: "full", children: /* @__PURE__ */ l(a, { invocations: g, labeledBlocks: !0, hideQuestionForms: i, onOpenFile: s }) }, h));
1925
1962
  break e;
1926
1963
  }
1927
1964
  case "file": {
1928
- f.push(/* @__PURE__ */ a(I, { width: "fit-content", children: /* @__PURE__ */ a(qt, { fileName: Vt(p), size: "sm", tone: "neutral", icon: Jr(p), onSelect: () => Zr(p, o) }) }, h));
1965
+ p.push(/* @__PURE__ */ l(R, { width: "fit-content", children: /* @__PURE__ */ l(qt, { fileName: Vt(m), size: "sm", tone: "neutral", icon: oi(m), onSelect: () => ri(m, s) }) }, h));
1929
1966
  break e;
1930
1967
  }
1931
1968
  case "error": {
1932
- f.push(/* @__PURE__ */ a(I, { py: "2", width: "full", children: /* @__PURE__ */ a(Kt, { borderRadius: "xs", status: "error", colorPalette: "red", title: ei(p), size: "sm" }) }, h));
1969
+ p.push(/* @__PURE__ */ l(R, { py: "2", width: "full", children: /* @__PURE__ */ l(Ut, { borderRadius: "xs", status: "error", colorPalette: "red", title: ii(m), size: "sm" }) }, h));
1933
1970
  break e;
1934
1971
  }
1935
1972
  case "token_usage":
1936
1973
  break e;
1937
1974
  case "alert": {
1938
- f.push(/* @__PURE__ */ a(I, { width: "full", children: /* @__PURE__ */ a(Kt, { borderRadius: "xs", status: p.status === "loading" ? "info" : p.status, colorPalette: ti[p.status], title: p.title, icon: p.status === "loading" ? /* @__PURE__ */ a(zt, { size: "sm" }) : void 0, size: "sm", children: p.message }) }, h));
1975
+ p.push(/* @__PURE__ */ l(R, { width: "full", children: /* @__PURE__ */ l(Ut, { borderRadius: "xs", status: m.status === "loading" ? "info" : m.status, colorPalette: li[m.status], title: m.title, icon: m.status === "loading" ? /* @__PURE__ */ l(zt, { size: "sm" }) : void 0, size: "sm", children: m.message }) }, h));
1939
1976
  break e;
1940
1977
  }
1941
1978
  default:
1942
- f.push(null);
1979
+ p.push(null);
1943
1980
  }
1944
1981
  }
1945
- d = /* @__PURE__ */ a($t, { children: f }), e[2] = l, e[3] = i, e[4] = n.id, e[5] = o, e[6] = u, e[7] = d;
1982
+ d = /* @__PURE__ */ l($t, { children: p }), e[2] = a, e[3] = i, e[4] = n.id, e[5] = s, e[6] = u, e[7] = d;
1946
1983
  } else
1947
1984
  d = e[7];
1948
1985
  return d;
1949
1986
  }
1950
- const oi = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "assistant", si = (t) => {
1987
+ const ci = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "assistant", ui = (t) => {
1951
1988
  const e = t.parts ?? [];
1952
- return e.length === 0 || e.some((s) => s.type === "text" && "text" in s) ? !1 : e.some((s) => s.type === "reasoning" || s.type === "tool");
1953
- }, ri = (t) => {
1989
+ return e.length === 0 || e.some((o) => o.type === "text" && "text" in o) ? !1 : e.some((o) => o.type === "reasoning" || o.type === "tool");
1990
+ }, di = (t) => {
1954
1991
  const e = [];
1955
1992
  for (const n of t) {
1956
- const s = e[e.length - 1];
1957
- if (s && s.role === n.role && si(n)) {
1958
- s.parts = [...s.parts ?? [], ...n.parts ?? []];
1993
+ const o = e[e.length - 1];
1994
+ if (o && o.role === n.role && ui(n)) {
1995
+ o.parts = [...o.parts ?? [], ...n.parts ?? []];
1959
1996
  continue;
1960
1997
  }
1961
1998
  e.push({
@@ -1964,194 +2001,199 @@ const oi = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
1964
2001
  });
1965
2002
  }
1966
2003
  return e;
1967
- }, ii = (t) => {
2004
+ }, fi = (t) => {
1968
2005
  const e = [], n = [];
1969
- for (const s of t)
1970
- s.role === "user" ? e.push({
1971
- userMessage: s,
2006
+ for (const o of t)
2007
+ o.role === "user" ? e.push({
2008
+ userMessage: o,
1972
2009
  responses: []
1973
- }) : e.length > 0 ? e[e.length - 1].responses.push(s) : n.push(s);
2010
+ }) : e.length > 0 ? e[e.length - 1].responses.push(o) : n.push(o);
1974
2011
  return {
1975
2012
  groups: e,
1976
2013
  leadingResponses: n
1977
2014
  };
1978
- }, Ln = 720, li = 1, ai = 3, ci = 20, on = 1, ui = 4, Dn = 8, di = (t, e) => [...t.map((n) => ({
2015
+ }, Bn = 720, pi = 1, mi = 3, hi = 20, sn = 1, gi = 4, Dn = 8, bi = (t, e) => [...t.map((n) => ({
1979
2016
  type: "leading-response",
1980
2017
  key: n.id,
1981
2018
  message: n
1982
- })), ...e.map((n, s) => ({
2019
+ })), ...e.map((n, o) => ({
1983
2020
  type: "group",
1984
2021
  key: n.userMessage.id,
1985
2022
  group: n,
1986
- groupIndex: s
1987
- }))], fi = (t, e) => {
2023
+ groupIndex: o
2024
+ }))], yi = (t, e) => {
1988
2025
  if (t === 0) return 0;
1989
- const n = t * Ln + (t - 1) * Dn;
2026
+ const n = t * Bn + (t - 1) * Dn;
1990
2027
  return Math.max(n - e, 0);
1991
- }, pi = (t) => t?.clientHeight || li, mi = (t, e) => Math.abs(t.scrollTop - e.scrollTop) <= on && Math.abs(t.totalSize - e.totalSize) <= on, hi = (t, e) => ({
2028
+ }, xi = (t) => t?.clientHeight || pi, Si = (t, e) => Math.abs(t.scrollTop - e.scrollTop) <= sn && Math.abs(t.totalSize - e.totalSize) <= sn, Ti = (t, e) => ({
1992
2029
  scrollTop: t?.scrollTop ?? 0,
1993
2030
  totalSize: e
1994
- }), gi = (t) => {
2031
+ }), wi = (t) => {
1995
2032
  const e = T(8), {
1996
2033
  itemCount: n,
1997
- onReady: s,
1998
- scrollRef: o,
2034
+ onReady: o,
2035
+ scrollRef: s,
1999
2036
  totalSize: r
2000
- } = t, i = Ne(s);
2001
- let l, c;
2002
- e[0] !== s ? (l = () => {
2003
- i.current = s;
2004
- }, c = [s], e[0] = s, e[1] = l, e[2] = c) : (l = e[1], c = e[2]), Ae(l, c);
2037
+ } = t, i = Le(o);
2038
+ let a, c;
2039
+ e[0] !== o ? (a = () => {
2040
+ i.current = o;
2041
+ }, c = [o], e[0] = o, e[1] = a, e[2] = c) : (a = e[1], c = e[2]), Pe(a, c);
2005
2042
  let u, d;
2006
- e[3] !== n || e[4] !== o || e[5] !== r ? (u = () => {
2043
+ e[3] !== n || e[4] !== s || e[5] !== r ? (u = () => {
2007
2044
  if (n === 0 || typeof requestAnimationFrame > "u") {
2008
2045
  i.current?.();
2009
2046
  return;
2010
2047
  }
2011
- let f = 0, m = 0, p = 0, h = null;
2048
+ let p = 0, f = 0, m = 0, h = null;
2012
2049
  const g = () => {
2013
- m = m + 1;
2014
- const y = hi(o.current, r);
2015
- if (p = h && mi(y, h) ? p + 1 : 0, h = y, p >= ai || m >= ci) {
2050
+ f = f + 1;
2051
+ const y = Ti(s.current, r);
2052
+ if (m = h && Si(y, h) ? m + 1 : 0, h = y, m >= mi || f >= hi) {
2016
2053
  i.current?.();
2017
2054
  return;
2018
2055
  }
2019
- f = requestAnimationFrame(g);
2056
+ p = requestAnimationFrame(g);
2020
2057
  };
2021
- return f = requestAnimationFrame(g), () => cancelAnimationFrame(f);
2022
- }, d = [n, o, r], e[3] = n, e[4] = o, e[5] = r, e[6] = u, e[7] = d) : (u = e[6], d = e[7]), Ae(u, d);
2023
- }, bi = (t) => {
2058
+ return p = requestAnimationFrame(g), () => cancelAnimationFrame(p);
2059
+ }, d = [n, s, r], e[3] = n, e[4] = s, e[5] = r, e[6] = u, e[7] = d) : (u = e[6], d = e[7]), Pe(u, d);
2060
+ }, ki = (t) => {
2024
2061
  const e = T(7), {
2025
2062
  label: n,
2026
- onClick: s,
2027
- actionPanel: o
2028
- } = t, r = o ? "space-between" : "flex-end";
2063
+ onClick: o,
2064
+ actionPanel: s
2065
+ } = t, r = s ? "space-between" : "flex-end";
2029
2066
  let i;
2030
- e[0] !== n || e[1] !== s ? (i = /* @__PURE__ */ a(Ze, { size: "2xs", variant: "outline", pointerEvents: "auto", onClick: s, children: n }), e[0] = n, e[1] = s, e[2] = i) : i = e[2];
2031
- let l;
2032
- return e[3] !== o || e[4] !== r || e[5] !== i ? (l = /* @__PURE__ */ k(Re, { position: "absolute", bottom: "0", left: "0", right: "0", justifyContent: r, alignItems: "flex-end", px: "xs", pb: "xs", pt: "lg", bgGradient: "to-t", gradientFrom: "bg.subtle", gradientTo: "transparent", borderBottomRadius: "xs", pointerEvents: "none", children: [
2033
- o,
2067
+ e[0] !== n || e[1] !== o ? (i = /* @__PURE__ */ l(Ze, { size: "2xs", variant: "outline", pointerEvents: "auto", onClick: o, children: n }), e[0] = n, e[1] = o, e[2] = i) : i = e[2];
2068
+ let a;
2069
+ return e[3] !== s || e[4] !== r || e[5] !== i ? (a = /* @__PURE__ */ k(Ee, { position: "absolute", bottom: "0", left: "0", right: "0", justifyContent: r, alignItems: "flex-end", px: "xs", pb: "xs", pt: "lg", bgGradient: "to-t", gradientFrom: "bg.subtle", gradientTo: "transparent", borderBottomRadius: "xs", pointerEvents: "none", children: [
2070
+ s,
2034
2071
  i
2035
- ] }), e[3] = o, e[4] = r, e[5] = i, e[6] = l) : l = e[6], l;
2036
- }, Bn = (t, e, n = !1) => {
2037
- const s = oi(t.role);
2038
- return /* @__PURE__ */ a(_e.Root, { from: s, children: /* @__PURE__ */ k(_e.Content, { from: s, children: [
2039
- /* @__PURE__ */ a(vn, { message: t, streaming: e, hideQuestionForms: n }),
2040
- s === "assistant" || s === "user" ? /* @__PURE__ */ a(Ot, { message: t, alwaysVisible: s === "user", copyAlwaysVisible: s !== "user" }) : null
2072
+ ] }), e[3] = s, e[4] = r, e[5] = i, e[6] = a) : a = e[6], a;
2073
+ }, On = (t, e, n = !1, o = !1) => {
2074
+ const s = ci(t.role);
2075
+ return /* @__PURE__ */ l(ve.Root, { from: s, ...o ? yn : void 0, children: /* @__PURE__ */ k(ve.Content, { from: s, children: [
2076
+ /* @__PURE__ */ l(Ln, { message: t, streaming: e, hideQuestionForms: n }),
2077
+ s === "assistant" || s === "user" ? /* @__PURE__ */ l(Ot, { message: t, alwaysVisible: s === "user", copyAlwaysVisible: s !== "user" }) : null
2041
2078
  ] }) });
2042
- }, yi = (t) => {
2043
- Ss(t.currentTarget, t.deltaY) && t.stopPropagation();
2044
- }, xi = (t, e) => {
2079
+ }, Ci = (t) => {
2080
+ _o(t.currentTarget, t.deltaY) && t.stopPropagation();
2081
+ }, Ai = (t, e) => {
2045
2082
  if (t)
2046
- return e ? yn : bs;
2047
- }, Si = (t) => {
2083
+ return e ? xn : ko;
2084
+ }, _i = (t) => {
2048
2085
  if (t)
2049
- return yn;
2050
- }, Ti = (t) => {
2051
- const e = T(43), {
2086
+ return xn;
2087
+ }, Ri = (t) => {
2088
+ const e = T(46), {
2052
2089
  group: n,
2053
- streaming: s,
2054
- hideQuestionForms: o,
2090
+ streaming: o,
2091
+ hideQuestionForms: s,
2055
2092
  isExpanded: r,
2056
- onToggleStickyMessage: i
2093
+ animate: i,
2094
+ onToggleStickyMessage: a
2057
2095
  } = t;
2058
- let l, c, u;
2059
- e[0] !== n.userMessage || e[1] !== r ? (l = xs(n.userMessage), c = l && r, u = xi(l, r), e[0] = n.userMessage, e[1] = r, e[2] = l, e[3] = c, e[4] = u) : (l = e[2], c = e[3], u = e[4]);
2060
- const d = u;
2096
+ let c, u, d;
2097
+ e[0] !== n.userMessage || e[1] !== r ? (c = Ao(n.userMessage), u = c && r, d = Ai(c, r), e[0] = n.userMessage, e[1] = r, e[2] = c, e[3] = u, e[4] = d) : (c = e[2], u = e[3], d = e[4]);
2098
+ const p = d;
2061
2099
  let f;
2062
- e[5] !== n.userMessage.id || e[6] !== i ? (f = () => i(n.userMessage.id), e[5] = n.userMessage.id, e[6] = i, e[7] = f) : f = e[7];
2063
- const m = f, p = l ? "0" : void 0, h = l ? "relative" : void 0, g = l ? r ? "expanded" : "collapsed" : void 0;
2064
- let y;
2065
- e[8] !== c ? (y = Si(c), e[8] = c, e[9] = y) : y = e[9];
2066
- const b = c ? "auto" : "visible", x = l ? "xs" : void 0, C = l ? "xs" : void 0, A = c ? "3rem" : void 0, w = c ? yi : void 0;
2067
- let _;
2068
- e[10] !== n.userMessage || e[11] !== s ? (_ = /* @__PURE__ */ a(vn, { message: n.userMessage, streaming: s }), e[10] = n.userMessage, e[11] = s, e[12] = _) : _ = e[12];
2100
+ e[5] !== n.userMessage.id || e[6] !== a ? (f = () => a(n.userMessage.id), e[5] = n.userMessage.id, e[6] = a, e[7] = f) : f = e[7];
2101
+ const m = f, h = i ? yn : void 0, g = c ? "0" : void 0, y = c ? "relative" : void 0, b = c ? r ? "expanded" : "collapsed" : void 0;
2102
+ let x;
2103
+ e[8] !== u ? (x = _i(u), e[8] = u, e[9] = x) : x = e[9];
2104
+ const C = u ? "auto" : "visible", A = c ? "xs" : void 0, w = c ? "xs" : void 0, I = u ? "3rem" : void 0, v = u ? Ci : void 0;
2069
2105
  let M;
2070
- e[13] !== w || e[14] !== _ || e[15] !== g || e[16] !== y || e[17] !== b || e[18] !== x || e[19] !== C || e[20] !== A ? (M = /* @__PURE__ */ a(I, { "data-sticky-user-message-content": g, display: "flex", flexDirection: "column", gap: "sm", maxH: y, minH: "0", overflowY: b, px: x, py: C, pb: A, onWheel: w, children: _ }), e[13] = w, e[14] = _, e[15] = g, e[16] = y, e[17] = b, e[18] = x, e[19] = C, e[20] = A, e[21] = M) : M = e[21];
2071
- let P;
2072
- e[22] !== n.userMessage || e[23] !== l || e[24] !== r || e[25] !== m ? (P = l ? /* @__PURE__ */ a(bi, { label: r ? "Show less" : "Show more", onClick: m, actionPanel: /* @__PURE__ */ a(Ot, { message: n.userMessage, alwaysVisible: !0, copyAlwaysVisible: !1 }) }) : /* @__PURE__ */ a(Ot, { message: n.userMessage, alwaysVisible: !0, copyAlwaysVisible: !1 }), e[22] = n.userMessage, e[23] = l, e[24] = r, e[25] = m, e[26] = P) : P = e[26];
2073
- let v;
2074
- e[27] !== d || e[28] !== M || e[29] !== P || e[30] !== p || e[31] !== h ? (v = /* @__PURE__ */ a(I, { position: "sticky", top: "0", zIndex: 1, children: /* @__PURE__ */ a(_e.Root, { from: "user", children: /* @__PURE__ */ k(_e.Content, { from: "user", maxH: d, overflow: "hidden", p, position: h, children: [
2075
- M,
2076
- P
2077
- ] }) }) }), e[27] = d, e[28] = M, e[29] = P, e[30] = p, e[31] = h, e[32] = v) : v = e[32];
2106
+ e[10] !== n.userMessage || e[11] !== o ? (M = /* @__PURE__ */ l(Ln, { message: n.userMessage, streaming: o }), e[10] = n.userMessage, e[11] = o, e[12] = M) : M = e[12];
2107
+ let E;
2108
+ e[13] !== I || e[14] !== v || e[15] !== M || e[16] !== b || e[17] !== x || e[18] !== C || e[19] !== A || e[20] !== w ? (E = /* @__PURE__ */ l(R, { "data-sticky-user-message-content": b, display: "flex", flexDirection: "column", gap: "sm", maxH: x, minH: "0", overflowY: C, px: A, py: w, pb: I, onWheel: v, children: M }), e[13] = I, e[14] = v, e[15] = M, e[16] = b, e[17] = x, e[18] = C, e[19] = A, e[20] = w, e[21] = E) : E = e[21];
2078
2109
  let L;
2079
- if (e[33] !== n.responses || e[34] !== o || e[35] !== s) {
2080
- let J;
2081
- e[37] !== o || e[38] !== s ? (J = (B) => /* @__PURE__ */ a(I, { children: Bn(B, s, o) }, B.id), e[37] = o, e[38] = s, e[39] = J) : J = e[39], L = n.responses.map(J), e[33] = n.responses, e[34] = o, e[35] = s, e[36] = L;
2082
- } else
2083
- L = e[36];
2084
- let q;
2085
- return e[40] !== v || e[41] !== L ? (q = /* @__PURE__ */ k(I, { children: [
2086
- v,
2110
+ e[22] !== n.userMessage || e[23] !== c || e[24] !== r || e[25] !== m ? (L = c ? /* @__PURE__ */ l(ki, { label: r ? "Show less" : "Show more", onClick: m, actionPanel: /* @__PURE__ */ l(Ot, { message: n.userMessage, alwaysVisible: !0, copyAlwaysVisible: !1 }) }) : /* @__PURE__ */ l(Ot, { message: n.userMessage, alwaysVisible: !0, copyAlwaysVisible: !1 }), e[22] = n.userMessage, e[23] = c, e[24] = r, e[25] = m, e[26] = L) : L = e[26];
2111
+ let z;
2112
+ e[27] !== p || e[28] !== E || e[29] !== L || e[30] !== g || e[31] !== y ? (z = /* @__PURE__ */ k(ve.Content, { from: "user", maxH: p, overflow: "hidden", p: g, position: y, children: [
2113
+ E,
2087
2114
  L
2088
- ] }), e[40] = v, e[41] = L, e[42] = q) : q = e[42], q;
2089
- }, wi = (t, e) => {
2115
+ ] }), e[27] = p, e[28] = E, e[29] = L, e[30] = g, e[31] = y, e[32] = z) : z = e[32];
2116
+ let Q;
2117
+ e[33] !== z || e[34] !== h ? (Q = /* @__PURE__ */ l(R, { position: "sticky", top: "0", zIndex: 1, children: /* @__PURE__ */ l(ve.Root, { from: "user", ...h, children: z }) }), e[33] = z, e[34] = h, e[35] = Q) : Q = e[35];
2118
+ let P;
2119
+ if (e[36] !== n.responses || e[37] !== s || e[38] !== o) {
2120
+ let ee;
2121
+ e[40] !== s || e[41] !== o ? (ee = (oe) => /* @__PURE__ */ l(R, { children: On(oe, o, s) }, oe.id), e[40] = s, e[41] = o, e[42] = ee) : ee = e[42], P = n.responses.map(ee), e[36] = n.responses, e[37] = s, e[38] = o, e[39] = P;
2122
+ } else
2123
+ P = e[39];
2124
+ let N;
2125
+ return e[43] !== Q || e[44] !== P ? (N = /* @__PURE__ */ k(R, { children: [
2126
+ Q,
2127
+ P
2128
+ ] }), e[43] = Q, e[44] = P, e[45] = N) : N = e[45], N;
2129
+ }, Ii = (t, e) => {
2090
2130
  const {
2091
2131
  groups: n,
2092
- streaming: s,
2093
- hideActiveQuestionForms: o,
2132
+ streaming: o,
2133
+ hideActiveQuestionForms: s,
2094
2134
  expandedStickyMessageIds: r,
2095
- onToggleStickyMessage: i
2135
+ animatedItemKeys: i,
2136
+ onToggleStickyMessage: a
2096
2137
  } = e;
2097
- return t.type === "leading-response" ? Bn(t.message, s, n.length > 0 || o) : /* @__PURE__ */ a(Ti, { group: t.group, streaming: s, hideQuestionForms: t.groupIndex < n.length - 1 || o, isExpanded: r.has(t.group.userMessage.id), onToggleStickyMessage: i });
2098
- }, ki = (t) => {
2138
+ return t.type === "leading-response" ? On(t.message, o, n.length > 0 || s, i.has(t.key)) : /* @__PURE__ */ l(Ri, { group: t.group, streaming: o, hideQuestionForms: t.groupIndex < n.length - 1 || s, isExpanded: r.has(t.group.userMessage.id), animate: i.has(t.key), onToggleStickyMessage: a });
2139
+ }, Mi = (t) => {
2099
2140
  const {
2100
2141
  leadingResponses: e,
2101
2142
  groups: n,
2102
- streaming: s,
2103
- hideActiveQuestionForms: o,
2143
+ streaming: o,
2144
+ hideActiveQuestionForms: s,
2104
2145
  expandedStickyMessageIds: r,
2105
2146
  onToggleStickyMessage: i,
2106
- onReady: l
2147
+ onReady: a
2107
2148
  } = t, {
2108
2149
  scrollRef: c
2109
- } = mt(), u = di(e, n), d = pi(c.current), f = Ro({
2150
+ } = ht(), u = bi(e, n), d = So(u.map((h) => h.key)), p = xi(c.current), f = _s({
2110
2151
  count: u.length,
2111
2152
  getScrollElement: () => c.current,
2112
- estimateSize: () => Ln,
2113
- getItemKey: (p) => u[p]?.key ?? p,
2114
- overscan: ui,
2153
+ estimateSize: () => Bn,
2154
+ getItemKey: (h) => u[h]?.key ?? h,
2155
+ overscan: gi,
2115
2156
  gap: Dn,
2116
2157
  initialRect: {
2117
2158
  width: 0,
2118
- height: d
2159
+ height: p
2119
2160
  },
2120
- initialOffset: () => fi(u.length, d)
2161
+ initialOffset: () => yi(u.length, p)
2121
2162
  }), m = f.getTotalSize();
2122
- return gi({
2163
+ return wi({
2123
2164
  itemCount: u.length,
2124
- onReady: l,
2165
+ onReady: a,
2125
2166
  scrollRef: c,
2126
2167
  totalSize: m
2127
- }), /* @__PURE__ */ a(I, { px: "xs", children: /* @__PURE__ */ a(I, { position: "relative", width: "100%", style: {
2168
+ }), /* @__PURE__ */ l(R, { px: "xs", children: /* @__PURE__ */ l(R, { position: "relative", width: "100%", style: {
2128
2169
  height: m
2129
- }, children: f.getVirtualItems().map((p) => {
2130
- const h = u[p.index];
2131
- return h ? /* @__PURE__ */ a(I, { ref: f.measureElement, "data-index": p.index, "data-chat-message-list-item": h.type, position: "absolute", top: "0", left: "0", width: "100%", style: {
2132
- top: p.start
2133
- }, children: wi(h, {
2170
+ }, children: f.getVirtualItems().map((h) => {
2171
+ const g = u[h.index];
2172
+ return g ? /* @__PURE__ */ l(R, { ref: f.measureElement, "data-index": h.index, "data-chat-message-list-item": g.type, position: "absolute", top: "0", left: "0", width: "100%", style: {
2173
+ top: h.start
2174
+ }, children: Ii(g, {
2134
2175
  groups: n,
2135
- streaming: s,
2136
- hideActiveQuestionForms: o,
2176
+ streaming: o,
2177
+ hideActiveQuestionForms: s,
2137
2178
  expandedStickyMessageIds: r,
2179
+ animatedItemKeys: d,
2138
2180
  onToggleStickyMessage: i
2139
- }) }, p.key) : null;
2181
+ }) }, h.key) : null;
2140
2182
  }) }) });
2141
- }, dl = (t) => {
2142
- const e = T(64), {
2183
+ }, Ui = (t) => {
2184
+ const e = T(66), {
2143
2185
  conversationKey: n,
2144
- messages: s,
2145
- loading: o,
2186
+ messages: o,
2187
+ loading: s,
2146
2188
  streaming: r,
2147
2189
  emptyStateTitle: i,
2148
- emptyStateDescription: l,
2190
+ emptyStateDescription: a,
2149
2191
  emptyStateContent: c,
2150
2192
  loaderComponent: u,
2151
2193
  chatInputPlaceholder: d,
2152
- chatInputDefaultValue: f,
2153
- onSubmitMessage: m,
2154
- onInterrupt: p,
2194
+ chatInputDefaultValue: p,
2195
+ onSubmitMessage: f,
2196
+ onInterrupt: m,
2155
2197
  onAttachFiles: h,
2156
2198
  onAttachText: g,
2157
2199
  onChatInputChange: y,
@@ -2160,132 +2202,130 @@ const oi = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
2160
2202
  attachedResources: C,
2161
2203
  onClearAttachments: A,
2162
2204
  attachmentList: w,
2163
- approvalPrompt: _,
2164
- workspaceHub: M,
2165
- workspaceInitializing: P,
2166
- inputDisabled: v,
2205
+ approvalPrompt: I,
2206
+ workspaceHub: v,
2207
+ workspaceInitializing: M,
2208
+ inputDisabled: E,
2167
2209
  chatInputQuestionPrompt: L,
2168
- chatInputAutoFocus: q
2169
- } = t, J = o === void 0 ? !1 : o, B = r === void 0 ? !1 : r, ve = f === void 0 ? "" : f, je = P === void 0 ? !1 : P, Le = v === void 0 ? !1 : v, he = q === void 0 ? !1 : q;
2170
- let F, z, ee, E;
2171
- if (e[0] !== n || e[1] !== s) {
2172
- const H = ri(s);
2173
- F = H.length > 0;
2174
- const we = n ?? H[0]?.id;
2175
- z = F ? we ?? "active-conversation" : null, E = H.reduce(Ci, 0), ee = ii(H), e[0] = n, e[1] = s, e[2] = F, e[3] = z, e[4] = ee, e[5] = E;
2210
+ chatInputAutoFocus: z
2211
+ } = t, Q = s === void 0 ? !1 : s, P = r === void 0 ? !1 : r, N = p === void 0 ? "" : p, ee = M === void 0 ? !1 : M, oe = E === void 0 ? !1 : E, xe = z === void 0 ? !1 : z;
2212
+ let q, H, te, B, V;
2213
+ if (e[0] !== n || e[1] !== o) {
2214
+ const D = di(o);
2215
+ q = D.length > 0, te = n ?? D[0]?.id, H = q ? te ?? "active-conversation" : null, V = D.reduce(Pi, 0), B = fi(D), e[0] = n, e[1] = o, e[2] = q, e[3] = H, e[4] = te, e[5] = B, e[6] = V;
2176
2216
  } else
2177
- F = e[2], z = e[3], ee = e[4], E = e[5];
2217
+ q = e[2], H = e[3], te = e[4], B = e[5], V = e[6];
2178
2218
  const {
2179
- groups: ge,
2180
- leadingResponses: be
2181
- } = ee, [O, De] = G(Ai), [Ue, Ke] = G(null), Be = !F && J;
2182
- let Ie;
2183
- e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Ie = /* @__PURE__ */ a(yo, { size: 48, strokeWidth: 1.5 }), e[6] = Ie) : Ie = e[6];
2184
- let te;
2185
- e[7] !== l || e[8] !== i ? (te = /* @__PURE__ */ a(_o, { icon: Ie, title: i, description: l }), e[7] = l, e[8] = i, e[9] = te) : te = e[9];
2186
- const ye = Be ? u : c ?? te, ne = !!M, xe = !!L, oe = B && F && !je, se = !z || Ue === z;
2219
+ groups: Se,
2220
+ leadingResponses: O
2221
+ } = B, [Te, Ke] = Y(vi), [Ue, $e] = Y(null), nt = !q && Q;
2187
2222
  let re;
2188
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (re = (H) => {
2189
- De((we) => {
2190
- const K = new Set(we);
2191
- return K.has(H) ? K.delete(H) : K.add(H), K;
2192
- });
2193
- }, e[10] = re) : re = e[10];
2194
- const Oe = re;
2223
+ e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (re = /* @__PURE__ */ l(ys, { size: 48, strokeWidth: 1.5 }), e[7] = re) : re = e[7];
2195
2224
  let ie;
2196
- e[11] !== E ? (ie = /* @__PURE__ */ a(Qo, { userMessageCount: E }), e[11] = E, e[12] = ie) : ie = e[12];
2197
- const Se = se ? "visible" : "hidden";
2198
- let Q;
2199
- e[13] !== ye || e[14] !== O || e[15] !== ge || e[16] !== F || e[17] !== xe || e[18] !== be || e[19] !== z || e[20] !== B ? (Q = F ? /* @__PURE__ */ a(ki, { leadingResponses: be, groups: ge, streaming: B, hideActiveQuestionForms: xe, expandedStickyMessageIds: O, onToggleStickyMessage: Oe, onReady: () => Ke(z) }, z) : ye, e[13] = ye, e[14] = O, e[15] = ge, e[16] = F, e[17] = xe, e[18] = be, e[19] = z, e[20] = B, e[21] = Q) : Q = e[21];
2200
- let W;
2201
- e[22] !== Se || e[23] !== Q ? (W = /* @__PURE__ */ a(vt.Viewport, { visibility: Se, children: Q }), e[22] = Se, e[23] = Q, e[24] = W) : W = e[24];
2202
- let Te;
2203
- e[25] !== se ? (Te = se ? /* @__PURE__ */ a(vt.ScrollToBottom, { "aria-label": "Scroll to latest message" }) : null, e[25] = se, e[26] = Te) : Te = e[26];
2204
- let N;
2205
- e[27] !== ie || e[28] !== W || e[29] !== Te ? (N = /* @__PURE__ */ k(vt.Root, { children: [
2206
- ie,
2207
- W,
2208
- Te
2209
- ] }), e[27] = ie, e[28] = W, e[29] = Te, e[30] = N) : N = e[30];
2210
- let Z;
2211
- e[31] !== oe ? (Z = oe ? /* @__PURE__ */ k(Me, { gap: "xs", px: "sm", py: "2xs", children: [
2212
- /* @__PURE__ */ a(zt, { size: "xs", color: "fg.muted" }),
2213
- /* @__PURE__ */ a(X, { textStyle: "label/XS/regular", color: "fg.muted", children: "Working..." })
2214
- ] }) : null, e[31] = oe, e[32] = Z) : Z = e[32];
2215
- const V = ne ? "0" : "xs";
2216
- let $;
2217
- e[33] !== ve ? ($ = ms(ve), e[33] = ve, e[34] = $) : $ = e[34];
2218
- let D;
2219
- e[35] !== b || e[36] !== C || e[37] !== w || e[38] !== he || e[39] !== d || e[40] !== L || e[41] !== ne || e[42] !== Le || e[43] !== h || e[44] !== g || e[45] !== y || e[46] !== A || e[47] !== p || e[48] !== m || e[49] !== B || e[50] !== $ ? (D = /* @__PURE__ */ a(us, { placeholder: d, defaultState: $, streaming: B, onSubmit: m, onInterrupt: p, onAttachFiles: h, onAttachText: g, onChange: y, actions: b, attachedResources: C, onClearAttachments: A, attachmentList: w, isDisabled: Le, attachedToTop: ne, questionPrompt: L, autoFocus: he }), e[35] = b, e[36] = C, e[37] = w, e[38] = he, e[39] = d, e[40] = L, e[41] = ne, e[42] = Le, e[43] = h, e[44] = g, e[45] = y, e[46] = A, e[47] = p, e[48] = m, e[49] = B, e[50] = $, e[51] = D) : D = e[51];
2225
+ e[8] !== a || e[9] !== i ? (ie = /* @__PURE__ */ l(As, { icon: re, title: i, description: a }), e[8] = a, e[9] = i, e[10] = ie) : ie = e[10];
2226
+ const we = nt ? u : c ?? ie, le = !!v, ae = !!L, ke = P && q && !ee, ce = !H || Ue === H;
2227
+ let ue;
2228
+ e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ue = (D) => {
2229
+ Ke((Fe) => {
2230
+ const Re = new Set(Fe);
2231
+ return Re.has(D) ? Re.delete(D) : Re.add(D), Re;
2232
+ });
2233
+ }, e[11] = ue) : ue = e[11];
2234
+ const st = ue, Ce = te ?? null;
2220
2235
  let j;
2221
- e[52] !== V || e[53] !== D || e[54] !== M ? (j = /* @__PURE__ */ k(Y, { px: "xs", gap: V, children: [
2222
- M,
2223
- D
2224
- ] }), e[52] = V, e[53] = D, e[54] = M, e[55] = j) : j = e[55];
2225
- let U;
2226
- e[56] !== x ? (U = /* @__PURE__ */ a(Re, { p: "2xs", justifyContent: "flex-end", children: x }), e[56] = x, e[57] = U) : U = e[57];
2227
- let le;
2228
- return e[58] !== _ || e[59] !== N || e[60] !== Z || e[61] !== j || e[62] !== U ? (le = /* @__PURE__ */ k(Re, { position: "relative", direction: "column", w: "full", h: "full", overflow: "hidden", children: [
2229
- N,
2230
- _,
2231
- Z,
2236
+ e[12] !== Ce || e[13] !== V ? (j = /* @__PURE__ */ l(Ns, { conversationKey: Ce, userMessageCount: V }), e[12] = Ce, e[13] = V, e[14] = j) : j = e[14];
2237
+ const Ae = ce ? "visible" : "hidden";
2238
+ let _e;
2239
+ e[15] !== we || e[16] !== Te || e[17] !== Se || e[18] !== q || e[19] !== ae || e[20] !== O || e[21] !== H || e[22] !== P ? (_e = q ? /* @__PURE__ */ l(Mi, { leadingResponses: O, groups: Se, streaming: P, hideActiveQuestionForms: ae, expandedStickyMessageIds: Te, onToggleStickyMessage: st, onReady: () => $e(H) }, H) : we, e[15] = we, e[16] = Te, e[17] = Se, e[18] = q, e[19] = ae, e[20] = O, e[21] = H, e[22] = P, e[23] = _e) : _e = e[23];
2240
+ let K;
2241
+ e[24] !== Ae || e[25] !== _e ? (K = /* @__PURE__ */ l(vt.Viewport, { visibility: Ae, children: _e }), e[24] = Ae, e[25] = _e, e[26] = K) : K = e[26];
2242
+ let ne;
2243
+ e[27] !== ce ? (ne = ce ? /* @__PURE__ */ l(vt.ScrollToBottom, { "aria-label": "Scroll to latest message" }) : null, e[27] = ce, e[28] = ne) : ne = e[28];
2244
+ let $;
2245
+ e[29] !== j || e[30] !== K || e[31] !== ne ? ($ = /* @__PURE__ */ k(vt.Root, { children: [
2232
2246
  j,
2233
- U
2234
- ] }), e[58] = _, e[59] = N, e[60] = Z, e[61] = j, e[62] = U, e[63] = le) : le = e[63], le;
2247
+ K,
2248
+ ne
2249
+ ] }), e[29] = j, e[30] = K, e[31] = ne, e[32] = $) : $ = e[32];
2250
+ let F;
2251
+ e[33] !== ke ? (F = ke ? /* @__PURE__ */ k(De, { gap: "xs", px: "sm", py: "2xs", children: [
2252
+ /* @__PURE__ */ l(zt, { size: "xs", color: "fg.muted" }),
2253
+ /* @__PURE__ */ l(J, { textStyle: "label/XS/regular", color: "fg.muted", children: "Working..." })
2254
+ ] }) : null, e[33] = ke, e[34] = F) : F = e[34];
2255
+ const W = le ? "0" : "xs";
2256
+ let U;
2257
+ e[35] !== N ? (U = bo(N), e[35] = N, e[36] = U) : U = e[36];
2258
+ let G;
2259
+ e[37] !== b || e[38] !== C || e[39] !== w || e[40] !== xe || e[41] !== d || e[42] !== L || e[43] !== le || e[44] !== oe || e[45] !== h || e[46] !== g || e[47] !== y || e[48] !== A || e[49] !== m || e[50] !== f || e[51] !== P || e[52] !== U ? (G = /* @__PURE__ */ l(po, { placeholder: d, defaultState: U, streaming: P, onSubmit: f, onInterrupt: m, onAttachFiles: h, onAttachText: g, onChange: y, actions: b, attachedResources: C, onClearAttachments: A, attachmentList: w, isDisabled: oe, attachedToTop: le, questionPrompt: L, autoFocus: xe }), e[37] = b, e[38] = C, e[39] = w, e[40] = xe, e[41] = d, e[42] = L, e[43] = le, e[44] = oe, e[45] = h, e[46] = g, e[47] = y, e[48] = A, e[49] = m, e[50] = f, e[51] = P, e[52] = U, e[53] = G) : G = e[53];
2260
+ let X;
2261
+ e[54] !== W || e[55] !== G || e[56] !== v ? (X = /* @__PURE__ */ k(Z, { px: "xs", gap: W, children: [
2262
+ v,
2263
+ G
2264
+ ] }), e[54] = W, e[55] = G, e[56] = v, e[57] = X) : X = e[57];
2265
+ let se;
2266
+ e[58] !== x ? (se = /* @__PURE__ */ l(Ee, { p: "2xs", justifyContent: "flex-end", children: x }), e[58] = x, e[59] = se) : se = e[59];
2267
+ let de;
2268
+ return e[60] !== I || e[61] !== $ || e[62] !== F || e[63] !== X || e[64] !== se ? (de = /* @__PURE__ */ k(Ee, { position: "relative", direction: "column", w: "full", h: "full", overflow: "hidden", children: [
2269
+ $,
2270
+ I,
2271
+ F,
2272
+ X,
2273
+ se
2274
+ ] }), e[60] = I, e[61] = $, e[62] = F, e[63] = X, e[64] = se, e[65] = de) : de = e[65], de;
2235
2275
  };
2236
- function Ci(t, e) {
2276
+ function Pi(t, e) {
2237
2277
  return t + (e.role === "user" ? 1 : 0);
2238
2278
  }
2239
- function Ai() {
2279
+ function vi() {
2240
2280
  return /* @__PURE__ */ new Set();
2241
2281
  }
2242
- const sn = (t) => /* @__PURE__ */ a(Y, { gap: "xs", w: "full", children: t.map((e, n) => /* @__PURE__ */ a(Gn, { height: "3", width: e, borderRadius: "xs" }, `${e}-${n}`)) }), fl = () => {
2282
+ const on = (t) => /* @__PURE__ */ l(Z, { gap: "xs", w: "full", children: t.map((e, n) => /* @__PURE__ */ l(Xn, { height: "3", width: e, borderRadius: "xs" }, `${e}-${n}`)) }), Gi = () => {
2243
2283
  const t = T(2);
2244
2284
  let e;
2245
- t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ a(_e.Root, { from: "user", children: /* @__PURE__ */ a(_e.Content, { from: "user", children: sn(["72%", "46%"]) }) }), t[0] = e) : e = t[0];
2285
+ t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ l(ve.Root, { from: "user", children: /* @__PURE__ */ l(ve.Content, { from: "user", children: on(["72%", "46%"]) }) }), t[0] = e) : e = t[0];
2246
2286
  let n;
2247
- return t[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ k(Y, { minH: "full", py: "xs", gap: "0", children: [
2287
+ return t[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ k(Z, { minH: "full", py: "xs", gap: "0", children: [
2248
2288
  e,
2249
- /* @__PURE__ */ a(_e.Root, { from: "assistant", children: /* @__PURE__ */ a(_e.Content, { from: "assistant", children: sn(["76%", "62%", "40%"]) }) })
2289
+ /* @__PURE__ */ l(ve.Root, { from: "assistant", children: /* @__PURE__ */ l(ve.Content, { from: "assistant", children: on(["76%", "62%", "40%"]) }) })
2250
2290
  ] }), t[1] = n) : n = t[1], n;
2251
- }, pl = (t) => {
2291
+ }, Xi = (t) => {
2252
2292
  const e = T(14), {
2253
2293
  changesLabel: n,
2254
- additions: s,
2255
- deletions: o,
2294
+ additions: o,
2295
+ deletions: s,
2256
2296
  action: r,
2257
2297
  status: i,
2258
- statusLabel: l
2259
- } = t, c = i === void 0 ? "ready" : i, u = s > 0 || o > 0, d = c === "error" ? "border.error" : "border.muted", f = c === "error" ? "bg.error" : "bg.subtle";
2260
- let m;
2261
- e[0] !== s || e[1] !== n || e[2] !== o || e[3] !== u || e[4] !== c || e[5] !== l ? (m = c === "loading" ? /* @__PURE__ */ k(Me, { gap: "xs", minW: "0", children: [
2262
- /* @__PURE__ */ a(zt, { size: "xs", color: "fg.muted" }),
2263
- /* @__PURE__ */ a(X, { textStyle: "label/S/regular", color: "fg.muted", truncate: !0, children: l ?? "Setting up workspace..." })
2264
- ] }) : c === "error" ? /* @__PURE__ */ k(Me, { gap: "xs", minW: "0", children: [
2265
- /* @__PURE__ */ a(cn, { size: 14, color: "var(--chakra-colors-fg-error)" }),
2266
- /* @__PURE__ */ a(X, { textStyle: "label/S/regular", color: "fg.error", truncate: !0, children: l ?? "Workspace setup failed" })
2267
- ] }) : u ? /* @__PURE__ */ a(pn, { label: n, additions: s, deletions: o, variant: "ghost", size: "small", _hover: {
2298
+ statusLabel: a
2299
+ } = t, c = i === void 0 ? "ready" : i, u = o > 0 || s > 0, d = c === "error" ? "border.error" : "border.subtle", p = c === "error" ? "bg.error" : "bg.subtle";
2300
+ let f;
2301
+ e[0] !== o || e[1] !== n || e[2] !== s || e[3] !== u || e[4] !== c || e[5] !== a ? (f = c === "loading" ? /* @__PURE__ */ k(De, { gap: "xs", minW: "0", children: [
2302
+ /* @__PURE__ */ l(zt, { size: "xs", color: "fg.muted" }),
2303
+ /* @__PURE__ */ l(J, { textStyle: "label/S/regular", color: "fg.muted", truncate: !0, children: a ?? "Setting up workspace..." })
2304
+ ] }) : c === "error" ? /* @__PURE__ */ k(De, { gap: "xs", minW: "0", children: [
2305
+ /* @__PURE__ */ l(cn, { size: 14, color: "var(--chakra-colors-fg-error)" }),
2306
+ /* @__PURE__ */ l(J, { textStyle: "label/S/regular", color: "fg.error", truncate: !0, children: a ?? "Workspace setup failed" })
2307
+ ] }) : u ? /* @__PURE__ */ l(pn, { label: n, additions: o, deletions: s, variant: "ghost", size: "small", _hover: {
2268
2308
  background: "transparent"
2269
- } }) : /* @__PURE__ */ a(Re, { flex: "1" }), e[0] = s, e[1] = n, e[2] = o, e[3] = u, e[4] = c, e[5] = l, e[6] = m) : m = e[6];
2270
- let p;
2271
- e[7] !== r ? (p = r ? /* @__PURE__ */ a(Re, { flexShrink: 0, ml: "auto", children: r }) : null, e[7] = r, e[8] = p) : p = e[8];
2309
+ } }) : /* @__PURE__ */ l(Ee, { flex: "1" }), e[0] = o, e[1] = n, e[2] = s, e[3] = u, e[4] = c, e[5] = a, e[6] = f) : f = e[6];
2310
+ let m;
2311
+ e[7] !== r ? (m = r ? /* @__PURE__ */ l(Ee, { flexShrink: 0, ml: "auto", children: r }) : null, e[7] = r, e[8] = m) : m = e[8];
2272
2312
  let h;
2273
- return e[9] !== d || e[10] !== f || e[11] !== m || e[12] !== p ? (h = /* @__PURE__ */ k(Re, { align: "center", justify: "space-between", gap: "sm", minW: "0", px: "sm", py: "xs", borderWidth: "1px", borderColor: d, borderRadius: "xs", borderBottomRadius: "0", bg: f, children: [
2274
- m,
2275
- p
2276
- ] }), e[9] = d, e[10] = f, e[11] = m, e[12] = p, e[13] = h) : h = e[13], h;
2313
+ return e[9] !== d || e[10] !== p || e[11] !== f || e[12] !== m ? (h = /* @__PURE__ */ k(Ee, { align: "center", justify: "space-between", gap: "sm", minW: "0", px: "sm", py: "xs", borderWidth: "1px", borderColor: d, borderRadius: "xs", borderBottomRadius: "0", bg: p, children: [
2314
+ f,
2315
+ m
2316
+ ] }), e[9] = d, e[10] = p, e[11] = f, e[12] = m, e[13] = h) : h = e[13], h;
2277
2317
  };
2278
2318
  export {
2279
- cl as ApprovalPrompt,
2280
- ul as AttachmentList,
2281
- Qo as AutoScroll,
2282
- us as ChatInput,
2283
- _e as ChatMessage,
2284
- dl as ChatPanel,
2319
+ ji as ApprovalPrompt,
2320
+ Ki as AttachmentList,
2321
+ Ns as AutoScroll,
2322
+ po as ChatInput,
2323
+ ve as ChatMessage,
2324
+ Ui as ChatPanel,
2285
2325
  vt as ChatPrimitives,
2286
- fl as ChatSkeleton,
2287
- pl as ChatWorkspaceHub,
2288
- as as SendButton,
2289
- ms as createSerializedPromptState
2326
+ Gi as ChatSkeleton,
2327
+ Xi as ChatWorkspaceHub,
2328
+ uo as SendButton,
2329
+ bo as createSerializedPromptState
2290
2330
  };
2291
2331
  //# sourceMappingURL=chat-ui.js.map