@adecore/agents-react 0.53.3 → 0.54.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (358) hide show
  1. package/dist/agents/AgentIcon.js +1 -1
  2. package/dist/agents/AgentModelLabel.js +1 -1
  3. package/dist/agents/accounts.js +1 -1
  4. package/dist/chat/attachments.js +1 -1
  5. package/dist/chat/forks.js +1 -1
  6. package/dist/chat/logic/limit.js +1 -1
  7. package/dist/chat/logic/scrubber.js +1 -1
  8. package/dist/chat/logic/selection-switch.d.ts +6 -0
  9. package/dist/chat/logic/selection-switch.js +42 -0
  10. package/dist/chat/logic/timeline-target.d.ts +1 -1
  11. package/dist/chat/logic/timeline.d.ts +6 -1
  12. package/dist/chat/logic/timeline.js +16 -2
  13. package/dist/chat/logic/tool-looks.js +1 -1
  14. package/dist/chat/logic/tools.js +1 -1
  15. package/dist/chat/logic/workflow.js +1 -1
  16. package/dist/chat/preferences.js +1 -1
  17. package/dist/chat/runtime-modes.js +1 -1
  18. package/dist/chat/send-key.js +1 -1
  19. package/dist/chat/stash.js +2 -2
  20. package/dist/chat/subagent-list.js +1 -1
  21. package/dist/chat/ui/AccountPill.js +3 -3
  22. package/dist/chat/ui/BookmarkMarker.js +6 -6
  23. package/dist/chat/ui/BookmarkSubmenu.js +5 -5
  24. package/dist/chat/ui/ChatActivity.js +15 -14
  25. package/dist/chat/ui/CodeBlock.js +9 -7
  26. package/dist/chat/ui/Composer.js +13 -13
  27. package/dist/chat/ui/ComposerInput.d.ts +1 -1
  28. package/dist/chat/ui/ComposerInput.js +35 -18
  29. package/dist/chat/ui/DiffPool.js +1 -1
  30. package/dist/chat/ui/EditDiff.js +2 -2
  31. package/dist/chat/ui/GoalDock.js +5 -5
  32. package/dist/chat/ui/ImageView.js +4 -4
  33. package/dist/chat/ui/LimitState.js +12 -12
  34. package/dist/chat/ui/Markdown.d.ts +1 -1
  35. package/dist/chat/ui/Markdown.js +11 -10
  36. package/dist/chat/ui/MermaidBlock.js +7 -6
  37. package/dist/chat/ui/MessageActions.js +7 -7
  38. package/dist/chat/ui/ModelMarks.js +2 -2
  39. package/dist/chat/ui/Pickers.d.ts +1 -1
  40. package/dist/chat/ui/Pickers.js +32 -27
  41. package/dist/chat/ui/PromptComposer.d.ts +1 -1
  42. package/dist/chat/ui/PromptComposer.js +5 -5
  43. package/dist/chat/ui/PromptEditor.js +3 -3
  44. package/dist/chat/ui/QuoteButton.js +2 -2
  45. package/dist/chat/ui/ReferenceChip.js +3 -3
  46. package/dist/chat/ui/ReferenceTrail.js +2 -2
  47. package/dist/chat/ui/ResumeCompactionDock.js +3 -3
  48. package/dist/chat/ui/RunSettings.js +11 -11
  49. package/dist/chat/ui/Scrubber.js +4 -4
  50. package/dist/chat/ui/SessionLine.js +2 -2
  51. package/dist/chat/ui/ShellCommand.d.ts +1 -1
  52. package/dist/chat/ui/ShellCommand.js +2 -2
  53. package/dist/chat/ui/SubagentControls.js +3 -3
  54. package/dist/chat/ui/SubagentInfo.js +5 -5
  55. package/dist/chat/ui/SubagentStopButton.js +2 -2
  56. package/dist/chat/ui/SubagentTimeline.js +18 -16
  57. package/dist/chat/ui/Timeline.js +231 -145
  58. package/dist/chat/ui/TimelineMenu.js +7 -7
  59. package/dist/chat/ui/UnifiedDiff.js +2 -2
  60. package/dist/chat/ui/VisualDialogs.js +1 -1
  61. package/dist/chat/ui/VisualFrame.js +4 -4
  62. package/dist/chat/ui/WorkflowAgentLine.d.ts +1 -1
  63. package/dist/chat/ui/WorkflowAgentLine.js +3 -3
  64. package/dist/chat/ui/chip-clipboard.d.ts +1 -1
  65. package/dist/chat/ui/composer/ComposerControls.d.ts +1 -1
  66. package/dist/chat/ui/composer/ComposerControls.js +4 -4
  67. package/dist/chat/ui/composer/ComposerMenu.js +5 -4
  68. package/dist/chat/ui/composer/DraftParts.js +2 -2
  69. package/dist/chat/ui/composer/QueuedMessages.js +2 -2
  70. package/dist/chat/ui/composer/chip-paste.d.ts +1 -1
  71. package/dist/chat/ui/composer/chips.d.ts +1 -1
  72. package/dist/chat/ui/composer/chips.js +2 -2
  73. package/dist/chat/ui/composer/key-handler.js +1 -1
  74. package/dist/chat/ui/composer/placeholder.js +1 -1
  75. package/dist/chat/ui/composer/use-composer-menus.d.ts +1 -1
  76. package/dist/chat/ui/composer/use-composer-menus.js +1 -1
  77. package/dist/chat/ui/composer/use-composer-submit.d.ts +1 -1
  78. package/dist/chat/ui/composer/use-draft-files.d.ts +2 -2
  79. package/dist/chat/ui/composer/use-draft-files.js +1 -1
  80. package/dist/chat/ui/composer/use-effort-stepper.js +1 -1
  81. package/dist/chat/ui/composer/use-prompt-menus.d.ts +2 -2
  82. package/dist/chat/ui/composer/use-prompt-menus.js +1 -1
  83. package/dist/chat/ui/diff/ApprovalReview.js +2 -2
  84. package/dist/chat/ui/diff/DiffOmitted.js +1 -1
  85. package/dist/chat/ui/diff/DiffStack.js +2 -2
  86. package/dist/chat/ui/diff/EditorEditDiff.d.ts +1 -1
  87. package/dist/chat/ui/diff/EditorEditDiff.js +5 -5
  88. package/dist/chat/ui/diff/EditorPatchDiff.d.ts +1 -1
  89. package/dist/chat/ui/diff/EditorPatchDiff.js +1 -1
  90. package/dist/chat/ui/diff/LegacyEditDiff.js +47 -31
  91. package/dist/chat/ui/diff/LegacyUnifiedDiff.js +93 -69
  92. package/dist/chat/ui/diff/RawDiff.js +54 -35
  93. package/dist/chat/ui/diff/syntax-runtime.d.ts +1 -1
  94. package/dist/chat/ui/highlighter.d.ts +1 -1
  95. package/dist/chat/ui/highlighter.js +1 -1
  96. package/dist/chat/ui/icons.js +1 -1
  97. package/dist/chat/ui/intelligent-ui/UiBlockFrame.d.ts +1 -1
  98. package/dist/chat/ui/intelligent-ui/UiBlockFrame.js +4 -4
  99. package/dist/chat/ui/intelligent-ui/UiFallbackPart.js +2 -2
  100. package/dist/chat/ui/intelligent-ui/UiReply.d.ts +2 -2
  101. package/dist/chat/ui/intelligent-ui/UiReply.js +8 -8
  102. package/dist/chat/ui/intelligent-ui/node-text.d.ts +1 -1
  103. package/dist/chat/ui/intelligent-ui/render-context.d.ts +1 -1
  104. package/dist/chat/ui/intelligent-ui/renderers/chart.js +28 -15
  105. package/dist/chat/ui/intelligent-ui/renderers/choices.js +4 -4
  106. package/dist/chat/ui/intelligent-ui/renderers/content.js +6 -6
  107. package/dist/chat/ui/intelligent-ui/renderers/data.js +104 -87
  108. package/dist/chat/ui/intelligent-ui/renderers/inputs.js +3 -3
  109. package/dist/chat/ui/intelligent-ui/renderers/links.js +2 -2
  110. package/dist/chat/ui/intelligent-ui/renderers/map-view.js +4 -4
  111. package/dist/chat/ui/intelligent-ui/renderers/map.js +3 -3
  112. package/dist/chat/ui/intelligent-ui/renderers/structure.js +2 -2
  113. package/dist/chat/ui/intelligent-ui/renderers/text.js +5 -5
  114. package/dist/chat/ui/intelligent-ui/tones.d.ts +1 -1
  115. package/dist/chat/ui/intelligent-ui/use-ui-links.d.ts +1 -1
  116. package/dist/chat/ui/intelligent-ui/use-ui-links.js +2 -2
  117. package/dist/chat/ui/intelligent-ui/use-ui-queries.js +1 -1
  118. package/dist/chat/ui/reference-icons.d.ts +1 -1
  119. package/dist/chat/ui/reference-icons.js +2 -2
  120. package/dist/chat/ui/reply-context.d.ts +1 -1
  121. package/dist/chat/ui/rows/ForksRow.js +3 -3
  122. package/dist/chat/ui/rows/GeneratedImageRow.js +5 -5
  123. package/dist/chat/ui/rows/MessageRows.d.ts +6 -1
  124. package/dist/chat/ui/rows/MessageRows.js +151 -22
  125. package/dist/chat/ui/rows/Rows.js +39 -21
  126. package/dist/chat/ui/rows/SubagentRow.js +16 -16
  127. package/dist/chat/ui/rows/TaskRow.js +3 -3
  128. package/dist/chat/ui/rows/VisualRow.js +2 -2
  129. package/dist/chat/ui/rows/WorkRows.d.ts +2 -2
  130. package/dist/chat/ui/rows/WorkRows.js +37 -25
  131. package/dist/chat/ui/rows/WorkflowRow.js +8 -8
  132. package/dist/chat/ui/use-diff-source-tokens.js +1 -1
  133. package/dist/chat/ui/visual-theme.d.ts +1 -1
  134. package/dist/chat/ui/visual-theme.js +2 -2
  135. package/dist/chat/workflow-list.js +1 -1
  136. package/dist/host.d.ts +4 -4
  137. package/dist/host.js +1 -1
  138. package/dist/lazy.js +1 -1
  139. package/dist/locales/en/agent-chat.d.ts +4 -0
  140. package/dist/locales/en/agent-chat.js +4 -0
  141. package/dist/locales/nl/agent-chat.d.ts +4 -0
  142. package/dist/locales/nl/agent-chat.js +4 -0
  143. package/dist/port-transport.js +1 -1
  144. package/dist/prompts/logic/subjects.d.ts +1 -1
  145. package/dist/prompts/ui/ApprovalBody.js +16 -7
  146. package/dist/prompts/ui/PromptActions.js +2 -2
  147. package/dist/prompts/ui/PromptCard.js +5 -4
  148. package/dist/prompts/ui/PromptView.js +1 -1
  149. package/dist/prompts/ui/QuestionBody.js +4 -4
  150. package/dist/providers/AccountDetail.js +4 -4
  151. package/dist/providers/AccountOrderList.js +2 -2
  152. package/dist/providers/AccountVariables.js +3 -3
  153. package/dist/providers/AddAccountForm.js +6 -6
  154. package/dist/providers/CliDetail.js +8 -8
  155. package/dist/providers/InstallPage.js +3 -3
  156. package/dist/providers/ProviderList.js +2 -2
  157. package/dist/providers/ProvidersPane.d.ts +1 -1
  158. package/dist/providers/ProvidersPane.js +5 -5
  159. package/dist/providers/install-steps.d.ts +1 -1
  160. package/dist/settings/sections.d.ts +2 -2
  161. package/dist/state/chats.js +1 -1
  162. package/dist/state/usage.js +2 -2
  163. package/dist/theme.css +4 -4
  164. package/dist/transport.d.ts +1 -1
  165. package/dist/usage/LimitsList.js +4 -4
  166. package/dist/usage/UsageBreakdown.js +5 -5
  167. package/dist/usage/UsageChart.js +1 -1
  168. package/dist/usage/UsageDialog.js +1 -1
  169. package/dist/usage/UsageLimits.js +6 -6
  170. package/dist/usage/UsageLimitsCard.js +2 -2
  171. package/dist/usage/UsagePage.js +202 -191
  172. package/dist/usage/UsagePane.js +4 -3
  173. package/dist/usage/UsageSummary.js +1 -1
  174. package/dist/usage/UsageTiles.js +1 -1
  175. package/dist/usage/format.d.ts +1 -0
  176. package/dist/usage/format.js +5 -0
  177. package/dist/usage/limit-groups.js +2 -2
  178. package/dist/usage/summary.js +1 -1
  179. package/package.json +9 -8
  180. package/src/agents/AgentIcon.tsx +1 -1
  181. package/src/agents/AgentModelLabel.tsx +2 -2
  182. package/src/agents/ProviderLogo.tsx +1 -1
  183. package/src/agents/accounts.ts +1 -1
  184. package/src/agents/option-words.ts +1 -1
  185. package/src/chat/attachments.ts +1 -1
  186. package/src/chat/bookmarks.ts +1 -1
  187. package/src/chat/drafts.ts +1 -1
  188. package/src/chat/forks.ts +1 -1
  189. package/src/chat/logic/fork.ts +1 -1
  190. package/src/chat/logic/limit.ts +1 -1
  191. package/src/chat/logic/scrubber.ts +1 -1
  192. package/src/chat/logic/selection-switch.ts +47 -0
  193. package/src/chat/logic/timeline-copy.ts +1 -1
  194. package/src/chat/logic/timeline-target.ts +1 -1
  195. package/src/chat/logic/timeline.ts +28 -4
  196. package/src/chat/logic/tool-looks.ts +1 -1
  197. package/src/chat/logic/tools.ts +1 -1
  198. package/src/chat/logic/workflow.ts +1 -1
  199. package/src/chat/pending-prompts.ts +1 -1
  200. package/src/chat/preferences.ts +1 -1
  201. package/src/chat/reading-width.ts +1 -1
  202. package/src/chat/runtime-modes.ts +1 -1
  203. package/src/chat/send-key.ts +1 -1
  204. package/src/chat/stash.ts +2 -2
  205. package/src/chat/subagent-conversation.ts +1 -1
  206. package/src/chat/subagent-list.ts +1 -1
  207. package/src/chat/subagent-view.ts +1 -1
  208. package/src/chat/thumbnails.ts +1 -1
  209. package/src/chat/ui/AccountPill.tsx +4 -4
  210. package/src/chat/ui/BookmarkMarker.tsx +6 -6
  211. package/src/chat/ui/BookmarkSubmenu.tsx +5 -5
  212. package/src/chat/ui/ChatActivity.tsx +15 -15
  213. package/src/chat/ui/CodeBlock.tsx +10 -8
  214. package/src/chat/ui/Composer.tsx +13 -13
  215. package/src/chat/ui/ComposerInput.tsx +10 -2
  216. package/src/chat/ui/DiffPool.tsx +1 -1
  217. package/src/chat/ui/EditDiff.tsx +3 -4
  218. package/src/chat/ui/GoalDock.tsx +6 -6
  219. package/src/chat/ui/ImageView.tsx +4 -4
  220. package/src/chat/ui/LimitState.tsx +13 -13
  221. package/src/chat/ui/Markdown.tsx +12 -12
  222. package/src/chat/ui/MermaidBlock.tsx +6 -6
  223. package/src/chat/ui/MessageActions.tsx +7 -7
  224. package/src/chat/ui/ModelMarks.tsx +2 -2
  225. package/src/chat/ui/Pickers.tsx +10 -10
  226. package/src/chat/ui/PromptComposer.tsx +6 -6
  227. package/src/chat/ui/PromptEditor.tsx +4 -4
  228. package/src/chat/ui/QuoteButton.tsx +2 -2
  229. package/src/chat/ui/ReferenceChip.tsx +3 -3
  230. package/src/chat/ui/ReferenceTrail.tsx +2 -2
  231. package/src/chat/ui/ResumeCompactionDock.tsx +3 -3
  232. package/src/chat/ui/RunSettings.tsx +13 -13
  233. package/src/chat/ui/Scrubber.tsx +4 -4
  234. package/src/chat/ui/SessionLine.tsx +2 -2
  235. package/src/chat/ui/ShellCommand.tsx +2 -2
  236. package/src/chat/ui/SubagentControls.tsx +3 -3
  237. package/src/chat/ui/SubagentInfo.tsx +5 -5
  238. package/src/chat/ui/SubagentStopButton.tsx +3 -3
  239. package/src/chat/ui/SubagentTimeline.tsx +20 -17
  240. package/src/chat/ui/Timeline.tsx +232 -143
  241. package/src/chat/ui/TimelineMenu.tsx +7 -7
  242. package/src/chat/ui/UnifiedDiff.tsx +3 -3
  243. package/src/chat/ui/VisualDialogs.tsx +2 -2
  244. package/src/chat/ui/VisualFrame.tsx +4 -4
  245. package/src/chat/ui/WorkflowAgentLine.tsx +4 -4
  246. package/src/chat/ui/chip-clipboard.ts +1 -1
  247. package/src/chat/ui/composer/ComposerControls.tsx +4 -4
  248. package/src/chat/ui/composer/ComposerMenu.tsx +6 -6
  249. package/src/chat/ui/composer/DraftParts.tsx +2 -2
  250. package/src/chat/ui/composer/QueuedMessages.tsx +2 -2
  251. package/src/chat/ui/composer/chip-paste.ts +1 -1
  252. package/src/chat/ui/composer/chips.ts +2 -2
  253. package/src/chat/ui/composer/key-handler.ts +2 -2
  254. package/src/chat/ui/composer/placeholder.ts +1 -1
  255. package/src/chat/ui/composer/use-chat-controls.ts +1 -1
  256. package/src/chat/ui/composer/use-compaction-offer.ts +1 -1
  257. package/src/chat/ui/composer/use-composer-menus.ts +2 -2
  258. package/src/chat/ui/composer/use-composer-submit.ts +2 -2
  259. package/src/chat/ui/composer/use-draft-files.ts +3 -3
  260. package/src/chat/ui/composer/use-effort-stepper.ts +2 -2
  261. package/src/chat/ui/composer/use-pending-requests.ts +1 -1
  262. package/src/chat/ui/composer/use-prompt-menus.ts +3 -3
  263. package/src/chat/ui/composer/use-take-back.ts +1 -1
  264. package/src/chat/ui/diff/ApprovalReview.tsx +3 -3
  265. package/src/chat/ui/diff/DiffOmitted.tsx +1 -1
  266. package/src/chat/ui/diff/DiffStack.tsx +2 -2
  267. package/src/chat/ui/diff/EditorEditDiff.tsx +5 -5
  268. package/src/chat/ui/diff/EditorPatchDiff.tsx +1 -1
  269. package/src/chat/ui/diff/LegacyDiffPool.tsx +1 -1
  270. package/src/chat/ui/diff/LegacyEditDiff.tsx +18 -9
  271. package/src/chat/ui/diff/LegacyUnifiedDiff.tsx +24 -13
  272. package/src/chat/ui/diff/RawDiff.tsx +8 -5
  273. package/src/chat/ui/diff/syntax-runtime.ts +1 -1
  274. package/src/chat/ui/highlighter.ts +1 -1
  275. package/src/chat/ui/icons.tsx +2 -2
  276. package/src/chat/ui/intelligent-ui/UiBlockFrame.tsx +5 -5
  277. package/src/chat/ui/intelligent-ui/UiFallbackPart.tsx +2 -2
  278. package/src/chat/ui/intelligent-ui/UiReply.tsx +18 -18
  279. package/src/chat/ui/intelligent-ui/node-text.ts +1 -1
  280. package/src/chat/ui/intelligent-ui/render-context.ts +1 -1
  281. package/src/chat/ui/intelligent-ui/renderers/chart.tsx +15 -7
  282. package/src/chat/ui/intelligent-ui/renderers/choices.tsx +4 -4
  283. package/src/chat/ui/intelligent-ui/renderers/content.tsx +7 -7
  284. package/src/chat/ui/intelligent-ui/renderers/data.tsx +8 -7
  285. package/src/chat/ui/intelligent-ui/renderers/inputs.tsx +3 -3
  286. package/src/chat/ui/intelligent-ui/renderers/links.tsx +4 -4
  287. package/src/chat/ui/intelligent-ui/renderers/map-view.tsx +4 -4
  288. package/src/chat/ui/intelligent-ui/renderers/map.tsx +5 -5
  289. package/src/chat/ui/intelligent-ui/renderers/structure.tsx +3 -3
  290. package/src/chat/ui/intelligent-ui/renderers/text.tsx +5 -5
  291. package/src/chat/ui/intelligent-ui/tones.ts +1 -1
  292. package/src/chat/ui/intelligent-ui/use-ui-links.ts +2 -2
  293. package/src/chat/ui/intelligent-ui/use-ui-queries.ts +1 -1
  294. package/src/chat/ui/reference-icons.ts +2 -2
  295. package/src/chat/ui/reply-context.ts +1 -1
  296. package/src/chat/ui/rows/ForksRow.tsx +3 -3
  297. package/src/chat/ui/rows/GeneratedImageRow.tsx +7 -7
  298. package/src/chat/ui/rows/MessageRows.tsx +57 -33
  299. package/src/chat/ui/rows/RowContainer.tsx +1 -1
  300. package/src/chat/ui/rows/Rows.tsx +7 -4
  301. package/src/chat/ui/rows/SubagentRow.tsx +16 -16
  302. package/src/chat/ui/rows/TaskRow.tsx +4 -4
  303. package/src/chat/ui/rows/VisualRow.tsx +2 -2
  304. package/src/chat/ui/rows/WorkRows.tsx +44 -32
  305. package/src/chat/ui/rows/WorkflowRow.tsx +9 -9
  306. package/src/chat/ui/rows/row-rhythm.ts +1 -1
  307. package/src/chat/ui/use-diff-source-tokens.ts +1 -1
  308. package/src/chat/ui/visual-theme.ts +2 -2
  309. package/src/chat/workflow-list.ts +1 -1
  310. package/src/host.ts +6 -6
  311. package/src/lazy.tsx +1 -1
  312. package/src/locales/en/agent-chat.ts +4 -0
  313. package/src/locales/nl/agent-chat.ts +4 -0
  314. package/src/port-transport.ts +1 -1
  315. package/src/prompts/logic/subjects.ts +1 -1
  316. package/src/prompts/ui/ApprovalBody.tsx +19 -9
  317. package/src/prompts/ui/PromptActions.tsx +2 -2
  318. package/src/prompts/ui/PromptCard.tsx +4 -4
  319. package/src/prompts/ui/PromptView.tsx +1 -1
  320. package/src/prompts/ui/QuestionBody.tsx +5 -5
  321. package/src/providers/AccountDetail.tsx +5 -5
  322. package/src/providers/AccountOrderList.tsx +2 -2
  323. package/src/providers/AccountVariables.tsx +4 -4
  324. package/src/providers/AddAccountForm.tsx +7 -7
  325. package/src/providers/CliDetail.tsx +9 -9
  326. package/src/providers/InstallPage.tsx +4 -4
  327. package/src/providers/ProviderList.tsx +4 -4
  328. package/src/providers/ProvidersPane.tsx +7 -7
  329. package/src/providers/account-actions.ts +1 -1
  330. package/src/providers/install-steps.ts +1 -1
  331. package/src/providers/parts.tsx +1 -1
  332. package/src/providers/provider-abilities.ts +1 -1
  333. package/src/providers/provider-groups.ts +1 -1
  334. package/src/providers/variables.ts +1 -1
  335. package/src/settings/sections.ts +2 -2
  336. package/src/state/chats.ts +2 -2
  337. package/src/state/provider-accounts.ts +1 -1
  338. package/src/state/providers.ts +1 -1
  339. package/src/state/usage.ts +2 -2
  340. package/src/theme.css +4 -4
  341. package/src/transport.ts +1 -1
  342. package/src/usage/LimitsList.tsx +5 -5
  343. package/src/usage/UsageBreakdown.tsx +6 -6
  344. package/src/usage/UsageChart.tsx +2 -2
  345. package/src/usage/UsageDialog.tsx +2 -2
  346. package/src/usage/UsageLimits.tsx +7 -7
  347. package/src/usage/UsageLimitsCard.tsx +2 -2
  348. package/src/usage/UsagePage.tsx +8 -7
  349. package/src/usage/UsagePane.tsx +4 -4
  350. package/src/usage/UsageSummary.tsx +2 -2
  351. package/src/usage/UsageTiles.tsx +1 -1
  352. package/src/usage/format.ts +7 -0
  353. package/src/usage/limit-groups.ts +2 -2
  354. package/src/usage/limits.ts +1 -1
  355. package/src/usage/summary.ts +1 -1
  356. package/dist/chat/logic/json.d.ts +0 -1
  357. package/dist/chat/logic/json.js +0 -4
  358. package/src/chat/logic/json.ts +0 -4
