@adea-ai/ui 0.162.6 → 0.162.7

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 (364) hide show
  1. package/dist/components/composites/about-dialog/about-dialog.js +5 -5
  2. package/dist/components/composites/about-dialog/about-dialog.js.map +1 -1
  3. package/dist/components/composites/accent-picker/accent-picker.js +3 -3
  4. package/dist/components/composites/accent-picker/accent-picker.js.map +1 -1
  5. package/dist/components/composites/accent-picker/custom-color-popover.js +2 -2
  6. package/dist/components/composites/accent-picker/custom-color-popover.js.map +1 -1
  7. package/dist/components/composites/account-menu/account-menu.js +22 -22
  8. package/dist/components/composites/account-menu/account-menu.js.map +1 -1
  9. package/dist/components/composites/action-button/action-button.js +2 -2
  10. package/dist/components/composites/action-button/action-button.js.map +1 -1
  11. package/dist/components/composites/appearance-editor/accent-swatch-groups.js +3 -3
  12. package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -1
  13. package/dist/components/composites/appearance-editor/appearance-choices.js +10 -10
  14. package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
  15. package/dist/components/composites/appearance-editor/appearance-editor.js +13 -13
  16. package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
  17. package/dist/components/composites/appearance-editor/appearance-rows.js +12 -12
  18. package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
  19. package/dist/components/composites/appearance-editor/font-settings-group.js +13 -13
  20. package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
  21. package/dist/components/composites/appearance-editor/theme-preview.js +1 -1
  22. package/dist/components/composites/appearance-editor/theme-preview.js.map +1 -1
  23. package/dist/components/composites/catalog-browser/catalog-browser-group.js +9 -9
  24. package/dist/components/composites/catalog-browser/catalog-browser-group.js.map +1 -1
  25. package/dist/components/composites/catalog-browser/catalog-browser.js +10 -10
  26. package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -1
  27. package/dist/components/composites/catalog-browser/catalog-detail.js +1 -1
  28. package/dist/components/composites/catalog-browser/catalog-detail.js.map +1 -1
  29. package/dist/components/composites/chain-of-thought/chain-of-thought.js +5 -5
  30. package/dist/components/composites/chain-of-thought/chain-of-thought.js.map +1 -1
  31. package/dist/components/composites/chat/chat.js +7 -7
  32. package/dist/components/composites/chat/chat.js.map +1 -1
  33. package/dist/components/composites/checkpoint/checkpoint.js +5 -5
  34. package/dist/components/composites/checkpoint/checkpoint.js.map +1 -1
  35. package/dist/components/composites/confirmation/confirmation.js +13 -13
  36. package/dist/components/composites/confirmation/confirmation.js.map +1 -1
  37. package/dist/components/composites/context/context.js +7 -7
  38. package/dist/components/composites/context/context.js.map +1 -1
  39. package/dist/components/composites/file-tree/build-file-tree.js +1 -1
  40. package/dist/components/composites/file-tree/build-file-tree.js.map +1 -1
  41. package/dist/components/composites/file-tree/file-tree.js +9 -9
  42. package/dist/components/composites/file-tree/file-tree.js.map +1 -1
  43. package/dist/components/composites/help-center/help-center.js +5 -5
  44. package/dist/components/composites/help-center/help-center.js.map +1 -1
  45. package/dist/components/composites/icon-picker/icon-picker.js +10 -10
  46. package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
  47. package/dist/components/composites/icon-picker/image-data-url.js.map +1 -1
  48. package/dist/components/composites/icon-picker/shell-icons.js +117 -117
  49. package/dist/components/composites/icon-picker/shell-icons.js.map +1 -1
  50. package/dist/components/composites/inline-citation/inline-citation.js +7 -7
  51. package/dist/components/composites/inline-citation/inline-citation.js.map +1 -1
  52. package/dist/components/composites/list-row/list-row-control.js +1 -1
  53. package/dist/components/composites/list-row/list-row-control.js.map +1 -1
  54. package/dist/components/composites/list-row/list-row.js +2 -2
  55. package/dist/components/composites/list-row/list-row.js.map +1 -1
  56. package/dist/components/composites/message-scroller/message-scroller.js +7 -7
  57. package/dist/components/composites/message-scroller/message-scroller.js.map +1 -1
  58. package/dist/components/composites/message-scroller/scroll-anchor.js +1 -1
  59. package/dist/components/composites/message-scroller/scroll-anchor.js.map +1 -1
  60. package/dist/components/composites/model-selector/model-selector.js +12 -12
  61. package/dist/components/composites/model-selector/model-selector.js.map +1 -1
  62. package/dist/components/composites/plan/plan.js +5 -5
  63. package/dist/components/composites/plan/plan.js.map +1 -1
  64. package/dist/components/composites/prompt-input/prompt-input.js +3 -3
  65. package/dist/components/composites/prompt-input/prompt-input.js.map +1 -1
  66. package/dist/components/composites/queue/queue.js +13 -13
  67. package/dist/components/composites/queue/queue.js.map +1 -1
  68. package/dist/components/composites/reasoning/reasoning.js +5 -5
  69. package/dist/components/composites/reasoning/reasoning.js.map +1 -1
  70. package/dist/components/composites/scene-controls/scene-controls.js +16 -16
  71. package/dist/components/composites/scene-controls/scene-controls.js.map +1 -1
  72. package/dist/components/composites/settings/settings-layout.js +2 -2
  73. package/dist/components/composites/settings/settings-layout.js.map +1 -1
  74. package/dist/components/composites/settings/settings-navigation.js +2 -2
  75. package/dist/components/composites/settings/settings-navigation.js.map +1 -1
  76. package/dist/components/composites/settings/settings.js +5 -5
  77. package/dist/components/composites/settings/settings.js.map +1 -1
  78. package/dist/components/composites/sources/sources.js +5 -5
  79. package/dist/components/composites/sources/sources.js.map +1 -1
  80. package/dist/components/composites/stack-trace/parse-stack-trace.js +2 -2
  81. package/dist/components/composites/stack-trace/parse-stack-trace.js.map +1 -1
  82. package/dist/components/composites/stack-trace/stack-trace.js +10 -10
  83. package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
  84. package/dist/components/composites/stat/stat.js +6 -6
  85. package/dist/components/composites/stat/stat.js.map +1 -1
  86. package/dist/components/composites/subagent/subagent.js +5 -5
  87. package/dist/components/composites/subagent/subagent.js.map +1 -1
  88. package/dist/components/composites/suggestion/suggestion.js +2 -2
  89. package/dist/components/composites/suggestion/suggestion.js.map +1 -1
  90. package/dist/components/composites/task/task.js +5 -5
  91. package/dist/components/composites/task/task.js.map +1 -1
  92. package/dist/components/composites/terminal/ansi.js +1 -1
  93. package/dist/components/composites/terminal/ansi.js.map +1 -1
  94. package/dist/components/composites/terminal/terminal.js +18 -18
  95. package/dist/components/composites/terminal/terminal.js.map +1 -1
  96. package/dist/components/composites/test-results/test-results.js +17 -17
  97. package/dist/components/composites/test-results/test-results.js.map +1 -1
  98. package/dist/components/composites/tool/tool.js +5 -5
  99. package/dist/components/composites/tool/tool.js.map +1 -1
  100. package/dist/components/composites/tree/tree.js +6 -6
  101. package/dist/components/composites/tree/tree.js.map +1 -1
  102. package/dist/components/composites/update-dialog/channel-control.js +1 -1
  103. package/dist/components/composites/update-dialog/channel-control.js.map +1 -1
  104. package/dist/components/composites/update-dialog/update-dialog.js +23 -23
  105. package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
  106. package/dist/components/composites/workspace-mark/workspace-mark.js +2 -2
  107. package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
  108. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js +6 -6
  109. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js.map +1 -1
  110. package/dist/components/composites/workspace-switcher/workspace-switcher.js +11 -11
  111. package/dist/components/composites/workspace-switcher/workspace-switcher.js.map +1 -1
  112. package/dist/components/conversation/atomic/chat-composer.js +1 -1
  113. package/dist/components/conversation/busy-send-button.js +10 -10
  114. package/dist/components/conversation/busy-send-button.js.map +1 -1
  115. package/dist/components/conversation/chat-composer.js +1 -1
  116. package/dist/components/conversation/composer-core.js +1 -1
  117. package/dist/components/conversation/composer-menu.js +2 -2
  118. package/dist/components/conversation/composer-menu.js.map +1 -1
  119. package/dist/components/conversation/conversation-avatar.js +7 -7
  120. package/dist/components/conversation/conversation-avatar.js.map +1 -1
  121. package/dist/components/conversation/conversation-pane.js +1 -1
  122. package/dist/components/conversation/conversation-pane.js.map +1 -1
  123. package/dist/components/conversation/conversation-surface.js +5 -5
  124. package/dist/components/conversation/conversation-surface.js.map +1 -1
  125. package/dist/components/conversation/internal/chat-composer-shell.js +9 -9
  126. package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
  127. package/dist/components/conversation/message-composer.js +9 -9
  128. package/dist/components/conversation/message-composer.js.map +1 -1
  129. package/dist/components/conversation/message-row.js +13 -13
  130. package/dist/components/conversation/message-row.js.map +1 -1
  131. package/dist/components/conversation/paste-token-editor.js +1 -1
  132. package/dist/components/conversation/paste-token-editor.js.map +1 -1
  133. package/dist/components/conversation/scroll-follow.js +1 -1
  134. package/dist/components/conversation/thread-panel.js +5 -5
  135. package/dist/components/conversation/thread-panel.js.map +1 -1
  136. package/dist/components/conversation/transcript-composition.js +5 -5
  137. package/dist/components/conversation/transcript-composition.js.map +1 -1
  138. package/dist/components/layout/app-shell/app-shell.js +1 -1
  139. package/dist/components/layout/app-shell/app-shell.js.map +1 -1
  140. package/dist/components/layout/app-shell/skip-link.js +1 -1
  141. package/dist/components/layout/app-shell/skip-link.js.map +1 -1
  142. package/dist/components/layout/contextual-sidebar/contextual-sidebar.js +2 -2
  143. package/dist/components/layout/contextual-sidebar/contextual-sidebar.js.map +1 -1
  144. package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.js +1 -1
  145. package/dist/components/layout/floating-preview/floating-preview.js +7 -7
  146. package/dist/components/layout/floating-preview/floating-preview.js.map +1 -1
  147. package/dist/components/layout/orbit-layout/orbit-layout.js +1 -1
  148. package/dist/components/layout/orbit-layout/orbit-layout.js.map +1 -1
  149. package/dist/components/layout/page/page.js +2 -2
  150. package/dist/components/layout/page/page.js.map +1 -1
  151. package/dist/components/layout/panel/panel.js +1 -1
  152. package/dist/components/layout/panel/panel.js.map +1 -1
  153. package/dist/components/layout/pixel-pane/pixel-pane.js +1 -1
  154. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js +5 -5
  155. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
  156. package/dist/components/layout/shell-rail/shell-rail.js +5 -5
  157. package/dist/components/layout/shell-rail/shell-rail.js.map +1 -1
  158. package/dist/components/layout/shell-top-bar/shell-top-bar.js +2 -2
  159. package/dist/components/layout/shell-top-bar/shell-top-bar.js.map +1 -1
  160. package/dist/components/layout/side-rail/side-rail.js +2 -2
  161. package/dist/components/layout/side-rail/side-rail.js.map +1 -1
  162. package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.js +1 -1
  163. package/dist/components/layout/sidebar-nav/sidebar-nav.js +5 -5
  164. package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
  165. package/dist/components/layout/split-layout/pane-focus.js.map +1 -1
  166. package/dist/components/layout/split-layout/resize-controller-core-retry.js +1 -1
  167. package/dist/components/layout/split-layout/resize-controller-core-retry.js.map +1 -1
  168. package/dist/components/layout/split-layout/resize-controller-core.js +1 -1
  169. package/dist/components/layout/split-layout/resize-controller-core.js.map +1 -1
  170. package/dist/components/layout/split-layout/split-layout.js +7 -7
  171. package/dist/components/layout/split-layout/split-layout.js.map +1 -1
  172. package/dist/components/layout/status-bar/status-bar.js +1 -1
  173. package/dist/components/layout/status-bar/status-bar.js.map +1 -1
  174. package/dist/components/layout/top-bar/top-bar.js +5 -5
  175. package/dist/components/layout/top-bar/top-bar.js.map +1 -1
  176. package/dist/components/layout/virtual-window/virtual-window.js +1 -1
  177. package/dist/components/layout/virtual-window/virtual-window.js.map +1 -1
  178. package/dist/components/motion/presence.js +1 -1
  179. package/dist/components/theme/appearance-panel.js +3 -3
  180. package/dist/components/theme/appearance-panel.js.map +1 -1
  181. package/dist/components/theme/lazy.js +3 -3
  182. package/dist/components/theme/lazy.js.map +1 -1
  183. package/dist/components/theme/script-projection.js +1 -1
  184. package/dist/components/theme/theme-catalogue-source.js +1 -1
  185. package/dist/components/theme/theme-document.js.map +1 -1
  186. package/dist/components/theme/theme-mode-toggle.js +7 -7
  187. package/dist/components/theme/theme-mode-toggle.js.map +1 -1
  188. package/dist/components/theme/theme-picker.js +2 -2
  189. package/dist/components/theme/theme-picker.js.map +1 -1
  190. package/dist/components/theme/theme-provider-value.js +1 -1
  191. package/dist/components/theme/theme-provider-value.js.map +1 -1
  192. package/dist/components/theme/theme-provider.js +1 -1
  193. package/dist/components/theme/theme-toggle.js +7 -7
  194. package/dist/components/theme/theme-toggle.js.map +1 -1
  195. package/dist/components/ui/accordion/accordion.js +13 -13
  196. package/dist/components/ui/accordion/accordion.js.map +1 -1
  197. package/dist/components/ui/alert/alert.js +12 -12
  198. package/dist/components/ui/alert/alert.js.map +1 -1
  199. package/dist/components/ui/alert-dialog/alert-dialog.js +14 -14
  200. package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -1
  201. package/dist/components/ui/annotation-surface/annotation-surface.js +2 -2
  202. package/dist/components/ui/annotation-surface/annotation-surface.js.map +1 -1
  203. package/dist/components/ui/aspect-ratio/aspect-ratio.js +1 -1
  204. package/dist/components/ui/aspect-ratio/aspect-ratio.js.map +1 -1
  205. package/dist/components/ui/attachment/attachment.js +16 -16
  206. package/dist/components/ui/attachment/attachment.js.map +1 -1
  207. package/dist/components/ui/avatar/avatar.js +1 -1
  208. package/dist/components/ui/avatar/avatar.js.map +1 -1
  209. package/dist/components/ui/badge/badge.js +2 -2
  210. package/dist/components/ui/badge/badge.js.map +1 -1
  211. package/dist/components/ui/board/board.js +2 -2
  212. package/dist/components/ui/board/board.js.map +1 -1
  213. package/dist/components/ui/breadcrumb/breadcrumb.js +7 -7
  214. package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
  215. package/dist/components/ui/bubble/bubble.js +2 -2
  216. package/dist/components/ui/bubble/bubble.js.map +1 -1
  217. package/dist/components/ui/button/button.js +2 -2
  218. package/dist/components/ui/button-group/button-group.js +2 -2
  219. package/dist/components/ui/button-group/button-group.js.map +1 -1
  220. package/dist/components/ui/calendar/calendar.js +8 -8
  221. package/dist/components/ui/calendar/calendar.js.map +1 -1
  222. package/dist/components/ui/callout/callout.js +2 -2
  223. package/dist/components/ui/callout/callout.js.map +1 -1
  224. package/dist/components/ui/card/card.js +2 -2
  225. package/dist/components/ui/card/card.js.map +1 -1
  226. package/dist/components/ui/carousel/carousel.js +8 -8
  227. package/dist/components/ui/carousel/carousel.js.map +1 -1
  228. package/dist/components/ui/chart/chart.js +2 -2
  229. package/dist/components/ui/chart/chart.js.map +1 -1
  230. package/dist/components/ui/checkbox/checkbox.js +6 -6
  231. package/dist/components/ui/checkbox/checkbox.js.map +1 -1
  232. package/dist/components/ui/code-block/code-block.js +6 -6
  233. package/dist/components/ui/code-block/code-block.js.map +1 -1
  234. package/dist/components/ui/collapsible/collapsible.js +7 -7
  235. package/dist/components/ui/collapsible/collapsible.js.map +1 -1
  236. package/dist/components/ui/combobox/combobox.js +21 -21
  237. package/dist/components/ui/combobox/combobox.js.map +1 -1
  238. package/dist/components/ui/combobox/value-combobox.js +1 -1
  239. package/dist/components/ui/command/command.js +23 -23
  240. package/dist/components/ui/command/command.js.map +1 -1
  241. package/dist/components/ui/context-menu/context-menu.js +2 -2
  242. package/dist/components/ui/detail-panel/detail-panel.js +5 -5
  243. package/dist/components/ui/detail-panel/detail-panel.js.map +1 -1
  244. package/dist/components/ui/dialog/dialog-layer.js +2 -2
  245. package/dist/components/ui/dialog/dialog-layer.js.map +1 -1
  246. package/dist/components/ui/dialog/dialog.js +21 -21
  247. package/dist/components/ui/dialog/dialog.js.map +1 -1
  248. package/dist/components/ui/diff-block/diff-block.js +2 -2
  249. package/dist/components/ui/diff-block/diff-block.js.map +1 -1
  250. package/dist/components/ui/drawer/drawer.js +14 -14
  251. package/dist/components/ui/drawer/drawer.js.map +1 -1
  252. package/dist/components/ui/dropdown-menu/dropdown-menu.js +3 -3
  253. package/dist/components/ui/dropdown-menu/menu-parts.js +10 -10
  254. package/dist/components/ui/dropdown-menu/menu-parts.js.map +1 -1
  255. package/dist/components/ui/empty/empty-state.js +5 -5
  256. package/dist/components/ui/empty/empty-state.js.map +1 -1
  257. package/dist/components/ui/empty/empty.js +1 -1
  258. package/dist/components/ui/empty/empty.js.map +1 -1
  259. package/dist/components/ui/entity-icon/entity-icon.js +2 -2
  260. package/dist/components/ui/entity-icon/entity-icon.js.map +1 -1
  261. package/dist/components/ui/field/field.js +14 -14
  262. package/dist/components/ui/field/field.js.map +1 -1
  263. package/dist/components/ui/field/number-field.js +2 -2
  264. package/dist/components/ui/field/number-field.js.map +1 -1
  265. package/dist/components/ui/hover-card/hover-card.js +10 -10
  266. package/dist/components/ui/hover-card/hover-card.js.map +1 -1
  267. package/dist/components/ui/input/input-control.js +1 -1
  268. package/dist/components/ui/input/input-control.js.map +1 -1
  269. package/dist/components/ui/input/input.js +2 -2
  270. package/dist/components/ui/input/input.js.map +1 -1
  271. package/dist/components/ui/input-group/input-group.js +2 -2
  272. package/dist/components/ui/input-group/input-group.js.map +1 -1
  273. package/dist/components/ui/input-group/secret-input-group.js +2 -2
  274. package/dist/components/ui/input-otp/input-otp.js +2 -2
  275. package/dist/components/ui/input-otp/input-otp.js.map +1 -1
  276. package/dist/components/ui/item/item.js +2 -2
  277. package/dist/components/ui/item/item.js.map +1 -1
  278. package/dist/components/ui/kbd/kbd.js +2 -2
  279. package/dist/components/ui/kbd/kbd.js.map +1 -1
  280. package/dist/components/ui/label/label.js +1 -1
  281. package/dist/components/ui/label/label.js.map +1 -1
  282. package/dist/components/ui/marker/marker.js +2 -2
  283. package/dist/components/ui/marker/marker.js.map +1 -1
  284. package/dist/components/ui/menubar/menubar.js +7 -7
  285. package/dist/components/ui/menubar/menubar.js.map +1 -1
  286. package/dist/components/ui/message/message.js +3 -3
  287. package/dist/components/ui/message/message.js.map +1 -1
  288. package/dist/components/ui/modal-dialog/modal-dialog.js +2 -2
  289. package/dist/components/ui/modal-dialog/modal-dialog.js.map +1 -1
  290. package/dist/components/ui/native-select/native-select.js +5 -5
  291. package/dist/components/ui/native-select/native-select.js.map +1 -1
  292. package/dist/components/ui/navigation-menu/navigation-menu.js +18 -18
  293. package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
  294. package/dist/components/ui/pagination/pagination.js +28 -28
  295. package/dist/components/ui/pagination/pagination.js.map +1 -1
  296. package/dist/components/ui/popover/popover.js +15 -15
  297. package/dist/components/ui/popover/popover.js.map +1 -1
  298. package/dist/components/ui/progress/progress.js +5 -5
  299. package/dist/components/ui/progress/progress.js.map +1 -1
  300. package/dist/components/ui/questionnaire/questionnaire.js +10 -10
  301. package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
  302. package/dist/components/ui/radio-group/radio-group.js +9 -9
  303. package/dist/components/ui/radio-group/radio-group.js.map +1 -1
  304. package/dist/components/ui/resizable/resizable.js +11 -11
  305. package/dist/components/ui/resizable/resizable.js.map +1 -1
  306. package/dist/components/ui/scroll-area/scroll-area.js +1 -1
  307. package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
  308. package/dist/components/ui/select/select.js +21 -21
  309. package/dist/components/ui/select/select.js.map +1 -1
  310. package/dist/components/ui/separator/separator.js +5 -5
  311. package/dist/components/ui/separator/separator.js.map +1 -1
  312. package/dist/components/ui/sheet/sheet.js +6 -6
  313. package/dist/components/ui/sheet/sheet.js.map +1 -1
  314. package/dist/components/ui/skeleton/skeleton.js +1 -1
  315. package/dist/components/ui/skeleton/skeleton.js.map +1 -1
  316. package/dist/components/ui/slider/slider.js +5 -5
  317. package/dist/components/ui/slider/slider.js.map +1 -1
  318. package/dist/components/ui/spinner/spinner.js +5 -5
  319. package/dist/components/ui/spinner/spinner.js.map +1 -1
  320. package/dist/components/ui/status-chip/status-chip.js +2 -2
  321. package/dist/components/ui/status-chip/status-chip.js.map +1 -1
  322. package/dist/components/ui/switch/switch.js +4 -4
  323. package/dist/components/ui/switch/switch.js.map +1 -1
  324. package/dist/components/ui/table/table.js +1 -1
  325. package/dist/components/ui/table/table.js.map +1 -1
  326. package/dist/components/ui/tabs/tabs.js +7 -7
  327. package/dist/components/ui/tabs/tabs.js.map +1 -1
  328. package/dist/components/ui/text-link/text-link.js +1 -1
  329. package/dist/components/ui/text-link/text-link.js.map +1 -1
  330. package/dist/components/ui/textarea/textarea.js +2 -2
  331. package/dist/components/ui/textarea/textarea.js.map +1 -1
  332. package/dist/components/ui/toast/toast.js +7 -7
  333. package/dist/components/ui/toast/toast.js.map +1 -1
  334. package/dist/components/ui/toggle/toggle.js +6 -6
  335. package/dist/components/ui/toggle/toggle.js.map +1 -1
  336. package/dist/components/ui/toggle-group/toggle-group.js +7 -8
  337. package/dist/components/ui/toggle-group/toggle-group.js.map +1 -1
  338. package/dist/components/ui/tooltip/deferred-tooltip.js +6 -6
  339. package/dist/components/ui/tooltip/deferred-tooltip.js.map +1 -1
  340. package/dist/components/ui/tooltip/lazy-tooltip.js +2 -2
  341. package/dist/components/ui/tooltip/tooltip.js +10 -10
  342. package/dist/components/ui/tooltip/tooltip.js.map +1 -1
  343. package/dist/components/ui/trace/trace.js +19 -19
  344. package/dist/components/ui/trace/trace.js.map +1 -1
  345. package/dist/components/ui/typography/typography.js +2 -2
  346. package/dist/lib/accent-presets.js +1 -1
  347. package/dist/lib/accent-roles.js +2 -2
  348. package/dist/lib/async-action.js +1 -1
  349. package/dist/lib/create-poll.js +1 -1
  350. package/dist/lib/create-poll.js.map +1 -1
  351. package/dist/lib/external-link.js +1 -1
  352. package/dist/lib/external-link.js.map +1 -1
  353. package/dist/lib/fast-icon.js +1 -1
  354. package/dist/lib/theme-css.js +1 -1
  355. package/dist/lib/theme-engine-light.js +1 -1
  356. package/dist/lib/theme-projection.js +2 -2
  357. package/dist/lib/theme-records.js +1 -1
  358. package/dist/lib/themes.js +1 -1
  359. package/dist/lib/themes.js.map +1 -1
  360. package/dist/lib/tooltip-focus-gate.js.map +1 -1
  361. package/dist/lib/utils.js +1 -1
  362. package/dist/vite/source-parser.js +1 -1
  363. package/dist/vite/tailwind-sources.js +1 -1
  364. package/package.json +7 -7
