@adecore/agents-react 0.38.0 → 0.40.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 (351) hide show
  1. package/dist/agents/AgentModelLabel.d.ts +10 -0
  2. package/dist/agents/AgentModelLabel.js +98 -0
  3. package/dist/agents/model-name.js +2 -1
  4. package/dist/agents/provider-paths.d.ts +2 -1
  5. package/dist/agents/provider-paths.js +7 -3
  6. package/dist/chat/account-choice.js +57 -28
  7. package/dist/chat/bookmarks.js +2 -1
  8. package/dist/chat/drafts.d.ts +0 -1
  9. package/dist/chat/drafts.js +9 -28
  10. package/dist/chat/logic/picker-entries.js +2 -8
  11. package/dist/chat/logic/resume-compaction.js +2 -5
  12. package/dist/chat/logic/timeline-copy.js +2 -8
  13. package/dist/chat/logic/timeline.js +9 -10
  14. package/dist/chat/logic/workflow.js +2 -4
  15. package/dist/chat/subagent-conversation.js +2 -1
  16. package/dist/chat/ui/Composer.js +385 -360
  17. package/dist/chat/ui/GoalDock.js +2 -1
  18. package/dist/chat/ui/LimitState.js +4 -6
  19. package/dist/chat/ui/Pickers.d.ts +2 -1
  20. package/dist/chat/ui/Pickers.js +126 -123
  21. package/dist/chat/ui/PromptEditor.d.ts +19 -0
  22. package/dist/chat/ui/PromptEditor.js +115 -0
  23. package/dist/chat/ui/Timeline.d.ts +2 -1
  24. package/dist/chat/ui/Timeline.js +13 -1
  25. package/dist/chat/ui/composer/ComposerControls.d.ts +3 -0
  26. package/dist/chat/ui/composer/ComposerControls.js +235 -38
  27. package/dist/chat/ui/composer/key-handler.d.ts +1 -1
  28. package/dist/chat/ui/composer/key-handler.js +3 -11
  29. package/dist/chat/ui/composer/prompt-picks.d.ts +4 -0
  30. package/dist/chat/ui/composer/prompt-picks.js +14 -0
  31. package/dist/chat/ui/composer/use-composer-menus.d.ts +4 -49
  32. package/dist/chat/ui/composer/use-composer-menus.js +65 -519
  33. package/dist/chat/ui/composer/use-continuable-turn.js +0 -1
  34. package/dist/chat/ui/composer/use-notice.js +2 -1
  35. package/dist/chat/ui/composer/use-prompt-history.js +1 -1
  36. package/dist/chat/ui/composer/use-prompt-menus.d.ts +73 -0
  37. package/dist/chat/ui/composer/use-prompt-menus.js +499 -0
  38. package/dist/chat/ui/composer/use-take-back.js +2 -2
  39. package/dist/chat/ui/diff/ApprovalReview.js +1 -1
  40. package/dist/chat/ui/highlighter.d.ts +0 -6
  41. package/dist/chat/ui/highlighter.js +0 -12
  42. package/dist/chat/ui/icons.d.ts +0 -1
  43. package/dist/chat/ui/icons.js +0 -3
  44. package/dist/chat/ui/index.d.ts +3 -0
  45. package/dist/chat/ui/index.js +2 -0
  46. package/dist/chat/ui/rows/MessageRows.js +2 -5
  47. package/dist/chat/ui/rows/row-rhythm.js +2 -5
  48. package/dist/chat/ui/theme-watch.js +3 -7
  49. package/dist/host-hooks.d.ts +2 -1
  50. package/dist/host-hooks.js +6 -0
  51. package/dist/host.d.ts +17 -1
  52. package/dist/index.d.ts +1 -1
  53. package/dist/locales/en/agent-chat.d.ts +1 -0
  54. package/dist/locales/en/agent-chat.js +1 -0
  55. package/dist/locales/nl/agent-chat.d.ts +1 -0
  56. package/dist/locales/nl/agent-chat.js +1 -0
  57. package/dist/prompts/logic/usePromptSession.js +2 -1
  58. package/dist/providers/AddAccountForm.js +2 -1
  59. package/dist/providers/CliDetail.js +104 -130
  60. package/dist/providers/account-actions.js +6 -9
  61. package/dist/providers/index.d.ts +1 -0
  62. package/dist/providers/index.js +1 -0
  63. package/dist/state/chats.d.ts +1 -0
  64. package/dist/state/chats.js +6 -11
  65. package/dist/state/provider-accounts.d.ts +1 -1
  66. package/dist/state/provider-accounts.js +2 -8
  67. package/dist/theme.css +3 -0
  68. package/dist/transport.d.ts +2 -0
  69. package/dist/transport.js +14 -0
  70. package/dist/usage/ChartLogo.d.ts +5 -0
  71. package/dist/usage/ChartLogo.js +48 -0
  72. package/dist/usage/LimitsList.js +6 -16
  73. package/dist/usage/UsageBreakdown.js +17 -40
  74. package/dist/usage/UsageLimits.js +183 -211
  75. package/dist/usage/UsagePage.js +3 -17
  76. package/dist/usage/UsageSummary.js +4 -9
  77. package/dist/usage/limits.js +16 -31
  78. package/dist/usage/summary.d.ts +1 -1
  79. package/dist/usage/summary.js +3 -5
  80. package/package.json +26 -26
  81. package/src/agents/AccountDot.tsx +1 -0
  82. package/src/agents/AgentIcon.tsx +2 -0
  83. package/src/agents/AgentModelLabel.tsx +38 -0
  84. package/src/agents/ModelOptionControl.tsx +8 -0
  85. package/src/agents/account-limits.ts +3 -0
  86. package/src/agents/accounts.ts +12 -0
  87. package/src/agents/model-name.ts +13 -1
  88. package/src/agents/model-options.ts +2 -0
  89. package/src/agents/model-requirement.ts +4 -0
  90. package/src/agents/option-words.ts +2 -0
  91. package/src/agents/provider-paths.ts +8 -3
  92. package/src/agents/status-look.ts +1 -0
  93. package/src/chat/account-choice.ts +25 -19
  94. package/src/chat/actions.ts +5 -0
  95. package/src/chat/attachments.ts +8 -0
  96. package/src/chat/bookmarks.ts +13 -1
  97. package/src/chat/chat-client.ts +63 -0
  98. package/src/chat/chat-references.ts +3 -0
  99. package/src/chat/composer-effort.ts +5 -0
  100. package/src/chat/composer-send.ts +4 -0
  101. package/src/chat/drafts.ts +21 -17
  102. package/src/chat/forks.ts +4 -0
  103. package/src/chat/guards.ts +2 -0
  104. package/src/chat/index.ts +7 -0
  105. package/src/chat/logic/ansi.ts +47 -0
  106. package/src/chat/logic/bookmarks.ts +7 -0
  107. package/src/chat/logic/command-looks.ts +29 -0
  108. package/src/chat/logic/context-usage.ts +3 -0
  109. package/src/chat/logic/continue-after-stop.ts +5 -0
  110. package/src/chat/logic/effort.ts +4 -0
  111. package/src/chat/logic/embedded-code.ts +63 -0
  112. package/src/chat/logic/fork.ts +22 -0
  113. package/src/chat/logic/generated-image.ts +7 -0
  114. package/src/chat/logic/goal.ts +7 -0
  115. package/src/chat/logic/handback.ts +2 -0
  116. package/src/chat/logic/limit.ts +8 -0
  117. package/src/chat/logic/picker-entries.ts +16 -4
  118. package/src/chat/logic/resume-compaction.ts +22 -5
  119. package/src/chat/logic/scrubber.ts +38 -5
  120. package/src/chat/logic/thought.ts +5 -0
  121. package/src/chat/logic/thread-cards.ts +6 -0
  122. package/src/chat/logic/timeline-copy.ts +4 -9
  123. package/src/chat/logic/timeline-target.ts +15 -0
  124. package/src/chat/logic/timeline.ts +113 -10
  125. package/src/chat/logic/tools.ts +30 -0
  126. package/src/chat/logic/visual-height.ts +5 -0
  127. package/src/chat/logic/visual-viewport.ts +1 -0
  128. package/src/chat/logic/welcome.ts +3 -0
  129. package/src/chat/logic/workflow.ts +26 -7
  130. package/src/chat/mentions.ts +56 -0
  131. package/src/chat/pending-prompts.ts +16 -0
  132. package/src/chat/persisted-json.ts +15 -0
  133. package/src/chat/preferences.ts +16 -0
  134. package/src/chat/prompt-hold.ts +2 -0
  135. package/src/chat/quote.ts +7 -0
  136. package/src/chat/reading-width.ts +1 -0
  137. package/src/chat/recent-messages.ts +5 -0
  138. package/src/chat/resume-compaction-dismissals.ts +1 -0
  139. package/src/chat/stash.ts +12 -0
  140. package/src/chat/subagent-conversation.ts +24 -4
  141. package/src/chat/subagent-list.ts +14 -0
  142. package/src/chat/subagent-support.ts +1 -0
  143. package/src/chat/subagent-view.ts +9 -0
  144. package/src/chat/thumbnails.ts +14 -0
  145. package/src/chat/timeline-flash.ts +2 -0
  146. package/src/chat/timeline-scroll.ts +23 -0
  147. package/src/chat/ui/AccountPill.tsx +4 -0
  148. package/src/chat/ui/AnsiOutput.tsx +1 -0
  149. package/src/chat/ui/BookmarkMarker.tsx +5 -0
  150. package/src/chat/ui/BookmarkSubmenu.tsx +1 -0
  151. package/src/chat/ui/ChatActivity.tsx +13 -0
  152. package/src/chat/ui/CodeBlock.tsx +8 -0
  153. package/src/chat/ui/Composer.tsx +27 -3
  154. package/src/chat/ui/ComposerInput.tsx +22 -0
  155. package/src/chat/ui/DiffPool.tsx +3 -0
  156. package/src/chat/ui/EditDiff.tsx +5 -0
  157. package/src/chat/ui/GoalDock.tsx +13 -1
  158. package/src/chat/ui/ImageView.tsx +11 -0
  159. package/src/chat/ui/LimitState.tsx +23 -6
  160. package/src/chat/ui/Markdown.tsx +41 -0
  161. package/src/chat/ui/MermaidBlock.tsx +16 -0
  162. package/src/chat/ui/MessageActions.tsx +8 -0
  163. package/src/chat/ui/ModelMarks.tsx +1 -0
  164. package/src/chat/ui/Pickers.tsx +30 -1
  165. package/src/chat/ui/PromptComposer.tsx +2 -0
  166. package/src/chat/ui/PromptEditor.tsx +136 -0
  167. package/src/chat/ui/QuoteButton.tsx +12 -0
  168. package/src/chat/ui/ReferenceChip.tsx +3 -0
  169. package/src/chat/ui/ResumeCompactionDock.tsx +1 -0
  170. package/src/chat/ui/RowTime.tsx +1 -0
  171. package/src/chat/ui/RunSettings.tsx +38 -0
  172. package/src/chat/ui/Scrubber.tsx +14 -0
  173. package/src/chat/ui/SessionLine.tsx +1 -0
  174. package/src/chat/ui/ShellCommand.tsx +32 -0
  175. package/src/chat/ui/SubagentControls.tsx +7 -0
  176. package/src/chat/ui/SubagentInfo.tsx +1 -0
  177. package/src/chat/ui/SubagentStopButton.tsx +6 -0
  178. package/src/chat/ui/SubagentTimeline.tsx +10 -0
  179. package/src/chat/ui/Timeline.tsx +141 -1
  180. package/src/chat/ui/TimelineMenu.tsx +5 -0
  181. package/src/chat/ui/UnifiedDiff.tsx +6 -0
  182. package/src/chat/ui/UploadThumb.tsx +2 -0
  183. package/src/chat/ui/VisualDialogs.tsx +3 -0
  184. package/src/chat/ui/VisualFrame.tsx +15 -0
  185. package/src/chat/ui/Welcome.tsx +1 -0
  186. package/src/chat/ui/chip-clipboard.ts +20 -0
  187. package/src/chat/ui/code-lines.ts +14 -0
  188. package/src/chat/ui/code-theme.ts +1 -0
  189. package/src/chat/ui/composer/ComposerControls.tsx +70 -15
  190. package/src/chat/ui/composer/ComposerMenu.tsx +12 -0
  191. package/src/chat/ui/composer/DraftParts.tsx +2 -0
  192. package/src/chat/ui/composer/QueuedMessages.tsx +4 -0
  193. package/src/chat/ui/composer/chip-paste.ts +16 -0
  194. package/src/chat/ui/composer/chips.ts +6 -0
  195. package/src/chat/ui/composer/editor.ts +9 -0
  196. package/src/chat/ui/composer/insert.ts +2 -0
  197. package/src/chat/ui/composer/key-handler.ts +42 -9
  198. package/src/chat/ui/composer/keys.ts +23 -0
  199. package/src/chat/ui/composer/placeholder.ts +6 -0
  200. package/src/chat/ui/composer/prompt-picks.ts +18 -0
  201. package/src/chat/ui/composer/surface.ts +5 -0
  202. package/src/chat/ui/composer/use-chat-controls.ts +13 -0
  203. package/src/chat/ui/composer/use-compaction-offer.ts +3 -0
  204. package/src/chat/ui/composer/use-composer-menus.ts +20 -275
  205. package/src/chat/ui/composer/use-composer-submit.ts +27 -0
  206. package/src/chat/ui/composer/use-continuable-turn.ts +3 -5
  207. package/src/chat/ui/composer/use-draft-files.ts +24 -0
  208. package/src/chat/ui/composer/use-effort-stepper.ts +8 -0
  209. package/src/chat/ui/composer/use-notice.ts +4 -1
  210. package/src/chat/ui/composer/use-pending-requests.ts +3 -0
  211. package/src/chat/ui/composer/use-prompt-history.ts +20 -11
  212. package/src/chat/ui/composer/use-prompt-hold.ts +3 -0
  213. package/src/chat/ui/composer/use-prompt-menus.ts +361 -0
  214. package/src/chat/ui/composer/use-take-back.ts +20 -2
  215. package/src/chat/ui/diff/ApprovalReview.tsx +18 -15
  216. package/src/chat/ui/diff/DiffFallbackBoundary.tsx +1 -0
  217. package/src/chat/ui/diff/DiffOmitted.tsx +1 -0
  218. package/src/chat/ui/diff/DiffStack.tsx +2 -0
  219. package/src/chat/ui/diff/DiffUnavailable.tsx +1 -0
  220. package/src/chat/ui/diff/EditorEditDiff.tsx +13 -0
  221. package/src/chat/ui/diff/EditorPatchDiff.tsx +4 -0
  222. package/src/chat/ui/diff/LegacyDiffPool.tsx +2 -0
  223. package/src/chat/ui/diff/LegacyEditDiff.tsx +2 -0
  224. package/src/chat/ui/diff/LegacyUnifiedDiff.tsx +8 -0
  225. package/src/chat/ui/diff/RawDiff.tsx +1 -0
  226. package/src/chat/ui/diff/ReviewDiff.tsx +1 -0
  227. package/src/chat/ui/diff/diff-source-budget.ts +8 -0
  228. package/src/chat/ui/diff/editor-edit-model.ts +4 -0
  229. package/src/chat/ui/diff/review-plan.ts +9 -0
  230. package/src/chat/ui/diff/review-settle.ts +1 -0
  231. package/src/chat/ui/diff/syntax-runtime.ts +52 -0
  232. package/src/chat/ui/diff/use-review-stack.ts +9 -0
  233. package/src/chat/ui/diff-syntax.ts +12 -0
  234. package/src/chat/ui/diff-theme.ts +2 -0
  235. package/src/chat/ui/file-links.ts +2 -0
  236. package/src/chat/ui/find-reveal.ts +1 -0
  237. package/src/chat/ui/full-diff.ts +1 -0
  238. package/src/chat/ui/highlighter.ts +29 -15
  239. package/src/chat/ui/icons.tsx +2 -4
  240. package/src/chat/ui/index.ts +7 -0
  241. package/src/chat/ui/intelligent-ui/UiBlockFrame.tsx +25 -0
  242. package/src/chat/ui/intelligent-ui/UiFallbackPart.tsx +1 -0
  243. package/src/chat/ui/intelligent-ui/UiReply.tsx +63 -0
  244. package/src/chat/ui/intelligent-ui/block-local.ts +5 -0
  245. package/src/chat/ui/intelligent-ui/chart-data.ts +15 -0
  246. package/src/chat/ui/intelligent-ui/node-text.ts +17 -0
  247. package/src/chat/ui/intelligent-ui/renderers/binding.ts +1 -0
  248. package/src/chat/ui/intelligent-ui/renderers/chart.tsx +31 -0
  249. package/src/chat/ui/intelligent-ui/renderers/choices.tsx +4 -0
  250. package/src/chat/ui/intelligent-ui/renderers/content.tsx +18 -0
  251. package/src/chat/ui/intelligent-ui/renderers/data.tsx +11 -0
  252. package/src/chat/ui/intelligent-ui/renderers/inputs.tsx +13 -0
  253. package/src/chat/ui/intelligent-ui/renderers/links.tsx +9 -0
  254. package/src/chat/ui/intelligent-ui/renderers/map-slots.ts +15 -0
  255. package/src/chat/ui/intelligent-ui/renderers/map-style.ts +15 -0
  256. package/src/chat/ui/intelligent-ui/renderers/map-view.tsx +48 -0
  257. package/src/chat/ui/intelligent-ui/renderers/map.tsx +20 -0
  258. package/src/chat/ui/intelligent-ui/renderers/place-point.ts +3 -0
  259. package/src/chat/ui/intelligent-ui/renderers/structure.tsx +3 -0
  260. package/src/chat/ui/intelligent-ui/renderers/text.tsx +8 -0
  261. package/src/chat/ui/intelligent-ui/reply-parts.ts +5 -0
  262. package/src/chat/ui/intelligent-ui/table-data.ts +17 -0
  263. package/src/chat/ui/intelligent-ui/use-in-view.ts +4 -0
  264. package/src/chat/ui/intelligent-ui/use-later.ts +4 -0
  265. package/src/chat/ui/intelligent-ui/use-truncated.ts +5 -0
  266. package/src/chat/ui/intelligent-ui/use-ui-links.ts +29 -0
  267. package/src/chat/ui/intelligent-ui/use-ui-queries.ts +60 -0
  268. package/src/chat/ui/markdown-blocks.ts +64 -0
  269. package/src/chat/ui/mermaid.ts +4 -0
  270. package/src/chat/ui/quote-selection.ts +10 -0
  271. package/src/chat/ui/rehype-chips.ts +5 -0
  272. package/src/chat/ui/rehype-fade.ts +2 -0
  273. package/src/chat/ui/remark-html-as-text.ts +5 -0
  274. package/src/chat/ui/reveal.ts +18 -0
  275. package/src/chat/ui/rows/ForksRow.tsx +5 -0
  276. package/src/chat/ui/rows/GeneratedImageRow.tsx +10 -0
  277. package/src/chat/ui/rows/MessageRows.tsx +29 -5
  278. package/src/chat/ui/rows/RowContainer.tsx +1 -0
  279. package/src/chat/ui/rows/Rows.tsx +2 -0
  280. package/src/chat/ui/rows/SubagentRow.tsx +13 -0
  281. package/src/chat/ui/rows/TaskRow.tsx +7 -0
  282. package/src/chat/ui/rows/VisualRow.tsx +4 -0
  283. package/src/chat/ui/rows/WorkRows.tsx +46 -0
  284. package/src/chat/ui/rows/WorkflowRow.tsx +10 -0
  285. package/src/chat/ui/rows/row-rhythm.ts +7 -5
  286. package/src/chat/ui/theme-watch.ts +8 -7
  287. package/src/chat/ui/thread-references.ts +7 -0
  288. package/src/chat/ui/use-diff-source-tokens.ts +8 -0
  289. package/src/chat/ui/useToggleSet.ts +3 -0
  290. package/src/chat/ui/visual-theme.ts +30 -0
  291. package/src/chat/visual-bridge.ts +23 -0
  292. package/src/chat/visual-viewport.ts +12 -0
  293. package/src/host-hooks.ts +15 -5
  294. package/src/host.ts +29 -1
  295. package/src/index.ts +5 -0
  296. package/src/lazy.tsx +9 -0
  297. package/src/locales/en/agent-chat.ts +1 -0
  298. package/src/locales/nl/agent-chat.ts +1 -0
  299. package/src/mounted-registry.ts +4 -0
  300. package/src/port-transport.ts +32 -0
  301. package/src/prompts/index.ts +2 -0
  302. package/src/prompts/logic/focus.ts +5 -0
  303. package/src/prompts/logic/keys.ts +12 -0
  304. package/src/prompts/logic/prompts.ts +8 -0
  305. package/src/prompts/logic/subjects.ts +8 -0
  306. package/src/prompts/logic/useFocusAfterAnswer.ts +2 -0
  307. package/src/prompts/logic/usePromptSession.ts +13 -1
  308. package/src/prompts/ui/ApprovalBody.tsx +2 -0
  309. package/src/prompts/ui/PromptActions.tsx +2 -0
  310. package/src/prompts/ui/PromptCard.tsx +6 -0
  311. package/src/prompts/ui/PromptView.tsx +6 -0
  312. package/src/prompts/ui/QuestionBody.tsx +11 -0
  313. package/src/providers/AccountColors.tsx +1 -0
  314. package/src/providers/AccountDetail.tsx +7 -0
  315. package/src/providers/AccountVariables.tsx +2 -0
  316. package/src/providers/AddAccountForm.tsx +5 -1
  317. package/src/providers/CliDetail.tsx +6 -5
  318. package/src/providers/InstallPage.tsx +11 -0
  319. package/src/providers/ProviderList.tsx +3 -0
  320. package/src/providers/ProvidersPane.tsx +18 -0
  321. package/src/providers/account-actions.ts +10 -8
  322. package/src/providers/index.ts +1 -0
  323. package/src/providers/install-steps.ts +3 -0
  324. package/src/providers/pane-target.ts +5 -0
  325. package/src/providers/provider-abilities.ts +1 -0
  326. package/src/providers/provider-groups.ts +6 -0
  327. package/src/providers/variables.ts +12 -0
  328. package/src/scope.ts +2 -0
  329. package/src/state/chats.ts +61 -14
  330. package/src/state/index.ts +2 -0
  331. package/src/state/provider-accounts.ts +7 -9
  332. package/src/state/providers.ts +1 -0
  333. package/src/state/usage.ts +6 -0
  334. package/src/storage.ts +18 -0
  335. package/src/testing/prompts.ts +5 -0
  336. package/src/theme.css +3 -0
  337. package/src/transport.ts +18 -0
  338. package/src/usage/ChartLogo.tsx +12 -0
  339. package/src/usage/LimitsList.tsx +7 -8
  340. package/src/usage/UsageBreakdown.tsx +11 -4
  341. package/src/usage/UsageChart.tsx +5 -0
  342. package/src/usage/UsageLimits.tsx +10 -7
  343. package/src/usage/UsageLimitsCard.tsx +2 -0
  344. package/src/usage/UsagePage.tsx +16 -19
  345. package/src/usage/UsageSummary.tsx +4 -5
  346. package/src/usage/UsageTiles.tsx +2 -0
  347. package/src/usage/format.ts +7 -0
  348. package/src/usage/limit-groups.ts +14 -0
  349. package/src/usage/limits.ts +11 -13
  350. package/src/usage/money.ts +1 -0
  351. package/src/usage/summary.ts +15 -7
