@adecore/agents-react 0.31.11 → 0.32.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 (404) hide show
  1. package/dist/agents/AccountDot.js +57 -6
  2. package/dist/agents/AgentIcon.js +88 -12
  3. package/dist/agents/ModelOptionControl.js +153 -18
  4. package/dist/agents/ProviderLogo.js +49 -4
  5. package/dist/agents/account-limits.js +17 -14
  6. package/dist/agents/accounts.js +99 -67
  7. package/dist/agents/agent-marks.js +5 -3
  8. package/dist/agents/model-name.js +42 -31
  9. package/dist/agents/model-options.js +8 -8
  10. package/dist/agents/model-requirement.js +17 -14
  11. package/dist/agents/option-words.d.ts +7 -0
  12. package/dist/agents/option-words.js +35 -0
  13. package/dist/agents/provider-paths.js +6 -6
  14. package/dist/agents/status-look.js +32 -12
  15. package/dist/chat/account-choice.d.ts +13 -0
  16. package/dist/chat/account-choice.js +90 -20
  17. package/dist/chat/actions.js +126 -59
  18. package/dist/chat/activity.js +5 -5
  19. package/dist/chat/attachments.js +74 -53
  20. package/dist/chat/bookmarks.js +58 -48
  21. package/dist/chat/chat-client.js +344 -263
  22. package/dist/chat/chat-references.js +3 -3
  23. package/dist/chat/composer-effort.d.ts +5 -0
  24. package/dist/chat/composer-effort.js +26 -0
  25. package/dist/chat/composer-send.js +13 -13
  26. package/dist/chat/drafts.js +115 -79
  27. package/dist/chat/forks.js +81 -24
  28. package/dist/chat/guards.js +15 -43
  29. package/dist/chat/index.d.ts +3 -1
  30. package/dist/chat/index.js +3 -2
  31. package/dist/chat/logic/ansi.js +170 -167
  32. package/dist/chat/logic/answers.js +2 -2
  33. package/dist/chat/logic/bookmarks.js +19 -19
  34. package/dist/chat/logic/command-looks.js +138 -96
  35. package/dist/chat/logic/context-usage.js +13 -9
  36. package/dist/chat/logic/continue-after-stop.js +15 -19
  37. package/dist/chat/logic/effort.d.ts +14 -0
  38. package/dist/chat/logic/effort.js +34 -0
  39. package/dist/chat/logic/embedded-code.js +387 -326
  40. package/dist/chat/logic/fork.js +134 -110
  41. package/dist/chat/logic/generated-image.js +54 -23
  42. package/dist/chat/logic/goal.js +28 -20
  43. package/dist/chat/logic/handback.js +6 -6
  44. package/dist/chat/logic/json.js +2 -2
  45. package/dist/chat/logic/limit.js +46 -30
  46. package/dist/chat/logic/picker-entries.d.ts +5 -3
  47. package/dist/chat/logic/picker-entries.js +83 -43
  48. package/dist/chat/logic/resume-compaction.d.ts +14 -1
  49. package/dist/chat/logic/resume-compaction.js +93 -24
  50. package/dist/chat/logic/scrubber.js +188 -136
  51. package/dist/chat/logic/thought.js +13 -16
  52. package/dist/chat/logic/thread-cards.js +60 -48
  53. package/dist/chat/logic/timeline-copy.js +30 -38
  54. package/dist/chat/logic/timeline-target.js +92 -63
  55. package/dist/chat/logic/timeline.js +499 -355
  56. package/dist/chat/logic/tool-catalog.js +54 -34
  57. package/dist/chat/logic/tools.js +106 -82
  58. package/dist/chat/logic/visual-height.js +18 -18
  59. package/dist/chat/logic/visual-viewport.js +6 -3
  60. package/dist/chat/logic/welcome.js +9 -9
  61. package/dist/chat/logic/workflow.js +45 -34
  62. package/dist/chat/mentions.js +149 -109
  63. package/dist/chat/persisted-json.js +51 -54
  64. package/dist/chat/preferences.d.ts +4 -0
  65. package/dist/chat/preferences.js +162 -84
  66. package/dist/chat/prompt-hold.js +9 -9
  67. package/dist/chat/quote.js +21 -30
  68. package/dist/chat/reading-width.js +12 -10
  69. package/dist/chat/recent-messages.js +34 -21
  70. package/dist/chat/resume-compaction-dismissals.js +25 -5
  71. package/dist/chat/runtime-modes.js +3 -3
  72. package/dist/chat/send-key.js +11 -7
  73. package/dist/chat/stash.js +89 -69
  74. package/dist/chat/subagent-conversation.js +181 -139
  75. package/dist/chat/subagent-list.js +65 -67
  76. package/dist/chat/subagent-support.js +12 -7
  77. package/dist/chat/subagent-view.js +132 -44
  78. package/dist/chat/thumbnails.js +88 -60
  79. package/dist/chat/timeline-flash.js +24 -12
  80. package/dist/chat/timeline-scroll.js +116 -86
  81. package/dist/chat/ui/AccountPill.js +126 -15
  82. package/dist/chat/ui/AnsiOutput.js +62 -6
  83. package/dist/chat/ui/BookmarkMarker.js +231 -41
  84. package/dist/chat/ui/BookmarkSubmenu.js +165 -18
  85. package/dist/chat/ui/ChatActivity.js +649 -70
  86. package/dist/chat/ui/ChatReferenceChip.js +104 -9
  87. package/dist/chat/ui/CodeBlock.js +132 -58
  88. package/dist/chat/ui/Composer.js +866 -132
  89. package/dist/chat/ui/ComposerInput.js +309 -120
  90. package/dist/chat/ui/DiffPool.js +75 -14
  91. package/dist/chat/ui/EditDiff.js +160 -21
  92. package/dist/chat/ui/FadingWords.js +32 -3
  93. package/dist/chat/ui/GoalDock.js +235 -42
  94. package/dist/chat/ui/ImageView.js +617 -61
  95. package/dist/chat/ui/LimitState.js +446 -72
  96. package/dist/chat/ui/Markdown.js +991 -173
  97. package/dist/chat/ui/MermaidBlock.js +238 -68
  98. package/dist/chat/ui/MessageActions.js +251 -39
  99. package/dist/chat/ui/ModelMarks.js +55 -5
  100. package/dist/chat/ui/Pickers.js +664 -113
  101. package/dist/chat/ui/PromptComposer.js +281 -51
  102. package/dist/chat/ui/QuoteButton.js +151 -57
  103. package/dist/chat/ui/ResumeCompactionDock.d.ts +6 -2
  104. package/dist/chat/ui/ResumeCompactionDock.js +141 -6
  105. package/dist/chat/ui/RowTime.js +59 -5
  106. package/dist/chat/ui/RunSettings.js +1744 -154
  107. package/dist/chat/ui/Scrubber.js +517 -88
  108. package/dist/chat/ui/ShellCommand.js +183 -107
  109. package/dist/chat/ui/SubagentControls.js +212 -24
  110. package/dist/chat/ui/SubagentInfo.js +170 -13
  111. package/dist/chat/ui/SubagentStopButton.js +115 -24
  112. package/dist/chat/ui/SubagentTimeline.js +357 -91
  113. package/dist/chat/ui/Timeline.js +988 -476
  114. package/dist/chat/ui/TimelineMenu.js +552 -37
  115. package/dist/chat/ui/UnifiedDiff.js +234 -27
  116. package/dist/chat/ui/UploadThumb.js +37 -7
  117. package/dist/chat/ui/VisualDialogs.js +251 -20
  118. package/dist/chat/ui/VisualFrame.js +321 -95
  119. package/dist/chat/ui/Welcome.js +72 -7
  120. package/dist/chat/ui/chips.js +1 -1
  121. package/dist/chat/ui/code-lines.js +36 -36
  122. package/dist/chat/ui/code-streaming.js +1 -1
  123. package/dist/chat/ui/code-theme.js +7 -7
  124. package/dist/chat/ui/composer/ComposerControls.js +329 -21
  125. package/dist/chat/ui/composer/ComposerMenu.js +358 -30
  126. package/dist/chat/ui/composer/DraftParts.js +185 -11
  127. package/dist/chat/ui/composer/QueuedMessages.js +138 -13
  128. package/dist/chat/ui/composer/chips.js +29 -19
  129. package/dist/chat/ui/composer/editor.js +79 -63
  130. package/dist/chat/ui/composer/insert.js +26 -12
  131. package/dist/chat/ui/composer/key-handler.js +180 -127
  132. package/dist/chat/ui/composer/keys.js +90 -73
  133. package/dist/chat/ui/composer/menu-aria.js +18 -9
  134. package/dist/chat/ui/composer/placeholder.js +78 -31
  135. package/dist/chat/ui/composer/surface.js +13 -37
  136. package/dist/chat/ui/composer/use-chat-controls.js +230 -90
  137. package/dist/chat/ui/composer/use-compaction-offer.js +50 -18
  138. package/dist/chat/ui/composer/use-composer-draft.js +65 -34
  139. package/dist/chat/ui/composer/use-composer-menus.js +478 -193
  140. package/dist/chat/ui/composer/use-composer-submit.js +251 -109
  141. package/dist/chat/ui/composer/use-continuable-turn.js +33 -6
  142. package/dist/chat/ui/composer/use-draft-files.js +245 -93
  143. package/dist/chat/ui/composer/use-effort-stepper.d.ts +13 -0
  144. package/dist/chat/ui/composer/use-effort-stepper.js +88 -0
  145. package/dist/chat/ui/composer/use-notice.js +61 -16
  146. package/dist/chat/ui/composer/use-pending-requests.js +38 -17
  147. package/dist/chat/ui/composer/use-prompt-history.js +117 -45
  148. package/dist/chat/ui/composer/use-prompt-hold.js +119 -35
  149. package/dist/chat/ui/composer/use-take-back.js +94 -72
  150. package/dist/chat/ui/diff/ApprovalReview.js +101 -23
  151. package/dist/chat/ui/diff/DiffFallbackBoundary.js +21 -13
  152. package/dist/chat/ui/diff/DiffOmitted.js +56 -6
  153. package/dist/chat/ui/diff/DiffStack.js +92 -8
  154. package/dist/chat/ui/diff/DiffUnavailable.js +56 -6
  155. package/dist/chat/ui/diff/EditorEditDiff.js +263 -51
  156. package/dist/chat/ui/diff/EditorPatchDiff.js +39 -14
  157. package/dist/chat/ui/diff/LegacyDiffPool.js +27 -10
  158. package/dist/chat/ui/diff/LegacyEditDiff.js +97 -20
  159. package/dist/chat/ui/diff/LegacyUnifiedDiff.js +172 -42
  160. package/dist/chat/ui/diff/RawDiff.js +65 -5
  161. package/dist/chat/ui/diff/ReviewDiff.js +77 -5
  162. package/dist/chat/ui/diff/diff-props.js +1 -1
  163. package/dist/chat/ui/diff/diff-source-budget.js +46 -35
  164. package/dist/chat/ui/diff/editor-edit-model.js +18 -14
  165. package/dist/chat/ui/diff/review-plan.js +63 -40
  166. package/dist/chat/ui/diff/review-settle.js +24 -9
  167. package/dist/chat/ui/diff/syntax-runtime.js +236 -201
  168. package/dist/chat/ui/diff/use-review-stack.js +146 -25
  169. package/dist/chat/ui/diff-syntax.js +70 -58
  170. package/dist/chat/ui/diff-theme.js +31 -12
  171. package/dist/chat/ui/file-links.js +39 -10
  172. package/dist/chat/ui/find-reveal.js +29 -8
  173. package/dist/chat/ui/full-diff.js +17 -12
  174. package/dist/chat/ui/highlighter.js +143 -113
  175. package/dist/chat/ui/icons.js +16 -7
  176. package/dist/chat/ui/index.js +1 -1
  177. package/dist/chat/ui/intelligent-ui/UiBlockFrame.js +556 -82
  178. package/dist/chat/ui/intelligent-ui/UiFallbackPart.js +73 -5
  179. package/dist/chat/ui/intelligent-ui/UiReply.js +666 -262
  180. package/dist/chat/ui/intelligent-ui/block-local.js +59 -31
  181. package/dist/chat/ui/intelligent-ui/chart-data.js +77 -67
  182. package/dist/chat/ui/intelligent-ui/node-text.js +77 -91
  183. package/dist/chat/ui/intelligent-ui/registry.js +46 -46
  184. package/dist/chat/ui/intelligent-ui/render-context.js +1 -1
  185. package/dist/chat/ui/intelligent-ui/renderers/base-land.js +1 -1
  186. package/dist/chat/ui/intelligent-ui/renderers/binding.js +3 -3
  187. package/dist/chat/ui/intelligent-ui/renderers/chart.js +1223 -123
  188. package/dist/chat/ui/intelligent-ui/renderers/choices.js +312 -34
  189. package/dist/chat/ui/intelligent-ui/renderers/content.js +1241 -86
  190. package/dist/chat/ui/intelligent-ui/renderers/data.js +619 -54
  191. package/dist/chat/ui/intelligent-ui/renderers/inputs.js +868 -67
  192. package/dist/chat/ui/intelligent-ui/renderers/links.js +366 -62
  193. package/dist/chat/ui/intelligent-ui/renderers/map-slots.js +118 -60
  194. package/dist/chat/ui/intelligent-ui/renderers/map-style.js +85 -78
  195. package/dist/chat/ui/intelligent-ui/renderers/map-view.js +282 -217
  196. package/dist/chat/ui/intelligent-ui/renderers/map.js +621 -69
  197. package/dist/chat/ui/intelligent-ui/renderers/place-point.js +15 -8
  198. package/dist/chat/ui/intelligent-ui/renderers/structure.js +262 -20
  199. package/dist/chat/ui/intelligent-ui/renderers/text.js +674 -49
  200. package/dist/chat/ui/intelligent-ui/reply-parts.js +24 -15
  201. package/dist/chat/ui/intelligent-ui/table-data.js +97 -57
  202. package/dist/chat/ui/intelligent-ui/tones.js +31 -31
  203. package/dist/chat/ui/intelligent-ui/use-in-view.js +30 -12
  204. package/dist/chat/ui/intelligent-ui/use-later.js +28 -13
  205. package/dist/chat/ui/intelligent-ui/use-truncated.js +45 -21
  206. package/dist/chat/ui/intelligent-ui/use-ui-links.js +296 -109
  207. package/dist/chat/ui/intelligent-ui/use-ui-queries.js +256 -246
  208. package/dist/chat/ui/markdown-blocks.js +296 -262
  209. package/dist/chat/ui/mermaid.js +60 -72
  210. package/dist/chat/ui/quote-selection.js +32 -29
  211. package/dist/chat/ui/rehype-chips.js +35 -23
  212. package/dist/chat/ui/rehype-fade.js +28 -17
  213. package/dist/chat/ui/remark-html-as-text.js +22 -15
  214. package/dist/chat/ui/reply-context.js +1 -1
  215. package/dist/chat/ui/reveal.js +161 -72
  216. package/dist/chat/ui/rows/ForksRow.js +226 -24
  217. package/dist/chat/ui/rows/GeneratedImageRow.js +541 -87
  218. package/dist/chat/ui/rows/MessageRows.js +1706 -159
  219. package/dist/chat/ui/rows/RowContainer.js +57 -7
  220. package/dist/chat/ui/rows/Rows.js +463 -54
  221. package/dist/chat/ui/rows/SubagentRow.js +577 -60
  222. package/dist/chat/ui/rows/TaskRow.js +359 -40
  223. package/dist/chat/ui/rows/VisualRow.js +233 -11
  224. package/dist/chat/ui/rows/WorkRows.js +1946 -163
  225. package/dist/chat/ui/rows/WorkflowRow.js +293 -34
  226. package/dist/chat/ui/rows/row-rhythm.js +27 -17
  227. package/dist/chat/ui/theme-watch.js +26 -23
  228. package/dist/chat/ui/timestamp-format.js +4 -1
  229. package/dist/chat/ui/use-diff-source-tokens.js +70 -34
  230. package/dist/chat/ui/useToggleSet.js +51 -19
  231. package/dist/chat/ui/visual-theme.js +153 -128
  232. package/dist/chat/visual-bridge.js +123 -123
  233. package/dist/chat/visual-viewport.js +94 -83
  234. package/dist/chat/visuals.js +13 -5
  235. package/dist/host-hooks.d.ts +29 -0
  236. package/dist/host-hooks.js +78 -0
  237. package/dist/host.js +120 -48
  238. package/dist/index.js +1 -1
  239. package/dist/lazy.js +38 -32
  240. package/dist/locales/en/agent-chat.d.ts +35 -0
  241. package/dist/locales/en/agent-chat.js +747 -712
  242. package/dist/locales/en/agent-prompts.js +42 -42
  243. package/dist/locales/en/agent-providers.d.ts +1 -0
  244. package/dist/locales/en/agent-providers.js +166 -165
  245. package/dist/locales/en/agent-usage.d.ts +6 -0
  246. package/dist/locales/en/agent-usage.js +129 -123
  247. package/dist/locales/nl/agent-chat.d.ts +35 -0
  248. package/dist/locales/nl/agent-chat.js +747 -712
  249. package/dist/locales/nl/agent-prompts.js +42 -42
  250. package/dist/locales/nl/agent-providers.d.ts +1 -0
  251. package/dist/locales/nl/agent-providers.js +166 -165
  252. package/dist/locales/nl/agent-usage.d.ts +6 -0
  253. package/dist/locales/nl/agent-usage.js +129 -123
  254. package/dist/locales.js +14 -14
  255. package/dist/mounted-registry.js +31 -30
  256. package/dist/port-transport.js +122 -111
  257. package/dist/prompts/index.js +1 -1
  258. package/dist/prompts/logic/focus.js +15 -14
  259. package/dist/prompts/logic/keys.js +93 -59
  260. package/dist/prompts/logic/prompts.js +27 -14
  261. package/dist/prompts/logic/subjects.js +60 -46
  262. package/dist/prompts/logic/useFocusAfterAnswer.js +60 -20
  263. package/dist/prompts/logic/usePromptSession.js +88 -77
  264. package/dist/prompts/ui/ApprovalBody.js +246 -25
  265. package/dist/prompts/ui/PromptActions.js +215 -9
  266. package/dist/prompts/ui/PromptCard.js +215 -36
  267. package/dist/prompts/ui/PromptView.js +372 -34
  268. package/dist/prompts/ui/QuestionBody.js +269 -73
  269. package/dist/providers/AccountColors.js +36 -5
  270. package/dist/providers/AccountDetail.js +683 -50
  271. package/dist/providers/AccountVariables.js +139 -32
  272. package/dist/providers/AddAccountForm.js +125 -38
  273. package/dist/providers/CliDetail.js +343 -36
  274. package/dist/providers/InstallPage.js +644 -59
  275. package/dist/providers/ProviderList.d.ts +2 -1
  276. package/dist/providers/ProviderList.js +215 -23
  277. package/dist/providers/ProvidersPane.d.ts +4 -2
  278. package/dist/providers/ProvidersPane.js +244 -64
  279. package/dist/providers/account-actions.js +54 -30
  280. package/dist/providers/index.js +1 -1
  281. package/dist/providers/install-steps.js +12 -9
  282. package/dist/providers/pane-target.d.ts +3 -0
  283. package/dist/providers/pane-target.js +34 -13
  284. package/dist/providers/parts.js +62 -12
  285. package/dist/providers/provider-abilities.js +5 -5
  286. package/dist/providers/provider-groups.js +75 -40
  287. package/dist/providers/variables.js +73 -39
  288. package/dist/scope.js +6 -6
  289. package/dist/settings/sections.js +18 -18
  290. package/dist/state/chats.d.ts +1 -0
  291. package/dist/state/chats.js +408 -192
  292. package/dist/state/index.js +1 -1
  293. package/dist/state/provider-accounts.js +70 -47
  294. package/dist/state/providers.js +45 -16
  295. package/dist/state/usage.js +154 -77
  296. package/dist/storage.js +69 -68
  297. package/dist/testing/index.js +1 -1
  298. package/dist/testing/prompts.js +105 -67
  299. package/dist/transport.js +10 -10
  300. package/dist/ui/PlainTextarea.js +27 -3
  301. package/dist/usage/LimitsList.js +646 -40
  302. package/dist/usage/UsageBreakdown.js +879 -38
  303. package/dist/usage/UsageChart.js +311 -32
  304. package/dist/usage/UsageDialog.js +46 -4
  305. package/dist/usage/UsageLimits.js +467 -34
  306. package/dist/usage/UsageLimitsCard.js +95 -11
  307. package/dist/usage/UsagePage.js +817 -96
  308. package/dist/usage/UsagePane.js +164 -10
  309. package/dist/usage/UsageSummary.js +151 -6
  310. package/dist/usage/UsageTiles.js +164 -14
  311. package/dist/usage/format.js +32 -32
  312. package/dist/usage/index.d.ts +1 -1
  313. package/dist/usage/index.js +2 -1
  314. package/dist/usage/limit-groups.d.ts +2 -0
  315. package/dist/usage/limit-groups.js +77 -59
  316. package/dist/usage/limits.js +78 -43
  317. package/dist/usage/money.js +20 -4
  318. package/dist/usage/summary.js +85 -64
  319. package/package.json +8 -8
  320. package/src/agents/ModelOptionControl.tsx +3 -1
  321. package/src/agents/option-words.ts +27 -0
  322. package/src/chat/account-choice.ts +41 -1
  323. package/src/chat/composer-effort.ts +32 -0
  324. package/src/chat/forks.ts +4 -5
  325. package/src/chat/index.ts +3 -1
  326. package/src/chat/logic/effort.ts +32 -0
  327. package/src/chat/logic/picker-entries.ts +45 -10
  328. package/src/chat/logic/resume-compaction.ts +95 -17
  329. package/src/chat/logic/timeline.ts +11 -3
  330. package/src/chat/preferences.ts +35 -0
  331. package/src/chat/subagent-view.ts +2 -3
  332. package/src/chat/ui/AnsiOutput.tsx +1 -2
  333. package/src/chat/ui/BookmarkSubmenu.tsx +3 -3
  334. package/src/chat/ui/ChatActivity.tsx +14 -22
  335. package/src/chat/ui/ChatReferenceChip.tsx +2 -3
  336. package/src/chat/ui/Composer.tsx +15 -7
  337. package/src/chat/ui/EditDiff.tsx +2 -3
  338. package/src/chat/ui/LimitState.tsx +2 -2
  339. package/src/chat/ui/Markdown.tsx +10 -8
  340. package/src/chat/ui/MermaidBlock.tsx +2 -3
  341. package/src/chat/ui/Pickers.tsx +49 -29
  342. package/src/chat/ui/PromptComposer.tsx +7 -9
  343. package/src/chat/ui/ResumeCompactionDock.tsx +16 -4
  344. package/src/chat/ui/RunSettings.tsx +67 -28
  345. package/src/chat/ui/Scrubber.tsx +3 -3
  346. package/src/chat/ui/ShellCommand.tsx +2 -0
  347. package/src/chat/ui/SubagentInfo.tsx +2 -3
  348. package/src/chat/ui/SubagentTimeline.tsx +12 -16
  349. package/src/chat/ui/Timeline.tsx +6 -6
  350. package/src/chat/ui/UnifiedDiff.tsx +3 -4
  351. package/src/chat/ui/VisualFrame.tsx +5 -8
  352. package/src/chat/ui/code-theme.ts +4 -4
  353. package/src/chat/ui/composer/placeholder.ts +2 -2
  354. package/src/chat/ui/composer/use-compaction-offer.ts +36 -16
  355. package/src/chat/ui/composer/use-composer-menus.ts +4 -9
  356. package/src/chat/ui/composer/use-composer-submit.ts +2 -1
  357. package/src/chat/ui/composer/use-effort-stepper.ts +56 -0
  358. package/src/chat/ui/composer/use-notice.ts +2 -2
  359. package/src/chat/ui/diff/EditorEditDiff.tsx +9 -13
  360. package/src/chat/ui/diff/LegacyEditDiff.tsx +12 -17
  361. package/src/chat/ui/diff/LegacyUnifiedDiff.tsx +13 -21
  362. package/src/chat/ui/diff/use-review-stack.ts +4 -4
  363. package/src/chat/ui/diff-theme.ts +3 -3
  364. package/src/chat/ui/file-links.ts +2 -2
  365. package/src/chat/ui/intelligent-ui/UiReply.tsx +2 -0
  366. package/src/chat/ui/intelligent-ui/renderers/chart.tsx +3 -3
  367. package/src/chat/ui/intelligent-ui/renderers/content.tsx +5 -6
  368. package/src/chat/ui/intelligent-ui/renderers/map-view.tsx +2 -1
  369. package/src/chat/ui/intelligent-ui/renderers/map.tsx +2 -1
  370. package/src/chat/ui/intelligent-ui/use-truncated.ts +16 -19
  371. package/src/chat/ui/intelligent-ui/use-ui-links.ts +3 -3
  372. package/src/chat/ui/rows/ForksRow.tsx +3 -5
  373. package/src/chat/ui/rows/GeneratedImageRow.tsx +2 -1
  374. package/src/chat/ui/rows/MessageRows.tsx +12 -21
  375. package/src/chat/ui/rows/SubagentRow.tsx +3 -3
  376. package/src/chat/ui/rows/TaskRow.tsx +1 -1
  377. package/src/chat/ui/rows/WorkRows.tsx +20 -7
  378. package/src/chat/ui/useToggleSet.ts +15 -18
  379. package/src/chat/ui/visual-theme.ts +2 -3
  380. package/src/host-hooks.ts +113 -0
  381. package/src/lazy.tsx +2 -0
  382. package/src/locales/en/agent-chat.ts +135 -108
  383. package/src/locales/en/agent-prompts.ts +7 -7
  384. package/src/locales/en/agent-providers.ts +35 -34
  385. package/src/locales/en/agent-usage.ts +26 -20
  386. package/src/locales/nl/agent-chat.ts +127 -100
  387. package/src/locales/nl/agent-prompts.ts +5 -5
  388. package/src/locales/nl/agent-providers.ts +33 -32
  389. package/src/locales/nl/agent-usage.ts +25 -20
  390. package/src/prompts/ui/ApprovalBody.tsx +3 -1
  391. package/src/providers/CliDetail.tsx +2 -1
  392. package/src/providers/InstallPage.tsx +2 -4
  393. package/src/providers/ProviderList.tsx +12 -2
  394. package/src/providers/ProvidersPane.tsx +45 -15
  395. package/src/providers/pane-target.ts +20 -4
  396. package/src/state/chats.ts +7 -2
  397. package/src/usage/LimitsList.tsx +12 -13
  398. package/src/usage/UsageBreakdown.tsx +17 -6
  399. package/src/usage/UsageLimits.tsx +2 -1
  400. package/src/usage/UsagePage.tsx +3 -3
  401. package/src/usage/index.ts +1 -1
  402. package/src/usage/limit-groups.ts +12 -0
  403. package/src/usage/limits.ts +2 -2
  404. package/src/usage/money.ts +1 -2
