@adecore/agents-react 0.53.3 → 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,11 +1,20 @@
1
- import { Fragment, useContext, useEffect, useState, type Dispatch, type ReactNode, type SetStateAction } from 'react';
1
+ import type { ChatCheckpointDiff, ChatCheckpointFile, ChatFileChange, ChatToolItem, ChatTurnItem } from '@adecore/agent-contracts';
2
+ import { Button, Icon, LazyBoundary, MiddleTruncate, ScrollArea, Spinner, useTickingText } from '@adecore/ui';
3
+ import { formatClockDuration, formatElapsedShort } from '@adecore/ui/format';
2
4
  import clsx from 'clsx';
3
5
  import i18next from 'i18next';
4
- import { useTranslation } from 'react-i18next';
5
6
  import { ChevronRight, FileDiff, X } from 'lucide-react';
6
- import type { ChatCheckpointDiff, ChatCheckpointFile, ChatFileChange, ChatToolItem, ChatTurnItem } from '@adecore/agent-contracts';
7
- import type { BaseMoved } from '../../logic/timeline';
7
+ import { Fragment, useContext, useEffect, useState, type Dispatch, type ReactNode, type SetStateAction } from 'react';
8
+ import { useTranslation } from 'react-i18next';
9
+ import { useChatHost, type CommandLook, type ToolLook } from '../../../host';
10
+ import { useCommandNames } from '../../../host-hooks';
11
+ import { lazyNamed } from '../../../lazy';
12
+ import { ChatScopeContext, useChatScope } from '../../../scope';
13
+ import { useAwaitsApproval, useCurrentItem } from '../../../state/chats';
14
+ import { useChatActions } from '../../actions';
15
+ import { formatBytes } from '../../attachments';
8
16
  import { lookKey, lookRunOf, type Look, type LookRun } from '../../logic/command-looks';
