@kabmo-labs/kabmo 0.42.1 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (362) hide show
  1. package/README.md +1 -1
  2. package/dist/client/index.html +1 -1
  3. package/dist/client/index.js +619 -582
  4. package/dist/client/static/js/{CsvGrid-8gdp5b49.js → CsvGrid-3fr85032.js} +2 -2
  5. package/dist/client/static/js/{DocxView-j9sphgra.js → DocxView-pqbp2fpd.js} +4 -4
  6. package/dist/client/static/js/{DrawioView-xsgjc7d8.js → DrawioView-m0vecq1m.js} +2 -2
  7. package/dist/client/static/js/ImageView-rbejbjwg.js +1 -0
  8. package/dist/client/static/js/LayoutWrapper-mxfsqh57.js +2 -0
  9. package/dist/client/static/js/Modal-vnwg4xn3.js +59 -0
  10. package/dist/client/static/js/{PdfView-afd5cg54.js → PdfView-wmg0vk2p.js} +1 -1
  11. package/dist/client/static/js/SessionsView-90z2t4qe.js +1 -0
  12. package/dist/client/static/js/{SheetView-gfzgxb4r.js → SheetView-rg5gkcd7.js} +13 -13
  13. package/dist/client/static/js/{SvgPreview-225pkb99.js → SvgPreview-wpb7b0ez.js} +1 -1
  14. package/dist/client/static/js/{abnfDiagram-O67JEVCF-z70sk69m.js → abnfDiagram-O67JEVCF-4pxqt66j.js} +1 -1
  15. package/dist/client/static/js/architecture-7GRP2DOG-7j23x20s.js +1 -0
  16. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-pf1gpkje.js → architectureDiagram-NJMV4G6O-kwt1va5y.js} +11 -11
  17. package/dist/client/static/js/{astro-nn7xg0we.js → astro-dpfdhc5e.js} +1 -1
  18. package/dist/client/static/js/bash-vv2ysp0a.js +1 -0
  19. package/dist/client/static/js/{blockDiagram-BEXU5L5S-sr25kbn6.js → blockDiagram-BEXU5L5S-hbj5v7n7.js} +7 -7
  20. package/dist/client/static/js/c-8jf64j6h.js +1 -0
  21. package/dist/client/static/js/{c4Diagram-YGBWAQC7-znstpg86.js → c4Diagram-YGBWAQC7-epfzh8dw.js} +6 -6
  22. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-7n0pdcd8.js → classDiagram-v2-NBCMYWYE-kbks4qgz.js} +6 -6
  23. package/dist/client/static/js/{cose-bilkent-JH36ORCC-zn3qw4c4.js → cose-bilkent-JH36ORCC-dvdmckrf.js} +1 -1
  24. package/dist/client/static/js/cpp-vh94zee0.js +1 -0
  25. package/dist/client/static/js/css-p57h1fme.js +1 -0
  26. package/dist/client/static/js/cynefin-OW5HDTMX-me5xnx6a.js +1 -0
  27. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-3z41vtzs.js → cynefinDiagram-VND7K2PF-r084stj5.js} +2 -2
  28. package/dist/client/static/js/{dagre-6A5THRUB-5j3zn883.js → dagre-6A5THRUB-64qc51n1.js} +2 -2
  29. package/dist/client/static/js/{diagram-22UHCM2B-ryw1w2kh.js → diagram-22UHCM2B-70qtb1rm.js} +16 -16
  30. package/dist/client/static/js/{diagram-3UASUU5V-p91q4gkh.js → diagram-3UASUU5V-dgkvnsme.js} +1 -1
  31. package/dist/client/static/js/{diagram-ATOU4E4O-22dn73g4.js → diagram-ATOU4E4O-rnpsp26v.js} +3 -3
  32. package/dist/client/static/js/{diagram-CDSNMT55-589p9n53.js → diagram-CDSNMT55-26hthh60.js} +5 -5
  33. package/dist/client/static/js/{diagram-MLGK6HIB-ezw06wbx.js → diagram-MLGK6HIB-nc1s85r5.js} +2 -2
  34. package/dist/client/static/js/{diagram-MPIPVDR6-cfwrsvk1.js → diagram-MPIPVDR6-e4dckqhv.js} +3 -3
  35. package/dist/client/static/js/{dockerfile-r4k7q34y.js → dockerfile-rxtyyhr1.js} +1 -1
  36. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-3rv2wvbf.js → ebnfDiagram-ZINNZB2B-3w9h8qk7.js} +1 -1
  37. package/dist/client/static/js/{elixir-szk51ehr.js → elixir-5ewfhvfh.js} +1 -1
  38. package/dist/client/static/js/{elk-276RUBZZ-ma40kneq.js → elk-276RUBZZ-httpkyb1.js} +1 -1
  39. package/dist/client/static/js/{erDiagram-OPXOYQCR-xwstsfqa.js → erDiagram-OPXOYQCR-3qhvf7se.js} +8 -8
  40. package/dist/client/static/js/{erlang-zwy7cqdk.js → erlang-jqqa3ehb.js} +1 -1
  41. package/dist/client/static/js/eventmodeling-NTZA5JFV-5zbvjj84.js +1 -0
  42. package/dist/client/static/js/flowDiagram-KWPJA3E3-1jat076e.js +1 -0
  43. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-qxyx9tr9.js → ganttDiagram-FUAMR5RP-t53m50e5.js} +6 -6
  44. package/dist/client/static/js/gitGraph-4MIJSDKK-tjhkv71w.js +1 -0
  45. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-v6sg7bkh.js → gitGraphDiagram-X574FWY7-b5wn9eht.js} +14 -14
  46. package/dist/client/static/js/graphql-kesh8gk0.js +1 -0
  47. package/dist/client/static/js/html-sxpfydga.js +1 -0
  48. package/dist/client/static/js/{index-e1yz59fa.js → index-0c6vpk89.js} +2 -2
  49. package/dist/client/static/js/{index-p0ez6hqd.js → index-181p91hf.js} +1 -1
  50. package/dist/client/static/js/{index-kh6vp5w5.js → index-1dwdgp27.js} +1 -1
  51. package/dist/client/static/js/{index-df4yxfzd.js → index-2q23dwrs.js} +2 -2
  52. package/dist/client/static/js/{index-4cncqz8j.js → index-38v0781h.js} +2 -2
  53. package/dist/client/static/js/{index-mvykbyhe.js → index-4banz7gr.js} +1 -1
  54. package/dist/client/static/js/{index-nh29fkk9.js → index-7dp90ad1.js} +2 -2
  55. package/dist/client/static/js/{index-b37ewyvk.js → index-7z9tz4ze.js} +2 -2
  56. package/dist/client/static/js/{index-3d40c0a7.js → index-7zc1z9z9.js} +4 -4
  57. package/dist/client/static/js/{index-8pdz41yh.js → index-8y51kgan.js} +3 -3
  58. package/dist/client/static/js/{index-qh753ynv.js → index-axszsg7a.js} +1 -1
  59. package/dist/client/static/js/{index-pxtff3ez.js → index-bvjct7sp.js} +2 -2
  60. package/dist/client/static/js/{index-8b3t2y77.js → index-cqnpsw2m.js} +2 -2
  61. package/dist/client/static/js/{index-869bpqcs.js → index-d8r84zjd.js} +12 -12
  62. package/dist/client/static/js/{index-mq6s2faf.js → index-dg3b0mfk.js} +2 -2
  63. package/dist/client/static/js/index-dkqgmacr.js +4 -0
  64. package/dist/client/static/js/{index-pkes9492.js → index-e7yf273s.js} +2 -2
  65. package/dist/client/static/js/{index-0p43qr4k.js → index-egd0vfey.js} +1 -1
  66. package/dist/client/static/js/{index-x7m6dmt4.js → index-enb6chty.js} +1 -1
  67. package/dist/client/static/js/{index-6eq445nn.js → index-f4fqvct6.js} +22 -22
  68. package/dist/client/static/js/{index-pysqpc5n.js → index-fg965t62.js} +2 -2
  69. package/dist/client/static/js/{index-sr7sdm2t.js → index-fgyenbv8.js} +4 -4
  70. package/dist/client/static/js/{index-qsw5edtk.js → index-fjnkzk12.js} +5 -5
  71. package/dist/client/static/js/{index-0nca2nhp.js → index-g3a9j9hf.js} +1 -1
  72. package/dist/client/static/js/{index-x7a5jpvq.js → index-g4rsmakg.js} +3 -3
  73. package/dist/client/static/js/{index-qx6x4z0y.js → index-gmnmnfm0.js} +2 -2
  74. package/dist/client/static/js/{index-313ctswm.js → index-gwqb7m8g.js} +1 -1
  75. package/dist/client/static/js/{index-w5q9ymf4.js → index-j60gtvw8.js} +1 -1
  76. package/dist/client/static/js/index-jvs2fvqz.js +2 -0
  77. package/dist/client/static/js/{index-r8cc80w5.js → index-jz93j0at.js} +2 -2
  78. package/dist/client/static/js/{index-2w9j2nj4.js → index-k9ws464d.js} +2 -2
  79. package/dist/client/static/js/{index-b3d2k7ec.js → index-kc3c2gzb.js} +1 -1
  80. package/dist/client/static/js/{index-9hzfvjrb.js → index-kccp6tgd.js} +2 -2
  81. package/dist/client/static/js/{index-9ss64g4g.js → index-kmzd0adv.js} +1 -1
  82. package/dist/client/static/js/{index-8fvmyv7t.js → index-ksph3kpr.js} +2 -2
  83. package/dist/client/static/js/{index-dfqmwm7j.js → index-m9s9rg5k.js} +2 -2
  84. package/dist/client/static/js/{index-gsxebrq9.js → index-n9scbxy5.js} +2 -2
  85. package/dist/client/static/js/{index-mphhvgm9.js → index-q1gwgmxt.js} +2 -2
  86. package/dist/client/static/js/{index-b42t14wk.js → index-q81rxwh7.js} +35 -35
  87. package/dist/client/static/js/{index-ktbrmp29.js → index-qhytrsyb.js} +2 -2
  88. package/dist/client/static/js/index-qzw4jnnv.js +1 -0
  89. package/dist/client/static/js/{index-xsts4pqm.js → index-r11bbnek.js} +78 -78
  90. package/dist/client/static/js/{index-q3qpm7jn.js → index-rv4qs3wm.js} +2 -2
  91. package/dist/client/static/js/{index-hga3e13s.js → index-s78n0dtv.js} +2 -2
  92. package/dist/client/static/js/{index-03pyvmcz.js → index-sesghshh.js} +2 -2
  93. package/dist/client/static/js/index-tnv3dryk.js +9 -0
  94. package/dist/client/static/js/{index-v5dbrq83.js → index-tzbzehqd.js} +1 -1
  95. package/dist/client/static/js/index-vcrh95gf.css +1 -0
  96. package/dist/client/static/js/{index-4y0ayjfx.js → index-vmgzhp41.js} +1 -1
  97. package/dist/client/static/js/{index-6dxs0tvg.js → index-wmv3crye.js} +2 -2
  98. package/dist/client/static/js/{index-b0v6gwym.js → index-ycks7gyg.js} +2 -2
  99. package/dist/client/static/js/{index-hw14rhen.js → index-ynaxep06.js} +2 -2
  100. package/dist/client/static/js/{index-rab39785.js → index-ys0xpw3q.js} +2 -2
  101. package/dist/client/static/js/{index-feffxxss.js → index-yvgbr7ek.js} +2 -2
  102. package/dist/client/static/js/index-zqthmaxq.js +478 -0
  103. package/dist/client/static/js/info-A6RAGUB7-m6qz24p8.js +1 -0
  104. package/dist/client/static/js/{infoDiagram-VRGFBTTK-0anekyhb.js → infoDiagram-VRGFBTTK-qv7438m3.js} +1 -1
  105. package/dist/client/static/js/ini-1x0ad976.js +1 -0
  106. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-zxpmfkjb.js → ishikawaDiagram-OU5B5YK6-p1w6zg5y.js} +4 -4
  107. package/dist/client/static/js/java-3944nq02.js +1 -0
  108. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-1e86fzra.js → journeyDiagram-ZHPQQLJL-ywk6xqxr.js} +5 -5
  109. package/dist/client/static/js/json-g5ggnd94.js +1 -0
  110. package/dist/client/static/js/jsx-f6p72qpc.js +1 -0
  111. package/dist/client/static/js/{julia-2eekpjq8.js → julia-0h9krgsd.js} +1 -1
  112. package/dist/client/static/js/{kanban-definition-PNTS6WVX-e85hhmr1.js → kanban-definition-PNTS6WVX-gtrmhggc.js} +5 -5
  113. package/dist/client/static/js/lua-edn2b3wn.js +1 -0
  114. package/dist/client/static/js/markdown-9dhg1fax.js +1 -0
  115. package/dist/client/static/js/{mermaid.core-jpcrnzyw.js → mermaid.core-5s24b4hh.js} +6 -6
  116. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-xwy5928e.js → mindmap-definition-NLK3R4M7-3wx7abqn.js} +4 -4
  117. package/dist/client/static/js/one-dark-pro-3vya9z02.js +1 -0
  118. package/dist/client/static/js/one-light-1yrwn9my.js +1 -0
  119. package/dist/client/static/js/packet-AYTQ26CC-ng6wq5xj.js +1 -0
  120. package/dist/client/static/js/{pegDiagram-GJSIUBJH-7dy6pw26.js → pegDiagram-GJSIUBJH-yvyqnjya.js} +1 -1
  121. package/dist/client/static/js/{perl-dtn1fccw.js → perl-rptyx23q.js} +1 -1
  122. package/dist/client/static/js/{php-7av78hch.js → php-sagvq3wz.js} +1 -1
  123. package/dist/client/static/js/pie-WAS4IAKB-rf6jhxf6.js +1 -0
  124. package/dist/client/static/js/{pieDiagram-5QR66LMP-nrv2t5yn.js → pieDiagram-5QR66LMP-26x6pj38.js} +3 -3
  125. package/dist/client/static/js/properties-fcmj08pv.js +1 -0
  126. package/dist/client/static/js/python-532d8ezm.js +1 -0
  127. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-3nt63xr8.js → quadrantDiagram-O4NWA36T-qhe8h0j9.js} +6 -6
  128. package/dist/client/static/js/r-ptmdxs2a.js +1 -0
  129. package/dist/client/static/js/radar-RG4KPBEZ-ygp6hxq4.js +1 -0
  130. package/dist/client/static/js/railroad-74A4TZTK-rxgnrb2g.js +1 -0
  131. package/dist/client/static/js/railroad-abnf-HS5TGJTU-xkv52a2p.js +1 -0
  132. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-bvcktbqh.js +1 -0
  133. package/dist/client/static/js/railroad-peg-WCYAUIDC-9c3v7jsq.js +1 -0
  134. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-evm05hzp.js → railroadDiagram-XR7U4H2S-dwy3k2jx.js} +1 -1
  135. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-tzrcmktj.js → requirementDiagram-PLB6GJNP-hcmgfesg.js} +4 -4
  136. package/dist/client/static/js/{ruby-s2bqr910.js → ruby-9qyx7knh.js} +1 -1
  137. package/dist/client/static/js/{rust-pcvgybk3.js → rust-bmb4ee5w.js} +1 -1
  138. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-jvjd5rz8.js → sankeyDiagram-IPEJSGJF-s6d3k4zs.js} +6 -6
  139. package/dist/client/static/js/{sass-bm32bb5k.js → sass-07rteya0.js} +1 -1
  140. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-0zvjwx29.js → sequenceDiagram-PO4LG4MO-0fcmzgdy.js} +19 -19
  141. package/dist/client/static/js/{sizeCapture-INFHLROL-6t6g0edv.js → sizeCapture-INFHLROL-t8fcm7rq.js} +1 -1
  142. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-nb13b23a.js → stateDiagram-v2-GCMORJYK-jr80hfeg.js} +6 -6
  143. package/dist/client/static/js/{svelte-ztkaww47.js → svelte-w365cpwa.js} +1 -1
  144. package/dist/client/static/js/{swimlanes-2SLR337P-ef8vmg6f.js → swimlanes-2SLR337P-x1ay6w39.js} +1 -1
  145. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-xj123xrp.js +8 -0
  146. package/dist/client/static/js/{timeline-definition-EJHVYXUP-3bfph698.js → timeline-definition-EJHVYXUP-qz0g6msb.js} +2 -2
  147. package/dist/client/static/js/treeView-Q6P3EWNA-fb58a7z1.js +1 -0
  148. package/dist/client/static/js/treemap-WGGIJYW6-ej4qhksx.js +1 -0
  149. package/dist/client/static/js/typescript-683kkkaw.js +1 -0
  150. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-vj6yj6tc.js → usecaseDiagram-POWQR4AR-sxzrv8ht.js} +43 -43
  151. package/dist/client/static/js/{vennDiagram-UO4OBE2U-9xyyabaq.js → vennDiagram-UO4OBE2U-qsqgnjcv.js} +5 -5
  152. package/dist/client/static/js/{vue-cbqm4bed.js → vue-d6cesny1.js} +1 -1
  153. package/dist/client/static/js/wardley-WFR3VGLG-mkp0kanv.js +1 -0
  154. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-zpcwgv9d.js → wardleyDiagram-VNRHLVJA-rvwxn458.js} +4 -4
  155. package/dist/client/static/js/xml-6ct32gys.js +1 -0
  156. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-pdr2rms2.js → xychartDiagram-PMCCYNJV-nb4w7rcg.js} +5 -5
  157. package/dist/client/static/js/yaml-1d5m3bfj.js +1 -0
  158. package/marketplace/plugins/command-runner/package.json +2 -2
  159. package/marketplace/plugins/command-runner/src/app.test.tsx +161 -0
  160. package/marketplace/plugins/command-runner/src/app.tsx +37 -3
  161. package/marketplace/plugins/command-runner/src/panel/Glyph.tsx +22 -4
  162. package/marketplace/plugins/git-forge/package.json +2 -2
  163. package/marketplace/plugins/git-forge/src/panel/Glyph.tsx +22 -3
  164. package/marketplace/plugins/git-forge/src/panel/index.tsx +21 -3
  165. package/marketplace/plugins/git-forge/src/panel/refresh.test.tsx +192 -0
  166. package/marketplace/plugins/git-forge/src/panel/use-forge.ts +4 -2
  167. package/marketplace/plugins/git-forge/src/panel/write.test.tsx +21 -0
  168. package/marketplace/plugins/stats/package.json +2 -2
  169. package/marketplace/plugins/stats/src/RefreshButton.tsx +9 -7
  170. package/marketplace/plugins/stats/src/app.tsx +15 -1
  171. package/marketplace/plugins/stats/src/refresh.test.tsx +166 -0
  172. package/package.json +1 -1
  173. package/src/client/components/common/anchored-menu/index.tsx +26 -8
  174. package/src/client/components/common/context-usage-button/McpSection.test.tsx +34 -5
  175. package/src/client/components/common/context-usage-button/McpSection.tsx +25 -3
  176. package/src/client/components/common/harness-glyph/brands.ts +3 -0
  177. package/src/client/components/common/harness-glyph/omo.ts +22 -0
  178. package/src/client/components/common/server-control/Panel.tsx +24 -86
  179. package/src/client/components/common/server-control/Row.tsx +98 -0
  180. package/src/client/components/common/server-control/index.test.tsx +69 -9
  181. package/src/client/components/layout/VisibilityMenu.tsx +18 -6
  182. package/src/client/components/layout/new-workspace-host/index.test.tsx +84 -0
  183. package/src/client/components/layout/new-workspace-host/index.tsx +35 -0
  184. package/src/client/components/mobile/header-titlebar.test.tsx +38 -3
  185. package/src/client/components/settings/Sidebar.tsx +2 -1
  186. package/src/client/components/settings/categories/GitSettings.tsx +31 -0
  187. package/src/client/components/settings/categories/git-settings/CommitMessageSection.tsx +292 -0
  188. package/src/client/components/settings/categories/git-settings/IdentitySection.tsx +215 -0
  189. package/src/client/components/settings/category-content.tsx +3 -0
  190. package/src/client/components/workspace/chat-timeline/MessageItem.tsx +8 -0
  191. package/src/client/components/workspace/chat-timeline/MessageList.test.ts +55 -2
  192. package/src/client/components/workspace/chat-timeline/MessageList.tsx +13 -1
  193. package/src/client/components/workspace/chat-timeline/PendingChatView.tsx +56 -50
  194. package/src/client/components/workspace/chat-timeline/ThinkingSection.test.tsx +38 -2
  195. package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +13 -1
  196. package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.test.tsx +50 -0
  197. package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +20 -1
  198. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.tsx +2 -1
  199. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Proc.tsx +1 -4
  200. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.tsx +3 -2
  201. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolBody.tsx +3 -3
  202. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolRowActions.tsx +45 -0
  203. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/tool-view.ts +14 -4
  204. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Card.tsx +2 -12
  205. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Compact.tsx +42 -38
  206. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Minimal.tsx +25 -21
  207. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Trace.tsx +41 -29
  208. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.tsx +47 -43
  209. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/parity.test.tsx +136 -0
  210. package/src/client/components/workspace/git-panel/CommitBox.test.tsx +98 -0
  211. package/src/client/components/workspace/git-panel/CommitBox.tsx +68 -3
  212. package/src/client/components/workspace/git-panel/index.test.ts +12 -0
  213. package/src/client/components/workspace/git-panel/index.tsx +20 -1
  214. package/src/client/components/workspace/repo-picker/index.test.tsx +20 -0
  215. package/src/client/components/workspace/repo-picker/index.tsx +5 -6
  216. package/src/client/data/settings/omp-schema.json +134 -8
  217. package/src/client/hooks/chat/context/mcp.ts +19 -1
  218. package/src/client/hooks/chat/timeline/jump-rail.ts +1 -0
  219. package/src/client/hooks/chat/timeline/row-window.test.ts +38 -3
  220. package/src/client/hooks/chat/timeline/row-window.ts +33 -9
  221. package/src/client/hooks/chat/timeline/scroll-geometry.ts +19 -1
  222. package/src/client/hooks/chat/timeline/scroll.ts +15 -0
  223. package/src/client/hooks/chat/timeline/thinking-open.ts +10 -4
  224. package/src/client/hooks/workspace/commit-box.test.ts +62 -1
  225. package/src/client/hooks/workspace/commit-box.ts +94 -2
  226. package/src/client/hooks/workspace/git-panel-data.ts +15 -7
  227. package/src/client/hooks/workspace/repo-scope/index.test.ts +10 -3
  228. package/src/client/hooks/workspace/repo-scope/index.ts +21 -9
  229. package/src/client/lib/plugins/repo-scope-service.ts +7 -25
  230. package/src/server/lib/chat/session-store.server.ts +22 -1
  231. package/src/server/lib/fs/git-commit-context.test.ts +111 -0
  232. package/src/server/lib/fs/git-commit-context.ts +85 -0
  233. package/src/server/lib/fs/git-commit-message.server.ts +251 -0
  234. package/src/server/lib/fs/git-commit-message.test.ts +211 -0
  235. package/src/server/lib/fs/git-commit-prompt.test.ts +69 -0
  236. package/src/server/lib/fs/git-commit-prompt.ts +57 -0
  237. package/src/server/lib/fs/git-commit-settings.server.ts +42 -0
  238. package/src/server/lib/fs/git-identity.server.test.ts +129 -0
  239. package/src/server/lib/fs/git-identity.server.ts +130 -0
  240. package/src/server/lib/harness/acp/acp-audit.server.ts +13 -62
  241. package/src/server/lib/harness/acp/acp-frames.server.test.ts +105 -0
  242. package/src/server/lib/harness/acp/acp-frames.server.ts +217 -0
  243. package/src/server/lib/harness/acp/acp-raw-messages.server.test.ts +69 -0
  244. package/src/server/lib/harness/acp/acp-raw-messages.server.ts +129 -0
  245. package/src/server/lib/harness/acp/acp-telemetry.server.ts +19 -0
  246. package/src/server/lib/harness/acp/one-shot.server.ts +141 -0
  247. package/src/server/lib/harness/acp/raw-listeners.ts +30 -0
  248. package/src/server/lib/harness/acp/session-handshake.ts +11 -3
  249. package/src/server/lib/harness/acp/session.test-util.ts +2 -0
  250. package/src/server/lib/harness/acp/session.ts +8 -0
  251. package/src/server/lib/harness/capabilities.ts +11 -0
  252. package/src/server/lib/harness/launch-table.ts +19 -0
  253. package/src/server/lib/harness/launch.ts +4 -0
  254. package/src/server/lib/harness/schema.server.ts +23 -0
  255. package/src/server/lib/harness/spawn.server.ts +18 -2
  256. package/src/server/lib/mcp/agent-config.server.test.ts +111 -0
  257. package/src/server/lib/mcp/agent-config.server.ts +205 -0
  258. package/src/server/lib/mcp/probe.server.ts +7 -1
  259. package/src/server/lib/mcp/registry.server.ts +4 -3
  260. package/src/server/lib/mcp/secrets.server.test.ts +85 -0
  261. package/src/server/lib/mcp/secrets.server.ts +108 -0
  262. package/src/server/lib/omp/core/print.server.ts +100 -0
  263. package/src/server/lib/omp/rpc/frame-fold.ts +4 -0
  264. package/src/server/lib/omp/session/artifacts.server.test.ts +15 -5
  265. package/src/server/lib/omp/session/artifacts.server.ts +41 -26
  266. package/src/server/lib/omp/session/delete.server.ts +2 -0
  267. package/src/server/lib/omp/session/goal-auditor.server.ts +10 -48
  268. package/src/server/lib/omp/session/scan.ts +15 -2
  269. package/src/server/lib/omp/session/session-discovery.test.ts +21 -0
  270. package/src/server/lib/realtime/topics/session-data.server.ts +6 -14
  271. package/src/server/routes/fs/git-message.test.ts +101 -0
  272. package/src/server/routes/fs/git-message.ts +60 -0
  273. package/src/server/routes/fs/index.ts +2 -0
  274. package/src/server/routes/omp/artifact.ts +4 -3
  275. package/src/server/routes/sessions/mcp.test.ts +65 -1
  276. package/src/server/routes/sessions/mcp.ts +77 -5
  277. package/src/server/routes/settings/git-identity.test.ts +77 -0
  278. package/src/server/routes/settings/git-identity.ts +47 -0
  279. package/src/server/routes/settings/index.ts +2 -0
  280. package/src/server/routes/telemetry/acp-telemetry.test.ts +149 -0
  281. package/src/server/routes/telemetry/context.ts +31 -0
  282. package/src/server/routes/telemetry/raw-messages.ts +34 -0
  283. package/src/shared/lib/chat/timeline/tool-render-mode.ts +3 -3
  284. package/src/shared/lib/chat/tool/artifact.test.ts +4 -2
  285. package/src/shared/lib/chat/tool/artifact.ts +6 -1
  286. package/src/shared/lib/chat/tool/proc-facts.ts +2 -1
  287. package/src/shared/lib/fs/paths.test.ts +2 -0
  288. package/src/shared/lib/fs/repo-label.test.ts +22 -1
  289. package/src/shared/lib/fs/repo-label.ts +29 -0
  290. package/src/shared/lib/git/commit-prompt.test.ts +47 -0
  291. package/src/shared/lib/git/commit-prompt.ts +72 -0
  292. package/src/shared/lib/git/identity.test.ts +46 -0
  293. package/src/shared/lib/git/identity.ts +70 -0
  294. package/src/shared/lib/harness/brand-color.ts +3 -0
  295. package/src/shared/lib/harness/catalog.test.ts +14 -0
  296. package/src/shared/lib/harness/catalog.ts +9 -1
  297. package/src/shared/lib/harness/mcp-facts.ts +4 -0
  298. package/src/shared/lib/harness/provider-facts.test.ts +11 -0
  299. package/src/shared/lib/harness/provider-facts.ts +14 -0
  300. package/src/shared/lib/harness/providers.ts +2 -2
  301. package/src/shared/lib/harness/updates.test.ts +8 -0
  302. package/src/shared/lib/harness/updates.ts +9 -0
  303. package/src/shared/lib/omp/session/operator-title.test.ts +21 -0
  304. package/src/shared/lib/omp/session/operator-title.ts +28 -0
  305. package/src/shared/lib/omp/session/proc-daemon.ts +124 -0
  306. package/src/shared/lib/omp/session/proc.test.ts +30 -3
  307. package/src/shared/lib/omp/session/proc.ts +6 -82
  308. package/src/shared/lib/omp/session/wait-idle.test.ts +15 -4
  309. package/src/shared/lib/omp/session/wait-idle.ts +11 -4
  310. package/src/shared/lib/settings/defaults.ts +5 -0
  311. package/src/shared/lib/workspace/new-workspace.ts +20 -0
  312. package/src/shared/types/settings/mcp.ts +2 -2
  313. package/src/shared/types/settings/state.ts +16 -0
  314. package/src/test-support/preload.ts +1 -0
  315. package/dist/client/static/js/ImageView-ve9hc519.js +0 -1
  316. package/dist/client/static/js/LayoutWrapper-5mqffvkc.js +0 -2
  317. package/dist/client/static/js/Modal-50whypff.js +0 -38
  318. package/dist/client/static/js/SessionsView-7719nvy0.js +0 -1
  319. package/dist/client/static/js/architecture-7GRP2DOG-cagtcfhk.js +0 -1
  320. package/dist/client/static/js/bash-fjzhxy10.js +0 -1
  321. package/dist/client/static/js/c-wqtyezvw.js +0 -1
  322. package/dist/client/static/js/cpp-y0nzwner.js +0 -1
  323. package/dist/client/static/js/css-n2waj098.js +0 -1
  324. package/dist/client/static/js/cynefin-OW5HDTMX-6g2ydrss.js +0 -1
  325. package/dist/client/static/js/eventmodeling-NTZA5JFV-b774qbn2.js +0 -1
  326. package/dist/client/static/js/flowDiagram-KWPJA3E3-evp84v09.js +0 -1
  327. package/dist/client/static/js/gitGraph-4MIJSDKK-b047d6vk.js +0 -1
  328. package/dist/client/static/js/graphql-gvb7e2eb.js +0 -1
  329. package/dist/client/static/js/html-tbz83eke.js +0 -1
  330. package/dist/client/static/js/index-001vebsp.js +0 -2
  331. package/dist/client/static/js/index-5599dngt.js +0 -1
  332. package/dist/client/static/js/index-5asf5625.js +0 -4
  333. package/dist/client/static/js/index-cqaz1281.js +0 -2
  334. package/dist/client/static/js/index-f4vr1c6e.css +0 -1
  335. package/dist/client/static/js/index-rt6ac0kk.js +0 -478
  336. package/dist/client/static/js/index-y1p3bdsw.js +0 -9
  337. package/dist/client/static/js/info-A6RAGUB7-n495k952.js +0 -1
  338. package/dist/client/static/js/ini-2gvjwh83.js +0 -1
  339. package/dist/client/static/js/java-1xwcq79s.js +0 -1
  340. package/dist/client/static/js/json-4pqjabgq.js +0 -1
  341. package/dist/client/static/js/jsx-wcsss15s.js +0 -1
  342. package/dist/client/static/js/lua-h7vjcn0h.js +0 -1
  343. package/dist/client/static/js/markdown-f30jjjh9.js +0 -1
  344. package/dist/client/static/js/one-dark-pro-r0tswz8r.js +0 -1
  345. package/dist/client/static/js/one-light-xzcfrptf.js +0 -1
  346. package/dist/client/static/js/packet-AYTQ26CC-zajj62z6.js +0 -1
  347. package/dist/client/static/js/pie-WAS4IAKB-1ve78y5f.js +0 -1
  348. package/dist/client/static/js/properties-ymexza6q.js +0 -1
  349. package/dist/client/static/js/python-31ycwa66.js +0 -1
  350. package/dist/client/static/js/r-t2nne4xp.js +0 -1
  351. package/dist/client/static/js/radar-RG4KPBEZ-8rqadb58.js +0 -1
  352. package/dist/client/static/js/railroad-74A4TZTK-v6ppm8dy.js +0 -1
  353. package/dist/client/static/js/railroad-abnf-HS5TGJTU-9j6bae14.js +0 -1
  354. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-56cpyt0g.js +0 -1
  355. package/dist/client/static/js/railroad-peg-WCYAUIDC-yfdmspf4.js +0 -1
  356. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-f4sx355z.js +0 -8
  357. package/dist/client/static/js/treeView-Q6P3EWNA-vwpg3wp8.js +0 -1
  358. package/dist/client/static/js/treemap-WGGIJYW6-htfxwd32.js +0 -1
  359. package/dist/client/static/js/typescript-p3syh43m.js +0 -1
  360. package/dist/client/static/js/wardley-WFR3VGLG-hapfjkzq.js +0 -1
  361. package/dist/client/static/js/xml-4enq788a.js +0 -1
  362. package/dist/client/static/js/yaml-pjtt3jsc.js +0 -1