@@ -1,227 +1,1817 @@
1
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import { Fragment, useEffect, useRef, useState } from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import clsx from 'clsx';
5
- import { Activity, TriangleAlert, ChevronDown, ChevronRight, ChevronUp, FilePen, Gauge, Hand, Search, Settings, Shield, ShieldAlert, SlidersHorizontal } from 'lucide-react';
5
+ import { Activity, TriangleAlert, ChevronDown, ChevronRight, ChevronUp, FilePen, Gauge, Hand, Search, Settings, Shield, ShieldAlert, SlidersHorizontal, Star } from 'lucide-react';
6
6
  import { AccountDot } from '../../agents/AccountDot.js';
7
7
  import { limitsOfAccount, sessionWindow } from '../../agents/account-limits.js';
8
8
  import { canContinueOn } from '../../agents/accounts.js';
9
9
  import { AgentIcon } from '../../agents/AgentIcon.js';
10
10
  import { modelName, shortModelName } from '../../agents/model-name.js';
11
11
  import { ModelMarks } from './ModelMarks.js';
12
- import { modelsByVendor, searchModels, shortlistOf, wantsModelSearch } from '../logic/picker-entries.js';
12
+ import { favoritesFirst, searchModels, shortlistOf, wantsModelSearch } from '../logic/picker-entries.js';
13
+ import { favoriteModelsOf, toggleFavoriteModel, useChatPreferences } from '../preferences.js';
13
14
  import { CONTEXT_OPTION, contextFraction, contextSegments, orderOptions } from '../logic/context-usage.js';
14
15
  import { RUNTIME_MODES } from '../runtime-modes.js';
16
+ import { localizedOption } from '../../agents/option-words.js';
15
17
  import { formatClock, formatWeekdayClock, isSameDay, formatPercent, formatTokens } from '@adecore/ui/format';
16
18
  import { Icon, Menu, Tooltip, useNow } from '@adecore/ui';
17
19
  import { useChatHost } from '../../host.js';
20
+ import { evenPace, paceText } from '../../usage/limit-groups.js';
18
21
  import { useUsageLimits } from '../../usage/limits.js';
22
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
19
23
  const MINUTE_MS = 60_000;
20
24
  const MODE_ICONS = {
21
- supervised: Hand,
22
- 'auto-accept-edits': FilePen,
23
- auto: Shield,
24
- 'full-access': ShieldAlert
25
+ supervised: Hand,
26
+ 'auto-accept-edits': FilePen,
27
+ auto: Shield,
28
+ 'full-access': ShieldAlert
25
29
  };
26
30
  // More choices than this do not fit beside the label, so they go in a submenu of their own.
27
31
  const INLINE_CHOICES = 3;
28
32
  const PART_COLORS = {
29
- toolOutput: 'bg-chart-context-tools',
30
- filesRead: 'bg-chart-context-files',
31
- conversation: 'bg-chart-context-conversation',
32
- system: 'bg-chart-context-system'
33
+ toolOutput: 'bg-chart-context-tools',
34
+ filesRead: 'bg-chart-context-files',
35
+ conversation: 'bg-chart-context-conversation',
36
+ system: 'bg-chart-context-system'
33
37
  };
34
38
  const RING_RADIUS = 5;
35
39
  const RING_CIRCUMFERENCE = 2 * Math.PI * RING_RADIUS;
36
40
  function optionSummary(option, selection) {
37
- const value = selection.options[option.id];
38
- if (option.type === 'select') {
39
- return option.choices.find((choice) => choice.id === (value ?? option.defaultChoice))?.label ?? null;
40
- }
41
- return (value ?? option.defaultValue) === true ? option.label : null;
41
+ const value = selection.options[option.id];
42
+ if (option.type === 'select') {
43
+ return option.choices.find(choice => choice.id === (value ?? option.defaultChoice))?.label ?? null;
44
+ }
45
+ return (value ?? option.defaultValue) === true ? option.label : null;
42
46
  }