@@ -1,8 +1,8 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
+ import { Icon } from '@adecore/ui';
2
3
  import clsx from 'clsx';
3
4
  import { Bot } from 'lucide-react';
4
5
  import { siClaude, siGithubcopilot, siGooglegemini } from 'simple-icons';
5
- import { Icon } from '@adecore/ui';
6
6
  import { hostAgentMark } from './agent-marks.js';
7
7
  import { PROVIDER_PATHS } from './provider-paths.js';
8
8
  // simple-icons removed OpenAI's mark at its request, so Codex reuses the usage page's path.
@@ -1,6 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useContext } from 'react';
3
2
  import clsx from 'clsx';
3
+ import { useContext } from 'react';
4
4
  import { ChatScopeContext } from '../scope.js';
5
5
  import { useProvidersStore } from '../state/providers.js';
6
6
  import { AgentIcon } from './AgentIcon.js';
@@ -1,5 +1,5 @@
1
- import i18next from 'i18next';
2
1
  import { orderedAccountIds } from '@adecore/agent-contracts';
2
+ import i18next from 'i18next';
3
3
  /*
4
4
  * An account wears one of the host's accents, so the app paints from one palette. A color that is none
5
5
  * of them (an older name, or one written by hand) reads as undefined, and the dot takes the accent.
@@ -1,6 +1,6 @@
1
- import i18next from 'i18next';
2
1
  import { attachmentBytes, attachmentImageMime, CHAT_ATTACHMENTS_MAX_BYTES, CHAT_ATTACHMENTS_MAX_COUNT, CHAT_ATTACHMENT_MAX_BYTES } from '@adecore/agent-contracts';
3
2
  import { formatBytes as bytesOf } from '@adecore/ui/format';
3
+ import i18next from 'i18next';
4
4
  export function isImageAttachment(mime) {
5
5
  return mime.startsWith('image/');
6
6
  }
@@ -1,7 +1,7 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { forkIdsAfter, forkedTurnIds } from './logic/fork.js';
3
2
  import { useChatScope } from '../scope.js';
4
3
  import { useChats } from '../state/chats.js';
4
+ import { forkIdsAfter, forkedTurnIds } from './logic/fork.js';
5
5
  /* The chats this client holds of one host, which is where the forks it knows of are. */