@@ -43,7 +43,7 @@ import { usePromptHistory } from './composer/use-prompt-history.js';
43
43
  import { usePromptHold } from './composer/use-prompt-hold.js';
44
44
  import { surfacePartOf } from './composer/surface.js';
45
45
  import { useTakeBack } from './composer/use-take-back.js';
46
- import { useHostExtraPrompts, useHostSendDelivery } from '../../host-hooks.js';
46
+ import { useHostComposerSendActions, useHostExtraPrompts, useHostSendDelivery } from '../../host-hooks.js';
47
47
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
48
48
  function sendLabelKey(busy, steerable, delivery) {
49
49
  if (!busy) {
@@ -55,7 +55,7 @@ function sendLabelKey(busy, steerable, delivery) {
55
55
  return delivery === 'steer' ? 'composer.steerButton' : 'composer.queueWithSteerButton';
56
56
  }
57
57
  export function Composer(t0) {
58
- const $ = _c(230);
58
+ const $ = _c(239);
59
59
  const {
60
60
  chatId,
61
61
  info,
@@ -205,6 +205,7 @@ export function Composer(t0) {
205
205
  const continuable = useContinuableTurn(chatId, info);
206
206
  const [sentFor, setSentFor] = useState(null);
207
207
  const extraPrompts = useHostExtraPrompts(scope.id, chatId);
208
+ const sendActions = useHostComposerSendActions(scope.id, chatId);
208
209
  let t11;
209
210
  if ($[35] !== continuable || $[36] !== onSend) {
210
211
  t11 = (text, extras) => {
@@ -367,16 +368,8 @@ export function Composer(t0) {
367
368
  }
368
369
  useEffect(t21, t22);
369
370
  let t23;
370
- if ($[66] !== box) {
371
- t23 = next => box.setText(next);
372
- $[66] = box;
373
- $[67] = t23;
374
- } else {
375
- t23 = $[67];
376
- }
377
- let t24;
378
- if ($[68] !== chatId || $[69] !== draft.text || $[70] !== files.noteKey || $[71] !== history || $[72] !== host || $[73] !== menus || $[74] !== sendKey || $[75] !== submit || $[76] !== t23 || $[77] !== toggleStash) {
379
- t24 = composerKeyHandler({
371
+ if ($[66] !== chatId || $[67] !== draft.text || $[68] !== files.noteKey || $[69] !== history || $[70] !== host || $[71] !== menus || $[72] !== sendKey || $[73] !== submit || $[74] !== toggleStash) {
372
+ t23 = composerKeyHandler({
380
373
  chatId,
381
374
  host,
382
375
  sendKey,
@@ -385,44 +378,42 @@ export function Composer(t0) {
385
378
  history,
386
379
  noteKey: files.noteKey,
387
380
  toggleStash,
388
- setText: t23,
389
381
  submit
390
382
  });
391
- $[68] = chatId;
392
- $[69] = draft.text;
393
- $[70] = files.noteKey;
394
- $[71] = history;
395
- $[72] = host;
396
- $[73] = menus;
397
- $[74] = sendKey;
398
- $[75] = submit;
399
- $[76] = t23;
400
- $[77] = toggleStash;
401
- $[78] = t24;
402
- } else {
403
- t24 = $[78];
404
- }
405
- const onKeyDown = t24;
383
+ $[66] = chatId;
384
+ $[67] = draft.text;
385
+ $[68] = files.noteKey;
386
+ $[69] = history;
387
+ $[70] = host;
388
+ $[71] = menus;
389
+ $[72] = sendKey;
390
+ $[73] = submit;
391
+ $[74] = toggleStash;
392
+ $[75] = t23;
393
+ } else {
394
+ t23 = $[75];
395
+ }
396
+ const onKeyDown = t23;
406
397
  const pointSurface = _temp4;
407
- let t25;
408
- if ($[79] !== writable) {
409
- t25 = event_0 => {
398
+ let t24;
399
+ if ($[76] !== writable) {
400
+ t24 = event_0 => {
410
401
  if (!writable || event_0.button !== 0 || event_0.defaultPrevented || surfacePartOf(event_0.target, event_0.currentTarget) !== "surface") {
411
402
  return;
412
403
  }
413
404
  event_0.preventDefault();
414
405
  inputRef.current?.setCaret(Infinity);
415
406
  };
416
- $[79] = writable;
417
- $[80] = t25;
407
+ $[76] = writable;
408
+ $[77] = t24;
418
409
  } else {
419
- t25 = $[80];
410
+ t24 = $[77];
420
411
  }
421
- const pressSurface = t25;
422
- const t26 = "chat-composer-content pointer-events-none relative z-10 w-full";
423
- let t27;
424
- if ($[81] !== atEnd || $[82] !== chatId || $[83] !== readOnly || $[84] !== t) {
425
- t27 = !atEnd && !readOnly && /*#__PURE__*/_jsx("div", {
412
+ const pressSurface = t24;
413
+ const t25 = "chat-composer-content pointer-events-none relative z-10 w-full";
414
+ let t26;
415
+ if ($[78] !== atEnd || $[79] !== chatId || $[80] !== readOnly || $[81] !== t) {
416
+ t26 = !atEnd && !readOnly && /*#__PURE__*/_jsx("div", {
426
417
  className: "absolute inset-x-0 bottom-full mb-2 flex justify-center",
427
418
  children: /*#__PURE__*/_jsx(Tooltip, {
428
419
  label: t("composer.jumpToEnd"),
@@ -439,477 +430,511 @@ export function Composer(t0) {
439
430
  })
440
431
  })
441
432
  });
442
- $[81] = atEnd;
443
- $[82] = chatId;
444
- $[83] = readOnly;
445
- $[84] = t;
446
- $[85] = t27;
433
+ $[78] = atEnd;
434
+ $[79] = chatId;
435
+ $[80] = readOnly;
436
+ $[81] = t;
437
+ $[82] = t26;
447
438
  } else {
448
- t27 = $[85];
439
+ t26 = $[82];
449
440
  }
450
- let t28;
451
- if ($[86] !== chatId) {
452
- t28 = /*#__PURE__*/_jsx(ChatActivity, {
441
+ let t27;
442
+ if ($[83] !== chatId) {
443
+ t27 = /*#__PURE__*/_jsx(ChatActivity, {
453
444
  chatId: chatId
454
445
  });
455
- $[86] = chatId;
456
- $[87] = t28;
446
+ $[83] = chatId;
447
+ $[84] = t27;
457
448
  } else {
458
- t28 = $[87];
449
+ t27 = $[84];
459
450
  }
460
- const t29 = files.dragging ? "border-accent bg-[color-mix(in_srgb,var(--accent-soft)_60%,var(--surface-raised))]" : "border-border bg-[color-mix(in_srgb,var(--surface-raised)_92%,transparent)]";
461
- let t30;
462
- if ($[88] !== t29) {
463
- t30 = clsx("@container/composer pointer-events-auto flex flex-col overflow-hidden rounded-2xl border shadow-float backdrop-blur-[14px] focus-ring-within", t29);
464
- $[88] = t29;
465
- $[89] = t30;
451
+ const t28 = files.dragging ? "border-accent bg-[color-mix(in_srgb,var(--accent-soft)_60%,var(--surface-raised))]" : "border-border bg-[color-mix(in_srgb,var(--surface-raised)_92%,transparent)]";
452
+ let t29;
453
+ if ($[85] !== t28) {
454
+ t29 = clsx("@container/composer pointer-events-auto flex flex-col overflow-hidden rounded-2xl border shadow-float backdrop-blur-[14px] focus-ring-within", t28);
455
+ $[85] = t28;
456
+ $[86] = t29;
466
457
  } else {
467
- t30 = $[89];
458
+ t29 = $[86];
468
459
  }
469
- const t31 = files.dropTarget;
460
+ const t30 = files.dropTarget;
470
461
  const T0 = PromptComposer;
471
- const t32 = !empty;
472
- const t33 = capabilities?.denyReason === true;
473
- let t34;
474
- if ($[90] === Symbol.for("react.memo_cache_sentinel")) {
475
- t34 = () => inputRef.current?.focus();
476
- $[90] = t34;
462
+ const t31 = !empty;
463
+ const t32 = capabilities?.denyReason === true;
464
+ let t33;
465
+ if ($[87] === Symbol.for("react.memo_cache_sentinel")) {
466
+ t33 = () => inputRef.current?.focus();
467
+ $[87] = t33;
468
+ } else {
469
+ t33 = $[87];
470
+ }
471
+ const t34 = writable && "data-[text-cursor]:cursor-text";
472
+ let t35;
473
+ if ($[88] !== t34) {
474
+ t35 = clsx(t34);
475
+ $[88] = t34;
476
+ $[89] = t35;
477
477
  } else {
478
- t34 = $[90];
478
+ t35 = $[89];
479
479
  }
480
- const t35 = writable && "data-[text-cursor]:cursor-text";
481
480
  let t36;
482
- if ($[91] !== t35) {
483
- t36 = clsx(t35);
484
- $[91] = t35;
481
+ if ($[90] !== chatId || $[91] !== info) {
482
+ t36 = /*#__PURE__*/_jsx(LimitDock, {
483
+ chatId: chatId,
484
+ info: info
485
+ });
486
+ $[90] = chatId;
487
+ $[91] = info;
485
488
  $[92] = t36;
486
489
  } else {
487
490
  t36 = $[92];
488
491
  }
489
- let t37;
490
- if ($[93] !== chatId || $[94] !== info) {
491
- t37 = /*#__PURE__*/_jsx(LimitDock, {
492
+ const t37 = capabilities?.goals;
493
+ let t38;
494
+ if ($[93] !== chatId || $[94] !== info || $[95] !== t37) {
495
+ t38 = /*#__PURE__*/_jsx(GoalDock, {
492
496
  chatId: chatId,
493
- info: info
497
+ info: info,
498
+ goals: t37
494
499
  });
495
500
  $[93] = chatId;
496
501
  $[94] = info;
497
502
  $[95] = t37;
503
+ $[96] = t38;
498
504
  } else {
499
- t37 = $[95];
505
+ t38 = $[96];
500
506
  }
501
- const t38 = capabilities?.goals;
502
507
  let t39;
503
- if ($[96] !== chatId || $[97] !== info || $[98] !== t38) {
504
- t39 = /*#__PURE__*/_jsx(GoalDock, {
505
- chatId: chatId,
506
- info: info,
507
- goals: t38
508
- });
509
- $[96] = chatId;
510
- $[97] = info;
511
- $[98] = t38;
512
- $[99] = t39;
513
- } else {
514
- t39 = $[99];
515
- }
516
- let t40;
517
- if ($[100] !== chatId || $[101] !== compactionOffer || $[102] !== controls.compact || $[103] !== scope) {
518
- t40 = compactionOffer && /*#__PURE__*/_jsx(ResumeCompactionDock, {
508
+ if ($[97] !== chatId || $[98] !== compactionOffer || $[99] !== controls.compact || $[100] !== scope) {
509
+ t39 = compactionOffer && /*#__PURE__*/_jsx(ResumeCompactionDock, {
519
510
  tokens: compactionOffer.tokens,
520
511
  reason: compactionOffer.reason,
521
512
  onCompact: controls.compact,
522
513
  onDismiss: () => dismissResumeCompaction(scope, chatId, compactionOffer.turnId)
523
514
  });
524
- $[100] = chatId;
525
- $[101] = compactionOffer;
526
- $[102] = controls.compact;
527
- $[103] = scope;
528
- $[104] = t40;
515
+ $[97] = chatId;
516
+ $[98] = compactionOffer;
517
+ $[99] = controls.compact;
518
+ $[100] = scope;
519
+ $[101] = t39;
529
520
  } else {
530
- t40 = $[104];
521
+ t39 = $[101];
531
522
  }
532
- let t41;
533
- if ($[105] !== menus) {
534
- t41 = /*#__PURE__*/_jsx(ComposerMenu, {
523
+ let t40;
524
+ if ($[102] !== menus) {
525
+ t40 = /*#__PURE__*/_jsx(ComposerMenu, {
535
526
  menus: menus
536
527
  });
537
- $[105] = menus;
538
- $[106] = t41;
528
+ $[102] = menus;
529
+ $[103] = t40;
539
530
  } else {
540
- t41 = $[106];
531
+ t40 = $[103];
541
532
  }
542
- let t42;
543
- if ($[107] !== chatId || $[108] !== info.queuePaused || $[109] !== queue || $[110] !== takeBack || $[111] !== takingBack) {
544
- t42 = queue.length > 0 && /*#__PURE__*/_jsx(QueuedMessages, {
533
+ let t41;
534
+ if ($[104] !== chatId || $[105] !== info.queuePaused || $[106] !== queue || $[107] !== takeBack || $[108] !== takingBack) {
535
+ t41 = queue.length > 0 && /*#__PURE__*/_jsx(QueuedMessages, {
545
536
  chatId: chatId,
546
537
  queue: queue,
547
538
  paused: info.queuePaused === true,
548
539
  takingBack: takingBack !== null,
549
540
  onEdit: message => void takeBack(message)
550
541
  });
551
- $[107] = chatId;
552
- $[108] = info.queuePaused;
553
- $[109] = queue;
554
- $[110] = takeBack;
555
- $[111] = takingBack;
556
- $[112] = t42;
542
+ $[104] = chatId;
543
+ $[105] = info.queuePaused;
544
+ $[106] = queue;
545
+ $[107] = takeBack;
546
+ $[108] = takingBack;
547
+ $[109] = t41;
557
548
  } else {
558
- t42 = $[112];
549
+ t41 = $[109];
559
550
  }
560
- let t43;
561
- if ($[113] !== box.removeQuote || $[114] !== chatId || $[115] !== draft.quote || $[116] !== draft.quoteSource || $[117] !== notice || $[118] !== t) {
562
- t43 = draft.quote !== "" && /*#__PURE__*/_jsx(DraftQuote, {
551
+ let t42;
552
+ if ($[110] !== box.removeQuote || $[111] !== chatId || $[112] !== draft.quote || $[113] !== draft.quoteSource || $[114] !== notice || $[115] !== t) {
553
+ t42 = draft.quote !== "" && /*#__PURE__*/_jsx(DraftQuote, {
563
554
  chatId: chatId,
564
555
  quote: draft.quote,
565
556
  source: draft.quoteSource,
566
557
  onRemove: box.removeQuote,
567
558
  onSourceGone: () => notice.setNotice(t("rows.user.quoteGone"), "info")
568
559
  });
569
- $[113] = box.removeQuote;
570
- $[114] = chatId;
571
- $[115] = draft.quote;
572
- $[116] = draft.quoteSource;
573
- $[117] = notice;
574
- $[118] = t;
575
- $[119] = t43;
560
+ $[110] = box.removeQuote;
561
+ $[111] = chatId;
562
+ $[112] = draft.quote;
563
+ $[113] = draft.quoteSource;
564
+ $[114] = notice;
565
+ $[115] = t;
566
+ $[116] = t42;
576
567
  } else {
577
- t43 = $[119];
568
+ t42 = $[116];
578
569
  }
579
- let t44;
580
- if ($[120] !== box.removeAttachment || $[121] !== draft.attachments) {
581
- t44 = draft.attachments.length > 0 && /*#__PURE__*/_jsx(DraftAttachments, {
570
+ let t43;
571
+ if ($[117] !== box.removeAttachment || $[118] !== draft.attachments) {
572
+ t43 = draft.attachments.length > 0 && /*#__PURE__*/_jsx(DraftAttachments, {
582
573
  attachments: draft.attachments,
583
574
  onRemove: box.removeAttachment
584
575
  });
585
- $[120] = box.removeAttachment;
586
- $[121] = draft.attachments;
587
- $[122] = t44;
576
+ $[117] = box.removeAttachment;
577
+ $[118] = draft.attachments;
578
+ $[119] = t43;
588
579
  } else {
589
- t44 = $[122];
580
+ t43 = $[119];
590
581
  }
591
- const t45 = !writable;
592
- let t46;
593
- if ($[123] !== box || $[124] !== history || $[125] !== hold || $[126] !== menus) {
594
- t46 = (value, selection, state) => {
582
+ const t44 = !writable;
583
+ let t45;
584
+ if ($[120] !== box || $[121] !== history || $[122] !== hold || $[123] !== menus) {
585
+ t45 = (value, selection, state) => {
595
586
  hold.noteInput();
596
587
  box.setText(value);
597
588
  menus.setMenuIndex(0);
598
589
  menus.trackTriggers(value, selection, state);
599
590
  history.edited(value);
600
591
  };
601
- $[123] = box;
602
- $[124] = history;
603
- $[125] = hold;
604
- $[126] = menus;
605
- $[127] = t46;
592
+ $[120] = box;
593
+ $[121] = history;
594
+ $[122] = hold;
595
+ $[123] = menus;
596
+ $[124] = t45;
606
597
  } else {
607
- t46 = $[127];
598
+ t45 = $[124];
608
599
  }
609
- let t47;
610
- if ($[128] !== hold || $[129] !== menus) {
611
- t47 = () => {
600
+ let t46;
601
+ if ($[125] !== hold || $[126] !== menus) {
602
+ t46 = () => {
612
603
  menus.close();
613
604
  hold.release("blur");
614
605
  };
615
- $[128] = hold;
616
- $[129] = menus;
617
- $[130] = t47;
606
+ $[125] = hold;
607
+ $[126] = menus;
608
+ $[127] = t46;
618
609
  } else {
619
- t47 = $[130];
610
+ t46 = $[127];
620
611
  }
621
- let t48;
622
- if ($[131] !== dictationToolbar || $[132] !== draft.text || $[133] !== editorExtensions || $[134] !== files.onCopy || $[135] !== files.onPaste || $[136] !== focused || $[137] !== hold.setComposing || $[138] !== menus.inputAria || $[139] !== menus.trackTriggers || $[140] !== onKeyDown || $[141] !== placeholder || $[142] !== t45 || $[143] !== t46 || $[144] !== t47) {
623
- t48 = /*#__PURE__*/_jsx(ComposerInput, {
612
+ let t47;
613
+ if ($[128] !== dictationToolbar || $[129] !== draft.text || $[130] !== editorExtensions || $[131] !== files.onCopy || $[132] !== files.onPaste || $[133] !== focused || $[134] !== hold.setComposing || $[135] !== menus.inputAria || $[136] !== menus.trackTriggers || $[137] !== onKeyDown || $[138] !== placeholder || $[139] !== t44 || $[140] !== t45 || $[141] !== t46) {
614
+ t47 = /*#__PURE__*/_jsx(ComposerInput, {
624
615
  ref: inputRef,
625
616
  dictationToolbar: dictationToolbar,
626
617
  className: "composer-input select-text text-sm leading-normal text-text",
627
618
  value: draft.text,
628
619
  placeholder: placeholder,
629
- disabled: t45,
620
+ disabled: t44,
630
621
  tabbable: focused,
631
622
  extensions: editorExtensions,
632
623
  aria: menus.inputAria,
633
- onChange: t46,
624
+ onChange: t45,
634
625
  onSelectionChange: menus.trackTriggers,
635
- onBlur: t47,
626
+ onBlur: t46,
636
627
  onComposing: hold.setComposing,
637
628
  onKeyDown: onKeyDown,
638
629
  onPaste: files.onPaste,
639
630
  onCopy: files.onCopy
640
631
  });
641
- $[131] = dictationToolbar;
642
- $[132] = draft.text;
643
- $[133] = editorExtensions;
644
- $[134] = files.onCopy;
645
- $[135] = files.onPaste;
646
- $[136] = focused;
647
- $[137] = hold.setComposing;
648
- $[138] = menus.inputAria;
649
- $[139] = menus.trackTriggers;
650
- $[140] = onKeyDown;
651
- $[141] = placeholder;
652
- $[142] = t45;
653
- $[143] = t46;
654
- $[144] = t47;
655
- $[145] = t48;
656
- } else {
657
- t48 = $[145];
632
+ $[128] = dictationToolbar;
633
+ $[129] = draft.text;
634
+ $[130] = editorExtensions;
635
+ $[131] = files.onCopy;
636
+ $[132] = files.onPaste;
637
+ $[133] = focused;
638
+ $[134] = hold.setComposing;
639
+ $[135] = menus.inputAria;
640
+ $[136] = menus.trackTriggers;
641
+ $[137] = onKeyDown;
642
+ $[138] = placeholder;
643
+ $[139] = t44;
644
+ $[140] = t45;
645
+ $[141] = t46;
646
+ $[142] = t47;
647
+ } else {
648
+ t47 = $[142];
658
649
  }
659
- let t49;
660
- if ($[146] !== notice.notice || $[147] !== notice.tone) {
661
- t49 = notice.notice && /*#__PURE__*/_jsx("div", {
650
+ let t48;
651
+ if ($[143] !== notice.notice || $[144] !== notice.tone) {
652
+ t48 = notice.notice && /*#__PURE__*/_jsx("div", {
662
653
  className: clsx("px-5 pb-1 text-xs @max-md/composer:px-3.5", notice.tone === "error" ? "text-status-error" : "text-text-muted"),
663
654
  role: notice.tone === "error" ? "alert" : "status",
664
655
  children: notice.notice
665
656
  });
666
- $[146] = notice.notice;
667
- $[147] = notice.tone;
668
- $[148] = t49;
657
+ $[143] = notice.notice;
658
+ $[144] = notice.tone;
659
+ $[145] = t48;
669
660
  } else {
670
- t49 = $[148];
661
+ t48 = $[145];
671
662
  }
672
- const t50 = guard.visible && /*#__PURE__*/_jsxs("div", {
663
+ const t49 = guard.visible && /*#__PURE__*/_jsxs("div", {
673
664
  className: clsx("px-5 pb-1 text-right text-xs tabular-nums @max-md/composer:px-3.5", guard.tooLong ? "text-status-error" : "text-text-faint"),
674
665
  children: [formatNumber(guard.count), " / ", formatNumber(PROMPT_MAX_CHARS), guard.tooLong && ` ${t("composer.tooLong")}`]
675
666
  });
676
667
  const T1 = ComposerControls;
677
- const t51 = capabilities?.attachments !== false;
678
- const t52 = !busy || !empty;
679
- const t53 = empty || !writable || guard.tooLong;
680
- const t54 = t(sendLabelKey(busy, steerable, sendDelivery));
668
+ const t50 = capabilities?.attachments !== false;
669
+ const t51 = !busy || !empty;
670
+ const t52 = empty || !writable || guard.tooLong;
671
+ const t53 = t(sendLabelKey(busy, steerable, sendDelivery));
672
+ let t54;
673
+ if ($[146] !== draft.text || $[147] !== sendKey) {
674
+ t54 = sendShortcut(sendKey, draft.text.includes("\n"));
675
+ $[146] = draft.text;
676
+ $[147] = sendKey;
677
+ $[148] = t54;
678
+ } else {
679
+ t54 = $[148];
680
+ }
681
681
  let t55;
682
- if ($[149] !== draft.text || $[150] !== sendKey) {
683
- t55 = sendShortcut(sendKey, draft.text.includes("\n"));
684
- $[149] = draft.text;
685
- $[150] = sendKey;
686
- $[151] = t55;
682
+ if ($[149] !== submit) {
683
+ t55 = alternate => submit(alternate ? "alternate" : "default");
684
+ $[149] = submit;
685
+ $[150] = t55;
687
686
  } else {
688
- t55 = $[151];
687
+ t55 = $[150];
689
688
  }
690
- let t56;
691
- if ($[152] !== submit) {
692
- t56 = alternate => submit(alternate ? "alternate" : "default");
693
- $[152] = submit;
694
- $[153] = t56;
689
+ const t56 = continuable !== null && continuable !== sentFor && empty && writable && pending.length === 0 && extraPrompts.length === 0 ? continueTurn : null;
690
+ const t57 = scope.id;
691
+ let t58;
692
+ if ($[151] !== draft.quote || $[152] !== draft.text) {
693
+ t58 = withQuote(draft.quote, draft.text.trim());
694
+ $[151] = draft.quote;
695
+ $[152] = draft.text;
696
+ $[153] = t58;
695
697
  } else {
696
- t56 = $[153];
698
+ t58 = $[153];
697
699
  }
698
- const t57 = continuable !== null && continuable !== sentFor && empty && writable && pending.length === 0 && extraPrompts.length === 0 ? continueTurn : null;
699
- let t58;
700
- if ($[154] !== t52 || $[155] !== t53 || $[156] !== t54 || $[157] !== t55 || $[158] !== t56 || $[159] !== t57) {
701
- t58 = {
702
- visible: t52,
703
- disabled: t53,
704
- label: t54,
705
- kbd: t55,
706
- onSend: t56,
707
- onContinue: t57
700
+ let t59;
701
+ if ($[154] !== chatId || $[155] !== info.provider || $[156] !== info.runtimeMode || $[157] !== info.selection || $[158] !== scope.id || $[159] !== t58) {
702
+ t59 = {
703
+ scopeId: t57,
704
+ chatId,
705
+ text: t58,
706
+ provider: info.provider,
707
+ selection: info.selection,
708
+ runtimeMode: info.runtimeMode
708
709
  };
709
- $[154] = t52;
710
- $[155] = t53;
711
- $[156] = t54;
712
- $[157] = t55;
713
- $[158] = t56;
714
- $[159] = t57;
715
- $[160] = t58;
710
+ $[154] = chatId;
711
+ $[155] = info.provider;
712
+ $[156] = info.runtimeMode;
713
+ $[157] = info.selection;
714
+ $[158] = scope.id;
715
+ $[159] = t58;
716
+ $[160] = t59;
716
717
  } else {
717
- t58 = $[160];
718
+ t59 = $[160];
718
719
  }
719
- let t59;
720
- if ($[161] !== files) {
721
- t59 = picked => {
720
+ let t60;
721
+ if ($[161] !== sendActions || $[162] !== t51 || $[163] !== t52 || $[164] !== t53 || $[165] !== t54 || $[166] !== t55 || $[167] !== t56 || $[168] !== t59) {
722
+ t60 = {
723
+ visible: t51,
724
+ disabled: t52,
725
+ label: t53,
726
+ kbd: t54,
727
+ onSend: t55,
728
+ onContinue: t56,
729
+ actions: sendActions,
730
+ draft: t59
731
+ };
732
+ $[161] = sendActions;
733
+ $[162] = t51;
734
+ $[163] = t52;
735
+ $[164] = t53;
736
+ $[165] = t54;
737
+ $[166] = t55;
738
+ $[167] = t56;
739
+ $[168] = t59;
740
+ $[169] = t60;
741
+ } else {
742
+ t60 = $[169];
743
+ }
744
+ let t61;
745
+ if ($[170] !== files) {
746
+ t61 = picked => {
722
747
  files.addFiles(picked);
723
748
  inputRef.current?.focus();
724
749
  };
725
- $[161] = files;
726
- $[162] = t59;
750
+ $[170] = files;
751
+ $[171] = t61;
727
752
  } else {
728
- t59 = $[162];
753
+ t61 = $[171];
729
754
  }
730
- let t60;
731
- if ($[163] !== writable) {
732
- t60 = added => {
755
+ let t62;
756
+ if ($[172] !== writable) {
757
+ t62 = added => {
733
758
  if (writable) {
734
759
  inputRef.current?.insert(added);
735
760
  }
736
761
  };
737
- $[163] = writable;
738
- $[164] = t60;
762
+ $[172] = writable;
763
+ $[173] = t62;
739
764
  } else {
740
- t60 = $[164];
765
+ t62 = $[173];
741
766
  }
742
- let t61;
743
- if ($[165] !== T1 || $[166] !== chatId || $[167] !== controls || $[168] !== info || $[169] !== providerFixed || $[170] !== restoreStashed || $[171] !== setDictationToolbar || $[172] !== t51 || $[173] !== t58 || $[174] !== t59 || $[175] !== t60 || $[176] !== writable) {
744
- t61 = /*#__PURE__*/_jsx(T1, {
767
+ let t63;
768
+ if ($[174] !== T1 || $[175] !== chatId || $[176] !== controls || $[177] !== info || $[178] !== providerFixed || $[179] !== restoreStashed || $[180] !== setDictationToolbar || $[181] !== t50 || $[182] !== t60 || $[183] !== t61 || $[184] !== t62 || $[185] !== writable) {
769
+ t63 = /*#__PURE__*/_jsx(T1, {
745
770
  chatId: chatId,
746
771
  info: info,
747
772
  providerFixed: providerFixed,
748
773
  writable: writable,
749
- attachable: t51,
774
+ attachable: t50,
750
775
  controls: controls,
751
- send: t58,
776
+ send: t60,
752
777
  dictationToolbar: setDictationToolbar,
753
- onFiles: t59,
778
+ onFiles: t61,
754
779
  onRestore: restoreStashed,
755
- insert: t60
780
+ insert: t62
756
781
  });
757
- $[165] = T1;
758
- $[166] = chatId;
759
- $[167] = controls;
760
- $[168] = info;
761
- $[169] = providerFixed;
762
- $[170] = restoreStashed;
763
- $[171] = setDictationToolbar;
764
- $[172] = t51;
765
- $[173] = t58;
766
- $[174] = t59;
767
- $[175] = t60;
768
- $[176] = writable;
769
- $[177] = t61;
770
- } else {
771
- t61 = $[177];
782
+ $[174] = T1;
783
+ $[175] = chatId;
784
+ $[176] = controls;
785
+ $[177] = info;
786
+ $[178] = providerFixed;
787
+ $[179] = restoreStashed;
788
+ $[180] = setDictationToolbar;
789
+ $[181] = t50;
790
+ $[182] = t60;
791
+ $[183] = t61;
792
+ $[184] = t62;
793
+ $[185] = writable;
794
+ $[186] = t63;
795
+ } else {
796
+ t63 = $[186];
772
797
  }
773
- let t62;
774
- if ($[178] !== pointSurface || $[179] !== pressSurface || $[180] !== t36 || $[181] !== t37 || $[182] !== t39 || $[183] !== t40 || $[184] !== t41 || $[185] !== t42 || $[186] !== t43 || $[187] !== t44 || $[188] !== t48 || $[189] !== t49 || $[190] !== t50 || $[191] !== t61) {
775
- t62 = /*#__PURE__*/_jsxs("div", {
776
- className: t36,
798
+ let t64;
799
+ if ($[187] !== pointSurface || $[188] !== pressSurface || $[189] !== t35 || $[190] !== t36 || $[191] !== t38 || $[192] !== t39 || $[193] !== t40 || $[194] !== t41 || $[195] !== t42 || $[196] !== t43 || $[197] !== t47 || $[198] !== t48 || $[199] !== t49 || $[200] !== t63) {
800
+ t64 = /*#__PURE__*/_jsxs("div", {
801
+ className: t35,
777
802
  onPointerOver: pointSurface,
778
803
  onMouseDown: pressSurface,
779
- children: [t37, t39, t40, t41, t42, t43, t44, t48, t49, t50, t61]
804
+ children: [t36, t38, t39, t40, t41, t42, t43, t47, t48, t49, t63]
780
805
  });
781
- $[178] = pointSurface;
782
- $[179] = pressSurface;
783
- $[180] = t36;
784
- $[181] = t37;
785
- $[182] = t39;
786
- $[183] = t40;
787
- $[184] = t41;
788
- $[185] = t42;
789
- $[186] = t43;
790
- $[187] = t44;
791
- $[188] = t48;
792
- $[189] = t49;
793
- $[190] = t50;
794
- $[191] = t61;
795
- $[192] = t62;
796
- } else {
797
- t62 = $[192];
798
- }
799
- let t63;
800
- if ($[193] !== T0 || $[194] !== answerPromptsElsewhere || $[195] !== chatId || $[196] !== disabled || $[197] !== focused || $[198] !== hold || $[199] !== pending || $[200] !== t32 || $[201] !== t33 || $[202] !== t34 || $[203] !== t62) {
801
- t63 = /*#__PURE__*/_jsx(T0, {
806
+ $[187] = pointSurface;
807
+ $[188] = pressSurface;
808
+ $[189] = t35;
809
+ $[190] = t36;
810
+ $[191] = t38;
811
+ $[192] = t39;
812
+ $[193] = t40;
813
+ $[194] = t41;
814
+ $[195] = t42;
815
+ $[196] = t43;
816
+ $[197] = t47;
817
+ $[198] = t48;
818
+ $[199] = t49;
819
+ $[200] = t63;
820
+ $[201] = t64;
821
+ } else {
822
+ t64 = $[201];
823
+ }
824
+ let t65;
825
+ if ($[202] !== T0 || $[203] !== answerPromptsElsewhere || $[204] !== chatId || $[205] !== disabled || $[206] !== focused || $[207] !== hold || $[208] !== pending || $[209] !== t31 || $[210] !== t32 || $[211] !== t33 || $[212] !== t64) {
826
+ t65 = /*#__PURE__*/_jsx(T0, {
802
827
  chatId: chatId,
803
828
  pending: pending,
804
829
  focused: focused,
805
830
  onShowElsewhere: answerPromptsElsewhere,
806
831
  disabled: disabled,
807
- hasDraft: t32,
808
- denyReason: t33,
809
- onAllAnswered: t34,
832
+ hasDraft: t31,
833
+ denyReason: t32,
834
+ onAllAnswered: t33,
810
835
  hold: hold,
811
- children: t62
812
- });
813
- $[193] = T0;
814
- $[194] = answerPromptsElsewhere;
815
- $[195] = chatId;
816
- $[196] = disabled;
817
- $[197] = focused;
818
- $[198] = hold;
819
- $[199] = pending;
820
- $[200] = t32;
821
- $[201] = t33;
822
- $[202] = t34;
823
- $[203] = t62;
824
- $[204] = t63;
825
- } else {
826
- t63 = $[204];
827
- }
828
- let t64;
829
- if ($[205] !== files.dropTarget || $[206] !== t30 || $[207] !== t63) {
830
- t64 = /*#__PURE__*/_jsx("div", {
831
- className: t30,
832
- ...t31,
833
- children: t63
836
+ children: t64
834
837
  });
835
- $[205] = files.dropTarget;
836
- $[206] = t30;
837
- $[207] = t63;
838
- $[208] = t64;
839
- } else {
840
- t64 = $[208];
838
+ $[202] = T0;
839
+ $[203] = answerPromptsElsewhere;
840
+ $[204] = chatId;
841
+ $[205] = disabled;
842
+ $[206] = focused;
843
+ $[207] = hold;
844
+ $[208] = pending;
845
+ $[209] = t31;
846
+ $[210] = t32;
847
+ $[211] = t33;
848
+ $[212] = t64;
849
+ $[213] = t65;
850
+ } else {
851
+ t65 = $[213];
841
852
  }
842
- const t65 = controls.confirmClear;
843
853
  let t66;
844
- if ($[209] !== t) {
845
- t66 = t("composer.clear.title");
846
- $[209] = t;
847
- $[210] = t66;
848
- } else {
849
- t66 = $[210];
850
- }
851
- let t67;
852
- if ($[211] !== t) {
853
- t67 = t("composer.clear.description");
854
- $[211] = t;
855
- $[212] = t67;
854
+ if ($[214] !== files.dropTarget || $[215] !== t29 || $[216] !== t65) {
855
+ t66 = /*#__PURE__*/_jsx("div", {
856
+ className: t29,
857
+ ...t30,
858
+ children: t65
859
+ });
860
+ $[214] = files.dropTarget;
861
+ $[215] = t29;
862
+ $[216] = t65;
863
+ $[217] = t66;
856
864
  } else {
857
- t67 = $[212];
865
+ t66 = $[217];
858
866
  }
867
+ const t67 = controls.confirmClear;
859
868
  let t68;
860
- if ($[213] !== t) {
861
- t68 = t("composer.clear.confirm");
862
- $[213] = t;
863
- $[214] = t68;
869
+ if ($[218] !== t) {
870
+ t68 = t("composer.clear.title");
871
+ $[218] = t;
872
+ $[219] = t68;
864
873
  } else {
865
- t68 = $[214];
874
+ t68 = $[219];
866
875
  }
867
876
  let t69;
868
- if ($[215] !== t) {
869
- t69 = t("composer.notice.clearFailed");
870
- $[215] = t;
871
- $[216] = t69;
877
+ if ($[220] !== t) {
878
+ t69 = t("composer.clear.description");
879
+ $[220] = t;
880
+ $[221] = t69;
872
881
  } else {
873
- t69 = $[216];
882
+ t69 = $[221];
874
883
  }
875
884
  let t70;
876
- if ($[217] !== controls.cancelClear || $[218] !== controls.confirmClear || $[219] !== controls.forceClearThread || $[220] !== t66 || $[221] !== t67 || $[222] !== t68 || $[223] !== t69) {
877
- t70 = /*#__PURE__*/_jsx(PromptDialog, {
878
- open: t65,
879
- title: t66,
880
- description: t67,
881
- confirmLabel: t68,
885
+ if ($[222] !== t) {
886
+ t70 = t("composer.clear.confirm");
887
+ $[222] = t;
888
+ $[223] = t70;
889
+ } else {
890
+ t70 = $[223];
891
+ }
892
+ let t71;
893
+ if ($[224] !== t) {
894
+ t71 = t("composer.notice.clearFailed");
895
+ $[224] = t;
896
+ $[225] = t71;
897
+ } else {
898
+ t71 = $[225];
899
+ }
900
+ let t72;
901
+ if ($[226] !== controls.cancelClear || $[227] !== controls.confirmClear || $[228] !== controls.forceClearThread || $[229] !== t68 || $[230] !== t69 || $[231] !== t70 || $[232] !== t71) {
902
+ t72 = /*#__PURE__*/_jsx(PromptDialog, {
903
+ open: t67,
904
+ title: t68,
905
+ description: t69,
906
+ confirmLabel: t70,
882
907
  danger: true,
883
- fallbackMessage: t69,
908
+ fallbackMessage: t71,
884
909
  onConfirm: controls.forceClearThread,
885
910
  onOpenChange: controls.cancelClear
886
911
  });
887
- $[217] = controls.cancelClear;
888
- $[218] = controls.confirmClear;
889
- $[219] = controls.forceClearThread;
890
- $[220] = t66;
891
- $[221] = t67;
892
- $[222] = t68;
893
- $[223] = t69;
894
- $[224] = t70;
895
- } else {
896
- t70 = $[224];
897
- }
898
- let t71;
899
- if ($[225] !== t27 || $[226] !== t28 || $[227] !== t64 || $[228] !== t70) {
900
- t71 = /*#__PURE__*/_jsxs("div", {
901
- className: t26,
902
- children: [t27, t28, t64, t70]
912
+ $[226] = controls.cancelClear;
913
+ $[227] = controls.confirmClear;
914
+ $[228] = controls.forceClearThread;
915
+ $[229] = t68;
916
+ $[230] = t69;
917
+ $[231] = t70;
918
+ $[232] = t71;
919
+ $[233] = t72;
920
+ } else {
921
+ t72 = $[233];
922
+ }
923
+ let t73;
924
+ if ($[234] !== t26 || $[235] !== t27 || $[236] !== t66 || $[237] !== t72) {
925
+ t73 = /*#__PURE__*/_jsxs("div", {
926
+ className: t25,
927
+ children: [t26, t27, t66, t72]
903
928
  });
904
- $[225] = t27;
905
- $[226] = t28;
906
- $[227] = t64;
907
- $[228] = t70;
908
- $[229] = t71;
929
+ $[234] = t26;
930
+ $[235] = t27;
931
+ $[236] = t66;
932
+ $[237] = t72;
933
+ $[238] = t73;
909
934
  } else {
910
- t71 = $[229];
935
+ t73 = $[238];
911
936
  }
912
- return t71;
937
+ return t73;
913
938
  }
914
939
  function _temp4(event) {
915
940
  event.currentTarget.toggleAttribute("data-text-cursor", surfacePartOf(event.target, event.currentTarget) !== "action");