43
47
  function optionIcon(option) {
44
- return option.type === 'boolean' ? Gauge : option.id === CONTEXT_OPTION ? Activity : SlidersHorizontal;
48
+ return option.type === 'boolean' ? Gauge : option.id === CONTEXT_OPTION ? Activity : SlidersHorizontal;
45
49
  }
46
50
  function contextTone(fraction) {
47
- return fraction >= 0.9 ? 'text-status-error' : fraction >= 0.7 ? 'text-status-needs-you' : 'text-text';
51
+ return fraction >= 0.9 ? 'text-status-error' : fraction >= 0.7 ? 'text-status-needs-you' : 'text-text';
48
52
  }
49
53
  // A radio group holds one string, so a model is named by its provider and its slug together.
50
54
  function modelValue(provider, slug) {
51
- return `${provider}/${slug}`;
55
+ return `${provider}/${slug}`;
52
56
  }
53
57
  /* Each provider's current or legacy models; a provider with none of them is left out. */
54
58
  function modelGroupsOf(providers, legacy) {
55
- return providers
56
- .map((entry) => ({ entry, models: entry.models.filter((row) => (row.legacy === true) === legacy) }))
57
- .filter((group) => group.models.length > 0);
59
+ return providers.map(entry => ({
60
+ entry,
61
+ models: entry.models.filter(row => row.legacy === true === legacy)
62
+ })).filter(group => group.models.length > 0);
58
63
  }
59
64
  /*
60
65
  * Everything that decides how the next turn runs, behind one pill: the model, its own knobs and the
61
66
  * permission mode. Model and effective permissions stay visible as the composer narrows.
62
67
  */
