zidane-ui 9.4.0 → 9.5.2

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 (562) hide show
  1. package/dist/adapters/index.d.ts +2 -1
  2. package/dist/adapters/index.js +2 -1
  3. package/dist/adapters/live.d.ts +7 -2
  4. package/dist/adapters/live.js +5 -2
  5. package/dist/adapters/server-approvals-host.js +3 -1
  6. package/dist/adapters/server-channels-host.d.ts +32 -0
  7. package/dist/adapters/server-channels-host.js +49 -0
  8. package/dist/adapters/server-composer-host.js +13 -0
  9. package/dist/adapters/server-files-host.js +12 -31
  10. package/dist/adapters/server-host.js +27 -3
  11. package/dist/adapters/server-machines-host.d.ts +5 -0
  12. package/dist/adapters/server-machines-host.js +13 -6
  13. package/dist/adapters/server-oauth-flow.d.ts +2 -1
  14. package/dist/adapters/server-projects.d.ts +15 -0
  15. package/dist/adapters/server-projects.js +225 -0
  16. package/dist/adapters/server-session-host.d.ts +2 -0
  17. package/dist/adapters/server-session-host.js +20 -1
  18. package/dist/app/AppHostProvider.d.ts +1 -1
  19. package/dist/app/AppHostProvider.js +7 -2
  20. package/dist/app/ModalProvider.d.ts +6 -2
  21. package/dist/app/ModalProvider.js +38 -10
  22. package/dist/app/headless/app-host.d.ts +3 -0
  23. package/dist/approvals/ApprovalsProvider.d.ts +2 -1
  24. package/dist/approvals/ApprovalsProvider.js +12 -4
  25. package/dist/approvals/headless/host.d.ts +13 -2
  26. package/dist/approvals/headless/index.d.ts +3 -3
  27. package/dist/approvals/headless/index.js +2 -2
  28. package/dist/approvals/headless/labels.d.ts +12 -2
  29. package/dist/approvals/headless/labels.js +19 -1
  30. package/dist/channels/BindingEditorDialog.d.ts +18 -0
  31. package/dist/channels/BindingEditorDialog.js +637 -0
  32. package/dist/channels/ChannelAlertsList.d.ts +25 -0
  33. package/dist/channels/ChannelAlertsList.js +107 -0
  34. package/dist/channels/ChannelDefaultsSection.d.ts +20 -0
  35. package/dist/channels/ChannelDefaultsSection.js +133 -0
  36. package/dist/channels/ChannelsProvider.d.ts +31 -0
  37. package/dist/channels/ChannelsProvider.js +29 -0
  38. package/dist/channels/ChannelsSettingsSection.d.ts +40 -0
  39. package/dist/channels/ChannelsSettingsSection.js +456 -0
  40. package/dist/channels/ConnectionSetupDialog.d.ts +16 -0
  41. package/dist/channels/ConnectionSetupDialog.js +470 -0
  42. package/dist/channels/HeldRepliesList.d.ts +27 -0
  43. package/dist/channels/HeldRepliesList.js +173 -0
  44. package/dist/channels/ProjectChannelsSection.d.ts +55 -0
  45. package/dist/channels/ProjectChannelsSection.js +433 -0
  46. package/dist/channels/ReadinessChecklist.d.ts +102 -0
  47. package/dist/channels/ReadinessChecklist.js +273 -0
  48. package/dist/channels/TestSessionBanner.d.ts +24 -0
  49. package/dist/channels/TestSessionBanner.js +44 -0
  50. package/dist/channels/channels-parts.d.ts +104 -0
  51. package/dist/channels/channels-parts.js +203 -0
  52. package/dist/channels/context.d.ts +9 -0
  53. package/dist/channels/context.js +14 -0
  54. package/dist/channels/headless/access.d.ts +127 -0
  55. package/dist/channels/headless/access.js +187 -0
  56. package/dist/channels/headless/fixture-host.d.ts +83 -0
  57. package/dist/channels/headless/fixture-host.js +557 -0
  58. package/dist/channels/headless/host.d.ts +245 -0
  59. package/dist/channels/headless/host.js +39 -0
  60. package/dist/channels/headless/index.d.ts +10 -0
  61. package/dist/channels/headless/index.js +5 -0
  62. package/dist/channels/headless/labels.d.ts +217 -0
  63. package/dist/channels/headless/labels.js +260 -0
  64. package/dist/channels/headless/state.d.ts +22 -0
  65. package/dist/channels/headless/state.js +303 -0
  66. package/dist/channels/index.d.ts +21 -0
  67. package/dist/channels/index.js +13 -0
  68. package/dist/channels/testing/contract.d.ts +31 -0
  69. package/dist/channels/testing/contract.js +378 -0
  70. package/dist/channels/testing/index.d.ts +7 -0
  71. package/dist/channels/testing/index.js +1 -0
  72. package/dist/chat/HostBadge.js +1 -0
  73. package/dist/chat/OrchestratorBadge.d.ts +23 -0
  74. package/dist/chat/OrchestratorBadge.js +22 -0
  75. package/dist/chat/SessionGroupHeader.d.ts +11 -1
  76. package/dist/chat/SessionGroupHeader.js +25 -14
  77. package/dist/chat/SessionList.d.ts +1 -1
  78. package/dist/chat/SessionList.js +1 -1
  79. package/dist/chat/SessionRow.d.ts +141 -0
  80. package/dist/chat/SessionRow.js +215 -0
  81. package/dist/chat/StatusDot.d.ts +7 -2
  82. package/dist/chat/StatusDot.js +3 -2
  83. package/dist/chat/Transcript.js +6 -2
  84. package/dist/chat/composer/ComposerEditor.js +1 -1
  85. package/dist/chat/composer/ContextBreakdown.d.ts +27 -2
  86. package/dist/chat/composer/ContextBreakdown.js +123 -2
  87. package/dist/chat/composer/DraftPickers.d.ts +8 -2
  88. package/dist/chat/composer/DraftPickers.js +7 -3
  89. package/dist/chat/composer/HostContextOrb.d.ts +2 -0
  90. package/dist/chat/composer/HostContextOrb.js +17 -2
  91. package/dist/chat/composer/ProjectMenu.d.ts +16 -3
  92. package/dist/chat/composer/ProjectMenu.js +102 -20
  93. package/dist/chat/composer/ScopeToggle.d.ts +7 -2
  94. package/dist/chat/composer/ScopeToggle.js +4 -2
  95. package/dist/chat/composer/ServerScopeToggle.d.ts +7 -2
  96. package/dist/chat/composer/ServerScopeToggle.js +3 -1
  97. package/dist/chat/composer/index.d.ts +2 -2
  98. package/dist/chat/composer/index.js +2 -2
  99. package/dist/chat/composer/use-draft-target.d.ts +12 -1
  100. package/dist/chat/composer/use-draft-target.js +22 -10
  101. package/dist/chat/composer/use-send-prompt.d.ts +2 -0
  102. package/dist/chat/composer/use-send-prompt.js +4 -1
  103. package/dist/chat/headless/answered-first.d.ts +28 -0
  104. package/dist/chat/headless/answered-first.js +14 -0
  105. package/dist/chat/headless/chip-labels.d.ts +2 -0
  106. package/dist/chat/headless/chip-labels.js +2 -0
  107. package/dist/chat/headless/composer/composer-sources.d.ts +5 -2
  108. package/dist/chat/headless/composer/composer-sources.js +6 -0
  109. package/dist/chat/headless/composer/host.d.ts +13 -0
  110. package/dist/chat/headless/composer/index.d.ts +2 -2
  111. package/dist/chat/headless/composer/labels-chrome.d.ts +3 -0
  112. package/dist/chat/headless/composer/labels-chrome.js +4 -1
  113. package/dist/chat/headless/composer/labels-editor.d.ts +2 -0
  114. package/dist/chat/headless/composer/labels-editor.js +2 -0
  115. package/dist/chat/headless/draft-target.d.ts +2 -0
  116. package/dist/chat/headless/fixtures/demo-transcript-all-kinds.d.ts +6 -0
  117. package/dist/chat/headless/fixtures/demo-transcript-all-kinds.js +90 -2
  118. package/dist/chat/headless/folder-groups.d.ts +41 -0
  119. package/dist/chat/headless/folder-groups.js +76 -0
  120. package/dist/chat/headless/host.d.ts +16 -1
  121. package/dist/chat/headless/hosts.d.ts +1 -1
  122. package/dist/chat/headless/index.d.ts +15 -10
  123. package/dist/chat/headless/index.js +35 -30
  124. package/dist/chat/headless/labels.d.ts +43 -4
  125. package/dist/chat/headless/labels.js +40 -9
  126. package/dist/chat/headless/prompt-origin.d.ts +2 -2
  127. package/dist/chat/headless/prompt-origin.js +3 -3
  128. package/dist/chat/headless/send-flow.d.ts +2 -0
  129. package/dist/chat/headless/session-list.d.ts +36 -2
  130. package/dist/chat/headless/session-list.js +7 -0
  131. package/dist/chat/headless/sidebar/directory.d.ts +5 -0
  132. package/dist/chat/headless/sidebar/directory.js +2 -0
  133. package/dist/chat/headless/sidebar/inbox.d.ts +33 -7
  134. package/dist/chat/headless/sidebar/inbox.js +65 -26
  135. package/dist/chat/headless/sidebar/index.d.ts +6 -4
  136. package/dist/chat/headless/sidebar/index.js +5 -3
  137. package/dist/chat/headless/sidebar/labels.d.ts +36 -7
  138. package/dist/chat/headless/sidebar/labels.js +1 -4
  139. package/dist/chat/headless/sidebar/project-main.d.ts +43 -0
  140. package/dist/chat/headless/sidebar/project-main.js +46 -0
  141. package/dist/chat/headless/sidebar/row-changes.d.ts +43 -0
  142. package/dist/chat/headless/sidebar/row-changes.js +43 -0
  143. package/dist/chat/headless/sidebar/rows.d.ts +64 -6
  144. package/dist/chat/headless/sidebar/rows.js +98 -18
  145. package/dist/chat/headless/sidebar/types.d.ts +12 -0
  146. package/dist/chat/headless/streams/live-events.d.ts +12 -0
  147. package/dist/chat/headless/streams/live-events.js +21 -2
  148. package/dist/chat/headless/streams/store.d.ts +17 -0
  149. package/dist/chat/headless/streams/store.js +38 -15
  150. package/dist/chat/headless/streams/types.d.ts +2 -1
  151. package/dist/chat/headless/transcript/collapse.js +3 -1
  152. package/dist/chat/headless/transcript/derive.d.ts +1 -0
  153. package/dist/chat/headless/transcript/derive.js +3 -1
  154. package/dist/chat/headless/transcript/fold.js +1 -0
  155. package/dist/chat/headless/transcript/index.d.ts +3 -2
  156. package/dist/chat/headless/transcript/index.js +2 -1
  157. package/dist/chat/headless/transcript/rail.d.ts +8 -1
  158. package/dist/chat/headless/transcript/rail.js +10 -2
  159. package/dist/chat/headless/transcript/rows.d.ts +31 -3
  160. package/dist/chat/headless/transcript/select-stops.js +1 -0
  161. package/dist/chat/headless/transcript/session-groups.d.ts +36 -0
  162. package/dist/chat/headless/transcript/session-groups.js +94 -0
  163. package/dist/chat/headless/transcript-labels.d.ts +1 -0
  164. package/dist/chat/index.d.ts +8 -5
  165. package/dist/chat/index.js +9 -6
  166. package/dist/chat/interactions/HostInteractions.js +4 -2
  167. package/dist/chat/interactions/InboxPanel.js +6 -4
  168. package/dist/chat/interactions/use-answer-interaction.d.ts +11 -0
  169. package/dist/chat/interactions/use-answer-interaction.js +19 -0
  170. package/dist/chat/rich-composer/artifact-mentions.d.ts +29 -0
  171. package/dist/chat/rich-composer/artifact-mentions.js +40 -0
  172. package/dist/chat/rich-composer/composer-extensions.d.ts +3 -2
  173. package/dist/chat/rich-composer/composer-extensions.js +12 -9
  174. package/dist/chat/rich-composer/use-composer-sources.js +1 -0
  175. package/dist/chat/sidebar/InboxList.d.ts +26 -2
  176. package/dist/chat/sidebar/InboxList.js +65 -49
  177. package/dist/chat/sidebar/MainSessionRow.d.ts +2 -1
  178. package/dist/chat/sidebar/MainSessionRow.js +1 -1
  179. package/dist/chat/sidebar/ProjectIcon.d.ts +8 -4
  180. package/dist/chat/sidebar/ProjectIcon.js +15 -3
  181. package/dist/chat/sidebar/SessionSidebar.d.ts +51 -2
  182. package/dist/chat/sidebar/SessionSidebar.js +87 -17
  183. package/dist/chat/sidebar/SidebarFooter.d.ts +2 -23
  184. package/dist/chat/sidebar/SidebarFooter.js +2 -43
  185. package/dist/chat/sidebar/SidebarGroupHeader.d.ts +12 -3
  186. package/dist/chat/sidebar/SidebarGroupHeader.js +36 -15
  187. package/dist/chat/sidebar/SidebarLiveProvider.d.ts +22 -0
  188. package/dist/chat/sidebar/SidebarLiveProvider.js +20 -0
  189. package/dist/chat/sidebar/SidebarSessionRow.d.ts +6 -1
  190. package/dist/chat/sidebar/SidebarSessionRow.js +16 -7
  191. package/dist/chat/sidebar/inbox-triage.d.ts +18 -2
  192. package/dist/chat/sidebar/inbox-triage.js +39 -12
  193. package/dist/chat/sidebar/index.d.ts +5 -4
  194. package/dist/chat/sidebar/index.js +3 -2
  195. package/dist/chat/sidebar/sidebar-live.d.ts +29 -2
  196. package/dist/chat/sidebar/sidebar-live.js +36 -2
  197. package/dist/chat/sidebar/useInboxRows.d.ts +4 -1
  198. package/dist/chat/sidebar/useInboxRows.js +8 -6
  199. package/dist/chat/sidebar/useInboxTriage.d.ts +8 -2
  200. package/dist/chat/sidebar/useInboxTriage.js +29 -20
  201. package/dist/chat/testing/fixture-composer-host.d.ts +3 -1
  202. package/dist/chat/testing/fixture-composer-host.js +1 -0
  203. package/dist/chat/testing/index.d.ts +2 -2
  204. package/dist/chat/testing/index.js +2 -2
  205. package/dist/chat/transcript/BadgeMenu.d.ts +9 -2
  206. package/dist/chat/transcript/BadgeMenu.js +20 -2
  207. package/dist/chat/transcript/PromptEcho.js +15 -2
  208. package/dist/chat/transcript/PromptOriginLabel.d.ts +1 -1
  209. package/dist/chat/transcript/SubagentBlock.js +24 -7
  210. package/dist/chat/transcript/TranscriptRail.d.ts +3 -1
  211. package/dist/chat/transcript/TranscriptRail.js +15 -5
  212. package/dist/chat/transcript/TranscriptRow.js +9 -0
  213. package/dist/chat/transcript/badges.d.ts +1 -0
  214. package/dist/chat/transcript/badges.js +1 -0
  215. package/dist/chat/transcript/fold.js +2 -1
  216. package/dist/chat/transcript/frame.d.ts +7 -0
  217. package/dist/chat/transcript/frame.js +51 -5
  218. package/dist/chat/transcript/index.d.ts +5 -4
  219. package/dist/chat/transcript/index.js +4 -3
  220. package/dist/chat/transcript/inline-facts.d.ts +9 -0
  221. package/dist/chat/transcript/inline-facts.js +20 -0
  222. package/dist/chat/transcript/notices.d.ts +34 -12
  223. package/dist/chat/transcript/notices.js +213 -97
  224. package/dist/chat/transcript/prompt.js +8 -1
  225. package/dist/chat/transcript/receipt-parts.d.ts +29 -2
  226. package/dist/chat/transcript/receipt-parts.js +40 -7
  227. package/dist/chat/transcript/row-estimate.js +4 -1
  228. package/dist/chat/transcript/run-rows.js +2 -5
  229. package/dist/chat/transcript/script-input.d.ts +1 -1
  230. package/dist/chat/transcript/session-groups.d.ts +21 -0
  231. package/dist/chat/transcript/session-groups.js +154 -0
  232. package/dist/chat/transcript/session-line.d.ts +63 -0
  233. package/dist/chat/transcript/session-line.js +114 -0
  234. package/dist/chat/transcript/tasks.d.ts +1 -1
  235. package/dist/chat/transcript/tasks.js +1 -1
  236. package/dist/chat/transcript/tool-row.js +3 -2
  237. package/dist/code/editor/FileView.js +1 -3
  238. package/dist/components/Form.d.ts +28 -1
  239. package/dist/components/Form.js +43 -7
  240. package/dist/components/HelpTip.d.ts +22 -0
  241. package/dist/components/HelpTip.js +26 -0
  242. package/dist/components/Menu.js +1 -1
  243. package/dist/components/Notice.d.ts +6 -4
  244. package/dist/components/Notice.js +73 -27
  245. package/dist/components/Progress.js +10 -4
  246. package/dist/components/SearchField.d.ts +46 -0
  247. package/dist/components/SearchField.js +50 -0
  248. package/dist/components/ShowMore.d.ts +48 -0
  249. package/dist/components/ShowMore.js +57 -0
  250. package/dist/components/Tooltip.js +8 -5
  251. package/dist/components/charts/ScatterChart.js +13 -6
  252. package/dist/components/floating/FloatingSurface.js +2 -2
  253. package/dist/components/floating/useAnchoredPosition.d.ts +15 -1
  254. package/dist/components/floating/useAnchoredPosition.js +41 -7
  255. package/dist/components/palette/PaletteList.d.ts +5 -5
  256. package/dist/components/palette/PaletteList.js +2 -3
  257. package/dist/components/palette/PalettePanel.js +18 -12
  258. package/dist/components/palette/palette-layout.d.ts +5 -1
  259. package/dist/components/palette/palette-layout.js +13 -10
  260. package/dist/core.css +45 -20
  261. package/dist/dist/index-BmO8bRgK.d.ts +1 -0
  262. package/dist/dist/{index-BheVJOLc.d.ts → index-DPbpsCtl.d.ts} +248 -118
  263. package/dist/dist/index.d.ts +5 -5
  264. package/dist/dist/sandbox-Bzg_jJK2.d.ts +2 -0
  265. package/dist/dist/{timeout-CmTx6V9y.d.ts → timeout-NoG7ppkm.d.ts} +1 -1
  266. package/dist/files/FilesProvider.d.ts +2 -0
  267. package/dist/files/FilesProvider.js +5 -1
  268. package/dist/files/headless/host.d.ts +6 -2
  269. package/dist/files/index.d.ts +2 -2
  270. package/dist/files/index.js +2 -2
  271. package/dist/git/GitBar.js +8 -2
  272. package/dist/git/MoveSessionDialog.js +8 -5
  273. package/dist/git/MoveToDialog.d.ts +3 -1
  274. package/dist/git/MoveToDialog.js +43 -16
  275. package/dist/git/TeleportSessionDialog.d.ts +11 -4
  276. package/dist/git/TeleportSessionDialog.js +263 -107
  277. package/dist/git/WherePicker.js +4 -1
  278. package/dist/git/headless/labels.d.ts +8 -0
  279. package/dist/git/headless/labels.js +24 -16
  280. package/dist/git/index.d.ts +2 -2
  281. package/dist/git/index.js +2 -2
  282. package/dist/git/useEnvironmentChoices.d.ts +19 -0
  283. package/dist/git/useEnvironmentChoices.js +34 -10
  284. package/dist/hooks/useLastCount.d.ts +9 -0
  285. package/dist/hooks/useLastCount.js +29 -0
  286. package/dist/index.d.ts +6 -2
  287. package/dist/index.js +7 -3
  288. package/dist/keybindings/headless/overrides.d.ts +1 -1
  289. package/dist/keybindings/headless/overrides.js +14 -3
  290. package/dist/labels.d.ts +7 -0
  291. package/dist/labels.js +10 -3
  292. package/dist/machines/AddMachineDialog.js +1 -1
  293. package/dist/machines/AddServerForm.d.ts +14 -2
  294. package/dist/machines/AddServerForm.js +167 -51
  295. package/dist/machines/HostCapabilities.js +8 -4
  296. package/dist/machines/HostSignIn.d.ts +2 -1
  297. package/dist/machines/HostSignIn.js +1 -0
  298. package/dist/machines/HostSyncPanel.d.ts +4 -1
  299. package/dist/machines/HostSyncPanel.js +248 -132
  300. package/dist/machines/HostsSection.d.ts +2 -2
  301. package/dist/machines/HostsSection.js +91 -52
  302. package/dist/machines/LinkedAccountsPanel.d.ts +29 -0
  303. package/dist/machines/LinkedAccountsPanel.js +268 -0
  304. package/dist/machines/MachinesExplainer.d.ts +4 -4
  305. package/dist/machines/MachinesExplainer.js +27 -17
  306. package/dist/machines/OrganizationPanel.d.ts +12 -5
  307. package/dist/machines/OrganizationPanel.js +420 -133
  308. package/dist/machines/ProjectsSpendPanel.d.ts +22 -0
  309. package/dist/machines/ProjectsSpendPanel.js +160 -0
  310. package/dist/machines/ServerMachinesPanel.js +19 -4
  311. package/dist/machines/ServerUpdatePanel.js +3 -3
  312. package/dist/machines/SyncAccounts.d.ts +14 -7
  313. package/dist/machines/SyncAccounts.js +67 -81
  314. package/dist/machines/TokensPanel.js +54 -30
  315. package/dist/machines/headless/fixture-host.d.ts +15 -10
  316. package/dist/machines/headless/fixture-host.js +75 -44
  317. package/dist/machines/headless/fixtures.d.ts +12 -0
  318. package/dist/machines/headless/fixtures.js +71 -1
  319. package/dist/machines/headless/host.d.ts +13 -9
  320. package/dist/machines/headless/index.d.ts +3 -3
  321. package/dist/machines/headless/index.js +2 -2
  322. package/dist/machines/headless/labels.d.ts +81 -40
  323. package/dist/machines/headless/labels.js +103 -60
  324. package/dist/machines/headless/linked-accounts.d.ts +42 -0
  325. package/dist/machines/headless/linked-accounts.js +31 -0
  326. package/dist/machines/headless/organization.d.ts +9 -3
  327. package/dist/machines/headless/organization.js +12 -2
  328. package/dist/machines/headless/sync.d.ts +2 -0
  329. package/dist/machines/index.d.ts +3 -2
  330. package/dist/machines/index.js +3 -2
  331. package/dist/machines/sync-rows.d.ts +8 -0
  332. package/dist/machines/sync-rows.js +10 -0
  333. package/dist/machines/testing/contract.d.ts +1 -25
  334. package/dist/machines/testing/contract.js +1 -97
  335. package/dist/machines/testing/index.d.ts +3 -3
  336. package/dist/machines/testing/index.js +2 -2
  337. package/dist/onboarding/demos/extensions.d.ts +4 -0
  338. package/dist/onboarding/demos/extensions.js +27 -1
  339. package/dist/onboarding/demos/sidebar-layout.d.ts +4 -2
  340. package/dist/onboarding/demos/sidebar-layout.js +5 -2
  341. package/dist/onboarding/headless/labels.d.ts +9 -0
  342. package/dist/onboarding/headless/labels.js +2 -0
  343. package/dist/onboarding/steps/SidebarStep.js +4 -2
  344. package/dist/onboarding/steps/setting-cards.d.ts +4 -2
  345. package/dist/onboarding/steps/setting-cards.js +3 -2
  346. package/dist/palette/PaletteDialog.js +4 -4
  347. package/dist/palette/PaletteRows.js +34 -16
  348. package/dist/palette/headless/app-sources.js +3 -1
  349. package/dist/palette/headless/labels.js +2 -2
  350. package/dist/palette/usePaletteController.js +4 -8
  351. package/dist/session/ArtifactsPanel.js +11 -23
  352. package/dist/session/NewProjectDialog.d.ts +33 -0
  353. package/dist/session/NewProjectDialog.js +216 -0
  354. package/dist/session/OpenProjectsDialog.d.ts +56 -0
  355. package/dist/session/OpenProjectsDialog.js +324 -0
  356. package/dist/session/OpenSessionsDialog.js +186 -61
  357. package/dist/session/ProjectArtifactsHome.d.ts +42 -0
  358. package/dist/session/ProjectArtifactsHome.js +98 -0
  359. package/dist/session/ProjectArtifactsSection.d.ts +13 -0
  360. package/dist/session/ProjectArtifactsSection.js +367 -0
  361. package/dist/session/ProjectBudgetsSection.d.ts +7 -0
  362. package/dist/session/ProjectBudgetsSection.js +377 -0
  363. package/dist/session/ProjectContextSection.d.ts +20 -0
  364. package/dist/session/ProjectContextSection.js +139 -0
  365. package/dist/session/ProjectHome.d.ts +32 -5
  366. package/dist/session/ProjectHome.js +496 -249
  367. package/dist/session/ProjectInstructionsSection.d.ts +7 -0
  368. package/dist/session/ProjectInstructionsSection.js +179 -0
  369. package/dist/session/ProjectMainButton.d.ts +35 -0
  370. package/dist/session/ProjectMainButton.js +73 -0
  371. package/dist/session/ProjectName.d.ts +76 -0
  372. package/dist/session/ProjectName.js +140 -0
  373. package/dist/session/ProjectOrchestratorSection.d.ts +14 -0
  374. package/dist/session/ProjectOrchestratorSection.js +117 -0
  375. package/dist/session/ProjectPublishDialog.d.ts +30 -0
  376. package/dist/session/ProjectPublishDialog.js +420 -0
  377. package/dist/session/ProjectSessionAccessSection.d.ts +13 -0
  378. package/dist/session/ProjectSessionAccessSection.js +109 -0
  379. package/dist/session/ProjectSessionsList.d.ts +53 -0
  380. package/dist/session/ProjectSessionsList.js +316 -0
  381. package/dist/session/ProjectSettingsDialog.d.ts +30 -0
  382. package/dist/session/ProjectSettingsDialog.js +693 -0
  383. package/dist/session/ProjectShareDialog.d.ts +36 -0
  384. package/dist/session/ProjectShareDialog.js +190 -0
  385. package/dist/session/ProjectSkillsSection.d.ts +7 -0
  386. package/dist/session/ProjectSkillsSection.js +197 -0
  387. package/dist/session/ProjectToolsSection.d.ts +16 -0
  388. package/dist/session/ProjectToolsSection.js +347 -0
  389. package/dist/session/ProjectUsage.d.ts +61 -0
  390. package/dist/session/ProjectUsage.js +344 -0
  391. package/dist/session/ProviderUsageProvider.d.ts +2 -3
  392. package/dist/session/QueueTab.js +11 -1
  393. package/dist/session/SessionAccessNotice.d.ts +31 -0
  394. package/dist/session/SessionAccessNotice.js +69 -0
  395. package/dist/session/SessionDetailsDialog.d.ts +3 -1
  396. package/dist/session/SessionDetailsDialog.js +16 -1
  397. package/dist/session/SessionHeader.d.ts +10 -3
  398. package/dist/session/SessionHeader.js +20 -8
  399. package/dist/session/SessionPeopleStack.d.ts +3 -2
  400. package/dist/session/SessionPeopleStack.js +51 -17
  401. package/dist/session/SessionPlaceMenu.js +2 -2
  402. package/dist/session/SessionProvider.d.ts +13 -1
  403. package/dist/session/SessionProvider.js +21 -1
  404. package/dist/session/ShareSessionDialog.d.ts +4 -4
  405. package/dist/session/ShareSessionDialog.js +182 -283
  406. package/dist/session/TypingLine.d.ts +9 -4
  407. package/dist/session/TypingLine.js +16 -5
  408. package/dist/session/{UsagePanel.d.ts → UsageSection.d.ts} +9 -13
  409. package/dist/session/{UsagePanel.js → UsageSection.js} +40 -41
  410. package/dist/session/artifact-row-parts.d.ts +32 -0
  411. package/dist/session/artifact-row-parts.js +51 -0
  412. package/dist/session/headless/access.d.ts +33 -0
  413. package/dist/session/headless/access.js +48 -0
  414. package/dist/session/headless/fixture-host.d.ts +48 -9
  415. package/dist/session/headless/fixture-host.js +139 -1
  416. package/dist/session/headless/fixture-project-artifacts.d.ts +77 -0
  417. package/dist/session/headless/fixture-project-artifacts.js +168 -0
  418. package/dist/session/headless/fixture-project-content.d.ts +67 -0
  419. package/dist/session/headless/fixture-project-content.js +176 -0
  420. package/dist/session/headless/fixture-projects.d.ts +175 -0
  421. package/dist/session/headless/fixture-projects.js +498 -0
  422. package/dist/session/headless/home-layout.d.ts +18 -2
  423. package/dist/session/headless/home-layout.js +20 -7
  424. package/dist/session/headless/host.d.ts +263 -7
  425. package/dist/session/headless/index.d.ts +10 -5
  426. package/dist/session/headless/index.js +8 -3
  427. package/dist/session/headless/labels.d.ts +381 -6
  428. package/dist/session/headless/labels.js +72 -24
  429. package/dist/session/headless/orchestration-labels.d.ts +52 -0
  430. package/dist/session/headless/orchestration-labels.js +59 -0
  431. package/dist/session/headless/project-artifact-labels.d.ts +67 -0
  432. package/dist/session/headless/project-artifact-labels.js +96 -0
  433. package/dist/session/headless/project-artifacts.d.ts +124 -0
  434. package/dist/session/headless/project-artifacts.js +271 -0
  435. package/dist/session/headless/project-content-labels.d.ts +88 -0
  436. package/dist/session/headless/project-content-labels.js +152 -0
  437. package/dist/session/headless/project-labels.d.ts +123 -0
  438. package/dist/session/headless/project-labels.js +128 -0
  439. package/dist/session/headless/project-sessions.d.ts +37 -0
  440. package/dist/session/headless/project-sessions.js +57 -0
  441. package/dist/session/headless/project-usage-labels.d.ts +74 -0
  442. package/dist/session/headless/project-usage-labels.js +81 -0
  443. package/dist/session/headless/project-usage.d.ts +65 -0
  444. package/dist/session/headless/project-usage.js +92 -0
  445. package/dist/session/headless/projects.d.ts +158 -0
  446. package/dist/session/headless/projects.js +301 -0
  447. package/dist/session/headless/pushed-once.d.ts +22 -0
  448. package/dist/session/headless/pushed-once.js +28 -0
  449. package/dist/session/headless/queue.js +2 -1
  450. package/dist/session/headless/typing.d.ts +20 -1
  451. package/dist/session/headless/typing.js +58 -3
  452. package/dist/session/home-block-parts.d.ts +40 -0
  453. package/dist/session/home-block-parts.js +46 -0
  454. package/dist/session/index.d.ts +17 -4
  455. package/dist/session/index.js +16 -3
  456. package/dist/session/modal-shell.d.ts +1 -1
  457. package/dist/session/modal-shell.js +1 -1
  458. package/dist/session/project-artifact-parts.d.ts +59 -0
  459. package/dist/session/project-artifact-parts.js +222 -0
  460. package/dist/session/project-content-parts.d.ts +176 -0
  461. package/dist/session/project-content-parts.js +546 -0
  462. package/dist/session/project-files.d.ts +48 -0
  463. package/dist/session/project-files.js +54 -0
  464. package/dist/session/project-folder-actions.d.ts +11 -0
  465. package/dist/session/project-folder-actions.js +39 -0
  466. package/dist/session/project-mcp-add.d.ts +23 -0
  467. package/dist/session/project-mcp-add.js +107 -0
  468. package/dist/session/project-record-document.d.ts +48 -0
  469. package/dist/session/project-record-document.js +225 -0
  470. package/dist/session/project-settings-parts.d.ts +69 -0
  471. package/dist/session/project-settings-parts.js +90 -0
  472. package/dist/session/share-people.d.ts +222 -0
  473. package/dist/session/share-people.js +457 -0
  474. package/dist/session/testing/contract.d.ts +67 -8
  475. package/dist/session/testing/contract.js +343 -6
  476. package/dist/session/testing/index.d.ts +5 -2
  477. package/dist/session/testing/index.js +4 -1
  478. package/dist/session/testing/project-artifacts.contract.js +159 -0
  479. package/dist/session/testing/project-content.contract.d.ts +19 -0
  480. package/dist/session/testing/project-content.contract.js +221 -0
  481. package/dist/session/testing/project-sessions.contract.js +134 -0
  482. package/dist/session/use-folder-missing.d.ts +6 -0
  483. package/dist/session/use-folder-missing.js +31 -0
  484. package/dist/session/use-folder-project.d.ts +14 -0
  485. package/dist/session/use-folder-project.js +37 -0
  486. package/dist/session/use-home-projects.d.ts +55 -0
  487. package/dist/session/use-home-projects.js +154 -0
  488. package/dist/session/use-project-home-layout.d.ts +33 -0
  489. package/dist/session/use-project-home-layout.js +134 -0
  490. package/dist/session/use-project-home-on.d.ts +2 -0
  491. package/dist/session/use-project-home-on.js +14 -0
  492. package/dist/settings/SettingCard.d.ts +3 -1
  493. package/dist/settings/SettingCard.js +2 -1
  494. package/dist/settings/SettingDemo.d.ts +3 -1
  495. package/dist/settings/SettingDemo.js +4 -3
  496. package/dist/settings/SettingsShell.d.ts +2 -1
  497. package/dist/settings/SettingsShell.js +55 -43
  498. package/dist/settings/headless/index.d.ts +2 -1
  499. package/dist/settings/headless/index.js +2 -1
  500. package/dist/settings/headless/mcp-requirement.d.ts +93 -0
  501. package/dist/settings/headless/mcp-requirement.js +117 -0
  502. package/dist/settings/headless/mcp.d.ts +2 -0
  503. package/dist/settings/headless/mcp.js +3 -2
  504. package/dist/settings/headless/search.d.ts +1 -1
  505. package/dist/settings/index.d.ts +3 -2
  506. package/dist/settings/index.js +13 -12
  507. package/dist/settings/section.d.ts +9 -0
  508. package/dist/settings/section.js +12 -1
  509. package/dist/settings/sections/editor/labels.js +1 -1
  510. package/dist/settings/sections/extensions/ExtensionConfigRows.d.ts +6 -2
  511. package/dist/settings/sections/extensions/ExtensionConfigRows.js +10 -1
  512. package/dist/settings/sections/extensions/ExtensionOptionsSection.js +1 -0
  513. package/dist/settings/sections/extensions/ExtensionsSection.d.ts +6 -3
  514. package/dist/settings/sections/extensions/ExtensionsSection.js +24 -3
  515. package/dist/settings/sections/extensions/McpRequirementRow.d.ts +45 -0
  516. package/dist/settings/sections/extensions/McpRequirementRow.js +298 -0
  517. package/dist/settings/sections/extensions/labels.d.ts +4 -0
  518. package/dist/settings/sections/extensions/labels.js +4 -0
  519. package/dist/settings/sections/extensions/options-labels.d.ts +39 -0
  520. package/dist/settings/sections/extensions/options-labels.js +48 -1
  521. package/dist/settings/sections/extensions/use-mcp-setup.d.ts +6 -0
  522. package/dist/settings/sections/extensions/use-mcp-setup.js +41 -0
  523. package/dist/settings/sections/host-catalog/HostCatalogSection.js +3 -0
  524. package/dist/settings/sections/index.d.ts +4 -3
  525. package/dist/settings/sections/index.js +4 -3
  526. package/dist/settings/sections/instructions/InstructionsSection.d.ts +69 -1
  527. package/dist/settings/sections/instructions/InstructionsSection.js +181 -109
  528. package/dist/settings/sections/mcp/McpAddForm.d.ts +9 -2
  529. package/dist/settings/sections/mcp/McpAddForm.js +15 -7
  530. package/dist/settings/sections/mcp/McpSection.js +3 -5
  531. package/dist/settings/sections/mcp/McpServerRow.js +7 -47
  532. package/dist/settings/sections/mcp/McpSignIn.d.ts +38 -0
  533. package/dist/settings/sections/mcp/McpSignIn.js +72 -0
  534. package/dist/settings/sections/mcp/labels.js +1 -1
  535. package/dist/settings/sections/models/AgentDefaults.d.ts +12 -4
  536. package/dist/settings/sections/models/AgentDefaults.js +102 -70
  537. package/dist/settings/sections/models/ModelPickField.d.ts +10 -1
  538. package/dist/settings/sections/models/ModelPickField.js +87 -39
  539. package/dist/settings/sections/models/labels.d.ts +8 -0
  540. package/dist/settings/sections/models/labels.js +8 -0
  541. package/dist/settings/sections/performance/labels.js +2 -2
  542. package/dist/settings/sections/providers/ServerSignIn.d.ts +6 -1
  543. package/dist/settings/sections/providers/ServerSignIn.js +66 -61
  544. package/dist/settings/sections/skills/SkillList.d.ts +45 -0
  545. package/dist/settings/sections/skills/SkillList.js +58 -40
  546. package/dist/settings/server-app.d.ts +2 -0
  547. package/dist/settings/server-app.js +16 -4
  548. package/dist/styles.css +170 -34
  549. package/dist/theme/runtime-icons.js +7 -3
  550. package/dist/workspace/PanelContentView.js +1 -1
  551. package/package.json +26 -2
  552. package/src/styles/app.css +6 -3
  553. package/src/styles/palette.css +15 -19
  554. package/src/styles/primitives.css +3 -1
  555. package/src/styles/transcript.css +61 -0
  556. package/dist/dist/index-ttmMvjgM.d.ts +0 -1
  557. package/dist/dist/sandbox-CSUihARm.d.ts +0 -2
  558. package/dist/machines/PersonalLayerPanel.d.ts +0 -32
  559. package/dist/machines/PersonalLayerPanel.js +0 -360
  560. package/dist/machines/headless/layer.d.ts +0 -64
  561. package/dist/machines/headless/layer.js +0 -56
  562. /package/dist/dist/{execution-failure-SREfl-EZ.d.ts → execution-failure-_L2r_Qd-.d.ts} +0 -0
