@adecore/agents-react 0.53.2 → 0.54.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 (355) 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 +200 -189
  172. package/dist/usage/UsagePane.js +2 -2
  173. package/dist/usage/UsageSummary.js +1 -1
  174. package/dist/usage/UsageTiles.js +1 -1
  175. package/dist/usage/limit-groups.js +2 -2
  176. package/dist/usage/summary.js +1 -1
  177. package/package.json +9 -8
  178. package/src/agents/AgentIcon.tsx +1 -1
  179. package/src/agents/AgentModelLabel.tsx +2 -2
  180. package/src/agents/ProviderLogo.tsx +1 -1
  181. package/src/agents/accounts.ts +1 -1
  182. package/src/agents/option-words.ts +1 -1
  183. package/src/chat/attachments.ts +1 -1
  184. package/src/chat/bookmarks.ts +1 -1
  185. package/src/chat/drafts.ts +1 -1
  186. package/src/chat/forks.ts +1 -1
  187. package/src/chat/logic/fork.ts +1 -1
  188. package/src/chat/logic/limit.ts +1 -1
  189. package/src/chat/logic/scrubber.ts +1 -1
  190. package/src/chat/logic/selection-switch.ts +47 -0
  191. package/src/chat/logic/timeline-copy.ts +1 -1
  192. package/src/chat/logic/timeline-target.ts +1 -1
  193. package/src/chat/logic/timeline.ts +28 -4
  194. package/src/chat/logic/tool-looks.ts +1 -1
  195. package/src/chat/logic/tools.ts +1 -1
  196. package/src/chat/logic/workflow.ts +1 -1
  197. package/src/chat/pending-prompts.ts +1 -1
  198. package/src/chat/preferences.ts +1 -1
  199. package/src/chat/reading-width.ts +1 -1
  200. package/src/chat/runtime-modes.ts +1 -1
  201. package/src/chat/send-key.ts +1 -1
  202. package/src/chat/stash.ts +2 -2
  203. package/src/chat/subagent-conversation.ts +1 -1
  204. package/src/chat/subagent-list.ts +1 -1
  205. package/src/chat/subagent-view.ts +1 -1
  206. package/src/chat/thumbnails.ts +1 -1
  207. package/src/chat/ui/AccountPill.tsx +4 -4
  208. package/src/chat/ui/BookmarkMarker.tsx +6 -6
  209. package/src/chat/ui/BookmarkSubmenu.tsx +5 -5
  210. package/src/chat/ui/ChatActivity.tsx +15 -15
  211. package/src/chat/ui/CodeBlock.tsx +10 -8
  212. package/src/chat/ui/Composer.tsx +13 -13
  213. package/src/chat/ui/ComposerInput.tsx +10 -2
  214. package/src/chat/ui/DiffPool.tsx +1 -1
  215. package/src/chat/ui/EditDiff.tsx +3 -4
  216. package/src/chat/ui/GoalDock.tsx +6 -6
  217. package/src/chat/ui/ImageView.tsx +4 -4
  218. package/src/chat/ui/LimitState.tsx +13 -13
  219. package/src/chat/ui/Markdown.tsx +12 -12
  220. package/src/chat/ui/MermaidBlock.tsx +6 -6
  221. package/src/chat/ui/MessageActions.tsx +7 -7
  222. package/src/chat/ui/ModelMarks.tsx +2 -2
  223. package/src/chat/ui/Pickers.tsx +10 -10
  224. package/src/chat/ui/PromptComposer.tsx +6 -6
  225. package/src/chat/ui/PromptEditor.tsx +4 -4
  226. package/src/chat/ui/QuoteButton.tsx +2 -2
  227. package/src/chat/ui/ReferenceChip.tsx +3 -3
  228. package/src/chat/ui/ReferenceTrail.tsx +2 -2
  229. package/src/chat/ui/ResumeCompactionDock.tsx +3 -3
  230. package/src/chat/ui/RunSettings.tsx +13 -13
  231. package/src/chat/ui/Scrubber.tsx +4 -4
  232. package/src/chat/ui/SessionLine.tsx +2 -2
  233. package/src/chat/ui/ShellCommand.tsx +2 -2
  234. package/src/chat/ui/SubagentControls.tsx +3 -3
  235. package/src/chat/ui/SubagentInfo.tsx +5 -5
  236. package/src/chat/ui/SubagentStopButton.tsx +3 -3
  237. package/src/chat/ui/SubagentTimeline.tsx +20 -17
  238. package/src/chat/ui/Timeline.tsx +232 -143
  239. package/src/chat/ui/TimelineMenu.tsx +7 -7
  240. package/src/chat/ui/UnifiedDiff.tsx +3 -3
  241. package/src/chat/ui/VisualDialogs.tsx +2 -2
  242. package/src/chat/ui/VisualFrame.tsx +4 -4
  243. package/src/chat/ui/WorkflowAgentLine.tsx +4 -4
  244. package/src/chat/ui/chip-clipboard.ts +1 -1
  245. package/src/chat/ui/composer/ComposerControls.tsx +4 -4
  246. package/src/chat/ui/composer/ComposerMenu.tsx +6 -6
  247. package/src/chat/ui/composer/DraftParts.tsx +2 -2
  248. package/src/chat/ui/composer/QueuedMessages.tsx +2 -2
  249. package/src/chat/ui/composer/chip-paste.ts +1 -1
  250. package/src/chat/ui/composer/chips.ts +2 -2
  251. package/src/chat/ui/composer/key-handler.ts +2 -2
  252. package/src/chat/ui/composer/placeholder.ts +1 -1
  253. package/src/chat/ui/composer/use-chat-controls.ts +1 -1
  254. package/src/chat/ui/composer/use-compaction-offer.ts +1 -1
  255. package/src/chat/ui/composer/use-composer-menus.ts +2 -2
  256. package/src/chat/ui/composer/use-composer-submit.ts +2 -2
  257. package/src/chat/ui/composer/use-draft-files.ts +3 -3
  258. package/src/chat/ui/composer/use-effort-stepper.ts +2 -2
  259. package/src/chat/ui/composer/use-pending-requests.ts +1 -1
  260. package/src/chat/ui/composer/use-prompt-menus.ts +3 -3
  261. package/src/chat/ui/composer/use-take-back.ts +1 -1
  262. package/src/chat/ui/diff/ApprovalReview.tsx +3 -3
  263. package/src/chat/ui/diff/DiffOmitted.tsx +1 -1
  264. package/src/chat/ui/diff/DiffStack.tsx +2 -2
  265. package/src/chat/ui/diff/EditorEditDiff.tsx +5 -5
  266. package/src/chat/ui/diff/EditorPatchDiff.tsx +1 -1
  267. package/src/chat/ui/diff/LegacyDiffPool.tsx +1 -1
  268. package/src/chat/ui/diff/LegacyEditDiff.tsx +18 -9
  269. package/src/chat/ui/diff/LegacyUnifiedDiff.tsx +24 -13
  270. package/src/chat/ui/diff/RawDiff.tsx +8 -5
  271. package/src/chat/ui/diff/syntax-runtime.ts +1 -1
  272. package/src/chat/ui/highlighter.ts +1 -1
  273. package/src/chat/ui/icons.tsx +2 -2
  274. package/src/chat/ui/intelligent-ui/UiBlockFrame.tsx +5 -5
  275. package/src/chat/ui/intelligent-ui/UiFallbackPart.tsx +2 -2
  276. package/src/chat/ui/intelligent-ui/UiReply.tsx +18 -18
  277. package/src/chat/ui/intelligent-ui/node-text.ts +1 -1
  278. package/src/chat/ui/intelligent-ui/render-context.ts +1 -1
  279. package/src/chat/ui/intelligent-ui/renderers/chart.tsx +15 -7
  280. package/src/chat/ui/intelligent-ui/renderers/choices.tsx +4 -4
  281. package/src/chat/ui/intelligent-ui/renderers/content.tsx +7 -7
  282. package/src/chat/ui/intelligent-ui/renderers/data.tsx +8 -7
  283. package/src/chat/ui/intelligent-ui/renderers/inputs.tsx +3 -3
  284. package/src/chat/ui/intelligent-ui/renderers/links.tsx +4 -4
  285. package/src/chat/ui/intelligent-ui/renderers/map-view.tsx +4 -4
  286. package/src/chat/ui/intelligent-ui/renderers/map.tsx +5 -5
  287. package/src/chat/ui/intelligent-ui/renderers/structure.tsx +3 -3
  288. package/src/chat/ui/intelligent-ui/renderers/text.tsx +5 -5
  289. package/src/chat/ui/intelligent-ui/tones.ts +1 -1
  290. package/src/chat/ui/intelligent-ui/use-ui-links.ts +2 -2
  291. package/src/chat/ui/intelligent-ui/use-ui-queries.ts +1 -1
  292. package/src/chat/ui/reference-icons.ts +2 -2
  293. package/src/chat/ui/reply-context.ts +1 -1
  294. package/src/chat/ui/rows/ForksRow.tsx +3 -3
  295. package/src/chat/ui/rows/GeneratedImageRow.tsx +7 -7
  296. package/src/chat/ui/rows/MessageRows.tsx +57 -33
  297. package/src/chat/ui/rows/RowContainer.tsx +1 -1
  298. package/src/chat/ui/rows/Rows.tsx +7 -4
  299. package/src/chat/ui/rows/SubagentRow.tsx +16 -16
  300. package/src/chat/ui/rows/TaskRow.tsx +4 -4
  301. package/src/chat/ui/rows/VisualRow.tsx +2 -2
  302. package/src/chat/ui/rows/WorkRows.tsx +44 -32
  303. package/src/chat/ui/rows/WorkflowRow.tsx +9 -9
  304. package/src/chat/ui/rows/row-rhythm.ts +1 -1
  305. package/src/chat/ui/use-diff-source-tokens.ts +1 -1
  306. package/src/chat/ui/visual-theme.ts +2 -2
  307. package/src/chat/workflow-list.ts +1 -1
  308. package/src/host.ts +6 -6
  309. package/src/lazy.tsx +1 -1
  310. package/src/locales/en/agent-chat.ts +4 -0
  311. package/src/locales/nl/agent-chat.ts +4 -0
  312. package/src/port-transport.ts +1 -1
  313. package/src/prompts/logic/subjects.ts +1 -1
  314. package/src/prompts/ui/ApprovalBody.tsx +19 -9
  315. package/src/prompts/ui/PromptActions.tsx +2 -2
  316. package/src/prompts/ui/PromptCard.tsx +4 -4
  317. package/src/prompts/ui/PromptView.tsx +1 -1
  318. package/src/prompts/ui/QuestionBody.tsx +5 -5
  319. package/src/providers/AccountDetail.tsx +5 -5
  320. package/src/providers/AccountOrderList.tsx +2 -2
  321. package/src/providers/AccountVariables.tsx +4 -4
  322. package/src/providers/AddAccountForm.tsx +7 -7
  323. package/src/providers/CliDetail.tsx +9 -9
  324. package/src/providers/InstallPage.tsx +4 -4
  325. package/src/providers/ProviderList.tsx +4 -4
  326. package/src/providers/ProvidersPane.tsx +7 -7
  327. package/src/providers/account-actions.ts +1 -1
  328. package/src/providers/install-steps.ts +1 -1
  329. package/src/providers/parts.tsx +1 -1
  330. package/src/providers/provider-abilities.ts +1 -1
  331. package/src/providers/provider-groups.ts +1 -1
  332. package/src/providers/variables.ts +1 -1
  333. package/src/settings/sections.ts +2 -2
  334. package/src/state/chats.ts +2 -2
  335. package/src/state/provider-accounts.ts +1 -1
  336. package/src/state/providers.ts +1 -1
  337. package/src/state/usage.ts +2 -2
  338. package/src/theme.css +4 -4
  339. package/src/transport.ts +1 -1
  340. package/src/usage/LimitsList.tsx +5 -5
  341. package/src/usage/UsageBreakdown.tsx +6 -6
  342. package/src/usage/UsageChart.tsx +2 -2
  343. package/src/usage/UsageDialog.tsx +2 -2
  344. package/src/usage/UsageLimits.tsx +7 -7
  345. package/src/usage/UsageLimitsCard.tsx +2 -2
  346. package/src/usage/UsagePage.tsx +5 -5
  347. package/src/usage/UsagePane.tsx +2 -2
  348. package/src/usage/UsageSummary.tsx +2 -2
  349. package/src/usage/UsageTiles.tsx +1 -1
  350. package/src/usage/limit-groups.ts +2 -2
  351. package/src/usage/limits.ts +1 -1
  352. package/src/usage/summary.ts +1 -1
  353. package/dist/chat/logic/json.d.ts +0 -1
  354. package/dist/chat/logic/json.js +0 -4
  355. package/src/chat/logic/json.ts +0 -4
