@kabmo-labs/kabmo 0.50.0 → 0.51.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 (370) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +503 -501
  3. package/dist/client/static/js/{Body-pd3nt4xa.js → Body-s3nh6vet.js} +3 -3
  4. package/dist/client/static/js/{CsvGrid-eksmqv8f.js → CsvGrid-j4h6cpnn.js} +2 -2
  5. package/dist/client/static/js/{DocxView-xfx1kt8x.js → DocxView-197x16zq.js} +3 -3
  6. package/dist/client/static/js/{DrawioView-2xyqg9bv.js → DrawioView-v6ps0cm5.js} +2 -2
  7. package/dist/client/static/js/{HtmlPreview-ps3f0aa5.js → HtmlPreview-a2t5zngp.js} +1 -1
  8. package/dist/client/static/js/ImageView-ar7hz7jx.js +1 -0
  9. package/dist/client/static/js/LayoutWrapper-epef152a.js +2 -0
  10. package/dist/client/static/js/MergeDiffView-7rwjvzk5.js +1 -0
  11. package/dist/client/static/js/Modal-9nxt67fm.js +60 -0
  12. package/dist/client/static/js/{PdfView-8fp08jym.js → PdfView-gzhcym20.js} +1 -1
  13. package/dist/client/static/js/SessionsView-3h872gpe.js +1 -0
  14. package/dist/client/static/js/{SheetView-g7mstjdp.js → SheetView-baaynkb4.js} +8 -8
  15. package/dist/client/static/js/{SvgPreview-wsv4h6c6.js → SvgPreview-jzcqwwcc.js} +1 -1
  16. package/dist/client/static/js/{abnfDiagram-O67JEVCF-1kgm1049.js → abnfDiagram-O67JEVCF-grb1sfhr.js} +1 -1
  17. package/dist/client/static/js/architecture-7GRP2DOG-3hkq8grc.js +1 -0
  18. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-mtm210rw.js → architectureDiagram-NJMV4G6O-9084jzwr.js} +5 -5
  19. package/dist/client/static/js/{astro-dszrfwwn.js → astro-m3fcq2sa.js} +1 -1
  20. package/dist/client/static/js/bash-n7wcmq3s.js +1 -0
  21. package/dist/client/static/js/{blockDiagram-BEXU5L5S-s474vn2w.js → blockDiagram-BEXU5L5S-qqcjrg1b.js} +6 -6
  22. package/dist/client/static/js/c-ypdp030b.js +1 -0
  23. package/dist/client/static/js/{c4Diagram-YGBWAQC7-s68v6tc8.js → c4Diagram-YGBWAQC7-gc8fqbpc.js} +2 -2
  24. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-291va3yk.js → classDiagram-v2-NBCMYWYE-pp6060kq.js} +7 -7
  25. package/dist/client/static/js/{cose-bilkent-JH36ORCC-0zg7crdw.js → cose-bilkent-JH36ORCC-744ekavk.js} +1 -1
  26. package/dist/client/static/js/cpp-cxwev3gs.js +1 -0
  27. package/dist/client/static/js/css-6mxcqf8c.js +1 -0
  28. package/dist/client/static/js/css-9gak6bze.js +1 -0
  29. package/dist/client/static/js/cynefin-OW5HDTMX-9m18e6m5.js +1 -0
  30. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-4gnmn3yc.js → cynefinDiagram-VND7K2PF-57dja6g9.js} +1 -1
  31. package/dist/client/static/js/{dagre-6A5THRUB-nxmj6bkg.js → dagre-6A5THRUB-de4xrbrw.js} +2 -2
  32. package/dist/client/static/js/{diagram-22UHCM2B-3171dabw.js → diagram-22UHCM2B-ky3ncyv8.js} +18 -18
  33. package/dist/client/static/js/{diagram-3UASUU5V-9h1pd6h8.js → diagram-3UASUU5V-zgg82bz9.js} +2 -2
  34. package/dist/client/static/js/{diagram-ATOU4E4O-ywfrbd6m.js → diagram-ATOU4E4O-r4s13e4n.js} +3 -3
  35. package/dist/client/static/js/{diagram-CDSNMT55-t87b4wbk.js → diagram-CDSNMT55-my21t0kq.js} +5 -5
  36. package/dist/client/static/js/{diagram-MLGK6HIB-bzv52p97.js → diagram-MLGK6HIB-pvt20jtj.js} +2 -2
  37. package/dist/client/static/js/{diagram-MPIPVDR6-8f66rp0a.js → diagram-MPIPVDR6-as9dk4f3.js} +2 -2
  38. package/dist/client/static/js/{dockerfile-z3v0km9v.js → dockerfile-3b5caedj.js} +1 -1
  39. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-3y4w2j6t.js → ebnfDiagram-ZINNZB2B-tj3hkcj4.js} +1 -1
  40. package/dist/client/static/js/{elixir-c701n0qg.js → elixir-7q2k61zb.js} +1 -1
  41. package/dist/client/static/js/{elk-276RUBZZ-d9d23jch.js → elk-276RUBZZ-5e7wczf3.js} +1 -1
  42. package/dist/client/static/js/{erDiagram-OPXOYQCR-w4z3501c.js → erDiagram-OPXOYQCR-5jje7qrh.js} +3 -3
  43. package/dist/client/static/js/{erlang-cpw5s1f9.js → erlang-tjsd7n4d.js} +1 -1
  44. package/dist/client/static/js/eventmodeling-NTZA5JFV-d4egnv9v.js +1 -0
  45. package/dist/client/static/js/flowDiagram-KWPJA3E3-pdeqndnd.js +1 -0
  46. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-7wcxk4bm.js → ganttDiagram-FUAMR5RP-7hresycc.js} +4 -4
  47. package/dist/client/static/js/gitGraph-4MIJSDKK-grqv890n.js +1 -0
  48. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-sdh1hsb1.js → gitGraphDiagram-X574FWY7-8m202jb7.js} +17 -17
  49. package/dist/client/static/js/graphql-6rwdfcnf.js +1 -0
  50. package/dist/client/static/js/html-p76eszt9.js +1 -0
  51. package/dist/client/static/js/{index-zhnfq8br.js → index-0prwdwyb.js} +2 -2
  52. package/dist/client/static/js/{index-tew3rd6t.js → index-0y6tstk8.js} +1 -1
  53. package/dist/client/static/js/{index-1dx4dqzy.js → index-20hj80g4.js} +4 -4
  54. package/dist/client/static/js/index-21421tq7.js +2 -0
  55. package/dist/client/static/js/{index-0q39ajgh.js → index-254387vg.js} +2 -2
  56. package/dist/client/static/js/index-2y4gk5q5.js +2 -0
  57. package/dist/client/static/js/index-3fk8grhz.js +2 -0
  58. package/dist/client/static/js/index-3rrdmk9m.js +2 -0
  59. package/dist/client/static/js/{index-frhxbqhg.js → index-3sz9cztk.js} +1 -1
  60. package/dist/client/static/js/{index-9ydvkxz1.css → index-4m2d73m3.css} +1 -1
  61. package/dist/client/static/js/{index-7xn7gxgw.js → index-4nvcwtvr.js} +2 -2
  62. package/dist/client/static/js/index-4ppap7vb.js +9 -0
  63. package/dist/client/static/js/{index-vgwjn4de.js → index-4tbdws4r.js} +2 -2
  64. package/dist/client/static/js/{index-hqhz4eam.js → index-56hy2hcy.js} +1 -1
  65. package/dist/client/static/js/{index-dgkpbrdr.js → index-60g0e74a.js} +2 -2
  66. package/dist/client/static/js/{index-n54jd3aw.js → index-7ag37ghj.js} +11 -11
  67. package/dist/client/static/js/{index-bggz63br.js → index-7ehcjb3r.js} +7 -7
  68. package/dist/client/static/js/index-899yw6fh.js +2 -0
  69. package/dist/client/static/js/{index-4vaxdt8a.js → index-8pqx5n2p.js} +2 -2
  70. package/dist/client/static/js/{index-971stdh4.js → index-91jm3ywm.js} +2 -2
  71. package/dist/client/static/js/{index-5qwgexg6.js → index-9qf2h9jb.js} +4 -4
  72. package/dist/client/static/js/{index-wbma8kqw.js → index-9rp7h1nv.js} +23 -23
  73. package/dist/client/static/js/index-9rr23e0e.js +2 -0
  74. package/dist/client/static/js/index-9wj4ma9g.js +3 -0
  75. package/dist/client/static/js/{index-e471eprg.js → index-awtk0djy.js} +1 -1
  76. package/dist/client/static/js/{index-1d8v3bvm.js → index-awz6pyd0.js} +2 -2
  77. package/dist/client/static/js/index-cvx1vkrx.js +1 -0
  78. package/dist/client/static/js/{index-09ap9ncj.js → index-cwwg7k5f.js} +46 -46
  79. package/dist/client/static/js/{index-8fk7h2me.js → index-dzatbdws.js} +5 -5
  80. package/dist/client/static/js/{index-1adfks1n.js → index-e6ew77ph.js} +2 -2
  81. package/dist/client/static/js/{index-144aknp3.js → index-ej1va073.js} +2 -2
  82. package/dist/client/static/js/{index-cm8pa783.js → index-er7pj5k6.js} +2 -2
  83. package/dist/client/static/js/index-fm0t4pct.js +4 -0
  84. package/dist/client/static/js/{index-aqqj4xxy.js → index-g5wp6ksw.js} +2 -2
  85. package/dist/client/static/js/{index-ajqmcds5.js → index-gy4mtr2e.js} +2 -2
  86. package/dist/client/static/js/{index-kce86cnw.js → index-j9y4tjk0.js} +2 -2
  87. package/dist/client/static/js/{index-gws4prmg.js → index-kt7c42n7.js} +2 -2
  88. package/dist/client/static/js/index-ktmb341a.js +468 -0
  89. package/dist/client/static/js/{index-56319bht.js → index-m6zncj00.js} +2 -2
  90. package/dist/client/static/js/{index-jxxewcat.js → index-mpyd7qxj.js} +2 -2
  91. package/dist/client/static/js/{index-gcgsjd3c.js → index-ms80nne4.js} +2 -2
  92. package/dist/client/static/js/{index-k66w6d9b.js → index-my856e49.js} +2 -2
  93. package/dist/client/static/js/{index-c2mqr5fh.js → index-nt17ejrm.js} +2 -2
  94. package/dist/client/static/js/{index-zsx5vs3j.js → index-pvv340b4.js} +2 -2
  95. package/dist/client/static/js/{index-svx6rnfs.js → index-pxr36neg.js} +2 -2
  96. package/dist/client/static/js/{index-r2z0a118.js → index-q0k1am0g.js} +2 -2
  97. package/dist/client/static/js/{index-xrn2reb5.js → index-qrpx4sk1.js} +2 -2
  98. package/dist/client/static/js/{index-ajdzvegm.js → index-r2zsw7nw.js} +8 -8
  99. package/dist/client/static/js/{index-xgbcn89g.js → index-rbkvw2xs.js} +2 -2
  100. package/dist/client/static/js/{index-2g1ey1c9.js → index-scmtzcv1.js} +2 -2
  101. package/dist/client/static/js/{index-3rhk4apq.js → index-syvkpnc8.js} +1 -1
  102. package/dist/client/static/js/index-tfqqsj2g.js +1 -0
  103. package/dist/client/static/js/{index-7jdz4jr4.js → index-tj7xr4ta.js} +2 -2
  104. package/dist/client/static/js/{index-1vfej0gk.js → index-wvw70pgd.js} +2 -2
  105. package/dist/client/static/js/{index-qxzyvye9.js → index-wxs0x3g1.js} +2 -2
  106. package/dist/client/static/js/index-x507ndnc.js +314 -0
  107. package/dist/client/static/js/{index-1jx4nt2f.js → index-x87scjpa.js} +1 -1
  108. package/dist/client/static/js/{index-grkacfv3.js → index-xtrsvm0d.js} +2 -2
  109. package/dist/client/static/js/{index-ratbr10x.js → index-y1j18rha.js} +2 -2
  110. package/dist/client/static/js/{index-r6bm9sth.js → index-yv2ervdj.js} +7 -7
  111. package/dist/client/static/js/{index-k3vvk28c.js → index-z2pmt1bc.js} +1 -1
  112. package/dist/client/static/js/{index-ap6hv7s7.js → index-z446edg9.js} +1 -1
  113. package/dist/client/static/js/{index-1ec33b1j.js → index-zkgqa0c2.js} +2 -2
  114. package/dist/client/static/js/index-zwbw177x.js +2 -0
  115. package/dist/client/static/js/info-A6RAGUB7-rzpg7qk1.js +1 -0
  116. package/dist/client/static/js/{infoDiagram-VRGFBTTK-gtdp0z6p.js → infoDiagram-VRGFBTTK-5mb5w005.js} +2 -2
  117. package/dist/client/static/js/ini-kjcpgebh.js +1 -0
  118. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-c05m0sqq.js → ishikawaDiagram-OU5B5YK6-zk7fa0fm.js} +3 -3
  119. package/dist/client/static/js/java-0bcyv1jt.js +1 -0
  120. package/dist/client/static/js/javascript-0mqgcvps.js +1 -0
  121. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-kgk5ygm2.js → journeyDiagram-ZHPQQLJL-8jd7b2aw.js} +5 -5
  122. package/dist/client/static/js/json-mb8k0b1n.js +1 -0
  123. package/dist/client/static/js/jsx-8p6dqgpq.js +1 -0
  124. package/dist/client/static/js/{julia-w13bz4s1.js → julia-nwh5w343.js} +1 -1
  125. package/dist/client/static/js/{kanban-definition-PNTS6WVX-q1w9w68s.js → kanban-definition-PNTS6WVX-yp9rks4k.js} +7 -7
  126. package/dist/client/static/js/lua-nxnqww9z.js +1 -0
  127. package/dist/client/static/js/markdown-8gbyxxjd.js +1 -0
  128. package/dist/client/static/js/{mermaid.core-1rz62j9g.js → mermaid.core-kxsxr8ec.js} +9 -9
  129. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-3m3w6bnb.js → mindmap-definition-NLK3R4M7-anx2kj3b.js} +5 -5
  130. package/dist/client/static/js/one-dark-pro-wyegjr0d.js +1 -0
  131. package/dist/client/static/js/one-light-kp6c3eqh.js +1 -0
  132. package/dist/client/static/js/packet-AYTQ26CC-eac14hsq.js +1 -0
  133. package/dist/client/static/js/{pegDiagram-GJSIUBJH-svd3ex4e.js → pegDiagram-GJSIUBJH-9egqyzkc.js} +1 -1
  134. package/dist/client/static/js/{perl-hcg3hacf.js → perl-wb4wtc9x.js} +1 -1
  135. package/dist/client/static/js/{php-q6hhp84p.js → php-9g594k9f.js} +1 -1
  136. package/dist/client/static/js/pie-WAS4IAKB-a9xqvysf.js +1 -0
  137. package/dist/client/static/js/{pieDiagram-5QR66LMP-2nrkw034.js → pieDiagram-5QR66LMP-f3dvprbm.js} +3 -3
  138. package/dist/client/static/js/properties-d5bwhgwz.js +1 -0
  139. package/dist/client/static/js/python-fdwwjjhh.js +1 -0
  140. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-4895d1aq.js → quadrantDiagram-O4NWA36T-qsghd295.js} +6 -6
  141. package/dist/client/static/js/r-4d2ygtfj.js +1 -0
  142. package/dist/client/static/js/radar-RG4KPBEZ-jv2pm0fe.js +1 -0
  143. package/dist/client/static/js/railroad-74A4TZTK-j74sc0b6.js +1 -0
  144. package/dist/client/static/js/railroad-abnf-HS5TGJTU-eaf19baz.js +1 -0
  145. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-d4j5nq31.js +1 -0
  146. package/dist/client/static/js/railroad-peg-WCYAUIDC-ba862a9p.js +1 -0
  147. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-zj3g9yne.js → railroadDiagram-XR7U4H2S-6vmazht2.js} +1 -1
  148. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-727yjvs8.js → requirementDiagram-PLB6GJNP-phs0wn1v.js} +5 -5
  149. package/dist/client/static/js/{ruby-wzqz8vw6.js → ruby-c4hxsegh.js} +1 -1
  150. package/dist/client/static/js/{rust-r94pgqvf.js → rust-e4whdswc.js} +1 -1
  151. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-17c7p2pe.js → sankeyDiagram-IPEJSGJF-vkktegjk.js} +4 -4
  152. package/dist/client/static/js/{sass-xb3van7h.js → sass-6yxywx7t.js} +1 -1
  153. package/dist/client/static/js/{scss-ddg6t3x4.js → scss-9wz47c6t.js} +1 -1
  154. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-wcmbpckr.js → sequenceDiagram-PO4LG4MO-37e6se72.js} +16 -16
  155. package/dist/client/static/js/{sizeCapture-INFHLROL-nkr57cd6.js → sizeCapture-INFHLROL-3b4nsa4s.js} +1 -1
  156. package/dist/client/static/js/sql-sd00wgem.js +1 -0
  157. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-vd7r8s78.js → stateDiagram-v2-GCMORJYK-2nnyqs9x.js} +3 -3
  158. package/dist/client/static/js/{svelte-wzaxz546.js → svelte-mm3jfpje.js} +1 -1
  159. package/dist/client/static/js/{swimlanes-2SLR337P-zhxm05ak.js → swimlanes-2SLR337P-eezd46ps.js} +1 -1
  160. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-h78096xp.js +8 -0
  161. package/dist/client/static/js/{timeline-definition-EJHVYXUP-n7gbzhzd.js → timeline-definition-EJHVYXUP-pz0f2b4h.js} +6 -6
  162. package/dist/client/static/js/treeView-Q6P3EWNA-e8yb44pd.js +1 -0
  163. package/dist/client/static/js/treemap-WGGIJYW6-zvdv84vp.js +1 -0
  164. package/dist/client/static/js/typescript-5txwpd9t.js +1 -0
  165. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-davsnwkf.js → usecaseDiagram-POWQR4AR-hvg7a87b.js} +29 -29
  166. package/dist/client/static/js/{vennDiagram-UO4OBE2U-gb54bh5k.js → vennDiagram-UO4OBE2U-03zh9phs.js} +8 -8
  167. package/dist/client/static/js/{vue-6zhfw7zx.js → vue-rcdqpz7q.js} +1 -1
  168. package/dist/client/static/js/wardley-WFR3VGLG-hbv0cg4s.js +1 -0
  169. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-sf98cg9t.js → wardleyDiagram-VNRHLVJA-xy77th92.js} +5 -5
  170. package/dist/client/static/js/xml-vtrdnrn6.js +1 -0
  171. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-9nn09k40.js → xychartDiagram-PMCCYNJV-h48448cm.js} +4 -4
  172. package/dist/client/static/js/yaml-6k1tmwtm.js +1 -0
  173. package/package.json +2 -1
  174. package/src/client/components/common/MarkdownRenderer.tsx +31 -34
  175. package/src/client/components/common/ViewportSelector.tsx +4 -0
  176. package/src/client/components/common/command-palette/index.tsx +5 -2
  177. package/src/client/components/common/markdown-inline-file.test.tsx +131 -0
  178. package/src/client/components/common/search-select/OptionList.tsx +164 -0
  179. package/src/client/components/common/search-select/index.tsx +159 -136
  180. package/src/client/components/common/search-select/option.ts +16 -0
  181. package/src/client/components/common/search-select/search-select.test.tsx +61 -2
  182. package/src/client/components/common/sort-menu/index.tsx +9 -4
  183. package/src/client/components/layout/session-sidebar/HarnessFilter.tsx +26 -6
  184. package/src/client/components/layout/session-sidebar/scheduler-modal/ModelFields.tsx +45 -49
  185. package/src/client/components/layout/session-sidebar/scheduler-modal/TaskForm.tsx +31 -25
  186. package/src/client/components/settings/ProjectSelectorDropdown.tsx +40 -101
  187. package/src/client/components/settings/categories/agent-settings/DetailPane.tsx +12 -10
  188. package/src/client/components/settings/categories/command-settings/DetailPane.tsx +12 -10
  189. package/src/client/components/settings/categories/dictation-settings/CaptureSection.tsx +13 -18
  190. package/src/client/components/settings/categories/git-settings/CommitMessageSection.tsx +8 -9
  191. package/src/client/components/settings/categories/keyboard-settings/ComposerKeys.tsx +10 -10
  192. package/src/client/components/settings/categories/mcp-settings/AdvancedSection.tsx +21 -18
  193. package/src/client/components/settings/categories/mcp-settings/DetailPane.tsx +12 -7
  194. package/src/client/components/settings/categories/omp-settings/PresetBar.tsx +11 -11
  195. package/src/client/components/settings/categories/omp-settings/RoleEditor.test.ts +14 -11
  196. package/src/client/components/settings/categories/omp-settings/RowEditor.tsx +17 -16
  197. package/src/client/components/settings/categories/plugin-settings/MarketplacePane.tsx +11 -9
  198. package/src/client/components/settings/categories/plugin-settings/SettingsSection.tsx +10 -9
  199. package/src/client/components/settings/categories/provider-settings/AddModelModal.tsx +10 -8
  200. package/src/client/components/settings/categories/provider-settings/DialectFields.tsx +40 -24
  201. package/src/client/components/settings/categories/provider-settings/EntryAdvanced.tsx +13 -9
  202. package/src/client/components/settings/categories/provider-settings/EntryModal.tsx +22 -17
  203. package/src/client/components/settings/categories/provider-settings/PresetPicker.tsx +79 -50
  204. package/src/client/components/settings/categories/provider-settings/model-dialogs.test.tsx +14 -7
  205. package/src/client/components/settings/categories/voice-settings/SpeechSettings.test.tsx +117 -15
  206. package/src/client/components/settings/categories/voice-settings/SpeechSettings.tsx +27 -3
  207. package/src/client/components/settings/categories/voice-settings/speech/EndpointSection.tsx +3 -1
  208. package/src/client/components/settings/categories/voice-settings/speech/EngineSection.tsx +32 -2
  209. package/src/client/components/settings/categories/voice-settings/speech/ModelsSection.tsx +277 -0
  210. package/src/client/components/settings/categories/voice-settings/speech/TestSection.tsx +2 -1
  211. package/src/client/components/settings/categories/voice-settings/speech/VoiceSection.tsx +83 -41
  212. package/src/client/components/workspace/btw-panel/TopicMenu.tsx +20 -2
  213. package/src/client/components/workspace/chat-timeline/AiMessageFooter.speech.test.tsx +35 -6
  214. package/src/client/components/workspace/chat-timeline/SpeechButton.tsx +111 -36
  215. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +21 -6
  216. package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +7 -4
  217. package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +22 -6
  218. package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.tsx +17 -1
  219. package/src/client/components/workspace/chat-timeline/tool-renderers/index.tsx +8 -65
  220. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Proc.test.ts +12 -1
  221. package/src/client/components/workspace/chat-timeline/tool-renderers/registry.test.ts +35 -218
  222. package/src/client/components/workspace/chat-timeline/tool-renderers/registry.ts +40 -177
  223. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/DiffView.test.ts +13 -1
  224. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/FallbackToolJson.test.tsx +79 -0
  225. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/FallbackToolJson.tsx +86 -0
  226. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolBody.tsx +25 -16
  227. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/card-header.test.ts +4 -2
  228. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/tool-view.ts +11 -4
  229. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Card.plugin.test.ts +3 -1
  230. package/src/client/components/workspace/file-explorer/ArchiveModals.tsx +15 -15
  231. package/src/client/components/workspace/git-panel/BranchToolbar.tsx +30 -5
  232. package/src/client/data/mock/chat.ts +17 -0
  233. package/src/client/data/samples/tools-session.ts +8 -5
  234. package/src/client/hooks/editor/font.test.ts +21 -0
  235. package/src/client/hooks/editor/font.ts +12 -9
  236. package/src/client/hooks/settings/local-tts-models.ts +164 -0
  237. package/src/client/hooks/tts/tts-context.ts +6 -0
  238. package/src/client/hooks/tts/use-tts-player.ts +10 -0
  239. package/src/client/hooks/ui/markdown-render.ts +9 -1
  240. package/src/client/hooks/ui/markdown-scoped-links.ts +77 -0
  241. package/src/client/hooks/ui/open-inline-file.test.ts +144 -0
  242. package/src/client/hooks/ui/open-inline-file.ts +71 -0
  243. package/src/client/lib/commands/overlays.ts +16 -2
  244. package/src/client/lib/tts/player.test.ts +61 -0
  245. package/src/client/lib/tts/player.ts +120 -41
  246. package/src/client/tailwind.css +16 -0
  247. package/src/server/lib/chat/normalize-tools.server.test.ts +79 -0
  248. package/src/server/lib/chat/normalize-tools.server.ts +87 -0
  249. package/src/server/lib/harness/acp/background-replay.test.ts +36 -0
  250. package/src/server/lib/harness/acp/background-replay.ts +8 -3
  251. package/src/server/lib/harness/acp/frames-tool-shapes.test.ts +41 -13
  252. package/src/server/lib/harness/acp/frames-vendor-names.test.ts +209 -0
  253. package/src/server/lib/harness/acp/frames.test.ts +11 -20
  254. package/src/server/lib/harness/acp/frames.ts +5 -3
  255. package/src/server/lib/harness/acp/mapper.ts +5 -41
  256. package/src/server/lib/harness/acp/replay-transcript.ts +6 -1
  257. package/src/server/lib/harness/acp/subagent-frames.test.ts +1 -1
  258. package/src/server/lib/harness/acp/subagent-frames.ts +0 -2
  259. package/src/server/lib/harness/acp/tool-calls.ts +5 -16
  260. package/src/server/lib/harness/acp/tool-identity.test.ts +69 -8
  261. package/src/server/lib/harness/acp/tool-identity.ts +58 -10
  262. package/src/server/lib/harness/acp/tool-shape.ts +5 -3
  263. package/src/server/lib/harness/codex/transcript.server.test.ts +3 -1
  264. package/src/server/lib/harness/codex/transcript.server.ts +8 -15
  265. package/src/server/lib/lifecycle/paths.ts +12 -0
  266. package/src/server/lib/omp/session/messages.ts +5 -1
  267. package/src/server/lib/realtime/topics/peer-relay.server.ts +9 -1
  268. package/src/server/lib/realtime/topics/session.server.ts +5 -1
  269. package/src/server/lib/tts/engines/adapters.test.ts +17 -8
  270. package/src/server/lib/tts/engines/deepgram.ts +30 -9
  271. package/src/server/lib/tts/engines/index.ts +11 -0
  272. package/src/server/lib/tts/engines/local.ts +53 -0
  273. package/src/server/lib/tts/engines/sherpa-onnx-node.d.ts +38 -0
  274. package/src/server/lib/tts/engines/sherpa.test.ts +53 -0
  275. package/src/server/lib/tts/engines/sherpa.ts +287 -0
  276. package/src/server/lib/tts/local-models.server.ts +257 -0
  277. package/src/server/lib/tts/local-request.test.ts +66 -0
  278. package/src/server/lib/tts/local-request.ts +59 -0
  279. package/src/server/lib/tts/model-manifest.server.test.ts +71 -0
  280. package/src/server/lib/tts/model-manifest.server.ts +154 -0
  281. package/src/server/lib/tts/settings.server.ts +7 -4
  282. package/src/server/lib/tts/wav.test.ts +37 -0
  283. package/src/server/lib/tts/wav.ts +43 -0
  284. package/src/server/routes/chat/session-legacy-tools.test.ts +132 -0
  285. package/src/server/routes/chat/session.ts +10 -4
  286. package/src/server/routes/tts/index.ts +2 -0
  287. package/src/server/routes/tts/models.test.ts +148 -0
  288. package/src/server/routes/tts/models.ts +89 -0
  289. package/src/shared/lib/chat/tool/normalize.ts +67 -0
  290. package/src/shared/lib/chat/tool/render-key.test.ts +167 -0
  291. package/src/shared/lib/chat/tool/render-key.ts +247 -0
  292. package/src/shared/lib/chat/tool/tool-aliases.test.ts +42 -0
  293. package/src/shared/lib/chat/tool/tool-aliases.ts +59 -12
  294. package/src/shared/lib/fs/open-reference.test.ts +64 -0
  295. package/src/shared/lib/fs/open-reference.ts +74 -0
  296. package/src/shared/lib/icons/tint-hues.generated.ts +20 -20
  297. package/src/shared/lib/markdown/inline-file.test.ts +100 -0
  298. package/src/shared/lib/markdown/inline-file.ts +213 -0
  299. package/src/shared/lib/omp/session/messages-map.test.ts +2 -1
  300. package/src/shared/lib/omp/session/messages-parse.ts +3 -2
  301. package/src/shared/lib/omp/session/parse-message-blocks.ts +14 -0
  302. package/src/shared/lib/omp/subagent/transcript-client.ts +5 -1
  303. package/src/shared/lib/tts/engines.test.ts +28 -3
  304. package/src/shared/lib/tts/engines.ts +31 -6
  305. package/src/shared/lib/tts/local-models.test.ts +69 -0
  306. package/src/shared/lib/tts/local-models.ts +200 -0
  307. package/src/shared/lib/tts/speakable.test.ts +21 -1
  308. package/src/shared/lib/tts/speakable.ts +66 -33
  309. package/src/shared/lib/tts/voices.ts +125 -19
  310. package/src/shared/types/chat.ts +3 -0
  311. package/src/shared/types/index.ts +1 -0
  312. package/src/shared/types/tool-render.ts +37 -0
  313. package/dist/client/static/js/ImageView-7vse3k6x.js +0 -1
  314. package/dist/client/static/js/LayoutWrapper-qdp83fps.js +0 -2
  315. package/dist/client/static/js/MergeDiffView-hzsccppq.js +0 -1
  316. package/dist/client/static/js/Modal-zw9x5b6f.js +0 -60
  317. package/dist/client/static/js/SessionsView-qmgg03fv.js +0 -1
  318. package/dist/client/static/js/architecture-7GRP2DOG-g7b64973.js +0 -1
  319. package/dist/client/static/js/bash-z5pe89pt.js +0 -1
  320. package/dist/client/static/js/c-fy0fysfw.js +0 -1
  321. package/dist/client/static/js/cpp-wam8dze6.js +0 -1
  322. package/dist/client/static/js/css-ke51m4kc.js +0 -1
  323. package/dist/client/static/js/css-yryw442h.js +0 -1
  324. package/dist/client/static/js/cynefin-OW5HDTMX-8bscrcct.js +0 -1
  325. package/dist/client/static/js/eventmodeling-NTZA5JFV-pj22bng1.js +0 -1
  326. package/dist/client/static/js/flowDiagram-KWPJA3E3-9h6g160j.js +0 -1
  327. package/dist/client/static/js/gitGraph-4MIJSDKK-hgw4jcvk.js +0 -1
  328. package/dist/client/static/js/graphql-0yv8dc1v.js +0 -1
  329. package/dist/client/static/js/html-zk3m0az9.js +0 -1
  330. package/dist/client/static/js/index-0ff2x5g9.js +0 -1
  331. package/dist/client/static/js/index-17jy16v3.js +0 -314
  332. package/dist/client/static/js/index-1kjgdyfk.js +0 -2
  333. package/dist/client/static/js/index-4z3qtazf.js +0 -2
  334. package/dist/client/static/js/index-779rptb2.js +0 -1
  335. package/dist/client/static/js/index-9jrej3ht.js +0 -3
  336. package/dist/client/static/js/index-bczhbk01.js +0 -2
  337. package/dist/client/static/js/index-evvmkk2f.js +0 -2
  338. package/dist/client/static/js/index-jr6q69r3.js +0 -465
  339. package/dist/client/static/js/index-qaxjp73x.js +0 -2
  340. package/dist/client/static/js/index-rgneq3zt.js +0 -2
  341. package/dist/client/static/js/index-tfwsch7a.js +0 -4
  342. package/dist/client/static/js/index-vn495w82.js +0 -9
  343. package/dist/client/static/js/info-A6RAGUB7-k0kv05ny.js +0 -1
  344. package/dist/client/static/js/ini-apj95p59.js +0 -1
  345. package/dist/client/static/js/java-khk2v3g4.js +0 -1
  346. package/dist/client/static/js/javascript-gez6yppm.js +0 -1
  347. package/dist/client/static/js/json-r78y6e80.js +0 -1
  348. package/dist/client/static/js/jsx-h7hfj8cz.js +0 -1
  349. package/dist/client/static/js/lua-pat2bzg3.js +0 -1
  350. package/dist/client/static/js/markdown-545zn05v.js +0 -1
  351. package/dist/client/static/js/one-dark-pro-7c942tnw.js +0 -1
  352. package/dist/client/static/js/one-light-tp8y6c5g.js +0 -1
  353. package/dist/client/static/js/packet-AYTQ26CC-ne66q5h9.js +0 -1
  354. package/dist/client/static/js/pie-WAS4IAKB-ej9aysvz.js +0 -1
  355. package/dist/client/static/js/properties-9f76xngb.js +0 -1
  356. package/dist/client/static/js/python-nwerpkfq.js +0 -1
  357. package/dist/client/static/js/r-39k5dr2p.js +0 -1
  358. package/dist/client/static/js/radar-RG4KPBEZ-375pe46t.js +0 -1
  359. package/dist/client/static/js/railroad-74A4TZTK-hdgdfsc1.js +0 -1
  360. package/dist/client/static/js/railroad-abnf-HS5TGJTU-2p5ynn4a.js +0 -1
  361. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-2p1fxxen.js +0 -1
  362. package/dist/client/static/js/railroad-peg-WCYAUIDC-g131pt42.js +0 -1
  363. package/dist/client/static/js/sql-4dcrp3sw.js +0 -1
  364. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-myzk2rg0.js +0 -8
  365. package/dist/client/static/js/treeView-Q6P3EWNA-gfztfha9.js +0 -1
  366. package/dist/client/static/js/treemap-WGGIJYW6-kwtrwq1f.js +0 -1
  367. package/dist/client/static/js/typescript-q0493nmw.js +0 -1
  368. package/dist/client/static/js/wardley-WFR3VGLG-30dnzvww.js +0 -1
  369. package/dist/client/static/js/xml-91sb3gt9.js +0 -1
  370. package/dist/client/static/js/yaml-ghx4mjw1.js +0 -1