63
- export function RunSettings({ disabled = false, providers, provider, selection, model, runtimeMode, effectiveRuntimeMode, permissionMode, open, onOpenChange, onModel, onOption, onMode, usage, compactDisabled, onCompact, account }) {
64
- const { t } = useTranslation('agent-chat');
65
- const [query, setQuery] = useState('');
66
- const searchRef = useRef(null);
67
- const owner = providers.find((entry) => entry.kind === provider);
68
- const current = modelName(selection.model, owner?.models);
69
- const short = shortModelName(current, owner?.models);
70
- const options = orderOptions(model?.options ?? []);
71
- const summary = options.flatMap((option) => {
72
- const label = optionSummary(option, selection);
73
- return label === null ? [] : [{ id: option.id, label, ring: option.id === CONTEXT_OPTION }];
74
- });
75
- // A CLI without a context choice still fills one, so the ring stands on its own next to the size.
76
- const hasContextOption = options.some((option) => option.id === CONTEXT_OPTION);
77
- const standaloneContext = !hasContextOption && Boolean(usage.contextWindow);
78
- if (standaloneContext) {
79
- summary.push({ id: CONTEXT_OPTION, label: formatTokens(usage.contextWindow ?? 0), ring: true });
80
- }
81
- const grouped = providers.length > 1;
82
- const live = modelGroupsOf(providers, false);
83
- const legacy = modelGroupsOf(providers, true);
84
- const chosenLegacy = owner?.models.find((row) => row.legacy && row.slug === selection.model);
85
- const chosenModel = modelValue(provider, selection.model);
86
- const shownMode = effectiveRuntimeMode ?? runtimeMode;
87
- const fullAccess = shownMode === 'full-access';
88
- const permissionFallback = permissionMode !== undefined && effectiveRuntimeMode !== runtimeMode;
68
+ export function RunSettings(t0) {
69
+ const $ = _c(115);
70
+ const {
71
+ disabled: t1,
72
+ providers,
73
+ provider,
74
+ selection,
75
+ model,
76
+ runtimeMode,
77
+ effectiveRuntimeMode,
78
+ permissionMode,
79
+ open,
80
+ onOpenChange,
81
+ onModel,
82
+ onOption,
83
+ onMode,
84
+ usage,
85
+ compactDisabled,
86
+ onCompact,
87
+ account
88
+ } = t0;
89
+ const disabled = t1 === undefined ? false : t1;
90
+ const {
91
+ t
92
+ } = useTranslation("agent-chat");
93
+ const [query, setQuery] = useState("");
94
+ const searchRef = useRef(null);
95
+ let t2;
96
+ if ($[0] !== provider) {
97
+ t2 = entry => entry.kind === provider;
98
+ $[0] = provider;
99
+ $[1] = t2;
100
+ } else {
101
+ t2 = $[1];
102
+ }
103
+ const owner = providers.find(t2);
104
+ const current = modelName(selection.model, owner?.models);
105
+ const short = shortModelName(current, owner?.models);
106
+ const options = orderOptions((model?.options ?? []).map(localizedOption));
107
+ let t3;
108
+ if ($[2] !== selection) {
109
+ t3 = option => {
110
+ const label = optionSummary(option, selection);
111
+ return label === null ? [] : [{
112
+ id: option.id,
113
+ label,
114
+ ring: option.id === CONTEXT_OPTION
115
+ }];
116
+ };
117
+ $[2] = selection;
118
+ $[3] = t3;
119
+ } else {
120
+ t3 = $[3];
121
+ }
122
+ const summary = options.flatMap(t3);
123
+ const hasContextOption = options.some(_temp);
124
+ const standaloneContext = !hasContextOption && Boolean(usage.contextWindow);
125
+ if (standaloneContext) {
126
+ summary.push({
127
+ id: CONTEXT_OPTION,
128
+ label: formatTokens(usage.contextWindow ?? 0),
129
+ ring: true
130
+ });
131
+ }
132
+ const grouped = providers.length > 1;
133
+ const live = modelGroupsOf(providers, false);
134
+ const legacy = modelGroupsOf(providers, true);
135
+ const chosenLegacy = owner?.models.find(row => row.legacy && row.slug === selection.model);
136
+ let t4;
137
+ if ($[4] !== provider || $[5] !== selection.model) {
138
+ t4 = modelValue(provider, selection.model);
139
+ $[4] = provider;
140
+ $[5] = selection.model;
141
+ $[6] = t4;
142
+ } else {
143
+ t4 = $[6];
144
+ }
145
+ const chosenModel = t4;
146
+ const shownMode = effectiveRuntimeMode ?? runtimeMode;
147
+ const fullAccess = shownMode === "full-access";
148
+ const permissionFallback = permissionMode !== undefined && effectiveRuntimeMode !== runtimeMode;
149
+ let t5;
150
+ if ($[7] !== effectiveRuntimeMode || $[8] !== permissionFallback || $[9] !== permissionMode || $[10] !== runtimeMode || $[11] !== t) {
89
151
  const effectiveLabel = effectiveRuntimeMode === undefined ? permissionMode : t(`modes.${effectiveRuntimeMode}.label`);
90
- const permissionHint = permissionFallback ? t('pickers.mode.effective', { effective: effectiveLabel, requested: t(`modes.${runtimeMode}.label`) }) : null;
91
- const chooseModel = (value) => {
92
- const slash = value.indexOf('/');
93
- onModel(value.slice(0, slash), value.slice(slash + 1));
152
+ t5 = permissionFallback ? t("pickers.mode.effective", {
153
+ effective: effectiveLabel,
154
+ requested: t(`modes.${runtimeMode}.label`)
155
+ }) : null;
156
+ $[7] = effectiveRuntimeMode;
157
+ $[8] = permissionFallback;
158
+ $[9] = permissionMode;
159
+ $[10] = runtimeMode;
160
+ $[11] = t;
161
+ $[12] = t5;
162
+ } else {
163
+ t5 = $[12];
164
+ }
165
+ const permissionHint = t5;
166
+ let t6;
167
+ if ($[13] !== onModel) {
168
+ t6 = value => {
169
+ const slash = value.indexOf("/");
170
+ onModel(value.slice(0, slash), value.slice(slash + 1));
94
171
  };
95
- const searchable = wantsModelSearch(providers);
96
- const found = query.trim() === '' ? null : searchModels(providers, query);
97
- // The menu moves the focus to its popup as it opens, so the search field takes it a frame later.
98
- useEffect(() => {
99
- if (!open || !searchable) {
100
- return;
101
- }
102
- const frame = requestAnimationFrame(() => searchRef.current?.focus());
103
- return () => cancelAnimationFrame(frame);
104
- }, [open, searchable]);
105
- const changeOpen = (next) => {
106
- if (!next) {
107
- setQuery('');
108
- }
109
- onOpenChange(next);
172
+ $[13] = onModel;
173
+ $[14] = t6;
174
+ } else {
175
+ t6 = $[14];
176
+ }
177
+ const chooseModel = t6;
178
+ let t7;
179
+ if ($[15] !== providers) {
180
+ t7 = wantsModelSearch(providers);
181
+ $[15] = providers;
182
+ $[16] = t7;
183
+ } else {
184
+ t7 = $[16];
185
+ }
186
+ const searchable = t7;
187
+ const favorites = useChatPreferences(_temp2);
188
+ let t8;
189
+ if ($[17] !== favorites) {
190
+ t8 = kind => favoriteModelsOf(favorites, kind);
191
+ $[17] = favorites;
192
+ $[18] = t8;
193
+ } else {
194
+ t8 = $[18];
195
+ }
196
+ const favoritesOf = t8;
197
+ let t9;
198
+ if ($[19] !== favoritesOf || $[20] !== providers || $[21] !== query) {
199
+ t9 = query.trim() === "" ? null : searchModels(providers, query, favoritesOf);
200
+ $[19] = favoritesOf;
201
+ $[20] = providers;
202
+ $[21] = query;
203
+ $[22] = t9;
204
+ } else {
205
+ t9 = $[22];
206
+ }
207
+ const found = t9;
208
+ let t10;
209
+ let t11;
210
+ if ($[23] !== open || $[24] !== searchable) {
211
+ t10 = () => {
212
+ if (!open || !searchable) {
213
+ return;
214
+ }
215
+ const frame = requestAnimationFrame(() => searchRef.current?.focus());
216
+ return () => cancelAnimationFrame(frame);
110
217
  };
111
- // An item the arrow keys moved to has the focus; typing there still goes to the search.
112
- const onPopupKey = (event) => {
113
- if (!searchable || event.target === searchRef.current || event.metaKey || event.ctrlKey || event.altKey) {
114
- return;
115
- }
116
- const typed = event.key.length === 1 && event.key !== ' ';
117
- if (!typed && event.key !== 'Backspace') {
118
- return;
119
- }
120
- event.preventDefault();
121
- event.stopPropagation();
122
- setQuery((now) => (typed ? now + event.key : now.slice(0, -1)));
123
- searchRef.current?.focus();
218
+ t11 = [open, searchable];
219
+ $[23] = open;
220
+ $[24] = searchable;
221
+ $[25] = t10;
222
+ $[26] = t11;
223
+ } else {
224
+ t10 = $[25];
225
+ t11 = $[26];
226
+ }
227
+ useEffect(t10, t11);
228
+ let t12;
229
+ if ($[27] !== onOpenChange) {
230
+ t12 = next => {
231
+ if (!next) {
232
+ setQuery("");
233
+ }
234
+ onOpenChange(next);
124
235
  };
125
- // The menu reads letters as a jump to an item and arrows as moving through them; the field keeps what it types.
126
- const onSearchKey = (event) => {
127
- if (event.key === 'Escape' && query !== '') {
128
- event.preventDefault();
129
- event.stopPropagation();
130
- setQuery('');
131
- return;
132
- }
133
- if (event.key === 'Enter') {
134
- event.preventDefault();
135
- const first = found?.[0];
136
- if (first !== undefined) {
137
- onModel(first.entry.kind, first.models[0].slug);
138
- changeOpen(false);
139
- }
140
- return;
141
- }
142
- if (event.key !== 'Escape' && event.key !== 'ArrowDown' && event.key !== 'ArrowUp' && event.key !== 'Tab') {
143
- event.stopPropagation();
144
- }
236
+ $[27] = onOpenChange;
237
+ $[28] = t12;
238
+ } else {
239
+ t12 = $[28];
240
+ }
241
+ const changeOpen = t12;
242
+ let t13;
243
+ if ($[29] !== searchable) {
244
+ t13 = event => {
245
+ if (!searchable || event.target === searchRef.current || event.metaKey || event.ctrlKey || event.altKey) {
246
+ return;
247
+ }
248
+ const typed = event.key.length === 1 && event.key !== " ";
249
+ if (!typed && event.key !== "Backspace") {
250
+ return;
251
+ }
252
+ event.preventDefault();
253
+ event.stopPropagation();
254
+ setQuery(now => typed ? now + event.key : now.slice(0, -1));
255
+ searchRef.current?.focus();
145
256
  };
146
- const modelRow = (entry, row) => (_jsxs(Menu.RadioItem, { value: modelValue(entry.kind, row.slug), closeOnClick: true, children: [_jsx(AgentIcon, { kind: entry.kind, size: 14, className: "shrink-0" }), _jsx("span", { className: "min-w-0 truncate", children: row.name }), _jsx(ModelMarks, { model: row })] }, row.slug));
147
- // Every model of one provider, under a label per maker where the provider names them.
148
- const byMaker = (entry, models) => modelsByVendor(models).map((row, i, sorted) => (_jsxs(Fragment, { children: [row.vendor !== undefined && sorted[i - 1]?.vendor !== row.vendor && _jsx(Menu.GroupLabel, { children: row.vendor }), modelRow(entry, row)] }, row.slug)));
149
- // A provider with many models shows the default and the chosen one, with all of them one submenu away.
150
- const providerModels = (entry, models) => {
151
- const shortlist = shortlistOf(entry.kind, models, { provider, model: selection.model });
152
- if (shortlist === null) {
153
- return models.map((row) => modelRow(entry, row));
257
+ $[29] = searchable;
258
+ $[30] = t13;
259
+ } else {
260
+ t13 = $[30];
261
+ }
262
+ const onPopupKey = t13;
263
+ let t14;
264
+ if ($[31] !== changeOpen || $[32] !== found?.[0] || $[33] !== onModel || $[34] !== query) {
265
+ t14 = event_0 => {
266
+ if (event_0.key === "Escape" && query !== "") {
267
+ event_0.preventDefault();
268
+ event_0.stopPropagation();
269
+ setQuery("");
270
+ return;
271
+ }
272
+ if (event_0.key === "Enter") {
273
+ event_0.preventDefault();
274
+ const first = found?.[0];
275
+ if (first !== undefined) {
276
+ onModel(first.entry.kind, first.models[0].slug);
277
+ changeOpen(false);
154
278
  }
155
- return (_jsxs(_Fragment, { children: [shortlist.map((row) => modelRow(entry, row)), _jsxs(Menu.SubmenuRoot, { children: [_jsx(Menu.SubmenuTrigger, { className: "text-text-muted", children: t('pickers.model.allGroup', { count: models.length }) }), _jsx(Menu.Popup, { className: "w-80", children: _jsx(Menu.RadioGroup, { value: chosenModel, onValueChange: chooseModel, children: byMaker(entry, models) }) })] })] }));
279
+ return;
280
+ }
281
+ if (event_0.key !== "Escape" && event_0.key !== "ArrowDown" && event_0.key !== "ArrowUp" && event_0.key !== "Tab") {
282
+ event_0.stopPropagation();
283
+ }
284
+ };
285
+ $[31] = changeOpen;
286
+ $[32] = found?.[0];
287
+ $[33] = onModel;
288
+ $[34] = query;
289
+ $[35] = t14;
290
+ } else {
291
+ t14 = $[35];
292
+ }
293
+ const onSearchKey = t14;
294
+ let t15;
295
+ if ($[36] !== favoritesOf || $[37] !== t) {
296
+ t15 = (entry_0, row_0) => {
297
+ const starred = favoritesOf(entry_0.kind).has(row_0.slug);
298
+ return /*#__PURE__*/_jsxs(Menu.Row, {
299
+ "aria-label": row_0.name,
300
+ children: [/*#__PURE__*/_jsxs(Menu.RadioItem, {
301
+ value: modelValue(entry_0.kind, row_0.slug),
302
+ closeOnClick: true,
303
+ children: [/*#__PURE__*/_jsx(AgentIcon, {
304
+ kind: entry_0.kind,
305
+ size: 14,
306
+ className: "shrink-0"
307
+ }), /*#__PURE__*/_jsx("span", {
308
+ className: "min-w-0 break-words",
309
+ children: row_0.name
310
+ }), /*#__PURE__*/_jsx(ModelMarks, {
311
+ model: row_0
312
+ })]
313
+ }), /*#__PURE__*/_jsx(Menu.RowAction, {
314
+ icon: Star,
315
+ label: starred ? t("pickers.model.unstar") : t("pickers.model.star"),
316
+ iconClassName: starred ? "fill-current text-accent" : "text-text-faint",
317
+ closeOnClick: false,
318
+ onClick: () => toggleFavoriteModel(entry_0.kind, row_0.slug)
319
+ })]
320
+ }, row_0.slug);
156
321
  };
157
- const modelGroups = (groups) => groups.map(({ entry, models }) => (_jsxs(Menu.Group, { children: [grouped && (_jsxs(Menu.GroupLabel, { className: "flex items-center gap-1.5", children: [_jsx(AgentIcon, { kind: entry.kind, size: 12 }), entry.name] })), providerModels(entry, models)] }, entry.kind)));
158
- return (_jsxs(Menu.Root, { open: open, onOpenChange: changeOpen, highlightItemOnHover: !searchable, children: [_jsx(Tooltip, { label: permissionHint ?? t('pickers.settings.title'), kbd: "/model", children: _jsxs(Menu.Trigger, { disabled: disabled, className: clsx('flex h-8 min-w-0 items-center gap-2 rounded-full border pr-3 pl-2.5 text-xs whitespace-nowrap text-text-muted @max-xl/composer:gap-1.5 @max-sm/composer:pr-2.5', open ? 'border-accent bg-accent-soft' : 'border-border hover:bg-surface-hover'), children: [_jsx(AgentIcon, { kind: provider, size: 14, className: "shrink-0" }), _jsxs("span", { className: "flex min-w-0 items-center gap-2 overflow-hidden @max-xl/composer:gap-1.5", children: [_jsx("span", { className: "truncate font-medium text-text @max-xl/composer:hidden", children: current }), _jsx("span", { className: "hidden truncate font-medium text-text @max-xl/composer:inline", children: short }), account !== null && (_jsxs("span", { className: "flex min-w-0 items-center gap-2 @max-xl/composer:gap-1.5", children: [_jsx("span", { className: "shrink-0 text-text-faint", children: "\u00B7" }), _jsx(AccountDot, { color: account.choice.current?.account.color }), _jsx("span", { className: "truncate @max-xl/composer:hidden", children: account.choice.current === null ? account.choice.currentId : account.choice.nameOf(account.choice.current) })] })), summary.map((entry) => (_jsxs("span", { className: clsx('flex shrink-0 items-center gap-2 @max-xl/composer:gap-1.5', !entry.ring && '@max-xl/composer:hidden'), children: [_jsx("span", { className: "text-text-faint", children: "\u00B7" }), entry.ring && _jsx(ContextRing, { usage: usage }), _jsx("span", { className: clsx(entry.ring && '@max-sm/composer:hidden'), children: entry.label })] }, entry.id))), _jsx("span", { className: "shrink-0 text-text-faint", children: "\u00B7" }), _jsxs("span", { className: clsx('flex shrink-0 items-center gap-1', fullAccess && 'text-status-needs-you'), children: [_jsx(Icon, { icon: MODE_ICONS[shownMode], size: 12, className: "shrink-0" }), _jsx("span", { children: effectiveRuntimeMode === undefined && permissionMode !== undefined ? permissionMode : t(`modes.${shownMode}.short`) }), permissionFallback && _jsx(Icon, { icon: TriangleAlert, size: 12, className: "shrink-0 text-status-needs-you" })] })] }), _jsx(Icon, { icon: open ? ChevronUp : ChevronDown, size: 12, className: "shrink-0 @max-sm/composer:hidden" })] }) }), _jsxs(Menu.Popup, { side: "top", sideOffset: 8, align: "start", className: "w-80", onKeyDownCapture: onPopupKey, children: [providers.length === 0 && _jsx("div", { className: "px-2.5 py-3 text-xs text-text-faint", children: t('pickers.model.noProvider') }), searchable && (_jsxs("div", { className: "flex items-center gap-2 border-b border-border px-2.5", children: [_jsx(Icon, { icon: Search, size: 14, className: "shrink-0 text-text-faint" }), _jsx("input", { ref: searchRef, className: "h-8 w-full bg-transparent text-sm text-text outline-none placeholder:text-text-faint", placeholder: t('pickers.model.search'), "aria-label": t('pickers.model.search'), spellCheck: false, value: query, onChange: (event) => setQuery(event.target.value), onKeyDown: onSearchKey })] })), found !== null && found.length === 0 && _jsx("div", { className: "px-2.5 py-3 text-xs text-text-faint", children: t('pickers.model.noMatch') }), found !== null && found.length > 0 && (_jsx(Menu.RadioGroup, { value: chosenModel, onValueChange: chooseModel, children: found.map(({ entry, models }) => (_jsxs(Menu.Group, { children: [grouped && (_jsxs(Menu.GroupLabel, { className: "flex items-center gap-1.5", children: [_jsx(AgentIcon, { kind: entry.kind, size: 12 }), entry.name] })), byMaker(entry, models)] }, entry.kind))) })), found === null && (_jsxs(_Fragment, { children: [_jsx(Menu.RadioGroup, { value: chosenModel, onValueChange: chooseModel, children: modelGroups(live) }), legacy.length > 0 && (_jsxs(Menu.SubmenuRoot, { children: [_jsxs(Menu.SubmenuTrigger, { className: "text-text-muted", children: [_jsx("span", { className: "min-w-0 grow truncate", children: t('pickers.model.legacyGroup', { count: legacy.reduce((count, group) => count + group.models.length, 0) }) }), chosenLegacy && _jsx(Menu.Hint, { className: "truncate", children: chosenLegacy.name })] }), _jsx(Menu.Popup, { className: "min-w-56", children: _jsx(Menu.RadioGroup, { value: chosenModel, onValueChange: chooseModel, children: modelGroups(legacy) }) })] })), _jsx(Menu.Separator, {}), account !== null && _jsx(AccountSubmenu, { provider: provider, account: account }), _jsxs(Menu.SubmenuRoot, { children: [_jsxs(Menu.SubmenuTrigger, { className: "text-text-muted", children: [_jsx(Icon, { icon: MODE_ICONS[runtimeMode], size: 14, className: clsx('shrink-0', fullAccess ? 'text-status-needs-you' : 'text-text-faint') }), _jsx("span", { className: "min-w-0 grow truncate", children: t('pickers.mode.label') }), _jsx(Menu.Hint, { className: "truncate", children: t(`modes.${runtimeMode}.label`) })] }), _jsxs(Menu.Popup, { className: "w-72", children: [permissionHint !== null && _jsx("p", { className: "px-2.5 py-2 text-xs text-text-muted", children: permissionHint }), _jsx(Menu.RadioGroup, { value: runtimeMode, onValueChange: (mode) => onMode(mode), children: RUNTIME_MODES.map((mode) => (_jsxs(Menu.RadioItem, { value: mode, className: "items-start", children: [_jsx("span", { className: "grid h-lh w-4 shrink-0 place-items-center", children: _jsx(Icon, { icon: MODE_ICONS[mode], size: 14, className: mode === 'full-access' ? 'text-status-needs-you' : 'text-text-faint' }) }), _jsxs("span", { className: "flex min-w-0 grow flex-col", children: [t(`modes.${mode}.label`), _jsx("span", { className: "text-xs text-text-faint", children: t(`modes.${mode}.hint`) })] })] }, mode))) })] })] }), options.map((option) => (_jsx(OptionRow, { option: option, selection: selection, onChange: (value) => onOption(option.id, value) }, option.id))), (hasContextOption || standaloneContext) && (_jsxs(_Fragment, { children: [_jsx(Menu.Separator, {}), _jsx(ContextUsage, { usage: usage, disabled: compactDisabled, onCompact: onCompact })] }))] }))] })] }));
322
+ $[36] = favoritesOf;
323
+ $[37] = t;
324
+ $[38] = t15;
325
+ } else {
326
+ t15 = $[38];
327
+ }
328
+ const modelRow = t15;
329
+ let t16;
330
+ if ($[39] !== favoritesOf || $[40] !== modelRow) {
331
+ t16 = (entry_1, models) => {
332
+ const starred_0 = favoritesOf(entry_1.kind);
333
+ return favoritesFirst(models, starred_0).map((row_1, i, sorted) => {
334
+ const previous = sorted[i - 1];
335
+ const labeled = row_1.vendor !== undefined && !starred_0.has(row_1.slug) && (previous === undefined || starred_0.has(previous.slug) || previous.vendor !== row_1.vendor);
336
+ return /*#__PURE__*/_jsxs(Fragment, {
337
+ children: [labeled && /*#__PURE__*/_jsx(Menu.GroupLabel, {
338
+ children: row_1.vendor
339
+ }), modelRow(entry_1, row_1)]
340
+ }, row_1.slug);
341
+ });
342
+ };
343
+ $[39] = favoritesOf;
344
+ $[40] = modelRow;
345
+ $[41] = t16;
346
+ } else {
347
+ t16 = $[41];
348
+ }
349
+ const byMaker = t16;
350
+ let t17;
351
+ if ($[42] !== byMaker || $[43] !== chooseModel || $[44] !== chosenModel || $[45] !== favoritesOf || $[46] !== modelRow || $[47] !== provider || $[48] !== selection.model || $[49] !== t) {
352
+ t17 = (entry_2, models_0) => {
353
+ const starred_1 = favoritesOf(entry_2.kind);
354
+ const shortlist = shortlistOf(entry_2.kind, models_0, {
355
+ provider,
356
+ model: selection.model
357
+ }, starred_1);
358
+ if (shortlist === null) {
359
+ return [...models_0.filter(row_2 => starred_1.has(row_2.slug)), ...models_0.filter(row_3 => !starred_1.has(row_3.slug))].map(row_4 => modelRow(entry_2, row_4));
360
+ }
361
+ return /*#__PURE__*/_jsxs(_Fragment, {
362
+ children: [shortlist.map(row_5 => modelRow(entry_2, row_5)), /*#__PURE__*/_jsxs(Menu.SubmenuRoot, {
363
+ children: [/*#__PURE__*/_jsx(Menu.SubmenuTrigger, {
364
+ className: "text-text-muted",
365
+ children: t("pickers.model.allGroup", {
366
+ count: models_0.length
367
+ })
368
+ }), /*#__PURE__*/_jsx(Menu.Popup, {
369
+ className: "w-80",
370
+ children: /*#__PURE__*/_jsx(Menu.RadioGroup, {
371
+ value: chosenModel,
372
+ onValueChange: chooseModel,
373
+ children: byMaker(entry_2, models_0)
374
+ })
375
+ })]
376
+ })]
377
+ });
378
+ };
379
+ $[42] = byMaker;
380
+ $[43] = chooseModel;
381
+ $[44] = chosenModel;
382
+ $[45] = favoritesOf;
383
+ $[46] = modelRow;
384
+ $[47] = provider;
385
+ $[48] = selection.model;
386
+ $[49] = t;
387
+ $[50] = t17;
388
+ } else {
389
+ t17 = $[50];
390
+ }
391
+ const providerModels = t17;
392
+ let t18;
393
+ if ($[51] !== grouped || $[52] !== providerModels) {
394
+ t18 = groups => groups.map(t19 => {
395
+ const {
396
+ entry: entry_3,
397
+ models: models_1
398
+ } = t19;
399
+ return /*#__PURE__*/_jsxs(Menu.Group, {
400
+ children: [grouped && /*#__PURE__*/_jsxs(Menu.GroupLabel, {
401
+ className: "flex items-center gap-1.5",
402
+ children: [/*#__PURE__*/_jsx(AgentIcon, {
403
+ kind: entry_3.kind,
404
+ size: 12
405
+ }), entry_3.name]
406
+ }), providerModels(entry_3, models_1)]
407
+ }, entry_3.kind);
408
+ });
409
+ $[51] = grouped;
410
+ $[52] = providerModels;
411
+ $[53] = t18;
412
+ } else {
413
+ t18 = $[53];
414
+ }
415
+ const modelGroups = t18;
416
+ let t19;
417
+ if ($[54] !== permissionHint || $[55] !== t) {
418
+ t19 = permissionHint ?? t("pickers.settings.title");
419
+ $[54] = permissionHint;
420
+ $[55] = t;
421
+ $[56] = t19;
422
+ } else {
423
+ t19 = $[56];
424
+ }
425
+ const t20 = open ? "border-accent bg-accent-soft" : "border-border hover:bg-surface-hover";
426
+ let t21;
427
+ if ($[57] !== t20) {
428
+ t21 = clsx("flex h-8 min-w-0 items-center gap-2 rounded-full border pr-3 pl-2.5 text-xs whitespace-nowrap text-text-muted @max-xl/composer:gap-1.5 @max-sm/composer:pr-2.5", t20);
429
+ $[57] = t20;
430
+ $[58] = t21;
431
+ } else {
432
+ t21 = $[58];
433
+ }
434
+ let t22;
435
+ if ($[59] !== provider) {
436
+ t22 = /*#__PURE__*/_jsx(AgentIcon, {
437
+ kind: provider,
438
+ size: 14,
439
+ className: "shrink-0"
440
+ });
441
+ $[59] = provider;
442
+ $[60] = t22;
443
+ } else {
444
+ t22 = $[60];
445
+ }
446
+ let t23;
447
+ if ($[61] !== current) {
448
+ t23 = /*#__PURE__*/_jsx("span", {
449
+ className: "truncate font-medium text-text @max-xl/composer:hidden",
450
+ children: current
451
+ });
452
+ $[61] = current;
453
+ $[62] = t23;
454
+ } else {
455
+ t23 = $[62];
456
+ }
457
+ let t24;
458
+ if ($[63] !== short) {
459
+ t24 = /*#__PURE__*/_jsx("span", {
460
+ className: "hidden truncate font-medium text-text @max-xl/composer:inline",
461
+ children: short
462
+ });
463
+ $[63] = short;
464
+ $[64] = t24;
465
+ } else {
466
+ t24 = $[64];
467
+ }
468
+ let t25;
469
+ if ($[65] !== account) {
470
+ t25 = account !== null && /*#__PURE__*/_jsxs("span", {
471
+ className: "flex min-w-0 items-center gap-2 @max-xl/composer:gap-1.5",
472
+ children: [/*#__PURE__*/_jsx("span", {
473
+ className: "shrink-0 text-text-faint",
474
+ children: "\xB7"
475
+ }), /*#__PURE__*/_jsx(AccountDot, {
476
+ color: account.choice.current?.account.color
477
+ }), /*#__PURE__*/_jsx("span", {
478
+ className: "truncate @max-xl/composer:hidden",
479
+ children: account.choice.current === null ? account.choice.currentId : account.choice.nameOf(account.choice.current)
480
+ })]
481
+ });
482
+ $[65] = account;
483
+ $[66] = t25;
484
+ } else {
485
+ t25 = $[66];
486
+ }
487
+ let t26;
488
+ if ($[67] !== usage) {
489
+ t26 = entry_4 => /*#__PURE__*/_jsxs("span", {
490
+ className: clsx("flex shrink-0 items-center gap-2 @max-xl/composer:gap-1.5", !entry_4.ring && "@max-xl/composer:hidden"),
491
+ children: [/*#__PURE__*/_jsx("span", {
492
+ className: "text-text-faint",
493
+ children: "\xB7"
494
+ }), entry_4.ring && /*#__PURE__*/_jsx(ContextRing, {
495
+ usage: usage
496
+ }), /*#__PURE__*/_jsx("span", {
497
+ className: clsx(entry_4.ring && "@max-sm/composer:hidden"),
498
+ children: entry_4.label
499
+ })]
500
+ }, entry_4.id);
501
+ $[67] = usage;
502
+ $[68] = t26;
503
+ } else {
504
+ t26 = $[68];
505
+ }
506
+ const t27 = summary.map(t26);
507
+ let t28;
508
+ if ($[69] === Symbol.for("react.memo_cache_sentinel")) {
509
+ t28 = /*#__PURE__*/_jsx("span", {
510
+ className: "shrink-0 text-text-faint",
511
+ children: "\xB7"
512
+ });
513
+ $[69] = t28;
514
+ } else {
515
+ t28 = $[69];
516
+ }
517
+ const t29 = fullAccess && "text-status-needs-you";
518
+ let t30;
519
+ if ($[70] !== t29) {
520
+ t30 = clsx("flex shrink-0 items-center gap-1", t29);
521
+ $[70] = t29;
522
+ $[71] = t30;
523
+ } else {
524
+ t30 = $[71];
525
+ }
526
+ const t31 = MODE_ICONS[shownMode];
527
+ let t32;
528
+ if ($[72] !== t31) {
529
+ t32 = /*#__PURE__*/_jsx(Icon, {
530
+ icon: t31,
531
+ size: 12,
532
+ className: "shrink-0"
533
+ });
534
+ $[72] = t31;
535
+ $[73] = t32;
536
+ } else {
537
+ t32 = $[73];
538
+ }
539
+ let t33;
540
+ if ($[74] !== effectiveRuntimeMode || $[75] !== permissionMode || $[76] !== shownMode || $[77] !== t) {
541
+ t33 = effectiveRuntimeMode === undefined && permissionMode !== undefined ? permissionMode : t(`modes.${shownMode}.short`);
542
+ $[74] = effectiveRuntimeMode;
543
+ $[75] = permissionMode;
544
+ $[76] = shownMode;
545
+ $[77] = t;
546
+ $[78] = t33;
547
+ } else {
548
+ t33 = $[78];
549
+ }
550
+ let t34;
551
+ if ($[79] !== t33) {
552
+ t34 = /*#__PURE__*/_jsx("span", {
553
+ children: t33
554
+ });
555
+ $[79] = t33;
556
+ $[80] = t34;
557
+ } else {
558
+ t34 = $[80];
559
+ }
560
+ let t35;
561
+ if ($[81] !== permissionFallback) {
562
+ t35 = permissionFallback && /*#__PURE__*/_jsx(Icon, {
563
+ icon: TriangleAlert,
564
+ size: 12,
565
+ className: "shrink-0 text-status-needs-you"
566
+ });
567
+ $[81] = permissionFallback;
568
+ $[82] = t35;
569
+ } else {
570
+ t35 = $[82];
571
+ }
572
+ let t36;
573
+ if ($[83] !== t30 || $[84] !== t32 || $[85] !== t34 || $[86] !== t35) {
574
+ t36 = /*#__PURE__*/_jsxs("span", {
575
+ className: t30,
576
+ children: [t32, t34, t35]
577
+ });
578
+ $[83] = t30;
579
+ $[84] = t32;
580
+ $[85] = t34;
581
+ $[86] = t35;
582
+ $[87] = t36;
583
+ } else {
584
+ t36 = $[87];
585
+ }
586
+ const t37 = open ? ChevronUp : ChevronDown;
587
+ let t38;
588
+ if ($[88] !== t37) {
589
+ t38 = /*#__PURE__*/_jsx(Icon, {
590
+ icon: t37,
591
+ size: 12,
592
+ className: "shrink-0 @max-sm/composer:hidden"
593
+ });
594
+ $[88] = t37;
595
+ $[89] = t38;
596
+ } else {
597
+ t38 = $[89];
598
+ }
599
+ const t39 = Menu;
600
+ const t40 = "top";
601
+ const t41 = 8;
602
+ const t42 = "start";
603
+ const t43 = "w-80";
604
+ let t44;
605
+ if ($[90] !== providers.length || $[91] !== t) {
606
+ t44 = providers.length === 0 && /*#__PURE__*/_jsx("div", {
607
+ className: "px-2.5 py-3 text-xs text-text-faint",
608
+ children: t("pickers.model.noProvider")
609
+ });
610
+ $[90] = providers.length;
611
+ $[91] = t;
612
+ $[92] = t44;
613
+ } else {
614
+ t44 = $[92];
615
+ }
616
+ let t45;
617
+ if ($[93] !== onSearchKey || $[94] !== query || $[95] !== searchable || $[96] !== t) {
618
+ t45 = searchable && /*#__PURE__*/_jsxs("div", {
619
+ className: "flex items-center gap-2 border-b border-border px-2.5",
620
+ children: [/*#__PURE__*/_jsx(Icon, {
621
+ icon: Search,
622
+ size: 14,
623
+ className: "shrink-0 text-text-faint"
624
+ }), /*#__PURE__*/_jsx("input", {
625
+ ref: searchRef,
626
+ className: "h-8 w-full bg-transparent text-sm text-text outline-none placeholder:text-text-faint",
627
+ placeholder: t("pickers.model.search"),
628
+ "aria-label": t("pickers.model.search"),
629
+ spellCheck: false,
630
+ value: query,
631
+ onChange: event_1 => setQuery(event_1.target.value),
632
+ onKeyDown: onSearchKey
633
+ })]
634
+ });
635
+ $[93] = onSearchKey;
636
+ $[94] = query;
637
+ $[95] = searchable;
638
+ $[96] = t;
639
+ $[97] = t45;
640
+ } else {
641
+ t45 = $[97];
642
+ }
643
+ let t46;
644
+ if ($[98] !== found || $[99] !== t) {
645
+ t46 = found !== null && found.length === 0 && /*#__PURE__*/_jsx("div", {
646
+ className: "px-2.5 py-3 text-xs text-text-faint",
647
+ children: t("pickers.model.noMatch")
648
+ });
649
+ $[98] = found;
650
+ $[99] = t;
651
+ $[100] = t46;
652
+ } else {
653
+ t46 = $[100];
654
+ }
655
+ let t47;
656
+ if ($[101] !== byMaker || $[102] !== chooseModel || $[103] !== chosenModel || $[104] !== found || $[105] !== grouped) {
657
+ t47 = found !== null && found.length > 0 && /*#__PURE__*/_jsx(Menu.RadioGroup, {
658
+ value: chosenModel,
659
+ onValueChange: chooseModel,
660
+ children: found.map(t48 => {
661
+ const {
662
+ entry: entry_5,
663
+ models: models_2
664
+ } = t48;
665
+ return /*#__PURE__*/_jsxs(Menu.Group, {
666
+ children: [grouped && /*#__PURE__*/_jsxs(Menu.GroupLabel, {
667
+ className: "flex items-center gap-1.5",
668
+ children: [/*#__PURE__*/_jsx(AgentIcon, {
669
+ kind: entry_5.kind,
670
+ size: 12
671
+ }), entry_5.name]
672
+ }), byMaker(entry_5, models_2)]
673
+ }, entry_5.kind);
674
+ })
675
+ });
676
+ $[101] = byMaker;
677
+ $[102] = chooseModel;
678
+ $[103] = chosenModel;
679
+ $[104] = found;
680
+ $[105] = grouped;
681
+ $[106] = t47;
682
+ } else {
683
+ t47 = $[106];
684
+ }
685
+ const t48 = found === null && /*#__PURE__*/_jsxs(_Fragment, {
686
+ children: [/*#__PURE__*/_jsx(Menu.RadioGroup, {
687
+ value: chosenModel,
688
+ onValueChange: chooseModel,
689
+ children: modelGroups(live)
690
+ }), legacy.length > 0 && /*#__PURE__*/_jsxs(Menu.SubmenuRoot, {
691
+ children: [/*#__PURE__*/_jsxs(Menu.SubmenuTrigger, {
692
+ className: "text-text-muted",
693
+ children: [/*#__PURE__*/_jsx("span", {
694
+ className: "min-w-0 grow truncate",
695
+ children: t("pickers.model.legacyGroup", {
696
+ count: legacy.reduce(_temp3, 0)
697
+ })
698
+ }), chosenLegacy && /*#__PURE__*/_jsx(Menu.Hint, {
699
+ className: "truncate",
700
+ children: chosenLegacy.name
701
+ })]
702
+ }), /*#__PURE__*/_jsx(Menu.Popup, {
703
+ className: "min-w-56",
704
+ children: /*#__PURE__*/_jsx(Menu.RadioGroup, {
705
+ value: chosenModel,
706
+ onValueChange: chooseModel,
707
+ children: modelGroups(legacy)
708
+ })
709
+ })]
710
+ }), /*#__PURE__*/_jsx(Menu.Separator, {}), account !== null && /*#__PURE__*/_jsx(AccountSubmenu, {
711
+ provider: provider,
712
+ account: account
713
+ }), /*#__PURE__*/_jsxs(Menu.SubmenuRoot, {
714
+ children: [/*#__PURE__*/_jsxs(Menu.SubmenuTrigger, {
715
+ className: "text-text-muted",
716
+ children: [/*#__PURE__*/_jsx(Icon, {
717
+ icon: MODE_ICONS[runtimeMode],
718
+ size: 14,
719
+ className: clsx("shrink-0", fullAccess ? "text-status-needs-you" : "text-text-faint")
720
+ }), /*#__PURE__*/_jsx("span", {
721
+ className: "min-w-0 grow truncate",
722
+ children: t("pickers.mode.label")
723
+ }), /*#__PURE__*/_jsx(Menu.Hint, {
724
+ className: "truncate",
725
+ children: t(`modes.${runtimeMode}.label`)
726
+ })]
727
+ }), /*#__PURE__*/_jsxs(Menu.Popup, {
728
+ className: "w-72",
729
+ children: [permissionHint !== null && /*#__PURE__*/_jsx("p", {
730
+ className: "px-2.5 py-2 text-xs text-text-muted",
731
+ children: permissionHint
732
+ }), /*#__PURE__*/_jsx(Menu.RadioGroup, {
733
+ value: runtimeMode,
734
+ onValueChange: mode => onMode(mode),
735
+ children: RUNTIME_MODES.map(mode_0 => /*#__PURE__*/_jsxs(Menu.RadioItem, {
736
+ value: mode_0,
737
+ className: "items-start",
738
+ children: [/*#__PURE__*/_jsx("span", {
739
+ className: "grid h-lh w-4 shrink-0 place-items-center",
740
+ children: /*#__PURE__*/_jsx(Icon, {
741
+ icon: MODE_ICONS[mode_0],
742
+ size: 14,
743
+ className: mode_0 === "full-access" ? "text-status-needs-you" : "text-text-faint"
744
+ })
745
+ }), /*#__PURE__*/_jsxs("span", {
746
+ className: "flex min-w-0 grow flex-col",
747
+ children: [t(`modes.${mode_0}.label`), /*#__PURE__*/_jsx("span", {
748
+ className: "text-xs text-text-faint",
749
+ children: t(`modes.${mode_0}.hint`)
750
+ })]
751
+ })]
752
+ }, mode_0))
753
+ })]
754
+ })]
755
+ }), options.map(option_1 => /*#__PURE__*/_jsx(OptionRow, {
756
+ option: option_1,
757
+ selection: selection,
758
+ onChange: value_0 => onOption(option_1.id, value_0)
759
+ }, option_1.id)), (hasContextOption || standaloneContext) && /*#__PURE__*/_jsxs(_Fragment, {
760
+ children: [/*#__PURE__*/_jsx(Menu.Separator, {}), /*#__PURE__*/_jsx(ContextUsage, {
761
+ usage: usage,
762
+ disabled: compactDisabled,
763
+ onCompact: onCompact
764
+ })]
765
+ })]
766
+ });
767
+ let t49;
768
+ if ($[107] !== onPopupKey || $[108] !== t39.Popup || $[109] !== t44 || $[110] !== t45 || $[111] !== t46 || $[112] !== t47 || $[113] !== t48) {
769
+ t49 = /*#__PURE__*/_jsxs(t39.Popup, {
770
+ side: t40,
771
+ sideOffset: t41,
772
+ align: t42,
773
+ className: t43,
774
+ onKeyDownCapture: onPopupKey,
775
+ children: [t44, t45, t46, t47, t48]
776
+ });
777
+ $[107] = onPopupKey;
778
+ $[108] = t39.Popup;
779
+ $[109] = t44;
780
+ $[110] = t45;
781
+ $[111] = t46;
782
+ $[112] = t47;
783
+ $[113] = t48;
784
+ $[114] = t49;
785
+ } else {
786
+ t49 = $[114];
787
+ }
788
+ return /*#__PURE__*/_jsxs(Menu.Root, {
789
+ open: open,
790
+ onOpenChange: changeOpen,
791
+ highlightItemOnHover: !searchable,
792
+ children: [/*#__PURE__*/_jsx(Tooltip, {
793
+ label: t19,
794
+ kbd: "/model",
795
+ children: /*#__PURE__*/_jsxs(Menu.Trigger, {
796
+ disabled: disabled,
797
+ className: t21,
798
+ children: [t22, /*#__PURE__*/_jsxs("span", {
799
+ className: "flex min-w-0 items-center gap-2 overflow-hidden @max-xl/composer:gap-1.5",
800
+ children: [t23, t24, t25, t27, t28, t36]
801
+ }), t38]
802
+ })
803
+ }), t49]
804
+ });
159
805
  }
160
806
  /* Red where a window is nearly spent, amber where it is worth knowing, as the usage bars have it. */
807
+ function _temp3(count, group) {
808
+ return count + group.models.length;
809
+ }
810
+ function _temp2(preferences) {
811
+ return preferences.favoriteModels;
812
+ }
813
+ function _temp(option_0) {
814
+ return option_0.id === CONTEXT_OPTION;
815
+ }
161
816
  function sessionTone(used) {
162
- return used >= 0.9
163
- ? { bar: 'bg-status-error', text: 'text-status-error' }
164
- : used >= 0.7
165
- ? { bar: 'bg-status-needs-you', text: 'text-status-needs-you' }
166
- : { bar: 'bg-text-muted', text: 'text-text-muted' };
817
+ return used >= 0.9 ? {
818
+ bar: 'bg-status-error',
819
+ text: 'text-status-error'
820
+ } : used >= 0.7 ? {
821
+ bar: 'bg-status-needs-you',
822
+ text: 'text-status-needs-you'
823
+ } : {
824
+ bar: 'bg-text-muted',
825
+ text: 'text-text-muted'
826
+ };
167
827
  }
168
828
  /*
169
829
  * The account the next turn runs under, for the chat's own CLI. Before the first turn any of them;
170
830
  * after it one that reads the conversation, since the others would start it over, and a fork is how
171
831
  * the conversation goes along to those. A switch applies from the next turn.
172
832
  */
173
- function AccountSubmenu({ provider, account }) {
174
- const host = useChatHost();
175
- const { t } = useTranslation('agent-chat');
176
- const { choice, started, onPick } = account;
177
- return (_jsxs(Menu.SubmenuRoot, { children: [_jsxs(Menu.SubmenuTrigger, { className: "text-text-muted", children: [_jsx("span", { className: "grid w-3.5 shrink-0 place-items-center", children: _jsx(AccountDot, { color: choice.current?.account.color }) }), _jsx("span", { className: "min-w-0 grow truncate", children: t('pickers.account.label') }), _jsx(Menu.Hint, { className: "truncate", children: choice.current === null ? choice.currentId : choice.nameOf(choice.current) })] }), _jsxs(Menu.Popup, { className: "min-w-64", children: [_jsxs(Menu.Group, { children: [_jsxs(Menu.GroupLabel, { className: "flex items-center gap-1.5", children: [_jsx(AgentIcon, { kind: provider, size: 12 }), choice.providerName] }), _jsx(Menu.RadioGroup, { value: choice.currentId, onValueChange: (id) => onPick(id), children: _jsx(AccountRows, { choice: choice, locked: (id) => started && !canContinueOn(choice.accounts, provider, choice.currentId, id) }) })] }), _jsx(Menu.Separator, {}), _jsxs(Menu.Item, { className: "text-text-muted", onClick: () => host.openSettings('providers'), children: [_jsx(Icon, { icon: Settings, size: 14, className: "shrink-0 text-text-faint" }), t('pickers.account.manage')] })] })] }));
833
+ function AccountSubmenu(t0) {
834
+ const $ = _c(51);
835
+ const {
836
+ provider,
837
+ account
838
+ } = t0;
839
+ const host = useChatHost();
840
+ const {
841
+ t
842
+ } = useTranslation("agent-chat");
843
+ const {
844
+ choice,
845
+ started,
846
+ onPick
847
+ } = account;
848
+ const t1 = choice.current?.account.color;
849
+ let t2;
850
+ if ($[0] !== t1) {
851
+ t2 = /*#__PURE__*/_jsx("span", {
852
+ className: "grid w-3.5 shrink-0 place-items-center",
853
+ children: /*#__PURE__*/_jsx(AccountDot, {
854
+ color: t1
855
+ })
856
+ });
857
+ $[0] = t1;
858
+ $[1] = t2;
859
+ } else {
860
+ t2 = $[1];
861
+ }
862
+ let t3;
863
+ if ($[2] !== t) {
864
+ t3 = t("pickers.account.label");
865
+ $[2] = t;
866
+ $[3] = t3;
867
+ } else {
868
+ t3 = $[3];
869
+ }
870
+ let t4;
871
+ if ($[4] !== t3) {
872
+ t4 = /*#__PURE__*/_jsx("span", {
873
+ className: "min-w-0 grow truncate",
874
+ children: t3
875
+ });
876
+ $[4] = t3;
877
+ $[5] = t4;
878
+ } else {
879
+ t4 = $[5];
880
+ }
881
+ let t5;
882
+ if ($[6] !== choice) {
883
+ t5 = choice.current === null ? choice.currentId : choice.nameOf(choice.current);
884
+ $[6] = choice;
885
+ $[7] = t5;
886
+ } else {
887
+ t5 = $[7];
888
+ }
889
+ let t6;
890
+ if ($[8] !== t5) {
891
+ t6 = /*#__PURE__*/_jsx(Menu.Hint, {
892
+ className: "truncate",
893
+ children: t5
894
+ });
895
+ $[8] = t5;
896
+ $[9] = t6;
897
+ } else {
898
+ t6 = $[9];
899
+ }
900
+ let t7;
901
+ if ($[10] !== t2 || $[11] !== t4 || $[12] !== t6) {
902
+ t7 = /*#__PURE__*/_jsxs(Menu.SubmenuTrigger, {
903
+ className: "text-text-muted",
904
+ children: [t2, t4, t6]
905
+ });
906
+ $[10] = t2;
907
+ $[11] = t4;
908
+ $[12] = t6;
909
+ $[13] = t7;
910
+ } else {
911
+ t7 = $[13];
912
+ }
913
+ let t8;
914
+ if ($[14] !== provider) {
915
+ t8 = /*#__PURE__*/_jsx(AgentIcon, {
916
+ kind: provider,
917
+ size: 12
918
+ });
919
+ $[14] = provider;
920
+ $[15] = t8;
921
+ } else {
922
+ t8 = $[15];
923
+ }
924
+ let t9;
925
+ if ($[16] !== choice.providerName || $[17] !== t8) {
926
+ t9 = /*#__PURE__*/_jsxs(Menu.GroupLabel, {
927
+ className: "flex items-center gap-1.5",
928
+ children: [t8, choice.providerName]
929
+ });
930
+ $[16] = choice.providerName;
931
+ $[17] = t8;
932
+ $[18] = t9;
933
+ } else {
934
+ t9 = $[18];
935
+ }
936
+ let t10;
937
+ if ($[19] !== onPick) {
938
+ t10 = id => onPick(id);
939
+ $[19] = onPick;
940
+ $[20] = t10;
941
+ } else {
942
+ t10 = $[20];
943
+ }
944
+ let t11;
945
+ if ($[21] !== choice.accounts || $[22] !== choice.currentId || $[23] !== provider || $[24] !== started) {
946
+ t11 = id_0 => started && !canContinueOn(choice.accounts, provider, choice.currentId, id_0);
947
+ $[21] = choice.accounts;
948
+ $[22] = choice.currentId;
949
+ $[23] = provider;
950
+ $[24] = started;
951
+ $[25] = t11;
952
+ } else {
953
+ t11 = $[25];
954
+ }
955
+ let t12;
956
+ if ($[26] !== choice || $[27] !== t11) {
957
+ t12 = /*#__PURE__*/_jsx(AccountRows, {
958
+ choice: choice,
959
+ locked: t11
960
+ });
961
+ $[26] = choice;
962
+ $[27] = t11;
963
+ $[28] = t12;
964
+ } else {
965
+ t12 = $[28];
966
+ }
967
+ let t13;
968
+ if ($[29] !== choice.currentId || $[30] !== t10 || $[31] !== t12) {
969
+ t13 = /*#__PURE__*/_jsx(Menu.RadioGroup, {
970
+ value: choice.currentId,
971
+ onValueChange: t10,
972
+ children: t12
973
+ });
974
+ $[29] = choice.currentId;
975
+ $[30] = t10;
976
+ $[31] = t12;
977
+ $[32] = t13;
978
+ } else {
979
+ t13 = $[32];
980
+ }
981
+ let t14;
982
+ if ($[33] !== t13 || $[34] !== t9) {
983
+ t14 = /*#__PURE__*/_jsxs(Menu.Group, {
984
+ children: [t9, t13]
985
+ });
986
+ $[33] = t13;
987
+ $[34] = t9;
988
+ $[35] = t14;
989
+ } else {
990
+ t14 = $[35];
991
+ }
992
+ let t15;
993
+ if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
994
+ t15 = /*#__PURE__*/_jsx(Menu.Separator, {});
995
+ $[36] = t15;
996
+ } else {
997
+ t15 = $[36];
998
+ }
999
+ let t16;
1000
+ if ($[37] !== host) {
1001
+ t16 = () => host.openSettings("providers");
1002
+ $[37] = host;
1003
+ $[38] = t16;
1004
+ } else {
1005
+ t16 = $[38];
1006
+ }
1007
+ let t17;
1008
+ if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
1009
+ t17 = /*#__PURE__*/_jsx(Icon, {
1010
+ icon: Settings,
1011
+ size: 14,
1012
+ className: "shrink-0 text-text-faint"
1013
+ });
1014
+ $[39] = t17;
1015
+ } else {
1016
+ t17 = $[39];
1017
+ }
1018
+ let t18;
1019
+ if ($[40] !== t) {
1020
+ t18 = t("pickers.account.manage");
1021
+ $[40] = t;
1022
+ $[41] = t18;
1023
+ } else {
1024
+ t18 = $[41];
1025
+ }
1026
+ let t19;
1027
+ if ($[42] !== t16 || $[43] !== t18) {
1028
+ t19 = /*#__PURE__*/_jsxs(Menu.Item, {
1029
+ className: "text-text-muted",
1030
+ onClick: t16,
1031
+ children: [t17, t18]
1032
+ });
1033
+ $[42] = t16;
1034
+ $[43] = t18;
1035
+ $[44] = t19;
1036
+ } else {
1037
+ t19 = $[44];
1038
+ }
1039
+ let t20;
1040
+ if ($[45] !== t14 || $[46] !== t19) {
1041
+ t20 = /*#__PURE__*/_jsxs(Menu.Popup, {
1042
+ className: "min-w-64",
1043
+ children: [t14, t15, t19]
1044
+ });
1045
+ $[45] = t14;
1046
+ $[46] = t19;
1047
+ $[47] = t20;
1048
+ } else {
1049
+ t20 = $[47];
1050
+ }
1051
+ let t21;
1052
+ if ($[48] !== t20 || $[49] !== t7) {
1053
+ t21 = /*#__PURE__*/_jsxs(Menu.SubmenuRoot, {
1054
+ children: [t7, t20]
1055
+ });
1056
+ $[48] = t20;
1057
+ $[49] = t7;
1058
+ $[50] = t21;
1059
+ } else {
1060
+ t21 = $[50];
1061
+ }
1062
+ return t21;
178
1063
  }
179
1064
  /* Mounted only while the submenu is open, since asking for the plan windows starts a CLI per account. */
180
- function AccountRows({ choice, locked }) {
181
- const { t } = useTranslation('agent-chat');
182
- const limits = useUsageLimits();
183
- const now = useNow(MINUTE_MS);
184
- return choice.offered.map((entry) => {
185
- const session = sessionWindow(limitsOfAccount(limits, entry.id));
186
- const disabled = locked(entry.id);
187
- const row = (_jsx(Menu.RadioItem, { value: entry.id, disabled: disabled, closeOnClick: true, className: "items-start data-disabled:opacity-50", children: _jsxs("span", { className: "flex min-w-0 grow flex-col", children: [_jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [_jsx(AccountDot, { color: entry.account.color }), _jsx("span", { className: "truncate", children: choice.nameOf(entry) })] }), session !== null && _jsx(SessionLine, { used: session.used, resetsAt: session.resetsAt, now: now })] }) }, entry.id));
188
- return disabled ? (_jsx(Tooltip, { label: t('pickers.account.forkToSwitch', { account: choice.nameOf(entry) }), side: "right", sideOffset: 12, children: row }, entry.id)) : (row);
189
- });
190
- }
191
- function SessionLine({ used, resetsAt, now }) {
192
- const { t } = useTranslation('agent-chat');
193
- const percent = Math.round(used * 100);
194
- const tone = sessionTone(used);
195
- return (_jsxs("span", { className: "flex items-center gap-2 text-xs text-text-faint tabular-nums", children: [_jsx("span", { "aria-hidden": true, className: "relative h-1 w-14 shrink-0 overflow-hidden rounded-full bg-surface-sunken", children: _jsx("span", { className: clsx('absolute inset-y-0 left-0 rounded-full', tone.bar), style: { width: `${Math.min(100, percent)}%` } }) }), _jsx("span", { className: tone.text, children: formatPercent(percent) }), resetsAt !== null && (_jsxs("span", { className: "whitespace-nowrap", children: ["\u00B7 ", t('pickers.account.resets', { time: isSameDay(resetsAt, now) ? formatClock(resetsAt) : formatWeekdayClock(resetsAt) })] }))] }));
1065
+ function AccountRows(t0) {
1066
+ const $ = _c(6);
1067
+ const {
1068
+ choice,
1069
+ locked
1070
+ } = t0;
1071
+ const {
1072
+ t
1073
+ } = useTranslation("agent-chat");
1074
+ const limits = useUsageLimits();
1075
+ const now = useNow(MINUTE_MS);
1076
+ let t1;
1077
+ if ($[0] !== choice || $[1] !== limits || $[2] !== locked || $[3] !== now || $[4] !== t) {
1078
+ t1 = choice.offered.map(entry => {
1079
+ const session = sessionWindow(limitsOfAccount(limits, entry.id));
1080
+ const disabled = locked(entry.id);
1081
+ const row = /*#__PURE__*/_jsx(Menu.RadioItem, {
1082
+ value: entry.id,
1083
+ disabled: disabled,
1084
+ closeOnClick: true,
1085
+ className: "items-start data-disabled:opacity-50",
1086
+ children: /*#__PURE__*/_jsxs("span", {
1087
+ className: "flex min-w-0 grow flex-col",
1088
+ children: [/*#__PURE__*/_jsxs("span", {
1089
+ className: "flex min-w-0 items-center gap-2",
1090
+ children: [/*#__PURE__*/_jsx(AccountDot, {
1091
+ color: entry.account.color
1092
+ }), /*#__PURE__*/_jsx("span", {
1093
+ className: "truncate",
1094
+ children: choice.nameOf(entry)
1095
+ })]
1096
+ }), session !== null && /*#__PURE__*/_jsx(SessionLine, {
1097
+ window: session,
1098
+ now: now
1099
+ })]
1100
+ })
1101
+ }, entry.id);
1102
+ return disabled ? /*#__PURE__*/_jsx(Tooltip, {
1103
+ label: t("pickers.account.forkToSwitch", {
1104
+ account: choice.nameOf(entry)
1105
+ }),
1106
+ side: "right",
1107
+ sideOffset: 12,
1108
+ children: row
1109
+ }, entry.id) : row;
1110
+ });
1111
+ $[0] = choice;
1112
+ $[1] = limits;
1113
+ $[2] = locked;
1114
+ $[3] = now;
1115
+ $[4] = t;
1116
+ $[5] = t1;
1117
+ } else {
1118
+ t1 = $[5];
1119
+ }
1120
+ return t1;
1121
+ }
1122
+ function SessionLine(t0) {
1123
+ const $ = _c(37);
1124
+ const {
1125
+ window,
1126
+ now
1127
+ } = t0;
1128
+ const {
1129
+ t
1130
+ } = useTranslation("agent-chat");
1131
+ let resetsAt;
1132
+ let t1;
1133
+ let t2;
1134
+ let t3;
1135
+ let t4;
1136
+ let t5;
1137
+ if ($[0] !== now || $[1] !== window) {
1138
+ const percent = Math.round(window.used * 100);
1139
+ const tone = sessionTone(window.used);
1140
+ const mark = evenPace(window, now)?.percent ?? null;
1141
+ resetsAt = window.resetsAt;
1142
+ t4 = "flex items-center gap-2 text-xs text-text-faint tabular-nums";
1143
+ const t6 = true;
1144
+ const t7 = "relative h-1 w-14 shrink-0 rounded-full bg-surface-sunken";
1145
+ const t8 = clsx("absolute inset-y-0 left-0 rounded-full", tone.bar);
1146
+ const t9 = `${Math.min(100, percent)}%`;
1147
+ let t10;
1148
+ if ($[8] !== t9) {
1149
+ t10 = {
1150
+ width: t9
1151
+ };
1152
+ $[8] = t9;
1153
+ $[9] = t10;
1154
+ } else {
1155
+ t10 = $[9];
1156
+ }
1157
+ let t11;
1158
+ if ($[10] !== t10 || $[11] !== t8) {
1159
+ t11 = /*#__PURE__*/_jsx("span", {
1160
+ className: t8,
1161
+ style: t10
1162
+ });
1163
+ $[10] = t10;
1164
+ $[11] = t8;
1165
+ $[12] = t11;
1166
+ } else {
1167
+ t11 = $[12];
1168
+ }
1169
+ const t12 = mark !== null && /*#__PURE__*/_jsx("span", {
1170
+ className: clsx("absolute -inset-y-0.5 w-px -translate-x-1/2", mark <= percent ? "bg-surface-raised" : "bg-text-muted"),
1171
+ style: {
1172
+ left: `${mark}%`
1173
+ }
1174
+ });
1175
+ if ($[13] !== t11 || $[14] !== t12 || $[15] !== t6 || $[16] !== t7) {
1176
+ t5 = /*#__PURE__*/_jsxs("span", {
1177
+ "aria-hidden": t6,
1178
+ className: t7,
1179
+ children: [t11, t12]
1180
+ });
1181
+ $[13] = t11;
1182
+ $[14] = t12;
1183
+ $[15] = t6;
1184
+ $[16] = t7;
1185
+ $[17] = t5;
1186
+ } else {
1187
+ t5 = $[17];
1188
+ }
1189
+ t1 = true;
1190
+ t2 = tone.text;
1191
+ t3 = formatPercent(percent);
1192
+ $[0] = now;
1193
+ $[1] = window;
1194
+ $[2] = resetsAt;
1195
+ $[3] = t1;
1196
+ $[4] = t2;
1197
+ $[5] = t3;
1198
+ $[6] = t4;
1199
+ $[7] = t5;
1200
+ } else {
1201
+ resetsAt = $[2];
1202
+ t1 = $[3];
1203
+ t2 = $[4];
1204
+ t3 = $[5];
1205
+ t4 = $[6];
1206
+ t5 = $[7];
1207
+ }
1208
+ let t6;
1209
+ if ($[18] !== t1 || $[19] !== t2 || $[20] !== t3) {
1210
+ t6 = /*#__PURE__*/_jsx("span", {
1211
+ "aria-hidden": t1,
1212
+ className: t2,
1213
+ children: t3
1214
+ });
1215
+ $[18] = t1;
1216
+ $[19] = t2;
1217
+ $[20] = t3;
1218
+ $[21] = t6;
1219
+ } else {
1220
+ t6 = $[21];
1221
+ }
1222
+ let t7;
1223
+ if ($[22] !== now || $[23] !== window) {
1224
+ t7 = paceText(window, now);
1225
+ $[22] = now;
1226
+ $[23] = window;
1227
+ $[24] = t7;
1228
+ } else {
1229
+ t7 = $[24];
1230
+ }
1231
+ let t8;
1232
+ if ($[25] !== t7) {
1233
+ t8 = /*#__PURE__*/_jsx("span", {
1234
+ className: "sr-only",
1235
+ children: t7
1236
+ });
1237
+ $[25] = t7;
1238
+ $[26] = t8;
1239
+ } else {
1240
+ t8 = $[26];
1241
+ }
1242
+ let t9;
1243
+ if ($[27] !== now || $[28] !== resetsAt || $[29] !== t) {
1244
+ t9 = resetsAt !== null && /*#__PURE__*/_jsxs("span", {
1245
+ className: "whitespace-nowrap",
1246
+ children: ["\xB7 ", t("pickers.account.resets", {
1247
+ time: isSameDay(resetsAt, now) ? formatClock(resetsAt) : formatWeekdayClock(resetsAt)
1248
+ })]
1249
+ });
1250
+ $[27] = now;
1251
+ $[28] = resetsAt;
1252
+ $[29] = t;
1253
+ $[30] = t9;
1254
+ } else {
1255
+ t9 = $[30];
1256
+ }
1257
+ let t10;
1258
+ if ($[31] !== t4 || $[32] !== t5 || $[33] !== t6 || $[34] !== t8 || $[35] !== t9) {
1259
+ t10 = /*#__PURE__*/_jsxs("span", {
1260
+ className: t4,
1261
+ children: [t5, t6, t8, t9]
1262
+ });
1263
+ $[31] = t4;
1264
+ $[32] = t5;
1265
+ $[33] = t6;
1266
+ $[34] = t8;
1267
+ $[35] = t9;
1268
+ $[36] = t10;
1269
+ } else {
1270
+ t10 = $[36];
1271
+ }
1272
+ return t10;
196
1273
  }
197
1274
  /* How full the context is, drawn small enough to sit in the pill beside the window's size. */
198
- function ContextRing({ usage }) {
199
- const fraction = contextFraction(usage);
200
- return (_jsxs("svg", { width: "14", height: "14", viewBox: "0 0 14 14", className: clsx('shrink-0', contextTone(fraction)), "aria-hidden": "true", children: [_jsx("circle", { cx: "7", cy: "7", r: RING_RADIUS, fill: "none", strokeWidth: "2", className: "stroke-border-strong" }), _jsx("circle", { cx: "7", cy: "7", r: RING_RADIUS, fill: "none", strokeWidth: "2", stroke: "currentColor", strokeDasharray: RING_CIRCUMFERENCE, strokeDashoffset: RING_CIRCUMFERENCE * (1 - fraction), transform: "rotate(-90 7 7)" })] }));
1275
+ function ContextRing(t0) {
1276
+ const $ = _c(15);
1277
+ const {
1278
+ usage
1279
+ } = t0;
1280
+ let fraction;
1281
+ let t1;
1282
+ let t2;
1283
+ let t3;
1284
+ let t4;
1285
+ if ($[0] !== usage) {
1286
+ fraction = contextFraction(usage);
1287
+ t1 = "14";
1288
+ t2 = "14";
1289
+ t3 = "0 0 14 14";
1290
+ t4 = clsx("shrink-0", contextTone(fraction));
1291
+ $[0] = usage;
1292
+ $[1] = fraction;
1293
+ $[2] = t1;
1294
+ $[3] = t2;
1295
+ $[4] = t3;
1296
+ $[5] = t4;
1297
+ } else {
1298
+ fraction = $[1];
1299
+ t1 = $[2];
1300
+ t2 = $[3];
1301
+ t3 = $[4];
1302
+ t4 = $[5];
1303
+ }
1304
+ let t5;
1305
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
1306
+ t5 = /*#__PURE__*/_jsx("circle", {
1307
+ cx: "7",
1308
+ cy: "7",
1309
+ r: RING_RADIUS,
1310
+ fill: "none",
1311
+ strokeWidth: "2",
1312
+ className: "stroke-border-strong"
1313
+ });
1314
+ $[6] = t5;
1315
+ } else {
1316
+ t5 = $[6];
1317
+ }
1318
+ const t6 = RING_CIRCUMFERENCE * (1 - fraction);
1319
+ let t7;
1320
+ if ($[7] !== t6) {
1321
+ t7 = /*#__PURE__*/_jsx("circle", {
1322
+ cx: "7",
1323
+ cy: "7",
1324
+ r: RING_RADIUS,
1325
+ fill: "none",
1326
+ strokeWidth: "2",
1327
+ stroke: "currentColor",
1328
+ strokeDasharray: RING_CIRCUMFERENCE,
1329
+ strokeDashoffset: t6,
1330
+ transform: "rotate(-90 7 7)"
1331
+ });
1332
+ $[7] = t6;
1333
+ $[8] = t7;
1334
+ } else {
1335
+ t7 = $[8];
1336
+ }
1337
+ let t8;
1338
+ if ($[9] !== t1 || $[10] !== t2 || $[11] !== t3 || $[12] !== t4 || $[13] !== t7) {
1339
+ t8 = /*#__PURE__*/_jsxs("svg", {
1340
+ width: t1,
1341
+ height: t2,
1342
+ viewBox: t3,
1343
+ className: t4,
1344
+ "aria-hidden": "true",
1345
+ children: [t5, t7]
1346
+ });
1347
+ $[9] = t1;
1348
+ $[10] = t2;
1349
+ $[11] = t3;
1350
+ $[12] = t4;
1351
+ $[13] = t7;
1352
+ $[14] = t8;
1353
+ } else {
1354
+ t8 = $[14];
1355
+ }
1356
+ return t8;
201
1357
  }
202
1358
  /* How full the context is and what fills it, and the one thing to do about a full context. */
203
- function ContextUsage({ usage, disabled, onCompact }) {
204
- const { t } = useTranslation('agent-chat');
205
- const fraction = contextFraction(usage);
1359
+ function ContextUsage(t0) {
1360
+ const $ = _c(35);
1361
+ const {
1362
+ usage,
1363
+ disabled,
1364
+ onCompact
1365
+ } = t0;
1366
+ const {
1367
+ t
1368
+ } = useTranslation("agent-chat");
1369
+ let T0;
1370
+ let fraction;
1371
+ let t1;
1372
+ let t2;
1373
+ let t3;
1374
+ let t4;
1375
+ if ($[0] !== t || $[1] !== usage) {
1376
+ fraction = contextFraction(usage);
206
1377
  const percent = Math.round(fraction * 100);
207
1378
  const segments = contextSegments(usage);
208
1379
  const used = formatTokens(usage.contextTokens);
209
- return (_jsxs(Menu.Group, { className: "flex flex-col gap-2 px-2.5 py-1.5", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Menu.GroupLabel, { unstyled: true, className: "min-w-0 grow truncate text-sm font-medium text-text", children: t('contextMeter.title') }), _jsx("span", { className: clsx('shrink-0 text-xs tabular-nums', fraction >= 0.7 ? contextTone(fraction) : 'text-text-faint'), children: usage.contextWindow ? t('contextMeter.of', { used, window: formatTokens(usage.contextWindow) }) : t('contextMeter.used', { tokens: used }) })] }), usage.contextWindow ? (_jsx("div", { role: "meter", "aria-valuenow": percent, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": t('contextMeter.aria', { percent }), className: "flex h-1.5 overflow-hidden rounded-full bg-surface-sunken", children: segments ? (segments.map((segment) => (_jsx("div", { className: clsx('h-full shrink-0', PART_COLORS[segment.part]), style: { width: `${segment.fraction * 100}%` } }, segment.part)))) : (_jsx("div", { className: clsx('h-full rounded-full bg-current', contextTone(fraction)), style: { width: `${percent}%` } })) })) : null, segments && (_jsx("div", { className: "flex flex-col gap-0.5 text-xs", children: segments.map((segment) => (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { "aria-hidden": "true", className: clsx('size-2 shrink-0 rounded-xs', PART_COLORS[segment.part]) }), _jsx("span", { className: "min-w-0 grow truncate text-text-muted", children: t(`contextMeter.parts.${segment.part}`) }), _jsx("span", { className: "shrink-0 text-text-faint tabular-nums", children: t('contextMeter.estimate', { tokens: formatTokens(segment.tokens) }) })] }, segment.part))) })), _jsxs("div", { className: "flex items-center gap-2 text-xs text-text-faint tabular-nums", children: [_jsx("span", { className: "min-w-0 grow truncate", children: usage.contextWindow ? t('contextMeter.percentUsed', { percent: formatPercent(fraction * 100) }) : null }), _jsxs(Menu.Item, { unstyled: true, className: "flex shrink-0 cursor-default items-center gap-0.5 rounded font-medium text-accent outline-none data-disabled:opacity-50 data-highlighted:underline", disabled: disabled || usage.contextTokens === 0, onClick: onCompact, children: [t('contextMeter.compactNow'), _jsx(Icon, { icon: ChevronRight, size: 12 })] })] })] }));
1380
+ T0 = Menu.Group;
1381
+ t1 = "flex flex-col gap-2 px-2.5 py-1.5";
1382
+ let t5;
1383
+ if ($[8] !== t) {
1384
+ t5 = t("contextMeter.title");
1385
+ $[8] = t;
1386
+ $[9] = t5;
1387
+ } else {
1388
+ t5 = $[9];
1389
+ }
1390
+ let t6;
1391
+ if ($[10] !== t5) {
1392
+ t6 = /*#__PURE__*/_jsx(Menu.GroupLabel, {
1393
+ unstyled: true,
1394
+ className: "min-w-0 grow truncate text-sm font-medium text-text",
1395
+ children: t5
1396
+ });
1397
+ $[10] = t5;
1398
+ $[11] = t6;
1399
+ } else {
1400
+ t6 = $[11];
1401
+ }
1402
+ t2 = /*#__PURE__*/_jsxs("div", {
1403
+ className: "flex items-center gap-2",
1404
+ children: [t6, /*#__PURE__*/_jsx("span", {
1405
+ className: clsx("shrink-0 text-xs tabular-nums", fraction >= 0.7 ? contextTone(fraction) : "text-text-faint"),
1406
+ children: usage.contextWindow ? t("contextMeter.of", {
1407
+ used,
1408
+ window: formatTokens(usage.contextWindow)
1409
+ }) : t("contextMeter.used", {
1410
+ tokens: used
1411
+ })
1412
+ })]
1413
+ });
1414
+ t3 = usage.contextWindow ? /*#__PURE__*/_jsx("div", {
1415
+ role: "meter",
1416
+ "aria-valuenow": percent,
1417
+ "aria-valuemin": 0,
1418
+ "aria-valuemax": 100,
1419
+ "aria-label": t("contextMeter.aria", {
1420
+ percent
1421
+ }),
1422
+ className: "flex h-1.5 overflow-hidden rounded-full bg-surface-sunken",
1423
+ children: segments ? segments.map(_temp4) : /*#__PURE__*/_jsx("div", {
1424
+ className: clsx("h-full rounded-full bg-current", contextTone(fraction)),
1425
+ style: {
1426
+ width: `${percent}%`
1427
+ }
1428
+ })
1429
+ }) : null;
1430
+ t4 = segments && /*#__PURE__*/_jsx("div", {
1431
+ className: "flex flex-col gap-0.5 text-xs",
1432
+ children: segments.map(segment_0 => /*#__PURE__*/_jsxs("div", {
1433
+ className: "flex items-center gap-2",
1434
+ children: [/*#__PURE__*/_jsx("span", {
1435
+ "aria-hidden": "true",
1436
+ className: clsx("size-2 shrink-0 rounded-xs", PART_COLORS[segment_0.part])
1437
+ }), /*#__PURE__*/_jsx("span", {
1438
+ className: "min-w-0 grow truncate text-text-muted",
1439
+ children: t(`contextMeter.parts.${segment_0.part}`)
1440
+ }), /*#__PURE__*/_jsx("span", {
1441
+ className: "shrink-0 text-text-faint tabular-nums",
1442
+ children: t("contextMeter.estimate", {
1443
+ tokens: formatTokens(segment_0.tokens)
1444
+ })
1445
+ })]
1446
+ }, segment_0.part))
1447
+ });
1448
+ $[0] = t;
1449
+ $[1] = usage;
1450
+ $[2] = T0;
1451
+ $[3] = fraction;
1452
+ $[4] = t1;
1453
+ $[5] = t2;
1454
+ $[6] = t3;
1455
+ $[7] = t4;
1456
+ } else {
1457
+ T0 = $[2];
1458
+ fraction = $[3];
1459
+ t1 = $[4];
1460
+ t2 = $[5];
1461
+ t3 = $[6];
1462
+ t4 = $[7];
1463
+ }
1464
+ let t5;
1465
+ if ($[12] !== fraction || $[13] !== t || $[14] !== usage.contextWindow) {
1466
+ t5 = usage.contextWindow ? t("contextMeter.percentUsed", {
1467
+ percent: formatPercent(fraction * 100)
1468
+ }) : null;
1469
+ $[12] = fraction;
1470
+ $[13] = t;
1471
+ $[14] = usage.contextWindow;
1472
+ $[15] = t5;
1473
+ } else {
1474
+ t5 = $[15];
1475
+ }
1476
+ let t6;
1477
+ if ($[16] !== t5) {
1478
+ t6 = /*#__PURE__*/_jsx("span", {
1479
+ className: "min-w-0 grow truncate",
1480
+ children: t5
1481
+ });
1482
+ $[16] = t5;
1483
+ $[17] = t6;
1484
+ } else {
1485
+ t6 = $[17];
1486
+ }
1487
+ const t7 = disabled || usage.contextTokens === 0;
1488
+ let t8;
1489
+ if ($[18] !== t) {
1490
+ t8 = t("contextMeter.compactNow");
1491
+ $[18] = t;
1492
+ $[19] = t8;
1493
+ } else {
1494
+ t8 = $[19];
1495
+ }
1496
+ let t9;
1497
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
1498
+ t9 = /*#__PURE__*/_jsx(Icon, {
1499
+ icon: ChevronRight,
1500
+ size: 12
1501
+ });
1502
+ $[20] = t9;
1503
+ } else {
1504
+ t9 = $[20];
1505
+ }
1506
+ let t10;
1507
+ if ($[21] !== onCompact || $[22] !== t7 || $[23] !== t8) {
1508
+ t10 = /*#__PURE__*/_jsxs(Menu.Item, {
1509
+ unstyled: true,
1510
+ className: "flex shrink-0 cursor-default items-center gap-0.5 rounded font-medium text-accent outline-none data-disabled:opacity-50 data-highlighted:underline",
1511
+ disabled: t7,
1512
+ onClick: onCompact,
1513
+ children: [t8, t9]
1514
+ });
1515
+ $[21] = onCompact;
1516
+ $[22] = t7;
1517
+ $[23] = t8;
1518
+ $[24] = t10;
1519
+ } else {
1520
+ t10 = $[24];
1521
+ }
1522
+ let t11;
1523
+ if ($[25] !== t10 || $[26] !== t6) {
1524
+ t11 = /*#__PURE__*/_jsxs("div", {
1525
+ className: "flex items-center gap-2 text-xs text-text-faint tabular-nums",
1526
+ children: [t6, t10]
1527
+ });
1528
+ $[25] = t10;
1529
+ $[26] = t6;
1530
+ $[27] = t11;
1531
+ } else {
1532
+ t11 = $[27];
1533
+ }
1534
+ let t12;
1535
+ if ($[28] !== T0 || $[29] !== t1 || $[30] !== t11 || $[31] !== t2 || $[32] !== t3 || $[33] !== t4) {
1536
+ t12 = /*#__PURE__*/_jsxs(T0, {
1537
+ className: t1,
1538
+ children: [t2, t3, t4, t11]
1539
+ });
1540
+ $[28] = T0;
1541
+ $[29] = t1;
1542
+ $[30] = t11;
1543
+ $[31] = t2;
1544
+ $[32] = t3;
1545
+ $[33] = t4;
1546
+ $[34] = t12;
1547
+ } else {
1548
+ t12 = $[34];
1549
+ }
1550
+ return t12;
210
1551
  }
211
1552
  /*
212
1553
  * One of the model's own knobs: a few choices side by side, more of them in a submenu, a checkbox for
213
1554
  * a boolean. Every choice is a menu item, so the arrow keys reach it.
214
1555
  */
215
- function OptionRow({ option, selection, onChange }) {
216
- const icon = _jsx(Icon, { icon: optionIcon(option), size: 14, className: "shrink-0 text-text-faint" });
217
- if (option.type === 'boolean') {
218
- const checked = (selection.options[option.id] ?? option.defaultValue) === true;
219
- const item = (_jsxs(Menu.CheckboxItem, { indicator: "end", className: "text-text-muted", checked: checked, onCheckedChange: onChange, closeOnClick: false, children: [icon, _jsx("span", { className: "min-w-0 grow truncate", children: option.label })] }));
220
- return option.description ? (_jsx(Tooltip, { label: option.description, side: "right", sideOffset: 12, children: item })) : (item);
1556
+ function _temp4(segment) {
1557
+ return /*#__PURE__*/_jsx("div", {
1558
+ className: clsx("h-full shrink-0", PART_COLORS[segment.part]),
1559
+ style: {
1560
+ width: `${segment.fraction * 100}%`
1561
+ }
1562
+ }, segment.part);
1563
+ }
1564
+ function OptionRow(t0) {
1565
+ const $ = _c(54);
1566
+ const {
1567
+ option,
1568
+ selection,
1569
+ onChange
1570
+ } = t0;
1571
+ let t1;
1572
+ if ($[0] !== option) {
1573
+ t1 = optionIcon(option);
1574
+ $[0] = option;
1575
+ $[1] = t1;
1576
+ } else {
1577
+ t1 = $[1];
1578
+ }
1579
+ let t2;
1580
+ if ($[2] !== t1) {
1581
+ t2 = /*#__PURE__*/_jsx(Icon, {
1582
+ icon: t1,
1583
+ size: 14,
1584
+ className: "shrink-0 text-text-faint"
1585
+ });
1586
+ $[2] = t1;
1587
+ $[3] = t2;
1588
+ } else {
1589
+ t2 = $[3];
1590
+ }
1591
+ const icon = t2;
1592
+ if (option.type === "boolean") {
1593
+ const checked = (selection.options[option.id] ?? option.defaultValue) === true;
1594
+ let t3;
1595
+ if ($[4] !== option.label) {
1596
+ t3 = /*#__PURE__*/_jsx("span", {
1597
+ className: "min-w-0 grow truncate",
1598
+ children: option.label
1599
+ });
1600
+ $[4] = option.label;
1601
+ $[5] = t3;
1602
+ } else {
1603
+ t3 = $[5];
1604
+ }
1605
+ let t4;
1606
+ if ($[6] !== checked || $[7] !== icon || $[8] !== onChange || $[9] !== t3) {
1607
+ t4 = /*#__PURE__*/_jsxs(Menu.CheckboxItem, {
1608
+ indicator: "end",
1609
+ className: "text-text-muted",
1610
+ checked: checked,
1611
+ onCheckedChange: onChange,
1612
+ closeOnClick: false,
1613
+ children: [icon, t3]
1614
+ });
1615
+ $[6] = checked;
1616
+ $[7] = icon;
1617
+ $[8] = onChange;
1618
+ $[9] = t3;
1619
+ $[10] = t4;
1620
+ } else {
1621
+ t4 = $[10];
1622
+ }
1623
+ const item = t4;
1624
+ let t5;
1625
+ if ($[11] !== item || $[12] !== option.description) {
1626
+ t5 = option.description ? /*#__PURE__*/_jsx(Tooltip, {
1627
+ label: option.description,
1628
+ side: "right",
1629
+ sideOffset: 12,
1630
+ children: item
1631
+ }) : item;
1632
+ $[11] = item;
1633
+ $[12] = option.description;
1634
+ $[13] = t5;
1635
+ } else {
1636
+ t5 = $[13];
1637
+ }
1638
+ return t5;
1639
+ }
1640
+ const value = String(selection.options[option.id] ?? option.defaultChoice);
1641
+ if (option.choices.length > INLINE_CHOICES) {
1642
+ let t3;
1643
+ if ($[14] !== option.label) {
1644
+ t3 = /*#__PURE__*/_jsx("span", {
1645
+ className: "min-w-0 grow truncate",
1646
+ children: option.label
1647
+ });
1648
+ $[14] = option.label;
1649
+ $[15] = t3;
1650
+ } else {
1651
+ t3 = $[15];
221
1652
  }
222
- const value = String(selection.options[option.id] ?? option.defaultChoice);
223
- if (option.choices.length > INLINE_CHOICES) {
224
- return (_jsxs(Menu.SubmenuRoot, { children: [_jsxs(Menu.SubmenuTrigger, { className: "text-text-muted", children: [icon, _jsx("span", { className: "min-w-0 grow truncate", children: option.label }), _jsx(Menu.Hint, { children: option.choices.find((choice) => choice.id === value)?.label })] }), _jsx(Menu.Popup, { className: "min-w-56", children: _jsx(Menu.RadioGroup, { value: value, onValueChange: (next) => onChange(next), children: option.choices.map((choice) => (_jsx(Menu.RadioItem, { value: choice.id, className: choice.description ? 'items-start' : undefined, children: _jsxs("span", { className: "flex min-w-0 grow flex-col", children: [choice.label, choice.description && _jsx("span", { className: "text-xs text-text-faint", children: choice.description })] }) }, choice.id))) }) })] }));
1653
+ let t4;
1654
+ if ($[16] !== option.choices || $[17] !== value) {
1655
+ t4 = option.choices.find(choice => choice.id === value)?.label;
1656
+ $[16] = option.choices;
1657
+ $[17] = value;
1658
+ $[18] = t4;
1659
+ } else {
1660
+ t4 = $[18];
225
1661
  }
226
- return (_jsxs("div", { className: "flex items-center gap-2.5 px-2.5 py-1.5 text-sm text-text-muted", children: [icon, _jsx("span", { className: "min-w-0 grow truncate", children: option.label }), _jsx(Menu.RadioGroup, { value: value, onValueChange: (next) => onChange(next), "aria-label": option.label, className: "flex gap-0.5 rounded-md bg-surface-sunken p-0.5", children: option.choices.map((choice) => (_jsx(Menu.RadioItem, { unstyled: true, value: choice.id, className: clsx('flex h-6 cursor-default items-center rounded px-2 text-xs outline-none', choice.id === value ? 'bg-surface-active text-text' : 'text-text-muted data-highlighted:text-text'), children: choice.label }, choice.id))) })] }));
1662
+ let t5;
1663
+ if ($[19] !== t4) {
1664
+ t5 = /*#__PURE__*/_jsx(Menu.Hint, {
1665
+ children: t4
1666
+ });
1667
+ $[19] = t4;
1668
+ $[20] = t5;
1669
+ } else {
1670
+ t5 = $[20];
1671
+ }
1672
+ let t6;
1673
+ if ($[21] !== icon || $[22] !== t3 || $[23] !== t5) {
1674
+ t6 = /*#__PURE__*/_jsxs(Menu.SubmenuTrigger, {
1675
+ className: "text-text-muted",
1676
+ children: [icon, t3, t5]
1677
+ });
1678
+ $[21] = icon;
1679
+ $[22] = t3;
1680
+ $[23] = t5;
1681
+ $[24] = t6;
1682
+ } else {
1683
+ t6 = $[24];
1684
+ }
1685
+ let t7;
1686
+ if ($[25] !== onChange) {
1687
+ t7 = next => onChange(next);
1688
+ $[25] = onChange;
1689
+ $[26] = t7;
1690
+ } else {
1691
+ t7 = $[26];
1692
+ }
1693
+ let t8;
1694
+ if ($[27] !== option.choices) {
1695
+ t8 = option.choices.map(_temp5);
1696
+ $[27] = option.choices;
1697
+ $[28] = t8;
1698
+ } else {
1699
+ t8 = $[28];
1700
+ }
1701
+ let t9;
1702
+ if ($[29] !== t7 || $[30] !== t8 || $[31] !== value) {
1703
+ t9 = /*#__PURE__*/_jsx(Menu.Popup, {
1704
+ className: "min-w-56",
1705
+ children: /*#__PURE__*/_jsx(Menu.RadioGroup, {
1706
+ value: value,
1707
+ onValueChange: t7,
1708
+ children: t8
1709
+ })
1710
+ });
1711
+ $[29] = t7;
1712
+ $[30] = t8;
1713
+ $[31] = value;
1714
+ $[32] = t9;
1715
+ } else {
1716
+ t9 = $[32];
1717
+ }
1718
+ let t10;
1719
+ if ($[33] !== t6 || $[34] !== t9) {
1720
+ t10 = /*#__PURE__*/_jsxs(Menu.SubmenuRoot, {
1721
+ children: [t6, t9]
1722
+ });
1723
+ $[33] = t6;
1724
+ $[34] = t9;
1725
+ $[35] = t10;
1726
+ } else {
1727
+ t10 = $[35];
1728
+ }
1729
+ return t10;
1730
+ }
1731
+ let t3;
1732
+ if ($[36] !== option.label) {
1733
+ t3 = /*#__PURE__*/_jsx("span", {
1734
+ className: "min-w-0 grow truncate",
1735
+ children: option.label
1736
+ });
1737
+ $[36] = option.label;
1738
+ $[37] = t3;
1739
+ } else {
1740
+ t3 = $[37];
1741
+ }
1742
+ let t4;
1743
+ if ($[38] !== onChange) {
1744
+ t4 = next_0 => onChange(next_0);
1745
+ $[38] = onChange;
1746
+ $[39] = t4;
1747
+ } else {
1748
+ t4 = $[39];
1749
+ }
1750
+ const t5 = option.label;
1751
+ let t6;
1752
+ if ($[40] !== option.choices || $[41] !== value) {
1753
+ let t7;
1754
+ if ($[43] !== value) {
1755
+ t7 = choice_1 => /*#__PURE__*/_jsx(Menu.RadioItem, {
1756
+ unstyled: true,
1757
+ value: choice_1.id,
1758
+ className: clsx("flex h-6 cursor-default items-center rounded px-2 text-xs outline-none", choice_1.id === value ? "bg-surface-active text-text" : "text-text-muted data-highlighted:text-text"),
1759
+ children: choice_1.label
1760
+ }, choice_1.id);
1761
+ $[43] = value;
1762
+ $[44] = t7;
1763
+ } else {
1764
+ t7 = $[44];
1765
+ }
1766
+ t6 = option.choices.map(t7);
1767
+ $[40] = option.choices;
1768
+ $[41] = value;
1769
+ $[42] = t6;
1770
+ } else {
1771
+ t6 = $[42];
1772
+ }
1773
+ let t7;
1774
+ if ($[45] !== option.label || $[46] !== t4 || $[47] !== t6 || $[48] !== value) {
1775
+ t7 = /*#__PURE__*/_jsx(Menu.RadioGroup, {
1776
+ value: value,
1777
+ onValueChange: t4,
1778
+ "aria-label": t5,
1779
+ className: "flex gap-0.5 rounded-md bg-surface-sunken p-0.5",
1780
+ children: t6
1781
+ });
1782
+ $[45] = option.label;
1783
+ $[46] = t4;
1784
+ $[47] = t6;
1785
+ $[48] = value;
1786
+ $[49] = t7;
1787
+ } else {
1788
+ t7 = $[49];
1789
+ }
1790
+ let t8;
1791
+ if ($[50] !== icon || $[51] !== t3 || $[52] !== t7) {
1792
+ t8 = /*#__PURE__*/_jsxs("div", {
1793
+ className: "flex items-center gap-2.5 px-2.5 py-1.5 text-sm text-text-muted",
1794
+ children: [icon, t3, t7]
1795
+ });
1796
+ $[50] = icon;
1797
+ $[51] = t3;
1798
+ $[52] = t7;
1799
+ $[53] = t8;
1800
+ } else {
1801
+ t8 = $[53];
1802
+ }
1803
+ return t8;
227
1804
  }
1805
+ function _temp5(choice_0) {
1806
+ return /*#__PURE__*/_jsx(Menu.RadioItem, {
1807
+ value: choice_0.id,
1808
+ className: choice_0.description ? "items-start" : undefined,
1809
+ children: /*#__PURE__*/_jsxs("span", {
1810
+ className: "flex min-w-0 grow flex-col",
1811
+ children: [choice_0.label, choice_0.description && /*#__PURE__*/_jsx("span", {
1812
+ className: "text-xs text-text-faint",
1813
+ children: choice_0.description
1814
+ })]
1815
+ })
1816
+ }, choice_0.id);
1817
+ }