@@ -1,8 +1,8 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
+ import { FileIcon, Icon, Tooltip } from '@adecore/ui';
2
3
  import clsx from 'clsx';
3
- import { useTranslation } from 'react-i18next';
4
4
  import { FileDiff, GitCommitHorizontal, SquareDashed } from 'lucide-react';
5
- import { FileIcon, Icon, Tooltip } from '@adecore/ui';
5
+ import { useTranslation } from 'react-i18next';
6
6
  import { CHIP_IN_MESSAGE } from '../../chips.js';
7
7
  import { uiReasonText } from '../node-text.js';
8
8
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
@@ -1,13 +1,13 @@
1
1
  import 'maplibre-gl/dist/maplibre-gl.css';
2
- import { useEffect, useRef, useState } from 'react';
3
- import { Map as MapLibreMap, Marker, setWorkerUrl } from 'maplibre-gl';
2
+ import { ButtonGroup, IconButton } from '@adecore/ui';
4
3
  import { Maximize, Minus, Plus } from 'lucide-react';
4
+ import { Map as MapLibreMap, Marker, setWorkerUrl } from 'maplibre-gl';
5
+ import { useEffect, useRef, useState } from 'react';
5
6
  import { useTranslation } from 'react-i18next';
6
- import { ButtonGroup, IconButton } from '@adecore/ui';
7
7
  import { useChatHost } from '../../../../host.js';