@@ -13,11 +13,17 @@
13
13
  * writer `todowrite` opened no panel at all: the card fell back to the generic
14
14
  * Input/Output body while a `bash`/`todo` card was one lookup away. Measured on
15
15
  * opencode 2.2.5: `shell`, `todowrite`, `webfetch`, `websearch`, `subagent`,
16
- * `patch`.
16
+ * `patch` — and the same gap exists on every other adapter that names its tools
17
+ * in its own vocabulary: kimi (`ReadFile`, `StrReplaceFile`, `SetTodoList`),
18
+ * antigravity (`view_file`, `write_to_file`, `replace_file_content`), grok
19
+ * (`run_terminal_command`, `search_replace`), dsh (`str_replace_editor`,
20
+ * `run_code`), hermes (`delegate_task`, `execute_code`, `search_files`),
21
+ * command-code (`shell_command`, `read_directory`).
17
22
  *
18
- * This is the SINGLE table for that vocabulary; the ACP adapter applies it on
19
- * ingress and the client renderers apply it to frames recorded before this
20
- * table existed, so a stored transcript and a live stream classify the same.
23
+ * This is the SINGLE table for that vocabulary. It is applied by the SERVER's
24
+ * one resolver (`shared/lib/chat/tool/render-key.ts`) at ingress and on every
25
+ * stored transcript read, so a live row and a replayed row classify the same
26
+ * and no client derives a panel from a name.
21
27
  *