@@ -21,6 +21,7 @@ import { memo } from 'preact/compat';
21
21
  import { ChevronDown } from 'lucide-preact';
22
22
  import { ToolBody } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/ToolBody';
23
23
  import { ToolFactChips } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/ToolFactChips';
24
+ import { ToolRowActions } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/ToolRowActions';
24
25
  import { toolStatusGlyph, STATUS_TONE_CLASS } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/status-glyph';
25
26
  import { useToolView } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/tool-view';
26
27
  import { toolToggleLabel } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/toggle-label';
@@ -39,45 +40,48 @@ export const CompactRow = memo(function CompactRow({ tool, isOpen, onToggle, def
39
40
 
40
41
  return (
41
42
  <div className="group" data-tool-row="compact">
42
- <button
43
- type="button"
44
- onClick={handleToggle}
45
- disabled={!view.hasBody || view.alwaysExpanded}
46
- aria-expanded={isExpanded}
47
- aria-label={view.hasBody && !view.alwaysExpanded ? toolToggleLabel(view.header.title, view.subtitle, isExpanded) : undefined}
48
- className={`flex w-full flex-wrap items-center gap-x-2 gap-y-0.5 rounded-md px-1.5 py-1 text-left transition-colors ${
49
- view.hasBody && !view.alwaysExpanded ? 'cursor-pointer hover:bg-ink/[0.03]' : 'cursor-default'
50
- } focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink/20`}
51
- >
52
- <span className={`shrink-0 ${STATUS_TONE_CLASS[status.tone]}`} aria-hidden="true">
53
- {status.glyph}
54
- </span>
55
- <span className="sr-only">{status.word}</span>
56
- <span className="shrink-0 text-ink/45" aria-hidden="true">
57
- {view.icon}
58
- </span>
59
- <span className="shrink-0 truncate text-[12px] font-semibold tracking-tight text-ink">
60
- {view.header.title}
61
- </span>
62
- {/* The subject and the facts share ONE clipping row, the way the card's
63
- meta line does. Without the clip a long `+43 −16` chip pair widened
64
- the section past the phone viewport: measured at 390, the section's
65
- scrollWidth ran to 439 against a 362 client width. */}
66
- <span className="flex min-w-0 flex-1 items-center gap-2 overflow-hidden">
67
- <span className="min-w-0 flex-1 truncate font-mono text-[10.5px] text-ink/45">{view.subtitle}</span>
68
- {view.summary && view.summary.facts.length > 0 && (
69
- <span className="shrink-0">
70
- <ToolFactChips facts={view.summary.facts} max={2} />
71
- </span>
43
+ <div className="flex items-center gap-1">
44
+ <button
45
+ type="button"
46
+ onClick={handleToggle}
47
+ disabled={!view.hasBody || view.alwaysExpanded}
48
+ aria-expanded={isExpanded}
49
+ aria-label={view.hasBody && !view.alwaysExpanded ? toolToggleLabel(view.header.title, view.subtitle, isExpanded) : undefined}
50
+ className={`flex min-w-0 flex-1 flex-wrap items-center gap-x-2 gap-y-0.5 rounded-md px-1.5 py-1 text-left transition-colors ${
51
+ view.hasBody && !view.alwaysExpanded ? 'cursor-pointer hover:bg-ink/[0.03]' : 'cursor-default'
52
+ } focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink/20`}
53
+ >
54
+ <span className={`shrink-0 ${STATUS_TONE_CLASS[status.tone]}`} aria-hidden="true">
55
+ {status.glyph}
56
+ </span>
57
+ <span className="sr-only">{status.word}</span>
58
+ <span className="shrink-0 text-ink/45" aria-hidden="true">
59
+ {view.icon}
60
+ </span>
61
+ <span className="shrink-0 truncate text-[12px] font-semibold tracking-tight text-ink">
62
+ {view.header.title}
63
+ </span>
64
+ {/* The subject and the facts share ONE clipping row, the way the card's
65
+ meta line does. Without the clip a long `+43 −16` chip pair widened
66
+ the section past the phone viewport: measured at 390, the section's
67
+ scrollWidth ran to 439 against a 362 client width. */}
68
+ <span className="flex min-w-0 flex-1 items-center gap-2 overflow-hidden">
69
+ <span className="min-w-0 flex-1 truncate font-mono text-[10.5px] text-ink/45">{view.subtitle}</span>
70
+ {view.summary && view.summary.facts.length > 0 && (
71
+ <span className="shrink-0">
72
+ <ToolFactChips facts={view.summary.facts} max={2} />
73
+ </span>
74
+ )}
75
+ </span>
76
+ {view.hasBody && !view.alwaysExpanded && (
77
+ <ChevronDown
78
+ size={13}
79
+ className={`shrink-0 text-ink/30 transition-transform duration-200 ${isExpanded ? 'rotate-180' : ''}`}
80
+ />
72
81
  )}
73
- </span>
74
- {view.hasBody && !view.alwaysExpanded && (
75
- <ChevronDown
76
- size={13}
77
- className={`shrink-0 text-ink/30 transition-transform duration-200 ${isExpanded ? 'rotate-180' : ''}`}
78
- />
79
- )}
80
- </button>
82
+ </button>
83
+ <ToolRowActions tool={tool} isReminder={view.isReminder} />
84
+ </div>
81
85
 
82
86
  {isExpanded && view.hasBody && (
83
87
  <div className="ml-5 mt-0.5 overflow-hidden border-l border-dashed border-ink/15 py-2 pl-3 space-y-3 code-surface">
@@ -17,6 +17,7 @@
17
17
  import { useCallback, useState } from 'preact/hooks';
18
18
  import { memo } from 'preact/compat';
19
19
  import { ToolBody } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/ToolBody';
20
+ import { ToolRowActions } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/ToolRowActions';
20
21
  import { toolStatusGlyph, STATUS_TONE_CLASS } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/status-glyph';
21
22
  import { useToolView } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/tool-view';
22
23
  import { toolToggleLabel } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/toggle-label';
@@ -40,27 +41,30 @@ export const MinimalRow = memo(function MinimalRow({ tool, isOpen, onToggle, def
40
41
 
41
42
  return (
42
43
  <div className="px-1" data-tool-row="minimal">
43
- <button
44
- type="button"
45
- onClick={handleToggle}
46
- disabled={!view.hasBody || view.alwaysExpanded}
47
- aria-expanded={isExpanded}
48
- aria-label={view.hasBody && !view.alwaysExpanded ? toolToggleLabel(view.header.title, view.subtitle, isExpanded) : undefined}
49
- className={`flex w-full items-baseline gap-1.5 rounded py-0.5 text-left text-[11.5px] transition-colors ${
50
- view.hasBody && !view.alwaysExpanded ? 'cursor-pointer hover:bg-ink/[0.03]' : 'cursor-default'
51
- } focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink/20`}
52
- >
53
- <span className={`shrink-0 self-center ${toneClass}`} aria-hidden="true">
54
- {status.glyph}
55
- </span>
56
- <span className="sr-only">{status.word}</span>
57
- <span className="shrink-0 font-medium text-ink/70">{view.header.title}</span>
58
- {(view.subtitle || factsLine) && <span className="text-ink/25">·</span>}
59
- <span className="min-w-0 truncate font-mono text-ink/45">
60
- {view.subtitle}
61
- {factsLine}
62
- </span>
63
- </button>
44
+ <div className="flex items-center gap-1">
45
+ <button
46
+ type="button"
47
+ onClick={handleToggle}
48
+ disabled={!view.hasBody || view.alwaysExpanded}
49
+ aria-expanded={isExpanded}
50
+ aria-label={view.hasBody && !view.alwaysExpanded ? toolToggleLabel(view.header.title, view.subtitle, isExpanded) : undefined}
51
+ className={`flex min-w-0 flex-1 items-baseline gap-1.5 rounded py-0.5 text-left text-[11.5px] transition-colors ${
52
+ view.hasBody && !view.alwaysExpanded ? 'cursor-pointer hover:bg-ink/[0.03]' : 'cursor-default'
53
+ } focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink/20`}
54
+ >
55
+ <span className={`shrink-0 self-center ${toneClass}`} aria-hidden="true">
56
+ {status.glyph}
57
+ </span>
58
+ <span className="sr-only">{status.word}</span>
59
+ <span className="shrink-0 font-medium text-ink/70">{view.header.title}</span>
60
+ {(view.subtitle || factsLine) && <span className="text-ink/25">·</span>}
61
+ <span className="min-w-0 truncate font-mono text-ink/45">
62
+ {view.subtitle}
63
+ {factsLine}
64
+ </span>
65
+ </button>
66
+ <ToolRowActions tool={tool} isReminder={view.isReminder} />
67
+ </div>
64
68
 
65
69
  {isExpanded && view.hasBody && (
66
70
  <div className="my-1.5 overflow-hidden rounded-md border border-dashed border-ink/15 px-3 py-2.5 space-y-3 code-surface">
@@ -19,6 +19,7 @@ import { useCallback, useState } from 'preact/hooks';
19
19
  import { memo } from 'preact/compat';
20
20
  import { ToolBody } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/ToolBody';
21
21
  import { ToolFactChips } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/ToolFactChips';
22
+ import { ToolRowActions } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/ToolRowActions';
22
23
  import { toolStatusGlyph, STATUS_TONE_CLASS } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/status-glyph';
23
24
  import { useToolView } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/tool-view';
24
25
  import { toolToggleLabel } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/toggle-label';
@@ -38,41 +39,52 @@ export const TraceRow = memo(function TraceRow({ tool, isOpen, onToggle, default
38
39
  return (
39
40
  <div className="relative pl-4" data-tool-row="trace">
40
41
  {/* The node, drawn ON the section's rail. `-left-px` centres it on the
41
- 1px line the section owns. */}
42
+ 1px line the section owns. `warn` (an aborted call) gets its own
43
+ tone: falling through to the muted node made an interruption look
44
+ like a running or skipped call. */}
42
45
  <span
43
46
  aria-hidden="true"
44
47
  className={`absolute left-0 top-[9px] flex h-2 w-2 items-center justify-center rounded-full ${
45
- status.tone === 'error' ? 'bg-error' : status.tone === 'ok' ? 'bg-ink/45' : 'bg-ink/20'
48
+ status.tone === 'error'
49
+ ? 'bg-error'
50
+ : status.tone === 'warn'
51
+ ? 'bg-warning'
52
+ : status.tone === 'ok'
53
+ ? 'bg-ink/45'
54
+ : 'bg-ink/20'
46
55
  }`}
47
56
  />
48
57
 
49
- <button
50
- type="button"
51
- onClick={handleToggle}
52
- disabled={!view.hasBody || view.alwaysExpanded}
53
- aria-expanded={isExpanded}
54
- aria-label={view.hasBody && !view.alwaysExpanded ? toolToggleLabel(view.header.title, view.subtitle, isExpanded) : undefined}
55
- className={`flex w-full flex-wrap items-baseline gap-x-2 gap-y-0.5 rounded-md px-1.5 py-1 text-left transition-colors ${
56
- view.hasBody && !view.alwaysExpanded ? 'cursor-pointer hover:bg-ink/[0.03]' : 'cursor-default'
57
- } focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink/20`}
58
- >
59
- <span className={`shrink-0 self-center ${STATUS_TONE_CLASS[status.tone]}`} aria-hidden="true">
60
- {status.glyph}
61
- </span>
62
- <span className="sr-only">{status.word}</span>
63
- <span className="shrink-0 text-[12px] font-semibold tracking-tight text-ink">{view.header.title}</span>
64
- {/* Subject + facts in ONE clipping row, the way the card's meta line
65
- draws it: without the clip a long chip pair widened the section past
66
- the phone viewport (measured at 390: 455 scrollWidth against 362). */}
67
- <span className="flex min-w-0 flex-1 items-center gap-2 overflow-hidden">
68
- <span className="min-w-0 flex-1 truncate font-mono text-[10.5px] text-ink/45">{view.subtitle}</span>
69
- {view.summary && view.summary.facts.length > 0 && (
70
- <span className="shrink-0">
71
- <ToolFactChips facts={view.summary.facts} max={2} />
72
- </span>
73
- )}
74
- </span>
75
- </button>
58
+ <div className="flex items-center gap-1">
59
+ <button
60
+ type="button"
61
+ onClick={handleToggle}
62
+ disabled={!view.hasBody || view.alwaysExpanded}
63
+ aria-expanded={isExpanded}
64
+ aria-label={view.hasBody && !view.alwaysExpanded ? toolToggleLabel(view.header.title, view.subtitle, isExpanded) : undefined}
65
+ className={`flex min-w-0 flex-1 flex-wrap items-baseline gap-x-2 gap-y-0.5 rounded-md px-1.5 py-1 text-left transition-colors ${
66
+ view.hasBody && !view.alwaysExpanded ? 'cursor-pointer hover:bg-ink/[0.03]' : 'cursor-default'
67
+ } focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink/20`}
68
+ >
69
+ <span className={`shrink-0 self-center ${STATUS_TONE_CLASS[status.tone]}`} aria-hidden="true">
70
+ {status.glyph}
71
+ </span>
72
+ <span className="sr-only">{status.word}</span>
73
+ <span className="shrink-0 text-[12px] font-semibold tracking-tight text-ink">{view.header.title}</span>
74
+ {/* Subject + facts in ONE clipping row, the way the card's meta line
75
+ draws it: without the clip a long chip pair widened the section past
76
+ the phone viewport (measured at 390: 455 scrollWidth against 362). */}
77
+ <span className="flex min-w-0 flex-1 items-center gap-2 overflow-hidden">
78
+ <span className="min-w-0 flex-1 truncate font-mono text-[10.5px] text-ink/45">{view.subtitle}</span>
79
+ {view.summary && view.summary.facts.length > 0 && (
80
+ <span className="shrink-0">
81
+ <ToolFactChips facts={view.summary.facts} max={2} />
82
+ </span>
83
+ )}
84
+ </span>
85
+ </button>
86
+ <ToolRowActions tool={tool} isReminder={view.isReminder} />
87
+ </div>
76
88
 
77
89
  {isExpanded && view.hasBody && (
78
90
  <div className="mb-1 ml-[3.5px] overflow-hidden border-l border-ink/10 py-2 pl-3 space-y-3 code-surface">
@@ -34,6 +34,7 @@ import { useCallback, useState } from 'preact/hooks';
34
34
  import { memo } from 'preact/compat';
35
35
  import type { ToolCallData } from '@/shared/types';
36
36
  import { ToolBody } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/ToolBody';
37
+ import { ToolRowActions } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/ToolRowActions';
37
38
  import {
38
39
  toolStatusGlyph,
39
40
  type ToolStatusTone,
@@ -134,50 +135,53 @@ export const TuiRow = memo(function TuiRow({ tool, isOpen, onToggle, defaultExpa
134
135
  only — the colours separate the three claims (what ran, on what, how
135
136
  it ended), which is what the terminal does with SGR and what a box
136
137
  would otherwise have to do with borders. */}
137
- <button
138
- type="button"
139
- onClick={handleToggle}
140
- disabled={!canToggle}
141
- aria-expanded={isExpanded}
142
- aria-label={
143
- canToggle ? toolToggleLabel(view.header.title, view.subtitle, isExpanded) : undefined
144
- }
145
- className={`flex w-full flex-wrap items-baseline gap-x-1 gap-y-0 rounded px-1 py-0.5 text-left text-[11.5px] leading-[1.55] transition-colors ${
146
- canToggle ? 'cursor-pointer hover:bg-ink/[0.03]' : 'cursor-default'
147
- } focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink/20`}
148
- >
149
- <span className={`shrink-0 self-center ${tone}`} aria-hidden="true">
150
- {status.glyph}
151
- </span>
152
- <span className="sr-only">{status.word}</span>
153
- <span className="shrink-0 font-semibold text-info">{view.header.title}</span>
154
- {view.subtitle && (
155
- <>
156
- <span className="shrink-0 text-ink/25">:</span>
157
- <span className="min-w-0 flex-1 truncate text-meta">{view.subtitle}</span>
158
- </>
159
- )}
160
- <span className={`shrink-0 font-semibold ${tone}`}>{`[${status.word.toLowerCase()}]`}</span>
161
- {facts.length > 0 && (
162
- // Facts are the LAST thing on the line and they clip as a unit, so a
163
- // long `exit 1 · 412 B` can never widen the row past the panel —
164
- // measured at 390 the unbounded group ran the section to 459/362.
165
- // The whole group carries the tooltip with every fact, so a clipped
166
- // tail is still recoverable.
167
- <span
168
- className="min-w-0 shrink truncate text-[10.5px]"
169
- title={facts.map((fact) => fact.label).join(' · ')}
170
- >
171
- <span className="text-ink/25">· </span>
172
- <Facts facts={facts} max={HEAD_FACT_LIMIT} />
173
- </span>
174
- )}
175
- {canToggle && (
176
- <span className="ml-auto shrink-0 pl-1 text-ink/40" aria-hidden="true">
177
- {isExpanded ? '▾' : '▸'}
138
+ <div className="flex items-center gap-1">
139
+ <button
140
+ type="button"
141
+ onClick={handleToggle}
142
+ disabled={!canToggle}
143
+ aria-expanded={isExpanded}
144
+ aria-label={
145
+ canToggle ? toolToggleLabel(view.header.title, view.subtitle, isExpanded) : undefined
146
+ }
147
+ className={`flex min-w-0 flex-1 flex-wrap items-baseline gap-x-1 gap-y-0 rounded px-1 py-0.5 text-left text-[11.5px] leading-[1.55] transition-colors ${
148
+ canToggle ? 'cursor-pointer hover:bg-ink/[0.03]' : 'cursor-default'
149
+ } focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink/20`}
150
+ >
151
+ <span className={`shrink-0 self-center ${tone}`} aria-hidden="true">
152
+ {status.glyph}
178
153
  </span>
179
- )}
180
- </button>
154
+ <span className="sr-only">{status.word}</span>
155
+ <span className="shrink-0 font-semibold text-info">{view.header.title}</span>
156
+ {view.subtitle && (
157
+ <>
158
+ <span className="shrink-0 text-ink/25">:</span>
159
+ <span className="min-w-0 flex-1 truncate text-meta">{view.subtitle}</span>
160
+ </>
161
+ )}
162
+ <span className={`shrink-0 font-semibold ${tone}`}>{`[${status.word.toLowerCase()}]`}</span>
163
+ {facts.length > 0 && (
164
+ // Facts are the LAST thing on the line and they clip as a unit, so a
165
+ // long `exit 1 · 412 B` can never widen the row past the panel —
166
+ // measured at 390 the unbounded group ran the section to 459/362.
167
+ // The whole group carries the tooltip with every fact, so a clipped
168
+ // tail is still recoverable.
169
+ <span
170
+ className="min-w-0 shrink truncate text-[10.5px]"
171
+ title={facts.map((fact) => fact.label).join(' · ')}
172
+ >
173
+ <span className="text-ink/25">· </span>
174
+ <Facts facts={facts} max={HEAD_FACT_LIMIT} />
175
+ </span>
176
+ )}
177
+ {canToggle && (
178
+ <span className="ml-auto shrink-0 pl-1 text-ink/40" aria-hidden="true">
179
+ {isExpanded ? '▾' : '▸'}
180
+ </span>
181
+ )}
182
+ </button>
183
+ <ToolRowActions tool={tool} isReminder={view.isReminder} />
184
+ </div>
181
185
 
182
186
  {isExpanded && view.hasBody && (
183
187
  // Indentation, not a frame: the body hangs off the line the way a
@@ -0,0 +1,136 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * What every render style must show, whichever frame it draws.
8
+ *
9
+ * A style is a frame, not a capability: the card, the status line, the rail
10
+ * node and the terminal line all render the same call. Three facts used to be
11
+ * card-only, and each one was a silent loss in the other four styles:
12
+ *
13
+ * - a tool with no specialized panel (a custom or plugin tool) had no body at
14
+ * all, because the line styles gated the body on a panel while the card
15
+ * always rendered the generic Input / Diff / Output;
16
+ * - a result omp capped or rewrote had no "Full output" chip, so the truncated
17
+ * copy on screen was the only copy the reader could reach;
18
+ * - a reminder envelope in the result read as an ordinary success.
19
+ *
20
+ * The trace node's `warn` tone is pinned here too: an aborted call used to fall
21
+ * through to the muted node, indistinguishable from a running or skipped one.
22
+ */
23
+
24
+ import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, test } from 'bun:test';
25
+ import { Window } from 'happy-dom';
26
+ import { h, render } from 'preact';
27
+ import { act } from 'preact/test-utils';
28
+ import { ToolCallingSection } from '@/client/components/workspace/chat-timeline/ToolCallingSection';
29
+ import { SessionStateProvider } from '@/client/components/common/session-state-provider';
30
+ import { primeKabmoSettings } from '@/shared/lib/settings/client';
31
+ import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
32
+ import type { ToolCallData } from '@/shared/types/chat';
33
+
34
+ let container: HTMLElement;
35
+
36
+ beforeAll(() => installDomGlobals(new Window({ url: 'http://localhost/?sessionId=parity' })));
37
+ afterAll(() => restoreDomGlobals());
38
+
39
+ beforeEach(() => {
40
+ container = document.createElement('div');
41
+ document.body.appendChild(container);
42
+ });
43
+
44
+ afterEach(() => {
45
+ render(null, container);
46
+ container.remove();
47
+ });
48
+
49
+ /** A tool the host has no panel for — the generic body is its only body. */
50
+ const CUSTOM_TOOL: ToolCallData = {
51
+ id: 'custom-1',
52
+ type: 'custom',
53
+ name: 'web_fetch',
54
+ title: 'Web Fetch',
55
+ status: 'success',
56
+ input: { url: 'https://example.com' },
57
+ output: 'CUSTOM_OUTPUT_TOKEN',
58
+ } as ToolCallData;
59
+
60
+ /** A result omp capped, with the lossless original behind an artifact id. */
61
+ const ARTIFACT_TOOL: ToolCallData = {
62
+ id: 'artifact-1',
63
+ type: 'bash',
64
+ name: 'bash',
65
+ title: 'Bash',
66
+ status: 'success',
67
+ command: 'seq 1 100000',
68
+ output: 'truncated',
69
+ details: { meta: { limits: { columnTruncated: { artifactId: '42', artifactElidedBytes: 1024 } } } },
70
+ } as ToolCallData;
71
+
72
+ /** The runtime interrupting the call, not its outcome. */
73
+ const REMINDER_TOOL: ToolCallData = {
74
+ id: 'reminder-1',
75
+ type: 'bash',
76
+ name: 'bash',
77
+ title: 'Bash',
78
+ status: 'success',
79
+ command: 'bun test',
80
+ output: '<system-reminder>Every turn MUST end with a tool call.</system-reminder>',
81
+ } as ToolCallData;
82
+
83
+ const ABORTED_TOOL: ToolCallData = {
84
+ id: 'aborted-1',
85
+ type: 'bash',
86
+ name: 'bash',
87
+ title: 'Bash',
88
+ status: 'aborted',
89
+ command: 'bun test',
90
+ output: '',
91
+ } as ToolCallData;
92
+
93
+ async function mount(tools: ToolCallData[], style: string): Promise<HTMLElement> {
94
+ primeKabmoSettings({ kabmo_settings: { toolRenderStyle: style } });
95
+ await act(async () => {
96
+ render(
97
+ h(SessionStateProvider, {
98
+ sessionId: `parity-${style}`,
99
+ children: h(ToolCallingSection, { tools }),
100
+ }),
101
+ container,
102
+ );
103
+ });
104
+ return container;
105
+ }
106
+
107
+ describe.each(['card', 'compact', 'trace', 'minimal', 'tui'])('style parity: %s', (style) => {
108
+ test('a panel-less tool opens its generic body', async () => {
109
+ const el = await mount([CUSTOM_TOOL], style);
110
+ const toggle = el.querySelector('[data-tool-row] button') as HTMLElement;
111
+ expect(toggle.getAttribute('aria-label')).toBe('Expand WEB Fetch');
112
+
113
+ await act(async () => {
114
+ toggle.click();
115
+ });
116
+ expect(el.querySelector('.code-surface')?.textContent).toContain('CUSTOM_OUTPUT_TOKEN');
117
+ });
118
+
119
+ test('a spilled result offers the full output', async () => {
120
+ const el = await mount([ARTIFACT_TOOL], style);
121
+ expect(el.querySelector('[aria-label="Read the full output"]')).not.toBeNull();
122
+ });
123
+
124
+ test('a reminder envelope is flagged', async () => {
125
+ const el = await mount([REMINDER_TOOL], style);
126
+ expect(el.textContent).toContain('Reminder');
127
+ });
128
+ });
129
+
130
+ describe('the trace node tone', () => {
131
+ test('an aborted call takes the warning tone, not the muted one', async () => {
132
+ const el = await mount([ABORTED_TOOL], 'trace');
133
+ const node = el.querySelector('[data-tool-row="trace"] > span[aria-hidden="true"]') as HTMLElement;
134
+ expect(node.className).toContain('bg-warning');
135
+ });
136
+ });
@@ -0,0 +1,98 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ import { afterAll, afterEach, beforeAll, describe, expect, test } from 'bun:test';
7
+ import { Window } from 'happy-dom';
8
+ import type { h as PreactH, render as PreactRender } from 'preact';
9
+ import type { act as PreactAct } from 'preact/test-utils';
10
+ import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
11
+ import type { GitCommitBox as GitCommitBoxComponent } from '@/client/components/workspace/git-panel/CommitBox';
12
+
13
+ // Preact and the component are imported DYNAMICALLY in `beforeAll`, after
14
+ // `installDomGlobals` has put a window on the global: a static import would
15
+ // evaluate Preact against the runner's windowless global and the render would
16
+ // fail before the first case. Same reason `commit-box.test.ts` does.
17
+ let GitCommitBox: typeof GitCommitBoxComponent;
18
+ let h: typeof PreactH;
19
+ let render: typeof PreactRender;
20
+ let act: typeof PreactAct;
21
+ let container: HTMLElement;
22
+
23
+ beforeAll(async () => {
24
+ installDomGlobals(new Window({ url: 'http://localhost' }));
25
+ ({ GitCommitBox } = await import('@/client/components/workspace/git-panel/CommitBox'));
26
+ ({ h, render } = await import('preact'));
27
+ ({ act } = await import('preact/test-utils'));
28
+ });
29
+
30
+ afterAll(() => {
31
+ restoreDomGlobals();
32
+ });
33
+
34
+ afterEach(() => {
35
+ if (container) render(null, container);
36
+ container?.remove();
37
+ });
38
+
39
+ function mount(props: Partial<Parameters<typeof GitCommitBox>[0]> = {}) {
40
+ const calls = { generate: 0, use: 0, dismiss: 0, commit: 0 };
41
+ container = document.createElement('div');
42
+ document.body.appendChild(container);
43
+ act(() => {
44
+ render(h(GitCommitBox, {
45
+ message: '',
46
+ hasStagedChanges: true,
47
+ onChangeMessage: () => {},
48
+ onCommit: () => { calls.commit += 1; },
49
+ onGenerate: () => { calls.generate += 1; },
50
+ onUseSuggestion: () => { calls.use += 1; },
51
+ onDismissSuggestion: () => { calls.dismiss += 1; },
52
+ ...props,
53
+ }), container);
54
+ });
55
+ return calls;
56
+ }
57
+
58
+ function button(label: string): HTMLButtonElement | undefined {
59
+ return [...container.querySelectorAll('button')]
60
+ .find((entry) => entry.textContent?.includes(label)) as HTMLButtonElement | undefined;
61
+ }
62
+
63
+ describe('GitCommitBox generate action', () => {
64
+ test('is disabled until something is staged', () => {
65
+ mount({ hasStagedChanges: false });
66
+ const generate = button('Generate');
67
+ expect(generate?.disabled).toBe(true);
68
+ expect(generate?.title).toBe('Stage changes first');
69
+ });
70
+
71
+ test('runs the generator when staged changes exist', () => {
72
+ const calls = mount({ hasStagedChanges: true });
73
+ const generate = button('Generate');
74
+ expect(generate?.disabled).toBe(false);
75
+ act(() => generate?.click());
76
+ expect(calls.generate).toBe(1);
77
+ });
78
+
79
+ test('shows the generating state and blocks a second click', () => {
80
+ mount({ isGenerating: true });
81
+ const generate = button('Generating');
82
+ expect(generate?.disabled).toBe(true);
83
+ });
84
+
85
+ test('a suggestion is offered, not written into the draft', () => {
86
+ const calls = mount({ message: 'my own message', suggestion: 'feat: generated' });
87
+ expect(container.textContent).toContain('feat: generated');
88
+ act(() => button('Use')?.click());
89
+ act(() => button('Dismiss')?.click());
90
+ expect(calls.use).toBe(1);
91
+ expect(calls.dismiss).toBe(1);
92
+ });
93
+
94
+ test('marks a draft that came from the generator', () => {
95
+ mount({ message: 'feat: generated', generated: true });
96
+ expect(container.textContent).toContain('Generated from staged changes');
97
+ });
98
+ });