@@ -0,0 +1,20 @@
1
+ import { Fragment } from "react";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ // src/chat/transcript/inline-facts.tsx
4
+ /**
5
+ * Facts on one line that truncates (a tool row's meta line). Kit {@link Facts} wraps between facts, so a
6
+ * one-line row that must truncate uses this inline form instead. Internal: not exported from the entry.
7
+ */
8
+ /**
9
+ * Facts on one line that truncates: each its own inline block, a gap apart, never a dot.
10
+ *
11
+ * @param props - Component props.
12
+ * @param props.facts - The facts, in order.
13
+ */
14
+ function InlineFacts({ facts }) {
15
+ return facts.map((fact, i) => /* @__PURE__ */ jsxs(Fragment, { children: [i > 0 && " ", /* @__PURE__ */ jsx("span", {
16
+ className: i > 0 ? "ml-1.5" : void 0,
17
+ children: fact
18
+ })] }, i));
19
+ }
20
+ export { InlineFacts };
@@ -2,7 +2,8 @@
2
2
  * The transcript's quiet rows: notices and errors, a stopped run (with its
3
3
  * resume button when the app can resume), a worker's report
4
4
  * (`SessionEventRow`), a `/` command's note and detail, and the spawn
5
- * markers inside a subagent block. App services come in as props
5
+ * markers inside a subagent block, and the line that says a run's setup
6
+ * changed (`SetupChangedRow`). App services come in as props
6
7
  * (`onResume`, `onOpenSession`) and renderer slots (`renderers.tsx`).