8
+ import { useHostCodeMode } from '../../../../host-hooks.js';
8
9
  import { watchTheme } from '../../theme-watch.js';
9
10
  import { baseMapStyle, boundsOf, localizedTextField, mapFitOptions, spreadOverlaps } from './map-style.js';
10
- import { useHostCodeMode } from '../../../../host-hooks.js';
11
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
12
  const MARKER = 'flex size-5 items-center justify-center rounded-full bg-map-marker text-xs text-map-marker-text tabular-nums shadow-raised';
13
13
  const PICKED = 'z-1 bg-accent text-accent-text outline-2 outline-surface';
@@ -1,18 +1,18 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useId, useState } from 'react';
2
+ import { Button, LazyBoundary, Spinner } from '@adecore/ui';
3
3
  import clsx from 'clsx';
4
+ import { useId, useState } from 'react';
4
5
  import { useTranslation } from 'react-i18next';
5
- import { Button, LazyBoundary, Spinner } from '@adecore/ui';
6
6
  import { useChatHost } from '../../../../host.js';
7
7
  import { useHostMapSource } from '../../../../host-hooks.js';
8
8
  import { lazyNamed } from '../../../../lazy.js';
9
9
  import { DiffFallbackBoundary } from '../../diff/DiffFallbackBoundary.js';
10
10
  import { uiChildrenOf, uiNodeLabel } from '../node-text.js';
11
- import { placePoint } from './place-point.js';
12
11
  import { useInView } from '../use-in-view.js';
13
12
  import { useLater } from '../use-later.js';
14
13
  import { bindingOf, PENDING } from './binding.js';
15
14
  import { useMapSlot } from './map-slots.js';
15
+ import { placePoint } from './place-point.js';
16
16
  // MapLibre and its stylesheet load with the first map that is drawn, never with the chat.
17
17
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
18
18
  const MapView = lazyNamed(() => import('./map-view.js'), 'MapView');
@@ -1,8 +1,8 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { createContext, useContext, useId } from 'react';
2
+ import { Icon, Tabs } from '@adecore/ui';
3
3
  import clsx from 'clsx';
4
4
  import { ChevronRight } from 'lucide-react';
5
- import { Icon, Tabs } from '@adecore/ui';
5
+ import { createContext, useContext, useId } from 'react';
6
6
  import { useBlockLocal } from '../block-local.js';
7
7
  import { uiChildrenOf } from '../node-text.js';
8
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -1,13 +1,13 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useContext } from 'react';
3
- import clsx from 'clsx';
4
- import { useTranslation } from 'react-i18next';
5
- import { Circle, CircleCheck, CircleDot, CircleMinus, CircleX } from 'lucide-react';
6
2
  import { parseUiEventTime } from '@adecore/intelligent-ui';
7
3
  import { Icon, Meter, Pill, Spinner } from '@adecore/ui';