@@ -1,9 +1,9 @@
1
+ import { Dynamic, createComponent, insert, memo, spread, template } from "@solidjs/web";
2
+ import { ArrowDownRight as ArrowDownRight$1, ArrowUpRight as ArrowUpRight$1 } from "@lucide/solid";
3
+ import { Show, omit } from "solid-js";
1
4
  import { cn } from "../../../lib/utils.js";
2
5
  import { Heading, Text } from "../../ui/typography/typography.js";
3
6
  import { fastIcon } from "../../../lib/fast-icon.js";
4
- import { Dynamic, createComponent, insert, memo, spread, template } from "@solidjs/web";
5
- import { ArrowDownRight, ArrowUpRight } from "@lucide/solid";
6
- import { Show, omit } from "solid-js";
7
7
  // src/components/composites/stat/stat.tsx
8
8
  var _tmpl$ = /* @__PURE__ */ template(`<div><div class="text-muted-foreground truncate text-xs font-medium"></div><div class="flex items-baseline gap-1"><!><!></div><!><!>`);
9
9
  var _tmpl$2 = /* @__PURE__ */ template(`<div class="text-foreground flex items-center gap-1 text-xs"><span class=tabular-nums>`);
@@ -12,8 +12,8 @@ var _tmpl$4 = /* @__PURE__ */ template(`<dl>`);
12
12
  var _tmpl$5 = /* @__PURE__ */ template(`<dt>`);
13
13
  var _tmpl$6 = /* @__PURE__ */ template(`<dd>`);
14
14
  var _tmpl$7 = /* @__PURE__ */ template(`<div><span class="text-muted-foreground shrink-0"></span><span class="min-w-0 truncate text-end select-text">`);