7
8
  */
8
9
  import { Row } from "../headless/transcript/rows.js";
@@ -37,6 +38,22 @@ export interface InfoRowProps {
37
38
  }
38
39
  /** Renders a plain informational line from the harness, in muted text. */
39
40
  export declare const InfoRow: import("react").MemoExoticComponent<({ text, className, style }: InfoRowProps) => import("react").JSX.Element>;
41
+ /** Props for {@link SetupChangedRow}. */
42
+ export interface SetupChangedRowProps {
43
+ /** The notice's text: the summary on its first line, then one change per line. */
44
+ text: string;
45
+ /** Extra classes on the root element. */
46
+ className?: string;
47
+ /** Inline styles on the root element, merged after the component's own. */
48
+ style?: CSSProperties;
49
+ }
50
+ /**
51
+ * A run's setup changed since the previous run (docs/PROJECTS.md § Setup record): one small muted line, its summary
52
+ * ("Setup changed: 2 added, 1 removed"), with a caret that opens the changes, one per line in the meta voice
53
+ * (`+ skill foo`, `- mcp linear`, who saved a record). Collapsed at first; a row with no changes listed has no caret.
54
+ * A long list shows its first {@link SETUP_CHANGES_SHOWN} changes and a button for the rest.
55
+ */
56
+ export declare const SetupChangedRow: import("react").MemoExoticComponent<({ text, className, style }: SetupChangedRowProps) => import("react").JSX.Element>;
40
57
  /** Props for {@link NoticeRow}. */