8
4
  import { formatNumber, formatPercent } from '@adecore/ui/format';
9
- import { UiHeadContext } from '../render-context.js';
5
+ import clsx from 'clsx';
6
+ import { Circle, CircleCheck, CircleDot, CircleMinus, CircleX } from 'lucide-react';
7
+ import { useContext } from 'react';
8
+ import { useTranslation } from 'react-i18next';
10
9
  import { uiEventTime, uiNodeLabel } from '../node-text.js';
10
+ import { UiHeadContext } from '../render-context.js';
11
11
  import { UI_STEP_PILL, UI_TONE_FILL, UI_TONE_ICONS, UI_TONE_PILL, UI_TONE_SURFACE, UI_TONE_TEXT } from '../tones.js';
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  const STEP_ICONS = {
@@ -1,6 +1,6 @@
1
- import { type LucideIcon } from 'lucide-react';
2
1
  import type { UiTone } from '@adecore/intelligent-ui';
3
2
  import type { PillProps } from '@adecore/ui';
3
+ import { type LucideIcon } from 'lucide-react';
4
4
  export declare const UI_TONE_ICONS: Readonly<Record<UiTone, LucideIcon>>;
5
5
  export declare const UI_TONE_TEXT: Readonly<Record<UiTone, string>>;
6
6
  export declare const UI_TONE_SURFACE: Readonly<Record<UiTone, string>>;
@@ -1,6 +1,6 @@
1
1
  import type { ChatUiLinkReading, ChatUiQueryState } from '@adecore/agent-contracts';
2
- import { type UiLinkTarget } from '@adecore/intelligent-ui/links';
3
2
  import { type UiBlock, UiState } from '@adecore/intelligent-ui';
3
+ import { type UiLinkTarget } from '@adecore/intelligent-ui/links';
4
4
  import type { UiRenderContext } from './render-context.js';
5
5
  export declare function useUiLinks(block: UiBlock, state: UiState, context: Pick<UiRenderContext, 'scopeId' | 'chatId' | 'itemId' | 'phase'>, reads: Readonly<Record<string, string>>, frozen?: ChatUiQueryState['blocks'][string]): {
6
6
  link: ((target: UiLinkTarget) => ChatUiLinkReading) | undefined;
@@ -1,7 +1,7 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useEffect, useRef, useState } from 'react';
3
- import { uiLinkTargets } from '@adecore/intelligent-ui/links';
4
2
  import { uiInputValues, UI_HOST_LIMITS, UiState } from '@adecore/intelligent-ui';
3
+ import { uiLinkTargets } from '@adecore/intelligent-ui/links';
4
+ import { useEffect, useRef, useState } from 'react';
5
5
  import { useChatHost } from '../../../host.js';
6
6
  // Inputs that change in a run, such as a dragged slider, check their links once the run rested.
7
7
  const LINK_SETTLE_MS = 300;
@@ -1,5 +1,5 @@
1
- import { useEffect, useMemo, useRef, useState } from 'react';
2
1
  import { uiInputValues, UI_CATALOG_VERSION, UI_HOST_LIMITS, UiState } from '@adecore/intelligent-ui';
2
+ import { useEffect, useMemo, useRef, useState } from 'react';
3
3
  import { useChatHost } from '../../../host.js';
4
4
  const NO_READINGS = {};
5
5
  // A changed input reads once it has rested this long, so dragging a slider reads its last value only.
@@ -1,5 +1,5 @@
1
- import { type ComponentType, type ReactNode } from 'react';
2
1
  import { type LucideIcon } from 'lucide-react';
2
+ import { type ComponentType, type ReactNode } from 'react';
3
3
  import type { ReferenceIconProps } from '../../host.js';
4
4
  import type { ReferableKind } from '../chat-references.js';
5
5
  export declare const REFERENCE_ICONS: Record<ReferableKind, LucideIcon>;
@@ -1,6 +1,6 @@
1
- import { createElement } from 'react';
2
- import { Database, FileText, Folder, Frame, Globe, MessageSquare, PenTool, Smartphone, StickyNote, SwatchBook, Terminal, Type, Workflow } from 'lucide-react';
3
1
  import { Icon } from '@adecore/ui';
2
+ import { Database, FileText, Folder, Frame, Globe, MessageSquare, PenTool, Smartphone, StickyNote, SwatchBook, Terminal, Type, Workflow } from 'lucide-react';
3
+ import { createElement } from 'react';
4
4
  /* The mark of what a `#` points at, in the picker and on its chip, when the host draws none of its own. */
5
5
  export const REFERENCE_ICONS = {
6
6
  project: Folder,
@@ -1,5 +1,5 @@
1
- import type { UiReplyTarget } from '../logic/timeline-target.js';
2
1
  import type { ChatInfo } from '@adecore/agent-contracts';
2
+ import type { UiReplyTarget } from '../logic/timeline-target.js';
3
3
  export declare const ReplyContext: import("react").Context<{
4
4
  provider: ChatInfo['provider'];
5
5
  chatId?: string;
@@ -1,10 +1,10 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useTranslation } from 'react-i18next';
2
+ import { Icon, Menu } from '@adecore/ui';
3
3
  import { ChevronRight, GitFork } from 'lucide-react';
4
+ import { useTranslation } from 'react-i18next';
5
+ import { useHostChatPlace } from '../../../host-hooks.js';
4
6
  import { useForkIdsAfter } from '../../forks.js';
5
7
  import { ROW_GUTTER } from '../icons.js';
6
- import { Icon, Menu } from '@adecore/ui';
7
- import { useHostChatPlace } from '../../../host-hooks.js';
8
8
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
9
9
  const LINE = '-mx-1 mb-0.5 flex h-7 items-center gap-2 rounded-md px-1 text-xs text-text-muted';
10
10
  const LINK = `${LINE} hover:bg-surface-hover hover:text-text data-[popup-open]:bg-surface-hover data-[popup-open]:text-text`;
@@ -1,10 +1,11 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useEffect, useState } from 'react';
2
+ import { Button, ButtonGroup, copyText, ErrorBoundary, FileIcon, Icon, IconButton, Menu, Surface } from '@adecore/ui';
3
3
  import clsx from 'clsx';
4
- import { Trans, useTranslation } from 'react-i18next';
5
4
  import { Check, Copy, Ellipsis, ExternalLink, FolderDown, ImageIcon, Maximize2 } from 'lucide-react';
6
- import { Button, ButtonGroup, copyText, ErrorBoundary, FileIcon, Icon, IconButton, Menu, Surface } from '@adecore/ui';
5
+ import { useEffect, useState } from 'react';
6
+ import { Trans, useTranslation } from 'react-i18next';
7
7
  import { useChatHost } from '../../../host.js';
8
+ import { useHostAttachmentUrl } from '../../../host-hooks.js';
8
9
  import { useChatScope } from '../../../scope.js';
9
10
  import { useCurrentItem } from '../../../state/chats.js';
10
11
  import { formatBytes } from '../../attachments.js';
@@ -13,10 +14,9 @@ import { toolStartedAt } from '../../logic/tools.js';
13
14
  import { CHIP_IN_MESSAGE, MENTION_TONE } from '../chips.js';
14
15
  import { useFileLinkCwd, useOpenFileLink } from '../file-links.js';
15
16
  import { HostMenuItems } from '../HostMenuItems.js';
16
- import { ImageThumb } from '../ImageView.js';
17
17
  import { ROW_GUTTER } from '../icons.js';
18
+ import { ImageThumb } from '../ImageView.js';
18
19
  import { RunningFor, WorkRow } from './WorkRows.js';
19
- import { useHostAttachmentUrl } from '../../../host-hooks.js';
20
20
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
21
21
  const SAVED_FLASH_MS = 2000;
22
22
  // Where each image went, so a row the thread unmounts while scrolling still says so when it comes back.
@@ -1,4 +1,4 @@
1
- import type { ChatApprovalItem, ChatAssistantItem, ChatNoteMessage, ChatQuestionItem, ChatThinkingItem, ChatToolItem, ChatUserItem } from '@adecore/agent-contracts';
1
+ import type { ChatApprovalItem, ChatAssistantItem, ChatNoteMessage, ChatQuestionItem, ChatThinkingItem, ChatToolItem, ChatUserItem, ModelSelection } from '@adecore/agent-contracts';
2
2
  import { type CommandLookSent } from '../../../host.js';
3
3
  export declare function UserRow({ chatId, item }: {
4
4
  chatId: string;
@@ -49,6 +49,11 @@ export declare function AgentTurnRow({ label, onOpen }: {
49
49
  export declare function CompactionRow({ preTokens }: {
50
50
  preTokens: number | null;
51
51
  }): import("react").JSX.Element;
52
+ export declare function SelectionSwitchRow({ chatId, from, to }: {
53
+ chatId: string;
54
+ from: ModelSelection;
55
+ to: ModelSelection;
56
+ }): import("react").JSX.Element | null;
52
57
  export declare function ApprovalHistoryRow({ item }: {
53
58
  item: ChatApprovalItem;
54
59
  }): import("react").JSX.Element | null;
@@ -1,37 +1,38 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useContext, useState } from 'react';
2
+ import { WAITING_NOTE_PREFIX } from '@adecore/agent-contracts';
3
+ import { Icon, IconButton, MiddleTruncate, Tooltip, useTickingText } from '@adecore/ui';
4
+ import { formatAgo, formatElapsedShort, formatMoment, formatTokens } from '@adecore/ui/format';
3
5
  import clsx from 'clsx';
4
- import { useTranslation } from 'react-i18next';
5
6
  import { Bot, Brain, Check, ChevronDown, CircleAlert, File, Info, MessageCircleQuestionMark, Reply, Send, SquareTerminal, TriangleAlert, X } from 'lucide-react';
6
- import { WAITING_NOTE_PREFIX } from '@adecore/agent-contracts';
7
- import { fileBadge, formatBytes, isImageAttachment } from '../../attachments.js';
8
- import { useChatRow, useCurrentItem } from '../../../state/chats.js';
7
+ import { useContext, useState } from 'react';
8
+ import { useTranslation } from 'react-i18next';
9
+ import { useChatHost } from '../../../host.js';
10
+ import { useHostAttachmentUrl, useHostChatPlace, useHostReplyAuthor, useHostStreaming } from '../../../host-hooks.js';
9
11
  import { useChatScope } from '../../../scope.js';
10
- import { splitQuote } from '../../quote.js';
11
- import { jumpToTimelineItem } from '../../timeline-scroll.js';
12
+ import { useChatRow, useCurrentItem } from '../../../state/chats.js';
12
13
  import { useProviders } from '../../../state/providers.js';
14
+ import { fileBadge, formatBytes, isImageAttachment } from '../../attachments.js';
13
15
  import { referenceTokens } from '../../chat-references.js';
16
+ import { selectionSwitchText } from '../../logic/selection-switch.js';
17
+ import { thoughtLine, thoughtPreview } from '../../logic/thought.js';
18
+ import { toolStartedAt, toolSummary, toolSummaryIsPath } from '../../logic/tools.js';
14
19
  import { presentReferences } from '../../mentions.js';
15
- import { ReferenceChip } from '../ReferenceChip.js';
16
- import { ReferenceLookupContext } from '../reference-lookup.js';
20
+ import { splitQuote } from '../../quote.js';
21
+ import { jumpToTimelineItem } from '../../timeline-scroll.js';
22
+ import { copySelectionWithChips } from '../chip-clipboard.js';
23
+ import { REFERENCE_TONE, TOKEN_IN_MESSAGE } from '../chips.js';
24
+ import { FadingWords } from '../FadingWords.js';
25
+ import { useOpenForFind } from '../find-reveal.js';
26
+ import { ROW_GUTTER } from '../icons.js';
17
27
  import { ImageGroup, ImageThumb } from '../ImageView.js';
28
+ import { UiReply } from '../intelligent-ui/UiReply.js';
18
29
  import { Markdown, MessageMarkdown, ReplyMarkdown } from '../Markdown.js';
19
- import { FadingWords } from '../FadingWords.js';
20
30
  import { settledBlocksText } from '../markdown-blocks.js';
31
+ import { ReferenceLookupContext } from '../reference-lookup.js';
32
+ import { ReferenceChip } from '../ReferenceChip.js';
21
33
  import { WHOLE_FADE_CLASS } from '../rehype-fade.js';
22
- import { useRevealedText } from '../reveal.js';
23
- import { formatAgo, formatElapsedShort, formatMoment, formatTokens } from '@adecore/ui/format';
24
- import { Icon, IconButton, MiddleTruncate, Tooltip, useTickingText } from '@adecore/ui';
25
- import { thoughtLine, thoughtPreview } from '../../logic/thought.js';
26
- import { toolStartedAt, toolSummary, toolSummaryIsPath } from '../../logic/tools.js';
27
- import { ROW_GUTTER } from '../icons.js';
28
- import { useOpenForFind } from '../find-reveal.js';
29
34
  import { ReplyContext, UiReplyNavigationContext } from '../reply-context.js';
30
- import { UiReply } from '../intelligent-ui/UiReply.js';
31
- import { useChatHost } from '../../../host.js';
32
- import { useHostAttachmentUrl, useHostChatPlace, useHostReplyAuthor, useHostStreaming } from '../../../host-hooks.js';
33
- import { REFERENCE_TONE, TOKEN_IN_MESSAGE } from '../chips.js';
34
- import { copySelectionWithChips } from '../chip-clipboard.js';
35
+ import { useRevealedText } from '../reveal.js';
35
36
  import { useReferenceLookup } from '../thread-references.js';
36
37
  import { RunningFor, ToolBody } from './WorkRows.js';
37
38
  // A long prompt folds so the answer stays in view; the reader can open it.
@@ -2250,6 +2251,134 @@ export function CompactionRow(t0) {
2250
2251
  }
2251
2252
  return t7;
2252
2253
  }
2254
+ /* A solid line where the model or effort changed, so a reader can tell which answers came from which. */
2255
+ export function SelectionSwitchRow(t0) {
2256
+ const $ = _c(26);
2257
+ const {
2258
+ chatId,
2259
+ from,
2260
+ to
2261
+ } = t0;
2262
+ const {
2263
+ t
2264
+ } = useTranslation("agent-chat");
2265
+ const provider = useChatRow(chatId, _temp0);
2266
+ let t1;
2267
+ if ($[0] !== provider) {
2268
+ t1 = s => s.providers.find(entry => entry.kind === provider)?.models;
2269
+ $[0] = provider;
2270
+ $[1] = t1;
2271
+ } else {
2272
+ t1 = $[1];
2273
+ }
2274
+ const models = useProviders(t1);
2275
+ let T0;
2276
+ let t2;
2277
+ let t3;
2278
+ let t4;
2279
+ let t5;
2280
+ let t6;
2281
+ if ($[2] !== from || $[3] !== models || $[4] !== t || $[5] !== to) {
2282
+ t6 = Symbol.for("react.early_return_sentinel");
2283
+ bb0: {
2284
+ const text = selectionSwitchText(from, to, models);
2285
+ if (text === null) {
2286
+ t6 = null;
2287
+ break bb0;
2288
+ }
2289
+ t4 = "flex items-center gap-3 pb-3 text-xs text-text-faint";
2290
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
2291
+ t5 = /*#__PURE__*/_jsx("span", {
2292
+ className: "grow border-t border-border"
2293
+ });
2294
+ $[12] = t5;
2295
+ } else {
2296
+ t5 = $[12];
2297
+ }
2298
+ T0 = Tooltip;
2299
+ if ($[13] !== t) {
2300
+ t3 = t("rows.selectionSwitch.summary");
2301
+ $[13] = t;
2302
+ $[14] = t3;
2303
+ } else {
2304
+ t3 = $[14];
2305
+ }
2306
+ t2 = t("rows.selectionSwitch.label", {
2307
+ from: text.from,
2308
+ to: text.to
2309
+ });
2310
+ }
2311
+ $[2] = from;
2312
+ $[3] = models;
2313
+ $[4] = t;
2314
+ $[5] = to;
2315
+ $[6] = T0;
2316
+ $[7] = t2;
2317
+ $[8] = t3;
2318
+ $[9] = t4;
2319
+ $[10] = t5;
2320
+ $[11] = t6;
2321
+ } else {
2322
+ T0 = $[6];
2323
+ t2 = $[7];
2324
+ t3 = $[8];
2325
+ t4 = $[9];
2326
+ t5 = $[10];
2327
+ t6 = $[11];
2328
+ }
2329
+ if (t6 !== Symbol.for("react.early_return_sentinel")) {
2330
+ return t6;
2331
+ }
2332
+ let t7;
2333
+ if ($[15] !== t2) {
2334
+ t7 = /*#__PURE__*/_jsx("span", {
2335
+ children: t2
2336
+ });
2337
+ $[15] = t2;
2338
+ $[16] = t7;
2339
+ } else {
2340
+ t7 = $[16];
2341
+ }
2342
+ let t8;
2343
+ if ($[17] !== T0 || $[18] !== t3 || $[19] !== t7) {
2344
+ t8 = /*#__PURE__*/_jsx(T0, {
2345
+ label: t3,
2346
+ children: t7
2347
+ });
2348
+ $[17] = T0;
2349
+ $[18] = t3;
2350
+ $[19] = t7;
2351
+ $[20] = t8;
2352
+ } else {
2353
+ t8 = $[20];
2354
+ }
2355
+ let t9;
2356
+ if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
2357
+ t9 = /*#__PURE__*/_jsx("span", {
2358
+ className: "grow border-t border-border"
2359
+ });
2360
+ $[21] = t9;
2361
+ } else {
2362
+ t9 = $[21];
2363
+ }
2364
+ let t10;
2365
+ if ($[22] !== t4 || $[23] !== t5 || $[24] !== t8) {
2366
+ t10 = /*#__PURE__*/_jsxs("div", {
2367
+ className: t4,
2368
+ children: [t5, t8, t9]
2369
+ });
2370
+ $[22] = t4;
2371
+ $[23] = t5;
2372
+ $[24] = t8;
2373
+ $[25] = t10;
2374
+ } else {
2375
+ t10 = $[25];
2376
+ }
2377
+ return t10;
2378
+ }
2379
+ function _temp0(row) {
2380
+ return row?.info.provider;
2381
+ }
2253
2382
  const DECISION_ICON = {
2254
2383
  allow: /*#__PURE__*/_jsx(Icon, {
2255
2384
  icon: Check,
@@ -1,10 +1,10 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useTranslation } from 'react-i18next';
3
2
  import { ErrorBoundary } from '@adecore/ui';
4
- import { AgentTurnRow, ApprovalHistoryRow, AssistantRow, CompactionRow, LiveThoughtRow, NoteRow, QuestionHistoryRow, ReportRow, SentByAgentRow, SentMessageRow, ThinkingRow, UserRow } from './MessageRows.js';
3
+ import { useTranslation } from 'react-i18next';
5
4
  import { isImageGeneration } from '../../logic/generated-image.js';
6
5
  import { ForksRow } from './ForksRow.js';
7
6
  import { GeneratedImageRow } from './GeneratedImageRow.js';
7
+ import { AgentTurnRow, ApprovalHistoryRow, AssistantRow, CompactionRow, LiveThoughtRow, NoteRow, QuestionHistoryRow, ReportRow, SelectionSwitchRow, SentByAgentRow, SentMessageRow, ThinkingRow, UserRow } from './MessageRows.js';
8
8
  import { SubagentBranchRow } from './SubagentRow.js';
9
9
  import { VisualRow } from './VisualRow.js';
10
10
  import { WorkflowRow } from './WorkflowRow.js';
@@ -70,7 +70,7 @@ function AppCardRow(t0) {
70
70
  }
71
71
  /* One row of a thread, the chat's own or a subagent's read back, drawn the same way in both. */
72
72
  export function Row(t0) {
73
- const $ = _c(98);
73
+ const $ = _c(102);
74
74
  const {
75
75
  row,
76
76
  chatId,
@@ -474,59 +474,77 @@ export function Row(t0) {
474
474
  }
475
475
  return t1;
476
476
  }
477
+ case "selection-switch":
478
+ {
479
+ let t1;
480
+ if ($[88] !== chatId || $[89] !== row.from || $[90] !== row.to) {
481
+ t1 = /*#__PURE__*/_jsx(SelectionSwitchRow, {
482
+ chatId: chatId,
483
+ from: row.from,
484
+ to: row.to
485
+ });
486
+ $[88] = chatId;
487
+ $[89] = row.from;
488
+ $[90] = row.to;
489
+ $[91] = t1;
490
+ } else {
491
+ t1 = $[91];
492
+ }
493
+ return t1;
494
+ }
477
495
  case "working":
478
496
  {
479
497
  let t1;
480
- if ($[88] !== row.tool) {
498
+ if ($[92] !== row.tool) {
481
499
  t1 = row.tool === undefined ? {} : {
482
500
  tool: row.tool
483
501
  };
484
- $[88] = row.tool;
485
- $[89] = t1;
502
+ $[92] = row.tool;
503
+ $[93] = t1;
486
504
  } else {
487
- t1 = $[89];
505
+ t1 = $[93];
488
506
  }
489
507
  let t2;
490
- if ($[90] !== row.startedAt || $[91] !== t1) {
508
+ if ($[94] !== row.startedAt || $[95] !== t1) {
491
509
  t2 = /*#__PURE__*/_jsx(WorkingRow, {
492
510
  startedAt: row.startedAt,
493
511
  ...t1
494
512
  });
495
- $[90] = row.startedAt;
496
- $[91] = t1;
497
- $[92] = t2;
513
+ $[94] = row.startedAt;
514
+ $[95] = t1;
515
+ $[96] = t2;
498
516
  } else {
499
- t2 = $[92];
517
+ t2 = $[96];
500
518
  }
501
519
  return t2;
502
520
  }
503
521
  case "app-card":
504
522
  {
505
523
  let t1;
506
- if ($[93] !== row.card) {
524
+ if ($[97] !== row.card) {
507
525
  t1 = /*#__PURE__*/_jsx(AppCardRow, {
508
526
  card: row.card
509
527
  });
510
- $[93] = row.card;
511
- $[94] = t1;
528
+ $[97] = row.card;
529
+ $[98] = t1;
512
530
  } else {
513
- t1 = $[94];
531
+ t1 = $[98];
514
532
  }
515
533
  return t1;
516
534
  }
517
535
  case "visual":
518
536
  {
519
537
  let t1;
520
- if ($[95] !== chatId || $[96] !== row.visual) {
538
+ if ($[99] !== chatId || $[100] !== row.visual) {
521
539
  t1 = /*#__PURE__*/_jsx(VisualRow, {
522
540
  chatId: chatId,
523
541
  visual: row.visual
524
542
  });
525
- $[95] = chatId;
526
- $[96] = row.visual;
527
- $[97] = t1;
543
+ $[99] = chatId;
544
+ $[100] = row.visual;
545
+ $[101] = t1;
528
546
  } else {
529
- t1 = $[97];
547
+ t1 = $[101];
530
548
  }
531
549
  return t1;
532
550
  }
@@ -1,23 +1,23 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useLayoutEffect, useRef, useState } from 'react';
2
+ import { Icon, ScrollArea, useNow } from '@adecore/ui';
3
+ import { formatElapsedShort } from '@adecore/ui/format';
3
4
  import clsx from 'clsx';
4
- import { useTranslation } from 'react-i18next';
5
5
  import { Bot, ChevronDown } from 'lucide-react';
6
- import { formatElapsedShort } from '@adecore/ui/format';
7
- import { Icon, useNow } from '@adecore/ui';
8
- import { useOpenForFind } from '../find-reveal.js';
9
- import { Markdown } from '../Markdown.js';
10
- import { TaskRow } from './TaskRow.js';
6
+ import { useLayoutEffect, useRef, useState } from 'react';
7
+ import { useTranslation } from 'react-i18next';
8
+ import '../../../host.js';
9
+ import { useHostHidesToolCalls, useHostTask } from '../../../host-hooks.js';
10
+ import { useChatScope } from '../../../scope.js';
11
+ import { useCurrentItem } from '../../../state/chats.js';
11
12
  import { isImageGeneration } from '../../logic/generated-image.js';
12
- import { GeneratedImageRow } from './GeneratedImageRow.js';
13
- import { RunningFor, ToggleLine, WorkLiveRow, WorkRow } from './WorkRows.js';
14
13
  import { entryTimeOf, statusWordOf, taskIdOf } from '../../subagent-list.js';
15
14
  import { useSubagentSupport } from '../../subagent-support.js';
16
15
  import { canOpenSubagent, crumbOf } from '../../subagent-view.js';
17
- import '../../../host.js';
18
- import { useChatScope } from '../../../scope.js';
19
- import { useCurrentItem } from '../../../state/chats.js';
20
- import { useHostHidesToolCalls, useHostTask } from '../../../host-hooks.js';
16
+ import { useOpenForFind } from '../find-reveal.js';
17
+ import { Markdown } from '../Markdown.js';
18
+ import { GeneratedImageRow } from './GeneratedImageRow.js';
19
+ import { TaskRow } from './TaskRow.js';
20
+ import { RunningFor, ToggleLine, WorkLiveRow, WorkRow } from './WorkRows.js';
21
21
  // The work of a long-running agent scrolls inside its row instead of pushing the thread away.
22
22
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
23
23
  const CHILDREN_MAX_PX = 320;
@@ -319,9 +319,9 @@ function SubagentWork(t0) {
319
319
  }
320
320
  let t7;
321
321
  if ($[21] !== t5 || $[22] !== t6) {
322
- t7 = /*#__PURE__*/_jsxs("div", {
323
- ref: scroller,
324
- className: "ml-6 overflow-y-auto",
322
+ t7 = /*#__PURE__*/_jsxs(ScrollArea, {
323
+ viewportRef: scroller,
324
+ className: "ml-6",
325
325
  style: t4,
326
326
  children: [t5, t6]
327
327
  });
@@ -1,9 +1,9 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
+ import { Icon, useNow, useTickingText } from '@adecore/ui';
3
+ import { formatElapsedShort, formatMoment } from '@adecore/ui/format';
2
4
  import clsx from 'clsx';
3
- import { useTranslation } from 'react-i18next';
4
5
  import { Bot, ChevronRight } from 'lucide-react';
5
- import { formatElapsedShort, formatMoment } from '@adecore/ui/format';
6
- import { Icon, useNow, useTickingText } from '@adecore/ui';
6
+ import { useTranslation } from 'react-i18next';
7
7
  import { AgentIcon } from '../../../agents/AgentIcon.js';
8
8
  import { modelName, shortModelName } from '../../../agents/model-name.js';
9
9
  import { useChatScope } from '../../../scope.js';
@@ -1,7 +1,7 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useTranslation } from 'react-i18next';
3
- import { Ellipsis, Maximize2, Trash2 } from 'lucide-react';
4
2
  import { ButtonGroup, ErrorBoundary, Icon, IconButton, Menu, Surface } from '@adecore/ui';
3
+ import { Ellipsis, Maximize2, Trash2 } from 'lucide-react';
4
+ import { useTranslation } from 'react-i18next';
5
5
  import { useChatHost } from '../../../host.js';
6
6
  import { useChatScope } from '../../../scope.js';
7
7
  import { useVisualDialog } from '../../visuals.js';
@@ -1,7 +1,7 @@
1
- import { type ReactNode } from 'react';
2
1
  import type { ChatCheckpointDiff, ChatToolItem, ChatTurnItem } from '@adecore/agent-contracts';
3
- import type { BaseMoved } from '../../logic/timeline.js';
2
+ import { type ReactNode } from 'react';
4
3
  import { type Look, type LookRun } from '../../logic/command-looks.js';
4
+ import type { BaseMoved } from '../../logic/timeline.js';
5
5
  export declare function ToggleLine({ icon, label, brand, detail, command, look, path, open, onToggle, failed, live, trailing, time, className }: {
6
6
  icon: ReactNode;
7
7
  label: ReactNode;