15
- var ArrowDownRight$1 = fastIcon(ArrowDownRight);
16
- var ArrowUpRight$1 = fastIcon(ArrowUpRight);
15
+ var ArrowDownRight = fastIcon(ArrowDownRight$1);
16
+ var ArrowUpRight = fastIcon(ArrowUpRight$1);
17
17
  function Stat(props) {
18
18
  const local = props;
19
19
  const rest = omit(props, "class", "label", "value", "unit", "delta", "deltaTone", "accent", "children");
@@ -67,7 +67,7 @@ function Stat(props) {
67
67
  return () => {
68
68
  return _c$() ? createComponent(Dynamic, {
69
69
  get component() {
70
- return local.deltaTone === "down" ? ArrowDownRight$1 : ArrowUpRight$1;
70
+ return local.deltaTone === "down" ? ArrowDownRight : ArrowUpRight;
71
71
  },
72
72
  "aria-hidden": "true",
73
73
  get "class"() {
@@ -1 +1 @@
1
- {"version":3,"file":"stat.js","names":["<Heading as=\"span\" size=\"page\" numeric>\n {local.value}\n </Heading>","as=\"span\"","size=\"page\"","<div class=\"flex items-baseline gap-1\">\n <Heading as=\"span\" size=\"page\" numeric>\n {local.value}\n </Heading>\n <Show when={local.unit}>\n {(unitSlot) => (\n <Text variant=\"caption\" tone=\"muted\">\n {unitSlot()}\n </Text>\n )}\n </Show>\n </div>","<Show when={local.unit}>\n {(unitSlot) => (\n <Text variant=\"caption\" tone=\"muted\">\n {unitSlot()}\n </Text>\n )}\n </Show>","<Text variant=\"caption\" tone=\"muted\">\n {unitSlot()}\n </Text>","variant=\"caption\"","tone=\"muted\"","<Show when={local.delta}>\n {(deltaSlot) => (\n <div class=\"text-foreground flex items-center gap-1 text-xs\">\n <Show when={local.deltaTone === 'up' || local.deltaTone === 'down'}>\n <Dynamic\n component={local.deltaTone === 'down' ? ArrowDownRight : ArrowUpRight}\n aria-hidden=\"true\"\n class={cn('size-3', {\n 'text-success': local.deltaTone === 'up',\n 'text-destructive': local.deltaTone === 'down',\n })}\n />\n </Show>\n <span class=\"tabular-nums\">{deltaSlot()}</span>\n </div>\n )}\n </Show>","<Dynamic\n component={local.deltaTone === 'down' ? ArrowDownRight : ArrowUpRight}\n aria-hidden=\"true\"\n class={cn('size-3', {\n 'text-success': local.deltaTone === 'up',\n 'text-destructive': local.deltaTone === 'down',\n })}\n />","<div class=\"text-foreground flex items-center gap-1 text-xs\">\n <Show when={local.deltaTone === 'up' || local.deltaTone === 'down'}>\n <Dynamic\n component={local.deltaTone === 'down' ? ArrowDownRight : ArrowUpRight}\n aria-hidden=\"true\"\n class={cn('size-3', {\n 'text-success': local.deltaTone === 'up',\n 'text-destructive': local.deltaTone === 'down',\n })}\n />\n </Show>\n <span class=\"tabular-nums\">{deltaSlot()}</span>\n </div>","<div\n data-slot=\"stat\"\n class={cn(\n 'flex min-w-0 flex-col gap-1 rounded-lg border border-border bg-card p-3',\n { 'border-t-2 border-t-primary': local.accent },\n local.class\n )}\n {...rest}\n >\n <div class=\"text-muted-foreground truncate text-xs font-medium\">{local.label}</div>\n <div class=\"flex items-baseline gap-1\">\n <Heading as=\"span\" size=\"page\" numeric>\n {local.value}\n </Heading>\n <Show when={local.unit}>\n {(unitSlot) => (\n <Text variant=\"caption\" tone=\"muted\">\n {unitSlot()}\n </Text>\n )}\n </Show>\n </div>\n <Show when={local.delta}>\n {(deltaSlot) => (\n <div class=\"text-foreground flex items-center gap-1 text-xs\">\n <Show when={local.deltaTone === 'up' || local.deltaTone === 'down'}>\n <Dynamic\n component={local.deltaTone === 'down' ? ArrowDownRight : ArrowUpRight}\n aria-hidden=\"true\"\n class={cn('size-3', {\n 'text-success': local.deltaTone === 'up',\n 'text-destructive': local.deltaTone === 'down',\n })}\n />\n </Show>\n <span class=\"tabular-nums\">{deltaSlot()}</span>\n </div>\n )}\n </Show>\n {local.children}\n </div>","<div\n data-slot=\"stat-group\"\n class={cn(\n 'grid gap-3',\n // 9.375rem is 150px at the default root size: room for a label of about\n // twenty characters and a six-digit value before the tile truncates.\n local.fit\n ? 'grid-cols-[repeat(auto-fill,minmax(9.375rem,1fr))]'\n : 'sm:grid-cols-2 lg:grid-cols-4',\n local.class\n )}\n {...rest}\n />","<dl\n data-slot=\"property-list\"\n class={cn('grid grid-cols-[auto_1fr] items-baseline gap-x-4 gap-y-2 text-sm', local.class)}\n {...rest}\n />","<dt\n data-slot=\"property-term\"\n class={cn('text-muted-foreground whitespace-nowrap', local.class)}\n {...rest}\n />","<dd\n data-slot=\"property-value\"\n class={cn('min-w-0 break-words select-text', local.class)}\n {...rest}\n />","<div\n data-slot=\"property-row\"\n class={cn('flex items-baseline justify-between gap-4 text-sm', local.class)}\n {...rest}\n >\n <span class=\"text-muted-foreground shrink-0\">{local.term}</span>\n <span class=\"min-w-0 truncate text-end select-text\">{local.children}</span>\n </div>","ArrowDownRight","LucideArrowDownRight","ArrowUpRight","LucideArrowUpRight"],"sources":["../../../../src/components/composites/stat/stat.tsx"],"sourcesContent":["import {\n ArrowDownRight as LucideArrowDownRight,\n ArrowUpRight as LucideArrowUpRight,\n} from '@lucide/solid'\nimport type { ComponentProps, JSX } from '@solidjs/web'\nimport { Show, omit } from 'solid-js'\nimport { Dynamic } from '@solidjs/web'\nimport { cn } from '#lib/utils'\nimport { Heading, Text } from '../../ui/typography'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst ArrowDownRight = fastIcon(LucideArrowDownRight)\nconst ArrowUpRight = fastIcon(LucideArrowUpRight)\n\n/**\n * Stat.\n *\n * A single measured number with its label and, optionally, its change. The\n * whole component is a decision about honesty: a value shown without its\n * comparison is not information, so `delta` carries the direction, the amount\n * and — through `deltaTone` — whether the direction is *good*. A rising number\n * is not always a rising outcome, and only the caller knows which way is which.\n *\n * `tabular-nums` on the value is what lets two stats in a row be compared\n * without the digits shifting under the reader.\n */\nexport type StatProps = ComponentProps<'div'> & {\n label: string\n value: JSX.Element\n /** A unit or qualifier after the value, e.g. \"ms\", \"of 10\". */\n unit?: string\n /** The change, e.g. \"+12% from last week\". */\n delta?: string\n /** Whether the change is an improvement. Decides the arrow and the colour. */\n deltaTone?: 'up' | 'down' | 'neutral'\n /** Draws the leading accent rule used for a row of headline numbers. */\n accent?: boolean\n}\n\nexport function Stat(props: StatProps) {\n const local = props\n const rest = omit(\n props,\n 'class',\n 'label',\n 'value',\n 'unit',\n 'delta',\n 'deltaTone',\n 'accent',\n 'children'\n )\n\n return (\n <div\n data-slot=\"stat\"\n class={cn(\n 'flex min-w-0 flex-col gap-1 rounded-lg border border-border bg-card p-3',\n { 'border-t-2 border-t-primary': local.accent },\n local.class\n )}\n {...rest}\n >\n <div class=\"text-muted-foreground truncate text-xs font-medium\">{local.label}</div>\n <div class=\"flex items-baseline gap-1\">\n <Heading as=\"span\" size=\"page\" numeric>\n {local.value}\n </Heading>\n <Show when={local.unit}>\n {(unitSlot) => (\n <Text variant=\"caption\" tone=\"muted\">\n {unitSlot()}\n </Text>\n )}\n </Show>\n </div>\n <Show when={local.delta}>\n {(deltaSlot) => (\n <div class=\"text-foreground flex items-center gap-1 text-xs\">\n <Show when={local.deltaTone === 'up' || local.deltaTone === 'down'}>\n <Dynamic\n component={local.deltaTone === 'down' ? ArrowDownRight : ArrowUpRight}\n aria-hidden=\"true\"\n class={cn('size-3', {\n 'text-success': local.deltaTone === 'up',\n 'text-destructive': local.deltaTone === 'down',\n })}\n />\n </Show>\n <span class=\"tabular-nums\">{deltaSlot()}</span>\n </div>\n )}\n </Show>\n {local.children}\n </div>\n )\n}\n\n/**\n * A row of stats that shares one gap and wraps as the window narrows.\n *\n * By default the column count steps with the *viewport* (two from `sm`, four from\n * `lg`), which is right for a group that spans the page. A group inside a pane\n * whose width is not the window's (a docked panel, a resizable column, a view\n * beside a sidebar) gets the wrong count from a viewport breakpoint. `fit` sizes\n * from the group's own width instead: as many tiles per row as fit at the\n * minimum tile width, each growing to share the remainder, however many stats\n * there are.\n */\nexport function StatGroup(props: ComponentProps<'div'> & { fit?: boolean }) {\n const local = props\n const rest = omit(props, 'class', 'fit')\n return (\n <div\n data-slot=\"stat-group\"\n class={cn(\n 'grid gap-3',\n // 9.375rem is 150px at the default root size: room for a label of about\n // twenty characters and a six-digit value before the tile truncates.\n local.fit\n ? 'grid-cols-[repeat(auto-fill,minmax(9.375rem,1fr))]'\n : 'sm:grid-cols-2 lg:grid-cols-4',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * PropertyList.\n *\n * A definition list for read-only metadata: the details of a file, a session, a\n * build. This is a `<dl>`, not a table and not a grid of divs, because the\n * relationship being expressed is term-and-definition and the platform has an\n * element for exactly that.\n *\n * Values are selectable by default. Metadata is the thing users copy most and\n * get the least often: a commit hash behind a drag-to-select gesture is a small\n * daily failure.\n */\nexport function PropertyList(props: ComponentProps<'dl'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <dl\n data-slot=\"property-list\"\n class={cn('grid grid-cols-[auto_1fr] items-baseline gap-x-4 gap-y-2 text-sm', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PropertyTerm(props: ComponentProps<'dt'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <dt\n data-slot=\"property-term\"\n class={cn('text-muted-foreground whitespace-nowrap', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PropertyValue(props: ComponentProps<'dd'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <dd\n data-slot=\"property-value\"\n class={cn('min-w-0 break-words select-text', local.class)}\n {...rest}\n />\n )\n}\n\n/** A single term/value pair, for a list built one row at a time. */\nexport function PropertyRow(props: ComponentProps<'div'> & { term: string }) {\n const local = props\n const rest = omit(props, 'class', 'term', 'children')\n\n return (\n <div\n data-slot=\"property-row\"\n class={cn('flex items-baseline justify-between gap-4 text-sm', local.class)}\n {...rest}\n >\n <span class=\"text-muted-foreground shrink-0\">{local.term}</span>\n <span class=\"min-w-0 truncate text-end select-text\">{local.children}</span>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAYA,IAAMiB,mBAAiB,SAASC,cAAoB;AACpD,IAAMC,iBAAe,SAASC,YAAkB;AA2BhD,SAAgB,KAAK,OAAkB;CACrC,MAAM,QAAQ;CACd,MAAM,OAAO,KACX,OACA,SACA,SACA,SACA,QACA,SACA,aACA,UACA,UACF;CAGE,IAAA,OAAA,OAwCK;CA/BH,IAAA,QAAA,KAAA;CACA,IAAA,QAAA,MAAA;;;CAVF,IAAA,QAAA,MAAA;;CAOE,OAAA,MAAA,CAAA;EANA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GACL,2EACA,EAAE,+BAA+B,MAAM,OAAO,GAC9C,MAAM,KACR;EAAC;CACO,GAAJ,IAAA,GAAA,IAAA;CAEJ,OAAA,aAAgE;EAAC,OAAA,MAAM;CAAK,CAAM;CAClF,OAAA,OACEpB,gBAAAA,SAAAA;EAASC,IAAG;EAAOC,MAAK;EAAO,SAAA;EAA/B,IAAA,WAAA;GACG,OAAA,MAAM;EACA;CAHXC,CAAAA,GAAAA,KAWK;CAXL,OAAA,OAIEC,gBAAAA,MAAAA;EAAM,IAAA,OAAA;GAAM,OAAA,MAAM;EAAI;EAAtBA,WACI,aACAC,gBAAAA,MAAAA;GAAMC,SAAQ;GAAUC,MAAK;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,OAAA,GAAG,oEAAoE,MAAM,KAAK;EAAC;CAClF,GAAJ,IAAA,GAAA,KAAA;CAJR,OACEC;AAMJ;AAEA,SAAgB,aAAa,OAA6B;CACxD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAE9B,IAAA,SAAA,QAIC;CADC,OAAA,QAAA,CAAA;EAFA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAAG,2CAA2C,MAAM,KAAK;EAAC;CACzD,GAAJ,IAAA,GAAA,KAAA;CAJR,OACEC;AAMJ;AAEA,SAAgB,cAAc,OAA6B;CACzD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAE9B,IAAA,SAAA,QAIC;CADC,OAAA,QAAA,CAAA;EAFA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAAG,mCAAmC,MAAM,KAAK;EAAC;CACjD,GAAJ,IAAA,GAAA,KAAA;CAJR,OACEC;AAMJ;;AAGA,SAAgB,YAAY,OAAiD;CAC3E,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,QAAQ,UAAU;CAGlD,IAAA,SAAA,QAOK;CAFH,IAAA,SAAA,OAAA;CACA,IAAA,SAAA,OAAA;CAHA,OAAA,QAAA,CAAA;EAFA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAAG,qDAAqD,MAAM,KAAK;EAAC;CACnE,GAAJ,IAAA,GAAA,IAAA;CAEJ,OAAA,cAA6C;EAAC,OAAA,MAAM;CAAI,CAAO;CAC/D,OAAA,cAAoD;EAAC,OAAA,MAAM;CAAQ,CAAO;CAP9E,OACEC;AASJ"}
1
+ {"version":3,"file":"stat.js","names":["<Heading as=\"span\" size=\"page\" numeric>\n {local.value}\n </Heading>","as=\"span\"","size=\"page\"","<div class=\"flex items-baseline gap-1\">\n <Heading as=\"span\" size=\"page\" numeric>\n {local.value}\n </Heading>\n <Show when={local.unit}>\n {(unitSlot) => (\n <Text variant=\"caption\" tone=\"muted\">\n {unitSlot()}\n </Text>\n )}\n </Show>\n </div>","<Show when={local.unit}>\n {(unitSlot) => (\n <Text variant=\"caption\" tone=\"muted\">\n {unitSlot()}\n </Text>\n )}\n </Show>","<Text variant=\"caption\" tone=\"muted\">\n {unitSlot()}\n </Text>","variant=\"caption\"","tone=\"muted\"","<Show when={local.delta}>\n {(deltaSlot) => (\n <div class=\"text-foreground flex items-center gap-1 text-xs\">\n <Show when={local.deltaTone === 'up' || local.deltaTone === 'down'}>\n <Dynamic\n component={local.deltaTone === 'down' ? ArrowDownRight : ArrowUpRight}\n aria-hidden=\"true\"\n class={cn('size-3', {\n 'text-success': local.deltaTone === 'up',\n 'text-destructive': local.deltaTone === 'down',\n })}\n />\n </Show>\n <span class=\"tabular-nums\">{deltaSlot()}</span>\n </div>\n )}\n </Show>","<Dynamic\n component={local.deltaTone === 'down' ? ArrowDownRight : ArrowUpRight}\n aria-hidden=\"true\"\n class={cn('size-3', {\n 'text-success': local.deltaTone === 'up',\n 'text-destructive': local.deltaTone === 'down',\n })}\n />","<div class=\"text-foreground flex items-center gap-1 text-xs\">\n <Show when={local.deltaTone === 'up' || local.deltaTone === 'down'}>\n <Dynamic\n component={local.deltaTone === 'down' ? ArrowDownRight : ArrowUpRight}\n aria-hidden=\"true\"\n class={cn('size-3', {\n 'text-success': local.deltaTone === 'up',\n 'text-destructive': local.deltaTone === 'down',\n })}\n />\n </Show>\n <span class=\"tabular-nums\">{deltaSlot()}</span>\n </div>","<div\n data-slot=\"stat\"\n class={cn(\n 'flex min-w-0 flex-col gap-1 rounded-lg border border-border bg-card p-3',\n { 'border-t-2 border-t-primary': local.accent },\n local.class\n )}\n {...rest}\n >\n <div class=\"text-muted-foreground truncate text-xs font-medium\">{local.label}</div>\n <div class=\"flex items-baseline gap-1\">\n <Heading as=\"span\" size=\"page\" numeric>\n {local.value}\n </Heading>\n <Show when={local.unit}>\n {(unitSlot) => (\n <Text variant=\"caption\" tone=\"muted\">\n {unitSlot()}\n </Text>\n )}\n </Show>\n </div>\n <Show when={local.delta}>\n {(deltaSlot) => (\n <div class=\"text-foreground flex items-center gap-1 text-xs\">\n <Show when={local.deltaTone === 'up' || local.deltaTone === 'down'}>\n <Dynamic\n component={local.deltaTone === 'down' ? ArrowDownRight : ArrowUpRight}\n aria-hidden=\"true\"\n class={cn('size-3', {\n 'text-success': local.deltaTone === 'up',\n 'text-destructive': local.deltaTone === 'down',\n })}\n />\n </Show>\n <span class=\"tabular-nums\">{deltaSlot()}</span>\n </div>\n )}\n </Show>\n {local.children}\n </div>","<div\n data-slot=\"stat-group\"\n class={cn(\n 'grid gap-3',\n // 9.375rem is 150px at the default root size: room for a label of about\n // twenty characters and a six-digit value before the tile truncates.\n local.fit\n ? 'grid-cols-[repeat(auto-fill,minmax(9.375rem,1fr))]'\n : 'sm:grid-cols-2 lg:grid-cols-4',\n local.class\n )}\n {...rest}\n />","<dl\n data-slot=\"property-list\"\n class={cn('grid grid-cols-[auto_1fr] items-baseline gap-x-4 gap-y-2 text-sm', local.class)}\n {...rest}\n />","<dt\n data-slot=\"property-term\"\n class={cn('text-muted-foreground whitespace-nowrap', local.class)}\n {...rest}\n />","<dd\n data-slot=\"property-value\"\n class={cn('min-w-0 break-words select-text', local.class)}\n {...rest}\n />","<div\n data-slot=\"property-row\"\n class={cn('flex items-baseline justify-between gap-4 text-sm', local.class)}\n {...rest}\n >\n <span class=\"text-muted-foreground shrink-0\">{local.term}</span>\n <span class=\"min-w-0 truncate text-end select-text\">{local.children}</span>\n </div>","LucideArrowDownRight","LucideArrowUpRight","_$spread","_$insert"],"sources":["../../../../src/components/composites/stat/stat.tsx"],"sourcesContent":["import {\n ArrowDownRight as LucideArrowDownRight,\n ArrowUpRight as LucideArrowUpRight,\n} from '@lucide/solid'\nimport type { ComponentProps, JSX } from '@solidjs/web'\nimport { Show, omit } from 'solid-js'\nimport { Dynamic } from '@solidjs/web'\nimport { cn } from '#lib/utils'\nimport { Heading, Text } from '../../ui/typography'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst ArrowDownRight = fastIcon(LucideArrowDownRight)\nconst ArrowUpRight = fastIcon(LucideArrowUpRight)\n\n/**\n * Stat.\n *\n * A single measured number with its label and, optionally, its change. The\n * whole component is a decision about honesty: a value shown without its\n * comparison is not information, so `delta` carries the direction, the amount\n * and — through `deltaTone` — whether the direction is *good*. A rising number\n * is not always a rising outcome, and only the caller knows which way is which.\n *\n * `tabular-nums` on the value is what lets two stats in a row be compared\n * without the digits shifting under the reader.\n */\nexport type StatProps = ComponentProps<'div'> & {\n label: string\n value: JSX.Element\n /** A unit or qualifier after the value, e.g. \"ms\", \"of 10\". */\n unit?: string\n /** The change, e.g. \"+12% from last week\". */\n delta?: string\n /** Whether the change is an improvement. Decides the arrow and the colour. */\n deltaTone?: 'up' | 'down' | 'neutral'\n /** Draws the leading accent rule used for a row of headline numbers. */\n accent?: boolean\n}\n\nexport function Stat(props: StatProps) {\n const local = props\n const rest = omit(\n props,\n 'class',\n 'label',\n 'value',\n 'unit',\n 'delta',\n 'deltaTone',\n 'accent',\n 'children'\n )\n\n return (\n <div\n data-slot=\"stat\"\n class={cn(\n 'flex min-w-0 flex-col gap-1 rounded-lg border border-border bg-card p-3',\n { 'border-t-2 border-t-primary': local.accent },\n local.class\n )}\n {...rest}\n >\n <div class=\"text-muted-foreground truncate text-xs font-medium\">{local.label}</div>\n <div class=\"flex items-baseline gap-1\">\n <Heading as=\"span\" size=\"page\" numeric>\n {local.value}\n </Heading>\n <Show when={local.unit}>\n {(unitSlot) => (\n <Text variant=\"caption\" tone=\"muted\">\n {unitSlot()}\n </Text>\n )}\n </Show>\n </div>\n <Show when={local.delta}>\n {(deltaSlot) => (\n <div class=\"text-foreground flex items-center gap-1 text-xs\">\n <Show when={local.deltaTone === 'up' || local.deltaTone === 'down'}>\n <Dynamic\n component={local.deltaTone === 'down' ? ArrowDownRight : ArrowUpRight}\n aria-hidden=\"true\"\n class={cn('size-3', {\n 'text-success': local.deltaTone === 'up',\n 'text-destructive': local.deltaTone === 'down',\n })}\n />\n </Show>\n <span class=\"tabular-nums\">{deltaSlot()}</span>\n </div>\n )}\n </Show>\n {local.children}\n </div>\n )\n}\n\n/**\n * A row of stats that shares one gap and wraps as the window narrows.\n *\n * By default the column count steps with the *viewport* (two from `sm`, four from\n * `lg`), which is right for a group that spans the page. A group inside a pane\n * whose width is not the window's (a docked panel, a resizable column, a view\n * beside a sidebar) gets the wrong count from a viewport breakpoint. `fit` sizes\n * from the group's own width instead: as many tiles per row as fit at the\n * minimum tile width, each growing to share the remainder, however many stats\n * there are.\n */\nexport function StatGroup(props: ComponentProps<'div'> & { fit?: boolean }) {\n const local = props\n const rest = omit(props, 'class', 'fit')\n return (\n <div\n data-slot=\"stat-group\"\n class={cn(\n 'grid gap-3',\n // 9.375rem is 150px at the default root size: room for a label of about\n // twenty characters and a six-digit value before the tile truncates.\n local.fit\n ? 'grid-cols-[repeat(auto-fill,minmax(9.375rem,1fr))]'\n : 'sm:grid-cols-2 lg:grid-cols-4',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * PropertyList.\n *\n * A definition list for read-only metadata: the details of a file, a session, a\n * build. This is a `<dl>`, not a table and not a grid of divs, because the\n * relationship being expressed is term-and-definition and the platform has an\n * element for exactly that.\n *\n * Values are selectable by default. Metadata is the thing users copy most and\n * get the least often: a commit hash behind a drag-to-select gesture is a small\n * daily failure.\n */\nexport function PropertyList(props: ComponentProps<'dl'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <dl\n data-slot=\"property-list\"\n class={cn('grid grid-cols-[auto_1fr] items-baseline gap-x-4 gap-y-2 text-sm', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PropertyTerm(props: ComponentProps<'dt'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <dt\n data-slot=\"property-term\"\n class={cn('text-muted-foreground whitespace-nowrap', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PropertyValue(props: ComponentProps<'dd'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <dd\n data-slot=\"property-value\"\n class={cn('min-w-0 break-words select-text', local.class)}\n {...rest}\n />\n )\n}\n\n/** A single term/value pair, for a list built one row at a time. */\nexport function PropertyRow(props: ComponentProps<'div'> & { term: string }) {\n const local = props\n const rest = omit(props, 'class', 'term', 'children')\n\n return (\n <div\n data-slot=\"property-row\"\n class={cn('flex items-baseline justify-between gap-4 text-sm', local.class)}\n {...rest}\n >\n <span class=\"text-muted-foreground shrink-0\">{local.term}</span>\n <span class=\"min-w-0 truncate text-end select-text\">{local.children}</span>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAYA,IAAM,iBAAiB,SAASiB,gBAAoB;AACpD,IAAM,eAAe,SAASC,cAAkB;AA2BhD,SAAgB,KAAK,OAAkB;CACrC,MAAM,QAAQ;CACd,MAAM,OAAO,KACX,OACA,SACA,SACA,SACA,QACA,SACA,aACA,UACA,UACF;CAGE,IAAA,OAAA,OAwCK;CA/BH,IAAA,QAAA,KAAA;CACA,IAAA,QAAA,MAAA;;;CAVF,IAAA,QAAA,MAAA;;CAOEC,OAAA,MAAA,CAAA;EANA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GACL,2EACA,EAAE,+BAA+B,MAAM,OAAO,GAC9C,MAAM,KACR;EAAC;CACO,GAAJ,IAAA,GAAA,IAAA;CAEJC,OAAA,aAAgE;EAAC,OAAA,MAAM;CAAK,CAAM;CAClFA,OAAA,OACEpB,gBAAAA,SAAAA;EAASC,IAAG;EAAOC,MAAK;EAAO,SAAA;EAA/B,IAAA,WAAA;GACG,OAAA,MAAM;EACA;CAHXC,CAAAA,GAAAA,KAWK;CAXLiB,OAAA,OAIEhB,gBAAAA,MAAAA;EAAM,IAAA,OAAA;GAAM,OAAA,MAAM;EAAI;EAAtBA,WACI,aACAC,gBAAAA,MAAAA;GAAMC,SAAQ;GAAUC,MAAK;GAA7B,IAAA,WAAA;IACG,OAAA,SAAS;GACN;;CAEJ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;CAClF,GAAJ,IAAA,GAAA,KAAA;CAJR,OACEN;AAMJ;AAEA,SAAgB,aAAa,OAA6B;CACxD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAE9B,IAAA,SAAA,QAIC;CADCM,OAAA,QAAA,CAAA;EAFA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAAG,2CAA2C,MAAM,KAAK;EAAC;CACzD,GAAJ,IAAA,GAAA,KAAA;CAJR,OACEL;AAMJ;AAEA,SAAgB,cAAc,OAA6B;CACzD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAE9B,IAAA,SAAA,QAIC;CADCK,OAAA,QAAA,CAAA;EAFA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAAG,mCAAmC,MAAM,KAAK;EAAC;CACjD,GAAJ,IAAA,GAAA,KAAA;CAJR,OACEJ;AAMJ;;AAGA,SAAgB,YAAY,OAAiD;CAC3E,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,QAAQ,UAAU;CAGlD,IAAA,SAAA,QAOK;CAFH,IAAA,SAAA,OAAA;CACA,IAAA,SAAA,OAAA;CAHAI,OAAA,QAAA,CAAA;EAFA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAAG,qDAAqD,MAAM,KAAK;EAAC;CACnE,GAAJ,IAAA,GAAA,IAAA;CAEJC,OAAA,cAA6C;EAAC,OAAA,MAAM;CAAI,CAAO;CAC/DA,OAAA,cAAoD;EAAC,OAAA,MAAM;CAAQ,CAAO;CAP9E,OACEJ;AASJ"}
@@ -1,13 +1,13 @@
1
+ import { createComponent, insert, memo, mergeProps, template } from "@solidjs/web";
2
+ import { Bot as Bot$1 } from "@lucide/solid";
3
+ import { Show, children, omit } from "solid-js";
1
4
  import { ScrollArea } from "../../ui/scroll-area/scroll-area.js";
2
5
  import { Trace, TraceDetail, TraceError, TraceLine, formatDuration } from "../../ui/trace/trace.js";
3
6
  import { fastIcon } from "../../../lib/fast-icon.js";
4
- import { createComponent, insert, memo, mergeProps, template } from "@solidjs/web";
5
- import { Bot } from "@lucide/solid";
6
- import { Show, children, omit } from "solid-js";
7
7
  // src/components/composites/subagent/subagent.tsx
8
8
  var _tmpl$ = /* @__PURE__ */ template(`<span class="inline-block max-w-72 truncate align-bottom">`);
9
9
  var _tmpl$2 = /* @__PURE__ */ template(`<div class="flex min-w-0 flex-col gap-1"><p class="m-0 font-medium text-foreground">Result`);
10
- var Bot$1 = fastIcon(Bot);
10
+ var Bot = fastIcon(Bot$1);
11
11
  /** `3 steps`, `1 step`. */
12
12
  function stepCountLabel(count) {
13
13
  return `${count} ${count === 1 ? "step" : "steps"}`;
@@ -93,7 +93,7 @@ function Subagent(props) {
93
93
  });
94
94
  return createComponent(TraceLine, mergeProps({
95
95
  get icon() {
96
- return local.icon ?? createComponent(Bot$1, {});
96
+ return local.icon ?? createComponent(Bot, {});
97
97
  },
98
98
  get title() {
99
99
  return local.name;
@@ -1 +1 @@
1
- {"version":3,"file":"subagent.js","names":["<Show when={summary()}>\n <span class=\"inline-block max-w-72 truncate align-bottom\">{summary()}</span>\n </Show>","{hostMeta()}","<TraceDetail class=\"flex flex-col gap-2\">\n <Show when={steps.toArray().length > 0}>\n <Trace size=\"sm\" aria-label={`${local.name} steps`}>\n {steps()}\n </Trace>\n </Show>\n <Show when={hasError()}>\n <TraceError text={local.errorText ?? ''} />\n </Show>\n <Show when={hasResult()}>\n <div class=\"flex min-w-0 flex-col gap-1\">\n <p class=\"m-0 font-medium text-foreground\">Result</p>\n <ScrollArea role=\"region\" aria-label={`${local.name} result`} class=\"max-h-72\">\n {result()}\n </ScrollArea>\n </div>\n </Show>\n </TraceDetail>","class=\"flex flex-col gap-2\"","<Show when={steps.toArray().length > 0}>\n <Trace size=\"sm\" aria-label={`${local.name} steps`}>\n {steps()}\n </Trace>\n </Show>","<Trace size=\"sm\" aria-label={`${local.name} steps`}>\n {steps()}\n </Trace>","size=\"sm\"","<Show when={hasError()}>\n <TraceError text={local.errorText ?? ''} />\n </Show>","<TraceError text={local.errorText ?? ''} />","<Show when={hasResult()}>\n <div class=\"flex min-w-0 flex-col gap-1\">\n <p class=\"m-0 font-medium text-foreground\">Result</p>\n <ScrollArea role=\"region\" aria-label={`${local.name} result`} class=\"max-h-72\">\n {result()}\n </ScrollArea>\n </div>\n </Show>","<ScrollArea role=\"region\" aria-label={`${local.name} result`} class=\"max-h-72\">\n {result()}\n </ScrollArea>","role=\"region\"","class=\"max-h-72\"","<div class=\"flex min-w-0 flex-col gap-1\">\n <p class=\"m-0 font-medium text-foreground\">Result</p>\n <ScrollArea role=\"region\" aria-label={`${local.name} result`} class=\"max-h-72\">\n {result()}\n </ScrollArea>\n </div>","<TraceLine\n icon={local.icon ?? <Bot />}\n title={local.name}\n description={local.task}\n status={local.status}\n meta={meta()}\n {...rest}\n >\n {hasDetail() ? detail : undefined}\n </TraceLine>","<Bot />","Bot","LucideBot","resolveChildren"],"sources":["../../../../src/components/composites/subagent/subagent.tsx"],"sourcesContent":["import { Bot as LucideBot } from '@lucide/solid'\nimport { children as resolveChildren, Show, omit } from 'solid-js'\nimport { type JSX } from '@solidjs/web'\nimport { ScrollArea } from '../../ui/scroll-area'\nimport {\n formatDuration,\n Trace,\n TraceDetail,\n TraceError,\n TraceLine,\n type TraceLineProps,\n type TraceStatus,\n} from '../../ui/trace'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Bot = fastIcon(LucideBot)\n\n/**\n * Subagent.\n *\n * Another agent the main one handed work to, as a `TraceLine`: its name, the task\n * it was given, its status, and — folded away — everything it did. The body is a\n * nested `Trace`, so a subagent's tool calls, reasoning and own subagents are the\n * same lines as the parent's, one level in; nothing about \"a run inside a run\"\n * needs a new visual. Reach for `Tool` when the call has an input and an output\n * and no steps of its own, and for `Task` when the items are a statement of work\n * rather than a record of what ran.\n *\n * ## The collapsed line is the summary\n *\n * Folded, the line carries what a reader scanning the turn needs: the name, the\n * task, the status, and — in the trailing text — the model, the number of steps\n * and how long it took. Each of those appears only when known: `model` and\n * `duration` are the host's, and the step count is the number of lines passed as\n * `children` unless the host knows better (`stepCount`, for a run whose earlier\n * steps are not loaded). No count is shown for a run with no steps.\n *\n * ## Result and failure\n *\n * `result` is a slot for the answer the subagent returned — usually prose or a\n * `CodeBlock` — below its steps, labelled \"Result\". `errorText` is a failure as\n * text. Neither is invented: a subagent that finished without a result shows\n * none, and one with no steps, result or error yet is a plain line (there is\n * nothing to open; the line becomes a disclosure when its first step arrives).\n *\n * A `Subagent` is a line: place it inside a `Trace`, and its `children` are\n * `TraceLine`s.\n */\nexport type SubagentProps = Omit<\n TraceLineProps,\n 'title' | 'description' | 'href' | 'onSelect' | 'selectHaspopup' | 'meta' | 'children'\n> & {\n /** The run's steps, as `TraceLine`s. */\n children?: JSX.Element\n /** The subagent's name. Rendered as text. */\n name: string\n /** The task it was given, on the line. */\n task?: JSX.Element\n status?: TraceStatus\n /** A model label, e.g. `sonnet-5`. Rendered as text. */\n model?: string\n /** Seconds the run took, if the host measured it. */\n duration?: number\n /** Overrides the count taken from `children`. */\n stepCount?: number\n /** What the subagent returned. */\n result?: JSX.Element\n errorText?: string\n /** Trailing text appended after the derived summary. */\n meta?: JSX.Element\n}\n\n/** `3 steps`, `1 step`. */\nexport function stepCountLabel(count: number): string {\n return `${count} ${count === 1 ? 'step' : 'steps'}`\n}\n\nexport function Subagent(props: SubagentProps) {\n const local = props\n const rest = omit(\n props,\n 'name',\n 'task',\n 'status',\n 'model',\n 'duration',\n 'stepCount',\n 'result',\n 'errorText',\n 'icon',\n 'meta',\n 'children'\n )\n // Resolved once: the steps are created once and keep their own state (an open\n // tool call, a scrolled output) while the run is folded and unfolded.\n const steps = resolveChildren(() => local.children)\n const count = () => local.stepCount ?? steps.toArray().length\n const hasError = () => local.errorText !== undefined && local.errorText !== ''\n const result = resolveChildren(() => local.result)\n const hasResult = () => result() != null\n const hasDetail = () => steps.toArray().length > 0 || hasResult() || hasError()\n\n const summary = () => {\n const parts = [\n local.model,\n count() > 0 ? stepCountLabel(count()) : undefined,\n formatDuration(local.duration),\n ].filter((part): part is string => part !== undefined && part !== '')\n return parts.length > 0 ? parts.join(' · ') : undefined\n }\n\n // A model label is host text and may be long; it must not widen the line.\n const hostMeta = resolveChildren(() => local.meta)\n const meta = () =>\n summary() || hostMeta() ? (\n <>\n <Show when={summary()}>\n <span class=\"inline-block max-w-72 truncate align-bottom\">{summary()}</span>\n </Show>\n {hostMeta()}\n </>\n ) : undefined\n\n const detail = () => (\n <TraceDetail class=\"flex flex-col gap-2\">\n <Show when={steps.toArray().length > 0}>\n <Trace size=\"sm\" aria-label={`${local.name} steps`}>\n {steps()}\n </Trace>\n </Show>\n <Show when={hasError()}>\n <TraceError text={local.errorText ?? ''} />\n </Show>\n <Show when={hasResult()}>\n <div class=\"flex min-w-0 flex-col gap-1\">\n <p class=\"m-0 font-medium text-foreground\">Result</p>\n <ScrollArea role=\"region\" aria-label={`${local.name} result`} class=\"max-h-72\">\n {result()}\n </ScrollArea>\n </div>\n </Show>\n </TraceDetail>\n )\n\n return (\n <TraceLine\n icon={local.icon ?? <Bot />}\n title={local.name}\n description={local.task}\n status={local.status}\n meta={meta()}\n {...rest}\n >\n {hasDetail() ? detail : undefined}\n </TraceLine>\n )\n}\n"],"mappings":";;;;;;;;;AAgBA,IAAMgB,QAAM,SAASC,GAAS;;AA0D9B,SAAgB,eAAe,OAAuB;CACpD,OAAO,GAAG,MAAM,GAAG,UAAU,IAAI,SAAS;AAC5C;AAEA,SAAgB,SAAS,OAAsB;CAC7C,MAAM,QAAQ;CACd,MAAM,OAAO,KACX,OACA,QACA,QACA,UACA,SACA,YACA,aACA,UACA,aACA,QACA,QACA,UACF;CAGA,MAAM,QAAQC,eAAsB,MAAM,QAAQ;CAClD,MAAM,cAAc,MAAM,aAAa,MAAM,QAAQ,CAAC,CAAC;CACvD,MAAM,iBAAiB,MAAM,cAAc,KAAA,KAAa,MAAM,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;IACNC,gBAAAA,MAAAA;KAAM,IAAA,OAAA;MAAM,OAAA,UAAU;KAAC;KAAvB,IAAA,WAAA;MACE,IAAA,QAAA,QAKK;MALL,OAAA,OAEEC,gBAAAA,YAAAA;OAAYC,MAAK;OAAS,IAAA,eAAA;QAAY,OAAA,GAAG,MAAM,KAAK;OAAQ;OAAEC,OAAM;OAApE,IAAA,WAAA;QACG,OAAA,OAAO;OACE;MAJd,CAAA,GAAA,IAKK;MANP,OACEC;KAMI;;GAfP;EAgBY;;CAGf,OACEC,gBAAAA,WAAAA,WAAAA;EACE,IAAA,OAAA;GAAM,OAAA,MAAM,QAAQC,gBAAAA,OAAAA,CAAM,CAAA;EAAC;EAC3B,IAAA,QAAA;GAAO,OAAA,MAAM;EAAI;EACjB,IAAA,cAAA;GAAa,OAAA,MAAM;EAAI;EACvB,IAAA,SAAA;GAAQ,OAAA,MAAM;EAAM;EACpB,IAAA,OAAA;GAAM,OAAA,KAAK;EAAC;CAIH,GAHL,MANN,EAAA,IAAA,WAAA;EAQG,OAAA,UAAU,IAAI,SAAS,KAAA;CACf,EAAA,CAAA,CAAA;AAEf"}
1
+ {"version":3,"file":"subagent.js","names":["<Show when={summary()}>\n <span class=\"inline-block max-w-72 truncate align-bottom\">{summary()}</span>\n </Show>","{hostMeta()}","<TraceDetail class=\"flex flex-col gap-2\">\n <Show when={steps.toArray().length > 0}>\n <Trace size=\"sm\" aria-label={`${local.name} steps`}>\n {steps()}\n </Trace>\n </Show>\n <Show when={hasError()}>\n <TraceError text={local.errorText ?? ''} />\n </Show>\n <Show when={hasResult()}>\n <div class=\"flex min-w-0 flex-col gap-1\">\n <p class=\"m-0 font-medium text-foreground\">Result</p>\n <ScrollArea role=\"region\" aria-label={`${local.name} result`} class=\"max-h-72\">\n {result()}\n </ScrollArea>\n </div>\n </Show>\n </TraceDetail>","class=\"flex flex-col gap-2\"","<Show when={steps.toArray().length > 0}>\n <Trace size=\"sm\" aria-label={`${local.name} steps`}>\n {steps()}\n </Trace>\n </Show>","<Trace size=\"sm\" aria-label={`${local.name} steps`}>\n {steps()}\n </Trace>","size=\"sm\"","<Show when={hasError()}>\n <TraceError text={local.errorText ?? ''} />\n </Show>","<TraceError text={local.errorText ?? ''} />","<Show when={hasResult()}>\n <div class=\"flex min-w-0 flex-col gap-1\">\n <p class=\"m-0 font-medium text-foreground\">Result</p>\n <ScrollArea role=\"region\" aria-label={`${local.name} result`} class=\"max-h-72\">\n {result()}\n </ScrollArea>\n </div>\n </Show>","<ScrollArea role=\"region\" aria-label={`${local.name} result`} class=\"max-h-72\">\n {result()}\n </ScrollArea>","role=\"region\"","class=\"max-h-72\"","<div class=\"flex min-w-0 flex-col gap-1\">\n <p class=\"m-0 font-medium text-foreground\">Result</p>\n <ScrollArea role=\"region\" aria-label={`${local.name} result`} class=\"max-h-72\">\n {result()}\n </ScrollArea>\n </div>","<TraceLine\n icon={local.icon ?? <Bot />}\n title={local.name}\n description={local.task}\n status={local.status}\n meta={meta()}\n {...rest}\n >\n {hasDetail() ? detail : undefined}\n </TraceLine>","<Bot />","LucideBot","resolveChildren","_$insert"],"sources":["../../../../src/components/composites/subagent/subagent.tsx"],"sourcesContent":["import { Bot as LucideBot } from '@lucide/solid'\nimport { children as resolveChildren, Show, omit } from 'solid-js'\nimport { type JSX } from '@solidjs/web'\nimport { ScrollArea } from '../../ui/scroll-area'\nimport {\n formatDuration,\n Trace,\n TraceDetail,\n TraceError,\n TraceLine,\n type TraceLineProps,\n type TraceStatus,\n} from '../../ui/trace'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Bot = fastIcon(LucideBot)\n\n/**\n * Subagent.\n *\n * Another agent the main one handed work to, as a `TraceLine`: its name, the task\n * it was given, its status, and — folded away — everything it did. The body is a\n * nested `Trace`, so a subagent's tool calls, reasoning and own subagents are the\n * same lines as the parent's, one level in; nothing about \"a run inside a run\"\n * needs a new visual. Reach for `Tool` when the call has an input and an output\n * and no steps of its own, and for `Task` when the items are a statement of work\n * rather than a record of what ran.\n *\n * ## The collapsed line is the summary\n *\n * Folded, the line carries what a reader scanning the turn needs: the name, the\n * task, the status, and — in the trailing text — the model, the number of steps\n * and how long it took. Each of those appears only when known: `model` and\n * `duration` are the host's, and the step count is the number of lines passed as\n * `children` unless the host knows better (`stepCount`, for a run whose earlier\n * steps are not loaded). No count is shown for a run with no steps.\n *\n * ## Result and failure\n *\n * `result` is a slot for the answer the subagent returned — usually prose or a\n * `CodeBlock` — below its steps, labelled \"Result\". `errorText` is a failure as\n * text. Neither is invented: a subagent that finished without a result shows\n * none, and one with no steps, result or error yet is a plain line (there is\n * nothing to open; the line becomes a disclosure when its first step arrives).\n *\n * A `Subagent` is a line: place it inside a `Trace`, and its `children` are\n * `TraceLine`s.\n */\nexport type SubagentProps = Omit<\n TraceLineProps,\n 'title' | 'description' | 'href' | 'onSelect' | 'selectHaspopup' | 'meta' | 'children'\n> & {\n /** The run's steps, as `TraceLine`s. */\n children?: JSX.Element\n /** The subagent's name. Rendered as text. */\n name: string\n /** The task it was given, on the line. */\n task?: JSX.Element\n status?: TraceStatus\n /** A model label, e.g. `sonnet-5`. Rendered as text. */\n model?: string\n /** Seconds the run took, if the host measured it. */\n duration?: number\n /** Overrides the count taken from `children`. */\n stepCount?: number\n /** What the subagent returned. */\n result?: JSX.Element\n errorText?: string\n /** Trailing text appended after the derived summary. */\n meta?: JSX.Element\n}\n\n/** `3 steps`, `1 step`. */\nexport function stepCountLabel(count: number): string {\n return `${count} ${count === 1 ? 'step' : 'steps'}`\n}\n\nexport function Subagent(props: SubagentProps) {\n const local = props\n const rest = omit(\n props,\n 'name',\n 'task',\n 'status',\n 'model',\n 'duration',\n 'stepCount',\n 'result',\n 'errorText',\n 'icon',\n 'meta',\n 'children'\n )\n // Resolved once: the steps are created once and keep their own state (an open\n // tool call, a scrolled output) while the run is folded and unfolded.\n const steps = resolveChildren(() => local.children)\n const count = () => local.stepCount ?? steps.toArray().length\n const hasError = () => local.errorText !== undefined && local.errorText !== ''\n const result = resolveChildren(() => local.result)\n const hasResult = () => result() != null\n const hasDetail = () => steps.toArray().length > 0 || hasResult() || hasError()\n\n const summary = () => {\n const parts = [\n local.model,\n count() > 0 ? stepCountLabel(count()) : undefined,\n formatDuration(local.duration),\n ].filter((part): part is string => part !== undefined && part !== '')\n return parts.length > 0 ? parts.join(' · ') : undefined\n }\n\n // A model label is host text and may be long; it must not widen the line.\n const hostMeta = resolveChildren(() => local.meta)\n const meta = () =>\n summary() || hostMeta() ? (\n <>\n <Show when={summary()}>\n <span class=\"inline-block max-w-72 truncate align-bottom\">{summary()}</span>\n </Show>\n {hostMeta()}\n </>\n ) : undefined\n\n const detail = () => (\n <TraceDetail class=\"flex flex-col gap-2\">\n <Show when={steps.toArray().length > 0}>\n <Trace size=\"sm\" aria-label={`${local.name} steps`}>\n {steps()}\n </Trace>\n </Show>\n <Show when={hasError()}>\n <TraceError text={local.errorText ?? ''} />\n </Show>\n <Show when={hasResult()}>\n <div class=\"flex min-w-0 flex-col gap-1\">\n <p class=\"m-0 font-medium text-foreground\">Result</p>\n <ScrollArea role=\"region\" aria-label={`${local.name} result`} class=\"max-h-72\">\n {result()}\n </ScrollArea>\n </div>\n </Show>\n </TraceDetail>\n )\n\n return (\n <TraceLine\n icon={local.icon ?? <Bot />}\n title={local.name}\n description={local.task}\n status={local.status}\n meta={meta()}\n {...rest}\n >\n {hasDetail() ? detail : undefined}\n </TraceLine>\n )\n}\n"],"mappings":";;;;;;;;;AAgBA,IAAM,MAAM,SAASgB,KAAS;;AA0D9B,SAAgB,eAAe,OAAuB;CACpD,OAAO,GAAG,MAAM,GAAG,UAAU,IAAI,SAAS;AAC5C;AAEA,SAAgB,SAAS,OAAsB;CAC7C,MAAM,QAAQ;CACd,MAAM,OAAO,KACX,OACA,QACA,QACA,UACA,SACA,YACA,aACA,UACA,aACA,QACA,QACA,UACF;CAGA,MAAM,QAAQC,eAAsB,MAAM,QAAQ;CAClD,MAAM,cAAc,MA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OAAAA,gBAAAA,YAAAA,EAAY,IAAA,OAAA;OAAM,OAAA,MAAM,aAAa;MAAE,EAAG,CAAA;KACtC;;IACNC,gBAAAA,MAAAA;KAAM,IAAA,OAAA;MAAM,OAAA,UAAU;KAAC;KAAvB,IAAA,WAAA;MACE,IAAA,QAAA,QAKK;MALLS,OAAA,OAEER,gBAAAA,YAAAA;OAAYC,MAAK;OAAS,IAAA,eAAA;QAAY,OAAA,GAAG,MAAM,KAAK;OAAQ;OAAEC,OAAM;OAApE,IAAA,WAAA;QACG,OAAA,OAAO;OACE;MAJd,CAAA,GAAA,IAKK;MANP,OACEC;KAMI;;GAfP;EAgBY;;CAGf,OACEC,gBAAAA,WAAAA,WAAAA;EACE,IAAA,OAAA;GAAM,OAAA,MAAM,QAAQC,gBAAAA,KAAAA,CAAM,CAAA;EAAC;EAC3B,IAAA,QAAA;GAAO,OAAA,MAAM;EAAI;EACjB,IAAA,cAAA;GAAa,OAAA,MAAM;EAAI;EACvB,IAAA,SAAA;GAAQ,OAAA,MAAM;EAAM;EACpB,IAAA,OAAA;GAAM,OAAA,KAAK;EAAC;CAIH,GAHL,MANN,EAAA,IAAA,WAAA;EAQG,OAAA,UAAU,IAAI,SAAS,KAAA;CACf,EAAA,CAAA,CAAA;AAEf"}
@@ -1,9 +1,9 @@
1
+ import { createComponent, insert, memo, mergeProps, setAttribute, spread, template } from "@solidjs/web";
2
+ import { createContext, createUniqueId, omit, useContext } from "solid-js";
1
3
  import { callHandler } from "../../../lib/events.js";
2
4
  import { cn } from "../../../lib/utils.js";
3
5
  import { Button } from "../../ui/button/button.js";
4
6
  import { boundText } from "../../../lib/text.js";
5
- import { createComponent, insert, memo, mergeProps, setAttribute, spread, template } from "@solidjs/web";
6
- import { createContext, createUniqueId, omit, useContext } from "solid-js";
7
7
  // src/components/composites/suggestion/suggestion.tsx
8
8
  var _tmpl$ = /* @__PURE__ */ template(`<div data-slot=suggestions class="flex min-w-0 flex-col gap-1.5"><div>`);
9
9
  var _tmpl$2 = /* @__PURE__ */ template(`<p role=status class="m-0 text-xs text-muted-foreground">`);
@@ -1 +1 @@
1
- {"version":3,"file":"suggestion.js","names":["<SuggestionsContext\n value={{\n select: (text) => local.onSelect?.(text),\n blocked: () => reason() !== undefined,\n reasonId: () => (reason() ? reasonId : undefined),\n }}\n >\n <div data-slot=\"suggestions\" class=\"flex min-w-0 flex-col gap-1.5\">\n <div\n role=\"group\"\n aria-label={local.label ?? 'Suggested prompts'}\n class={cn(\n 'flex min-w-0 gap-2',\n {\n 'flex-wrap': local.layout !== 'scroll',\n // Padding below keeps the focus ring of a chip from being clipped by the scroller.\n 'flex-nowrap overflow-x-auto p-1 [&>*]:shrink-0': local.layout === 'scroll',\n },\n local.class\n )}\n {...rest}\n >\n {local.children}\n </div>\n <Show when={reason()}>\n <p id={reasonId} role=\"status\" class=\"m-0 text-xs text-muted-foreground\">\n {reason()}\n </p>\n </Show>\n </div>\n </SuggestionsContext>","value={{\n select: (text) => local.onSelect?.(text),\n blocked: () => reason() !== undefined,\n reasonId: () => (reason() ? reasonId : undefined),\n }}","role=\"group\"","<div data-slot=\"suggestions\" class=\"flex min-w-0 flex-col gap-1.5\">\n <div\n role=\"group\"\n aria-label={local.label ?? 'Suggested prompts'}\n class={cn(\n 'flex min-w-0 gap-2',\n {\n 'flex-wrap': local.layout !== 'scroll',\n // Padding below keeps the focus ring of a chip from being clipped by the scroller.\n 'flex-nowrap overflow-x-auto p-1 [&>*]:shrink-0': local.layout === 'scroll',\n },\n local.class\n )}\n {...rest}\n >\n {local.children}\n </div>\n <Show when={reason()}>\n <p id={reasonId} role=\"status\" class=\"m-0 text-xs text-muted-foreground\">\n {reason()}\n </p>\n </Show>\n </div>","<Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n data-slot=\"suggestion\"\n title={text().length > 40 ? text() : undefined}\n aria-disabled={blocked() ? 'true' : undefined}\n aria-describedby={context?.reasonId()}\n class={cn('max-w-full', local.class)}\n onClick={(event) => {\n if (blocked()) {\n event.preventDefault()\n return\n }\n callHandler(local.onClick, event)\n // The host's own string, untouched: only the label is clipped, never what is sent.\n context?.select(local.text)\n }}\n {...rest}\n >\n <span class=\"truncate\">{text()}</span>\n </Button>","type=\"button\"","variant=\"outline\"","size=\"sm\"","text().length > 40 ? text() : undefined","onClick={(event) => {\n if (blocked()) {\n event.preventDefault()\n return\n }\n callHandler(local.onClick, event)\n // The host's own string, untouched: only the label is clipped, never what is sent.\n context?.select(local.text)\n }}","<span class=\"truncate\">{text()}</span>"],"sources":["../../../../src/components/composites/suggestion/suggestion.tsx"],"sourcesContent":["import { createContext, createUniqueId, Show, omit, useContext } from 'solid-js'\nimport { type ComponentProps } from '@solidjs/web'\nimport { callHandler } from '#lib/events'\nimport { cn } from '#lib/utils'\nimport { Button } from '../../ui/button'\nimport { REASON_TEXT_LIMIT, boundText } from '#lib/text'\n\n/**\n * Suggestions.\n *\n * A row of one-click prompts: each chip is the text that will be sent, so choosing\n * one is a single decision and never \"fill the composer, then still have to press\n * send\". What a chip *does* with its text — send it, drop it in the composer —\n * is the host's `onSelect`; this component only reports which one was chosen.\n *\n * - **Layout.** `wrap` (default) lets chips flow onto further lines, which is the\n * right behaviour at a narrow width. `scroll` keeps a single line that scrolls\n * sideways, for a bar above a composer that must not grow; the chips are real\n * buttons, so keyboard focus scrolls them into view and nothing depends on a\n * pointer to reach the overflow.\n * - **Long text is clipped, not hidden.** A chip is one line and truncates; the\n * full text is the button's accessible name and its `title`.\n * - **The host owns authority.** No `onSelect`, or a `disabledReason`, disables\n * every chip and says why in words under the row. Chips use `aria-disabled`\n * rather than `disabled`, so a keyboard or screen-reader user can still reach\n * them and hear the reason instead of finding a row that is silently skipped.\n */\nexport type SuggestionsProps = Omit<ComponentProps<'div'>, 'onSelect'> & {\n /** The row's accessible name. */\n label?: string\n layout?: 'wrap' | 'scroll'\n /** Called with the chosen chip's text. Without it every chip is disabled. */\n onSelect?: (text: string) => void\n /** Why the chips cannot be used right now. Implies disabled. */\n disabledReason?: string\n}\n\ntype SuggestionsContext = {\n select: (text: string) => void\n blocked: () => boolean\n reasonId: () => string | undefined\n}\n\n// `null` outside a `Suggestions` row; a default-less context would throw there.\nconst SuggestionsContext = createContext<SuggestionsContext | null>(null)\n\nexport function Suggestions(props: SuggestionsProps) {\n const local = props\n const rest = omit(props, 'class', 'label', 'layout', 'onSelect', 'disabledReason', 'children')\n const uid = createUniqueId()\n const reasonId = `${uid}-reason`\n const reason = () =>\n local.disabledReason\n ? boundText(local.disabledReason, REASON_TEXT_LIMIT)\n : local.onSelect === undefined\n ? 'Suggestions are not available here.'\n : undefined\n\n return (\n <SuggestionsContext\n value={{\n select: (text) => local.onSelect?.(text),\n blocked: () => reason() !== undefined,\n reasonId: () => (reason() ? reasonId : undefined),\n }}\n >\n <div data-slot=\"suggestions\" class=\"flex min-w-0 flex-col gap-1.5\">\n <div\n role=\"group\"\n aria-label={local.label ?? 'Suggested prompts'}\n class={cn(\n 'flex min-w-0 gap-2',\n {\n 'flex-wrap': local.layout !== 'scroll',\n // Padding below keeps the focus ring of a chip from being clipped by the scroller.\n 'flex-nowrap overflow-x-auto p-1 [&>*]:shrink-0': local.layout === 'scroll',\n },\n local.class\n )}\n {...rest}\n >\n {local.children}\n </div>\n <Show when={reason()}>\n <p id={reasonId} role=\"status\" class=\"m-0 text-xs text-muted-foreground\">\n {reason()}\n </p>\n </Show>\n </div>\n </SuggestionsContext>\n )\n}\n\nexport type SuggestionProps = Omit<ComponentProps<'button'>, 'onSelect' | 'children'> & {\n /** The text that is sent when the chip is chosen. Also the chip's name. */\n text: string\n}\n\nexport function Suggestion(props: SuggestionProps) {\n const local = props\n const rest = omit(props, 'class', 'text', 'onClick')\n const context = useContext(SuggestionsContext)\n // A chip outside a `Suggestions` row has no handler to call: inert and honest.\n const blocked = () => context === null || context.blocked()\n const text = () => boundText(local.text, 400)\n\n return (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n data-slot=\"suggestion\"\n title={text().length > 40 ? text() : undefined}\n aria-disabled={blocked() ? 'true' : undefined}\n aria-describedby={context?.reasonId()}\n class={cn('max-w-full', local.class)}\n onClick={(event) => {\n if (blocked()) {\n event.preventDefault()\n return\n }\n callHandler(local.onClick, event)\n // The host's own string, untouched: only the label is clipped, never what is sent.\n context?.select(local.text)\n }}\n {...rest}\n >\n <span class=\"truncate\">{text()}</span>\n </Button>\n )\n}\n"],"mappings":";;;;;;;;;;AA4CA,IAAM,qBAAqB,cAAyC,IAAI;AAExE,SAAgB,YAAY,OAAyB;CACnD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,SAAS,UAAU,YAAY,kBAAkB,UAAU;CAE7F,MAAM,WAAW,GADL,eACQ,EAAI;CACxB,MAAM,eACJ,MAAM,iBACF,UAAU,MAAM,gBAAA,GAAiC,IACjD,MAAM,aAAa,KAAA,IACjB,wCACA,KAAA;CAER,OACEA,gBAAAA,oBAAAA;EACEC,OAAO;GACL,SAAS,SAAS,MAAM,WAAW,IAAI;GACvC,eAAe,OAAO,MAAM,KAAA;GAC5B,gBAAiB,OAAO,IAAI,WAAW,KAAA;EACzC;EALF,IAAA,WAAA;GAOE,IAAA,OAAA,OAsBK;GArBH,IAAA,QAAA,KAAA;GAYE,OAAA,OAAA,CAAA;IAXAC,MAAAA;IACA,IAAA,eAAA;KAAY,OAAA,MAAM,SAAS;IAAmB;IAC9C,IAAA,UAAA;KAAO,OAAA,GACL,sBACA;MACE,aAAa,MAAM,WAAW;MAE9B,kDAAkD,MAAM,WAAW;KACrE,GACA,MAAM,KACR;IAAC;GACO,GAAJ,IAAA,GAAA,IAAA;GAZN,OAAA,aAcE;IAAC,OAAA,MAAM;GAAQ,CACZ;GAhBP,OAAA,aAiBE;;KAAY,OAAA,CAAA,CAAA,OAAO;IAIb,CAAA;IAJN,aAAA;KAIM,OAAA,IAAA,WAHJ;MAEG,IAAA,QAAA,QAAA;MAFA,aAAA,OAAA,MAAI,QAAQ;MAAf,OAAA,OACG,MACA;MAFH,OAAA;KAEG,EAAA,CAAA,IAHL,KAAA;IAIM;GAAC,EAAA,CAAD,GArBR,IAsBK;GA7BP,OAOEC;EAuBkB;;AAExB;AAOA,SAAgB,WAAW,OAAwB;CACjD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,QAAQ,SAAS;CACnD,MAAM,UAAU,WAAW,kBAAkB;CAE7C,MAAM,gBAAgB,YAAY,QAAQ,QAAQ,QAAQ;CAC1D,MAAM,aAAa,UAAU,MAAM,MAAM,GAAG;CAE5C,OACEC,gBAAAA,QAAAA,WAAAA;EACEC,MAAK;EACLC,SAAQ;EACRC,MAAK;EACL,aAAU;EACV,IAAA,QAAA;GAAOC,OAAAA,WAAAA;IAAK,OAAA,KAAA,CAAC,CAAC,SAAS;GAAsB,CAAA,CAAC,CAAD,IAAjB,KAAK,IAAI,KAAA;EAAS;EAC9C,IAAA,kBAAA;GAAe,OAAA,QAAQ,IAAI,SAAS,KAAA;EAAS;EAC7C,IAAA,qBAAA;GAAkB,OAAA,SAAS,SAAS;EAAC;EACrC,IAAA,UAAA;GAAO,OAAA,GAAG,cAAc,MAAM,KAAK;EAAC;EACpCC,UAAU,UAAU;GAClB,IAAI,QAAQ,GAAG;IACb,MAAM,eAAe;IACrB;GACF;GACA,YAAY,MAAM,SAAS,KAAK;GAEhC,SAAS,OAAO,MAAM,IAAI;EAC5B;CAIM,GAHF,MAlBN,EAAA,IAAA,WAAA;EAoBE,IAAA,QAAA,QAAqC;EAArC,OAAA,OAAwB,IAAa;EApBvC,OAoBEC;CACM,EAAA,CAAA,CAAA;AAEZ"}
1
+ {"version":3,"file":"suggestion.js","names":["<SuggestionsContext\n value={{\n select: (text) => local.onSelect?.(text),\n blocked: () => reason() !== undefined,\n reasonId: () => (reason() ? reasonId : undefined),\n }}\n >\n <div data-slot=\"suggestions\" class=\"flex min-w-0 flex-col gap-1.5\">\n <div\n role=\"group\"\n aria-label={local.label ?? 'Suggested prompts'}\n class={cn(\n 'flex min-w-0 gap-2',\n {\n 'flex-wrap': local.layout !== 'scroll',\n // Padding below keeps the focus ring of a chip from being clipped by the scroller.\n 'flex-nowrap overflow-x-auto p-1 [&>*]:shrink-0': local.layout === 'scroll',\n },\n local.class\n )}\n {...rest}\n >\n {local.children}\n </div>\n <Show when={reason()}>\n <p id={reasonId} role=\"status\" class=\"m-0 text-xs text-muted-foreground\">\n {reason()}\n </p>\n </Show>\n </div>\n </SuggestionsContext>","value={{\n select: (text) => local.onSelect?.(text),\n blocked: () => reason() !== undefined,\n reasonId: () => (reason() ? reasonId : undefined),\n }}","role=\"group\"","<div data-slot=\"suggestions\" class=\"flex min-w-0 flex-col gap-1.5\">\n <div\n role=\"group\"\n aria-label={local.label ?? 'Suggested prompts'}\n class={cn(\n 'flex min-w-0 gap-2',\n {\n 'flex-wrap': local.layout !== 'scroll',\n // Padding below keeps the focus ring of a chip from being clipped by the scroller.\n 'flex-nowrap overflow-x-auto p-1 [&>*]:shrink-0': local.layout === 'scroll',\n },\n local.class\n )}\n {...rest}\n >\n {local.children}\n </div>\n <Show when={reason()}>\n <p id={reasonId} role=\"status\" class=\"m-0 text-xs text-muted-foreground\">\n {reason()}\n </p>\n </Show>\n </div>","<Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n data-slot=\"suggestion\"\n title={text().length > 40 ? text() : undefined}\n aria-disabled={blocked() ? 'true' : undefined}\n aria-describedby={context?.reasonId()}\n class={cn('max-w-full', local.class)}\n onClick={(event) => {\n if (blocked()) {\n event.preventDefault()\n return\n }\n callHandler(local.onClick, event)\n // The host's own string, untouched: only the label is clipped, never what is sent.\n context?.select(local.text)\n }}\n {...rest}\n >\n <span class=\"truncate\">{text()}</span>\n </Button>","type=\"button\"","variant=\"outline\"","size=\"sm\"","text().length > 40 ? text() : undefined","onClick={(event) => {\n if (blocked()) {\n event.preventDefault()\n return\n }\n callHandler(local.onClick, event)\n // The host's own string, untouched: only the label is clipped, never what is sent.\n context?.select(local.text)\n }}","<span class=\"truncate\">{text()}</span>","_$spread","_$insert","_$setAttribute"],"sources":["../../../../src/components/composites/suggestion/suggestion.tsx"],"sourcesContent":["import { createContext, createUniqueId, Show, omit, useContext } from 'solid-js'\nimport { type ComponentProps } from '@solidjs/web'\nimport { callHandler } from '#lib/events'\nimport { cn } from '#lib/utils'\nimport { Button } from '../../ui/button'\nimport { REASON_TEXT_LIMIT, boundText } from '#lib/text'\n\n/**\n * Suggestions.\n *\n * A row of one-click prompts: each chip is the text that will be sent, so choosing\n * one is a single decision and never \"fill the composer, then still have to press\n * send\". What a chip *does* with its text — send it, drop it in the composer —\n * is the host's `onSelect`; this component only reports which one was chosen.\n *\n * - **Layout.** `wrap` (default) lets chips flow onto further lines, which is the\n * right behaviour at a narrow width. `scroll` keeps a single line that scrolls\n * sideways, for a bar above a composer that must not grow; the chips are real\n * buttons, so keyboard focus scrolls them into view and nothing depends on a\n * pointer to reach the overflow.\n * - **Long text is clipped, not hidden.** A chip is one line and truncates; the\n * full text is the button's accessible name and its `title`.\n * - **The host owns authority.** No `onSelect`, or a `disabledReason`, disables\n * every chip and says why in words under the row. Chips use `aria-disabled`\n * rather than `disabled`, so a keyboard or screen-reader user can still reach\n * them and hear the reason instead of finding a row that is silently skipped.\n */\nexport type SuggestionsProps = Omit<ComponentProps<'div'>, 'onSelect'> & {\n /** The row's accessible name. */\n label?: string\n layout?: 'wrap' | 'scroll'\n /** Called with the chosen chip's text. Without it every chip is disabled. */\n onSelect?: (text: string) => void\n /** Why the chips cannot be used right now. Implies disabled. */\n disabledReason?: string\n}\n\ntype SuggestionsContext = {\n select: (text: string) => void\n blocked: () => boolean\n reasonId: () => string | undefined\n}\n\n// `null` outside a `Suggestions` row; a default-less context would throw there.\nconst SuggestionsContext = createContext<SuggestionsContext | null>(null)\n\nexport function Suggestions(props: SuggestionsProps) {\n const local = props\n const rest = omit(props, 'class', 'label', 'layout', 'onSelect', 'disabledReason', 'children')\n const uid = createUniqueId()\n const reasonId = `${uid}-reason`\n const reason = () =>\n local.disabledReason\n ? boundText(local.disabledReason, REASON_TEXT_LIMIT)\n : local.onSelect === undefined\n ? 'Suggestions are not available here.'\n : undefined\n\n return (\n <SuggestionsContext\n value={{\n select: (text) => local.onSelect?.(text),\n blocked: () => reason() !== undefined,\n reasonId: () => (reason() ? reasonId : undefined),\n }}\n >\n <div data-slot=\"suggestions\" class=\"flex min-w-0 flex-col gap-1.5\">\n <div\n role=\"group\"\n aria-label={local.label ?? 'Suggested prompts'}\n class={cn(\n 'flex min-w-0 gap-2',\n {\n 'flex-wrap': local.layout !== 'scroll',\n // Padding below keeps the focus ring of a chip from being clipped by the scroller.\n 'flex-nowrap overflow-x-auto p-1 [&>*]:shrink-0': local.layout === 'scroll',\n },\n local.class\n )}\n {...rest}\n >\n {local.children}\n </div>\n <Show when={reason()}>\n <p id={reasonId} role=\"status\" class=\"m-0 text-xs text-muted-foreground\">\n {reason()}\n </p>\n </Show>\n </div>\n </SuggestionsContext>\n )\n}\n\nexport type SuggestionProps = Omit<ComponentProps<'button'>, 'onSelect' | 'children'> & {\n /** The text that is sent when the chip is chosen. Also the chip's name. */\n text: string\n}\n\nexport function Suggestion(props: SuggestionProps) {\n const local = props\n const rest = omit(props, 'class', 'text', 'onClick')\n const context = useContext(SuggestionsContext)\n // A chip outside a `Suggestions` row has no handler to call: inert and honest.\n const blocked = () => context === null || context.blocked()\n const text = () => boundText(local.text, 400)\n\n return (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n data-slot=\"suggestion\"\n title={text().length > 40 ? text() : undefined}\n aria-disabled={blocked() ? 'true' : undefined}\n aria-describedby={context?.reasonId()}\n class={cn('max-w-full', local.class)}\n onClick={(event) => {\n if (blocked()) {\n event.preventDefault()\n return\n }\n callHandler(local.onClick, event)\n // The host's own string, untouched: only the label is clipped, never what is sent.\n context?.select(local.text)\n }}\n {...rest}\n >\n <span class=\"truncate\">{text()}</span>\n </Button>\n )\n}\n"],"mappings":";;;;;;;;;;AA4CA,IAAM,q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QAAQ;CAC1D,MAAM,aAAa,UAAU,MAAM,MAAM,GAAG;CAE5C,OACEC,gBAAAA,QAAAA,WAAAA;EACEC,MAAK;EACLC,SAAQ;EACRC,MAAK;EACL,aAAU;EACV,IAAA,QAAA;GAAOC,OAAAA,WAAAA;IAAK,OAAA,KAAA,CAAC,CAAC,SAAS;GAAsB,CAAA,CAAC,CAAD,IAAjB,KAAK,IAAI,KAAA;EAAS;EAC9C,IAAA,kBAAA;GAAe,OAAA,QAAQ,IAAI,SAAS,KAAA;EAAS;EAC7C,IAAA,qBAAA;GAAkB,OAAA,SAAS,SAAS;EAAC;EACrC,IAAA,UAAA;GAAO,OAAA,GAAG,cAAc,MAAM,KAAK;EAAC;EACpCC,UAAU,UAAU;GAClB,IAAI,QAAQ,GAAG;IACb,MAAM,eAAe;IACrB;GACF;GACA,YAAY,MAAM,SAAS,KAAK;GAEhC,SAAS,OAAO,MAAM,IAAI;EAC5B;CAIM,GAHF,MAlBN,EAAA,IAAA,WAAA;EAoBE,IAAA,QAAA,QAAqC;EAArCG,OAAA,OAAwB,IAAa;EApBvC,OAoBEF;CACM,EAAA,CAAA,CAAA;AAEZ"}
@@ -1,12 +1,12 @@
1
+ import { className, createComponent, effect, insert, memo, mergeProps, readShallow, setAttribute, spread, template } from "@solidjs/web";
2
+ import { ListChecks as ListChecks$1 } from "@lucide/solid";
3
+ import { For, Show, createMemo, createSignal, omit } from "solid-js";
1
4
  import { cn } from "../../../lib/utils.js";
2
5
  import { Attachment, AttachmentList } from "../../ui/attachment/attachment.js";
3
6
  import { Button } from "../../ui/button/button.js";
4
7
  import { ScrollArea } from "../../ui/scroll-area/scroll-area.js";
5
8
  import { TraceLine, TraceMark, WORK_STATUS_LABELS, WORK_TRACE_STATUS } from "../../ui/trace/trace.js";
6
9
  import { fastIcon } from "../../../lib/fast-icon.js";
7
- import { className, createComponent, effect, insert, memo, mergeProps, readShallow, setAttribute, spread, template } from "@solidjs/web";
8
- import { ListChecks } from "@lucide/solid";
9
- import { For, Show, createMemo, createSignal, omit } from "solid-js";
10
10
  // src/components/composites/task/task.tsx
11
11
  var _tmpl$ = /* @__PURE__ */ template(`<li><div class="flex min-w-0 flex-1 flex-col gap-1"><p><!><!></p><!><!>`);
12
12
  var _tmpl$2 = /* @__PURE__ */ template(`<span class="size-1 rounded-full bg-muted-foreground/60">`);
@@ -15,7 +15,7 @@ var _tmpl$4 = /* @__PURE__ */ template(`<p class="m-0 line-clamp-3 text-xs [over
15
15
  var _tmpl$5 = /* @__PURE__ */ template(`<li class="flex items-center">`);
16
16
  var _tmpl$6 = /* @__PURE__ */ template(`<li class="min-w-0 max-w-full">`);
17
17
  var _tmpl$7 = /* @__PURE__ */ template(`<ul role=list class="m-0 flex list-none flex-col gap-0.5 p-0">`);
18
- var ListChecks$1 = fastIcon(ListChecks);
18
+ var ListChecks = fastIcon(ListChecks$1);
19
19
  var TASK_ITEM_STATUS_LABELS = WORK_STATUS_LABELS;
20
20
  /** Visible files per item before the rest go behind a toggle. */
21
21
  var VISIBLE_FILES = 6;
@@ -238,7 +238,7 @@ function Task(props) {
238
238
  });
239
239
  return createComponent(TraceLine, mergeProps({
240
240
  get icon() {
241
- return local.icon ?? createComponent(ListChecks$1, {});
241
+ return local.icon ?? createComponent(ListChecks, {});
242
242
  },
243
243
  get title() {
244
244
  return local.title;
@@ -1 +1 @@
1
- {"version":3,"file":"task.js","names":["<TraceMark\n slot=\"task-item-mark\"\n class=\"mt-0.5\"\n status={local.status ? WORK_TRACE_STATUS[local.status] : undefined}\n completed={local.status === 'complete'}\n icon={\n local.status ? undefined : <span class=\"size-1 rounded-full bg-muted-foreground/60\" />\n }\n />","slot=\"task-item-mark\"","class=\"mt-0.5\"","local.status ? WORK_TRACE_STATUS[local.status] : undefined","local.status ? undefined : <span class=\"size-1 rounded-full bg-muted-foreground/60\" />","<span class=\"size-1 rounded-full bg-muted-foreground/60\" />","<li\n data-slot=\"task-item\"\n data-status={local.status}\n class={cn('flex min-w-0 gap-2 rounded-md px-1.5 py-0.5', local.class)}\n {...rest}\n >\n <TraceMark\n slot=\"task-item-mark\"\n class=\"mt-0.5\"\n status={local.status ? WORK_TRACE_STATUS[local.status] : undefined}\n completed={local.status === 'complete'}\n icon={\n local.status ? undefined : <span class=\"size-1 rounded-full bg-muted-foreground/60\" />\n }\n />\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <p\n title={text()}\n class={cn(\n 'm-0 line-clamp-3 text-sm [overflow-wrap:anywhere] whitespace-pre-wrap text-foreground',\n {\n 'text-muted-foreground': local.status === 'complete' || local.status === 'skipped',\n 'text-destructive': local.status === 'failed',\n }\n )}\n >\n {text()}\n <Show when={local.status}>\n {(status) => (\n <span class=\"sr-only\"> {local.statusLabel ?? TASK_ITEM_STATUS_LABELS[status()]}</span>\n )}\n </Show>\n </p>\n <Show when={local.description}>\n {(description) => (\n <p class=\"m-0 line-clamp-3 text-xs [overflow-wrap:anywhere] text-muted-foreground/80\">\n {bound(description(), MAX_TEXT)}\n </p>\n )}\n </Show>\n <Show when={files().length > 0}>\n <AttachmentList aria-label=\"Files\" class=\"gap-1\">\n <For each={shownFiles()}>\n {(file) => (\n <li class=\"min-w-0 max-w-full\">\n <Attachment variant=\"chip\" name={file.name} kind={file.kind} size={file.size} />\n </li>\n )}\n </For>\n <Show when={hiddenFiles() > 0}>\n <li class=\"flex items-center\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"2xs\"\n aria-expanded={showAllFiles() ? 'true' : 'false'}\n onClick={() => setShowAllFiles((value) => !value)}\n >\n {showAllFiles() ? 'Show fewer files' : `Show ${hiddenFiles()} more files`}\n </Button>\n </li>\n </Show>\n </AttachmentList>\n </Show>\n </div>\n </li>","<p\n title={text()}\n class={cn(\n 'm-0 line-clamp-3 text-sm [overflow-wrap:anywhere] whitespace-pre-wrap text-foreground',\n {\n 'text-muted-foreground': local.status === 'complete' || local.status === 'skipped',\n 'text-destructive': local.status === 'failed',\n }\n )}\n >\n {text()}\n <Show when={local.status}>\n {(status) => (\n <span class=\"sr-only\"> {local.statusLabel ?? TASK_ITEM_STATUS_LABELS[status()]}</span>\n )}\n </Show>\n </p>","<Show when={local.status}>\n {(status) => (\n <span class=\"sr-only\"> {local.statusLabel ?? TASK_ITEM_STATUS_LABELS[status()]}</span>\n )}\n </Show>","<Show when={local.description}>\n {(description) => (\n <p class=\"m-0 line-clamp-3 text-xs [overflow-wrap:anywhere] text-muted-foreground/80\">\n {bound(description(), MAX_TEXT)}\n </p>\n )}\n </Show>","<div class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <p\n title={text()}\n class={cn(\n 'm-0 line-clamp-3 text-sm [overflow-wrap:anywhere] whitespace-pre-wrap text-foreground',\n {\n 'text-muted-foreground': local.status === 'complete' || local.status === 'skipped',\n 'text-destructive': local.status === 'failed',\n }\n )}\n >\n {text()}\n <Show when={local.status}>\n {(status) => (\n <span class=\"sr-only\"> {local.statusLabel ?? TASK_ITEM_STATUS_LABELS[status()]}</span>\n )}\n </Show>\n </p>\n <Show when={local.description}>\n {(description) => (\n <p class=\"m-0 line-clamp-3 text-xs [overflow-wrap:anywhere] text-muted-foreground/80\">\n {bound(description(), MAX_TEXT)}\n </p>\n )}\n </Show>\n <Show when={files().length > 0}>\n <AttachmentList aria-label=\"Files\" class=\"gap-1\">\n <For each={shownFiles()}>\n {(file) => (\n <li class=\"min-w-0 max-w-full\">\n <Attachment variant=\"chip\" name={file.name} kind={file.kind} size={file.size} />\n </li>\n )}\n </For>\n <Show when={hiddenFiles() > 0}>\n <li class=\"flex items-center\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"2xs\"\n aria-expanded={showAllFiles() ? 'true' : 'false'}\n onClick={() => setShowAllFiles((value) => !value)}\n >\n {showAllFiles() ? 'Show fewer files' : `Show ${hiddenFiles()} more files`}\n </Button>\n </li>\n </Show>\n </AttachmentList>\n </Show>\n </div>","<AttachmentList aria-label=\"Files\" class=\"gap-1\">\n <For each={shownFiles()}>\n {(file) => (\n <li class=\"min-w-0 max-w-full\">\n <Attachment variant=\"chip\" name={file.name} kind={file.kind} size={file.size} />\n </li>\n )}\n </For>\n <Show when={hiddenFiles() > 0}>\n <li class=\"flex items-center\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"2xs\"\n aria-expanded={showAllFiles() ? 'true' : 'false'}\n onClick={() => setShowAllFiles((value) => !value)}\n >\n {showAllFiles() ? 'Show fewer files' : `Show ${hiddenFiles()} more files`}\n </Button>\n </li>\n </Show>\n </AttachmentList>","class=\"gap-1\"","<For each={shownFiles()}>\n {(file) => (\n <li class=\"min-w-0 max-w-full\">\n <Attachment variant=\"chip\" name={file.name} kind={file.kind} size={file.size} />\n </li>\n )}\n </For>","<Attachment variant=\"chip\" name={file.name} kind={file.kind} size={file.size} />","variant=\"chip\"","<Show when={hiddenFiles() > 0}>\n <li class=\"flex items-center\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"2xs\"\n aria-expanded={showAllFiles() ? 'true' : 'false'}\n onClick={() => setShowAllFiles((value) => !value)}\n >\n {showAllFiles() ? 'Show fewer files' : `Show ${hiddenFiles()} more files`}\n </Button>\n </li>\n </Show>","<Button\n type=\"button\"\n variant=\"ghost\"\n size=\"2xs\"\n aria-expanded={showAllFiles() ? 'true' : 'false'}\n onClick={() => setShowAllFiles((value) => !value)}\n >\n {showAllFiles() ? 'Show fewer files' : `Show ${hiddenFiles()} more files`}\n </Button>","type=\"button\"","variant=\"ghost\"","size=\"2xs\"","onClick={() => setShowAllFiles((value) => !value)}","{showAllFiles() ? 'Show fewer files' : `Show ${hiddenFiles()} more files`}","<li class=\"flex items-center\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"2xs\"\n aria-expanded={showAllFiles() ? 'true' : 'false'}\n onClick={() => setShowAllFiles((value) => !value)}\n >\n {showAllFiles() ? 'Show fewer files' : `Show ${hiddenFiles()} more files`}\n </Button>\n </li>","class={cn(\n 'm-0 line-clamp-3 text-sm [overflow-wrap:anywhere] whitespace-pre-wrap text-foreground',\n {\n 'text-muted-foreground': local.status === 'complete' || local.status === 'skipped',\n 'text-destructive': local.status === 'failed',\n }\n )}","<ScrollArea\n role=\"region\"\n aria-label={local.label}\n class={cn('max-h-72', local.class)}\n {...rest}\n >\n <ul role=\"list\" class=\"m-0 flex list-none flex-col gap-0.5 p-0\">\n {local.children}\n </ul>\n </ScrollArea>","role=\"region\"","<ul role=\"list\" class=\"m-0 flex list-none flex-col gap-0.5 p-0\">\n {local.children}\n </ul>","<TaskItemList label={label()}>\n <For keyed={false} each={local.items}>\n {(item) => (\n <TaskItemRow\n text={item().text}\n description={item().description}\n status={item().status}\n files={item().files}\n />\n )}\n </For>\n </TaskItemList>","<For keyed={false} each={local.items}>\n {(item) => (\n <TaskItemRow\n text={item().text}\n description={item().description}\n status={item().status}\n files={item().files}\n />\n )}\n </For>","keyed={false}","<TaskItemRow\n text={item().text}\n description={item().description}\n status={item().status}\n files={item().files}\n />","<TraceLine\n icon={local.icon ?? <ListChecks />}\n title={local.title}\n meta={local.meta ?? derivedMeta()}\n {...rest}\n >\n {local.items.length > 0 ? list : undefined}\n </TraceLine>","<ListChecks />","ListChecks","LucideListChecks","_$setAttribute"],"sources":["../../../../src/components/composites/task/task.tsx"],"sourcesContent":["import { ListChecks as LucideListChecks } from '@lucide/solid'\nimport { createMemo, createSignal, For, Show, omit } from 'solid-js'\nimport { type ComponentProps, type JSX } from '@solidjs/web'\nimport { cn } from '#lib/utils'\nimport { Attachment, AttachmentList, type AttachmentKind } from '../../ui/attachment'\nimport { Button } from '../../ui/button'\nimport { ScrollArea } from '../../ui/scroll-area'\nimport {\n TraceLine,\n TraceMark,\n WORK_STATUS_LABELS,\n WORK_TRACE_STATUS,\n type TraceLineProps,\n type WorkStatus,\n} from '../../ui/trace'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst ListChecks = fastIcon(LucideListChecks)\n\n/**\n * Task.\n *\n * One piece of work the agent is doing, as a `TraceLine` that opens onto its\n * items: a title, then a list in which each item is a sentence, optionally a\n * status, and optionally the files it touched. Reach for `Plan` when the list is\n * a proposal the person approves, for `Queue` when it is the agent's running\n * todo list, and for a `Trace` of tool calls when the items are things that\n * *ran*, a Task item is a statement about work, not a record of a call.\n *\n * ## Items wrap; lines do not\n *\n * A `TraceLine` truncates its title to one row, which is right for \"Read\n * src/app.tsx\" and wrong for \"Backfill locale from profile.language, falling\n * back to en\". Items are therefore their own rows with the same mark and colour\n * vocabulary as a Trace line but wrapping text, clamped to three lines so a\n * pasted paragraph cannot take the column. `TaskItemRow` and `TaskItemList` are\n * exported because `Plan` and `Queue` are built from them.\n *\n * ## Status is a claim\n *\n * An item shows a mark and speaks a word only when the host supplied `status`.\n * The \"2 of 4 done\" in the header is derived from those statuses and appears\n * only if at least one item has one; items without a status are counted in the\n * total and not in \"done\" (see `taskProgress`). A task with no items is a plain\n * line: there is nothing to open, and an empty disclosure is a control that\n * does nothing.\n *\n * ## Files are untrusted metadata\n *\n * File chips are `Attachment` chips with no handlers, so they are text: a name\n * is never a link or a path. Past six, the rest sit behind one toggle button\n * whose label changes in place, so keyboard focus survives opening and closing\n * it.\n */\nexport type TaskItemStatus = WorkStatus\n\nexport type TaskFile = Readonly<{\n name: string\n kind?: AttachmentKind\n /** Bytes. */\n size?: number\n}>\n\nexport type TaskItem = Readonly<{\n /** Only needed for the host's own bookkeeping; rows are kept by position. */\n id?: string\n text: string\n description?: string\n status?: TaskItemStatus\n files?: readonly TaskFile[]\n}>\n\nexport const TASK_ITEM_STATUS_LABELS: Readonly<Record<TaskItemStatus, string>> = WORK_STATUS_LABELS\n\n/** Visible files per item before the rest go behind a toggle. */\nconst VISIBLE_FILES = 6\n/** Characters of item text kept; the rest of a pasted wall is not a todo. */\nconst MAX_TEXT = 1_000\n\nfunction bound(text: string, max: number): string {\n return text.length > max ? `${text.slice(0, max)}…` : text\n}\n\n/**\n * How many items are done, or nothing at all when no item carries a status.\n * Items without a status count toward the total: the host did not say they were\n * finished, so they are not.\n */\nexport function taskProgress(\n items: readonly Pick<TaskItem, 'status'>[]\n): Readonly<{ done: number; total: number }> | undefined {\n if (!items.some((item) => item.status !== undefined)) return undefined\n return {\n done: items.filter((item) => item.status === 'complete').length,\n total: items.length,\n }\n}\n\n/** `2 of 4 done`, in words. */\nexport function taskProgressLabel(progress: { done: number; total: number }): string {\n return `${progress.done} of ${progress.total} done`\n}\n\nexport type TaskItemRowProps = Omit<ComponentProps<'li'>, 'children'> & {\n text: string\n description?: string\n status?: TaskItemStatus\n files?: readonly TaskFile[]\n /** Spoken in place of the default status word. */\n statusLabel?: string\n}\n\nexport function TaskItemRow(props: TaskItemRowProps) {\n const local = props\n const rest = omit(props, 'class', 'text', 'description', 'status', 'files', 'statusLabel')\n const [showAllFiles, setShowAllFiles] = createSignal(false)\n const files = () => local.files ?? []\n const shownFiles = () => (showAllFiles() ? files() : files().slice(0, VISIBLE_FILES))\n const hiddenFiles = () => files().length - VISIBLE_FILES\n const text = () => bound(local.text, MAX_TEXT)\n\n return (\n <li\n data-slot=\"task-item\"\n data-status={local.status}\n class={cn('flex min-w-0 gap-2 rounded-md px-1.5 py-0.5', local.class)}\n {...rest}\n >\n <TraceMark\n slot=\"task-item-mark\"\n class=\"mt-0.5\"\n status={local.status ? WORK_TRACE_STATUS[local.status] : undefined}\n completed={local.status === 'complete'}\n icon={\n local.status ? undefined : <span class=\"size-1 rounded-full bg-muted-foreground/60\" />\n }\n />\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <p\n title={text()}\n class={cn(\n 'm-0 line-clamp-3 text-sm [overflow-wrap:anywhere] whitespace-pre-wrap text-foreground',\n {\n 'text-muted-foreground': local.status === 'complete' || local.status === 'skipped',\n 'text-destructive': local.status === 'failed',\n }\n )}\n >\n {text()}\n <Show when={local.status}>\n {(status) => (\n <span class=\"sr-only\"> {local.statusLabel ?? TASK_ITEM_STATUS_LABELS[status()]}</span>\n )}\n </Show>\n </p>\n <Show when={local.description}>\n {(description) => (\n <p class=\"m-0 line-clamp-3 text-xs [overflow-wrap:anywhere] text-muted-foreground/80\">\n {bound(description(), MAX_TEXT)}\n </p>\n )}\n </Show>\n <Show when={files().length > 0}>\n <AttachmentList aria-label=\"Files\" class=\"gap-1\">\n <For each={shownFiles()}>\n {(file) => (\n <li class=\"min-w-0 max-w-full\">\n <Attachment variant=\"chip\" name={file.name} kind={file.kind} size={file.size} />\n </li>\n )}\n </For>\n <Show when={hiddenFiles() > 0}>\n <li class=\"flex items-center\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"2xs\"\n aria-expanded={showAllFiles() ? 'true' : 'false'}\n onClick={() => setShowAllFiles((value) => !value)}\n >\n {showAllFiles() ? 'Show fewer files' : `Show ${hiddenFiles()} more files`}\n </Button>\n </li>\n </Show>\n </AttachmentList>\n </Show>\n </div>\n </li>\n )\n}\n\nexport type TaskItemListProps = Omit<ComponentProps<'div'>, 'children'> & {\n /** The list's accessible name. A scrolling region without one is an unlabelled tab stop. */\n label: string\n children?: JSX.Element\n}\n\n/**\n * The items, bounded. Two hundred todo items must scroll inside their line and\n * not push the answer out of view; the region is keyboard-focusable and named,\n * which is what makes the overflow reachable without a pointer.\n */\nexport function TaskItemList(props: TaskItemListProps) {\n const local = props\n const rest = omit(props, 'class', 'label', 'children')\n return (\n <ScrollArea\n role=\"region\"\n aria-label={local.label}\n class={cn('max-h-72', local.class)}\n {...rest}\n >\n <ul role=\"list\" class=\"m-0 flex list-none flex-col gap-0.5 p-0\">\n {local.children}\n </ul>\n </ScrollArea>\n )\n}\n\nexport type TaskProps = Omit<\n TraceLineProps,\n 'description' | 'href' | 'onSelect' | 'selectHaspopup' | 'children'\n> & {\n items: readonly TaskItem[]\n /** The item list's accessible name. Defaults to the title when it is a string. */\n itemsLabel?: string\n}\n\nexport function Task(props: TaskProps) {\n const local = props\n const rest = omit(props, 'items', 'itemsLabel', 'icon', 'meta', 'title')\n const progress = createMemo(() => taskProgress(local.items))\n const derivedMeta = () => {\n const value = progress()\n return value ? taskProgressLabel(value) : undefined\n }\n const label = () =>\n local.itemsLabel ?? (typeof local.title === 'string' ? `${local.title} items` : 'Task items')\n\n const list = () => (\n <TaskItemList label={label()}>\n <For keyed={false} each={local.items}>\n {(item) => (\n <TaskItemRow\n text={item().text}\n description={item().description}\n status={item().status}\n files={item().files}\n />\n )}\n </For>\n </TaskItemList>\n )\n\n return (\n <TraceLine\n icon={local.icon ?? <ListChecks />}\n title={local.title}\n meta={local.meta ?? derivedMeta()}\n {...rest}\n >\n {local.items.length > 0 ? list : undefined}\n </TraceLine>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAkBA,IAAMkC,eAAa,SAASC,UAAgB;AAuD5C,IAAa,0BAAoE;;AAGjF,IAAM,gBAAgB;;AAEtB,IAAM,WAAW;AAEjB,SAAS,MAAM,MAAc,KAAqB;CAChD,OAAO,KAAK,SAAS,MAAM,GAAG,KAAK,MAAM,GAAG,GAAG,EAAE,KAAK;AACxD;;;;;;AAOA,SAAgB,aACd,OACuD;CACvD,IAAI,CAAC,MAAM,MAAM,SAAS,KAAK,WAAW,KAAA,CAAS,GAAG,OAAO,KAAA;CAC7D,OAAO;EACL,MAAM,MAAM,QAAQ,SAAS,KAAK,WAAW,UAAU,CAAC,CAAC;EACzD,OAAO,MAAM;CACf;AACF;;AAGA,SAAgB,kBAAkB,UAAmD;CACnF,OAAO,GAAG,SAAS,KAAK,MAAM,SAAS,MAAM;AAC/C;AAWA,SAAgB,YAAY,OAAyB;CACnD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,QAAQ,eAAe,UAAU,SAAS,aAAa;CACzF,MAAM,CAAC,cAAc,mBAAmB,aAAa,KAAK;CAC1D,MAAM,cAAc,MAAM,SAAS,CAAC;CACpC,MAAM,mBAAoB,aAAa,IAAI,MAAM,IAAI,MAAM,CAAC,CAAC,MAAM,GAAG,aAAa;CACnF,MAAM,oBAAoB,MAAM,CAAC,CAAC,SAAS;CAC3C,MAAM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A,SAAA;MAAQ,OAAA,KAAK,CAAC,CAAC;KAAM;KACrB,IAAA,QAAA;MAAO,OAAA,KAAK,CAAC,CAAC;KAAK;IACpB,CAAA;GAEA,CAAA;EACO;;CAGhB,OACEC,gBAAAA,WAAAA,WAAAA;EACE,IAAA,OAAA;GAAM,OAAA,MAAM,QAAQC,gBAAAA,cAAAA,CAAa,CAAA;EAAC;EAClC,IAAA,QAAA;GAAO,OAAA,MAAM;EAAK;EAClB,IAAA,OAAA;GAAM,OAAA,MAAM,QAAQ,YAAY;EAAC;CAIxB,GAHL,MAJN,EAAA,IAAA,WAAA;EAMG,OAAA,MAAM,MAAM,SAAS,IAAI,OAAO,KAAA;CACxB,EAAA,CAAA,CAAA;AAEf"}
1
+ {"version":3,"file":"task.js","names":["<TraceMark\n slot=\"task-item-mark\"\n class=\"mt-0.5\"\n status={local.status ? WORK_TRACE_STATUS[local.status] : undefined}\n completed={local.status === 'complete'}\n icon={\n local.status ? undefined : <span class=\"size-1 rounded-full bg-muted-foreground/60\" />\n }\n />","slot=\"task-item-mark\"","class=\"mt-0.5\"","local.status ? WORK_TRACE_STATUS[local.status] : undefined","local.status ? undefined : <span class=\"size-1 rounded-full bg-muted-foreground/60\" />","<span class=\"size-1 rounded-full bg-muted-foreground/60\" />","<li\n data-slot=\"task-item\"\n data-status={local.status}\n class={cn('flex min-w-0 gap-2 rounded-md px-1.5 py-0.5', local.class)}\n {...rest}\n >\n <TraceMark\n slot=\"task-item-mark\"\n class=\"mt-0.5\"\n status={local.status ? WORK_TRACE_STATUS[local.status] : undefined}\n completed={local.status === 'complete'}\n icon={\n local.status ? undefined : <span class=\"size-1 rounded-full bg-muted-foreground/60\" />\n }\n />\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <p\n title={text()}\n class={cn(\n 'm-0 line-clamp-3 text-sm [overflow-wrap:anywhere] whitespace-pre-wrap text-foreground',\n {\n 'text-muted-foreground': local.status === 'complete' || local.status === 'skipped',\n 'text-destructive': local.status === 'failed',\n }\n )}\n >\n {text()}\n <Show when={local.status}>\n {(status) => (\n <span class=\"sr-only\"> {local.statusLabel ?? TASK_ITEM_STATUS_LABELS[status()]}</span>\n )}\n </Show>\n </p>\n <Show when={local.description}>\n {(description) => (\n <p class=\"m-0 line-clamp-3 text-xs [overflow-wrap:anywhere] text-muted-foreground/80\">\n {bound(description(), MAX_TEXT)}\n </p>\n )}\n </Show>\n <Show when={files().length > 0}>\n <AttachmentList aria-label=\"Files\" class=\"gap-1\">\n <For each={shownFiles()}>\n {(file) => (\n <li class=\"min-w-0 max-w-full\">\n <Attachment variant=\"chip\" name={file.name} kind={file.kind} size={file.size} />\n </li>\n )}\n </For>\n <Show when={hiddenFiles() > 0}>\n <li class=\"flex items-center\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"2xs\"\n aria-expanded={showAllFiles() ? 'true' : 'false'}\n onClick={() => setShowAllFiles((value) => !value)}\n >\n {showAllFiles() ? 'Show fewer files' : `Show ${hiddenFiles()} more files`}\n </Button>\n </li>\n </Show>\n </AttachmentList>\n </Show>\n </div>\n </li>","<p\n title={text()}\n class={cn(\n 'm-0 line-clamp-3 text-sm [overflow-wrap:anywhere] whitespace-pre-wrap text-foreground',\n {\n 'text-muted-foreground': local.status === 'complete' || local.status === 'skipped',\n 'text-destructive': local.status === 'failed',\n }\n )}\n >\n {text()}\n <Show when={local.status}>\n {(status) => (\n <span class=\"sr-only\"> {local.statusLabel ?? TASK_ITEM_STATUS_LABELS[status()]}</span>\n )}\n </Show>\n </p>","<Show when={local.status}>\n {(status) => (\n <span class=\"sr-only\"> {local.statusLabel ?? TASK_ITEM_STATUS_LABELS[status()]}</span>\n )}\n </Show>","<Show when={local.description}>\n {(description) => (\n <p class=\"m-0 line-clamp-3 text-xs [overflow-wrap:anywhere] text-muted-foreground/80\">\n {bound(description(), MAX_TEXT)}\n </p>\n )}\n </Show>","<div class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <p\n title={text()}\n class={cn(\n 'm-0 line-clamp-3 text-sm [overflow-wrap:anywhere] whitespace-pre-wrap text-foreground',\n {\n 'text-muted-foreground': local.status === 'complete' || local.status === 'skipped',\n 'text-destructive': local.status === 'failed',\n }\n )}\n >\n {text()}\n <Show when={local.status}>\n {(status) => (\n <span class=\"sr-only\"> {local.statusLabel ?? TASK_ITEM_STATUS_LABELS[status()]}</span>\n )}\n </Show>\n </p>\n <Show when={local.description}>\n {(description) => (\n <p class=\"m-0 line-clamp-3 text-xs [overflow-wrap:anywhere] text-muted-foreground/80\">\n {bound(description(), MAX_TEXT)}\n </p>\n )}\n </Show>\n <Show when={files().length > 0}>\n <AttachmentList aria-label=\"Files\" class=\"gap-1\">\n <For each={shownFiles()}>\n {(file) => (\n <li class=\"min-w-0 max-w-full\">\n <Attachment variant=\"chip\" name={file.name} kind={file.kind} size={file.size} />\n </li>\n )}\n </For>\n <Show when={hiddenFiles() > 0}>\n <li class=\"flex items-center\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"2xs\"\n aria-expanded={showAllFiles() ? 'true' : 'false'}\n onClick={() => setShowAllFiles((value) => !value)}\n >\n {showAllFiles() ? 'Show fewer files' : `Show ${hiddenFiles()} more files`}\n </Button>\n </li>\n </Show>\n </AttachmentList>\n </Show>\n </div>","<AttachmentList aria-label=\"Files\" class=\"gap-1\">\n <For each={shownFiles()}>\n {(file) => (\n <li class=\"min-w-0 max-w-full\">\n <Attachment variant=\"chip\" name={file.name} kind={file.kind} size={file.size} />\n </li>\n )}\n </For>\n <Show when={hiddenFiles() > 0}>\n <li class=\"flex items-center\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"2xs\"\n aria-expanded={showAllFiles() ? 'true' : 'false'}\n onClick={() => setShowAllFiles((value) => !value)}\n >\n {showAllFiles() ? 'Show fewer files' : `Show ${hiddenFiles()} more files`}\n </Button>\n </li>\n </Show>\n </AttachmentList>","class=\"gap-1\"","<For each={shownFiles()}>\n {(file) => (\n <li class=\"min-w-0 max-w-full\">\n <Attachment variant=\"chip\" name={file.name} kind={file.kind} size={file.size} />\n </li>\n )}\n </For>","<Attachment variant=\"chip\" name={file.name} kind={file.kind} size={file.size} />","variant=\"chip\"","<Show when={hiddenFiles() > 0}>\n <li class=\"flex items-center\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"2xs\"\n aria-expanded={showAllFiles() ? 'true' : 'false'}\n onClick={() => setShowAllFiles((value) => !value)}\n >\n {showAllFiles() ? 'Show fewer files' : `Show ${hiddenFiles()} more files`}\n </Button>\n </li>\n </Show>","<Button\n type=\"button\"\n variant=\"ghost\"\n size=\"2xs\"\n aria-expanded={showAllFiles() ? 'true' : 'false'}\n onClick={() => setShowAllFiles((value) => !value)}\n >\n {showAllFiles() ? 'Show fewer files' : `Show ${hiddenFiles()} more files`}\n </Button>","type=\"button\"","variant=\"ghost\"","size=\"2xs\"","onClick={() => setShowAllFiles((value) => !value)}","{showAllFiles() ? 'Show fewer files' : `Show ${hiddenFiles()} more files`}","<li class=\"flex items-center\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"2xs\"\n aria-expanded={showAllFiles() ? 'true' : 'false'}\n onClick={() => setShowAllFiles((value) => !value)}\n >\n {showAllFiles() ? 'Show fewer files' : `Show ${hiddenFiles()} more files`}\n </Button>\n </li>","class={cn(\n 'm-0 line-clamp-3 text-sm [overflow-wrap:anywhere] whitespace-pre-wrap text-foreground',\n {\n 'text-muted-foreground': local.status === 'complete' || local.status === 'skipped',\n 'text-destructive': local.status === 'failed',\n }\n )}","<ScrollArea\n role=\"region\"\n aria-label={local.label}\n class={cn('max-h-72', local.class)}\n {...rest}\n >\n <ul role=\"list\" class=\"m-0 flex list-none flex-col gap-0.5 p-0\">\n {local.children}\n </ul>\n </ScrollArea>","role=\"region\"","<ul role=\"list\" class=\"m-0 flex list-none flex-col gap-0.5 p-0\">\n {local.children}\n </ul>","<TaskItemList label={label()}>\n <For keyed={false} each={local.items}>\n {(item) => (\n <TaskItemRow\n text={item().text}\n description={item().description}\n status={item().status}\n files={item().files}\n />\n )}\n </For>\n </TaskItemList>","<For keyed={false} each={local.items}>\n {(item) => (\n <TaskItemRow\n text={item().text}\n description={item().description}\n status={item().status}\n files={item().files}\n />\n )}\n </For>","keyed={false}","<TaskItemRow\n text={item().text}\n description={item().description}\n status={item().status}\n files={item().files}\n />","<TraceLine\n icon={local.icon ?? <ListChecks />}\n title={local.title}\n meta={local.meta ?? derivedMeta()}\n {...rest}\n >\n {local.items.length > 0 ? list : undefined}\n </TraceLine>","<ListChecks />","LucideListChecks","_$spread","_$insert","_$effect","_$setAttribute","_$className"],"sources":["../../../../src/components/composites/task/task.tsx"],"sourcesContent":["import { ListChecks as LucideListChecks } from '@lucide/solid'\nimport { createMemo, createSignal, For, Show, omit } from 'solid-js'\nimport { type ComponentProps, type JSX } from '@solidjs/web'\nimport { cn } from '#lib/utils'\nimport { Attachment, AttachmentList, type AttachmentKind } from '../../ui/attachment'\nimport { Button } from '../../ui/button'\nimport { ScrollArea } from '../../ui/scroll-area'\nimport {\n TraceLine,\n TraceMark,\n WORK_STATUS_LABELS,\n WORK_TRACE_STATUS,\n type TraceLineProps,\n type WorkStatus,\n} from '../../ui/trace'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst ListChecks = fastIcon(LucideListChecks)\n\n/**\n * Task.\n *\n * One piece of work the agent is doing, as a `TraceLine` that opens onto its\n * items: a title, then a list in which each item is a sentence, optionally a\n * status, and optionally the files it touched. Reach for `Plan` when the list is\n * a proposal the person approves, for `Queue` when it is the agent's running\n * todo list, and for a `Trace` of tool calls when the items are things that\n * *ran*, a Task item is a statement about work, not a record of a call.\n *\n * ## Items wrap; lines do not\n *\n * A `TraceLine` truncates its title to one row, which is right for \"Read\n * src/app.tsx\" and wrong for \"Backfill locale from profile.language, falling\n * back to en\". Items are therefore their own rows with the same mark and colour\n * vocabulary as a Trace line but wrapping text, clamped to three lines so a\n * pasted paragraph cannot take the column. `TaskItemRow` and `TaskItemList` are\n * exported because `Plan` and `Queue` are built from them.\n *\n * ## Status is a claim\n *\n * An item shows a mark and speaks a word only when the host supplied `status`.\n * The \"2 of 4 done\" in the header is derived from those statuses and appears\n * only if at least one item has one; items without a status are counted in the\n * total and not in \"done\" (see `taskProgress`). A task with no items is a plain\n * line: there is nothing to open, and an empty disclosure is a control that\n * does nothing.\n *\n * ## Files are untrusted metadata\n *\n * File chips are `Attachment` chips with no handlers, so they are text: a name\n * is never a link or a path. Past six, the rest sit behind one toggle button\n * whose label changes in place, so keyboard focus survives opening and closing\n * it.\n */\nexport type TaskItemStatus = WorkStatus\n\nexport type TaskFile = Readonly<{\n name: string\n kind?: AttachmentKind\n /** Bytes. */\n size?: number\n}>\n\nexport type TaskItem = Readonly<{\n /** Only needed for the host's own bookkeeping; rows are kept by position. */\n id?: string\n text: string\n description?: string\n status?: TaskItemStatus\n files?: readonly TaskFile[]\n}>\n\nexport const TASK_ITEM_STATUS_LABELS: Readonly<Record<TaskItemStatus, string>> = WORK_STATUS_LABELS\n\n/** Visible files per item before the rest go behind a toggle. */\nconst VISIBLE_FILES = 6\n/** Characters of item text kept; the rest of a pasted wall is not a todo. */\nconst MAX_TEXT = 1_000\n\nfunction bound(text: string, max: number): string {\n return text.length > max ? `${text.slice(0, max)}…` : text\n}\n\n/**\n * How many items are done, or nothing at all when no item carries a status.\n * Items without a status count toward the total: the host did not say they were\n * finished, so they are not.\n */\nexport function taskProgress(\n items: readonly Pick<TaskItem, 'status'>[]\n): Readonly<{ done: number; total: number }> | undefined {\n if (!items.some((item) => item.status !== undefined)) return undefined\n return {\n done: items.filter((item) => item.status === 'complete').length,\n total: items.length,\n }\n}\n\n/** `2 of 4 done`, in words. */\nexport function taskProgressLabel(progress: { done: number; total: number }): string {\n return `${progress.done} of ${progress.total} done`\n}\n\nexport type TaskItemRowProps = Omit<ComponentProps<'li'>, 'children'> & {\n text: string\n description?: string\n status?: TaskItemStatus\n files?: readonly TaskFile[]\n /** Spoken in place of the default status word. */\n statusLabel?: string\n}\n\nexport function TaskItemRow(props: TaskItemRowProps) {\n const local = props\n const rest = omit(props, 'class', 'text', 'description', 'status', 'files', 'statusLabel')\n const [showAllFiles, setShowAllFiles] = createSignal(false)\n const files = () => local.files ?? []\n const shownFiles = () => (showAllFiles() ? files() : files().slice(0, VISIBLE_FILES))\n const hiddenFiles = () => files().length - VISIBLE_FILES\n const text = () => bound(local.text, MAX_TEXT)\n\n return (\n <li\n data-slot=\"task-item\"\n data-status={local.status}\n class={cn('flex min-w-0 gap-2 rounded-md px-1.5 py-0.5', local.class)}\n {...rest}\n >\n <TraceMark\n slot=\"task-item-mark\"\n class=\"mt-0.5\"\n status={local.status ? WORK_TRACE_STATUS[local.status] : undefined}\n completed={local.status === 'complete'}\n icon={\n local.status ? undefined : <span class=\"size-1 rounded-full bg-muted-foreground/60\" />\n }\n />\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <p\n title={text()}\n class={cn(\n 'm-0 line-clamp-3 text-sm [overflow-wrap:anywhere] whitespace-pre-wrap text-foreground',\n {\n 'text-muted-foreground': local.status === 'complete' || local.status === 'skipped',\n 'text-destructive': local.status === 'failed',\n }\n )}\n >\n {text()}\n <Show when={local.status}>\n {(status) => (\n <span class=\"sr-only\"> {local.statusLabel ?? TASK_ITEM_STATUS_LABELS[status()]}</span>\n )}\n </Show>\n </p>\n <Show when={local.description}>\n {(description) => (\n <p class=\"m-0 line-clamp-3 text-xs [overflow-wrap:anywhere] text-muted-foreground/80\">\n {bound(description(), MAX_TEXT)}\n </p>\n )}\n </Show>\n <Show when={files().length > 0}>\n <AttachmentList aria-label=\"Files\" class=\"gap-1\">\n <For each={shownFiles()}>\n {(file) => (\n <li class=\"min-w-0 max-w-full\">\n <Attachment variant=\"chip\" name={file.name} kind={file.kind} size={file.size} />\n </li>\n )}\n </For>\n <Show when={hiddenFiles() > 0}>\n <li class=\"flex items-center\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"2xs\"\n aria-expanded={showAllFiles() ? 'true' : 'false'}\n onClick={() => setShowAllFiles((value) => !value)}\n >\n {showAllFiles() ? 'Show fewer files' : `Show ${hiddenFiles()} more files`}\n </Button>\n </li>\n </Show>\n </AttachmentList>\n </Show>\n </div>\n </li>\n )\n}\n\nexport type TaskItemListProps = Omit<ComponentProps<'div'>, 'children'> & {\n /** The list's accessible name. A scrolling region without one is an unlabelled tab stop. */\n label: string\n children?: JSX.Element\n}\n\n/**\n * The items, bounded. Two hundred todo items must scroll inside their line and\n * not push the answer out of view; the region is keyboard-focusable and named,\n * which is what makes the overflow reachable without a pointer.\n */\nexport function TaskItemList(props: TaskItemListProps) {\n const local = props\n const rest = omit(props, 'class', 'label', 'children')\n return (\n <ScrollArea\n role=\"region\"\n aria-label={local.label}\n class={cn('max-h-72', local.class)}\n {...rest}\n >\n <ul role=\"list\" class=\"m-0 flex list-none flex-col gap-0.5 p-0\">\n {local.children}\n </ul>\n </ScrollArea>\n )\n}\n\nexport type TaskProps = Omit<\n TraceLineProps,\n 'description' | 'href' | 'onSelect' | 'selectHaspopup' | 'children'\n> & {\n items: readonly TaskItem[]\n /** The item list's accessible name. Defaults to the title when it is a string. */\n itemsLabel?: string\n}\n\nexport function Task(props: TaskProps) {\n const local = props\n const rest = omit(props, 'items', 'itemsLabel', 'icon', 'meta', 'title')\n const progress = createMemo(() => taskProgress(local.items))\n const derivedMeta = () => {\n const value = progress()\n return value ? taskProgressLabel(value) : undefined\n }\n const label = () =>\n local.itemsLabel ?? (typeof local.title === 'string' ? `${local.title} items` : 'Task items')\n\n const list = () => (\n <TaskItemList label={label()}>\n <For keyed={false} each={local.items}>\n {(item) => (\n <TaskItemRow\n text={item().text}\n description={item().description}\n status={item().status}\n files={item().files}\n />\n )}\n </For>\n </TaskItemList>\n )\n\n return (\n <TraceLine\n icon={local.icon ?? <ListChecks />}\n title={local.title}\n meta={local.meta ?? derivedMeta()}\n {...rest}\n >\n {local.items.length > 0 ? list : undefined}\n </TraceLine>\n )\n}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EAAC;CAIxB,GAHL,MAJN,EAAA,IAAA,WAAA;EAMG,OAAA,MAAM,MAAM,SAAS,IAAI,OAAO,KAAA;CACxB,EAAA,CAAA,CAAA;AAEf"}
@@ -149,7 +149,7 @@ function nearestAnsiColor(r, g, b) {
149
149
  const green = clamp(g);
150
150
  const blue = clamp(b);
151
151
  let best = 0;
152
- let bestDistance = Infinity;
152
+ let bestDistance = 1e400;
153
153
  for (let index = 0; index < XTERM_16.length; index += 1) {
154
154
  const [pr, pg, pb] = XTERM_16[index];
155
155
  const meanRed = (red + pr) / 2;