22
28
  * It deliberately does NOT restate Kabmo's own legacy aliases (`read_file`,
23
29
  * `terminal`, …): those live with the panels/phrases that own them.
@@ -28,37 +34,78 @@ export const AGENT_TOOL_ALIASES: Readonly<Record<string, string>> = {
28
34
  shell: 'bash',
29
35
  // The same slot across adapters: claude-code-acp reports `Bash` (already the
30
36
  // key) or `PowerShell`; codex-acp reports `exec_command`; gemini-family
31
- // agents (`qwen`, `agy`) report `run_shell_command`.
37
+ // agents (`qwen`, `agy`) report `run_shell_command`; grok reports
38
+ // `run_terminal_command`/`run_terminal_cmd`; command-code reports
39
+ // `shell_command`; codex's `write_stdin` is the interactive half of the same
40
+ // exec slot.
32
41
  powershell: 'bash',
33
42
  exec_command: 'bash',
34
43
  run_shell_command: 'bash',
44
+ run_terminal_command: 'bash',
45
+ run_terminal_cmd: 'bash',
46
+ shell_command: 'bash',
47
+ write_stdin: 'bash',
35
48
  // A plan update from opencode is `todowrite`, from codex `update_plan`;
36
- // Kabmo's panel key is `todo`.
49
+ // Kabmo's panel key is `todo`. kimi spells it `SetTodoList`/`TodoList`.
37
50
  todowrite: 'todo',
38
51
  todo_write: 'todo',
39
52
  update_plan: 'todo',
53
+ settodolist: 'todo',
54
+ todolist: 'todo',
40
55
  // Fetching one URL and searching the web share Kabmo's web_search panel,
41
56
  // which falls back to the output text for a single page.
42
57
  webfetch: 'web_search',
43
58
  websearch: 'web_search',
44
59
  web_fetch: 'web_search',
45
60
  google_web_search: 'web_search',
46
- // Child-agent calls: opencode `subagent`, claude-code-acp `Agent`/`Task`.
47
- // Kabmo's delegation panel is `task` (its `acpDelegationRow` reads
48
- // description/prompt/agent).
61
+ fetchurl: 'web_search',
62
+ read_url_content: 'web_search',
63
+ search_web: 'web_search',
64
+ web_extract: 'web_search',
65
+ // Child-agent calls: opencode `subagent`, claude-code-acp `Agent`/`Task`,
66
+ // hermes `delegate_task`. Kabmo's delegation panel is `task` (its
67
+ // `acpDelegationRow` reads description/prompt/agent).
49
68
  subagent: 'task',
50
69
  agent: 'task',
51
- // The codex/Claude patch tool, opencode's `patch` plugin, and gemini's
52
- // `replace` are edits.
70
+ delegate_task: 'task',
71
+ // The codex/Claude patch tool, opencode's `patch` plugin, gemini's
72
+ // `replace`, antigravity's `*_file_content` pair, grok's
73
+ // `search_replace`/`hashline_edit`, and kimi's `StrReplaceFile` are edits.
53
74
  apply_patch: 'edit',
54
75
  patch: 'edit',
55
76
  replace: 'edit',
56
- // Gemini-family file tools name the operation in a different word.
77
+ str_replace_editor: 'edit',
78
+ strreplacefile: 'edit',
79
+ search_replace: 'edit',
80
+ hashline_edit: 'edit',
81
+ replace_file_content: 'edit',
82
+ multi_replace_file_content: 'edit',
83
+ notebook_edit: 'edit',
84
+ // qwen spells it with the underscore, claude's adapter without.
85
+ notebookedit: 'edit',
86
+ // Gemini-family file tools name the operation in a different word. kimi
87
+ // capitalises its own (`ReadFile`, `WriteFile`), and the table is keyed
88
+ // case-insensitively.
57
89
  write_file: 'write',
90
+ writefile: 'write',
91
+ write_to_file: 'write',
58
92
  list_directory: 'read',
93
+ list_dir: 'read',
94
+ read_directory: 'read',
59
95
  read_many_files: 'read',
96
+ readfile: 'read',
97
+ readmediafile: 'read',
98
+ view_file: 'read',
60
99
  search_file_content: 'grep',
100
+ grep_search: 'grep',
101
+ search_files: 'grep',
102
+ find_by_name: 'grep',
61
103
  view_image: 'read',
104
+ // Code execution that is not a shell: opencode's Code Mode `execute`, dsh's
105
+ // `run_code`, hermes' `execute_code`. Kabmo's `eval` panel draws the script.
106
+ execute: 'eval',
107
+ run_code: 'eval',
108
+ execute_code: 'eval',
62
109
  };
