@kabmo-labs/kabmo 0.40.0 → 0.42.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 (326) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +533 -517
  3. package/dist/client/static/js/{CsvGrid-j9nvnhq1.js → CsvGrid-20k047ht.js} +2 -2
  4. package/dist/client/static/js/{DocxView-87gnpm81.js → DocxView-qpvhfcmg.js} +5 -5
  5. package/dist/client/static/js/{DrawioView-a351t8f8.js → DrawioView-178skky8.js} +2 -2
  6. package/dist/client/static/js/ImageView-460th5qa.js +1 -0
  7. package/dist/client/static/js/LayoutWrapper-5cv0dty8.js +2 -0
  8. package/dist/client/static/js/Modal-wks6p4r5.js +38 -0
  9. package/dist/client/static/js/{PdfView-n6bwcvc8.js → PdfView-y51g03nr.js} +1 -1
  10. package/dist/client/static/js/SessionsView-rsmvn7ks.js +1 -0
  11. package/dist/client/static/js/{SheetView-k8ymr87w.js → SheetView-z7yvb05v.js} +25 -25
  12. package/dist/client/static/js/{SvgPreview-5pcp444e.js → SvgPreview-yehgzhem.js} +1 -1
  13. package/dist/client/static/js/{abnfDiagram-O67JEVCF-psav75bx.js → abnfDiagram-O67JEVCF-6zxpcy8b.js} +1 -1
  14. package/dist/client/static/js/architecture-7GRP2DOG-9q06651f.js +1 -0
  15. package/dist/client/static/js/architectureDiagram-NJMV4G6O-m98sgh3c.js +36 -0
  16. package/dist/client/static/js/{astro-0rh34hha.js → astro-nn7xg0we.js} +1 -1
  17. package/dist/client/static/js/bash-fjzhxy10.js +1 -0
  18. package/dist/client/static/js/{blockDiagram-BEXU5L5S-17xsf182.js → blockDiagram-BEXU5L5S-cp7rervg.js} +5 -5
  19. package/dist/client/static/js/c-wqtyezvw.js +1 -0
  20. package/dist/client/static/js/c4Diagram-YGBWAQC7-t31recqm.js +38 -0
  21. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-663z1g1r.js → classDiagram-v2-NBCMYWYE-fy8x3dkx.js} +5 -5
  22. package/dist/client/static/js/{cose-bilkent-JH36ORCC-vp4yvx8x.js → cose-bilkent-JH36ORCC-va7ybm9e.js} +1 -1
  23. package/dist/client/static/js/cpp-y0nzwner.js +1 -0
  24. package/dist/client/static/js/css-a13jmmnc.js +1 -0
  25. package/dist/client/static/js/css-n2waj098.js +1 -0
  26. package/dist/client/static/js/cynefin-OW5HDTMX-w7a38g4g.js +1 -0
  27. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-dagkrjbh.js → cynefinDiagram-VND7K2PF-4k0k429c.js} +2 -2
  28. package/dist/client/static/js/{dagre-6A5THRUB-8qgwpb5a.js → dagre-6A5THRUB-ykdhxq6t.js} +2 -2
  29. package/dist/client/static/js/{diagram-22UHCM2B-671xtp0d.js → diagram-22UHCM2B-5nvwx7b6.js} +8 -8
  30. package/dist/client/static/js/{diagram-3UASUU5V-8nn5fha8.js → diagram-3UASUU5V-hc7zsjgw.js} +1 -1
  31. package/dist/client/static/js/diagram-ATOU4E4O-97ae07y7.js +3 -0
  32. package/dist/client/static/js/diagram-CDSNMT55-b56nnbbs.js +30 -0
  33. package/dist/client/static/js/{diagram-MLGK6HIB-tp6dwxdb.js → diagram-MLGK6HIB-37rygr9k.js} +1 -1
  34. package/dist/client/static/js/{diagram-MPIPVDR6-qgx8c8ee.js → diagram-MPIPVDR6-wv3vhhfk.js} +2 -2
  35. package/dist/client/static/js/{dockerfile-hk0s4qaw.js → dockerfile-0efb1z6e.js} +1 -1
  36. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-nmf9r33z.js → ebnfDiagram-ZINNZB2B-13fv7vxg.js} +1 -1
  37. package/dist/client/static/js/{elixir-gpez1k9m.js → elixir-mabagxwa.js} +1 -1
  38. package/dist/client/static/js/{elk-276RUBZZ-dheh5ngz.js → elk-276RUBZZ-xam60ktz.js} +1 -1
  39. package/dist/client/static/js/{erDiagram-OPXOYQCR-8837mk18.js → erDiagram-OPXOYQCR-24ctv2ee.js} +6 -6
  40. package/dist/client/static/js/{erlang-w9gmf866.js → erlang-zwy7cqdk.js} +1 -1
  41. package/dist/client/static/js/eventmodeling-NTZA5JFV-6wrjccyw.js +1 -0
  42. package/dist/client/static/js/flowDiagram-KWPJA3E3-19vjkg84.js +1 -0
  43. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-g68mvnje.js → ganttDiagram-FUAMR5RP-766a8fqw.js} +2 -2
  44. package/dist/client/static/js/gitGraph-4MIJSDKK-4je2p50v.js +1 -0
  45. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-ymk81cdj.js → gitGraphDiagram-X574FWY7-fmwjkgh6.js} +2 -2
  46. package/dist/client/static/js/graphql-gvb7e2eb.js +1 -0
  47. package/dist/client/static/js/html-bwyt0ayy.js +1 -0
  48. package/dist/client/static/js/{index-rc8wrs2a.js → index-03pyvmcz.js} +2 -2
  49. package/dist/client/static/js/index-13dr1t1r.js +314 -0
  50. package/dist/client/static/js/{index-mxpgfj6p.js → index-13xbwcbz.js} +2 -2
  51. package/dist/client/static/js/{index-4j5jwb54.js → index-1c0pnsjd.js} +2 -2
  52. package/dist/client/static/js/index-1rxa9zxp.js +1 -0
  53. package/dist/client/static/js/{index-aznkfx1z.js → index-2hpy58d0.js} +2 -2
  54. package/dist/client/static/js/{index-4j1g7m8g.js → index-2x9eqztp.js} +1 -1
  55. package/dist/client/static/js/{index-vv9ytx0t.js → index-4cncqz8j.js} +2 -2
  56. package/dist/client/static/js/index-4j8rgr4p.js +1 -0
  57. package/dist/client/static/js/{index-pp6mss9b.js → index-4mstdh41.js} +3 -3
  58. package/dist/client/static/js/index-4z4ax55k.js +12 -0
  59. package/dist/client/static/js/{index-q1bqg4f6.js → index-6ge6gk9w.js} +1 -1
  60. package/dist/client/static/js/{index-c003wb3r.js → index-7t63akyt.js} +1 -1
  61. package/dist/client/static/js/{index-ys4t1am4.js → index-8b3t2y77.js} +2 -2
  62. package/dist/client/static/js/index-8hgm0abr.js +474 -0
  63. package/dist/client/static/js/index-8jqawh3r.js +2 -0
  64. package/dist/client/static/js/index-95en3p3g.js +9 -0
  65. package/dist/client/static/js/{index-dj7y2df7.js → index-97qst4k9.js} +2 -2
  66. package/dist/client/static/js/{index-018ehs1n.js → index-9vdbnvmk.js} +1 -1
  67. package/dist/client/static/js/{index-harsfp4x.js → index-a9t9gdew.js} +9 -9
  68. package/dist/client/static/js/{index-8888hgj8.js → index-b4y5g48d.js} +5 -5
  69. package/dist/client/static/js/{index-gx2xefdg.js → index-czagykbq.js} +2 -2
  70. package/dist/client/static/js/{index-r1fe56cn.js → index-dfqmwm7j.js} +2 -2
  71. package/dist/client/static/js/{index-cccrappc.js → index-dydwcp3n.js} +2 -2
  72. package/dist/client/static/js/{index-jy91r3ap.js → index-e1yz59fa.js} +2 -2
  73. package/dist/client/static/js/{index-ce4vytm6.js → index-e6any867.js} +2 -2
  74. package/dist/client/static/js/{index-wy05jt00.js → index-ejdnjh5c.js} +2 -2
  75. package/dist/client/static/js/index-f4vr1c6e.css +1 -0
  76. package/dist/client/static/js/{index-9wjnbb3q.js → index-feffxxss.js} +2 -2
  77. package/dist/client/static/js/{index-547h1b8j.js → index-grczkttn.js} +13 -13
  78. package/dist/client/static/js/{index-s78n0dtv.js → index-hga3e13s.js} +2 -2
  79. package/dist/client/static/js/{index-d1vearmk.js → index-hw14rhen.js} +2 -2
  80. package/dist/client/static/js/index-hzwr5fm9.js +4 -0
  81. package/dist/client/static/js/{index-sj4y8kj2.js → index-j17h4z6f.js} +2 -2
  82. package/dist/client/static/js/{index-y5hxhr7q.js → index-ka2rc2cr.js} +5 -5
  83. package/dist/client/static/js/{index-b612vske.js → index-ktbrmp29.js} +2 -2
  84. package/dist/client/static/js/{index-ag78jnva.js → index-nbexks3x.js} +1 -1
  85. package/dist/client/static/js/{index-vwc8pdy3.js → index-nh29fkk9.js} +2 -2
  86. package/dist/client/static/js/{index-gn92c6hp.js → index-p0ez6hqd.js} +2 -2
  87. package/dist/client/static/js/{index-173x4bh0.js → index-pkes9492.js} +2 -2
  88. package/dist/client/static/js/{index-fg965t62.js → index-pysqpc5n.js} +2 -2
  89. package/dist/client/static/js/index-qj34r6d0.js +1 -0
  90. package/dist/client/static/js/{index-ek4gwrm8.js → index-qx6x4z0y.js} +2 -2
  91. package/dist/client/static/js/{index-agdbjh5k.js → index-r8cc80w5.js} +2 -2
  92. package/dist/client/static/js/{index-2kg3r5jw.js → index-rab39785.js} +2 -2
  93. package/dist/client/static/js/{index-haaz8t7e.js → index-sk9ej289.js} +2 -2
  94. package/dist/client/static/js/{index-8ggxxp8c.js → index-sq3r1xhf.js} +2 -2
  95. package/dist/client/static/js/{index-wsqgp9jw.js → index-sx809d6d.js} +2 -2
  96. package/dist/client/static/js/{index-p2812ygk.js → index-sz3mxjvy.js} +1 -1
  97. package/dist/client/static/js/{index-69xe17c1.js → index-tqycj126.js} +2 -2
  98. package/dist/client/static/js/{index-js81yrmy.js → index-vcn1kcpy.js} +3 -3
  99. package/dist/client/static/js/{index-rvjc19x7.js → index-x7f5ysch.js} +2 -2
  100. package/dist/client/static/js/index-xe5cqwnf.js +1 -0
  101. package/dist/client/static/js/index-xxe52zrm.js +2 -0
  102. package/dist/client/static/js/{index-ek7hqfp0.js → index-yvxa7hd8.js} +2 -2
  103. package/dist/client/static/js/{index-qw5aqk2d.js → index-z6kpc98a.js} +1 -1
  104. package/dist/client/static/js/{index-yzg9mbsv.js → index-zjydzxhm.js} +1 -1
  105. package/dist/client/static/js/{index-6wtx7a9x.js → index-zvazj4va.js} +2 -2
  106. package/dist/client/static/js/info-A6RAGUB7-k0z5qdew.js +1 -0
  107. package/dist/client/static/js/{infoDiagram-VRGFBTTK-11trzn8c.js → infoDiagram-VRGFBTTK-tqytmzp1.js} +1 -1
  108. package/dist/client/static/js/ini-2gvjwh83.js +1 -0
  109. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-8xnnymb5.js → ishikawaDiagram-OU5B5YK6-rp77ff6m.js} +1 -1
  110. package/dist/client/static/js/java-1xwcq79s.js +1 -0
  111. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-wd47j0hy.js → journeyDiagram-ZHPQQLJL-c7bxrhf1.js} +2 -2
  112. package/dist/client/static/js/json-4pqjabgq.js +1 -0
  113. package/dist/client/static/js/jsx-wcsss15s.js +1 -0
  114. package/dist/client/static/js/{julia-c2q0vwpd.js → julia-2eekpjq8.js} +1 -1
  115. package/dist/client/static/js/{kanban-definition-PNTS6WVX-s5rgcp44.js → kanban-definition-PNTS6WVX-j2pxewqq.js} +8 -8
  116. package/dist/client/static/js/lua-h7vjcn0h.js +1 -0
  117. package/dist/client/static/js/markdown-f30jjjh9.js +1 -0
  118. package/dist/client/static/js/{mermaid.core-9fxp8nt2.js → mermaid.core-cqqe1krg.js} +6 -6
  119. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-4fyewtst.js → mindmap-definition-NLK3R4M7-s03k32p9.js} +9 -9
  120. package/dist/client/static/js/one-dark-pro-9tt0a020.js +1 -0
  121. package/dist/client/static/js/one-light-5fg4r0ra.js +1 -0
  122. package/dist/client/static/js/packet-AYTQ26CC-6cnvmb2z.js +1 -0
  123. package/dist/client/static/js/{pegDiagram-GJSIUBJH-s2xe2e2k.js → pegDiagram-GJSIUBJH-dfg2j0zc.js} +1 -1
  124. package/dist/client/static/js/{perl-6pa0tn3b.js → perl-5vxax0nr.js} +1 -1
  125. package/dist/client/static/js/{php-1zy994pz.js → php-hgrgdq63.js} +1 -1
  126. package/dist/client/static/js/pie-WAS4IAKB-m9z1mztn.js +1 -0
  127. package/dist/client/static/js/{pieDiagram-5QR66LMP-1szpjbzy.js → pieDiagram-5QR66LMP-pshd1j79.js} +1 -1
  128. package/dist/client/static/js/properties-ymexza6q.js +1 -0
  129. package/dist/client/static/js/python-31ycwa66.js +1 -0
  130. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-mv3ee2qa.js → quadrantDiagram-O4NWA36T-cvvvmtk2.js} +4 -4
  131. package/dist/client/static/js/r-t2nne4xp.js +1 -0
  132. package/dist/client/static/js/radar-RG4KPBEZ-8m9rkex6.js +1 -0
  133. package/dist/client/static/js/railroad-74A4TZTK-wc55emj8.js +1 -0
  134. package/dist/client/static/js/railroad-abnf-HS5TGJTU-2y2rnrzq.js +1 -0
  135. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-zzcc9x0v.js +1 -0
  136. package/dist/client/static/js/railroad-peg-WCYAUIDC-z82na5nb.js +1 -0
  137. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-hgdqjpm9.js → railroadDiagram-XR7U4H2S-h53p3sha.js} +1 -1
  138. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-yrfjp9wx.js → requirementDiagram-PLB6GJNP-bdv2fkxd.js} +4 -4
  139. package/dist/client/static/js/{ruby-arvs7kz4.js → ruby-8pxcn21w.js} +1 -1
  140. package/dist/client/static/js/{rust-3ahjk339.js → rust-j80dxgjg.js} +1 -1
  141. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-k7k871xa.js → sankeyDiagram-IPEJSGJF-xqnnvmhy.js} +2 -2
  142. package/dist/client/static/js/{sass-cmkf7nwd.js → sass-bm32bb5k.js} +1 -1
  143. package/dist/client/static/js/{scss-x7ddw6gb.js → scss-e2dndbfa.js} +1 -1
  144. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-gd80m0as.js → sequenceDiagram-PO4LG4MO-3p67305f.js} +10 -10
  145. package/dist/client/static/js/{sizeCapture-INFHLROL-jv6p4834.js → sizeCapture-INFHLROL-f87525h7.js} +1 -1
  146. package/dist/client/static/js/sql-bwnasywx.js +1 -0
  147. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-tvphxq2h.js → stateDiagram-v2-GCMORJYK-e5st1fy3.js} +6 -6
  148. package/dist/client/static/js/{svelte-0hv6pak2.js → svelte-ztkaww47.js} +1 -1
  149. package/dist/client/static/js/{swimlanes-2SLR337P-3dt7nxj2.js → swimlanes-2SLR337P-ceghkbez.js} +1 -1
  150. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-vc8hvfya.js +8 -0
  151. package/dist/client/static/js/{timeline-definition-EJHVYXUP-40vvf856.js → timeline-definition-EJHVYXUP-f7evs443.js} +3 -3
  152. package/dist/client/static/js/treeView-Q6P3EWNA-kzh6cm3f.js +1 -0
  153. package/dist/client/static/js/treemap-WGGIJYW6-wz5ed560.js +1 -0
  154. package/dist/client/static/js/tsx-zfy727zs.js +1 -0
  155. package/dist/client/static/js/typescript-p3syh43m.js +1 -0
  156. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-g1j5x0xh.js → usecaseDiagram-POWQR4AR-0gpn21p7.js} +27 -27
  157. package/dist/client/static/js/{vennDiagram-UO4OBE2U-5b8789qk.js → vennDiagram-UO4OBE2U-4spzy428.js} +3 -3
  158. package/dist/client/static/js/{vue-zccj3qa5.js → vue-xm1dxpmy.js} +1 -1
  159. package/dist/client/static/js/wardley-WFR3VGLG-zewbfccz.js +1 -0
  160. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-c7x3za3w.js → wardleyDiagram-VNRHLVJA-745xr2pa.js} +4 -4
  161. package/dist/client/static/js/xml-4enq788a.js +1 -0
  162. package/dist/client/static/js/xychartDiagram-PMCCYNJV-7dr9qwx5.js +7 -0
  163. package/dist/client/static/js/yaml-pjtt3jsc.js +1 -0
  164. package/package.json +1 -1
  165. package/src/client/components/common/batch-selection/folder-state.ts +2 -2
  166. package/src/client/components/common/server-control/Panel.tsx +16 -5
  167. package/src/client/components/common/server-control/index.test.tsx +63 -9
  168. package/src/client/components/common/session-row/TrailingSlot.tsx +8 -0
  169. package/src/client/components/common/session-row/index.tsx +16 -9
  170. package/src/client/components/layout/desktop-layout/LeftColumn.tsx +7 -0
  171. package/src/client/components/layout/session-sidebar/CategoryItem.tsx +1 -1
  172. package/src/client/components/layout/session-sidebar/ClassicView.tsx +13 -0
  173. package/src/client/components/layout/session-sidebar/HarnessFilter.tsx +175 -0
  174. package/src/client/components/layout/session-sidebar/SessionList.tsx +9 -1
  175. package/src/client/components/layout/session-sidebar/SessionsView.tsx +8 -1
  176. package/src/client/components/layout/session-sidebar/about-modal/index.test.tsx +1 -1
  177. package/src/client/components/layout/session-sidebar/harness-filter.test.tsx +173 -0
  178. package/src/client/components/layout/session-sidebar/modern/FilterChips.tsx +63 -18
  179. package/src/client/components/layout/session-sidebar/modern/SearchField.tsx +1 -1
  180. package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +21 -12
  181. package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +1 -1
  182. package/src/client/components/layout/session-sidebar/modern/index.tsx +11 -2
  183. package/src/client/components/layout/session-sidebar/modern/search-field.test.tsx +96 -0
  184. package/src/client/components/layout/session-sidebar/session-list-states.test.tsx +3 -0
  185. package/src/client/components/layout/session-sidebar/variant-props.ts +7 -0
  186. package/src/client/components/mobile/SessionSidebar.tsx +14 -21
  187. package/src/client/components/mobile/mobile-session-sidebar/ClassicDrawer.tsx +19 -0
  188. package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +1 -1
  189. package/src/client/components/settings/categories/omp-settings/EngineHeader.tsx +1 -1
  190. package/src/client/components/workspace/chat-timeline/MessageList.test.ts +19 -19
  191. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.image.test.ts +147 -0
  192. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.test.ts +51 -83
  193. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.tsx +44 -63
  194. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/ReadDirectory.tsx +72 -0
  195. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/ReadImage.tsx +51 -0
  196. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/read-test-util.ts +91 -0
  197. package/src/client/components/workspace/git-panel/commit-modal/CommitRow.test.ts +80 -62
  198. package/src/client/components/workspace/git-panel/commit-modal/CommitRow.tsx +15 -33
  199. package/src/client/components/workspace/git-panel/commit-modal/Header.tsx +1 -1
  200. package/src/client/components/workspace/terminal-panel/copy.test.ts +179 -0
  201. package/src/client/components/workspace/terminal-panel/copy.ts +76 -0
  202. package/src/client/components/workspace/terminal-panel/mount.ts +13 -0
  203. package/src/client/data/settings/omp-schema.json +39 -18
  204. package/src/client/hooks/chat/omp/pending-child.test.ts +1 -1
  205. package/src/client/hooks/chat/omp/session-sidebar-controller.test.ts +61 -0
  206. package/src/client/hooks/chat/omp/session-sidebar-controller.ts +37 -39
  207. package/src/client/hooks/chat/omp/sidebar-filter.ts +62 -0
  208. package/src/client/hooks/chat/timeline/session-changes.test.ts +85 -0
  209. package/src/client/hooks/chat/timeline/session-changes.ts +8 -5
  210. package/src/client/hooks/commands/use-command-runtime.ts +15 -0
  211. package/src/client/hooks/shell/servers.ts +60 -2
  212. package/src/client/hooks/ui/updates/check-request.ts +41 -0
  213. package/src/client/hooks/ui/updates/index.ts +13 -5
  214. package/src/client/hooks/ui/updates/mobile-flow.ts +56 -0
  215. package/src/client/lib/native/run-command.test.ts +95 -0
  216. package/src/client/lib/native/run-command.ts +52 -0
  217. package/src/client/lib/router/open-session.test.ts +26 -1
  218. package/src/client/lib/router/open-session.ts +21 -0
  219. package/src/client/main.tsx +9 -0
  220. package/src/client/tailwind.css +58 -0
  221. package/src/server/lib/changes/capture-shell.test.ts +253 -0
  222. package/src/server/lib/changes/capture-targets.test.ts +83 -0
  223. package/src/server/lib/changes/capture-targets.ts +51 -0
  224. package/src/server/lib/changes/capture-write.server.ts +2 -2
  225. package/src/server/lib/changes/capture.server.ts +14 -29
  226. package/src/server/lib/changes/capture.test.ts +69 -149
  227. package/src/server/lib/changes/patch-paths.ts +37 -0
  228. package/src/server/lib/harness/acp/commands.test.ts +1 -0
  229. package/src/server/lib/harness/acp/commands.ts +12 -4
  230. package/src/server/lib/harness/acp/replay-transcript.ts +32 -13
  231. package/src/server/lib/harness/acp/session-transcript.server.test.ts +162 -0
  232. package/src/server/lib/harness/acp/session-transcript.server.ts +350 -0
  233. package/src/server/lib/harness/acp/session.ts +6 -1
  234. package/src/server/lib/harness/schema.server.ts +18 -0
  235. package/src/server/lib/harness/spawn.server.ts +14 -1
  236. package/src/server/lib/models/provider-icon-fetch.ts +2 -2
  237. package/src/server/lib/models/provider-icon-parse.test.ts +0 -12
  238. package/src/server/lib/models/provider-icon-parse.ts +0 -8
  239. package/src/server/lib/omp/rpc/frame-fold.test.ts +16 -1
  240. package/src/server/lib/omp/rpc/frame-fold.ts +17 -4
  241. package/src/server/lib/omp/session/blobs.server.test.ts +34 -0
  242. package/src/server/lib/omp/session/blobs.server.ts +8 -3
  243. package/src/server/lib/omp/session/delete.server.ts +4 -0
  244. package/src/server/lib/omp/session/sidebar-activity.server.test.ts +2 -1
  245. package/src/server/routes/agent/harness-command.test.ts +71 -0
  246. package/src/server/routes/agent/harness-command.ts +27 -13
  247. package/src/server/routes/chat/imported.ts +5 -2
  248. package/src/server/routes/chat/live-meta.ts +42 -0
  249. package/src/server/routes/chat/session.test.ts +110 -0
  250. package/src/server/routes/chat/session.ts +31 -34
  251. package/src/shared/lib/chat/transcript-rows.ts +22 -0
  252. package/src/shared/lib/commands/catalog.test.ts +36 -0
  253. package/src/shared/lib/commands/catalog.ts +16 -0
  254. package/src/shared/lib/fs/file-kind.test.ts +46 -3
  255. package/src/shared/lib/fs/file-kind.ts +40 -9
  256. package/src/shared/lib/omp/config/schema-releases.test.ts +29 -0
  257. package/src/shared/lib/updates/popup-state.ts +11 -0
  258. package/src/shared/lib/workspace/harness-filter.test.ts +89 -0
  259. package/src/shared/lib/workspace/harness-filter.ts +75 -0
  260. package/src/{client/lib → shared/lib/workspace}/session-tree.test.ts +1 -1
  261. package/src/shared/lib/workspace/session-visibility.test.ts +71 -0
  262. package/src/shared/lib/workspace/session-visibility.ts +48 -23
  263. package/src/shared/lib/workspace/sidebar-filter-row.test.ts +64 -23
  264. package/src/shared/lib/workspace/sidebar-filter-row.ts +89 -31
  265. package/dist/client/static/js/ImageView-c139r891.js +0 -1
  266. package/dist/client/static/js/LayoutWrapper-08axzr3a.js +0 -2
  267. package/dist/client/static/js/Modal-0weqfqvk.js +0 -38
  268. package/dist/client/static/js/SessionsView-awef8ehj.js +0 -1
  269. package/dist/client/static/js/architecture-7GRP2DOG-6rbq97t9.js +0 -1
  270. package/dist/client/static/js/architectureDiagram-NJMV4G6O-9bk6ykn7.js +0 -36
  271. package/dist/client/static/js/bash-vv2ysp0a.js +0 -1
  272. package/dist/client/static/js/c-67jyc7sg.js +0 -1
  273. package/dist/client/static/js/c4Diagram-YGBWAQC7-jn9j4n04.js +0 -38
  274. package/dist/client/static/js/cpp-crfbnwv8.js +0 -1
  275. package/dist/client/static/js/css-983fbv00.js +0 -1
  276. package/dist/client/static/js/css-zj4qzw6r.js +0 -1
  277. package/dist/client/static/js/cynefin-OW5HDTMX-zafxcz2k.js +0 -1
  278. package/dist/client/static/js/diagram-ATOU4E4O-dnar0ktg.js +0 -3
  279. package/dist/client/static/js/diagram-CDSNMT55-bt0fhk7n.js +0 -30
  280. package/dist/client/static/js/eventmodeling-NTZA5JFV-cq3dvz7e.js +0 -1
  281. package/dist/client/static/js/flowDiagram-KWPJA3E3-spzh2jxq.js +0 -1
  282. package/dist/client/static/js/gitGraph-4MIJSDKK-epgk26pj.js +0 -1
  283. package/dist/client/static/js/graphql-dewsj5g1.js +0 -1
  284. package/dist/client/static/js/html-1cpe2xc8.js +0 -1
  285. package/dist/client/static/js/index-bdz08fe2.js +0 -12
  286. package/dist/client/static/js/index-bgpcf3mr.js +0 -1
  287. package/dist/client/static/js/index-bj3wn9je.js +0 -1
  288. package/dist/client/static/js/index-dhrp656p.js +0 -1
  289. package/dist/client/static/js/index-g10nr8m6.js +0 -9
  290. package/dist/client/static/js/index-j4ks5s41.js +0 -474
  291. package/dist/client/static/js/index-jqs23cc7.css +0 -1
  292. package/dist/client/static/js/index-qnt118mp.js +0 -2
  293. package/dist/client/static/js/index-qntpsp98.js +0 -2
  294. package/dist/client/static/js/index-w130cs7d.js +0 -1
  295. package/dist/client/static/js/index-wv36ddd5.js +0 -314
  296. package/dist/client/static/js/index-y82bk3hr.js +0 -4
  297. package/dist/client/static/js/info-A6RAGUB7-0an46pag.js +0 -1
  298. package/dist/client/static/js/ini-09e0scxh.js +0 -1
  299. package/dist/client/static/js/java-vnaesxzs.js +0 -1
  300. package/dist/client/static/js/json-g5ggnd94.js +0 -1
  301. package/dist/client/static/js/jsx-xz71aed4.js +0 -1
  302. package/dist/client/static/js/lua-e4wenyzt.js +0 -1
  303. package/dist/client/static/js/markdown-yv3p1p7m.js +0 -1
  304. package/dist/client/static/js/one-dark-pro-ahch85zb.js +0 -1
  305. package/dist/client/static/js/one-light-9706jgqt.js +0 -1
  306. package/dist/client/static/js/packet-AYTQ26CC-5e397pav.js +0 -1
  307. package/dist/client/static/js/pie-WAS4IAKB-0zzmzg64.js +0 -1
  308. package/dist/client/static/js/properties-0ag74bdj.js +0 -1
  309. package/dist/client/static/js/python-zsn5tdbj.js +0 -1
  310. package/dist/client/static/js/r-mwtqhnw3.js +0 -1
  311. package/dist/client/static/js/radar-RG4KPBEZ-mtar9742.js +0 -1
  312. package/dist/client/static/js/railroad-74A4TZTK-d6a6j9fq.js +0 -1
  313. package/dist/client/static/js/railroad-abnf-HS5TGJTU-1257kd8x.js +0 -1
  314. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-v8b6qmas.js +0 -1
  315. package/dist/client/static/js/railroad-peg-WCYAUIDC-jxpbx410.js +0 -1
  316. package/dist/client/static/js/sql-aczp05f2.js +0 -1
  317. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-aqnh1hhp.js +0 -8
  318. package/dist/client/static/js/treeView-Q6P3EWNA-q3qr7ew7.js +0 -1
  319. package/dist/client/static/js/treemap-WGGIJYW6-zgbdydeq.js +0 -1
  320. package/dist/client/static/js/tsx-s1shkfg9.js +0 -1
  321. package/dist/client/static/js/typescript-htx9v6bf.js +0 -1
  322. package/dist/client/static/js/wardley-WFR3VGLG-b230aajh.js +0 -1
  323. package/dist/client/static/js/xml-23y6pgvx.js +0 -1
  324. package/dist/client/static/js/xychartDiagram-PMCCYNJV-h0fy45tg.js +0 -7
  325. package/dist/client/static/js/yaml-vrayja34.js +0 -1
  326. /package/src/{client/lib → shared/lib/workspace}/session-tree.ts +0 -0