17
+ import type { BaseMoved } from '../../logic/timeline';
9
18
  import {
10
19
  exitCodeOf,
11
20
  fileChanges,
@@ -21,26 +30,17 @@ import {
21
30
  unifiedChanges,
22
31
  type FileChange
23
32
  } from '../../logic/tools';
24
- import { useOpenForFind } from '../find-reveal';
25
- import { useChatHost, type CommandLook, type ToolLook } from '../../../host';
26
- import { useCommandNames } from '../../../host-hooks';
27
- import { lazyNamed } from '../../../lazy';
28
- import { useChatActions } from '../../actions';
29
- import { formatBytes } from '../../attachments';
30
- import { ChatScopeContext, useChatScope } from '../../../scope';
31
- import { useAwaitsApproval, useCurrentItem } from '../../../state/chats';
32
33
  import { useTimelineFlash } from '../../timeline-flash';
33
- import { formatClockDuration, formatElapsedShort } from '@adecore/ui/format';
34
- import { Button, Icon, LazyBoundary, MiddleTruncate, Spinner, useTickingText } from '@adecore/ui';
35
- import { ROW_GUTTER, toolIcon } from '../icons';
36
34
  import { AnsiOutput } from '../AnsiOutput';
35
+ import { DiffStack, ReviewStackView } from '../diff/DiffStack';
36
+ import { reviewEntries, type ReviewEntry } from '../diff/review-plan';
37
+ import { useReviewStack } from '../diff/use-review-stack';
38
+ import { useOpenForFind } from '../find-reveal';
39
+ import { ROW_GUTTER, toolIcon } from '../icons';
37
40
  import { ReferenceLookupContext } from '../reference-lookup';
38
41
  import { RowTime } from '../RowTime';
39
42
  import { ShellCommand, type NamedWord } from '../ShellCommand';
40
43
  import { useReferenceLookupIn } from '../thread-references';
41
- import { DiffStack, ReviewStackView } from '../diff/DiffStack';
42
- import { reviewEntries, type ReviewEntry } from '../diff/review-plan';
43
- import { useReviewStack } from '../diff/use-review-stack';
44
44
 
45
45
  // A checkpoint opens its renderer only when a file is expanded.
46
46
  const UnifiedDiff = lazyNamed(() => import('../UnifiedDiff'), 'default');
@@ -351,15 +351,17 @@ function DiffBody({ tool, entries, patched, chatId }: { tool: ChatToolItem; entr
351
351
  <DiffStack entries={entries} />
352
352
  {hasOutput(text) && !patched && (
353
353
  <div className="border-t border-border px-3 py-2">
354
- <pre
354
+ <ScrollArea
355
+ render={<pre />}
355
356
  data-find-field="output"
356
- className={clsx(
357
- 'max-h-64 overflow-auto whitespace-pre-wrap font-mono text-code select-text',
357
+ className="max-h-64"
358
+ viewportClassName={clsx(
359
+ 'whitespace-pre-wrap font-mono text-code select-text',
358
360
  tool.state === 'error' ? 'text-chat-removed' : 'text-chat-output'
359
361
  )}
360
362
  >
361
363
  <OutputText text={text} whole={whole} stored={tool.outputRef !== undefined} />
362
- </pre>
364
+ </ScrollArea>
363
365
  <WholeBar whole={whole} label={t('work.showFullOutput')} failedLabel={t('work.fullOutputFailed')} bytes={tool.outputRef?.bytes} />
364
366
  </div>
365
367
  )}
@@ -382,12 +384,14 @@ function ToolOutput({ tool, chatId }: { tool: ChatToolItem; chatId: string | und
382
384
  return (
383
385
  <>
384
386
  {hasOutput(rest) && (
385
- <pre
387
+ <ScrollArea
388
+ render={<pre />}
386
389
  data-find-field="output"
387
- className={clsx('max-h-64 overflow-auto whitespace-pre-wrap', failed && code === null ? 'text-status-error' : 'text-text-muted')}
390
+ className="max-h-64"
391
+ viewportClassName={clsx('whitespace-pre-wrap', failed && code === null ? 'text-status-error' : 'text-text-muted')}
388
392
  >
389
393
  <OutputText text={rest} whole={whole} stored={tool.outputRef !== undefined} />
390
- </pre>
394
+ </ScrollArea>
391
395
  )}
392
396
  <WholeBar whole={whole} label={t('work.showFullOutput')} failedLabel={t('work.fullOutputFailed')} bytes={tool.outputRef?.bytes} />
393
397
  {code !== null && <div className="text-status-error">{t('work.exitCode', { code: String(code) })}</div>}
@@ -420,22 +424,26 @@ function OwnToolBody({ tool, chatId }: { tool: ChatToolItem; chatId?: string | u
420
424
  return (
421
425
  <div className="mt-0.5 mb-2 ml-6 flex flex-col gap-1.5 font-mono text-code select-text">
422
426
  {lines.command !== null && (
423
- <pre className="max-h-64 overflow-auto whitespace-pre-wrap wrap-anywhere text-text">
427
+ <ScrollArea render={<pre />} className="max-h-64" viewportClassName="whitespace-pre-wrap wrap-anywhere text-text">
424
428
  <ShellCommand command={lines.command.slice(0, OUTPUT_LIMIT)} />
425
429
  {clipNotice(lines.command)}
426
- </pre>
430
+ </ScrollArea>
427
431
  )}
428
432
  {lines.args.length > 0 && (
429
- <dl className="grid max-h-64 grid-cols-[auto_minmax(0,1fr)] gap-x-3 overflow-auto">
433
+ <ScrollArea render={<dl />} className="max-h-64" viewportClassName="grid grid-cols-[auto_minmax(0,1fr)] gap-x-3">
430
434
  {lines.args.map(([key, value]) => (
431
435
  <Fragment key={key}>
432
436
  <dt className="text-text-faint">{key}</dt>
433
437
  <dd className="whitespace-pre-wrap wrap-anywhere text-text">{clip(value)}</dd>
434
438
  </Fragment>
435
439
  ))}
436
- </dl>
440
+ </ScrollArea>
441
+ )}
442
+ {lines.text !== null && (
443
+ <ScrollArea render={<pre />} className="max-h-64" viewportClassName="whitespace-pre-wrap wrap-anywhere text-text">
444
+ {clip(lines.text)}
445
+ </ScrollArea>
437
446
  )}
438
- {lines.text !== null && <pre className="max-h-64 overflow-auto whitespace-pre-wrap wrap-anywhere text-text">{clip(lines.text)}</pre>}
439
447
  <ToolOutput tool={tool} chatId={chatId} />
440
448
  </div>
441
449
  );
@@ -544,9 +552,13 @@ export function WorkLiveRow({ chatId, tool: derived }: { chatId: string; tool: C
544
552
  />
545
553
  {open && opens && <ToolBody tool={tool} chatId={chatId} />}
546
554
  {tail !== null && !open && (
547
- <pre className="mt-1.5 mb-2 ml-6 max-h-48 overflow-auto rounded-md border border-border bg-surface-raised px-3 py-2 font-mono text-code whitespace-pre-wrap text-chat-output select-text">
555
+ <ScrollArea
556
+ render={<pre />}
557
+ className="mt-1.5 mb-2 ml-6 max-h-48 rounded-md border border-border bg-surface-raised"
558
+ viewportClassName="px-3 py-2 font-mono text-code whitespace-pre-wrap text-chat-output select-text"
559
+ >
548
560
  <AnsiOutput text={tail} tailLines={12} />
549
- </pre>
561
+ </ScrollArea>
550
562
  )}
551
563
  </div>
552
564
  );
@@ -1,20 +1,20 @@
1
- import { useState } from 'react';
2
- import clsx from 'clsx';
3
- import { useTranslation } from 'react-i18next';
4
- import { ChevronRight, Square, TriangleAlert, Workflow } from 'lucide-react';
5
1
  import type { AgentKind, ChatToolItem, ChatWorkflow } from '@adecore/agent-contracts';
6
2
  import { Icon, IconButton } from '@adecore/ui';
7
- import { workflowCounts, workflowDescription, workflowPhases, type WorkflowCounts, type WorkflowPhaseView } from '../../logic/workflow';
3
+ import clsx from 'clsx';
4
+ import { ChevronRight, Square, TriangleAlert, Workflow } from 'lucide-react';
5
+ import { useState } from 'react';
6
+ import { useTranslation } from 'react-i18next';
7
+ import { useChatHost } from '../../../host';
8
+ import { useChatScope } from '../../../scope';
9
+ import { useChats } from '../../../state/chats';
10
+ import { useChatActions } from '../../actions';
8
11
  import { hasToolBody } from '../../logic/tools';
12
+ import { workflowCounts, workflowDescription, workflowPhases, type WorkflowCounts, type WorkflowPhaseView } from '../../logic/workflow';
9
13
  import { useSubagentSupport } from '../../subagent-support';
10
14
  import type { SubagentStep } from '../../subagent-view';
11
15
  import { ROW_GUTTER } from '../icons';
12
16
  import { WorkflowAgentLine } from '../WorkflowAgentLine';
13
17
  import { ToolBody } from './WorkRows';
14
- import { useChatScope } from '../../../scope';
15
- import { useChats } from '../../../state/chats';
16
- import { useChatActions } from '../../actions';
17
- import { useChatHost } from '../../../host';
18
18
 
19
19
  function PhaseBlock({ phase, provider, onOpen }: { phase: WorkflowPhaseView; provider: AgentKind | undefined; onOpen?(step: SubagentStep): void }) {
20
20
  const { t } = useTranslation('agent-chat');
@@ -1,5 +1,5 @@
1
- import type { CSSProperties } from 'react';
2
1
  import clsx from 'clsx';
2
+ import type { CSSProperties } from 'react';
3
3
  import { isBlock, type TimelineRow } from '../../logic/timeline';
4
4
 
5
5
  /* Below this distance from the bottom a thread follows what the agent writes; above it the reader scrolled back on purpose. */
@@ -1,6 +1,6 @@
1
- import { useLayoutEffect, useMemo } from 'react';
2
1
  import { diffSyntaxDocument, type DiffSourceTokens } from '@adecore/editor-react';
3
2
  import type { DiffDocument } from '@adecore/merge';
3
+ import { useLayoutEffect, useMemo } from 'react';
4
4
  import { useChatHost } from '../../host';
5
5
  import { diffSourceTokens, diffSyntaxRuntime, type DiffSourceTokenSession, type DiffSyntaxRuntime } from './diff-syntax';
6
6
 
@@ -1,7 +1,7 @@
1
- import { useLayoutEffect, useState, type RefObject } from 'react';
2
1
  import { cleanVisualVariables, type VisualAppearance, type VisualTheme, type VisualThemeVariable } from '@adecore/agent-contracts/visual';
3
- import { watchTheme } from './theme-watch';
2
+ import { useLayoutEffect, useState, type RefObject } from 'react';
4
3
  import { useHostCodeMode } from '../../host-hooks';
4
+ import { watchTheme } from './theme-watch';
5
5
 
6
6
  /* The tokens of the app's theme where a frame stands; each answers '' for a token the theme lacks. */
7
7
  export interface VisualTokens {
@@ -1,5 +1,5 @@
1
- import i18next from 'i18next';
2
1
  import { activeWorkflows, type ChatItem, type ChatToolItem, type ChatWorkflow } from '@adecore/agent-contracts';
2
+ import i18next from 'i18next';
3
3
  import { workflowCounts, workflowPhases } from './logic/workflow';
4
4
 
5
5
  /* A Workflow call that reported what it runs, which is every one `activeWorkflows` keeps. */
package/src/host.ts CHANGED
@@ -1,9 +1,3 @@
1
- import { createContext, createElement, useContext, useState, type ComponentProps, type ComponentType, type ReactNode, type RefObject } from 'react';
2
- import type { Extension } from '@codemirror/state';
3
- import type { EditorView } from '@codemirror/view';
4
- import type { Highlighter, ThemeRegistration } from 'shiki';
5
- import type { LucideIcon } from 'lucide-react';
6
- import type { EditorEngine } from '@adecore/editor';
7
1
  import type {
8
2
  AgentKind,
9
3
  ChatAttachment,
@@ -22,7 +16,13 @@ import type {
22
16
  ProviderPlatform,
23
17
  RuntimeMode
24
18
  } from '@adecore/agent-contracts';
19
+ import type { EditorEngine } from '@adecore/editor';
25
20
  import { isApplePlatform } from '@adecore/ui';
21
+ import type { Extension } from '@codemirror/state';
22
+ import type { EditorView } from '@codemirror/view';
23
+ import type { LucideIcon } from 'lucide-react';
24
+ import { createContext, createElement, useContext, useState, type ComponentProps, type ComponentType, type ReactNode, type RefObject } from 'react';
25
+ import type { Highlighter, ThemeRegistration } from 'shiki';
26
26
  import type { AccountRule } from './agents/accounts';
27
27
  import type { ReferableKind, Referables } from './chat/chat-references';
28
28
  import type { TimelineRow } from './chat/logic/timeline';
package/src/lazy.tsx CHANGED
@@ -1,5 +1,5 @@
1
- import { lazy, type ComponentProps, type ComponentType } from 'react';
2
1
  import { LoadedComponent } from '@adecore/ui';
2
+ import { lazy, type ComponentProps, type ComponentType } from 'react';
3
3
 
4
4
  type Loader = () => Promise<unknown>;
5
5
 
@@ -159,6 +159,10 @@ export default {
159
159
  from: 'Context compacted from {{tokens}} tokens',
160
160
  summary: 'Everything above reaches the agent only as a summary'
161
161
  },
162
+ selectionSwitch: {
163
+ label: '{{from}} → {{to}}',
164
+ summary: 'The model or reasoning effort changed before this turn'
165
+ },
162
166
  approval: {
163
167
  allow: 'Allowed',
164
168
  'allow-always': 'Always allowed',
@@ -159,6 +159,10 @@ export default {
159
159
  from: 'Context gecomprimeerd vanaf {{tokens}} tokens',
160
160
  summary: 'Alles hierboven kent de agent alleen nog als samenvatting'
161
161
  },
162
+ selectionSwitch: {
163
+ label: '{{from}} → {{to}}',
164
+ summary: 'Model of reasoning effort gewijzigd vóór deze turn'
165
+ },
162
166
  approval: {
163
167
  allow: 'Toegestaan',
164
168
  'allow-always': 'Altijd toegestaan',
@@ -1,7 +1,7 @@
1
- import i18next from 'i18next';
2
1
  import { parseServerFrame } from '@adecore/agent-contracts/envelope';
3
2
  import type { FramePort } from '@adecore/agent-contracts/port';
4
3
  import { AGENT_EVENT_SCHEMAS, AGENT_REQUEST_SCHEMAS, type AgentEventType, type AgentRequestType } from '@adecore/agent-contracts/protocol';
4
+ import i18next from 'i18next';
5
5
  import { ChatTransportError, type ChatEventMap, type ChatRequestMap, type ChatTransport, type ChatTransportStatus } from './transport';
6
6
 
7
7
  export interface PortTransport extends ChatTransport {
@@ -1,6 +1,6 @@
1
+ import type { AgentKind } from '@adecore/agent-contracts';
1
2
  import i18next from 'i18next';
2
3
  import type { ReactNode } from 'react';
3
- import type { AgentKind } from '@adecore/agent-contracts';
4
4
  import type { ChatHost } from '../../host';
5
5
  import { isBlockingPrompt, type PendingPrompt, type PromptAction, type PromptDraft } from './prompts';
6
6
 
@@ -1,14 +1,14 @@
1
- import { useState } from 'react';
1
+ import type { ChatApprovalItem } from '@adecore/agent-contracts';
2
+ import { Button, ScrollArea, TextMenu } from '@adecore/ui';
2
3
  import clsx from 'clsx';
4
+ import { useState } from 'react';
3
5
  import { useTranslation } from 'react-i18next';
4
- import type { ChatApprovalItem } from '@adecore/agent-contracts';
5
6
  import { approvalChanges, fileChanges } from '../../chat/logic/tools';
6
- import { useChatHost } from '../../host';
7
7
  import { ApprovalReview } from '../../chat/ui/diff/ApprovalReview';
8
8
  import { reviewEntries } from '../../chat/ui/diff/review-plan';
9
+ import { useChatHost } from '../../host';
9
10
  import { isPrimaryKey } from '../logic/keys';
10
11
  import type { PromptDraft } from '../logic/prompts';
11
- import { Button, TextMenu } from '@adecore/ui';
12
12
 
13
13
  /* A command in the sunken box a person reads before allowing it, with the folder it runs in when that is known. */
14
14
  export function CommandBox({ command, cwd }: { command: string; cwd?: string }) {
@@ -41,9 +41,15 @@ function ApprovalDetails({ item }: { item: ChatApprovalItem }) {
41
41
  )}
42
42
  {patches.length + edits.length > 0 ? (
43
43
  <div className="overflow-hidden rounded-xl bg-surface-sunken">
44
- <div className={clsx(editorPreview ? 'overflow-hidden' : 'overflow-auto', !editorPreview && !expanded && 'max-h-44')}>
45
- <ApprovalReview key={item.requestId} entries={entries} maxHeight={maxHeight} />
46
- </div>
44
+ {editorPreview ? (
45
+ <div className="overflow-hidden">
46
+ <ApprovalReview key={item.requestId} entries={entries} maxHeight={maxHeight} />
47
+ </div>
48
+ ) : (
49
+ <ScrollArea axis="both" className={clsx(!expanded && 'max-h-44')}>
50
+ <ApprovalReview key={item.requestId} entries={entries} maxHeight={maxHeight} />
51
+ </ScrollArea>
52
+ )}
47
53
  <div className="flex items-center border-t border-border p-1">
48
54
  <Button size="sm" aria-expanded={expanded} onClick={() => setExpanded(!expanded)}>
49
55
  {expanded ? t('approval.collapseDiff') : t('approval.viewDiff')}
@@ -56,9 +62,13 @@ function ApprovalDetails({ item }: { item: ChatApprovalItem }) {
56
62
  <details>
57
63
  <summary className="flex h-7 cursor-pointer items-center text-xs text-text-muted">{t('approval.details')}</summary>
58
64
  <TextMenu>
59
- <pre className="max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-xl bg-surface-sunken p-3 font-mono text-code text-text select-text">
65
+ <ScrollArea
66
+ render={<pre />}
67
+ className="max-h-64 rounded-xl bg-surface-sunken"
68
+ viewportClassName="whitespace-pre-wrap break-words p-3 font-mono text-code text-text select-text"
69
+ >
60
70
  {JSON.stringify(item.input, null, 2)}
61
- </pre>
71
+ </ScrollArea>
62
72
  </TextMenu>
63
73
  </details>
64
74
  )}
@@ -1,7 +1,7 @@
1
+ import { Button, Icon } from '@adecore/ui';
2
+ import { ArrowUp, CircleCheck } from 'lucide-react';
1
3
  import type { ButtonHTMLAttributes } from 'react';
2
4
  import { useTranslation } from 'react-i18next';
3
- import { ArrowUp, CircleCheck } from 'lucide-react';
4
- import { Button, Icon } from '@adecore/ui';
5
5
 
6
6
  /* The one button Mod+Enter presses and ArrowDown from the heading lands on, when the body has nothing to choose. */
7
7
  export function PromptPrimary(props: ButtonHTMLAttributes<HTMLButtonElement>) {
@@ -1,9 +1,9 @@
1
+ import { Icon, ScrollArea } from '@adecore/ui';
2
+ import { Hand, MessageCircleQuestionMark, type LucideIcon } from 'lucide-react';
1
3
  import type { KeyboardEvent, ReactNode } from 'react';
2
4
  import { useTranslation } from 'react-i18next';
3
- import { Hand, MessageCircleQuestionMark, type LucideIcon } from 'lucide-react';
4
5
  import { useChatHost } from '../../host';
5
6
  import { headingKey, isPrimaryKey, staysInCard, stepIndex, toolbarKey } from '../logic/keys';
6
- import { Icon } from '@adecore/ui';
7
7
 
8
8
  /* The raised glass a chat's composer is made of, for a card that stands on its own over a canvas. */
9
9
  export const PROMPT_SURFACE =
@@ -77,7 +77,7 @@ export function PromptCard({ kind, heading, meta, top, actions, busy, notice, er
77
77
  >
78
78
  {/* The scroll box would clip the focus ring of whatever sits against its edge, so it carries the
79
79
  room that ring needs and gives the same amount back to the card's own padding. */}
80
- <div className="-m-1.5 max-h-[min(50dvh,480px)] overflow-auto overscroll-contain p-1.5">
80
+ <ScrollArea className="-m-1.5 max-h-[min(50dvh,480px)]" viewportClassName="overscroll-contain p-1.5">
81
81
  <div className="flex flex-col gap-2">
82
82
  <div className="flex items-start gap-2">
83
83
  <Icon icon={ICONS[kind]} size={16} className="mt-[3px] shrink-0 text-status-needs-you" />
@@ -94,7 +94,7 @@ export function PromptCard({ kind, heading, meta, top, actions, busy, notice, er
94
94
  </p>
95
95
  )}
96
96
  </div>
97
- </div>
97
+ </ScrollArea>
98
98
  <div role="toolbar" aria-label={t('toolbar')} className="flex flex-wrap items-center gap-1.5">
99
99
  {actions}
100
100
  </div>
@@ -1,5 +1,5 @@
1
- import { useTranslation } from 'react-i18next';
2
1
  import { Pill } from '@adecore/ui';
2
+ import { useTranslation } from 'react-i18next';
3
3
  import { toolSummary } from '../../chat/logic/tools';
4
4
  import { useChatHost } from '../../host';
5
5
  import { answerValue, promptAnswers, questionAnswer, type PromptDraft } from '../logic/prompts';
@@ -1,12 +1,12 @@
1
- import { useEffect, useRef, type KeyboardEvent } from 'react';
1
+ import type { ChatQuestion } from '@adecore/agent-contracts';
2
+ import { Icon } from '@adecore/ui';
2
3
  import clsx from 'clsx';
3
- import { useTranslation } from 'react-i18next';
4
4
  import { Circle, CircleCheck, Square } from 'lucide-react';
5
- import type { ChatQuestion } from '@adecore/agent-contracts';
5
+ import { useEffect, useRef, type KeyboardEvent } from 'react';
6
+ import { useTranslation } from 'react-i18next';
7
+ import { useChatHost } from '../../host';
6
8
  import { answerFieldKey, choiceKey, stepIndex } from '../logic/keys';
7
9
  import { pickPromptChoice, type PromptAnswer } from '../logic/prompts';
8
- import { Icon } from '@adecore/ui';
9
- import { useChatHost } from '../../host';
10
10
 
11
11
  /* One question of a request: its choices, "Something else…", or a written answer when it offers no choices. */
12
12
  export function QuestionBody({
@@ -1,16 +1,16 @@
1
+ import type { ProviderInfo } from '@adecore/agent-contracts';
2
+ import { Button, copyText, Icon, Input, Switch, Tooltip } from '@adecore/ui';
3
+ import { ConfirmDialog, DetailHeader, SettingsRow, SettingsSection } from '@adecore/ui/settings';
4
+ import { LogIn } from 'lucide-react';
1
5
  import { useState } from 'react';
2
6
  import { Trans, useTranslation } from 'react-i18next';
3
- import { LogIn } from 'lucide-react';
4
- import type { ProviderInfo } from '@adecore/agent-contracts';
5
7
  import { AccountDot } from '../agents/AccountDot';
6
8
  import { accountName, FOLDER_VARIABLES, type AccountEntry, type AccountLogin } from '../agents/accounts';
7
- import { ConfirmDialog, DetailHeader, SettingsRow, SettingsSection } from '@adecore/ui/settings';
8
- import { Button, copyText, Icon, Input, Switch, Tooltip } from '@adecore/ui';
9
9
  import { useChatHost } from '../host';
10
10
  import { useChatScope } from '../scope';
11
11
  import { removeAccount, saveAccount } from './account-actions';
12
- import { AccountVariables } from './AccountVariables';
13
12
  import { AccountColors } from './AccountColors';
13
+ import { AccountVariables } from './AccountVariables';
14
14
  import { CliMark } from './parts';
15
15
 
16
16
  // The states in which the machine's own sentence says more than the usual line under the login.
@@ -1,7 +1,7 @@
1
+ import { Icon, Pill, Tooltip } from '@adecore/ui';
2
+ import { ChevronRight, GripVertical } from 'lucide-react';
1
3
  import { useState, type DragEvent, type KeyboardEvent } from 'react';
2
4
  import { useTranslation } from 'react-i18next';
3
- import { ChevronRight, GripVertical } from 'lucide-react';
4
- import { Icon, Pill, Tooltip } from '@adecore/ui';
5
5
  import { AccountDot } from '../agents/AccountDot';
6
6
  import { ACCOUNT_TONE_CLASSES, accountName, accountStatusLine, movedIds, topAccountEntry, type AccountEntry, type AccountLogin } from '../agents/accounts';
7
7
 
@@ -1,13 +1,13 @@
1
+ import type { ProviderAccount } from '@adecore/agent-contracts';
2
+ import { Button, FormError, Icon, IconButton, Input, Tooltip } from '@adecore/ui';
3
+ import { SettingsRow, SettingsSection } from '@adecore/ui/settings';
4
+ import { Lock, LockOpen, Plus, X } from 'lucide-react';
1
5
  import { useState } from 'react';
2
6
  import { useTranslation } from 'react-i18next';
3
- import { Lock, LockOpen, Plus, X } from 'lucide-react';
4
- import type { ProviderAccount } from '@adecore/agent-contracts';
5
7
  import { useChatHost } from '../host';
6
8
  import { useChatScope } from '../scope';
7
9
  import { saveAccount } from './account-actions';
8
10
  import { draftsOf, emptyDraft, variablesChanged, variablesOf, variablesProblem, type VariableDraft } from './variables';
9
- import { SettingsRow, SettingsSection } from '@adecore/ui/settings';
10
- import { Button, FormError, Icon, IconButton, Input, Tooltip } from '@adecore/ui';
11
11
 
12
12
  interface AccountVariablesProps {
13
13
  id: string;
@@ -1,18 +1,18 @@
1
- import { useState, type FormEvent } from 'react';
1
+ import type { ProviderInfo } from '@adecore/agent-contracts';
2
+ import { Button, FormError, Icon, Input } from '@adecore/ui';
3
+ import { DetailHeader, SettingsRow, SettingsSection } from '@adecore/ui/settings';
2
4
  import clsx from 'clsx';
3
- import { useTranslation } from 'react-i18next';
4
5
  import { ChevronRight } from 'lucide-react';
5
- import type { ProviderInfo } from '@adecore/agent-contracts';
6
+ import { useState, type FormEvent } from 'react';
7
+ import { useTranslation } from 'react-i18next';
6
8
  import { freeAccountColor, mintAccountId, type AccountEntry, type AccountLogin } from '../agents/accounts';
7
9
  import { useChatHost } from '../host';
8
10
  import { useChatScope } from '../scope';
11
+ import { providerAccountsOf } from '../state/provider-accounts';
12
+ import { errorMessage } from '../transport';
9
13
  import { createAccount, linkAccount } from './account-actions';
10
14
  import { AccountColors } from './AccountColors';
11
- import { DetailHeader, SettingsRow, SettingsSection } from '@adecore/ui/settings';
12
- import { Button, FormError, Icon, Input } from '@adecore/ui';
13
15
  import { CliTile } from './parts';
14
- import { providerAccountsOf } from '../state/provider-accounts';
15
- import { errorMessage } from '../transport';
16
16
 
17
17
  interface AddAccountFormProps {
18
18
  provider: ProviderInfo;
@@ -1,22 +1,22 @@
1
- import { useTranslation } from 'react-i18next';
2
- import { Plus } from 'lucide-react';
3
1
  import type { AgentKind, ModelInfo, ProviderInfo } from '@adecore/agent-contracts';
4
- import { ModelOptionControl } from '../agents/ModelOptionControl';
5
- import { carryOptions } from '../agents/model-options';
6
- import { optionWord } from '../agents/option-words';
2
+ import { Button, Icon, Select } from '@adecore/ui';
3
+ import { DetailHeader, SettingsRow, SettingsSection } from '@adecore/ui/settings';
4
+ import { Plus } from 'lucide-react';
5
+ import { useTranslation } from 'react-i18next';
7
6
  import { AccountDot } from '../agents/AccountDot';
8
7
  import { accountName, offeredAccounts, type AccountEntry, type AccountLogin } from '../agents/accounts';
8
+ import { carryOptions } from '../agents/model-options';
9
+ import { ModelOptionControl } from '../agents/ModelOptionControl';
10
+ import { optionWord } from '../agents/option-words';
9
11
  import { accountFor, forgetChatSelection, rememberChatAccount, rememberChatSelection, selectionFor, useChatPreferences } from '../chat/preferences';
10
- import { knownAccounts, useProviderAccounts } from '../state/provider-accounts';
11
12
  import { useChatHost } from '../host';
12
13
  import { useHostCanReorderAccounts } from '../host-hooks';
13
14
  import { useChatScope } from '../scope';
15
+ import { knownAccounts, useProviderAccounts } from '../state/provider-accounts';
14
16
  import { reorderAccounts } from './account-actions';
15
17
  import { AccountOrderList } from './AccountOrderList';
16
- import { providerAbilities } from './provider-abilities';
17
- import { DetailHeader, SettingsRow, SettingsSection } from '@adecore/ui/settings';
18
- import { Button, Icon, Select } from '@adecore/ui';
19
18
  import { CliTile } from './parts';
19
+ import { providerAbilities } from './provider-abilities';
20
20
 
21
21
  const PROVIDER_DEFAULT = '';
22
22
 
@@ -1,9 +1,9 @@
1
- import { useState, type ReactNode } from 'react';
2
- import clsx from 'clsx';
3
- import { Trans, useTranslation } from 'react-i18next';
4
- import { Check, Copy, ExternalLink, SquareTerminal } from 'lucide-react';
5
1
  import type { ProviderInfo, ProviderPlatform, ProviderSignIn } from '@adecore/agent-contracts';
6
2
  import { Button, copyText, Icon, Pill, Segmented } from '@adecore/ui';
3
+ import clsx from 'clsx';
4
+ import { Check, Copy, ExternalLink, SquareTerminal } from 'lucide-react';
5
+ import { useState, type ReactNode } from 'react';
6
+ import { Trans, useTranslation } from 'react-i18next';
7
7
  import { useChatHost } from '../host';
8
8
  import { useHostMachinePlatform } from '../host-hooks';
9
9
  import { useChatScope } from '../scope';
@@ -1,11 +1,11 @@
1
- import type { ReactNode } from 'react';
1
+ import type { AgentKind } from '@adecore/agent-contracts';
2
+ import { Icon, IconButton, SectionLabel } from '@adecore/ui';
2
3
  import clsx from 'clsx';
3
- import { useTranslation } from 'react-i18next';
4
4
  import { Plus } from 'lucide-react';
5
- import type { AgentKind } from '@adecore/agent-contracts';
5
+ import type { ReactNode } from 'react';
6
+ import { useTranslation } from 'react-i18next';
6
7
  import { AccountDot } from '../agents/AccountDot';
7
8
  import { accountName } from '../agents/accounts';
8
- import { Icon, IconButton, SectionLabel } from '@adecore/ui';
9
9
  import type { Picked } from './pane-target';
10
10
  import { CliMark } from './parts';
11
11
  import { accountNote, type ProviderGroups, type ProviderRow, type ProviderSetupStatus } from './provider-groups';
@@ -1,22 +1,22 @@
1
- import { useState, type ReactNode } from 'react';
2
- import { useTranslation } from 'react-i18next';
3
1
  import type { AgentKind, ProviderInfo } from '@adecore/agent-contracts';
4
- import { accountLoginOf, accountsOfKind, type AccountEntry } from '../agents/accounts';
5
2
  import { ErrorBoundary, Skeleton } from '@adecore/ui';
6
3
  import { MasterDetail } from '@adecore/ui/settings';
4
+ import { useState, type ReactNode } from 'react';
5
+ import { useTranslation } from 'react-i18next';
6
+ import { accountLoginOf, accountsOfKind, type AccountEntry } from '../agents/accounts';
7
7
  import { useChatHost } from '../host';
8
+ import { useHostLoginBlocked } from '../host-hooks';
8
9
  import { useChatScope } from '../scope';
10
+ import { useProviderAccounts } from '../state/provider-accounts';
11
+ import { useProviders } from '../state/providers';
9
12
  import { AccountDetail } from './AccountDetail';
10
13
  import { AddAccountForm } from './AddAccountForm';
11
14
  import { CliDetail } from './CliDetail';
12
- import { InstallPage } from './InstallPage';
13
15
  import type { ProviderInstallStep } from './install-steps';
16
+ import { InstallPage } from './InstallPage';
14
17
  import { pickOfCli, pickOfTarget, type Picked } from './pane-target';
15
18
  import { groupProviders, type ProviderSetupStatus } from './provider-groups';
16
19
  import { ProviderList } from './ProviderList';
17
- import { useProviderAccounts } from '../state/provider-accounts';
18
- import { useProviders } from '../state/providers';
19
- import { useHostLoginBlocked } from '../host-hooks';
20
20
 
21
21
  interface ProvidersPaneProps {
22
22
  /* The row a search result leads to, by its `searchId`; the pane opens on the CLI it belongs to. `providers.install.<kind>` opens on that CLI's install page, or on its detail once it is installed. */
@@ -1,5 +1,5 @@
1
- import i18next from 'i18next';
2
1
  import type { AgentKind, ProviderAccount, ProviderAccountMap } from '@adecore/agent-contracts';
2
+ import i18next from 'i18next';
3
3
  import { accountFor, readChatPreferences, rememberChatAccount } from '../chat/preferences';
4
4
  import type { ChatHost } from '../host';
5
5
  import type { ChatScope } from '../scope';
@@ -1,6 +1,6 @@
1
- import type { ReactNode } from 'react';
2
1
  import type { ProviderInfo, ProviderPlatform } from '@adecore/agent-contracts';
3
2
  import { isApplePlatform } from '@adecore/ui';
3
+ import type { ReactNode } from 'react';
4
4
 
5
5
  /* A step of the host's own on a provider's install page, such as a server its chat needs beside the CLI. */
6
6
  export interface ProviderInstallStep {
@@ -1,5 +1,5 @@
1
- import clsx from 'clsx';
2
1
  import type { AgentKind } from '@adecore/agent-contracts';
2
+ import clsx from 'clsx';
3
3
  import { AgentIcon } from '../agents/AgentIcon';
4
4
 
5
5
  // Each CLI in its color of the usage charts, so a mark here reads as the same CLI there. A CLI without
@@ -1,5 +1,5 @@
1
- import i18next from 'i18next';
2
1
  import type { ProviderCapabilities, ProviderInfo } from '@adecore/agent-contracts';
2
+ import i18next from 'i18next';
3
3
 
4
4
  /* What a provider offers, in one sentence, where it can be opened and whether its hooks report status. */
5
5
  export function providerAbilities(provider: ProviderInfo): string {