63
110
 
64
111
  /**
@@ -0,0 +1,64 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * Where a chat file reference actually lives.
8
+ *
9
+ * The ambiguous case is the reason this module is pure and tested on its own:
10
+ * `index.ts` matching two folders must NOT pick one, and a bare name with no
11
+ * match must still open so the editor reports the missing file.
12
+ */
13
+
14
+ import { describe, expect, test } from 'bun:test';
15
+ import { chooseFileTarget } from '@/shared/lib/fs/open-reference';
16
+
17
+ describe('chooseFileTarget', () => {
18
+ test('a path with a directory opens as written, without consulting the index', () => {
19
+ expect(chooseFileTarget({ path: 'src/client/App.tsx' }, [])).toEqual({
20
+ kind: 'open',
21
+ path: 'src/client/App.tsx',
22
+ });
23
+ });
24
+
25
+ test('the line rides along on every open', () => {
26
+ expect(chooseFileTarget({ path: 'src/a.ts', line: 7 }, [])).toEqual({
27
+ kind: 'open',
28
+ path: 'src/a.ts',
29
+ line: 7,
30
+ });
31
+ });
32
+
33
+ test('an exact root file wins over copies deeper in the tree', () => {
34
+ const entries = [{ path: 'AGENTS.md' }, { path: 'docs/AGENTS.md' }];
35
+ expect(chooseFileTarget({ path: 'AGENTS.md' }, entries)).toEqual({
36
+ kind: 'open',
37
+ path: 'AGENTS.md',
38
+ });
39
+ });
40
+
41
+ test('one basename match resolves to its real path', () => {
42
+ const entries = [{ path: 'src/client/App.tsx' }, { path: 'src/server/read.ts' }];
43
+ expect(chooseFileTarget({ path: 'App.tsx', line: 3 }, entries)).toEqual({
44
+ kind: 'open',
45
+ path: 'src/client/App.tsx',
46
+ line: 3,
47
+ });
48
+ });
49
+
50
+ test('several matches open the picker instead of guessing', () => {
51
+ const entries = [{ path: 'src/a/index.ts' }, { path: 'src/b/index.ts' }];
52
+ expect(chooseFileTarget({ path: 'index.ts' }, entries)).toEqual({
53
+ kind: 'pick',
54
+ query: 'index.ts',
55
+ });
56
+ });
57
+
58
+ test('no match opens the reference as written, so the editor reports it', () => {
59
+ expect(chooseFileTarget({ path: 'Missing.tsx' }, [{ path: 'src/App.tsx' }])).toEqual({
60
+ kind: 'literal',
61
+ path: 'Missing.tsx',
62
+ });
63
+ });
64
+ });
@@ -0,0 +1,74 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * Where a file reference written in chat actually lives.
8
+ *
9
+ * A reference with a directory is opened as written: the tab's root is the
10
+ * active workspace, which is the scope the agent was working in. A BARE name
11
+ * (`App.tsx`, `AGENTS.md`) is not a location — the file can sit in any folder —
12
+ * so it is looked up in the flat `/api/fs/list` index the quick-open picker
13
+ * already uses. The three answers are the honest ones:
14
+ *
15
+ * - one match: open that path (and reveal the line, when the span named one);
16
+ * - several: do not guess — open the picker filtered to the name;
17
+ * - none: open the reference as written, so the editor reports the missing
18
+ * file instead of the click doing nothing.
19
+ *
20
+ * Pure: the caller fetches the index, this decides.
21
+ */
22
+
23
+ import { lastPathSegment } from '@/shared/lib/fs/paths';
24
+
25
+ /** One file reference, as the inline-code detector produced it. */
26
+ export interface InlineFileTarget {
27
+ path: string;
28
+ line?: number;
29
+ }
30
+
31
+ /** What a click on the reference should do. */
32
+ export type FileTargetDecision =
33
+ | { kind: 'open'; path: string; line?: number }
34
+ | { kind: 'pick'; query: string }
35
+ | { kind: 'literal'; path: string; line?: number };
36
+
37
+ /** The minimum a quick-open entry must carry: its workspace-relative path. */
38
+ export interface IndexedPath {
39
+ path: string;
40
+ }
41
+
42
+ /** One decision with the line carried through, without an `undefined` key. */
43
+ function withLine(
44
+ kind: 'open' | 'literal',
45
+ path: string,
46
+ line: number | undefined,
47
+ ): FileTargetDecision {
48
+ return line === undefined ? { kind, path } : { kind, path, line };
49
+ }
50
+
51
+ /**
52
+ * The action for `reference` given the workspace file index.
53
+ *
54
+ * The index is only consulted for a bare name: a path with a directory already
55
+ * says where it is, and asking the index about it would add a request to the
56
+ * common case. An EXACT index entry wins before the basename comparison, so a
57
+ * root-level `AGENTS.md` opens that file rather than the picker — a picker over
58
+ * the root copy and one in `docs/` would be noise, not a choice.
59
+ */
60
+ export function chooseFileTarget(
61
+ reference: InlineFileTarget,
62
+ entries: readonly IndexedPath[],
63
+ ): FileTargetDecision {
64
+ const { path, line } = reference;
65
+ if (path.includes('/')) return withLine('open', path, line);
66
+
67
+ if (entries.some((entry) => entry.path === path)) return withLine('open', path, line);
68
+
69
+ const name = lastPathSegment(path);
70
+ const matches = entries.filter((entry) => lastPathSegment(entry.path) === name);
71
+ if (matches.length === 1) return withLine('open', matches[0].path, line);
72
+ if (matches.length > 1) return { kind: 'pick', query: name };
73
+ return withLine('literal', path, line);
74
+ }
@@ -49,26 +49,26 @@ export const ICON_HUES: Readonly<Record<string, number>> = {
49
49
  GitPullRequest: 10, Globe: 340, GraduationCap: 190, GripVertical: 350, Hammer: 310, Hand: 200,
50
50
  HardDrive: 0, Hash: 330, Heading: 250, Heart: 270, History: 110, Home: 20,
51
51
  Image: 140, Key: 240, KeyRound: 240, Keyboard: 120, Laptop: 170, Layers: 30,
52
- Leaf: 50, Library: 160, Lightbulb: 0, List: 170, ListChecks: 320, ListFilter: 230,
53
- ListMusic: 0, ListOrdered: 220, ListTodo: 210, ListTree: 330, Loader2: 40, Lock: 220,
54
- LockKeyhole: 270, LockOpen: 180, LogIn: 140, LogOut: 190, Maximize: 310, Maximize2: 270,
55
- Menu: 100, MessageSquare: 150, MessageSquareOff: 40, MessageSquarePlus: 350, MessagesSquare: 220, Mic: 160,
56
- MicOff: 170, Minimize: 290, Minimize2: 130, Minus: 110, Monitor: 250, Moon: 80,
57
- MoreHorizontal: 160, MousePointerClick: 70, MoveVertical: 300, Music: 280, Package: 270, PackageOpen: 230,
58
- Paintbrush: 250, Palette: 320, PanelLeft: 280, PanelLeftClose: 160, PanelRight: 330, PanelRightClose: 350,
59
- Paperclip: 310, Pause: 10, Pencil: 0, PencilLine: 260, Pin: 0, PinOff: 50,
60
- Pipette: 120, Play: 310, Plug: 50, Plus: 210, Power: 340, Puzzle: 50,
61
- Quote: 110, Radio: 320, Ratio: 160, RefreshCw: 180, Regex: 280, Replace: 190,
62
- ReplaceAll: 140, Rocket: 210, RotateCcw: 330, RotateCw: 0, Rows: 160, Rows3: 250,
63
- Save: 40, SaveAll: 190, Scissors: 260, Search: 250, Send: 110, Server: 300,
64
- ServerCog: 50, Settings: 240, Settings2: 20, Shield: 160, ShieldOff: 130, Shrink: 160,
65
- Sliders: 290, SlidersHorizontal: 50, Smartphone: 20, Space: 290, Sparkles: 180, Square: 60,
66
- SquareFunction: 220, SquarePen: 10, Star: 170, StickyNote: 100, Store: 340, Sun: 90,
67
- Tablet: 290, Tag: 310, Target: 200, Terminal: 210, TextSelect: 220, Ticket: 170,
68
- TriangleAlert: 210, Type: 170, Undo2: 310, Upload: 0, UploadCloud: 50, User: 140,
69
- Variable: 330, Volume2: 270, VolumeX: 50, Wand2: 270, WandSparkles: 40, Waypoints: 30,
70
- WholeWord: 240, Workflow: 240, WrapText: 340, Wrench: 0, X: 230, Zap: 120,
71
- ZoomIn: 250, ZoomOut: 340,
52
+ Leaf: 50, Library: 160, Lightbulb: 0, Link2: 10, List: 170, ListChecks: 320,
53
+ ListFilter: 230, ListMusic: 0, ListOrdered: 220, ListTodo: 210, ListTree: 330, Loader2: 40,
54
+ Lock: 220, LockKeyhole: 270, LockOpen: 180, LogIn: 140, LogOut: 190, Maximize: 310,
55
+ Maximize2: 270, Menu: 100, MessageSquare: 150, MessageSquareOff: 40, MessageSquarePlus: 350, MessagesSquare: 220,
56
+ Mic: 160, MicOff: 170, Minimize: 290, Minimize2: 130, Minus: 110, Monitor: 250,
57
+ Moon: 80, MoreHorizontal: 160, MousePointerClick: 70, MoveVertical: 300, Music: 280, Package: 270,
58
+ PackageOpen: 230, Paintbrush: 250, Palette: 320, PanelLeft: 280, PanelLeftClose: 160, PanelRight: 330,
59
+ PanelRightClose: 350, Paperclip: 310, Pause: 10, Pencil: 0, PencilLine: 260, Pin: 0,
60
+ PinOff: 50, Pipette: 120, Play: 310, Plug: 50, Plus: 210, Power: 340,
61
+ Puzzle: 50, Quote: 110, Radio: 320, Ratio: 160, RefreshCw: 180, Regex: 280,
62
+ Replace: 190, ReplaceAll: 140, Rocket: 210, RotateCcw: 330, RotateCw: 0, Rows: 160,
63
+ Rows3: 250, Save: 40, SaveAll: 190, Scissors: 260, Search: 250, Send: 110,
64
+ Server: 300, ServerCog: 50, Settings: 240, Settings2: 20, Shield: 160, ShieldOff: 130,
65
+ Shrink: 160, Sliders: 290, SlidersHorizontal: 50, Smartphone: 20, Space: 290, Sparkles: 180,
66
+ Square: 60, SquareFunction: 220, SquarePen: 10, Star: 170, StickyNote: 100, Store: 340,
67
+ Sun: 90, Tablet: 290, Tag: 310, Target: 200, Terminal: 210, TextSelect: 220,
68
+ Ticket: 170, TriangleAlert: 210, Type: 170, Undo2: 310, Upload: 0, UploadCloud: 50,
69
+ User: 140, Variable: 330, Volume2: 270, VolumeX: 50, Wand2: 270, WandSparkles: 40,
70
+ Waypoints: 30, WholeWord: 240, Workflow: 240, WrapText: 340, Wrench: 0, X: 230,
71
+ Zap: 120, ZoomIn: 250, ZoomOut: 340,
72
72
  };