@@ -0,0 +1,7 @@
1
+ import{t,l,jt,V,C,ee,te,R,F,z,P,U,q,j,po,jn,Fs,ue,se,qf}from"./index-13dr1t1r.js";import{sa}from"./index-zvazj4va.js";function Rt(e,i,s){e=+e,i=+i,s=(a=arguments.length)<2?(i=e,e=0,1):a<3?1:+s;var n=-1,a=Math.max(0,Math.ceil((i-e)/s))|0,h=Array(a);while(++n<a)h[n]=e+n*s;return h}function ct(){var e=jn().unknown(void 0),{domain:i,range:s}=e,n=0,a=1,h,c,x=!1,f=0,_=0,v=0.5;delete e.unknown;function T(){var y=i().length,W=a<n,I=W?a:n,M=W?n:a;if(h=(M-I)/Math.max(1,y-f+_*2),x)h=Math.floor(h);if(I+=(M-I-h*(y-f))*v,c=h*(1-f),x)I=Math.round(I),c=Math.round(c);var X=Rt(y).map(function(Z){return I+h*Z});return s(W?X.reverse():X)}return e.domain=function(y){return arguments.length?(i(y),T()):i()},e.range=function(y){return arguments.length?([n,a]=y,n=+n,a=+a,T()):[n,a]},e.rangeRound=function(y){return[n,a]=y,n=+n,a=+a,x=!0,T()},e.bandwidth=function(){return c},e.step=function(){return h},e.round=function(y){return arguments.length?(x=!!y,T()):x},e.padding=function(y){return arguments.length?(f=Math.min(1,_=+y),T()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),T()):f},e.paddingOuter=function(y){return arguments.length?(_=+y,T()):_},e.align=function(y){return arguments.length?(v=Math.max(0,Math.min(1,y)),T()):v},e.copy=function(){return ct(i(),[n,a]).round(x).paddingInner(f).paddingOuter(_).align(v)},po.apply(T(),arguments)}var _t=function(){var e=t(function(G,r,g,d){for(g=g||{},d=G.length;d--;g[G[d]]=r);return g},"o"),i=[1,10,12,14,16,18,19,21,23],s=[2,6],n=[1,3],a=[1,5],h=[1,6],c=[1,7],x=[1,5,10,12,14,16,18,19,21,23,36,37,38],f=[1,25],_=[1,26],v=[1,28],T=[1,29],y=[1,30],W=[1,31],I=[1,32],M=[1,33],X=[1,34],Z=[1,35],tt=[1,36],w=[1,37],Y=[1,43],u=[1,42],N=[1,47],H=[1,50],A=[1,10,12,14,16,18,19,21,23,36,37,38],it=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],B=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],rt=[1,65],L=[26,28],k={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:t(function(r,g,d,p,S,o,st){var m=o.length-1;switch(S){case 5:p.setOrientation(o[m]);break;case 9:p.setDiagramTitle(o[m].text.trim());break;case 12:p.setLineData({text:"",type:"text"},o[m]);break;case 13:p.setLineData(o[m-1],o[m]);break;case 14:p.setBarData({text:"",type:"text"},o[m]);break;case 15:p.setBarData(o[m-1],o[m]);break;case 16:this.$=o[m].trim(),p.setAccTitle(this.$);break;case 17:case 18:this.$=o[m].trim(),p.setAccDescription(this.$);break;case 19:this.$=o[m-1];break;case 20:case 30:this.$=[o[m-2],...o[m]];break;case 21:case 31:this.$=[o[m]];break;case 22:this.$={value:Number(o[m-1]),label:o[m]};break;case 23:this.$={value:Number(o[m]),label:""};break;case 24:p.setXAxisTitle(o[m]);break;case 25:p.setXAxisTitle(o[m-1]);break;case 26:p.setXAxisTitle({type:"text",text:""});break;case 27:p.setXAxisBand(o[m]);break;case 28:p.setXAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 29:this.$=o[m-1];break;case 32:p.setYAxisTitle(o[m]);break;case 33:p.setYAxisTitle(o[m-1]);break;case 34:p.setYAxisTitle({type:"text",text:""});break;case 35:p.setYAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 39:this.$={text:o[m],type:"text"};break;case 40:this.$={text:o[m],type:"text"};break;case 41:this.$={text:o[m],type:"markdown"};break;case 42:this.$=o[m];break;case 43:this.$=o[m-1]+""+o[m];break}},"anonymous"),table:[e(i,s,{3:1,4:2,7:4,5:n,36:a,37:h,38:c}),{1:[3]},e(i,s,{4:2,7:4,3:8,5:n,36:a,37:h,38:c}),e(i,s,{4:2,7:4,6:9,3:10,5:n,8:[1,11],36:a,37:h,38:c}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(x,[2,36]),e(x,[2,37]),e(x,[2,38]),{1:[2,1]},e(i,s,{4:2,7:4,3:21,5:n,36:a,37:h,38:c}),{1:[2,3]},e(x,[2,5]),e(i,[2,7],{4:22,36:a,37:h,38:c}),{11:23,30:f,39:24,40:_,41:27,42:v,43:T,44:y,45:W,46:I,47:M,48:X,49:Z,50:tt,51:w},{11:39,13:38,24:Y,29:u,30:f,31:40,32:41,39:24,40:_,41:27,42:v,43:T,44:y,45:W,46:I,47:M,48:X,49:Z,50:tt,51:w},{11:45,15:44,29:N,30:f,35:46,39:24,40:_,41:27,42:v,43:T,44:y,45:W,46:I,47:M,48:X,49:Z,50:tt,51:w},{11:49,17:48,24:H,30:f,39:24,40:_,41:27,42:v,43:T,44:y,45:W,46:I,47:M,48:X,49:Z,50:tt,51:w},{11:52,17:51,24:H,30:f,39:24,40:_,41:27,42:v,43:T,44:y,45:W,46:I,47:M,48:X,49:Z,50:tt,51:w},{20:[1,53]},{22:[1,54]},e(A,[2,18]),{1:[2,2]},e(A,[2,8]),e(A,[2,9]),e(it,[2,39],{41:55,42:v,43:T,44:y,45:W,46:I,47:M,48:X,49:Z,50:tt,51:w}),e(it,[2,40]),e(it,[2,41]),e(B,[2,42]),e(B,[2,44]),e(B,[2,45]),e(B,[2,46]),e(B,[2,47]),e(B,[2,48]),e(B,[2,49]),e(B,[2,50]),e(B,[2,51]),e(B,[2,52]),e(B,[2,53]),e(A,[2,10]),e(A,[2,24],{32:41,31:56,24:Y,29:u}),e(A,[2,26]),e(A,[2,27]),{33:[1,57]},{11:59,30:f,34:58,39:24,40:_,41:27,42:v,43:T,44:y,45:W,46:I,47:M,48:X,49:Z,50:tt,51:w},e(A,[2,11]),e(A,[2,32],{35:60,29:N}),e(A,[2,34]),{33:[1,61]},e(A,[2,12]),{17:62,24:H},{25:63,27:64,29:rt},e(A,[2,14]),{17:66,24:H},e(A,[2,16]),e(A,[2,17]),e(B,[2,43]),e(A,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(A,[2,33]),{29:[1,70]},e(A,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(L,[2,23],{30:[1,73]}),e(A,[2,15]),e(A,[2,28]),e(A,[2,29]),{11:59,30:f,34:74,39:24,40:_,41:27,42:v,43:T,44:y,45:W,46:I,47:M,48:X,49:Z,50:tt,51:w},e(A,[2,35]),e(A,[2,19]),{25:75,27:64,29:rt},e(L,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:t(function(r,g){if(g.recoverable)this.trace(r);else{var d=Error(r);throw d.hash=g,d}},"parseError"),parse:t(function(r){var g=this,d=[0],p=[],S=[null],o=[],st=this.table,m="",xt=0,Vt=0,Ft=0,xe=2,Wt=1,fe=o.slice.call(arguments,1),E=Object.create(this.lexer),nt={yy:{}};for(var wt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,wt))nt.yy[wt]=this.yy[wt];if(E.setInput(r,nt.yy),nt.yy.lexer=E,nt.yy.parser=this,typeof E.yylloc>"u")E.yylloc={};var kt=E.yylloc;o.push(kt);var pe=E.options&&E.options.ranges;if(typeof nt.yy.parseError==="function")this.parseError=nt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function me(K){d.length=d.length-2*K,S.length=S.length-K,o.length=o.length-K}t(me,"popStack");function Xt(){var K=p.pop()||E.lex()||Wt;if(typeof K!=="number"){if(K instanceof Array)p=K,K=p.pop();K=g.symbols_[K]||K}return K}t(Xt,"lex");var O,At,at,Q,Be,Ct,ht={},ft,et,Nt,pt;while(!0){if(at=d[d.length-1],this.defaultActions[at])Q=this.defaultActions[at];else{if(O===null||typeof O>"u")O=Xt();Q=st[at]&&st[at][O]}if(typeof Q>"u"||!Q.length||!Q[0]){var St="";pt=[];for(ft in st[at])if(this.terminals_[ft]&&ft>xe)pt.push("'"+this.terminals_[ft]+"'");if(E.showPosition)St="Parse error on line "+(xt+1)+`:
2
+ `+E.showPosition()+`
3
+ Expecting `+pt.join(", ")+", got '"+(this.terminals_[O]||O)+"'";else St="Parse error on line "+(xt+1)+": Unexpected "+(O==Wt?"end of input":"'"+(this.terminals_[O]||O)+"'");this.parseError(St,{text:E.match,token:this.terminals_[O]||O,line:E.yylineno,loc:kt,expected:pt})}if(Q[0]instanceof Array&&Q.length>1)throw Error("Parse Error: multiple actions possible at state: "+at+", token: "+O);switch(Q[0]){case 1:if(d.push(O),S.push(E.yytext),o.push(E.yylloc),d.push(Q[1]),O=null,!At){if(Vt=E.yyleng,m=E.yytext,xt=E.yylineno,kt=E.yylloc,Ft>0)Ft--}else O=At,At=null;break;case 2:if(et=this.productions_[Q[1]][1],ht.$=S[S.length-et],ht._$={first_line:o[o.length-(et||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(et||1)].first_column,last_column:o[o.length-1].last_column},pe)ht._$.range=[o[o.length-(et||1)].range[0],o[o.length-1].range[1]];if(Ct=this.performAction.apply(ht,[m,Vt,xt,nt.yy,Q[1],S,o].concat(fe)),typeof Ct<"u")return Ct;if(et)d=d.slice(0,-1*et*2),S=S.slice(0,-1*et),o=o.slice(0,-1*et);d.push(this.productions_[Q[1]][0]),S.push(ht.$),o.push(ht._$),Nt=st[d[d.length-2]][d[d.length-1]],d.push(Nt);break;case 3:return!0}}return!0},"parse")},J=function(){var G={EOF:1,parseError:t(function(g,d){if(this.yy.parser)this.yy.parser.parseError(g,d);else throw Error(g)},"parseError"),setInput:t(function(r,g){if(this.yy=g||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var g=r.match(/(?:\r\n?|\n).*/g);if(g)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),r},"input"),unput:t(function(r){var g=r.length,d=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var p=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1)this.yylineno-=d.length-1;var S=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===p.length?this.yylloc.first_column:0)+p[p.length-d.length].length-d[0].length:this.yylloc.first_column-g},this.options.ranges)this.yylloc.range=[S[0],S[0]+this.yyleng-g];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(r){this.unput(this.match.slice(r))},"less"),pastInput:t(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var r=this.match;if(r.length<20)r+=this._input.substr(0,20-r.length);return(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var r=this.pastInput(),g=Array(r.length+1).join("-");return r+this.upcomingInput()+`
5
+ `+g+"^"},"showPosition"),test_match:t(function(r,g){var d,p,S;if(this.options.backtrack_lexer){if(S={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)S.yylloc.range=this.yylloc.range.slice(0)}if(p=r[0].match(/(?:\r\n?|\n).*/g),p)this.yylineno+=p.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],d=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(d)return d;else if(this._backtrack){for(var o in S)this[o]=S[o];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var r,g,d,p;if(!this._more)this.yytext="",this.match="";var S=this._currentRules();for(var o=0;o<S.length;o++)if(d=this._input.match(this.rules[S[o]]),d&&(!g||d[0].length>g[0].length)){if(g=d,p=o,this.options.backtrack_lexer)if(r=this.test_match(d,S[o]),r!==!1)return r;else if(this._backtrack){g=!1;continue}else return!1;else if(!this.options.flex)break}if(g){if(r=this.test_match(g,S[p]),r!==!1)return r;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var g=this.next();if(g)return g;else return this.lex()},"lex"),begin:t(function(g){this.conditionStack.push(g)},"begin"),popState:t(function(){var g=this.conditionStack.length-1;if(g>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(g){if(g=this.conditionStack.length-1-Math.abs(g||0),g>=0)return this.conditionStack[g];else return"INITIAL"},"topState"),pushState:t(function(g){this.begin(g)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(g,d,p,S){var o=S;switch(p){case 0:break;case 1:break;case 2:return this.popState(),36;break;case 3:return this.popState(),36;break;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 33;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 29;case 25:return this.popState(),26;break;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return G}();k.lexer=J;function D(){this.yy={}}return t(D,"Parser"),D.prototype=k,k.Parser=D,new D}();_t.parser=_t;var be=_t;function mt(e){return e.type==="bar"}t(mt,"isBarPlot");function bt(e){return e.type==="band"}t(bt,"isBandAxisData");function lt(e){return e.type==="linear"}t(lt,"isLinearAxisData");var Pt=class{constructor(e){this.parentGroup=e}static{t(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,i){if(!this.parentGroup)return{width:e.reduce((a,h)=>Math.max(h.length,a),0)*i,height:i};let s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(let a of e){let h=qf(n,1,a),c=h?h.width:a.length*i,x=h?h.height:i;s.width=Math.max(s.width,c),s.height=Math.max(s.height,x)}return n.remove(),s}},Yt=0.7,Ht=0.2,$t=class{constructor(e,i,s,n){this.axisConfig=e,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{t(this,"BaseAxis")}setRange(e){if(this.range=e,this.axisPosition==="left"||this.axisPosition==="right")this.boundingRect.height=e[1]-e[0];else this.boundingRect.width=e[1]-e[0];this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((e)=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){if(Yt*this.getTickDistance()>this.outerPadding*2)this.outerPadding=Math.floor(Yt*this.getTickDistance()/2);this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let i=e.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Ht*e.width;this.outerPadding=Math.min(s.width/2,n);let a=s.height;if(this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0)a=Math.max(a,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*s.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*s.height));if(a+=this.axisConfig.labelPadding*2,this.labelTextHeight=s.height,a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=e.width,this.boundingRect.height=e.height-i}calculateSpaceIfDrawnVertical(e){let i=e.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Ht*e.height;this.outerPadding=Math.min(s.height/2,n);let a=s.width+this.axisConfig.labelPadding*2;if(a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=e.width-i,this.boundingRect.height=e.height}calculateSpace(e){if(this.axisPosition==="left"||this.axisPosition==="right")this.calculateSpaceIfDrawnVertical(e);else this.calculateSpaceIfDrawnHorizontally(e);return this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let i=this.normalizedLabelRotationInRad;if(i===0)return 0;return Math.sin(i)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))});if(this.showTick){let i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let i=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");if(this.axisPosition==="bottom")return this.getDrawableElementsForBottomAxis();if(this.axisPosition==="top")return this.getDrawableElementsForTopAxis();return[]}},ye=class extends $t{static{t(this,"BandAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.categories=s,this.scale=ct().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=ct().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5),l.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},we=class extends $t{static{t(this,"LinearAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.domain=s,this.scale=sa().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];if(this.axisPosition==="left")e.reverse();this.scale=sa().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function Tt(e,i,s,n){let a=new Pt(n);if(bt(e))return new ye(i,s,e.categories,e.title,a);return new we(i,s,[e.min,e.max],e.title,a)}t(Tt,"getAxis");var ke=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{t(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,e.width),n=i.height+2*this.chartConfig.titlePadding;if(i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title)this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];if(this.showChartTitle)e.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]});return e}};function Ut(e,i,s,n){let a=new Pt(n);return new ke(a,e,i,s)}t(Ut,"getChartTitleComponent");var Ae=0.75,Ce=0.5,Se=0.35;function Dt(e){return{fontSize:e,markerSize:e*Ae,markerSpacing:e*Se,itemSpacing:e*Ce}}t(Dt,"getLegendLayout");var Re=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{t(this,"ChartLegend")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter((f)=>f.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:i,markerSize:s,markerSpacing:n,itemSpacing:a}=Dt(this.chartConfig.legendFontSize),h=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map((f)=>f.title),i),c=this.chartConfig.legendPadding*2+s+n+h.width,x=this.chartConfig.legendPadding*2+this.visiblePlots.length*i+(this.visiblePlots.length-1)*a;if(c<=e.width&&x<=e.height)this.boundingRect.width=c,this.boundingRect.height=x;else this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:e,markerSize:i,markerSpacing:s,itemSpacing:n}=Dt(this.chartConfig.legendFontSize),a=e+n,h=this.boundingRect.x+this.chartConfig.legendPadding,c=this.boundingRect.y+this.chartConfig.legendPadding,x=[],f=[];for(let[_,v]of this.visiblePlots.entries())if(mt(v))x.push({x:h,y:c+_*a,width:i,height:i,fill:v.fill,strokeFill:v.fill,strokeWidth:0});else{let T=c+_*a+i/2;f.push({path:`M ${h},${T} L ${h+i},${T}`,strokeFill:v.strokeFill,strokeWidth:v.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:x},{groupTexts:["legend","markers"],type:"path",data:f},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((_,v)=>({text:_.title,x:h+i+s,y:c+v*a+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function qt(e,i,s,n){let a=new Pt(n);return new Re(a,e,i,s)}t(qt,"getChartLegendComponent");var _e=class{constructor(e,i,s,n,a){this.plotData=e,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=a}static{t(this,"LinePlot")}getDrawableElement(){let e=this.plotData.data.map((n)=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),i;if(this.orientation==="horizontal")i=Fs().y((n)=>n[0]).x((n)=>n[1])(e);else i=Fs().x((n)=>n[0]).y((n)=>n[1])(e);if(!i)return[];let s=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let h=[];for(let[c,[x,f]]of e.entries()){let _=this.plotData.pointLabels[c];if(!_)continue;if(this.orientation==="horizontal")h.push({x:f+10,y:x,text:_,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0});else h.push({x,y:f-10,text:_,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0})}if(h.length>0)s.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:h})}return s}},Te=class{constructor(e,i,s,n,a,h){this.barData=e,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=a,this.plotIndex=h}static{t(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map((a)=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),i=0.05,s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*0.95,n=s/2;if(this.orientation==="horizontal")return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((a)=>({x:this.boundingRect.x,y:a[0]-n,height:s,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}];return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((a)=>({x:a[0]-n,y:a[1],width:s,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},De=class{constructor(e,i,s){this.chartConfig=e,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}static{t(this,"BasePlot")}setAxes(e,i){this.xAxis=e,this.yAxis=i}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let e=[];for(let[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{let n=new _e(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break;case"bar":{let n=new Te(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break}return e}};function Gt(e,i,s){return new De(e,i,s)}t(Gt,"getPlotComponent");var ve=class{constructor(e,i,s,n){this.chartConfig=e,this.chartData=i,this.componentStore={title:Ut(e,i,s,n),plot:Gt(e,i,s),legend:qt(e,i,s,n),xAxis:Tt(i.xAxis,e.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:Tt(i.yAxis,e.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}static{t(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a={width:0,height:0},h=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),c=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),x=this.componentStore.plot.calculateSpace({width:h,height:c});if(e-=x.width,i-=x.height,x=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=x.height,i-=x.height,this.componentStore.xAxis.setAxisPosition("bottom"),x=this.componentStore.xAxis.calculateSpace({width:e,height:i}),i-=x.height,this.componentStore.yAxis.setAxisPosition("left"),x=this.componentStore.yAxis.calculateSpace({width:e,height:i}),s=x.width,e-=x.width,a=this.componentStore.legend.calculateSpace({width:e,height:c}),e-=a.width,e>0)h+=e,e=0;if(i>0)c+=i,i=0;if(this.componentStore.plot.calculateSpace({width:h,height:c}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.legend.setBoundingBoxXY({x:s+h,y:n+Math.max((c-a.height)/2,0)}),this.componentStore.xAxis.setRange([s,s+h]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+c}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((f)=>mt(f)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a=0,h={width:0,height:0},c=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),x=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:c,height:x});if(e-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("left"),f=this.componentStore.xAxis.calculateSpace({width:e,height:i}),e-=f.width,n=f.width,this.componentStore.yAxis.setAxisPosition("top"),f=this.componentStore.yAxis.calculateSpace({width:e,height:i}),i-=f.height,a=s+f.height,h=this.componentStore.legend.calculateSpace({width:e,height:x}),e-=h.width,e>0)c+=e,e=0;if(i>0)x+=i,i=0;if(this.componentStore.plot.calculateSpace({width:c,height:x}),this.componentStore.plot.setBoundingBoxXY({x:n,y:a}),this.componentStore.legend.setBoundingBoxXY({x:n+c,y:a+Math.max((x-h.height)/2,0)}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([a,a+x]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some((_)=>mt(_)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){if(this.chartConfig.chartOrientation==="horizontal")this.calculateHorizontalSpace();else this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let i of Object.values(this.componentStore))e.push(...i.getDrawableElements());return e}},Pe=class{static{t(this,"XYChartBuilder")}static build(e,i,s,n){return new ve(e,i,s,n).getDrawableElement()}},gt=0,Qt,ut=It(),dt=Et(),b=Mt(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1;function Et(){let e=jt(),i=C();return se(e.xyChart,i.themeVariables.xyChart)}t(Et,"getChartDefaultThemeConfig");function It(){let e=C();return se(V.xyChart,e.xyChart)}t(It,"getChartDefaultConfig");function Mt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}t(Mt,"getChartDefaultData");function ot(e){let i=C();return ee(e.trim(),i)}t(ot,"textSanitizer");function Kt(e){Qt=e}t(Kt,"setTmpSVGG");function Zt(e){if(e==="horizontal")ut.chartOrientation="horizontal";else ut.chartOrientation="vertical"}t(Zt,"setOrientation");function Jt(e){b.xAxis.title=ot(e.text)}t(Jt,"setXAxisTitle");function Bt(e,i){b.xAxis={type:"linear",title:b.xAxis.title,min:e,max:i},yt=!0}t(Bt,"setXAxisRangeData");function ie(e){b.xAxis={type:"band",title:b.xAxis.title,categories:e.map((i)=>ot(i.text))},yt=!0}t(ie,"setXAxisBand");function ne(e){b.yAxis.title=ot(e.text)}t(ne,"setYAxisTitle");function ae(e,i){b.yAxis={type:"linear",title:b.yAxis.title,min:e,max:i},Lt=!0}t(ae,"setYAxisRangeData");function oe(e){let i=Math.min(...e),s=Math.max(...e),n=lt(b.yAxis)?b.yAxis.min:1/0,a=lt(b.yAxis)?b.yAxis.max:-1/0;b.yAxis={type:"linear",title:b.yAxis.title,min:Math.min(n,i),max:Math.max(a,s)}}t(oe,"setYAxisRangeFromPlotData");function zt(e){let i=[];if(e.length===0)return i;if(!yt){let s=lt(b.xAxis)?b.xAxis.min:1/0,n=lt(b.xAxis)?b.xAxis.max:-1/0;Bt(Math.min(s,1),Math.max(n,e.length))}if(bt(b.xAxis)&&e.length>b.xAxis.categories.length)e=e.slice(0,b.xAxis.categories.length);if(!Lt)oe(e);if(bt(b.xAxis))i=b.xAxis.categories.map((s,n)=>[s,e[n]]);if(lt(b.xAxis)){let s=b.xAxis.min,n=b.xAxis.max;if(e.length===1)i=[[`${s}`,e[0]]];else{let a=(n-s)/(e.length-1);i=e.map((h,c)=>[`${s+c*a}`,h])}}return i}t(zt,"transformDataWithoutCategory");function Ot(e){return vt[e===0?0:e%vt.length]}t(Ot,"getPlotColorFromPalette");function re(e,i){let s=i.map((c)=>c.value),n=i.map((c)=>c.label?ot(c.label):""),a=zt(s),h=n.some((c)=>c!=="");b.plots.push({type:"line",title:ot(e.text),strokeFill:Ot(gt),strokeWidth:2,data:a,...h?{pointLabels:n}:{}}),gt++}t(re,"setLineData");function he(e,i){let s=i.map((a)=>a.value),n=zt(s);b.plots.push({type:"bar",title:ot(e.text),fill:Ot(gt),data:n}),gt++}t(he,"setBarData");function le(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=j(),Pe.build(ut,b,dt,Qt)}t(le,"getDrawableElem");function ce(){return dt}t(ce,"getChartThemeConfig");function ge(){return ut}t(ge,"getChartConfig");function de(){return b}t(de,"getXYChartData");var Le=t(function(){R(),gt=0,ut=It(),b=Mt(),dt=Et(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1},"clear"),Ee={getDrawableElem:le,clear:Le,setAccTitle:F,getAccTitle:z,setDiagramTitle:q,getDiagramTitle:j,getAccDescription:U,setAccDescription:P,setOrientation:Zt,setXAxisTitle:Jt,setXAxisRangeData:Bt,setXAxisBand:ie,setYAxisTitle:ne,setYAxisRangeData:ae,setLineData:re,setBarData:he,setTmpSVGG:Kt,getChartThemeConfig:ce,getChartConfig:ge,getXYChartData:de},Ie=t((e,i,s,n)=>{let a=n.db,h=a.getChartThemeConfig(),c=a.getChartConfig(),x=a.getXYChartData().plots[0].data.map((w)=>w[1]);function f(w){return w==="top"?"text-before-edge":"middle"}t(f,"getDominantBaseLine");function _(w){return w==="left"?"start":w==="right"?"end":"middle"}t(_,"getTextAnchor");function v(w){return`translate(${w.x}, ${w.y}) rotate(${w.rotation||0})`}t(v,"getTextTransformation"),l.debug(`Rendering xychart chart
7
+ `+e);let T=ue(i),y=T.append("g").attr("class","main"),W=y.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");te(T,c.height,c.width,!0),T.attr("viewBox",`0 0 ${c.width} ${c.height}`),W.attr("fill",h.backgroundColor),a.setTmpSVGG(T.append("g").attr("class","mermaid-tmp-group"));let I=a.getDrawableElem(),M={};function X(w){let Y=y,u="";for(let[N]of w.entries()){let H=y;if(N>0&&M[u])H=M[u];if(u+=w[N],Y=M[u],!Y)Y=M[u]=H.append("g").attr("class",w[N])}return Y}t(X,"getGroup");for(let w of I){if(w.data.length===0)continue;let Y=X(w.groupTexts);switch(w.type){case"rect":if(Y.selectAll("rect").data(w.data).enter().append("rect").attr("x",(u)=>u.x).attr("y",(u)=>u.y).attr("width",(u)=>u.width).attr("height",(u)=>u.height).attr("fill",(u)=>u.fill).attr("stroke",(u)=>u.strokeFill).attr("stroke-width",(u)=>u.strokeWidth),c.showDataLabel){let u=c.showDataLabelOutsideBar;if(c.chartOrientation==="horizontal"){let N=function(k,J){let{data:D,label:G}=k;return J*G.length*H<=D.width-A};var Z=N;t(N,"fitsHorizontally");let H=0.7,A=10,it=w.data.map((k,J)=>({data:k,label:x[J].toString()})).filter((k)=>k.data.width>0&&k.data.height>0),B=it.map((k)=>{let{data:J}=k,D=J.height*0.7;while(!N(k,D)&&D>0)D-=1;return D}),rt=Math.floor(Math.min(...B)),L=t((k)=>{if(u)return k.data.x+k.data.width+A;else return k.data.x+k.data.width-A},"determineLabelXPosition");Y.selectAll("text").data(it).enter().append("text").attr("x",L).attr("y",(k)=>k.data.y+k.data.height/2).attr("text-anchor",u?"start":"end").attr("dominant-baseline","middle").attr("fill",h.dataLabelColor).attr("font-size",`${rt}px`).text((k)=>k.label)}else{let N=function(L,k,J){let{data:D,label:G}=L,r=0.7,g=k*G.length*0.7,d=D.x+D.width/2,p=d-g/2,S=d+g/2,o=p>=D.x&&S<=D.x+D.width,st=D.y+J+k<=D.y+D.height;return o&&st};var tt=N;t(N,"fitsInBar");let H=10,A=w.data.map((L,k)=>({data:L,label:x[k].toString()})).filter((L)=>L.data.width>0&&L.data.height>0),it=A.map((L)=>{let{data:k,label:J}=L,D=k.width/(J.length*0.7);while(!N(L,D,H)&&D>0)D-=1;return D}),B=Math.floor(Math.min(...it)),rt=t((L)=>{if(u)return L.data.y-H;else return L.data.y+H},"determineLabelYPosition");Y.selectAll("text").data(A).enter().append("text").attr("x",(L)=>L.data.x+L.data.width/2).attr("y",rt).attr("text-anchor","middle").attr("dominant-baseline",u?"auto":"hanging").attr("fill",h.dataLabelColor).attr("font-size",`${B}px`).text((L)=>L.label)}}break;case"text":Y.selectAll("text").data(w.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(u)=>u.fill).attr("font-size",(u)=>u.fontSize).attr("dominant-baseline",(u)=>f(u.verticalPos)).attr("text-anchor",(u)=>_(u.horizontalPos)).attr("transform",(u)=>v(u)).text((u)=>u.text);break;case"path":Y.selectAll("path").data(w.data).enter().append("path").attr("d",(u)=>u.path).attr("fill",(u)=>u.fill?u.fill:"none").attr("stroke",(u)=>u.strokeFill).attr("stroke-width",(u)=>u.strokeWidth);break}}},"draw"),Me={draw:Ie},Ke={parser:be,db:Ee,renderer:Me};export{Ke as diagram};
@@ -0,0 +1 @@
1
+ import{Xf}from"./index-qx6x4z0y.js";export{Xf as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kabmo-labs/kabmo",
3
- "version": "0.40.0",
3
+ "version": "0.42.0",
4
4
  "description": "Web console and diagnostic workbench for AI coding agents: Elysia + Preact on Bun.",
5
5
  "license": "MIT",
6
6
  "author": "Wijanarko Putra Rajeb <wijanarko.rajeb@gmail.com>",
@@ -52,9 +52,9 @@ export interface FolderBatchState {
52
52
  selectableIds: string[];
53
53
  /** Header click: select or unselect everything this header owns. */
54
54
  toggleFolderSelection: () => void;
55
- /** Rows to render — every offered row while selecting, else the window. */
55
+ /** Rows to render — every offered row while selecting, else the window's roots and their branches. */
56
56
  rendered: SessionItemData[];
57
- /** Rows the next "Show more" reveals; 0 while selecting. */
57
+ /** ROOT rows the next "Show more" reveals (their branches follow); 0 while selecting. */
58
58
  hiddenCount: number;
59
59
  }
60
60
 
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  import { useState } from 'preact/hooks';
18
- import { Check, Loader2, Play, Plus, RefreshCw, Server, Square, Trash2 } from 'lucide-preact';
18
+ import { Check, Loader2, Play, Plus, RefreshCw, Server, Square, Trash2, X } from 'lucide-preact';
19
19
  import { AnchoredMenu } from '@/client/components/common/anchored-menu';
20
20
  import { anchorRectOf } from '@/shared/lib/ui/menu-anchor';
21
21
  import type { ShellServersStore } from '@/client/hooks/shell/servers';
@@ -195,13 +195,13 @@ export function ServerPanel({ open, onClose, variant, store, triggerRef }: Serve
195
195
  </span>
196
196
  <button
197
197
  type="button"
198
- onClick={() => void store.reload()}
199
- disabled={store.busy}
198
+ onClick={() => void store.refresh()}
199
+ disabled={store.refreshing || store.busy}
200
200
  title="Refresh: re-probe every server"
201
201
  aria-label="Refresh servers"
202
202
  className="p-1 rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer disabled:opacity-40"
203
203
  >
204
- <RefreshCw size={12} className={store.busy ? 'animate-spin' : ''} />
204
+ <RefreshCw size={12} className={store.refreshing ? 'animate-spin' : ''} />
205
205
  </button>
206
206
  </div>
207
207
 
@@ -254,7 +254,18 @@ export function ServerPanel({ open, onClose, variant, store, triggerRef }: Serve
254
254
  </div>
255
255
 
256
256
  {store.error && (
257
- <p className="px-3 py-1.5 text-[10px] text-error border-t border-ink/10">{store.error}</p>
257
+ <div className="flex items-start gap-1.5 px-3 py-1.5 border-t border-ink/10">
258
+ <p className="flex-1 text-[10px] text-error">{store.error}</p>
259
+ <button
260
+ type="button"
261
+ onClick={store.dismissError}
262
+ title="Dismiss"
263
+ aria-label="Dismiss the error"
264
+ className="p-0.5 rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer flex-shrink-0"
265
+ >
266
+ <X size={10} />
267
+ </button>
268
+ </div>
258
269
  )}
259
270
 
260
271
  <div className="border-t border-ink/10 px-2 py-2 space-y-1.5">
@@ -69,22 +69,28 @@ let win: Window;
69
69
  let container: HTMLElement;
70
70
  let calls: Array<{ command: string; args?: Record<string, unknown> }>;
71
71
 
72
+ /**
73
+ * The bridge the shells install. The test replaces it to answer, refuse, or hold
74
+ * a reply open — the same door the shell uses, which is what makes this a test
75
+ * of the bridge rather than of a stub only this suite knows about.
76
+ */
77
+ function setShellCall(call: (method: string, params?: Record<string, unknown>) => Promise<unknown>) {
78
+ const shellWindow = win as unknown as {
79
+ __kabmoCall?: (method: string, params?: Record<string, unknown>) => Promise<unknown>;
80
+ };
81
+ shellWindow.__kabmoCall = call;
82
+ }
83
+
72
84
  function mount(next: ShellServersState | Error, variant: 'nav' | 'chip' = 'nav', open = true) {
73
85
  calls = [];
74
86
  win.document.body.innerHTML = '';
75
87
  container = win.document.createElement('div') as unknown as HTMLElement;
76
88
  win.document.body.appendChild(container as never);
77
- // The transport the shells install: `__kabmoCall` answers through the same
78
- // door the shell uses, which is what makes this a test of the bridge rather
79
- // than of a stub only this suite knows about.
80
- const shellWindow = win as unknown as {
81
- __kabmoCall?: (method: string, params?: Record<string, unknown>) => Promise<unknown>;
82
- };
83
- shellWindow.__kabmoCall = async (method, params) => {
89
+ setShellCall(async (method, params) => {
84
90
  calls.push({ command: method, args: params });
85
91
  if (next instanceof Error) throw next;
86
92
  return next;
87
- };
93
+ });
88
94
  act(() => {
89
95
  render(h(ServerControl, { variant }), container as never);
90
96
  });
@@ -201,7 +207,7 @@ describe('ServerControl', () => {
201
207
  await settle();
202
208
  expect(container.querySelector('[aria-label="Choose a server"]')).toBeNull();
203
209
 
204
- (win as unknown as { __kabmoCall?: unknown }).__kabmoCall = async () => state();
210
+ setShellCall(async () => state());
205
211
  mountHeader();
206
212
  await settle();
207
213
  expect(container.querySelector('[aria-label="Choose a server"]')).not.toBeNull();
@@ -214,4 +220,52 @@ describe('ServerControl', () => {
214
220
  await settle();
215
221
  expect(text()).toContain('root address');
216
222
  });
223
+
224
+ /**
225
+ * The refresh button's spin is the only sign the press did anything: a local
226
+ * list answers in milliseconds, and the old `busy` flag was set by mutations
227
+ * only, so the icon never turned. The floor keeps the spin visible.
228
+ */
229
+ test('the refresh button spins while the shell re-probes, then stops', async () => {
230
+ mount(DESKTOP);
231
+ await settle();
232
+ const gate = Promise.withResolvers<void>();
233
+ setShellCall(async (method) => {
234
+ if (method === 'servers_state') await gate.promise;
235
+ return DESKTOP;
236
+ });
237
+ const refresh = win.document.querySelector('[aria-label="Refresh servers"]') as unknown as HTMLButtonElement;
238
+ act(() => {
239
+ refresh.click();
240
+ });
241
+ await settle();
242
+ expect(refresh.disabled).toBe(true);
243
+ expect(refresh.querySelector('svg')?.getAttribute('class') ?? '').toContain('animate-spin');
244
+
245
+ gate.resolve();
246
+ const floor = Promise.withResolvers<void>();
247
+ setTimeout(floor.resolve, 450);
248
+ await floor.promise;
249
+ await settle();
250
+ expect(refresh.disabled).toBe(false);
251
+ expect(refresh.querySelector('svg')?.getAttribute('class') ?? '').not.toContain('animate-spin');
252
+ });
253
+
254
+ /**
255
+ * A failed Start used to leave its sentence in the panel until the page was
256
+ * reloaded: the 4-second poll never cleared it, and the store outlives the
257
+ * popover. The sentence is dismissible, and closing the panel drops it.
258
+ */
259
+ test('a refused start can be dismissed without reloading the page', async () => {
260
+ mount(new Error('The local server exited during startup.'));
261
+ await settle();
262
+ expect(text()).toContain('exited during startup');
263
+ const dismiss = win.document.querySelector('[aria-label="Dismiss the error"]') as unknown as HTMLButtonElement;
264
+ expect(dismiss).not.toBeNull();
265
+ act(() => {
266
+ dismiss.click();
267
+ });
268
+ await settle();
269
+ expect(text()).not.toContain('exited during startup');
270
+ });
217
271
  });
@@ -20,6 +20,14 @@
20
20
  * workspace header's action cluster uses, so the two `⋯` columns share one
21
21
  * centre. A box that merely fit the glyph (14px + a 4px pad) put the row's dots
22
22
  * 2px left of the header's on touch.
23
+ *
24
+ * That box is NARROWER than the action row's sort control (28px, 36px on
25
+ * touch), so the row's right inset is 3px (4px on touch) — half the difference,
26
+ * centring the `⋯` on the sort glyph. The age keeps its 4px inset inside the
27
+ * box, which is exactly the glyph's own inset — so at rest the age ends on the
28
+ * same x as the sort icon's right edge, and on hover the dots take its place on
29
+ * that line. The list's content edge is the action row's (`.session-list-gutter`
30
+ * in `tailwind.css`), so no scrollbar-width correction belongs here.
23
31
  */
24
32
 
25
33
  import type { TargetedMouseEvent } from 'preact';
@@ -25,13 +25,20 @@
25
25
  * ## The gutter is shared with the workspace header, numerically
26
26
  *
27
27
  * 4px of inset, the leading slot (16px; 18px on touch), then 8px before the
28
- * text; and on the trailing side a 22px (28px on touch) box ending 4px inside
29
- * the row's own edge — the same numbers `WorkspaceHeader` uses, so the status
30
- * glyph sits under the folder mark, the title under the folder name, and the two
31
- * `⋯` triggers share one column. `pl-1 pr-1`, not the `px-2` this row started
32
- * with: the header's own `px-1` is inside a container that starts at the list's
33
- * edge, and matching the row's padding to the header's is what makes the columns
34
- * line up.
28
+ * text; and on the trailing side a 22px (28px on touch) box — the same numbers
29
+ * `WorkspaceHeader` uses, so the status glyph sits under the folder mark, the
30
+ * title under the folder name, and the two `⋯` triggers share one column.
31
+ *
32
+ * The right inset is 3px (4px on touch), which is exactly half the difference
33
+ * between the trailing box and the chrome control it lines up with. The action
34
+ * row's sort trigger is a 28px box (36px on touch); a row's `⋯` box is 22px
35
+ * (28px). The list's content edge is the action row's content edge (see
36
+ * `.session-list-gutter`), so centring the narrower box needs only that half
37
+ * difference — the reported "titik tiga tidak lurus dengan sort". The age keeps
38
+ * its 4px inset inside the box, which is the glyph's own inset, so at rest the
39
+ * age ends on the sort icon's right edge and on hover the dots take its place
40
+ * on that line. `WorkspaceHeader` states the same inset; the row and the header
41
+ * move together.
35
42
  *
36
43
  * ## The touch row is exactly as tall as the folder header
37
44
  *
@@ -61,7 +68,7 @@ export type SessionRowDensity = 'compact' | 'touch';
61
68
  /** What a subagent row under this chrome's rows borrows from it. */
62
69
  export function sessionRowBranchStyle(touch: boolean): BranchRowStyle {
63
70
  return {
64
- inset: 'pl-1 pr-1',
71
+ inset: touch ? 'pl-1 pr-1' : 'pl-1 pr-[3px]',
65
72
  insetPx: 4,
66
73
  slotWidth: touch ? 18 : 16,
67
74
  markGap: 8,
@@ -185,7 +192,7 @@ export function SessionRow({
185
192
  onClick={selectable ? onToggleSelect : onClick}
186
193
  onContextMenu={hasActions && !selectable ? menu.openAtCursor : undefined}
187
194
  className={`group/item relative flex w-full items-center rounded-lg text-xs transition-colors select-none cursor-pointer ${
188
- touch ? 'py-0.5 pl-1 pr-1' : 'py-[7px] pl-1 pr-1'
195
+ touch ? 'py-0.5 pl-1 pr-1' : 'py-[7px] pl-1 pr-[3px]'
189
196
  } ${
190
197
  (selectable && selected) || menuOpen
191
198
  ? SESSION_ROW_ATTENTION_CLASS
@@ -52,6 +52,7 @@ import { useKabmoEvent } from '@/client/hooks/ui/window-event';
52
52
  import { useToasts } from '@/client/hooks/ui/toasts';
53
53
  import { useUpdates } from '@/client/hooks/ui/updates';
54
54
  import { UPDATE_REQUEST_EVENT } from '@/shared/lib/updates/popup-state';
55
+ import { useUpdateCheckRequest } from '@/client/hooks/ui/updates/check-request';
55
56
  import { openKeyBindingHelp } from '@/client/lib/commands/overlays';
56
57
  import { MAX_LEFT_PANEL_WIDTH } from '@/shared/lib/workspace/sidebar-width';
57
58
  import { updateOutcomeTone } from '@/shared/lib/ui/toast-duration';
@@ -128,6 +129,12 @@ export function LeftColumn({
128
129
  });
129
130
  });
130
131
 
132
+ // The native App menu's "Check for Updates…". The row cannot read this
133
+ // column's state, so it asks for the check and this is the one place that
134
+ // runs it — the popup when a release is available, a sentence when there is
135
+ // not.
136
+ useUpdateCheckRequest(updates, pushToast);
137
+
131
138
  return (
132
139
  <>
133
140
  <Panel
@@ -11,7 +11,7 @@ import { SessionItem, SESSION_ITEM_BRANCH_STYLE } from '@/client/components/layo
11
11
  import { CategoryHeader } from '@/client/components/layout/session-sidebar/CategoryHeader';
12
12
  import { SessionBranch, branchControlFor } from '@/client/components/common/session-branch';
13
13
  import type { BranchControl } from '@/client/components/common/session-branch';
14
- import { buildSessionTree } from '@/client/lib/session-tree';
14
+ import { buildSessionTree } from '@/shared/lib/workspace/session-tree';
15
15
  import { useExpandedSessions } from '@/client/hooks/workspace/expanded-sessions';
16
16
  import { formatFullDate, relativeTimeAgo } from '@/shared/lib/workspace/relative-time';
17
17
  import { isPendingSessionId } from '@/shared/lib/omp/session/default-title';
@@ -18,6 +18,7 @@
18
18
 
19
19
  import { useState } from 'preact/hooks';
20
20
  import { SessionSidebarToolbar } from '@/client/components/layout/session-sidebar/Toolbar';
21
+ import { HarnessFilter } from '@/client/components/layout/session-sidebar/HarnessFilter';
21
22
  import { SessionSidebarSessionList } from '@/client/components/layout/session-sidebar/SessionList';
22
23
  import { SessionListSkeleton } from '@/client/components/layout/session-sidebar/Skeleton';
23
24
  import { SessionListNotice } from '@/client/components/layout/session-sidebar/SessionListNotice';
@@ -39,6 +40,9 @@ export function ClassicSidebarView({
39
40
  onToggleOptions,
40
41
  onCloseOptions,
41
42
  onSortChange,
43
+ harnessFilter,
44
+ onHarnessFilterChange,
45
+ harnessOptions,
42
46
  onRefresh,
43
47
  refreshing,
44
48
  scheduledCount,
@@ -100,6 +104,14 @@ export function ClassicSidebarView({
100
104
  selecting={batchActive}
101
105
  />
102
106
 
107
+ <div className="px-3 pt-2 pb-1">
108
+ <HarnessFilter
109
+ options={harnessOptions}
110
+ value={harnessFilter}
111
+ onChange={onHarnessFilterChange}
112
+ />
113
+ </div>
114
+
103
115
  {failed ? (
104
116
  <SessionListNotice onRetry={onRefresh} refreshing={refreshing} />
105
117
  ) : initializing ? (
@@ -110,6 +122,7 @@ export function ClassicSidebarView({
110
122
  activeSessionId={activeSessionId}
111
123
  searchQuery={searchQuery}
112
124
  showArchived={showArchived}
125
+ harnessFilter={harnessFilter}
113
126
  sessionStatus={sessionStatus}
114
127
  onSelectSession={onSelectSession}
115
128
  onNewSessionForFolder={onNewSessionForFolder}
@@ -0,0 +1,175 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The sidebar's harness filter: which agent ran the chat.
8
+ *
9
+ * A DROPDOWN, not a chip row. The list can hold a dozen harnesses (the built-in
10
+ * catalog alone is seventeen), and a chip per harness measured three wrapped
11
+ * lines at the 280px default — chrome that pushed the rows down and still hid
12
+ * the tail. One trigger whose contents grow is the shape that survives the next
13
+ * agent, the same reason the session row's actions live behind `⋯`.
14
+ *
15
+ * It sits immediately right of `Archived` in the `modern` filter row, and takes
16
+ * two forms chosen by that row's measured width (`filterRowForms`): the full
17
+ * chip, and the harness's own mark in the row's 22px slot. The classic chromes
18
+ * still draw it as a standalone line under the toolbar.
19
+ *
20
+ * The options are counted over the unfiltered list (`harnessFilterOptions`), so
21
+ * a number is a fact about the workspaces rather than about what the current
22
+ * filter shows.
23
+ *
24
+ * **The control is hidden while the list holds one harness and no filter is
25
+ * active.** A filter with one choice can only be wrong, and most users run one
26
+ * agent — it appears the moment a second agent has a row, which is the moment
27
+ * the question exists.
28
+ *
29
+ * **An active filter whose harness has no rows left is still offered**, with a
30
+ * count of 0. Dropping it would leave the list empty with nothing on screen
31
+ * explaining why, and no way back to `All` except a reload.
32
+ *
33
+ * The menu is `AnchoredMenu` (portalled, measured) because the sidebar is a
34
+ * scroller: an `absolute` panel would be clipped at its edge and drift with the
35
+ * rows.
36
+ */
37
+
38
+ import { useState } from 'preact/hooks';
39
+ import { Bot, Check, ChevronDown } from 'lucide-preact';
40
+ import { AnchoredMenu } from '@/client/components/common/anchored-menu';
41
+ import { HarnessGlyph, HARNESS_GLYPH_SIZE } from '@/client/components/common/harness-glyph';
42
+ import { harnessBadgeLabel } from '@/shared/lib/harness/catalog';
43
+ import { anchorRectOf, type AnchorRect } from '@/shared/lib/ui/menu-anchor';
44
+ import type { HarnessFilterOption } from '@/shared/lib/workspace/harness-filter';
45
+
46
+ interface HarnessFilterProps {
47
+ /** The harnesses the list holds, with row counts. */
48
+ options: HarnessFilterOption[];
49
+ /** The active harness, or null for every harness. */
50
+ value: string | null;
51
+ onChange: (harness: string | null) => void;
52
+ /** The narrow form for the filter row; the classic chrome draws the chip. */
53
+ form?: 'chip' | 'icon';
54
+ /** The classic chrome's standalone row: taller targets. */
55
+ touch?: boolean;
56
+ }
57
+
58
+ const TRIGGER_BASE = 'inline-flex max-w-full shrink-0 items-center border font-medium transition-colors cursor-pointer';
59
+ const TRIGGER_ON = 'border-ink bg-ink text-paper';
60
+ const TRIGGER_OFF = 'border-ink/15 text-ink/60 hover:border-ink/30 hover:text-ink';
61
+ const ROW_BASE = 'w-full px-2.5 py-1.5 flex items-center gap-2 text-left hover:bg-ink/5 cursor-pointer';
62
+ const ROW_ON = 'bg-ink/10 font-semibold text-ink';
63
+ const ROW_OFF = 'text-ink/75';
64
+
65
+ export function HarnessFilter({
66
+ options,
67
+ value,
68
+ onChange,
69
+ form = 'chip',
70
+ touch = false,
71
+ }: HarnessFilterProps) {
72
+ const [anchor, setAnchor] = useState<AnchorRect | null>(null);
73
+ // The active harness may have lost its last row since the click. It keeps a
74
+ // row so the filter that emptied the list is visible and clearable.
75
+ const shown = value && !options.some((option) => option.harness === value)
76
+ ? [{ harness: value, label: harnessBadgeLabel(value), count: 0 }, ...options]
77
+ : options;
78
+ if (shown.length < 2 && !value) return null;
79
+
80
+ const active = value ? shown.find((option) => option.harness === value) : undefined;
81
+ const label = active ? active.label : 'All harnesses';
82
+
83
+ const trigger = form === 'icon' ? (
84
+ <button
85
+ type="button"
86
+ aria-haspopup="menu"
87
+ aria-expanded={anchor !== null}
88
+ aria-label={`Filter by harness: ${label}`}
89
+ title={value ? `Harness: ${label}` : 'Filter by harness'}
90
+ onClick={(event) => setAnchor(anchor ? null : anchorRectOf(event.currentTarget))}
91
+ className={`${TRIGGER_BASE} h-[22px] w-[22px] justify-center rounded-md ${
92
+ value ? 'border-ink bg-ink text-paper' : 'border-ink/15 text-ink/55 hover:border-ink/30 hover:text-ink'
93
+ }`}
94
+ >
95
+ {active ? (
96
+ <HarnessGlyph
97
+ harness={active.harness}
98
+ size={HARNESS_GLYPH_SIZE.compact}
99
+ inherit
100
+ decorative
101
+ />
102
+ ) : (
103
+ <Bot size={13} />
104
+ )}
105
+ </button>
106
+ ) : (
107
+ <button
108
+ type="button"
109
+ aria-haspopup="menu"
110
+ aria-expanded={anchor !== null}
111
+ title="Filter by harness"
112
+ onClick={(event) => setAnchor(anchor ? null : anchorRectOf(event.currentTarget))}
113
+ className={`${TRIGGER_BASE} gap-1 rounded-full ${touch ? 'px-2 py-1 text-xs' : 'px-2 py-0.5 text-[11px]'} ${
114
+ value ? TRIGGER_ON : TRIGGER_OFF
115
+ }`}
116
+ >
117
+ {active ? (
118
+ <HarnessGlyph
119
+ harness={active.harness}
120
+ size={HARNESS_GLYPH_SIZE.compact}
121
+ inherit
122
+ decorative
123
+ />
124
+ ) : null}
125
+ <span className="max-w-[9rem] truncate">{label}</span>
126
+ {active ? <span className="font-mono tabular-nums opacity-70">{active.count}</span> : null}
127
+ <ChevronDown size={11} className="shrink-0 opacity-60" />
128
+ </button>
129
+ );
130
+
131
+ return (
132
+ <>
133
+ {trigger}
134
+
135
+ <AnchoredMenu
136
+ anchor={anchor}
137
+ align="start"
138
+ ariaLabel="Filter by harness"
139
+ className="w-56 bg-paper border border-ink/15 rounded-lg shadow-xl py-1 text-xs"
140
+ onClose={() => setAnchor(null)}
141
+ >
142
+ <button
143
+ type="button"
144
+ onClick={() => {
145
+ onChange(null);
146
+ setAnchor(null);
147
+ }}
148
+ className={`${ROW_BASE} ${!value ? ROW_ON : ROW_OFF}`}
149
+ >
150
+ <span className="flex-1 truncate">All harnesses</span>
151
+ {!value ? <Check size={12} /> : null}
152
+ </button>
153
+ {shown.map((option) => {
154
+ const on = option.harness === value;
155
+ return (
156
+ <button
157
+ key={option.harness}
158
+ type="button"
159
+ onClick={() => {
160
+ onChange(option.harness);
161
+ setAnchor(null);
162
+ }}
163
+ className={`${ROW_BASE} ${on ? ROW_ON : ROW_OFF}`}
164
+ >
165
+ <HarnessGlyph harness={option.harness} size={HARNESS_GLYPH_SIZE.compact} decorative />
166
+ <span className="flex-1 truncate">{option.label}</span>
167
+ <span className="font-mono tabular-nums text-ink/50">{option.count}</span>
168
+ {on ? <Check size={12} /> : null}
169
+ </button>
170
+ );
171
+ })}
172
+ </AnchoredMenu>
173
+ </>
174
+ );
175
+ }
@@ -1,4 +1,5 @@
1
1
  import { Category } from '@/client/components/layout/session-sidebar/CategoryItem';
2
+ import { harnessBadgeLabel } from '@/shared/lib/harness/catalog';
2
3
  import type { BatchBinding } from '@/client/components/common/batch-selection/types';
3
4
  import type { WorkspaceFolderData } from '@/shared/types';
4
5
  import type { ToastTone } from '@/shared/lib/ui/toast-duration';
@@ -8,6 +9,8 @@ interface SessionSidebarSessionListProps {
8
9
  activeSessionId: number | string | null;
9
10
  searchQuery: string;
10
11
  showArchived: boolean;
12
+ /** The active harness filter, so an empty list can name what emptied it. */
13
+ harnessFilter?: string | null;
11
14
  sessionStatus: Record<string, 'stream' | 'finish' | 'abort'>;
12
15
  onSelectSession: (id: number | string) => void;
13
16
  onNewSessionForFolder: (id: number) => void;
@@ -27,6 +30,7 @@ export function SessionSidebarSessionList({
27
30
  activeSessionId,
28
31
  searchQuery,
29
32
  showArchived,
33
+ harnessFilter,
30
34
  sessionStatus,
31
35
  onSelectSession,
32
36
  onNewSessionForFolder,
@@ -43,7 +47,11 @@ export function SessionSidebarSessionList({
43
47
  <div className="flex-1 scrollbar-overlay-container p-2 space-y-4">
44
48
  {folders.length === 0 ? (
45
49
  <div className="text-center py-8 text-xs text-muted">
46
- {searchQuery ? 'No results found.' : 'No workspaces available.'}
50
+ {searchQuery
51
+ ? 'No results found.'
52
+ : harnessFilter
53
+ ? `No chats on ${harnessBadgeLabel(harnessFilter)}.`
54
+ : 'No workspaces available.'}
47
55
  </div>
48
56
  ) : (
49
57
  folders.map(folder => (