6
6
  function* forkInfosOn(statuses, owns) {
7
7
  for (const [key, state] of Object.entries(statuses)) {
@@ -1,5 +1,5 @@
1
- import i18next from 'i18next';
2
1
  import { formatMoment } from '@adecore/ui/format';
2
+ import i18next from 'i18next';
3
3
  /*
4
4
  * What a chat that stopped on a limit says about it, from its info alone, so a header that never holds
5
5
  * the thread says the same as the chat. Null while the last turn stopped on nothing, or a turn runs.
@@ -1,5 +1,5 @@
1
- import { agentTurnLabel } from './timeline.js';
2
1
  import { DEFAULT_READING_WIDTH, readingMeasure } from '../reading-width.js';
2
+ import { agentTurnLabel } from './timeline.js';
3
3
  /* With fewer messages than this the thread is short enough to scroll through, and the strip is noise. */
4
4
  export const SCRUBBER_MIN_TICKS = 3;
5
5
  export const TICK_HEIGHT_PX = 2;
@@ -0,0 +1,6 @@
1
+ import type { ModelInfo, ModelSelection } from '@adecore/agent-contracts';
2
+ export declare function switchesSelection(from: ModelSelection, to: ModelSelection): boolean;
3
+ export declare function selectionSwitchText(from: ModelSelection, to: ModelSelection, models: readonly ModelInfo[] | undefined): {
4
+ from: string;
5
+ to: string;
6
+ } | null;
@@ -0,0 +1,42 @@
1
+ import { modelName, shortModelName } from '../../agents/model-name.js';
2
+ import { EFFORT_OPTION } from './effort.js';
3
+ /* Whether a turn ran on another model or effort than the one before it; other options do not count. */
4
+ export function switchesSelection(from, to) {
5
+ return from.model !== to.model || from.options[EFFORT_OPTION] !== to.options[EFFORT_OPTION];
6
+ }
7
+ /* The effort a selection runs on, in the catalog's words; null for a model without one or one the catalog does not know. */
8
+ function effortLabel(selection, models) {
9
+ const option = models?.find(entry => entry.slug === selection.model)?.options.find(candidate => candidate.id === EFFORT_OPTION);
10
+ if (option === undefined || option.type !== 'select') {
11
+ return null;
12
+ }
13
+ const chosen = selection.options[EFFORT_OPTION];
14
+ const choice = option.choices.find(candidate => candidate.id === chosen) ?? option.choices.find(candidate => candidate.id === option.defaultChoice);
15
+ return choice?.label ?? null;
16
+ }
17
+ /*
18
+ * Both sides of the line between two turns. A side names only what changed: the effort under the same model,
19
+ * the models when the effort stayed, and both otherwise. Null when the two read the same.
20
+ */
21
+ export function selectionSwitchText(from, to, models) {
22
+ const fromEffort = effortLabel(from, models);
23
+ const toEffort = effortLabel(to, models);
24
+ if (from.model === to.model) {
25
+ return fromEffort === null || toEffort === null || fromEffort === toEffort ? null : {
26
+ from: fromEffort,
27
+ to: toEffort
28
+ };
29
+ }
30
+ const fromName = shortModelName(modelName(from.model, models), models);
31
+ const toName = shortModelName(modelName(to.model, models), models);
32
+ if (fromEffort === toEffort) {
33
+ return {
34
+ from: fromName,
35
+ to: toName
36
+ };
37
+ }
38
+ return {
39
+ from: fromEffort === null ? fromName : `${fromName} ${fromEffort}`,
40
+ to: toEffort === null ? toName : `${toName} ${toEffort}`
41
+ };
42
+ }
@@ -1,6 +1,6 @@
1
1
  import type { ChatItem, ChatUiChoiceOrigin } from '@adecore/agent-contracts';
2
- import type { TimelineRow } from './timeline.js';
3
2
  import type { FileRef } from '../../host.js';
3
+ import type { TimelineRow } from './timeline.js';
4
4
  export interface TimelineTarget {
5
5
  selection: string;
6
6
  row: TimelineRow | null;
@@ -1,4 +1,4 @@
1
- import type { ChatApprovalItem, ChatAssistantItem, ChatCheckpointDiff, ChatItem, ChatNoteMessage, ChatQuestionItem, ChatSubagentItem, ChatThinkingItem, ChatToolItem, ChatTurnItem, ChatUserItem, ChatVisual, ChatWorkflow } from '@adecore/agent-contracts';
1
+ import type { ChatApprovalItem, ChatAssistantItem, ChatCheckpointDiff, ChatItem, ChatNoteMessage, ChatQuestionItem, ChatSubagentItem, ChatThinkingItem, ChatToolItem, ChatTurnItem, ChatUserItem, ChatVisual, ChatWorkflow, ModelSelection } from '@adecore/agent-contracts';
2
2
  import type { CommandLook, CommandLookSent, ThreadCard, ToolLook } from '../../host.js';
3
3
  import { type Look } from './command-looks.js';
4
4
  export interface SubagentBranch {
@@ -85,6 +85,11 @@ export type TimelineRow = {
85
85
  kind: 'compaction';
86
86
  id: string;
87
87
  preTokens: number | null;
88
+ } | {
89
+ kind: 'selection-switch';
90
+ id: string;
91
+ from: ModelSelection;
92
+ to: ModelSelection;
88
93
  } | {
89
94
  kind: 'changed-files';
90
95
  id: string;
@@ -1,9 +1,10 @@
1
- import i18next from 'i18next';
2
1
  import { abortedByMachine } from '@adecore/agent-contracts';
3
2
  import { formatElapsedShort } from '@adecore/ui/format';
3
+ import i18next from 'i18next';
4
4
  import { lookKey, lookRunOf, sentMessageOf } from './command-looks.js';
5
5
  import { isImageGeneration } from './generated-image.js';
6
6
  import { handbackReportOf } from './handback.js';
7
+ import { switchesSelection } from './selection-switch.js';
7
8
  import { toolEntry } from './tool-catalog.js';
8
9
  import { hasFileChanges, isFileChange } from './tools.js';
9
10
  const TOOL_KINDS = new Set(['work', 'work-group', 'work-live']);
@@ -16,7 +17,7 @@ function shownRows(rows, options) {
16
17
  * against each other; prose and cards are blocks and need room around them. Where the two meet,
17
18
  * the block gap marks the seam, so an answer never looks glued to the call above it.
18
19
  */
19
- const BLOCK_KINDS = new Set(['assistant', 'report', 'sent', 'thinking', 'changed-files', 'compaction', 'app-card', 'visual']);
20
+ const BLOCK_KINDS = new Set(['assistant', 'report', 'sent', 'thinking', 'changed-files', 'compaction', 'selection-switch', 'app-card', 'visual']);
20
21
  export function isBlock(row) {
21
22
  return BLOCK_KINDS.has(row.kind) || isImageRow(row);
22
23
  }
@@ -567,6 +568,7 @@ function opensUnderItsMessages(turn, rows) {
567
568
  export function deriveTimelineRows(items, options) {
568
569
  const rows = [];
569
570
  const children = groupChildren(items);
571
+ let selection = null;
570
572
  for (const chunk of chunksByTurn(items)) {
571
573
  if (chunk.turnId === null) {
572
574
  rows.push(...shownRows(rowsForItems(chunk.items, options, children), options));
@@ -575,6 +577,18 @@ export function deriveTimelineRows(items, options) {
575
577
  const turnId = chunk.turnId;
576
578
  const turn = chunk.items.find(item => item.kind === 'turn');
577
579
  const conversation = chunk.items.filter(item => item.kind !== 'turn');
580
+ // A turn without a selection (older ones, or one the CLI started on its own) compares the next with the one before it.
581
+ if (turn?.selection !== undefined) {
582
+ if (selection !== null && switchesSelection(selection, turn.selection)) {
583
+ rows.push({
584
+ kind: 'selection-switch',
585
+ id: `switch-${turnId}`,
586
+ from: selection,
587
+ to: turn.selection
588
+ });
589
+ }
590
+ selection = turn.selection;
591
+ }
578
592
  // A turn a message opened needs no line of its own when that message stands right above it.
579
593
  if (turn?.origin === 'agent' && !opensUnderItsMessages(turn, rows)) {
580
594
  // The agent started this one itself, so there is no message of the person to show above it.
@@ -1,4 +1,4 @@
1
- import { isRecord } from './json.js';
1
+ import { isRecord } from '@adecore/utils/record';
2
2
  // A value keeps this many characters of what it says.
3
3
  const FOLD_LENGTH = 40;
4
4
  // An ACP agent titles a call of an MCP tool with the server and the tool, each agent with a separator of its own.
@@ -1,4 +1,4 @@
1
- import { isRecord } from './json.js';
1
+ import { isRecord } from '@adecore/utils/record';
2
2
  import { toolEntry } from './tool-catalog.js';
3
3
  /* The texts a diff draws: a fragment ends where its edit does, not where its file ends, so it gets no "no final newline" mark. */
4
4
  export function diffTexts(change) {
@@ -1,5 +1,5 @@
1
- import i18next from 'i18next';
2
1
  import { formatElapsedShort } from '@adecore/ui/format';
2
+ import i18next from 'i18next';
3
3
  export function workflowAgentState(agent, workflowRunning) {
4
4
  if (agent.status !== 'running') {
5
5
  return agent.status;
@@ -1,5 +1,5 @@
1
- import { chatStorageKey, chatStorageLegacyKeys, createChatStore, onChatStorageConfiguration } from '../storage.js';
2
1
  import { topAccountOf } from '@adecore/agent-contracts';
2
+ import { chatStorageKey, chatStorageLegacyKeys, createChatStore, onChatStorageConfiguration } from '../storage.js';
3
3
  import { persistedJson } from './persisted-json.js';
4
4
  import { DEFAULT_READING_WIDTH, isChatReadingWidth } from './reading-width.js';
5
5
  import { DEFAULT_SEND_KEY, isChatSendKey } from './send-key.js';
@@ -1,5 +1,5 @@
1
- import i18next from 'i18next';
2
1
  import { RuntimeModeSchema } from '@adecore/agent-contracts';
2
+ import i18next from 'i18next';
3
3
  /*
4
4
  * The runtime modes in the order they are offered: the schema's, which the host reads as the rank
5
5
  * from narrowest to widest. Their words are read when a surface draws one, not when this module loads.
@@ -1,5 +1,5 @@
1
- import i18next from 'i18next';
2
1
  import { KEY_SHORTCUTS, shortcut } from '@adecore/ui';
2
+ import i18next from 'i18next';
3
3
  export const CHAT_SEND_KEYS = ['enter', 'mod-enter-multiline', 'mod-enter'];
4
4
  export const DEFAULT_SEND_KEY = 'enter';
5
5
  /* Sends, then opens a new chat through the host's `openNewChat`; a key of the composer, for a menu or a list of keys to print. */
@@ -1,10 +1,10 @@
1
+ import { shortcut } from '@adecore/ui';
2
+ import { isRecord } from '@adecore/utils/record';
1
3
  import { chatStorageKey, chatStorageLegacyKeys, createChatStore } from '../storage.js';
2
4
  import { uploadBytes } from './attachments.js';
3
5
  import { isEmptyDraft } from './drafts.js';
4
- import { isRecord } from './logic/json.js';
5
6
  import { persistedJson } from './persisted-json.js';
6
7
  import { withQuote } from './quote.js';
7
- import { shortcut } from '@adecore/ui';
8
8
  /* Puts the draft away, or takes the last one back on an empty box. */
9
9
  export const STASH_SHORTCUT = shortcut('Mod+S');
10
10
  const storageKey = () => chatStorageKey('stash');
@@ -1,6 +1,6 @@
1
- import i18next from 'i18next';
2
1
  import { activeSubagents } from '@adecore/agent-contracts';
3
2
  import { formatMoment, formatElapsedShort, formatTokens } from '@adecore/ui/format';
3
+ import i18next from 'i18next';
4
4
  export function subagentTitle(item) {
5
5
  return item.description || item.summary || item.subagentType || i18next.t('agent-chat:rows.subagent.label');
6
6
  }
@@ -1,10 +1,10 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
+ import { Pill, Tooltip } from '@adecore/ui';
2
3
  import { useTranslation } from 'react-i18next';
3
4
  import { AccountDot } from '../../agents/AccountDot.js';
4
- import { useAccountChoice } from '../account-choice.js';
5
- import { useChats } from '../../state/chats.js';
6
5
  import { useChatScope } from '../../scope.js';
7
- import { Pill, Tooltip } from '@adecore/ui';
6
+ import { useChats } from '../../state/chats.js';
7
+ import { useAccountChoice } from '../account-choice.js';
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  function AccountPillOf(t0) {
10
10
  const $ = _c(16);
@@ -1,14 +1,14 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useEffect, useRef } from 'react';
2
+ import { CHAT_BOOKMARK_LIMITS } from '@adecore/agent-contracts';
3
+ import { ButtonGroup, Icon, IconButton, Input } from '@adecore/ui';
3
4
  import clsx from 'clsx';
4
- import { useTranslation } from 'react-i18next';
5
5
  import { Bookmark, Pencil, X } from 'lucide-react';
6
- import { CHAT_BOOKMARK_LIMITS } from '@adecore/agent-contracts';
7
- import { nameBookmark, removeBookmark, useBookmarkNaming } from '../bookmarks.js';
8
- import { bookmarkLabel } from '../logic/bookmarks.js';
6
+ import { useEffect, useRef } from 'react';
7
+ import { useTranslation } from 'react-i18next';
9
8
  import { useChatHost } from '../../host.js';
10
9
  import { useChatScope } from '../../scope.js';
11
- import { ButtonGroup, Icon, IconButton, Input } from '@adecore/ui';
10
+ import { nameBookmark, removeBookmark, useBookmarkNaming } from '../bookmarks.js';
11
+ import { bookmarkLabel } from '../logic/bookmarks.js';
12
12
  /*
13
13
  * A bookmark as a chapter line across the thread, drawn before the message it marks. Without a
14
14
  * bookmark it only stands while the name field of a mark still on its way to the host is open.
@@ -1,14 +1,14 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
+ import { Icon, Menu } from '@adecore/ui';
2
3
  import clsx from 'clsx';
3
- import { useTranslation } from 'react-i18next';
4
4
  import { Bookmark, Pencil, X } from 'lucide-react';
5
- import { goToBookmark, removeBookmark } from '../bookmarks.js';
6
- import { bookmarkLabel, bookmarksInThreadOrder } from '../logic/bookmarks.js';
5
+ import { useTranslation } from 'react-i18next';
7
6
  import { useChatHost } from '../../host.js';
7
+ import { useHostChatPlace } from '../../host-hooks.js';
8
8
  import { useChatScope } from '../../scope.js';
9
9
  import { useChatRow } from '../../state/chats.js';
10
- import { Icon, Menu } from '@adecore/ui';
11
- import { useHostChatPlace } from '../../host-hooks.js';
10
+ import { goToBookmark, removeBookmark } from '../bookmarks.js';
11
+ import { bookmarkLabel, bookmarksInThreadOrder } from '../logic/bookmarks.js';
12
12
  /* A chat's bookmarks in thread order, each a jump to its message with rename and remove; nothing without bookmarks. */
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  export function BookmarkSubmenu(t0) {
@@ -1,24 +1,24 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useState } from 'react';
2
+ import { Icon, IconButton, Popover, ScrollArea, Surface, useNow } from '@adecore/ui';
3
+ import { formatElapsedShort } from '@adecore/ui/format';
3
4
  import clsx from 'clsx';
4
- import { useShallow } from 'zustand/shallow';
5
- import { useTranslation } from 'react-i18next';
6
5
  import { Activity, MessageCircleQuestionMark, Square, SquareTerminal, TriangleAlert } from 'lucide-react';
6
+ import { useState } from 'react';
7
+ import { useTranslation } from 'react-i18next';
8
+ import { useShallow } from 'zustand/shallow';
9
+ import { statusLookOf } from '../../agents/status-look.js';
10
+ import { useChatHost } from '../../host.js';
11
+ import { useHostTask, useHostTasks } from '../../host-hooks.js';
12
+ import { useChatScope } from '../../scope.js';
13
+ import { useChatRow, useChats } from '../../state/chats.js';
14
+ import { useChatActions } from '../actions.js';
7
15
  import { backgroundCounts } from '../activity.js';
8
16
  import { badgeCountOf, entryTimeOf, flyoutSubagents, progressOf, statusWordOf, subagentTitle, summaryWordOf, taskIdOf, taskRowStateOf } from '../subagent-list.js';
9
17
  import { useSubagentSupport } from '../subagent-support.js';
10
18
  import { canOpenSubagent, crumbOf, openFromMain, useSubagentTrail } from '../subagent-view.js';
11
19
  import { flyoutWorkflows, workflowPillOf } from '../workflow-list.js';
12
- import { SubagentStopButton } from './SubagentStopButton.js';
13
20
  import { WorkflowRow } from './rows/WorkflowRow.js';
14
- import { formatElapsedShort } from '@adecore/ui/format';
15
- import { Icon, IconButton, Popover, Surface, useNow } from '@adecore/ui';
16
- import { useChatRow, useChats } from '../../state/chats.js';
17
- import { useChatHost } from '../../host.js';
18
- import { useChatScope } from '../../scope.js';
19
- import { useChatActions } from '../actions.js';
20
- import { statusLookOf } from '../../agents/status-look.js';
21
- import { useHostTask, useHostTasks } from '../../host-hooks.js';
21
+ import { SubagentStopButton } from './SubagentStopButton.js';
22
22
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
23
23
  const NO_TASKS = [];
24
24
  const NO_ITEMS = [];
@@ -481,8 +481,9 @@ function WorkflowFlyout(t0) {
481
481
  }
482
482
  let t11;
483
483
  if ($[29] !== t10) {
484
- t11 = /*#__PURE__*/_jsx("div", {
485
- className: "max-h-96 overflow-auto px-2.5 pb-1.5",
484
+ t11 = /*#__PURE__*/_jsx(ScrollArea, {
485
+ className: "max-h-96",
486
+ viewportClassName: "px-2.5 pb-1.5",
486
487
  children: t10
487
488
  });
488
489
  $[29] = t10;
@@ -1,15 +1,15 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { Fragment, memo, useContext, useEffect, useMemo, useRef, useState } from 'react';
2
+ import { ButtonGroup, IconButton, ScrollArea } from '@adecore/ui';
3
3
  import clsx from 'clsx';
4
- import { useTranslation } from 'react-i18next';
5
4
  import { Check, Copy } from 'lucide-react';
6
- import { ButtonGroup, IconButton } from '@adecore/ui';
5
+ import { Fragment, memo, useContext, useEffect, useMemo, useRef, useState } from 'react';
6
+ import { useTranslation } from 'react-i18next';
7
+ import { useChatHost } from '../../host.js';
7
8
  import { IncrementalLines } from './code-lines.js';
8
9
  import { CodeStreamingContext } from './code-streaming.js';
9
- import { WHOLE_FADE_CLASS } from './rehype-fade.js';
10
- import { useChatHost } from '../../host.js';
11
10
  import { useCodeTheme } from './code-theme.js';
12
11
  import { tokenStyle, useCodeHighlighter } from './highlighter.js';
12
+ import { WHOLE_FADE_CLASS } from './rehype-fade.js';
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  const COPIED_MS = 1500;
15
15
  /* A line whose tokens did not change keeps its elements, so a selection in it survives the next delta. */
@@ -106,8 +106,10 @@ export function CodeBlock({
106
106
  return /*#__PURE__*/_jsxs("div", {
107
107
  className: "chat-code",
108
108
  "data-copy-state": copyState,
109
- children: [view ?? /*#__PURE__*/_jsx("pre", {
110
- className: clsx(pending && 'invisible', !pending && tokens !== null && waited && WHOLE_FADE_CLASS),
109
+ children: [view ?? /*#__PURE__*/_jsx(ScrollArea, {
110
+ axis: "both",
111
+ render: /*#__PURE__*/_jsx("pre", {}),
112
+ viewportClassName: clsx(pending && 'invisible', !pending && tokens !== null && waited && WHOLE_FADE_CLASS),
111
113
  "aria-hidden": pending || undefined,
112
114
  style: {
113
115
  color: tokenizer?.fg
@@ -1,11 +1,12 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useEffect, useRef, useState, useSyncExternalStore } from 'react';
3
- import { useTranslation } from 'react-i18next';
4
- import clsx from 'clsx';
5
- import { ChevronDown } from 'lucide-react';
6
2
  import { Icon, PromptDialog, Surface, Tooltip } from '@adecore/ui';
7
3
  import { formatNumber } from '@adecore/ui/format';
4
+ import clsx from 'clsx';
5
+ import { ChevronDown } from 'lucide-react';
6
+ import { useEffect, useRef, useState, useSyncExternalStore } from 'react';
7
+ import { useTranslation } from 'react-i18next';
8
8
  import { useChatHost } from '../../host.js';
9
+ import { useHostComposerSendActions, useHostExtraPrompts, useHostSendDelivery } from '../../host-hooks.js';
9
10
  import { canSteer } from '../../providers/provider-abilities.js';
10
11
  import { useChatScope } from '../../scope.js';
11
12
  import { useProviders } from '../../state/providers.js';
@@ -17,11 +18,6 @@ import { dismissResumeCompaction } from '../resume-compaction-dismissals.js';
17
18
  import { sendShortcut } from '../send-key.js';
18
19
  import { scrollTimelineToEnd, subscribeTimelineEnd, timelineAtEnd } from '../timeline-scroll.js';
19
20
  import { ChatActivity } from './ChatActivity.js';
20
- import { ComposerInput } from './ComposerInput.js';
21
- import { GoalDock } from './GoalDock.js';
22
- import { LimitDock } from './LimitState.js';
23
- import { PromptComposer } from './PromptComposer.js';
24
- import { ResumeCompactionDock } from './ResumeCompactionDock.js';
25
21
  import { chipDecorations } from './composer/chips.js';
26
22
  import { ComposerControls } from './composer/ComposerControls.js';
27
23
  import { ComposerMenu } from './composer/ComposerMenu.js';
@@ -29,21 +25,25 @@ import { DraftAttachments, DraftQuote } from './composer/DraftParts.js';
29
25
  import { composerKeyHandler } from './composer/key-handler.js';
30
26
  import { useHintedPlaceholder } from './composer/placeholder.js';
31
27
  import { QueuedMessages } from './composer/QueuedMessages.js';
28
+ import { surfacePartOf } from './composer/surface.js';
32
29
  import { useChatControls } from './composer/use-chat-controls.js';
33
30
  import { useCompactionOffer } from './composer/use-compaction-offer.js';
34
31
  import { useComposerDraft } from './composer/use-composer-draft.js';
35
32
  import { useComposerMenus } from './composer/use-composer-menus.js';
36
33
  import { useComposerSubmit } from './composer/use-composer-submit.js';
37
- import { useEffortStepper } from './composer/use-effort-stepper.js';
38
- import { LEAVE_DROPS_TO_THE_CARD, useDraftFiles } from './composer/use-draft-files.js';
39
34
  import { useContinuableTurn } from './composer/use-continuable-turn.js';
35
+ import { LEAVE_DROPS_TO_THE_CARD, useDraftFiles } from './composer/use-draft-files.js';
36
+ import { useEffortStepper } from './composer/use-effort-stepper.js';
40
37
  import { useNotice } from './composer/use-notice.js';
41
38
  import { usePendingRequests } from './composer/use-pending-requests.js';
42
39
  import { usePromptHistory } from './composer/use-prompt-history.js';
43
40
  import { usePromptHold } from './composer/use-prompt-hold.js';
44
- import { surfacePartOf } from './composer/surface.js';
45
41
  import { useTakeBack } from './composer/use-take-back.js';
46
- import { useHostComposerSendActions, useHostExtraPrompts, useHostSendDelivery } from '../../host-hooks.js';
42
+ import { ComposerInput } from './ComposerInput.js';
43
+ import { GoalDock } from './GoalDock.js';
44
+ import { LimitDock } from './LimitState.js';
45
+ import { PromptComposer } from './PromptComposer.js';
46
+ import { ResumeCompactionDock } from './ResumeCompactionDock.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) {
@@ -1,6 +1,6 @@
1
- import { type Ref } from 'react';
2
1
  import { EditorState, type Extension } from '@codemirror/state';
3
2
  import { EditorView } from '@codemirror/view';
3
+ import { type Ref } from 'react';
4
4
  export interface ComposerInputHandle {
5
5
  focus(): void;
6
6
  setCaret(pos: number): void;
@@ -1,7 +1,8 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useImperativeHandle, useLayoutEffect, useRef, useState } from 'react';
2
+ import { useOverlayScrollbars } from '@adecore/ui';
3
3
  import { Compartment, EditorState, Prec, Transaction } from '@codemirror/state';
4
4
  import { EditorView, placeholder as placeholderText } from '@codemirror/view';
5
+ import { useImperativeHandle, useLayoutEffect, useRef, useState } from 'react';
5
6
  import { useChatHost } from '../../host.js';
6
7
  import { composerEditorExtensions, externalChange } from './composer/editor.js';
7
8
  import { insertAtSelection } from './composer/insert.js';
@@ -14,7 +15,7 @@ const NO_ARIA = {};
14
15
  * character, which a textarea with a painted layer behind it could not.
15
16
  */
16
17
  export function ComposerInput(t0) {
17
- const $ = _c(45);
18
+ const $ = _c(48);
18
19
  let className;
19
20
  let dictationToolbar;
20
21
  let disabled;
@@ -69,6 +70,8 @@ export function ComposerInput(t0) {
69
70
  const hostRef = useRef(null);
70
71
  const targetRef = useRef(null);
71
72
  const viewRef = useRef(null);
73
+ const [scroller, setScroller] = useState(null);
74
+ const scrollbars = useOverlayScrollbars(scroller);
72
75
  const [compartments] = useState(_temp);
73
76
  let t3;
74
77
  if ($[11] !== handlers || $[12] !== value) {
@@ -156,9 +159,11 @@ export function ComposerInput(t0) {
156
159
  })
157
160
  });
158
161
  viewRef.current = view;
162
+ setScroller(view.scrollDOM);
159
163
  return () => {
160
164
  view.destroy();
161
165
  viewRef.current = null;
166
+ setScroller(null);
162
167
  };
163
168
  };
164
169
  $[17] = compartments;
@@ -286,34 +291,46 @@ export function ComposerInput(t0) {
286
291
  t14 = $[37];
287
292
  }
288
293
  let t15;
289
- if ($[38] !== Dictation || $[39] !== dictationToolbar || $[40] !== disabled) {
290
- t15 = Dictation && /*#__PURE__*/_jsx(Dictation, {
294
+ if ($[38] !== scrollbars || $[39] !== t14) {
295
+ t15 = /*#__PURE__*/_jsxs("div", {
296
+ className: "relative",
297
+ children: [t14, scrollbars]
298
+ });
299
+ $[38] = scrollbars;
300
+ $[39] = t14;
301
+ $[40] = t15;
302
+ } else {
303
+ t15 = $[40];
304
+ }
305
+ let t16;
306
+ if ($[41] !== Dictation || $[42] !== dictationToolbar || $[43] !== disabled) {
307
+ t16 = Dictation && /*#__PURE__*/_jsx(Dictation, {
291
308
  buttonContainer: dictationToolbar,
292
309
  targetRef: targetRef,
293
310
  disabled: disabled,
294
311
  editor: () => viewRef.current
295
312
  });
296
- $[38] = Dictation;
297
- $[39] = dictationToolbar;
298
- $[40] = disabled;
299
- $[41] = t15;
313
+ $[41] = Dictation;
314
+ $[42] = dictationToolbar;
315
+ $[43] = disabled;
316
+ $[44] = t16;
300
317
  } else {
301
- t15 = $[41];
318
+ t16 = $[44];
302
319
  }
303
- let t16;
304
- if ($[42] !== t14 || $[43] !== t15) {
305
- t16 = /*#__PURE__*/_jsxs("div", {
320
+ let t17;
321
+ if ($[45] !== t15 || $[46] !== t16) {
322
+ t17 = /*#__PURE__*/_jsxs("div", {
306
323
  ref: targetRef,
307
324
  className: "min-w-0",
308
- children: [t14, t15]
325
+ children: [t15, t16]
309
326
  });
310
- $[42] = t14;
311
- $[43] = t15;
312
- $[44] = t16;
327
+ $[45] = t15;
328
+ $[46] = t16;
329
+ $[47] = t17;
313
330
  } else {
314
- t16 = $[44];
331
+ t17 = $[47];
315
332
  }
316
- return t16;
333
+ return t17;
317
334
  }
318
335
  function _temp2(tr) {
319
336
  return tr.annotation(externalChange);
@@ -1,6 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useEffect } from 'react';
3
2
  import { useWorkerPool, WorkerPoolContextProvider } from '@pierre/diffs/react';
3
+ import { useEffect } from 'react';
4
4
  import { useDiffTheme } from './diff-theme.js';
5
5
  // Two workers keep highlighting off the main thread without holding a shiki instance per chat node.
6
6
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -1,12 +1,12 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
2
  import { LazyBoundary } from '@adecore/ui';
3
3
  import { useTranslation } from 'react-i18next';
4
+ import { useChatHost } from '../../host.js';
4
5
  import { lazyNamed } from '../../lazy.js';
5
6
  import { diffSourceBudget, legacyDiffBudget } from './diff/diff-source-budget.js';
7
+ import { DiffFallbackBoundary } from './diff/DiffFallbackBoundary.js';
6
8
  import { DiffOmitted } from './diff/DiffOmitted.js';
7
9
  import { DiffUnavailable } from './diff/DiffUnavailable.js';
8
- import { DiffFallbackBoundary } from './diff/DiffFallbackBoundary.js';
9
- import { useChatHost } from '../../host.js';
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
11
  const LegacyEditDiff = lazyNamed(() => import('./diff/LegacyEditDiff.js'), 'default', {
12
12
  prefetch: false
@@ -1,16 +1,16 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useState } from 'react';
3
- import { useTranslation } from 'react-i18next';
4
- import clsx from 'clsx';
5
- import { Target } from 'lucide-react';
6
2
  import { Button, Icon, Pill, Tooltip } from '@adecore/ui';
7
3
  import { formatTokens, useFormatLocale } from '@adecore/ui/format';
4
+ import clsx from 'clsx';
5
+ import { Target } from 'lucide-react';
6
+ import { useState } from 'react';
7
+ import { useTranslation } from 'react-i18next';
8
8
  import { useChatHost } from '../../host.js';
9
9
  import { useChatScope } from '../../scope.js';
10
10
  import { useChats } from '../../state/chats.js';
11
+ import { errorMessage } from '../../transport.js';
11
12
  import { useChatActions } from '../actions.js';
12
13
  import { goalView } from '../logic/goal.js';
13
- import { errorMessage } from '../../transport.js';
14
14
  /* How far the goal got, in what its CLI counts: the checks that sent the agent on, or the tokens it spent. */
15
15
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
16
16
  function progressOf(goal, t) {