41
58
  export interface NoticeRowProps {
42
59
  /** The structured notice: its severity and label. */
@@ -53,7 +70,10 @@ export interface NoticeRowProps {
53
70
  * GUI counterpart of the TUI's `NoticeRow` (which keeps the glyph + label,
54
71
  * this surface has color). Rendered for `info` events that carry
55
72
  * `notice` (run-end stop reasons, model fallback, repeat guard, …); plain
56
- * `info` events keep the quiet `InfoRow`.
73
+ * `info` events keep the quiet `InfoRow`. A run's setup change
74
+ * (`SETUP_CHANGED_LABEL`) is the quieter `SetupChangedRow`. A refused
75
+ * run's budget notice gets the labels' "Budget reached" as its badge, its
76
+ * sentence (which budget, how much, when runs start again) beneath in full.
57
77
  */
58
78
  export declare const NoticeRow: import("react").MemoExoticComponent<({ notice, text, className, style }: NoticeRowProps) => import("react").JSX.Element>;
59
79
  /** Props for {@link ErrorRow}. */
@@ -93,6 +113,8 @@ export interface FailureRowProps {
93
113
  detail?: StreamEvent['detail'];
94
114
  /** How the run ended and how it would resume. */
95
115
  failure: RunFailure;
116
+ /** The name of who stopped the run, when a named person or client did: reads "Stopped by <name>". */
117
+ stoppedBy?: string;
96
118
  /** The row is the transcript's last word: it offers Continue or Retry. */
97
119
  resumable: boolean;
98
120
  /** Called with the prompt that resumes the run. Absent: no button. */
@@ -115,7 +137,7 @@ export interface FailureRowProps {
115
137
  * host's queue until it is back. Setting a gone one up anew asks first (the
116
138
  * app's confirm dialog), as it can cost work.
117
139
  */
118
- export declare const FailureRow: import("react").MemoExoticComponent<({ text, detail, failure, resumable, onResume, className, style }: FailureRowProps) => import("react").JSX.Element>;
140
+ export declare const FailureRow: import("react").MemoExoticComponent<({ text, detail, failure, stoppedBy, resumable, onResume, className, style }: FailureRowProps) => import("react").JSX.Element>;
119
141
  /** Props for {@link SessionEventRow}. */
120
142
  export interface SessionEventRowProps {
121
143
  /** The worker's report. */
@@ -130,15 +152,15 @@ export interface SessionEventRowProps {
130
152
  style?: CSSProperties;
131
153
  }
132
154
  /**
133
- * Orchestration: a worker session reported an outcome. Drawn as a session
134
- * thread draws its steps (the fold head / ToolRow idiom): a flat
135
- * `.zg-disclosure` row, the title in the content voice, the receipt in
136
- * `.zg-meta`, and a muted two-line excerpt of the worker's last word. No
137
- * card, tint or line: status lives on the timeline dot and the verb's color. The whole row is a button that jumps to the
138
- * reporting session (`onOpenSession`; without it the row is inert);
139
- * `needs-attention` is the loud one, since it is the one status a human, not
140
- * the main, has to act on. Falls back to a plain, non-clickable text row
141
- * when `sessionEvent` is absent (malformed signal).
155
+ * Orchestration: a worker session reported an outcome. One bar at the
156
+ * conversation's size (`SessionLine`): the sidebar's status dot (its color
157
+ * is the outcome, so there is no verb on screen), the title, the report's
158
+ * excerpt, then the run's duration and turns in their fixed slots, the open
159
+ * button, the caret. Opened, the report shows in full, rendered as markdown,
160
+ * with the rest of the run's receipt under it. Under its conversation's
161
+ * header the bar reads its time instead of the title. Where the session ran
162
+ * is the group's to say (its project and worktree sections). Falls back to a
163
+ * plain text row when `sessionEvent` is absent (malformed signal).
142
164
  */
143
165
  export declare const SessionEventRow: import("react").MemoExoticComponent<({ event, onOpenSession, className, style }: SessionEventRowProps) => import("react").JSX.Element>;
144
166
  /**
@@ -2,15 +2,18 @@ import { useOptionalConfirm } from "../../app/useConfirm.js";
2
2
  import { useTooltip } from "../../components/Tooltip.js";
3
3
  import { useStaysMounted } from "../../motion/collapse.js";
4
4
  import { failureTooltip } from "../headless/transcript/run-failures.js";
5
+ import { StatusDot } from "../StatusDot.js";
5
6
  import { useChatLabels } from "../useChatLabels.js";
6
7
  import { useTranscriptActions } from "./actions.js";
7
8
  import { AuthFailureCard } from "./AuthFailureCard.js";
8
- import { Caret } from "./frame.js";
9
+ import { Caret, SESSION_EVENT_DOT, useRowIcons } from "./frame.js";
10
+ import { ProseMarkdown } from "./ProseMarkdown.js";
9
11
  import { useTranscriptRenderers } from "./renderers.js";
10
12
  import { useRowPartKey, useRowUiState } from "./row-ui-state.js";
11
- import { memo, useId, useState } from "react";
13
+ import { SessionLine, useSessionEventScope } from "./session-line.js";
14
+ import { memo, useEffect, useId, useRef, useState } from "react";
12
15
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
- import { CONTINUE_PROMPT, SESSION_EVENT_STATUS_STYLE, describeSpawnEnd, sessionDirLabel, sessionEventExcerpt, sessionEventMeta, shortSessionId, spawnStartParts } from "zidane/chat/pure";
16
+ import { CONTINUE_PROMPT, SESSION_EVENT_STATUS_STYLE, SETUP_CHANGED_LABEL, describeSpawnEnd, fmtCost, formatTokenCount, sessionEventExcerpt, sessionEventReport, shortSessionId, spawnStartParts } from "zidane/chat/pure";
14
17
  // src/chat/transcript/notices.tsx
15
18
  /**
16
19
  * Command steps, outputs and a run's error line read at the transcript's
@@ -41,6 +44,96 @@ const InfoRow = memo(({ text, className, style }) => {
41
44
  children: text
42
45
  });
43
46
  });
47
+ /** How many of a run's setup changes show before the button for the rest. */
48
+ const SETUP_CHANGES_SHOWN = 12;
49
+ /**
50
+ * A run's setup changed since the previous run (docs/PROJECTS.md § Setup record): one small muted line, its summary
51
+ * ("Setup changed: 2 added, 1 removed"), with a caret that opens the changes, one per line in the meta voice
52
+ * (`+ skill foo`, `- mcp linear`, who saved a record). Collapsed at first; a row with no changes listed has no caret.
53
+ * A long list shows its first {@link SETUP_CHANGES_SHOWN} changes and a button for the rest.
54
+ */
55
+ const SetupChangedRow = memo(({ text, className, style }) => {
56
+ const labels = useChatLabels();
57
+ const [open, setOpen] = useRowUiState(useRowPartKey("setup-changed"), false);
58
+ const [all, setAll] = useRowUiState(useRowPartKey("setup-changed-all"), false);
59
+ const firstHidden = useRef(null);
60
+ const focusShown = useRef(false);
61
+ useEffect(() => {
62
+ if (all && focusShown.current) {
63
+ focusShown.current = false;
64
+ firstHidden.current?.focus();
65
+ }
66
+ }, [all]);
67
+ const mounted = useStaysMounted(open);
68
+ const listId = useId();
69
+ const [head = "", ...changes] = text.split("\n").filter((line) => line.trim() !== "");
70
+ const clipped = !all && changes.length > 15;
71
+ const root = ["text-xs text-[var(--zg-text-muted)]", className].filter(Boolean).join(" ");
72
+ const glyph = /* @__PURE__ */ jsx("span", {
73
+ "aria-hidden": true,
74
+ className: "i-ph-sliders-horizontal shrink-0"
75
+ });
76
+ if (changes.length === 0) return /* @__PURE__ */ jsxs("div", {
77
+ className: `${root} flex items-center gap-1.5 min-w-0 py-0.5`,
78
+ style,
79
+ "data-testid": "setup-changed",
80
+ children: [glyph, /* @__PURE__ */ jsx("span", {
81
+ className: "min-w-0 truncate",
82
+ children: head
83
+ })]
84
+ });
85
+ return /* @__PURE__ */ jsxs("div", {
86
+ className: root,
87
+ style,
88
+ "data-testid": "setup-changed",
89
+ children: [/* @__PURE__ */ jsxs("button", {
90
+ type: "button",
91
+ "aria-expanded": open,
92
+ "aria-controls": listId,
93
+ onClick: () => setOpen((current) => !current),
94
+ className: "zg-press-subtle zg-disclosure zg-focus-ring flex items-center gap-1.5 w-full min-w-0 py-0.5 rounded-zg-sm text-left",
95
+ children: [
96
+ glyph,
97
+ /* @__PURE__ */ jsx("span", {
98
+ className: "min-w-0 truncate",
99
+ children: head
100
+ }),
101
+ /* @__PURE__ */ jsx(Caret, {
102
+ open,
103
+ className: "self-center"
104
+ })
105
+ ]
106
+ }), /* @__PURE__ */ jsx("div", {
107
+ className: "zg-collapsible",
108
+ "data-open": open,
109
+ id: listId,
110
+ inert: !open || void 0,
111
+ children: /* @__PURE__ */ jsx("div", {
112
+ className: "zg-collapsible-inner",
113
+ children: mounted && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("ul", {
114
+ className: "zg-setup-changes zg-meta m-0 p-0 pt-1 pl-5 list-none flex flex-col gap-0.5",
115
+ children: (clipped ? changes.slice(0, SETUP_CHANGES_SHOWN) : changes).map((line, i) => /* @__PURE__ */ jsx("li", {
116
+ ref: i === SETUP_CHANGES_SHOWN ? firstHidden : void 0,
117
+ tabIndex: i === SETUP_CHANGES_SHOWN ? -1 : void 0,
118
+ className: "break-words outline-none",
119
+ children: line
120
+ }, i))
121
+ }), clipped && /* @__PURE__ */ jsx("button", {
122
+ type: "button",
123
+ onClick: () => {
124
+ focusShown.current = true;
125
+ setAll(true);
126
+ },
127
+ className: "zg-press-subtle zg-focus-ring ml-5 mt-1 px-1 -mx-1 rounded-zg-sm text-[var(--zg-text-muted)] hover:text-[var(--zg-text)] transition-colors",
128
+ children: labels.setupChangedMore(changes.length - SETUP_CHANGES_SHOWN)
129
+ })] })
130
+ })
131
+ })]
132
+ });
133
+ });
134
+ SetupChangedRow.displayName = "SetupChangedRow";
135
+ /** The label of the notice a refused run leaves (`emitSessionNotice` in `src/chat/host/runs/prepare.ts`): its text is a full sentence, so the badge says the headline and the sentence goes under it. */
136
+ const BUDGET_NOTICE_LABEL = "budget";
44
137
  /** A notice's badge tone and icon, by severity. */
45
138
  const NOTICE_STYLE = {
46
139
  error: {
@@ -61,31 +154,60 @@ const NOTICE_STYLE = {
61
154
  * GUI counterpart of the TUI's `NoticeRow` (which keeps the glyph + label,
62
155
  * this surface has color). Rendered for `info` events that carry
63
156
  * `notice` (run-end stop reasons, model fallback, repeat guard, …); plain
64
- * `info` events keep the quiet `InfoRow`.
157
+ * `info` events keep the quiet `InfoRow`. A run's setup change
158
+ * (`SETUP_CHANGED_LABEL`) is the quieter `SetupChangedRow`. A refused
159
+ * run's budget notice gets the labels' "Budget reached" as its badge, its
160
+ * sentence (which budget, how much, when runs start again) beneath in full.
65
161
  */
66
162
  const NoticeRow = memo(({ notice, text, className, style }) => {
163
+ const labels = useChatLabels();
164
+ if (notice.label === SETUP_CHANGED_LABEL) return /* @__PURE__ */ jsx(SetupChangedRow, {
165
+ text,
166
+ className,
167
+ style
168
+ });
67
169
  const { tone, icon } = NOTICE_STYLE[notice.severity] ?? NOTICE_STYLE.info;
68
- const [head, ...details] = text.split("\n").filter((line) => line.trim() !== "");
170
+ const lines = text.split("\n").filter((line) => line.trim() !== "");
171
+ const [head = "", ...details] = notice.label === BUDGET_NOTICE_LABEL ? [labels.noticeBudgetReached, ...lines.flatMap(sentencesOf)] : lines;
172
+ return /* @__PURE__ */ jsx(NoticeBody, {
173
+ head,
174
+ details,
175
+ tone,
176
+ icon,
177
+ className,
178
+ style
179
+ });
180
+ });
181
+ /** Splits prose into its sentences: a period, then a space and a capital ("$1.50" stays whole). */
182
+ function sentencesOf(line) {
183
+ return line.split(/(?<=[.!?])\s+(?=\p{Lu})/u);
184
+ }
185
+ /** A notice's badge (its headline, the full text in a tooltip when it truncates) and its facts beneath, one per line. */
186
+ function NoticeBody({ head, details, tone, icon, className, style }) {
187
+ const tip = useTooltip(head, { maxWidth: 420 });
69
188
  return /* @__PURE__ */ jsxs("div", {
70
189
  className: ["flex flex-col items-start gap-1 text-xs", className].filter(Boolean).join(" "),
71
190
  style,
72
- title: notice.label,
73
191
  children: [/* @__PURE__ */ jsxs("span", {
74
192
  className: `inline-flex max-w-full items-center gap-1.5 px-2 py-0.5 rounded-full shadow-[inset_0_0_0_1px_var(--zg-hairline)] font-medium ${tone}`,
75
- children: [/* @__PURE__ */ jsx("span", {
76
- "aria-hidden": true,
77
- className: `${icon} shrink-0`
78
- }), /* @__PURE__ */ jsx("span", {
79
- className: "min-w-0 truncate",
80
- title: head,
81
- children: head
82
- })]
193
+ children: [
194
+ /* @__PURE__ */ jsx("span", {
195
+ "aria-hidden": true,
196
+ className: `${icon} shrink-0`
197
+ }),
198
+ /* @__PURE__ */ jsx("span", {
199
+ ...tip.anchorProps,
200
+ className: "min-w-0 truncate",
201
+ children: head
202
+ }),
203
+ tip.tip
204
+ ]
83
205
  }), details.length > 0 && /* @__PURE__ */ jsx("span", {
84
206
  className: "min-w-0 max-w-full flex flex-col gap-0.5 px-2 break-words text-[var(--zg-text-muted)]",
85
207
  children: details.map((line, i) => /* @__PURE__ */ jsx("span", { children: line }, i))
86
208
  })]
87
209
  });
88
- });
210
+ }
89
211
  /** The transcript's one error tone (the `error` / `tool-err` Dot glyphs share it). */
90
212
  const ERROR_TONE = "text-zg-danger";
91
213
  /** Renders an error line in the transcript's error tone. */
@@ -141,7 +263,7 @@ RepairedRow.displayName = "RepairedRow";
141
263
  * host's queue until it is back. Setting a gone one up anew asks first (the
142
264
  * app's confirm dialog), as it can cost work.
143
265
  */
144
- const FailureRow = memo(({ text, detail, failure, resumable, onResume, className, style }) => {
266
+ const FailureRow = memo(({ text, detail, failure, stoppedBy, resumable, onResume, className, style }) => {
145
267
  const labels = useChatLabels();
146
268
  const { retryEnvironment } = useTranscriptActions();
147
269
  const confirm = useOptionalConfirm();
@@ -199,7 +321,7 @@ const FailureRow = memo(({ text, detail, failure, resumable, onResume, className
199
321
  className: "min-w-0 truncate",
200
322
  children: [/* @__PURE__ */ jsx("span", {
201
323
  className: byUser ? "text-[var(--zg-text-muted)]" : ERROR_TONE,
202
- children: byUser ? labels.stoppedByYou : labels.stopped
324
+ children: byUser ? stoppedBy ? labels.stoppedByName(stoppedBy) : labels.stoppedByYou : labels.stopped
203
325
  }), text && /* @__PURE__ */ jsxs("span", {
204
326
  className: "text-[var(--zg-text-muted)]",
205
327
  children: [" ", text]
@@ -221,30 +343,22 @@ const FailureRow = memo(({ text, detail, failure, resumable, onResume, className
221
343
  });
222
344
  });
223
345
  /**
224
- * `SessionEventTone` → the verb's color in `SessionEventRow`. A finished run
225
- * is the common case, so it stays plain text; only the states that need a
226
- * look carry color (the timeline dot already says "done").
227
- */
228
- const SESSION_EVENT_VERB_COLOR = {
229
- accent: "text-[var(--zg-text-muted)]",
230
- error: "text-zg-danger",
231
- dim: "text-[var(--zg-text-muted)]",
232
- warn: "text-zg-warn"
233
- };
234
- /**
235
- * Orchestration: a worker session reported an outcome. Drawn as a session
236
- * thread draws its steps (the fold head / ToolRow idiom): a flat
237
- * `.zg-disclosure` row, the title in the content voice, the receipt in
238
- * `.zg-meta`, and a muted two-line excerpt of the worker's last word. No
239
- * card, tint or line: status lives on the timeline dot and the verb's color. The whole row is a button that jumps to the
240
- * reporting session (`onOpenSession`; without it the row is inert);
241
- * `needs-attention` is the loud one, since it is the one status a human, not
242
- * the main, has to act on. Falls back to a plain, non-clickable text row
243
- * when `sessionEvent` is absent (malformed signal).
346
+ * Orchestration: a worker session reported an outcome. One bar at the
347
+ * conversation's size (`SessionLine`): the sidebar's status dot (its color
348
+ * is the outcome, so there is no verb on screen), the title, the report's
349
+ * excerpt, then the run's duration and turns in their fixed slots, the open
350
+ * button, the caret. Opened, the report shows in full, rendered as markdown,
351
+ * with the rest of the run's receipt under it. Under its conversation's
352
+ * header the bar reads its time instead of the title. Where the session ran
353
+ * is the group's to say (its project and worktree sections). Falls back to a
354
+ * plain text row when `sessionEvent` is absent (malformed signal).
244
355
  */
245
356
  const SessionEventRow = memo(({ event, onOpenSession, className, style }) => {
246
- const labels = useChatLabels();
247
357
  const { SessionTitle } = useTranscriptRenderers();
358
+ const scope = useSessionEventScope();
359
+ const icons = useRowIcons();
360
+ const [open, setOpen] = useRowUiState(useRowPartKey("session-event"), false);
361
+ const mounted = useStaysMounted(open);
248
362
  const id = useId();
249
363
  if (!event.sessionEvent) return /* @__PURE__ */ jsxs("div", {
250
364
  className: ["flex items-start gap-2 text-xs", className].filter(Boolean).join(" "),
@@ -259,68 +373,70 @@ const SessionEventRow = memo(({ event, onOpenSession, className, style }) => {
259
373
  })]
260
374
  });
261
375
  const sessionEvent = event.sessionEvent;
262
- const { tone, verb } = SESSION_EVENT_STATUS_STYLE[sessionEvent.status];
263
- const verbColor = SESSION_EVENT_VERB_COLOR[tone];
264
- const needsAttention = sessionEvent.status === "needs-attention";
265
- const dir = sessionDirLabel(sessionEvent.cwd);
266
- const receipt = sessionEventMeta(sessionEvent).slice(dir ? 1 : 0);
267
- const excerpt = sessionEventExcerpt(sessionEvent);
268
- return /* @__PURE__ */ jsx("button", {
269
- type: "button",
270
- onClick: onOpenSession ? () => onOpenSession(sessionEvent.sessionId) : void 0,
271
- disabled: !onOpenSession,
272
- "aria-labelledby": `${id}-title ${id}-verb${needsAttention && onOpenSession ? ` ${id}-answer` : ""}`,
273
- className: [`group zg-disclosure zg-press-subtle flex items-start w-full py-1 text-left ${onOpenSession ? "cursor-pointer" : "cursor-default"}`, className].filter(Boolean).join(" "),
376
+ const { sessionId } = sessionEvent;
377
+ const report = sessionEventReport(sessionEvent);
378
+ const receipt = [
379
+ ...sessionEvent.tokens !== void 0 ? [`${formatTokenCount(sessionEvent.tokens)} tok`] : [],
380
+ ...sessionEvent.costUsd !== void 0 ? [fmtCost(sessionEvent.costUsd)] : [],
381
+ shortSessionId(sessionId)
382
+ ];
383
+ return /* @__PURE__ */ jsxs("div", {
384
+ className,
274
385
  style,
275
- children: /* @__PURE__ */ jsxs("div", {
276
- className: "min-w-0 flex-1",
277
- children: [/* @__PURE__ */ jsxs("div", {
278
- className: "flex items-baseline gap-x-2 min-w-0 text-xs",
279
- children: [
280
- /* @__PURE__ */ jsx("span", {
281
- id: `${id}-title`,
282
- className: "shrink-0 max-w-[60%] truncate text-zg-body leading-zg-chat font-medium text-[var(--zg-text)]",
283
- children: /* @__PURE__ */ jsx(SessionTitle, {
284
- id: sessionEvent.sessionId,
285
- fallback: sessionEvent.title,
286
- plain: true
287
- })
288
- }),
289
- /* @__PURE__ */ jsx("span", {
290
- id: `${id}-verb`,
291
- className: `shrink-0 ${verbColor}`,
292
- children: verb
293
- }),
294
- dir && /* @__PURE__ */ jsxs("span", {
295
- className: "zg-meta-chip shrink-0 self-center gap-1 text-zg-meta text-zg-text/80",
296
- children: [/* @__PURE__ */ jsx("span", {
297
- "aria-hidden": true,
298
- className: "i-ph-folder text-zg-meta"
299
- }), dir]
300
- }),
301
- /* @__PURE__ */ jsxs("span", {
302
- className: "zg-meta ml-auto min-w-0 overflow-hidden pl-3 self-center flex items-center gap-1 opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100 transition-opacity",
303
- children: [receipt.map((cell) => /* @__PURE__ */ jsx("span", {
304
- className: "zg-meta-chip shrink-0",
386
+ "data-testid": "session-event",
387
+ children: [/* @__PURE__ */ jsx(SessionLine, {
388
+ session: {
389
+ id: sessionId,
390
+ title: sessionEvent.title,
391
+ link: sessionEvent.link
392
+ },
393
+ id,
394
+ open,
395
+ onToggle: () => setOpen((current) => !current),
396
+ lead: icons ? void 0 : /* @__PURE__ */ jsx(StatusDot, {
397
+ state: SESSION_EVENT_DOT[sessionEvent.status],
398
+ className: "self-center"
399
+ }),
400
+ title: scope.conversation ? updateTime(sessionEvent.at) : /* @__PURE__ */ jsx(SessionTitle, {
401
+ id: sessionId,
402
+ fallback: sessionEvent.title,
403
+ plain: true
404
+ }),
405
+ titleIsMeta: scope.conversation,
406
+ spoken: SESSION_EVENT_STATUS_STYLE[sessionEvent.status].verb,
407
+ excerpt: sessionEventExcerpt(sessionEvent),
408
+ durationMs: sessionEvent.durationMs,
409
+ turns: sessionEvent.turns,
410
+ answer: sessionEvent.status === "needs-attention",
411
+ onOpen: onOpenSession ? () => onOpenSession(sessionId) : void 0
412
+ }), /* @__PURE__ */ jsx("div", {
413
+ className: "zg-collapsible",
414
+ "data-open": open,
415
+ id: `${id}-body`,
416
+ inert: !open || void 0,
417
+ children: /* @__PURE__ */ jsx("div", {
418
+ className: "zg-collapsible-inner",
419
+ children: /* @__PURE__ */ jsx("div", {
420
+ className: "pt-1 flex flex-col gap-1.5",
421
+ children: mounted && /* @__PURE__ */ jsxs(Fragment$1, { children: [report.trim() && /* @__PURE__ */ jsx(ProseMarkdown, { children: report }), /* @__PURE__ */ jsx("div", {
422
+ className: "zg-meta flex flex-wrap gap-x-3",
423
+ children: receipt.map((cell, i) => /* @__PURE__ */ jsx("span", {
424
+ className: i === receipt.length - 1 ? "opacity-60" : void 0,
305
425
  children: cell
306
- }, cell)), /* @__PURE__ */ jsx("span", {
307
- className: "zg-meta-chip shrink-0 opacity-60",
308
- children: shortSessionId(sessionEvent.sessionId)
309
- })]
310
- }),
311
- needsAttention && onOpenSession && /* @__PURE__ */ jsx("span", {
312
- id: `${id}-answer`,
313
- className: "zg-meta-chip shrink-0 self-center text-zg-meta text-zg-warn",
314
- children: labels.clickToAnswer
315
- })
316
- ]
317
- }), excerpt && /* @__PURE__ */ jsx("div", {
318
- className: "zg-line-clamp-2 mt-0.5 text-zg-ui leading-zg-ui text-[var(--zg-text-muted)]",
319
- children: excerpt
320
- })]
321
- })
426
+ }, cell))
427
+ })] })
428
+ })
429
+ })
430
+ })]
322
431
  });
323
432
  });
433
+ /** An update's time of day, as its line's name under its conversation's header. */
434
+ function updateTime(at) {
435
+ return new Date(at).toLocaleTimeString(void 0, {
436
+ hour: "numeric",
437
+ minute: "2-digit"
438
+ });
439
+ }
324
440
  /**
325
441
  * The gutter line height of a command-detail row's Dot: a `text-sm` × 1.6
326
442
  * line (22.4px) plus the header button's `py-0.5`. A body-less detail has
@@ -426,4 +542,4 @@ const SpawnEndRow = memo(({ row, className, style }) => {
426
542
  }, value))]
427
543
  });
428
544
  });
429
- export { COMMAND_DETAIL_LINE, CommandDetailRow, CommandNoteRow, ErrorRow, FailureRow, InfoRow, NoticeRow, RepairedRow, SessionEventRow, SpawnEndRow, SpawnStartRow };
545
+ export { COMMAND_DETAIL_LINE, CommandDetailRow, CommandNoteRow, ErrorRow, FailureRow, InfoRow, NoticeRow, RepairedRow, SessionEventRow, SetupChangedRow, SpawnEndRow, SpawnStartRow };
@@ -23,6 +23,7 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
23
23
  function UserPromptRow({ row, onBubblePointerEnter, onBubbleContextMenu, className, style }) {
24
24
  const { Prompt } = useTranscriptRenderers();
25
25
  const icons = useRowIcons();
26
+ const labels = useChatLabels();
26
27
  const attachments = row.attachments ?? [];
27
28
  return /* @__PURE__ */ jsxs("div", {
28
29
  className: ["zg-row-enter relative flex items-start gap-3 pb-[var(--zg-row-gap,12px)]", className].filter(Boolean).join(" "),
@@ -49,7 +50,13 @@ function UserPromptRow({ row, onBubblePointerEnter, onBubbleContextMenu, classNa
49
50
  promptMediaOf(row.text).map((m) => /* @__PURE__ */ jsx(MessageMedia, {
50
51
  src: m.src,
51
52
  alt: m.alt
52
- }, m.src))
53
+ }, m.src)),
54
+ row.heldFor !== void 0 && /* @__PURE__ */ jsx("span", {
55
+ className: "text-zg-label text-[var(--zg-text-muted)]",
56
+ role: "status",
57
+ "data-testid": "prompt-held",
58
+ children: labels.promptHeldFor(row.heldFor)
59
+ })
53
60
  ]
54
61
  })]
55
62
  });
@@ -4,13 +4,40 @@
4
4
  */
5
5
  import { RunReceiptCell, RunReceiptSegment } from "zidane/chat/pure";
6
6
  import { StreamEvent } from "zidane/chat";
7
+ import { ThinkingLevel } from "zidane/types";
7
8
  export declare const RUN_RECEIPT_TINT: Record<RunReceiptCell['kind'], string>;
8
9
  export declare const RUN_RECEIPT_SEGMENT_TINT: Record<RunReceiptSegment['kind'], string>;
9
- /** A receipt value (`↻3`, `↑520k`), its leading glyph as an icon. */
10
- export declare function ReceiptValue({ text, className }: {
10
+ /** A receipt value (`↻3`, `↑520k`), its leading glyph as an icon. `label` names the glyph for assistive tech, else it reads the glyph. */
11
+ export declare function ReceiptValue({ text, className, label }: {
11
12
  text: string;
12
13
  className: string;
14
+ label?: string;
13
15
  }): import("react").JSX.Element;
16
+ /** A cell's parts, each tinted by meaning: the token cell's halves, or a model badge's name, effort and fast icon. Spaced by the parent's gap, no other mark. */
17
+ export declare function ReceiptSegments({ segments }: {
18
+ segments: readonly RunReceiptSegment[];
19
+ }): import("react").JSX.Element[];
20
+ /** Props for {@link ModelBadge}. */
21
+ export interface ModelBadgeProps {
22
+ /** Model id, named as the surface's picker names it. */
23
+ model: string;
24
+ /** Provider key, so the name reads as the picker's. */
25
+ providerKey?: string;
26
+ /** The reasoning effort it ran with, absent with thinking off. */
27
+ effort?: ThinkingLevel;
28
+ /** It ran in fast mode. */
29
+ fast?: boolean;
30
+ /** Extra classes on the root element. */
31
+ className?: string;
32
+ }
33
+ /**
34
+ * A model with the effort and fast mode it ran with, as the receipt's model
35
+ * cell draws it (`Opus 4.8 high` and a lightning icon). The subagent header
36
+ * shows it.
37
+ *
38
+ * @param props - Component props.
39
+ */
40
+ export declare function ModelBadge({ model, providerKey, effort, fast, className }: ModelBadgeProps): import("react").JSX.Element;
14
41
  /**
15
42
  * A compaction's facts as one quiet line: the summary call's model, its cost
16
43
  * when priced, and the tokens it sent and received. The compaction card and
@@ -1,6 +1,7 @@
1
+ import { useChatLabels } from "../useChatLabels.js";
1
2
  import { useModelName } from "./actions.js";
2
3
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { RUN_RECEIPT_SWITCH_GLYPH, RUN_RECEIPT_TURN_GLYPH, formatCostUsd, formatTokenCount } from "zidane/chat/pure";
4
+ import { RUN_RECEIPT_FAST_GLYPH, RUN_RECEIPT_SWITCH_GLYPH, RUN_RECEIPT_TURN_GLYPH, formatCostUsd, formatTokenCount, modelBadgeSegments } from "zidane/chat/pure";
4
5
  // src/chat/transcript/receipt-parts.tsx
5
6
  const RUN_RECEIPT_TINT = {
6
7
  agent: "text-zg-text/80",
@@ -13,16 +14,20 @@ const RUN_RECEIPT_TINT = {
13
14
  };
14
15
  const RUN_RECEIPT_SEGMENT_TINT = {
15
16
  "tokens-in": "zg-soft-tint zg-tint-accent",
16
- "tokens-out": "zg-soft-tint zg-tint-accent-alt"
17
+ "tokens-out": "zg-soft-tint zg-tint-accent-alt",
18
+ "model": RUN_RECEIPT_TINT.model,
19
+ "effort": "text-[var(--zg-text-muted)]",
20
+ "fast": "zg-soft-tint zg-tint-warn"
17
21
  };
18
22
  const RECEIPT_GLYPH_ICON = {
19
23
  [RUN_RECEIPT_TURN_GLYPH]: "i-ph-arrow-clockwise-bold",
20
24
  [RUN_RECEIPT_SWITCH_GLYPH]: "i-ph-arrows-left-right-bold",
21
25
  "↑": "i-ph-arrow-up-bold",
22
- "↓": "i-ph-arrow-down-bold"
26
+ "↓": "i-ph-arrow-down-bold",
27
+ [RUN_RECEIPT_FAST_GLYPH]: "i-ph-lightning-fill"
23
28
  };
24
- /** A receipt value (`↻3`, `↑520k`), its leading glyph as an icon. */
25
- function ReceiptValue({ text, className }) {
29
+ /** A receipt value (`↻3`, `↑520k`), its leading glyph as an icon. `label` names the glyph for assistive tech, else it reads the glyph. */
30
+ function ReceiptValue({ text, className, label }) {
26
31
  const icon = RECEIPT_GLYPH_ICON[text.charAt(0)];
27
32
  if (!icon) return /* @__PURE__ */ jsx("span", {
28
33
  className,
@@ -32,11 +37,39 @@ function ReceiptValue({ text, className }) {
32
37
  className,
33
38
  children: [/* @__PURE__ */ jsx("span", {
34
39
  role: "img",
35
- "aria-label": text.charAt(0),
40
+ "aria-label": label ?? text.charAt(0),
36
41
  className: `${icon} inline-block mr-px text-[0.8em] align-[calc(0.625cap_-_0.5em)]`
37
42
  }), text.slice(1)]
38
43
  });
39
44
  }
45
+ /** A cell's parts, each tinted by meaning: the token cell's halves, or a model badge's name, effort and fast icon. Spaced by the parent's gap, no other mark. */
46
+ function ReceiptSegments({ segments }) {
47
+ const labels = useChatLabels();
48
+ return segments.map((seg, j) => /* @__PURE__ */ jsx(ReceiptValue, {
49
+ text: seg.text,
50
+ className: RUN_RECEIPT_SEGMENT_TINT[seg.kind],
51
+ ...seg.kind === "fast" ? { label: labels.receiptFast } : {}
52
+ }, `${seg.kind}-${j}`));
53
+ }
54
+ /**
55
+ * A model with the effort and fast mode it ran with, as the receipt's model
56
+ * cell draws it (`Opus 4.8 high` and a lightning icon). The subagent header
57
+ * shows it.
58
+ *
59
+ * @param props - Component props.
60
+ */
61
+ function ModelBadge({ model, providerKey, effort, fast, className = "" }) {
62
+ const modelName = useModelName();
63
+ const segments = modelBadgeSegments(modelName(model, providerKey), {
64
+ ...effort ? { effort } : {},
65
+ ...fast ? { fast } : {}
66
+ });
67
+ return /* @__PURE__ */ jsx("span", {
68
+ className: `zg-meta inline-flex items-center gap-1 shrink-0 ${className}`,
69
+ title: model,
70
+ children: /* @__PURE__ */ jsx(ReceiptSegments, { segments })
71
+ });
72
+ }
40
73
  /**
41
74
  * A compaction's facts as one quiet line: the summary call's model, its cost
42
75
  * when priced, and the tokens it sent and received. The compaction card and
@@ -84,4 +117,4 @@ function CompactMeta({ meta, className = "" }) {
84
117
  ]
85
118
  });
86
119
  }
87
- export { CompactMeta, RUN_RECEIPT_SEGMENT_TINT, RUN_RECEIPT_TINT, ReceiptValue };
120
+ export { CompactMeta, ModelBadge, RUN_RECEIPT_SEGMENT_TINT, RUN_RECEIPT_TINT, ReceiptSegments, ReceiptValue };