73
73
 
74
74
  /**
@@ -0,0 +1,100 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * Inline code that names a file, and the marker the chat timeline reads.
8
+ *
9
+ * Detection is the load-bearing half: a false positive opens a tab that cannot
10
+ * read, so every rejected shape here is a bug this file prevents. The marker
11
+ * half pins that it rewrites ONLY the chip `marked.ts` emits — a fenced block
12
+ * that prints that markup is escaped and must survive untouched.
13
+ */
14
+
15
+ import { describe, expect, test } from 'bun:test';
16
+ import { inlineFileReference, markInlineFilePaths } from '@/shared/lib/markdown/inline-file';
17
+
18
+ describe('inlineFileReference', () => {
19
+ test('a workspace path with a directory is a file', () => {
20
+ expect(inlineFileReference('src/client/App.tsx')).toEqual({ path: 'src/client/App.tsx' });
21
+ expect(inlineFileReference('docs/hero.png')).toEqual({ path: 'docs/hero.png' });
22
+ });
23
+
24
+ test('a bare filename and a dot-file are files', () => {
25
+ expect(inlineFileReference('AGENTS.md')).toEqual({ path: 'AGENTS.md' });
26
+ expect(inlineFileReference('.gitignore')).toEqual({ path: '.gitignore' });
27
+ expect(inlineFileReference('.env')).toEqual({ path: '.env' });
28
+ expect(inlineFileReference('Makefile')).toEqual({ path: 'Makefile' });
29
+ expect(inlineFileReference('bun.lock')).toEqual({ path: 'bun.lock' });
30
+ });
31
+
32
+ test('`./` is stripped, because the tab resolves from the workspace root', () => {
33
+ expect(inlineFileReference('./src/a.ts')).toEqual({ path: 'src/a.ts' });
34
+ });
35
+
36
+ test('the line suffixes the editor can reveal are carried', () => {
37
+ expect(inlineFileReference('src/a.ts:42')).toEqual({ path: 'src/a.ts', line: 42 });
38
+ expect(inlineFileReference('src/a.ts:42-50')).toEqual({ path: 'src/a.ts', line: 42 });
39
+ expect(inlineFileReference('src/a.ts:42:7')).toEqual({ path: 'src/a.ts', line: 42 });
40
+ expect(inlineFileReference('src/a.ts#L42-L50')).toEqual({ path: 'src/a.ts', line: 42 });
41
+ });
42
+
43
+ test('ordinary inline code is not a file', () => {
44
+ const rejected = [
45
+ 'bun test',
46
+ 'state.user.id',
47
+ 'https://bun.sh/docs',
48
+ '/Users/me/project/a.ts',
49
+ '~/project/a.ts',
50
+ 'C:\\project\\a.ts',
51
+ 'src/',
52
+ '*.tsx',
53
+ 'src/a.ts,',
54
+ '../a.ts',
55
+ 'src/unknown.xyz',
56
+ 'src/foo',
57
+ 'App',
58
+ '--config.ts',
59
+ 'src//a.ts',
60
+ 'src/a.ts#section',
61
+ 'npm:foo',
62
+ 'a?b.ts',
63
+ ];
64
+ for (const text of rejected) expect(inlineFileReference(text)).toBeNull();
65
+ });
66
+ });
67
+
68
+ describe('markInlineFilePaths', () => {
69
+ test('a file chip becomes a focusable button with its line', () => {
70
+ const html = markInlineFilePaths('<p>see <code class="inline-code">src/a.ts:12</code></p>');
71
+ expect(html).toContain('data-file-path="src/a.ts"');
72
+ expect(html).toContain('data-file-line="12"');
73
+ expect(html).toContain('role="button"');
74
+ expect(html).toContain('tabindex="0"');
75
+ expect(html).toContain('aria-label="Open src/a.ts in the editor"');
76
+ });
77
+
78
+ test('ordinary inline code is byte-identical', () => {
79
+ const html = '<p><code class="inline-code">bun test</code></p>';
80
+ expect(markInlineFilePaths(html)).toBe(html);
81
+ });
82
+
83
+ test('a fenced block that prints the chip markup is not a chip', () => {
84
+ // What `marked` emits for a fence whose text is that markup: the tags are
85
+ // escaped, so the marker cannot see a chip and must not invent one.
86
+ const html = '<pre><code class="language-text">&lt;code class=&quot;inline-code&quot;&gt;src/a.ts&lt;/code&gt;</code></pre>';
87
+ expect(markInlineFilePaths(html)).toBe(html);
88
+ });
89
+
90
+ test('an entity in a filename is decoded for detection and re-escaped for the attribute', () => {
91
+ const html = markInlineFilePaths('<p><code class="inline-code">a&amp;b.ts</code></p>');
92
+ expect(html).toContain('data-file-path="a&amp;b.ts"');
93
+ expect(html).toContain('>a&amp;b.ts</code>');
94
+ });
95
+
96
+ test('marking twice is the same as marking once', () => {
97
+ const once = markInlineFilePaths('<code class="inline-code">src/a.ts</code>');
98
+ expect(markInlineFilePaths(once)).toBe(once);
99
+ });
100
+ });
@@ -0,0 +1,213 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * Inline code that names a file the editor can open.
8
+ *
9
+ * An agent writes `` `src/hooks/use-file.ts:42` `` in prose far more often than
10
+ * it writes a markdown link, and the timeline rendered that as an inert chip.
11
+ * The renderer's own markup is the seam: `marked.ts` emits exactly
12
+ * `<code class="inline-code">…</code>`, so the marker pass rewrites that one
13
+ * shape and nothing else. It runs on the SANITIZED chat HTML, which is why the
14
+ * attributes need no DOMPurify allow-list entry — the same contract
15
+ * `markLocalImageSources` documents.
16
+ *
17
+ * Detection is deliberately conservative, because a false positive is a tab
18
+ * that fails to read. It accepts only what a workspace file plausibly is:
19
+ *
20
+ * - a path segment list that ends in a name the editor can show — a text
21
+ * extension (`TEXT_FILE_EXTENSIONS`), a viewer extension (raster image,
22
+ * SVG, PDF), or an extensionless project file (`Makefile`, `LICENSE`);
23
+ * - optionally suffixed by a line (`:42`, `:42-50`, `:42:7`) or GitHub's
24
+ * `#L42`, which become the editor's line reveal.
25
+ *
26
+ * Everything else stays plain text: commands (`bun test`), identifiers
27
+ * (`state.user.id`), URLs, absolute paths, globs, shell flags, quoted strings
28
+ * and anything containing whitespace. A bare filename is accepted HERE; the
29
+ * click path resolves where it lives (see `chooseFileTarget`).
30
+ */
31
+
32
+ import { TEXT_FILE_EXTENSIONS } from '@/shared/lib/chat/text-file';
33
+
34
+ /** One file reference written inside inline code. */
35
+ export interface InlineFileReference {
36
+ /** Workspace-relative path, exactly as the click handler hands it to a tab. */
37
+ path: string;
38
+ /** 1-based line, when the code span named one. */
39
+ line?: number;
40
+ }
41
+
42
+ /** The attribute the marker puts on a code span, read by the click handler. */
43
+ export const INLINE_FILE_ATTRIBUTE = 'data-file-path';
44
+ /** The 1-based line, when the span named one. */
45
+ export const INLINE_FILE_LINE_ATTRIBUTE = 'data-file-line';
46
+
47
+ /** Raster images, SVG and PDF: the editor has a viewer for each. */
48
+ const VIEWER_EXTENSIONS: Record<string, true> = {
49
+ png: true,
50
+ jpg: true,
51
+ jpeg: true,
52
+ gif: true,
53
+ webp: true,
54
+ avif: true,
55
+ bmp: true,
56
+ ico: true,
57
+ svg: true,
58
+ pdf: true,
59
+ };
60
+
61
+ /**
62
+ * Project files the editor opens that carry no extension.
63
+ *
64
+ * `TEXT_FILE_EXTENSIONS` keys them by a lowercased NAME (`dockerfile`,
65
+ * `makefile`), which never matches a basename with no dot — the reason this
66
+ * table exists rather than being folded into that one.
67
+ */
68
+ const NAMED_FILES: Record<string, true> = {
69
+ dockerfile: true,
70
+ makefile: true,
71
+ procfile: true,
72
+ justfile: true,
73
+ brewfile: true,
74
+ gemfile: true,
75
+ rakefile: true,
76
+ license: true,
77
+ licence: true,
78
+ notice: true,
79
+ codeowners: true,
80
+ readme: true,
81
+ };
82
+
83
+ /**
84
+ * Dot-files and lockfiles whose suffix is not in `TEXT_FILE_EXTENSIONS` but is
85
+ * still ordinary text the editor reads.
86
+ */
87
+ const EXTRA_EXTENSIONS: Record<string, true> = {
88
+ lock: true,
89
+ prettierrc: true,
90
+ eslintrc: true,
91
+ babelrc: true,
92
+ nvmrc: true,
93
+ npmrc: true,
94
+ gitattributes: true,
95
+ gitmodules: true,
96
+ dockerignore: true,
97
+ editorsettings: true,
98
+ };
99
+
100
+ /** An absolute path (POSIX, Windows drive or home) is never workspace-relative. */
101
+ const ABSOLUTE_RE = /^(?:[/\\]|[A-Za-z]:[\\/]|~[/\\])/;
102
+
103
+ /**
104
+ * Glob, shell, markup and query characters. A path on disk can legally hold
105
+ * some of them, but the inline-code spelling of one never does — and rejecting
106
+ * the whole set is what keeps `*.tsx`, `--flag=value`, `a?b` and `foo|bar` out.
107
+ */
108
+ const FORBIDDEN_RE = /[[\]{}*?<>|"'`$=,;]/;
109
+
110
+ /** `path:42`, `path:42-50`, `path:42:7` — omp's read selector without the mode. */
111
+ const COLON_LINE_RE = /^(.+?):(\d+)(?:[-,:]\d+)?$/;
112
+
113
+ /** GitHub's `path#L42` / `path#L42-L50`. */
114
+ const HASH_LINE_RE = /^(.+?)#L(\d+)(?:-L?\d+)?$/i;
115
+
116
+ /** Whether `name` is a file the editor can open, by extension or by name. */
117
+ function isOpenableName(name: string): boolean {
118
+ const lower = name.toLowerCase();
119
+ if (NAMED_FILES[lower]) return true;
120
+ const dot = lower.lastIndexOf('.');
121
+ if (dot === -1) return false;
122
+ // A dot-file's "extension" is everything after the leading dot.
123
+ const ext = dot === 0 ? lower.slice(1) : lower.slice(dot + 1);
124
+ return TEXT_FILE_EXTENSIONS[ext] === true
125
+ || VIEWER_EXTENSIONS[ext] === true
126
+ || EXTRA_EXTENSIONS[ext] === true;
127
+ }
128
+
129
+ /** The path alone, and the line when the spelling carries one. */
130
+ function splitLineSuffix(text: string): InlineFileReference {
131
+ const hash = HASH_LINE_RE.exec(text);
132
+ if (hash) return { path: hash[1], line: Number(hash[2]) };
133
+ const colon = COLON_LINE_RE.exec(text);
134
+ if (colon) return { path: colon[1], line: Number(colon[2]) };
135
+ return { path: text };
136
+ }
137
+
138
+ /**
139
+ * The file this inline-code text names, or null when it is ordinary code.
140
+ *
141
+ * Pure and synchronous: it runs once per inline code span on every render of a
142
+ * streaming transcript, so it must not touch the network or the DOM.
143
+ */
144
+ export function inlineFileReference(rawText: string): InlineFileReference | null {
145
+ const text = rawText.trim();
146
+ if (!text || /\s/.test(text)) return null;
147
+ // A shell flag is not a path, even when it ends in `.ts`.
148
+ if (text.startsWith('-')) return null;
149
+ if (ABSOLUTE_RE.test(text)) return null;
150
+ if (FORBIDDEN_RE.test(text)) return null;
151
+
152
+ const reference = splitLineSuffix(text);
153
+ // A leftover scheme, drive letter or read-mode chunk (`:raw`) is not a path;
154
+ // `#` that survived the `#L` rule is an anchor, not part of a filename.
155
+ if (reference.path.includes(':') || reference.path.includes('\\') || reference.path.includes('#')) {
156
+ return null;
157
+ }
158
+
159
+ const path = reference.path.startsWith('./') ? reference.path.slice(2) : reference.path;
160
+ if (!path || path.endsWith('/')) return null;
161
+ const segments = path.split('/');
162
+ // Empty segments catch `a//b`; `.`/`..` would escape the workspace scope the
163
+ // open event resolves against.
164
+ if (segments.some((segment) => segment === '' || segment === '.' || segment === '..')) return null;
165
+ if (!isOpenableName(segments[segments.length - 1])) return null;
166
+
167
+ return reference.line !== undefined ? { path, line: reference.line } : { path };
168
+ }
169
+
170
+ /** `&amp;` and friends are how a markdown URL reaches the HTML attribute. */
171
+ function decodeEntities(value: string): string {
172
+ return value
173
+ .replace(/&lt;/g, '<')
174
+ .replace(/&gt;/g, '>')
175
+ .replace(/&quot;/g, '"')
176
+ .replace(/&#0?39;/g, "'")
177
+ .replace(/&amp;/g, '&');
178
+ }
179
+
180
+ /** Attribute values are injected as HTML, so `&` and `"` must be entities. */
181
+ function escapeAttribute(value: string): string {
182
+ return value.replace(/&/g, '&amp;').replace(/"/g, '&quot;');
183
+ }
184
+
185
+ /** Exactly the chip `marked.ts` emits for inline code; a fence has a language class. */
186
+ const INLINE_CODE_RE = /<code class="inline-code">([^<]*)<\/code>/g;
187
+
188
+ /**
189
+ * Put the file identity on every inline code span that names one.
190
+ *
191
+ * Runs after sanitization (see `useRenderedMarkdown`), so the attributes never
192
+ * pass through DOMPurify. The regex is safe for the same reason the local-image
193
+ * marker is: the renderer escapes `<` inside a code span, so a fenced block
194
+ * that PRINTS this markup arrives as `&lt;code …` and cannot match.
195
+ */
196
+ export function markInlineFilePaths(html: string): string {
197
+ if (!html.includes('class="inline-code"')) return html;
198
+ return html.replace(INLINE_CODE_RE, (match, escaped: string) => {
199
+ const reference = inlineFileReference(decodeEntities(escaped));
200
+ if (!reference) return match;
201
+ const path = escapeAttribute(reference.path);
202
+ const title = `Open ${path} in the editor`;
203
+ const attributes = [
204
+ `${INLINE_FILE_ATTRIBUTE}="${path}"`,
205
+ ...(reference.line !== undefined ? [`${INLINE_FILE_LINE_ATTRIBUTE}="${reference.line}"`] : []),
206
+ 'role="button"',
207
+ 'tabindex="0"',
208
+ `title="${title}"`,
209
+ `aria-label="${title}"`,
210
+ ];
211
+ return `<code class="inline-code" ${attributes.join(' ')}>${escaped}</code>`;
212
+ });
213
+ }
@@ -87,8 +87,9 @@ describe('parseAssistantContent', () => {
87
87
  expect(parsed.thinking).toBe('hmm');
88
88
  expect(parsed.intent).toBe('Read it');
89
89
  expect(parsed.textParts).toEqual(['answer']);
90
+ // `type` stays the transport's own word; `render` is the panel family.
90
91
  expect(parsed.toolCalls).toEqual([
91
- { id: 'c1', type: 'read_file', name: 'read', title: 'read — /f', intent: 'Read it', target: '/f', input: { path: '/f' }, output: 'OUT', status: 'success' },
92
+ { id: 'c1', type: 'read_file', name: 'read', title: 'read — /f', intent: 'Read it', target: '/f', input: { path: '/f' }, output: 'OUT', status: 'success', render: { key: 'read', normalized: true } },
92
93
  ]);
93
94
  });
94
95
 
@@ -14,6 +14,7 @@
14
14
  import type { ToolCallData } from '@/shared/types/chat';
15
15
  import type { OmpMessageEntry } from '@/shared/types/omp/session';
16
16
  import { extractInlinedTextAttachments, extractText as coreExtractText, extractUserImageAttachments, parseMessageBlocks, stripInlinedTextAttachments, toToolCallData } from '@/shared/lib/omp/session/parse-message-blocks';
17
+ import { normalizeToolCall } from '@/shared/lib/chat/tool/normalize';
17
18
  import { isRecord } from '@/shared/lib/util/guards';
18
19
 
19
20
  export { stripInlinedTextAttachments };
@@ -56,11 +57,11 @@ export interface ParsedAssistantTurn {
56
57
  export function parseAssistantContent(content: unknown): ParsedAssistantTurn {
57
58
  const parsed = parseMessageBlocks(content);
58
59
  const toolCalls = parsed.toolCalls.map((tc) =>
59
- toToolCallData(tc, {
60
+ normalizeToolCall(toToolCallData(tc, {
60
61
  streaming: false,
61
62
  output: parsed.inlineOutputs.get(tc.id) ?? undefined,
62
63
  images: parsed.inlineImages.get(tc.id),
63
- }),
64
+ })),
64
65
  );
65
66
  return {
66
67
  thinking: parsed.thinking,