@kabmo-labs/kabmo 0.46.0 → 0.47.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 (301) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +439 -435
  3. package/dist/client/static/js/{CsvGrid-br4j001k.js → CsvGrid-vfgttmym.js} +2 -2
  4. package/dist/client/static/js/{DocxView-kmtkbmmw.js → DocxView-dc41t6rp.js} +2 -2
  5. package/dist/client/static/js/{DrawioView-3df0g3jr.js → DrawioView-wpwr38d9.js} +2 -2
  6. package/dist/client/static/js/HtmlPreview-23n7t5cs.js +1 -0
  7. package/dist/client/static/js/ImageView-mvjb3qh1.js +1 -0
  8. package/dist/client/static/js/LayoutWrapper-eenx0hp2.js +2 -0
  9. package/dist/client/static/js/{Modal-tmxhxd6q.js → Modal-dsqhas10.js} +13 -13
  10. package/dist/client/static/js/{PdfView-p5z7c7eg.js → PdfView-cpvsbfk0.js} +1 -1
  11. package/dist/client/static/js/{SessionsView-t06h6zfx.js → SessionsView-s0crtcm8.js} +1 -1
  12. package/dist/client/static/js/{SheetView-agw459v2.js → SheetView-n6mst0hq.js} +13 -13
  13. package/dist/client/static/js/{SvgPreview-b9rfy1h6.js → SvgPreview-g2aqq812.js} +1 -1
  14. package/dist/client/static/js/{abnfDiagram-O67JEVCF-wbnhzcnj.js → abnfDiagram-O67JEVCF-3vac8sq4.js} +1 -1
  15. package/dist/client/static/js/architecture-7GRP2DOG-b5w9mnn5.js +1 -0
  16. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-t2sgevea.js → architectureDiagram-NJMV4G6O-1nh4htz2.js} +3 -3
  17. package/dist/client/static/js/{astro-hyj5wege.js → astro-63zcysj7.js} +1 -1
  18. package/dist/client/static/js/bash-hv3167gh.js +1 -0
  19. package/dist/client/static/js/{blockDiagram-BEXU5L5S-v2nzp54a.js → blockDiagram-BEXU5L5S-62z6kaar.js} +2 -2
  20. package/dist/client/static/js/{c4Diagram-YGBWAQC7-7h03146b.js → c4Diagram-YGBWAQC7-rts5zgx4.js} +3 -3
  21. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-m57e9kp1.js → classDiagram-v2-NBCMYWYE-tnpww186.js} +1 -1
  22. package/dist/client/static/js/{cose-bilkent-JH36ORCC-c4tnh4mg.js → cose-bilkent-JH36ORCC-8vsjbzwa.js} +1 -1
  23. package/dist/client/static/js/cpp-v2mqp8j7.js +1 -0
  24. package/dist/client/static/js/css-x7gyc3ta.js +1 -0
  25. package/dist/client/static/js/cynefin-OW5HDTMX-kdj8rjc1.js +1 -0
  26. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-mjf6njey.js → cynefinDiagram-VND7K2PF-005gc8km.js} +1 -1
  27. package/dist/client/static/js/{dagre-6A5THRUB-6yma9ch3.js → dagre-6A5THRUB-41zsteyd.js} +2 -2
  28. package/dist/client/static/js/{diagram-22UHCM2B-1q4ce2gb.js → diagram-22UHCM2B-prsm18a1.js} +3 -3
  29. package/dist/client/static/js/{diagram-3UASUU5V-0ttps29p.js → diagram-3UASUU5V-5nx9wf04.js} +1 -1
  30. package/dist/client/static/js/{diagram-ATOU4E4O-1mzexgv1.js → diagram-ATOU4E4O-k3d4z3aq.js} +3 -3
  31. package/dist/client/static/js/{diagram-CDSNMT55-4ae89t23.js → diagram-CDSNMT55-x2c5x5j2.js} +2 -2
  32. package/dist/client/static/js/{diagram-MLGK6HIB-057jaqvh.js → diagram-MLGK6HIB-nvr76jqh.js} +1 -1
  33. package/dist/client/static/js/{diagram-MPIPVDR6-p6yyq5sx.js → diagram-MPIPVDR6-v1jpzp9p.js} +1 -1
  34. package/dist/client/static/js/{dockerfile-00hqsk9c.js → dockerfile-vz6va73h.js} +1 -1
  35. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-bsk7dvm4.js → ebnfDiagram-ZINNZB2B-0v4tqr9v.js} +1 -1
  36. package/dist/client/static/js/{elk-276RUBZZ-dsq91er5.js → elk-276RUBZZ-qfn4r7xj.js} +1 -1
  37. package/dist/client/static/js/{erDiagram-OPXOYQCR-p7p13mbh.js → erDiagram-OPXOYQCR-cd667n9f.js} +4 -4
  38. package/dist/client/static/js/{erlang-814e8qy5.js → erlang-vk66vt7q.js} +1 -1
  39. package/dist/client/static/js/eventmodeling-NTZA5JFV-m57b7ytw.js +1 -0
  40. package/dist/client/static/js/flowDiagram-KWPJA3E3-fasj2gxy.js +1 -0
  41. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-bwgnttyk.js → ganttDiagram-FUAMR5RP-ps0h3drm.js} +1 -1
  42. package/dist/client/static/js/gitGraph-4MIJSDKK-wvzsc4ph.js +1 -0
  43. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-ca0gj5am.js → gitGraphDiagram-X574FWY7-fts23jer.js} +2 -2
  44. package/dist/client/static/js/graphql-a4gbqpj9.js +1 -0
  45. package/dist/client/static/js/{index-y2z8nsvw.js → index-0dkc6z8e.js} +2 -2
  46. package/dist/client/static/js/{index-eqhjs1yv.js → index-1d8bxjsz.js} +4 -4
  47. package/dist/client/static/js/{index-kty4ncsr.js → index-1whzs9kb.js} +2 -2
  48. package/dist/client/static/js/{index-qfxn7yh5.js → index-396r53n0.js} +2 -2
  49. package/dist/client/static/js/{index-qn200x1b.js → index-39d8zbkx.js} +6 -6
  50. package/dist/client/static/js/{index-dn7hg4em.js → index-3nsrnyqr.js} +2 -2
  51. package/dist/client/static/js/{index-jkay7aw7.js → index-4jzsr1ky.js} +2 -2
  52. package/dist/client/static/js/{index-064vdkrs.js → index-4wnzs76g.js} +1 -1
  53. package/dist/client/static/js/{index-16sd19f0.js → index-4x9p7hf9.js} +2 -2
  54. package/dist/client/static/js/{index-zq0qxb17.js → index-52nd4hgm.js} +1 -1
  55. package/dist/client/static/js/{index-8pksqzwq.js → index-54mkp2r2.js} +1 -1
  56. package/dist/client/static/js/{index-abs635a1.js → index-56rtb871.js} +25 -25
  57. package/dist/client/static/js/{index-dxvtjn6a.js → index-5f4b44ay.js} +2 -2
  58. package/dist/client/static/js/{index-95kese1h.js → index-6009v8jf.js} +1 -1
  59. package/dist/client/static/js/{index-29npynva.js → index-62jgcgfd.js} +5 -5
  60. package/dist/client/static/js/{index-nw5mvcaj.js → index-64p1dncg.js} +2 -2
  61. package/dist/client/static/js/{index-fj5rsp5v.js → index-6d6hxwb5.js} +2 -2
  62. package/dist/client/static/js/{index-19x11s5w.js → index-70g527sb.js} +2 -2
  63. package/dist/client/static/js/{index-9d3n04vb.js → index-7zeah164.js} +2 -2
  64. package/dist/client/static/js/{index-5h8y54t6.js → index-7zedprz3.js} +1 -1
  65. package/dist/client/static/js/{index-g7s0wsag.js → index-9ab6xaxd.js} +2 -2
  66. package/dist/client/static/js/index-9vqkyj58.js +3 -0
  67. package/dist/client/static/js/{index-x1fqhhpp.js → index-9xsf8162.js} +35 -35
  68. package/dist/client/static/js/{index-j718pxb3.js → index-a4h5np9r.js} +2 -2
  69. package/dist/client/static/js/{index-bjv5ga2e.js → index-an2wv33f.js} +2 -2
  70. package/dist/client/static/js/{index-64sqfr4a.js → index-c5hjht5e.js} +2 -2
  71. package/dist/client/static/js/{index-aagt3382.js → index-c63qyysm.js} +1 -1
  72. package/dist/client/static/js/{index-red856x6.js → index-ccgzzydx.js} +1 -1
  73. package/dist/client/static/js/{index-ex5dtdx2.js → index-cra9mgkq.js} +4 -4
  74. package/dist/client/static/js/index-cvyqp8nz.css +1 -0
  75. package/dist/client/static/js/index-d2xtbabt.js +2 -0
  76. package/dist/client/static/js/{index-7055hdx1.js → index-dxkefysk.js} +1 -1
  77. package/dist/client/static/js/index-dxp2yvy7.js +2 -0
  78. package/dist/client/static/js/{index-vjmg7kn5.js → index-dyc886cc.js} +1 -1
  79. package/dist/client/static/js/{index-5wz0y88c.js → index-dzeyd153.js} +2 -2
  80. package/dist/client/static/js/{index-qf3y3ahx.js → index-e5j5gc4h.js} +2 -2
  81. package/dist/client/static/js/{index-2ks0m8ss.js → index-evmcc5qh.js} +2 -2
  82. package/dist/client/static/js/{index-f7te27n5.js → index-f2ahkev0.js} +5 -5
  83. package/dist/client/static/js/{index-5gf52a6d.js → index-fjex1y0t.js} +2 -2
  84. package/dist/client/static/js/{index-bafe7hmd.js → index-fxd8dfj4.js} +2 -2
  85. package/dist/client/static/js/{index-trvqvb1v.js → index-g4kkapka.js} +2 -2
  86. package/dist/client/static/js/{index-561gkvve.js → index-gzkzwgzv.js} +2 -2
  87. package/dist/client/static/js/{index-twsbv1yn.js → index-n1yr4khe.js} +1 -1
  88. package/dist/client/static/js/{index-d23eacf2.js → index-nkahe229.js} +2 -2
  89. package/dist/client/static/js/{index-3bf7r7z4.js → index-p6s3fz6b.js} +11 -11
  90. package/dist/client/static/js/{index-hnb66d3s.js → index-q4ke39rh.js} +2 -2
  91. package/dist/client/static/js/index-qtd0e38d.js +1 -0
  92. package/dist/client/static/js/{index-ncpwteyt.js → index-tqgj7rd9.js} +2 -2
  93. package/dist/client/static/js/{index-wbws16ag.js → index-x0xspam4.js} +2 -2
  94. package/dist/client/static/js/{index-amys498v.js → index-x2v1zmth.js} +186 -186
  95. package/dist/client/static/js/{index-pwe6chtp.js → index-x9hfvbz6.js} +1 -1
  96. package/dist/client/static/js/{index-dr5hca5b.js → index-xk1cqjkn.js} +3 -3
  97. package/dist/client/static/js/{index-k5zfzgez.js → index-y6ke70e6.js} +2 -2
  98. package/dist/client/static/js/{index-zedt16w7.js → index-zhjjpvcc.js} +1 -1
  99. package/dist/client/static/js/info-A6RAGUB7-ym2xevn8.js +1 -0
  100. package/dist/client/static/js/{infoDiagram-VRGFBTTK-7q58qdf1.js → infoDiagram-VRGFBTTK-88qbtpq5.js} +1 -1
  101. package/dist/client/static/js/ini-80p6sp79.js +1 -0
  102. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-9jmeszag.js → ishikawaDiagram-OU5B5YK6-s8bagk00.js} +1 -1
  103. package/dist/client/static/js/java-mm2b3s9b.js +1 -0
  104. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-0d7xe845.js → journeyDiagram-ZHPQQLJL-hz8z0b9x.js} +2 -2
  105. package/dist/client/static/js/json-fzy76fkw.js +1 -0
  106. package/dist/client/static/js/jsx-c7v2f8s7.js +1 -0
  107. package/dist/client/static/js/{julia-yv2j8qd0.js → julia-dm0j9apa.js} +1 -1
  108. package/dist/client/static/js/{kanban-definition-PNTS6WVX-7p83rwdn.js → kanban-definition-PNTS6WVX-sjjnjb51.js} +1 -1
  109. package/dist/client/static/js/lua-ppfdxrmv.js +1 -0
  110. package/dist/client/static/js/markdown-xed7y3ds.js +1 -0
  111. package/dist/client/static/js/{mermaid.core-hwhzw0wv.js → mermaid.core-zvwygxbh.js} +7 -7
  112. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-hy0rtr7t.js → mindmap-definition-NLK3R4M7-kgj8enan.js} +2 -2
  113. package/dist/client/static/js/one-dark-pro-mq6sn6a2.js +1 -0
  114. package/dist/client/static/js/one-light-pt6t6vax.js +1 -0
  115. package/dist/client/static/js/packet-AYTQ26CC-01vcsy6x.js +1 -0
  116. package/dist/client/static/js/{pegDiagram-GJSIUBJH-kd8t53tx.js → pegDiagram-GJSIUBJH-gxzw1qwa.js} +1 -1
  117. package/dist/client/static/js/{perl-917pjq5a.js → perl-4jcm2jxv.js} +1 -1
  118. package/dist/client/static/js/{php-hwz75qzt.js → php-q32mec74.js} +1 -1
  119. package/dist/client/static/js/pie-WAS4IAKB-053gzkmh.js +1 -0
  120. package/dist/client/static/js/{pieDiagram-5QR66LMP-h3x03f80.js → pieDiagram-5QR66LMP-pdqwyqcm.js} +1 -1
  121. package/dist/client/static/js/properties-8ysbq2n2.js +1 -0
  122. package/dist/client/static/js/python-4ysexc8s.js +1 -0
  123. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-y2b1ncbg.js → quadrantDiagram-O4NWA36T-yx2t364p.js} +1 -1
  124. package/dist/client/static/js/r-hrsw5arc.js +1 -0
  125. package/dist/client/static/js/radar-RG4KPBEZ-bkpby8am.js +1 -0
  126. package/dist/client/static/js/railroad-74A4TZTK-67bxrjgw.js +1 -0
  127. package/dist/client/static/js/railroad-abnf-HS5TGJTU-xj9ymacg.js +1 -0
  128. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-2xxpbnf6.js +1 -0
  129. package/dist/client/static/js/railroad-peg-WCYAUIDC-78w88znz.js +1 -0
  130. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-x188rcxf.js → railroadDiagram-XR7U4H2S-800fdzkr.js} +1 -1
  131. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-g5e9fk17.js → requirementDiagram-PLB6GJNP-vc5rpgtm.js} +1 -1
  132. package/dist/client/static/js/{ruby-er7ayhte.js → ruby-npmpb290.js} +1 -1
  133. package/dist/client/static/js/{rust-1v8xbxn9.js → rust-waks43wh.js} +1 -1
  134. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-y9ht91gf.js → sankeyDiagram-IPEJSGJF-ccjk8zgn.js} +2 -2
  135. package/dist/client/static/js/{sass-n47tt136.js → sass-502a4r7y.js} +1 -1
  136. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-pp8s63rt.js → sequenceDiagram-PO4LG4MO-c0tk7gfn.js} +6 -6
  137. package/dist/client/static/js/{sizeCapture-INFHLROL-k6dhfxex.js → sizeCapture-INFHLROL-fma9p1vy.js} +1 -1
  138. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-y3akpsm4.js → stateDiagram-v2-GCMORJYK-d8f24b7j.js} +2 -2
  139. package/dist/client/static/js/{svelte-2pmz35vx.js → svelte-c15d0421.js} +1 -1
  140. package/dist/client/static/js/{swimlanes-2SLR337P-89081dr3.js → swimlanes-2SLR337P-sdt7qy36.js} +1 -1
  141. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-rz309qrx.js +8 -0
  142. package/dist/client/static/js/{timeline-definition-EJHVYXUP-tz6r8g3q.js → timeline-definition-EJHVYXUP-rv8qyr8b.js} +2 -2
  143. package/dist/client/static/js/treeView-Q6P3EWNA-g2bkjr4z.js +1 -0
  144. package/dist/client/static/js/treemap-WGGIJYW6-pj7yw9rw.js +1 -0
  145. package/dist/client/static/js/tsx-xjp2ds8g.js +1 -0
  146. package/dist/client/static/js/typescript-yg97da8h.js +1 -0
  147. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-yq2y1b09.js → usecaseDiagram-POWQR4AR-w6ew1red.js} +2 -2
  148. package/dist/client/static/js/{vennDiagram-UO4OBE2U-qdmjf6x3.js → vennDiagram-UO4OBE2U-p9axw7ch.js} +1 -1
  149. package/dist/client/static/js/{vue-d5gpjfgn.js → vue-xpemy62d.js} +1 -1
  150. package/dist/client/static/js/wardley-WFR3VGLG-c7ekf8r2.js +1 -0
  151. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-3n2sm7rj.js → wardleyDiagram-VNRHLVJA-5ewc8s4p.js} +1 -1
  152. package/dist/client/static/js/xml-nrb23phz.js +1 -0
  153. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-d7n2av2t.js → xychartDiagram-PMCCYNJV-7n4gn7k6.js} +2 -2
  154. package/dist/client/static/js/yaml-sqs6pjpx.js +1 -0
  155. package/marketplace/marketplace.json +34 -7
  156. package/marketplace/plugins/kanban/README.md +143 -0
  157. package/marketplace/plugins/kanban/icon.svg +5 -0
  158. package/marketplace/plugins/kanban/package.json +30 -0
  159. package/marketplace/plugins/kanban/src/app.tsx +34 -0
  160. package/marketplace/plugins/kanban/src/mcp-tools.ts +296 -0
  161. package/marketplace/plugins/kanban/src/mcp.test.ts +199 -0
  162. package/marketplace/plugins/kanban/src/mcp.ts +148 -0
  163. package/marketplace/plugins/kanban/src/panel/CardSheet.tsx +319 -0
  164. package/marketplace/plugins/kanban/src/panel/CardTile.tsx +97 -0
  165. package/marketplace/plugins/kanban/src/panel/StageColumn.tsx +116 -0
  166. package/marketplace/plugins/kanban/src/panel/StageSheet.tsx +249 -0
  167. package/marketplace/plugins/kanban/src/panel/catalogs.ts +114 -0
  168. package/marketplace/plugins/kanban/src/panel/index.tsx +327 -0
  169. package/marketplace/plugins/kanban/src/panel/panel.test.ts +219 -0
  170. package/marketplace/plugins/kanban/src/panel/start-work.ts +132 -0
  171. package/marketplace/plugins/kanban/src/panel/use-board.ts +148 -0
  172. package/marketplace/plugins/kanban/src/panel/use-card-detail.ts +70 -0
  173. package/marketplace/plugins/kanban/src/panel/use-writes.ts +123 -0
  174. package/marketplace/plugins/kanban/src/protocol.ts +180 -0
  175. package/marketplace/plugins/kanban/src/server.test.ts +113 -0
  176. package/marketplace/plugins/kanban/src/server.ts +227 -0
  177. package/marketplace/plugins/kanban/src/store/board.test.ts +311 -0
  178. package/marketplace/plugins/kanban/src/store/board.ts +147 -0
  179. package/marketplace/plugins/kanban/src/store/cards.ts +228 -0
  180. package/marketplace/plugins/kanban/src/store/fs.ts +159 -0
  181. package/marketplace/plugins/kanban/src/store/ops.ts +245 -0
  182. package/marketplace/plugins/kanban/src/store/resolve.test.ts +82 -0
  183. package/marketplace/plugins/kanban/src/store/resolve.ts +135 -0
  184. package/marketplace/plugins/kanban/tsconfig.json +26 -0
  185. package/package.json +2 -2
  186. package/src/client/components/common/file-icon/index.tsx +1 -1
  187. package/src/client/components/layout/desktop-layout/LeftColumn.tsx +14 -4
  188. package/src/client/components/layout/desktop-layout/RightColumn.test.tsx +204 -0
  189. package/src/client/components/layout/desktop-layout/RightColumn.tsx +37 -16
  190. package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +34 -7
  191. package/src/client/components/layout/desktop-layout/index.tsx +17 -22
  192. package/src/client/components/mobile/RightSidebar.tsx +10 -8
  193. package/src/client/components/mobile/mobile-right-sidebar/EditorSurface.tsx +2 -0
  194. package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +11 -3
  195. package/src/client/components/mobile/mobile-session-sidebar/use-drawer-tabs.ts +2 -1
  196. package/src/client/components/settings/categories/appearance-settings/EditorThemeSection.test.tsx +21 -0
  197. package/src/client/components/settings/categories/appearance-settings/EditorThemeSection.tsx +8 -4
  198. package/src/client/components/settings/categories/appearance-settings/ThemeCard.tsx +8 -2
  199. package/src/client/components/settings/categories/appearance-settings/ThemeGrid.tsx +15 -4
  200. package/src/client/components/workspace/chat-timeline/MessageList.test.ts +11 -0
  201. package/src/client/components/workspace/chat-timeline/MessageList.tsx +29 -21
  202. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +21 -0
  203. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +7 -1
  204. package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +3 -1
  205. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.tsx +1 -1
  206. package/src/client/components/workspace/editor/FilePane.tsx +4 -2
  207. package/src/client/components/workspace/editor/Tabs.tsx +7 -1
  208. package/src/client/components/workspace/editor/Toolbar.tsx +7 -1
  209. package/src/client/components/workspace/editor/chrome-rows.test.tsx +126 -0
  210. package/src/client/components/workspace/editor/viewers/HtmlPreview.test.tsx +94 -0
  211. package/src/client/components/workspace/editor/viewers/HtmlPreview.tsx +71 -0
  212. package/src/client/components/workspace/editor/viewers/bytes.ts +1 -1
  213. package/src/client/components/workspace/editor/viewers/dispatch.tsx +18 -2
  214. package/src/client/components/workspace/editor/viewers/viewers.test.ts +14 -1
  215. package/src/client/components/workspace/panel-header/index.test.tsx +2 -1
  216. package/src/client/components/workspace/panel-header/index.tsx +6 -4
  217. package/src/client/hooks/chat/timeline/row-measure.ts +75 -0
  218. package/src/client/hooks/chat/timeline/row-window.test.ts +41 -21
  219. package/src/client/hooks/chat/timeline/row-window.ts +6 -24
  220. package/src/client/hooks/editor/resolve-viewer.ts +1 -1
  221. package/src/client/hooks/editor/use-editor-drop.ts +14 -0
  222. package/src/client/hooks/editor/use-editor-tab-state.ts +5 -4
  223. package/src/client/hooks/ui/media-query.ts +27 -0
  224. package/src/client/hooks/workspace/file-tabs.ts +10 -0
  225. package/src/client/hooks/workspace/panel-tabs-reveal.test.tsx +20 -17
  226. package/src/client/hooks/workspace/panel-tabs-reveal.ts +29 -17
  227. package/src/client/hooks/workspace/panel-tabs.ts +3 -2
  228. package/src/client/hooks/workspace/right-panel-presence.test.ts +152 -0
  229. package/src/client/hooks/workspace/right-panel-presence.ts +119 -0
  230. package/src/client/hooks/workspace/session-state/index.test.tsx +145 -0
  231. package/src/client/hooks/workspace/session-state/index.ts +28 -16
  232. package/src/client/lib/router/search-params.test.ts +83 -0
  233. package/src/client/lib/router/search-params.ts +14 -3
  234. package/src/server/lib/mcp/session-mcp.test.ts +64 -1
  235. package/src/server/lib/mcp/session-overlay.server.ts +7 -4
  236. package/src/server/lib/omp/rpc/constants.test.ts +31 -0
  237. package/src/server/lib/omp/rpc/constants.ts +19 -0
  238. package/src/server/lib/omp/rpc/session-new.ts +78 -0
  239. package/src/server/lib/omp/rpc/session-registry.ts +22 -49
  240. package/src/server/lib/omp/rpc/spawn-mcp.ts +8 -1
  241. package/src/server/lib/omp/session/blobs.server.ts +2 -1
  242. package/src/server/lib/plugins/e2e.test.ts +71 -2
  243. package/src/server/lib/plugins/loader.server.ts +20 -1
  244. package/src/server/lib/plugins/module-import.server.ts +45 -0
  245. package/src/server/routes/agent/new-prompt.test.ts +81 -0
  246. package/src/server/routes/agent/new.ts +78 -4
  247. package/src/server/routes/fs/raw.test.ts +12 -0
  248. package/src/server/routes/fs/raw.ts +2 -6
  249. package/src/server/routes/wiki/asset.ts +1 -1
  250. package/src/shared/lib/fs/document-kind.test.ts +39 -2
  251. package/src/shared/lib/fs/document-kind.ts +49 -1
  252. package/src/shared/lib/fs/file-kind.test.ts +30 -3
  253. package/src/shared/lib/fs/file-kind.ts +7 -104
  254. package/src/shared/lib/fs/mime.ts +159 -0
  255. package/src/shared/lib/workspace/sidebar-width.test.ts +34 -0
  256. package/src/shared/lib/workspace/sidebar-width.ts +33 -0
  257. package/src/shared/lib/workspace/workspace-panel-widths.test.ts +124 -0
  258. package/src/shared/lib/workspace/workspace-panel-widths.ts +115 -18
  259. package/dist/client/static/js/ImageView-2r8p5z3y.js +0 -1
  260. package/dist/client/static/js/LayoutWrapper-rq3d2a4e.js +0 -2
  261. package/dist/client/static/js/architecture-7GRP2DOG-pvb4d65d.js +0 -1
  262. package/dist/client/static/js/bash-8d8z8zrg.js +0 -1
  263. package/dist/client/static/js/cpp-620mvjkk.js +0 -1
  264. package/dist/client/static/js/css-bt76kxbq.js +0 -1
  265. package/dist/client/static/js/cynefin-OW5HDTMX-gmx4vean.js +0 -1
  266. package/dist/client/static/js/eventmodeling-NTZA5JFV-vrnheyh7.js +0 -1
  267. package/dist/client/static/js/flowDiagram-KWPJA3E3-7b4w6phx.js +0 -1
  268. package/dist/client/static/js/gitGraph-4MIJSDKK-n6wnc8st.js +0 -1
  269. package/dist/client/static/js/graphql-j1a6zp7m.js +0 -1
  270. package/dist/client/static/js/index-3qnjdjg2.js +0 -1
  271. package/dist/client/static/js/index-4bqssvt6.js +0 -2
  272. package/dist/client/static/js/index-dpy3ewrn.css +0 -1
  273. package/dist/client/static/js/index-gq5w5w8x.js +0 -2
  274. package/dist/client/static/js/index-ta6gpcpw.js +0 -3
  275. package/dist/client/static/js/info-A6RAGUB7-1xtdxjz2.js +0 -1
  276. package/dist/client/static/js/ini-5f4zqtqr.js +0 -1
  277. package/dist/client/static/js/java-jj41mty3.js +0 -1
  278. package/dist/client/static/js/json-rnh2h17x.js +0 -1
  279. package/dist/client/static/js/jsx-4gecrt29.js +0 -1
  280. package/dist/client/static/js/lua-zszaw2f7.js +0 -1
  281. package/dist/client/static/js/markdown-nm6gw4v4.js +0 -1
  282. package/dist/client/static/js/one-dark-pro-4b8er03c.js +0 -1
  283. package/dist/client/static/js/one-light-e6r3vsz4.js +0 -1
  284. package/dist/client/static/js/packet-AYTQ26CC-zm1r82x5.js +0 -1
  285. package/dist/client/static/js/pie-WAS4IAKB-sqa7321j.js +0 -1
  286. package/dist/client/static/js/properties-rkptax7r.js +0 -1
  287. package/dist/client/static/js/python-qf1se1mj.js +0 -1
  288. package/dist/client/static/js/r-ms0cygq2.js +0 -1
  289. package/dist/client/static/js/radar-RG4KPBEZ-z3z82syp.js +0 -1
  290. package/dist/client/static/js/railroad-74A4TZTK-z6swcqq2.js +0 -1
  291. package/dist/client/static/js/railroad-abnf-HS5TGJTU-33km6py4.js +0 -1
  292. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-1zbf1xmq.js +0 -1
  293. package/dist/client/static/js/railroad-peg-WCYAUIDC-wte1xzzy.js +0 -1
  294. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-3q2a15wc.js +0 -8
  295. package/dist/client/static/js/treeView-Q6P3EWNA-pvgx6n22.js +0 -1
  296. package/dist/client/static/js/treemap-WGGIJYW6-3n9zm628.js +0 -1
  297. package/dist/client/static/js/tsx-gx7td06z.js +0 -1
  298. package/dist/client/static/js/typescript-1a808spn.js +0 -1
  299. package/dist/client/static/js/wardley-WFR3VGLG-7m07ewc4.js +0 -1
  300. package/dist/client/static/js/xml-3117mxd9.js +0 -1
  301. package/dist/client/static/js/yaml-dmvh8vyt.js +0 -1
@@ -27,6 +27,28 @@ import {
27
27
  type PanelWidths,
28
28
  } from '@/shared/lib/workspace/panel-widths';
29
29
  import { DEFAULT_RIGHT_PANEL_FRACTION } from '@/shared/lib/workspace/right-panels';
30
+ import type { PanelNavStyle } from '@/shared/lib/workspace/panel-nav';
31
+
32
+ /**
33
+ * The width below which the chat column stops being a conversation, used to
34
+ * decide whether a SECONDARY panel may exist at all.
35
+ *
36
+ * `MIN_CHAT_PANEL_WIDTH` is the share the chat is BUDGETED, and it is a wish:
37
+ * when the group cannot spare it the chat narrows rather than the fixed panels
38
+ * clipping. But that wish cannot answer "should the right panel be on screen at
39
+ * this window width", because a 400px chat beside a 320px editor and a 200px
40
+ * file tree needs 926px of group — which no 1152px window has once the sidebar
41
+ * takes its share. The old answer was to keep all three and let the chat fall
42
+ * to 209px (measured at 1152) and then to 0 (measured at 900), with the group's
43
+ * own scrollWidth past its clientWidth so the right panel was clipped by the
44
+ * viewport with no scrollbar to reach it.
45
+ *
46
+ * 320 is the floor the composer's toolbar actually needs: below `@[420px]` every
47
+ * selector is icon-only (`ModeToggles`, `AccessDropdown`, `ThinkingLevelDropdown`),
48
+ * and 320 leaves a 24px-gutter message column about 40 characters wide. At 320
49
+ * the chat is cramped but whole; at 209 it is a column of clipped chips.
50
+ */
51
+ export const MIN_CHAT_READING_WIDTH = 320;
30
52
 
31
53
  export interface WorkspacePanelWidthsArgs {
32
54
  /** Measured area of the group, or null before the observer reports. */
@@ -48,6 +70,19 @@ export interface WorkspacePanelWidthsArgs {
48
70
  export interface WorkspacePanelWidths {
49
71
  right: number;
50
72
  editor: number;
73
+ /**
74
+ * The right panel is ON SCREEN: it was asked for and the group can hold it.
75
+ * The caller renders the column, its separator and the rail from this, never
76
+ * from its own `showRightPanel` request — otherwise a refused request draws a
77
+ * rail beside a panel that is not there.
78
+ */
79
+ rightShown: boolean;
80
+ /**
81
+ * The right panel was ASKED for and there is no room for it. The caller says
82
+ * so (a refusal names its reason) instead of leaving a toggle that flips a
83
+ * flag the layout is ignoring.
84
+ */
85
+ rightSuppressed: boolean;
51
86
  /** Drag ceilings; `undefined` before the group is measured. */
52
87
  editorMax: number | undefined;
53
88
  rightMax: number | undefined;
@@ -57,14 +92,57 @@ export interface WorkspacePanelWidths {
57
92
  rightMin: number;
58
93
  }
59
94
 
95
+ /**
96
+ * Whether the right panel can be on screen beside everything else.
97
+ *
98
+ * A panel whose floor does not fit is DROPPED, not clipped and not squeezed:
99
+ * `resolvePanelWidth`'s ceiling is `max(min, …)`, so a floor that does not fit
100
+ * can only overflow the group. The group is `flex-1 min-w-0`, so its
101
+ * `clientWidth` stays put while its `scrollWidth` grows — the panel is laid out
102
+ * PAST the viewport edge, under the activity bar, with no scrollbar that could
103
+ * bring it back (measured at 900px: group 483 vs scroll 522, 39px of the Files
104
+ * panel unreachable).
105
+ *
106
+ * The chat is the surface the app exists for, so it keeps `MIN_CHAT_READING_WIDTH`
107
+ * and the SECONDARY column is the one that gives way. The editor column never
108
+ * gives way: it is only on screen because the user opened a file or a takeover,
109
+ * and a click that opened nothing would be the worse defect.
110
+ */
111
+ export function rightPanelFits(args: {
112
+ /** Measured area of the group, or null before the observer reports. */
113
+ available: number | null;
114
+ showEditor: boolean;
115
+ /** The chat is collapsed, so it reserves nothing. */
116
+ chatHidden: boolean;
117
+ /** The right panel's own floor, from the view it would draw. */
118
+ rightMin: number;
119
+ /** Separators the row would hold WITH the right panel present. */
120
+ handleCount: number;
121
+ }): boolean {
122
+ const { available, showEditor, chatHidden, rightMin, handleCount } = args;
123
+ // Before the group is measured there is nothing to decide from, so the
124
+ // requested layout stands: the first paint must not open a panel and close it
125
+ // one frame later.
126
+ if (available === null || available <= 0) return true;
127
+ const chatFloor = chatHidden ? 0 : MIN_CHAT_READING_WIDTH;
128
+ const editorFloor = showEditor && !chatHidden ? MIN_EDITOR_PANEL_WIDTH : 0;
129
+ return available >= chatFloor + editorFloor + rightMin + handleCount * HANDLE_WIDTH;
130
+ }
131
+
60
132
  export function resolveWorkspacePanelWidths(args: WorkspacePanelWidthsArgs): WorkspacePanelWidths {
61
133
  const { available, panelWidths, editorWidthMode, activeRightPanel, activePanel, showEditor, showRightPanel, chatHidden } = args;
62
134
 
135
+ const rightMin = activePanel?.minWidth ?? MIN_EDITOR_PANEL_WIDTH;
136
+ // The fit question is asked with the handles the row WOULD have, because the
137
+ // answer decides whether one of them exists.
138
+ const requestedHandleCount = (showEditor && !chatHidden ? 1 : 0) + 1;
139
+ const rightFits =
140
+ showRightPanel && rightPanelFits({ available, showEditor, chatHidden, rightMin, handleCount: requestedHandleCount });
63
141
  // The separator before the editor is gone while the chat is collapsed: there
64
142
  // is nothing on its left to transfer width to, and the drag's neighbour walk
65
143
  // skips a collapsed panel, so it would render a handle that does nothing.
66
- const handleCount = (showEditor && !chatHidden ? 1 : 0) + (showRightPanel ? 1 : 0);
67
- const rightMin = activePanel?.minWidth ?? MIN_EDITOR_PANEL_WIDTH;
144
+ const handleCount = (showEditor && !chatHidden ? 1 : 0) + (rightFits ? 1 : 0);
145
+ const showRight = rightFits;
68
146
 
69
147
  // The editor and the right panel are a COUPLED pair: the right panel is
70
148
  // resolved first, reserving the editor's WANTED share (the editor has no
@@ -74,18 +152,20 @@ export function resolveWorkspacePanelWidths(args: WorkspacePanelWidthsArgs): Wor
74
152
  const editorFraction = panelFraction(panelWidths[editorWidthMode], DEFAULT_EDITOR_FRACTIONS[editorWidthMode], available);
75
153
  const editorReservePx = available != null && available > 0 ? Math.round(editorFraction * available) : 0;
76
154
 
77
- const right = resolvePanelWidth({
78
- stored: panelWidths.right?.[activeRightPanel],
79
- defaultFraction: activePanel?.defaultFraction ?? DEFAULT_RIGHT_PANEL_FRACTION,
80
- defaultPx: activePanel?.defaultWidth ?? MIN_EDITOR_PANEL_WIDTH,
81
- available,
82
- min: rightMin,
83
- pairReservePx: showEditor ? editorReservePx : 0,
84
- // The editor has not been resolved yet, so only its floor can be reserved.
85
- siblingWidth: showEditor ? MIN_EDITOR_PANEL_WIDTH : 0,
86
- handleCount,
87
- chatHidden,
88
- });
155
+ const right = showRight
156
+ ? resolvePanelWidth({
157
+ stored: panelWidths.right?.[activeRightPanel],
158
+ defaultFraction: activePanel?.defaultFraction ?? DEFAULT_RIGHT_PANEL_FRACTION,
159
+ defaultPx: activePanel?.defaultWidth ?? MIN_EDITOR_PANEL_WIDTH,
160
+ available,
161
+ min: rightMin,
162
+ pairReservePx: showEditor ? editorReservePx : 0,
163
+ // The editor has not been resolved yet, so only its floor can be reserved.
164
+ siblingWidth: showEditor ? MIN_EDITOR_PANEL_WIDTH : 0,
165
+ handleCount,
166
+ chatHidden,
167
+ })
168
+ : 0;
89
169
 
90
170
  // With the chat collapsed the editor takes everything the right panel and the
91
171
  // separators do not. Resolving from its remembered FRACTION would leave the
@@ -95,7 +175,7 @@ export function resolveWorkspacePanelWidths(args: WorkspacePanelWidthsArgs): Wor
95
175
  ? Math.max(
96
176
  MIN_EDITOR_PANEL_WIDTH,
97
177
  available != null && available > 0
98
- ? Math.floor(available - (showRightPanel ? right : 0) - handleCount * HANDLE_WIDTH)
178
+ ? Math.floor(available - (showRight ? right : 0) - handleCount * HANDLE_WIDTH)
99
179
  : DEFAULT_EDITOR_WIDTHS[editorWidthMode],
100
180
  )
101
181
  : resolvePanelWidth({
@@ -104,21 +184,38 @@ export function resolveWorkspacePanelWidths(args: WorkspacePanelWidthsArgs): Wor
104
184
  defaultPx: DEFAULT_EDITOR_WIDTHS[editorWidthMode],
105
185
  available,
106
186
  min: MIN_EDITOR_PANEL_WIDTH,
107
- pairReservePx: showRightPanel ? right : 0,
108
- siblingWidth: showRightPanel ? right : 0,
187
+ pairReservePx: showRight ? right : 0,
188
+ siblingWidth: showRight ? right : 0,
109
189
  handleCount,
110
190
  });
111
191
 
112
192
  return {
113
193
  right,
114
194
  editor,
195
+ rightShown: showRight,
196
+ rightSuppressed: showRightPanel && !showRight,
115
197
  // `resolvePanelWidth` caps what it HANDS to `defaultSize`, but a separator
116
198
  // drag bypasses it — the resizer transfers pixels between two panels clamped
117
199
  // only by their own `maxSize`. Each max is its own cap and the pair total
118
200
  // minus the sibling's FLOOR (it gives way down to its minimum mid-drag).
119
- editorMax: pairMaxSize({ available, siblingMin: rightMin, siblingOpen: showRightPanel, chatHidden }),
201
+ editorMax: pairMaxSize({ available, siblingMin: rightMin, siblingOpen: showRight, chatHidden }),
120
202
  rightMax: pairMaxSize({ available, siblingMin: MIN_EDITOR_PANEL_WIDTH, siblingOpen: showEditor, chatHidden }),
121
203
  handleCount,
122
204
  rightMin,
123
205
  };
124
206
  }
207
+
208
+ /**
209
+ * Whether the right activity rail is on screen.
210
+ *
211
+ * The rail is how a view is CHOSEN, so it exists where choosing one can still
212
+ * put something on screen. That is `sideShown && !rightSuppressed` — NOT
213
+ * `rightPanelShown`: a panel closed by its own control is not suppressed, and
214
+ * taking the rail away with it left the column unreachable except through the
215
+ * navbar's chord (measured by `files-nested.e2e.ts`, whose `openFiles` reopens a
216
+ * collapsed column through the rail's chip and timed out once the rail went
217
+ * with it).
218
+ */
219
+ export function railShown(args: { sideShown: boolean; nav: PanelNavStyle; rightSuppressed: boolean }): boolean {
220
+ return args.sideShown && !args.rightSuppressed && args.nav === 'rail';
221
+ }
@@ -1 +0,0 @@
1
- import{e,m,Rr}from"./index-amys498v.js";import{wi,ru}from"./index-3bf7r7z4.js";function g({source:t,name:r,revision:s=0}){let{url:i,loading:n,error:o}=ru(t,s);if(o)return e(Rr,{name:r,message:o});if(n||!i)return e("div",{className:"flex flex-1 items-center justify-center gap-2 text-xs text-ink/40",children:[e(m,{size:14,className:"animate-spin"}),e("span",{children:"Loading image…"})]});return e(wi,{src:i,name:r,className:"flex-1 min-h-0"})}export{g as ImageView};
@@ -1,2 +0,0 @@
1
- import{d,n,o,K,i,u,a,Je,le,Ot,uc,e,s,De,Ce,m,nn,rn,_,at,an,f,B,se,ot,re,fe,Tt,We,pn,me,qe,ce,ka,Yr,mn,xa,Zn,P,D,U,Xs,b,er,el,Oe,Ee,ln,vA,Ha,Wp,gn,tl,Te,Dt,Io,ue,Z,ct,ns,rs,nd,pc,ge,He,os,KA,gc,Et,Qt,Rt,hc,ll,So,cl,ul,ld,Do,Ke,tt,ra,Ve,Ja,ml,Fc,Sa,Lc,ud,ms,Ta,Qo,Ro,Fo,It,nr,hs,Lo,Mo,Po,$e,gl,Tr,Za,Al,hl,bl,yl,rr,Hm,Wm,Oo,$c,Km,ys,vs,Vm,ks,Jm,Zm,Xm,zc,gi,vl,Da,Ai,ef,tf,Uc,nf,rf,Ph,gd,Oh,zo,Gc,Ad,xn,af,of,sf,lf,kl,Pg,no,xf,wf,qc,_l,Sf,Tf,Bd,Df,n0}from"./index-amys498v.js";import{Qd}from"./index-gq5w5w8x.js";import{Yc,Jc,Zc,Xc,eu,tu,nu,Td,Cs,Go,Es,wi,au,Sl,ou,iu,su,lu,cu,uu,du,pu,mu}from"./index-3bf7r7z4.js";import{Ku,Vu,ei,Yu,Ju}from"./index-dr5hca5b.js";import{mt,Ci,gu,Au,bu}from"./index-4bqssvt6.js";import{_s,Qa,Fr,yu,vu,jo,ku,Ss,zd,Vg,Ts,Ds,Ns,Lr,Qs,Rs,qo,Fs,Ls,Ms,Ps,Bi,Ho,Os,$s,xu,Ud,wu,Cu,Eu,Bu,Iu,_u}from"./index-eqhjs1yv.js";import{Ra,Fa}from"./index-zq0qxb17.js";function Ze(t){let{editorOpen:r,diffOpen:l,settingsOpen:p,offMainScreen:h,onCloseEditor:g,onCloseDiff:S,onCloseSettings:v,onReturnToMain:x}=t;o(()=>n0(()=>{if(r)return g(),!0;if(l)return S(),!0;if(p)return v(),!0;if(h)return x(),!0;return!1}),[r,l,p,h,g,S,v,x])}var gt="terminal";function Ge(t){return t===gt}function Re(t){if(Ge(t))KA()}function Qe({dock:t,sessionId:r,currentScreen:l,setCurrentScreen:p}){let[h,g]=n(0),[S,v]=n(0),x=a(()=>{let k=Ee(r,"layout.mobileRightPanel")??uc;Re(k),g((y)=>y+1),p("right")},[r,p]),c=a(()=>{v((k)=>k+1),p("session")},[p]),w=a((k)=>{let y=Oh(k,t);if(!y)return;let C=Ee(r,"layout.mobileRightPanel");if(y==="right"&&(l!=="right"||C!==k))Re(k);if(ln(r,y==="left"?"layout.mobileLeftPanel":"layout.mobileRightPanel",k),y==="right")g(0);p(y==="left"?"session":"right")},[t,r,l,p]);return ge(gd,(k)=>{let y=k.detail?.panelKey;if(y)w(y)}),{right:h,left:S,openSessionDrawer:c,openRightDrawer:x,openNamedPanel:w}}var vt={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]},eo=s(vt);function Le(){let t=os(),[r,l]=n(null),p=a((S,v)=>{l({top:v,bottom:v,left:S,right:S})},[]),h=Ku({enabled:t,onLongPress:p}),g=a(()=>l(null),[]);return{anchor:r,close:g,surfaceProps:{onContextMenu:(S)=>{S.preventDefault();let v=S.currentTarget.getBoundingClientRect();l({top:v.top,bottom:v.bottom,left:v.left,right:v.right})},onTouchStart:h.onTouchStart,onTouchMove:h.onTouchMove,onTouchEnd:h.onTouchEnd,onTouchCancel:h.onTouchCancel,onClickCapture:(S)=>{if(!h.consume())return;S.preventDefault(),S.stopPropagation()}}}}var St=10,oo=600000;function to({activeSessionTitle:t,activeSessionId:r,onOpenSessionSidebar:l,onOpenRightSidebar:p,onNewSession:h,onSelectSession:g}){let{folders:S}=Ve(),v=Bd(),x=Ta(r),[c,w]=n(null),{hidden:k,setHidden:y}=of(),C=Le(),T=Ad("mobile"),I=u(()=>{let M=Date.now(),A=[];for(let E of S)for(let O of E.sessions??[]){if(O.is_archived===1)continue;let R=vA(String(O.id)),L=O.updated_at?Date.parse(O.updated_at):0,q=R!==void 0&&M-R<=oo?R:L;if(R!==void 0&&M-R>oo)continue;A.push({id:O.id,title:O.title,folderName:E.name,modified:q})}return A.sort((E,O)=>O.modified-E.modified).slice(0,St)},[S]),N=t?t.charAt(0).toUpperCase()+t.slice(1):"New session";return e("header",{className:`flex-shrink-0 bg-canvas border-b border-ink/10 flex items-center justify-between ${gl} px-3 z-20 titlebar-drag-region select-none`,...Da(),...C.surfaceProps,style:zo(),children:[e("div",{className:"flex items-center space-x-2 flex-1 min-w-0 titlebar-no-drag",children:[e("button",{type:"button",onClick:l,className:"w-9 h-9 rounded-lg hover:bg-ink/5 active:bg-ink/10 text-ink transition-colors flex-shrink-0 inline-flex items-center justify-center",title:"Open Sessions","aria-label":"Open Sessions",children:e(eo,{size:20,strokeWidth:2})}),e("span",{className:"relative font-bold text-sm tracking-tight flex items-center flex-shrink-0",children:[e(Sa,{glow:!0}),e("span",{className:"absolute -top-0.5 -right-1.5 flex",children:e(zc,{status:v})})]}),e("span",{className:"text-ink/25 font-light text-xs flex-shrink-0 select-none",children:"/"}),e("div",{className:"relative min-w-0 flex-1 max-w-[150px]","data-testid":"session-picker",children:[e("button",{type:"button",onClick:(M)=>{w((A)=>A?null:Et(M.currentTarget))},className:"tap-chip flex w-full items-center space-x-1 text-xs font-semibold text-ink hover:text-ink/80 transition-colors py-1 min-w-0",title:N,"aria-haspopup":"menu","aria-expanded":c!==null,children:[e("span",{className:"truncate",children:N}),x&&e(m,{size:12,className:"animate-spin text-ink/50 flex-shrink-0",role:"status","aria-label":"Generating a session name…"}),e(B,{size:13,className:"text-ink/50 flex-shrink-0"})]}),c&&e(Qt,{anchor:c,align:"start",className:"w-72 bg-paper border border-ink/15 rounded-xl shadow-lg p-2 text-xs",onClose:()=>w(null),children:[e("button",{type:"button",onClick:()=>{w(null),h()},className:"w-full text-left px-3 py-2 rounded-lg bg-ink text-canvas flex items-center space-x-2 font-medium mb-1.5",children:[e(P,{size:14}),e("span",{children:"Start New Session"})]}),e("div",{className:"px-2 py-1 text-[10px] uppercase font-bold text-ink/40",children:"Recent Sessions"}),e("div",{className:"max-h-64 scrollbar-overlay-container space-y-0.5",children:I.length===0?e("div",{className:"px-2.5 py-2 text-ink/40 italic",children:"No sessions yet"}):I.map((M)=>e("button",{type:"button",onClick:()=>{w(null),g(M.id)},className:`w-full text-left px-2.5 py-1.5 rounded-lg flex items-center justify-between space-x-2 transition-colors ${String(r)===String(M.id)?"bg-ink/10 font-semibold text-ink":"hover:bg-ink/5 text-ink/80"}`,children:[e("span",{className:"min-w-0 flex flex-col",children:[e("span",{className:"truncate",children:M.title?M.title.charAt(0).toUpperCase()+M.title.slice(1):"Untitled"}),e("span",{className:"truncate text-[10px] text-ink/40 font-mono",children:M.folderName})]}),String(r)===String(M.id)&&e(f,{size:12,className:"flex-shrink-0"})]},M.id))})]})]})]}),e(sf,{layout:"mobile",sessionId:r==null?null:String(r),showRightPanel:!1,onToggleRightPanel:p,entries:T,hidden:k}),C.anchor?e(Oo,{anchor:C.anchor,title:"Navbar",align:"right",items:af([...T.inline,...T.folded]).filter((M)=>M.id!==xn.install).map((M)=>({...M,removable:!0})),hidden:k,onToggle:y,onClose:C.close}):null]})}function io({activeSessionId:t,onSelectSession:r,onNewSession:l,onOpenSessionSidebar:p,onOpenRightSidebar:h,appSettings:g={}}){let{folders:S}=Ve(),[v,x]=n(null),c=u(()=>{if(!t)return"New session";for(let k of S){let y=k.sessions?.find((C)=>String(C.id)===String(t));if(y)return y.title}return null},[t,S]);return e("div",{className:"flex flex-col h-full w-full bg-canvas text-ink relative",children:[e(to,{activeSessionTitle:v||c||"New session",activeSessionId:t,onOpenSessionSidebar:p,onOpenRightSidebar:h,onNewSession:l,onSelectSession:r}),e("main",{className:"flex-1 min-h-0",children:e(wf,{appSettings:g,onSessionTitle:x,variant:"mobile"})})]})}function ro({onClose:t,viewLabel:r="Sessions",menuProps:l}){return e("div",{className:"border-b border-ink/10 flex items-center justify-between px-3 flex-shrink-0 bg-canvas titlebar-drag-region select-none",...Da(),...l,style:{...zo()},children:[e("div",{className:"flex items-center space-x-2.5 titlebar-no-drag min-w-0",children:[e("span",{className:"font-bold text-sm tracking-tight flex items-center flex-shrink-0",children:e(Sa,{className:"text-[16px]",glow:!0})}),e("span",{className:"text-ink/25 text-xs select-none flex-shrink-0",children:"/"}),e("span",{className:"text-[11px] font-semibold text-ink/60 uppercase tracking-wider font-mono truncate",children:r})]}),e("div",{className:"flex items-center gap-1 titlebar-no-drag flex-shrink-0",children:[e(lf,{variant:"chip"}),e("button",{type:"button",onClick:t,className:"w-9 h-9 rounded-xl hover:bg-ink/5 active:bg-ink/10 text-ink flex items-center justify-center transition-colors cursor-pointer",title:"Close sidebar","aria-label":"Close sidebar",children:e(b,{size:19,strokeWidth:2})})]})]})}function so({onSettings:t,onKeyBindings:r,onAbout:l,updateAvailable:p,onUpdateClick:h,onDesktopToggle:g,shellDownload:S}){return e("div",{className:"px-3 pt-3 border-t border-ink/10 flex items-center justify-between flex-shrink-0 bg-canvas text-xs text-ink/60",style:{paddingBottom:"max(0.75rem, env(safe-area-inset-bottom, 0px))"},children:[e("div",{className:"flex items-center space-x-3",children:[e("button",{type:"button",onClick:t,className:"flex items-center space-x-1 hover:text-ink transition-colors",children:[e(Xs,{size:14}),e("span",{children:"Settings"})]}),e("button",{type:"button",onClick:r,className:"flex items-center space-x-1 hover:text-ink transition-colors",children:[e(ka,{size:14}),e("span",{children:"Keys"})]}),e("button",{type:"button",onClick:l,className:"flex items-center space-x-1 hover:text-ink transition-colors",children:[e(ce,{size:14}),e("span",{children:"About"})]}),S&&e(Xm,{download:S,variant:"label"}),g&&e("button",{type:"button",onClick:g,className:"flex items-center space-x-1 hover:text-ink transition-colors",title:"Switch to desktop view",children:[e(xa,{size:14}),e("span",{children:"Desktop"})]})]}),e("div",{className:"flex items-center gap-2",children:[e("span",{className:"font-mono text-[10px] text-ink/40",children:["v",Fc.version]}),p&&e("button",{type:"button",onClick:h,className:"px-2 py-0.5 rounded-full border border-ink/20 text-[10px] font-semibold text-ink hover:border-ink/40",children:"update"})]})]})}function ao(t){let r=ef(),l=Zm();return ge(Lc,()=>{t.onClose(),t.openAbout(),r.apply("kabmo").then((p)=>{if(!p)return;t.pushToast(p.message,pc(p))})}),tf(r,t.pushToast),{updates:r,shellDownload:l}}function lo(t,r,l){return t.filter((p)=>p.id!==r&&!(l&&p.side==="left"))}function co(t){return t}var xt=8;function Be({panels:t,activeId:r,onSelect:l,hasGitChanges:p=!1}){let h=i(null),g=i(new Map),S=i({activeId:r,panels:t});S.current={activeId:r,panels:t};let v=i({signature:"",width:0}),x=a(()=>{let c=h.current,w=g.current.get(S.current.activeId);if(!c||!w||c.clientWidth<=0)return;let k=`${S.current.activeId}\x00${S.current.panels.map((N)=>N.id).join("\x00")}`,y=v.current;if(y.signature===k&&y.width===c.clientWidth)return;v.current={signature:k,width:c.clientWidth};let C=c.getBoundingClientRect(),T=w.getBoundingClientRect(),I=Km({scrollLeft:c.scrollLeft,clientWidth:c.clientWidth,scrollWidth:c.scrollWidth,start:T.left-C.left+c.scrollLeft,size:T.width},xt);if(I!==c.scrollLeft)c.scrollLeft=I},[]);return K(x,[r,t,x]),o(()=>{let c=h.current;if(!c||typeof ResizeObserver>"u")return;let w=new ResizeObserver(x);return w.observe(c),()=>w.disconnect()},[x]),e("div",{ref:h,className:"flex items-center space-x-1.5 overflow-x-auto no-scrollbar py-1",children:t.map((c)=>{let w=c.id===r;return e("button",{ref:(k)=>{if(k)g.current.set(c.id,k);else g.current.delete(c.id)},type:"button",onClick:()=>l(c.id),"aria-pressed":w,"aria-label":c.title,className:`tap-chip relative flex shrink-0 items-center transition-all cursor-pointer ${w?"space-x-1.5 px-3 py-1.5 rounded-lg text-xs font-semibold bg-ink text-canvas shadow-sm":"p-2 rounded-lg text-ink/70 hover:bg-ink/5"}`,title:c.title,children:[e(Ja,{panelId:c.id,builtin:c.builtin,icon:c.builtin?c.icon:void 0,name:c.builtin?c.label:c.name,...c.iconUrl?{iconUrl:c.iconUrl}:{},...c.color?{color:c.color}:{},size:Ot}),w&&e("span",{className:`shrink-0 whitespace-nowrap ${c.id==="git"?"tracking-wide":""}`,children:c.label}),c.id==="git"&&p&&e("span",{className:"absolute top-1 right-1 w-1.5 h-1.5 rounded-full bg-info",title:"Uncommitted changes"})]},c.id)})})}function po({panels:t,activeId:r,onSelect:l,menuProps:p}){return e("div",{className:"px-3 py-1.5 border-b border-ink/10 bg-canvas flex-shrink-0",...p,children:e(Be,{panels:t,activeId:r,onSelect:l})})}function mo({panelKey:t,panel:r,body:l}){if(!r)return e("div",{className:"flex-1 min-h-0",children:e($c,{panelKey:t})});return e("div",{className:"flex-1 min-h-0 overflow-hidden relative",children:e(Je,{fallback:e("div",{className:"h-full flex items-center justify-center text-ink/40",children:e("span",{className:"text-xs font-mono",children:"Loading…"})}),children:e(Io,{value:l,children:r.render(l)})})})}var Ae="w-9.5 h-9.5 rounded-xl border flex items-center justify-center transition-all flex-shrink-0 cursor-pointer shadow-xs",Fe="border-ink/15 bg-paper hover:bg-ink/5 text-ink/80 hover:text-ink",uo="bg-ink/10 text-ink border-ink/30";function fo({searchQuery:t,sortOption:r,optionsOpen:l,showArchived:p,optionsRef:h,onNewSession:g,onNewWorkspace:S,onScheduler:v,scheduledCount:x,onRefresh:c,refreshing:w,onToggleOptions:k,onSortChange:y,onResetSort:C,onToggleArchived:T,onHideArchived:I,onSearchChange:N,onClearSearch:M,onSelectWorkspaces:A,selecting:E}){let{ref:O,width:R}=Ss(0),L=Vg(R),q={};for(let X of zd.slice(0,L))q[X]=!0;let z=zd.slice(L),F=p?"Hide archived sessions":"Show archived sessions",te=x>0?`Scheduled tasks (${x} armed)`:"Scheduled tasks",H=[];if(z.includes("new-workspace"))H.push({id:"new-workspace",label:"New Workspace",icon:pn,onSelect:S});if(z.includes("refresh"))H.push({id:"refresh",label:"Refresh sessions",icon:D,onSelect:c});if(z.includes("scheduler"))H.push({id:"scheduler",label:te,icon:Qa,onSelect:v});if(z.includes("archive"))H.push({id:"archive",label:F,icon:at,onSelect:T,active:p});if(z.includes("select"))H.push({id:"select",label:E?"Cancel selection":"Select workspaces",icon:Fr,onSelect:A,active:E});return e("div",{className:"p-3 border-b border-ink/10 flex flex-col space-y-2.5 flex-shrink-0 bg-canvas",children:[e("div",{ref:O,className:"flex items-center space-x-2",children:[e("button",{type:"button",onClick:g,"aria-label":"New Session",title:"New Session",className:"flex-1 min-w-0 h-9.5 flex items-center justify-center space-x-2 px-3.5 rounded-xl bg-ink text-canvas hover:bg-ink/90 text-xs font-semibold transition-all shadow-xs",children:[e(P,{size:15,strokeWidth:2.4,className:"shrink-0"}),e("span",{className:"min-w-0 truncate",children:"New Session"})]}),q["new-workspace"]&&e("button",{type:"button",onClick:S,className:`${Ae} ${Fe}`,title:"New Workspace","aria-label":"New Workspace",children:e(pn,{size:16,strokeWidth:1.8})}),q.scheduler&&e("button",{type:"button",onClick:v,className:`relative ${Ae} ${Fe}`,title:te,"aria-label":x>0?`Scheduled tasks, ${x} armed`:"Scheduled tasks",children:[e(Qa,{size:16,strokeWidth:1.8}),x>0&&e("span",{className:"absolute -top-0.5 -right-0.5 min-w-[13px] h-[13px] px-[3px] rounded-full bg-ink text-canvas text-[10px] leading-[13px] text-center font-semibold",children:x>9?"9+":x})]}),q.archive&&e("button",{type:"button",onClick:T,"aria-pressed":p,className:`${Ae} ${p?"bg-warning/15 border-warning/40 text-warning":Fe}`,title:F,"aria-label":F,children:e(at,{size:16,strokeWidth:1.8})}),q.select&&e("button",{type:"button",onClick:A,"aria-pressed":E,className:`${Ae} ${E?uo:Fe}`,title:E?"Cancel selection":"Select workspaces","aria-label":E?"Cancel selection":"Select workspaces",children:e(Fr,{size:16,strokeWidth:1.8})}),q.refresh&&e("button",{type:"button",onClick:c,className:`${Ae} ${Fe}`,title:"Refresh sessions","aria-label":"Refresh sessions","aria-busy":w,children:e(D,{size:15,strokeWidth:1.8,className:w?"animate-spin":void 0})}),q.sort&&e("div",{className:"relative flex-shrink-0",ref:h,children:[e("button",{type:"button",onClick:k,className:`${Ae} ${l||r!=="A-Z"?uo:Fe}`,title:"Sort workspaces","aria-label":"Sort workspaces",children:e(_s,{size:15,strokeWidth:1.8})}),l&&e("div",{className:"glass-popover absolute right-0 top-full mt-2 w-52 bg-paper border border-ink/15 rounded-xl shadow-xl z-50 p-2 text-xs",children:e(jo,{variant:"mobile",sortOption:r,onSortChange:y})})]}),z.length>0&&e(ku,{actions:H,sortHidden:z.includes("sort"),sortOption:r,onSortChange:y,layout:"mobile"})]}),e("div",{className:"relative flex items-center",children:[e(U,{size:14,className:"absolute left-3 text-ink/40"}),e("input",{type:"text",value:t,onChange:(X)=>N(X.currentTarget.value),placeholder:"Search workspaces & sessions...",className:"w-full bg-paper border border-ink/15 rounded-xl pl-8 pr-8 py-2 text-xs text-ink placeholder-ink/40 focus:outline-none focus:border-ink/40 transition-colors font-mono"}),t&&e("button",{type:"button",onClick:M,className:"absolute right-2.5 text-ink/40 hover:text-ink p-1","aria-label":"Clear search",children:e(b,{size:13})})]}),(p||r!=="A-Z")&&e("div",{className:"flex items-center space-x-1.5 flex-wrap gap-y-1 pt-0.5",children:[r!=="A-Z"&&e("span",{className:"inline-flex items-center space-x-1 bg-ink/5 border border-ink/10 text-ink/80 rounded-lg px-2 py-0.5 text-[10px] font-mono",children:[e("span",{children:["Sort: ",r.replace("_"," ")]}),e("button",{type:"button",onClick:C,className:"hover:text-ink ml-0.5",title:"Reset sort",children:e(b,{size:10})})]}),p&&e("span",{className:"inline-flex items-center space-x-1 bg-warning/15 border border-warning/25 text-warning rounded-lg px-2 py-0.5 text-[10px] font-mono",children:[e(at,{size:10}),e("span",{children:"Archived"}),e("button",{type:"button",onClick:I,className:"hover:text-warning-hover ml-0.5",title:"Hide archived",children:e(b,{size:10})})]})]})]})}var wt="p-1.5 rounded-lg hover:bg-ink/10 active:bg-ink/15 text-ink/60 hover:text-ink";function ho({folder:t,canWorktree:r,onOpenFolder:l,onNewWorktree:p,onSelectSessions:h,confirmDelete:g,onPin:S,onDelete:v,onRequestDelete:x,onCancelDelete:c}){let[w,k]=n(!1),y=i(null),[C,T]=n(null),I=(N)=>()=>{k(!1),N()};return e("div",{className:"relative flex items-center",onClick:(N)=>N.stopPropagation(),children:[e("button",{ref:y,type:"button",onClick:(N)=>{if(N.stopPropagation(),y.current)T(Et(y.current));k((M)=>!M)},className:wt,title:"Workspace options","aria-label":`Options for ${t.name}`,"aria-haspopup":"menu","aria-expanded":w,children:e(Ce,{size:15})}),e(Qt,{anchor:w?C:null,align:"end",ariaLabel:`Options for ${t.name}`,className:"w-48 rounded-lg border border-ink/15 bg-paper py-1 text-xs shadow-lg",onClose:()=>{k(!1),c()},children:e(Ms,{variant:"mobile",isPinned:t.isPinned,onOpenFolder:l?I(l):void 0,onNewWorktree:r&&p?I(p):void 0,onSelectSessions:h?I(h):void 0,confirmDelete:g,onPin:I(S),onDelete:I(v),onRequestDelete:x,onCancelDelete:c})})]})}var bo={inset:"",insetPx:0,slotWidth:16,markGap:8,padding:"py-2",glyph:tt.touch};function go({session:t,harness:r,isActive:l,status:p,awaitingInput:h=!1,timeAgo:g,timeTitle:S,runStartedAt:v,expandable:x=!1,isExpanded:c=!1,onToggleExpand:w,isChild:k=!1,folderId:y,onSelect:C,onArchive:T,onDelete:I,onRename:N,onRenameWithAi:M,waitingFor:A,onCancelWait:E,selectable:O=!1,selected:R=!1,onToggleSelect:L}){let{isEditing:q,draft:z,setDraft:F,inputRef:te,startRename:H,handleKeyDown:X,handleBlur:ae}=Fo(t.title,N),W=Ta(t.id),ne=Lo(),ie=ne.anchor!==null,ee=Boolean(N||T||I||E),J=Boolean(A),de=x&&Boolean(w),Q=t.title.charAt(0).toUpperCase()+t.title.slice(1);if(q)return e("div",{className:"w-full rounded-lg flex items-center bg-ink/10",children:e("input",{ref:te,autoFocus:!0,value:z,onChange:(oe)=>F(oe.currentTarget.value),onKeyDown:X,onBlur:ae,className:"flex-1 min-w-0 mx-2 my-1.5 bg-paper border border-ink/25 rounded px-2 py-1 text-xs text-ink outline-none focus:border-ink/50"})});return e(d,{children:[e("div",{"data-testid":"session-item","data-session-id":String(t.id),"data-menu-open":ie?"true":void 0,onContextMenu:ee&&!O?ne.openAtCursor:void 0,className:`w-full rounded-lg flex items-center transition-colors ${O&&R||ie?Ls:l?"bg-ink/10 font-medium text-ink":"hover:bg-ink/5 text-ink/85"}`,children:[e("button",{type:"button",onClick:O?L:C,className:"flex-1 text-left py-2 flex items-center justify-between min-w-0",children:[e("div",{className:"flex items-center min-w-0 pr-2",children:[O?e(Lr,{checked:R,label:`Select ${t.title}`,onChange:()=>L?.()}):e("span",{className:"w-4 flex-shrink-0 flex items-center justify-center",children:W?e("span",{role:"status","aria-label":"Generating a name…",children:e(m,{size:13,className:"text-ink/50 animate-spin"})}):h?e(De,{size:13,className:"text-ink/70 animate-pulse"}):J?e("span",{role:"status","aria-label":`Waiting for ${A?.title??"another session"}`,children:e(qe,{size:13,className:"text-ink/60 animate-pulse"})}):p==="stream"?e("span",{role:"status","aria-label":"Running",children:e(m,{size:13,className:"text-ink/50 animate-spin"})}):p?e(f,{size:13,className:"text-ink/50"}):k?e("span",{"data-testid":"child-indicator",className:"text-ink/35","aria-hidden":"true",children:e(me,{size:13})}):null}),e("span",{className:"flex flex-col min-w-0 ml-2 leading-snug",children:[e("span",{className:"flex min-w-0 items-center",children:[r&&e("span",{className:"mr-1.5 flex shrink-0 items-center",children:e(Ke,{harness:r,size:tt.touch})}),e("span",{className:"min-w-0 truncate text-xs",children:Q})]}),J&&e("span",{className:"text-[10px] text-ink/40 truncate",children:["waiting for ",A?.title??"another session"]}),t.worktree?e(Qs,{worktree:t.worktree}):null]})]}),e(Fs,{timeAgo:g,timeTitle:S,runStartedAt:v,className:"text-[11px] font-mono flex-shrink-0 ml-2",restingClassName:"text-ink/45"})]}),ee&&!O&&e("button",{type:"button",onClick:ne.openBelow,title:"Session actions","aria-label":"Session actions","aria-haspopup":"menu","aria-expanded":ie,className:"flex-shrink-0 py-1.5 pl-1.5 pr-1 text-ink/35 hover:text-ink rounded-lg cursor-pointer",children:e(Ce,{size:16})}),de&&!O&&e("button",{type:"button",onClick:w,title:c?"Collapse sessions and subagents":"Expand sessions and subagents","aria-expanded":c,"aria-label":c?"Collapse sessions and subagents":"Expand sessions and subagents",className:"flex-shrink-0 py-1.5 pl-1.5 pr-1 flex items-center justify-center text-ink/50 hover:text-ink rounded-lg cursor-pointer",children:c?e(B,{size:14}):e(se,{size:14})})]}),ne.anchor&&e(Mo,{anchor:ne.anchor,sessionId:t.id,...r?{harness:r}:{},...y!==void 0?{folderId:y}:{},isArchived:t.is_archived===1,onRename:N?H:void 0,onRenameWithAi:M,onArchive:T,onDelete:I,onCancelWait:E,onClose:ne.close})]})}function vo(t,r){let[l,p]=n(!1);return{open:()=>p(!0),dialog:l?e(Po,{isOpen:!0,onClose:()=>p(!1),root:t.project_path??null,folderId:t.id,folderName:t.name,onCreated:(h)=>{p(!1),r(h.path)}}):null}}function xo({hiddenCount:t,canShowLess:r,onShowMore:l,onShowLess:p}){if(t<=0&&!r)return null;return e("div",{className:"flex items-center gap-1",children:[t>0&&e("button",{type:"button",onClick:l,className:"flex items-center min-w-0 text-left py-2 pr-3 text-xs text-ink/60 hover:text-ink",children:[e("span",{className:"w-4 h-4 flex-shrink-0 flex items-center justify-center",children:e(B,{size:12})}),e("span",{className:"w-2 shrink-0"}),e("span",{className:"truncate",children:["Show more sessions (",t,")"]})]}),r&&e("button",{type:"button",onClick:p,className:"ml-auto shrink-0 flex items-center gap-1 text-xs text-ink/60 hover:text-ink pl-3 py-2",children:[e(ot,{size:12}),e("span",{className:"truncate",children:"Show less"})]})]})}function wo(t){return t?"mb-4":"mb-1"}function ko({folder:t,activeSessionId:r,onSelectSession:l,onNewSessionForFolder:p,onNewWorktreeSession:h,isExpanded:g,onToggleExpand:S,showArchived:v=!1,sessionStatus:x={},onToast:c,batch:w,onStartSessionSelection:k,onCancelWait:y}){let{visibleCount:C,showMore:T,showLess:I,canShowLess:N}=Ds(),M=vo(t,(G)=>h?.(t.id,G)),{refresh:A,runStartedAtMap:E}=Ve(),{expandedSessionIds:O,toggleSession:R}=hs(),[L]=le(),q=L.get("subagent"),z=L.get("sessionId"),{confirmDelete:F,requestDelete:te,cancelDelete:H,handlePin:X,handleDelete:ae,handleArchive:W,handleRename:ne,handleRenameWithAi:ie,handleOpenFolder:ee}=Ns(t,A,c),J=Qo(),de=X,Q=ae,oe=ee??void 0,pe=(t.sessions||[]).filter((G)=>v?G.is_archived===1:G.is_archived!==1),we=ra(t.icon),{folderCheckbox:be,sessionCheckboxes:he,folderSummary:V,toggleFolderSelection:j,rendered:Y,hiddenCount:ke}=Os({batch:w,folder:t,sessions:pe,showArchived:v,visibleCount:C,activeSessionId:r,sessionStatus:x}),Pe=Ho(Y),Se=g||he,ye=(G,Me)=>{let ve=String(G.id),Ye=String(r)===ve,ht=Ye&&z===ve&&Boolean(q),Ue=It(ve);return e(go,{session:G,harness:G.harness,folderId:G.folder_id,isActive:Ye&&!ht,status:x[ve],awaitingInput:Boolean(G.awaitingInput),timeAgo:Rs(G.updated_at??G.created_at),timeTitle:qo(G.updated_at??G.created_at),runStartedAt:x[ve]==="stream"?E[ve]:void 0,expandable:Me.expandable,isChild:Me.isChild,isExpanded:Me.isExpanded,onToggleExpand:Me.onToggleExpand,onSelect:()=>l(G.id),onArchive:()=>W(G),onDelete:Ue?void 0:()=>J.requestDelete(G),onRename:Ue?void 0:(bt)=>void ne(G,bt),onRenameWithAi:Ue?void 0:()=>void ie(G),waitingFor:G.waitingFor?{title:G.waitingFor.title}:void 0,onCancelWait:G.waitingFor?()=>y?.(G.waitingFor.waitId):void 0,selectable:he,selected:Boolean(w?.selected.includes(ve)),onToggleSelect:w?()=>w.toggle(ve):void 0})},ft=(G)=>Ps(G,Pe.childrenOf,O,R);return e("div",{className:wo(Se),"data-testid":"session-folder",children:[e("div",{onClick:w?void 0:S,className:"flex items-center justify-between gap-2 py-1 cursor-pointer hover:bg-ink/5 rounded-lg select-none transition-colors",children:[e("div",{className:"flex items-center space-x-2 min-w-0",children:[be&&V?e(Lr,{size:"md",checked:V.all,indeterminate:V.some,label:`Select ${t.name}`,onChange:j}):e(d,{children:e("span",{className:"w-4 h-4 flex items-center justify-center flex-shrink-0",children:t.customIconUrl?e("img",{src:t.customIconUrl,alt:"",className:"w-[15px] h-[15px] rounded-xs object-contain",referrerPolicy:"no-referrer"}):t.iconType==="chat"?e(mn,{size:15,className:"text-ink/80"}):e(we,{size:15,className:"text-ink/80",style:{color:t.accentColor||void 0}})})}),e("span",{className:"text-sm font-semibold text-ink truncate",children:t.name})]}),e("div",{className:"flex items-center space-x-2 text-xs text-ink/60",children:[e("span",{className:"font-mono text-[11px] text-ink/70",children:pe.length}),t.project_path&&e(me,{size:13,className:"text-ink/50 ml-1"}),!w&&e(d,{children:[e("button",{type:"button",onClick:(G)=>{G.stopPropagation(),p(t.id)},className:"p-1.5 rounded-lg hover:bg-ink/10 active:bg-ink/15 text-ink/60 hover:text-ink",title:"New Session","aria-label":`New session in ${t.name}`,children:e(P,{size:15})}),e(ho,{folder:t,canWorktree:Boolean(h&&t.project_path),onOpenFolder:oe,onNewWorktree:h?()=>M.open():void 0,onSelectSessions:k?()=>k(t.id):void 0,confirmDelete:F,onPin:de,onDelete:Q,onRequestDelete:te,onCancelDelete:H}),e("span",{className:"flex items-center justify-center pr-1",children:g?e(B,{size:14}):e(se,{size:14})})]})]})]}),Se&&e("div",{className:"mt-0.5 space-y-0.5",children:[Pe.roots.map((G)=>{let Me=String(G.id),ve=ft(G);return e("div",{className:"space-y-0.5",children:[ye(G,ve),ve.isExpanded&&e(Bi,{parentId:Me,hasSubagents:Boolean(G.hasSubagents),childrenOf:Pe.childrenOf,expandedIds:O,onToggle:R,activeSessionId:r===null?null:String(r),renderSession:ye,style:bo})]},G.id)}),e(xo,{hiddenCount:he?0:ke,canShowLess:!he&&N,onShowMore:T,onShowLess:I})]}),e(Ro,{session:J.pending,isDeleting:J.isDeleting,error:J.error,onClose:J.cancelDelete,onConfirm:()=>void J.confirmDelete()}),M.dialog]})}function yo({folders:t,activeSessionId:r,expandedFolders:l,showArchived:p,sessionStatus:h,onSelectSession:g,onNewSessionForFolder:S,onNewWorktreeSession:v,onToggleFolder:x,onToast:c,batch:w,onStartSessionSelection:k,onCancelWait:y}){return e("div",{className:"flex-1 scrollbar-overlay-container pl-3 pr-2 py-3",children:t.length===0?e("div",{className:"text-center py-12 text-xs text-ink/50 italic",children:"No matching sessions found"}):t.map((C)=>e(ko,{folder:C,activeSessionId:r,onSelectSession:g,onNewSessionForFolder:S,onNewWorktreeSession:v,isExpanded:l[C.id]??!0,onToggleExpand:()=>x(C.id),showArchived:p,sessionStatus:h,onToast:c,batch:w,onStartSessionSelection:k,onCancelWait:y},C.id))})}var kt=[3,2];function No(){return e("div",{className:"flex-1 p-3 space-y-4","aria-hidden":"true",children:kt.map((t,r)=>e("div",{className:"space-y-2",children:[e("div",{className:"flex items-center gap-2 py-2",children:[e("span",{className:"w-4 h-4 rounded-sm animate-pulse bg-ink/10"}),e("span",{className:"h-3 w-24 rounded animate-pulse bg-ink/10"})]}),Array.from({length:t},(l,p)=>e("div",{className:"flex items-center gap-2 rounded py-2",children:[e("span",{className:"w-4 h-4 rounded-full animate-pulse bg-ink/10"}),e("span",{className:"h-3 rounded animate-pulse bg-ink/10",style:{width:`${58-p%3*12}%`}})]},p))]},r))})}function Co({folders:t,initializing:r,failed:l,activeSessionId:p,expandedFolders:h,sessionStatus:g,searchQuery:S,sortOption:v,optionsOpen:x,showArchived:c,harnessFilter:w,onHarnessFilterChange:k,harnessOptions:y,optionsRef:C,scheduledCount:T,refreshing:I,selecting:N,batch:M,onNewSession:A,onNewWorkspace:E,onScheduler:O,onRefresh:R,onToggleOptions:L,onSortChange:q,onResetSort:z,onToggleArchived:F,onHideArchived:te,onSearchChange:H,onClearSearch:X,onSelectWorkspaces:ae,onSelectSession:W,onNewSessionForFolder:ne,onNewWorktreeSession:ie,onToggleFolder:ee,onToast:J,onStartSessionSelection:de,onCancelWait:Q}){return e(d,{children:[e(fo,{searchQuery:S,sortOption:v,optionsOpen:x,showArchived:c,optionsRef:C,onNewSession:A,onNewWorkspace:E,onScheduler:O,scheduledCount:T,onRefresh:R,refreshing:I,onToggleOptions:L,onSortChange:q,onResetSort:z,onToggleArchived:F,onHideArchived:te,onSearchChange:H,onClearSearch:X,onSelectWorkspaces:ae,selecting:N}),e("div",{className:"px-3 pt-2 pb-1",children:e(Ts,{options:y,value:w,onChange:k,touch:!0})}),l?e($s,{touch:!0,onRetry:R,refreshing:I}):r?e(No,{}):e(yo,{folders:t,activeSessionId:p,expandedFolders:h,showArchived:c,sessionStatus:g,onSelectSession:W,onNewSessionForFolder:ne,onNewWorktreeSession:ie,onToggleFolder:ee,onToast:J,batch:M,onStartSessionSelection:de,onCancelWait:Q})]})}function To({sidebarStyle:t,controller:r,batch:l,dock:p,dockBody:h,expandedFolders:g,optionsRef:S,activeSessionId:v,scheduledCount:x,onToggleFolder:c,onNewSession:w,onNewWorkspace:k,onScheduler:y,onToggleArchived:C,onNewSessionForFolder:T,onNewWorktreeSession:I,onToast:N,onArchiveSelected:M,onCancelWait:A}){let{initializing:E,failed:O,refreshNow:R,isRefreshing:L,searchQuery:q,setSearchQuery:z,showArchived:F,setShowArchived:te,optionsOpen:H,setOptionsOpen:X,sortOption:ae,handleSortChange:W,harnessFilter:ne,setHarnessFilter:ie,harnessOptions:ee,processedFolders:J,sessionStatus:de,handleSelectSession:Q}=r,{selection:oe,deleteRun:pe,archiveRun:we,binding:be,scopeFolder:he,available:V,selected:j}=l,Y={className:"flex-1 min-h-0 w-full",folders:J,initializing:E,failed:O,activeSessionId:v,sessionStatus:de,searchQuery:q,onSearchChange:z,showArchived:F,onToggleArchived:C,sortOption:ae,optionsOpen:H,onToggleOptions:()=>X(!H),onCloseOptions:()=>X(!1),onSortChange:W,harnessFilter:ne,onHarnessFilterChange:ie,harnessOptions:ee,onRefresh:R,refreshing:L,scheduledCount:x,onNewSession:w,onNewWorkspace:k,onScheduler:y,onSelectSession:Q,onNewSessionForFolder:T,onNewWorktreeSession:I,onToast:N,onCancelWait:A,batch:be,onSelectWorkspaces:l.toggleWorkspaceSelection,onStartSessionSelection:(ke)=>oe.begin("session",ke)};return e(d,{children:[e("div",{className:p.showingSessions?"contents":"hidden",children:[t==="modern"?e(xu,{...Y,touch:!0}):e(Co,{folders:J,initializing:E,failed:O,activeSessionId:v,expandedFolders:g,sessionStatus:de,searchQuery:q,sortOption:ae,optionsOpen:H,showArchived:F,harnessFilter:ne,onHarnessFilterChange:ie,harnessOptions:ee,optionsRef:S,scheduledCount:x,refreshing:L,selecting:oe.mode!==null,batch:be,onNewSession:w,onNewWorkspace:k,onScheduler:y,onRefresh:R,onToggleOptions:()=>X(!H),onSortChange:W,onResetSort:()=>W("A-Z"),onToggleArchived:C,onHideArchived:()=>te(!1),onSearchChange:z,onClearSearch:()=>z(""),onSelectWorkspaces:l.toggleWorkspaceSelection,onSelectSession:Q,onNewSessionForFolder:T,onNewWorktreeSession:I,onToggleFolder:c,onToast:N,onStartSessionSelection:(ke)=>oe.begin("session",ke),onCancelWait:A}),oe.mode&&e(Iu,{drawer:!0,mode:oe.mode,count:j.length,total:V.length,busy:pe.isDeleting,archiving:we.isArchiving,scopeLabel:he?.name,onSelectAll:()=>oe.selectAllOf(V),onUnselectAll:()=>oe.unselectAllOf(V),onDelete:()=>pe.request(j),onArchive:M,onCancel:oe.end})]}),p.showingSessions?null:e(mo,{panelKey:p.activeView,panel:p.activePanel,body:h})]})}function Eo(t,r){let l=t.tabs;ks({enabled:t.tabsMode,revealed:Vm(r),view:t.activeView,home:l?.home??!1,chosenHome:l?.chosenHome??!1,openTab:l?.open??null,known:new Set(t.catalog.map((g)=>g.id))});let p=i(!1),h=l?{...l,select:(g)=>{p.current=!0,l.select(g)},open:(g)=>{p.current=!0,l.open(g)},close:(g)=>{p.current=!0,l.close(g)}}:null;return o(()=>{if(!t.tabsMode||!l)return;if(l.active!==null&&l.active!==t.activeView)t.setActiveView(l.active)},[t.tabsMode,l?.active,t.activeView,t.setActiveView]),o(()=>{if(!t.tabsMode||!l)return;if(p.current){p.current=!1;return}if(l.tabs.includes(t.activeView))return;if(!t.catalog.some((g)=>g.id===t.activeView))return;l.open(t.activeView)},[t.tabsMode,l,t.activeView,t.catalog]),{tabs:h}}function _e(t){return{dragRegion:!0,layout:"mobile",rootProps:{...Da(),...t},style:{paddingLeft:Ai(gi("0.75rem",!0)),paddingRight:vl("0.75rem",!0)}}}function Ao({side:t,onClose:r}){let l=t==="left"?nn:Zn;return e("button",{type:"button",onClick:r,className:`${$e.mobile} flex-none cursor-pointer rounded-lg text-ink/60 transition-colors hover:bg-ink/5 hover:text-ink titlebar-no-drag`,title:t==="left"?"Tutup panel kiri":"Tutup panel kanan","aria-label":t==="left"?"Close left sidebar":"Close right sidebar",children:e(l,{size:Tr.mobile,strokeWidth:1.8})})}function Wo({activeSessionId:t,newWorkspaceOpen:r,onCloseNewWorkspace:l,schedulerOpen:p,onCloseScheduler:h,aboutOpen:g,onCloseAbout:S,updates:v,pushToast:x,batchDelete:c,batchMode:w,onEndBatch:k,scopeLabel:y}){return e(d,{children:[e(ms,{isOpen:r,onClose:l,onCreate:bl,onClone:yl}),e(vu,{isOpen:p,onClose:h,activeSessionId:t===null?null:String(t),onToast:x}),e(ud,{isOpen:g,onClose:S,updates:v,onToast:x}),e(Jm,{updates:v}),e(_u,{mode:w??"session",count:c.pending.length,scopeLabel:y,isDeleting:c.isDeleting,progress:c.progress,outcome:c.outcome,onClose:()=>{let C=c.outcome?.refused.length??0;if(c.cancel(),c.outcome&&C===0)k()},onConfirm:()=>{let C=w??"session";c.confirm(C).then((T)=>{if(T&&T.refused.length===0)k()})}})]})}function Bo(){let t=Dt(),r=rr("left"),[l,p]=Ha("layout.mobileLeftPanel",Te),h=Hm(l,t.enabled),g=Qd("left"),S=t.enabled&&g==="tabs",v=u(()=>new Set(r.map((c)=>c.id)),[r]),x=vs("left",v,Te);return{catalog:r,activeView:h,setActiveView:p,showingSessions:h===Te,activePanel:r.find((c)=>c.id===h),enabled:t.enabled,tabsMode:S,tabs:S?x:null}}function _o(t){return{className:"w-full h-full",sessionId:t.sessionId===null?null:String(t.sessionId),enabled:t.requiresWorkspace?t.hasActiveContext===!0:!0,active:!0,refreshKey:t.refreshKey,...t.rootPath?{rootPath:t.rootPath}:{},...t.onRefresh?{onRefresh:t.onRefresh}:{},...t.onOpenFile?{onOpenFile:t.onOpenFile}:{},onClose:t.onClose,showHeader:!1,layout:"phone"}}function Vo({appSettings:t,onSelectSession:r,onClose:l,rootPath:p,refreshKey:h,onRefresh:g,onOpenFile:S}){let v=wu(t,{onSelectSession:r,onAfterSelect:l}),{folders:x,processedFolders:c,refreshNow:w,showArchived:k,activeSessionId:y}=v,C=Bu(c,k,w),[T,I]=n({1:!0,2:!0,3:!0}),N=i(null);ue(N,()=>v.setOptionsOpen(!1));let M=(R)=>{I((z)=>({...z,[R]:!z[R]}));let L=x.find((z)=>z.id===R),q=!(T[R]??L?.isExpanded??!0);Ud(R,q)},A=c.map((R)=>`${R.id}:${R.isExpanded}`).join("|");o(()=>{I(Object.fromEntries(c.map((R)=>[R.id,R.isExpanded])))},[A]);let E=Bo(),O=_o({sessionId:y,refreshKey:h,rootPath:p,onRefresh:g,onOpenFile:S,onClose:l,requiresWorkspace:E.activePanel?.requiresWorkspace??!1,hasActiveContext:Boolean(p)});return{controller:v,batch:C,expandedFolders:T,toggleFolder:M,optionsRef:N,dock:E,dockBody:O}}function ze(t){let{disabledPanels:r}=gn(),{setEnabled:l}=tl(),p=Le(),h=Wm(t),g=a((S,v)=>{l(S,v)},[l]);return{...p,items:h,hidden:r,toggle:g}}function Ko({activeSessionId:t,onSelectSession:r,onNewSession:l,onNewSessionForFolder:p,onNewWorktreeSession:h,onClose:g,onDesktopToggle:S,appSettings:v={},rootPath:x,refreshKey:c=0,onRefresh:w,onOpenFile:k,revealSignal:y=0}){let{controller:C,batch:T,expandedFolders:I,toggleFolder:N,optionsRef:M,dock:A,dockBody:E}=Vo({appSettings:v,onSelectSession:r,onClose:g,rootPath:x,refreshKey:c,onRefresh:w,onOpenFile:k}),{showArchived:O,setShowArchived:R}=C,{selection:L,deleteRun:q,archiveRun:z,selected:F,scopeFolder:te}=T,H=ld(),X=ze("left"),[ae,W]=n(!1),[ne,ie]=n(!1),ee=yu(),[J,de]=n(!1),{pushToast:Q}=He(),oe=hl(Q);Cu({onNotice:Q});let{updates:pe,shellDownload:we}=ao({onClose:g,openAbout:()=>de(!0),pushToast:Q}),{tabs:be}=Eo(A,y),he=()=>{l(),g()},V=()=>{z.archive(F).then((Se)=>{if(!Se)return;let ye=Eu(Se);if(ye)Q(ye.message,ye.tone);if(!Se.error)L.end()})},j=(Se)=>{p(Se),g()},Y=()=>{R(!O)},ke=h?(Se,ye)=>{h(Se,ye),g()}:void 0,Pe=e(To,{sidebarStyle:H,controller:C,batch:T,dock:A,dockBody:E,expandedFolders:I,optionsRef:M,activeSessionId:t,scheduledCount:ee,onToggleFolder:N,onNewSession:he,onNewWorkspace:()=>W(!0),onScheduler:()=>ie(!0),onToggleArchived:Y,onNewSessionForFolder:j,...ke?{onNewWorktreeSession:ke}:{},onToast:Q,onArchiveSelected:V,onCancelWait:oe});return e("div",{className:"flex flex-col h-full w-full bg-canvas text-ink relative select-none",children:[e(ro,{onClose:g,viewLabel:A.showingSessions?"Sessions":A.activePanel?.label??"Panel",menuProps:X.surfaceProps}),!A.tabsMode&&co(A.enabled)?e(po,{panels:A.catalog,activeId:A.activeView,onSelect:A.setActiveView,menuProps:X.surfaceProps}):null,A.tabsMode&&be?e("div",{className:"flex-1 min-h-0 flex flex-col",children:e(ys,{catalog:A.catalog,tabs:be,pinned:Te,homeTitle:"Panel kiri",stripProps:_e(X.surfaceProps),children:e("div",{className:"h-full w-full",children:Pe})})}):null,X.anchor?e(Oo,{anchor:X.anchor,items:X.items,hidden:X.hidden,onToggle:X.toggle,onClose:X.close}):null,A.tabsMode?null:e("div",{className:"contents",children:Pe}),e(so,{onSettings:()=>window.dispatchEvent(new CustomEvent("omp:open-settings",{detail:{}})),onKeyBindings:Uc,onAbout:()=>de(!0),shellDownload:we,onDesktopToggle:S,updateAvailable:pe.hasUpdate,onUpdateClick:()=>{de(!0),pe.check()}}),e(Wo,{activeSessionId:t,newWorkspaceOpen:ae,onCloseNewWorkspace:()=>W(!1),schedulerOpen:ne,onCloseScheduler:()=>ie(!1),aboutOpen:J,onCloseAbout:()=>de(!1),updates:pe,pushToast:Q,batchDelete:q,batchMode:L.mode,onEndBatch:L.end,scopeLabel:te?.name})]})}function $o({catalog:t,activeId:r,onSelect:l,hasGitChanges:p,onClose:h,menuProps:g}){return e("div",{className:"border-b border-ink/10 flex items-center justify-between px-3 flex-shrink-0 bg-canvas titlebar-drag-region select-none",...Da(),...g,style:zo(),children:[e("div",{className:"flex items-center min-w-0 titlebar-no-drag",children:e(Be,{panels:t,activeId:r,onSelect:l,hasGitChanges:p})}),e("button",{type:"button",onClick:h,className:"p-1.5 rounded-lg hover:bg-ink/5 active:bg-ink/10 text-ink transition-colors flex-shrink-0 ml-2 titlebar-no-drag",title:"Close right sidebar","aria-label":"Close right sidebar",children:e(b,{size:20,strokeWidth:1.8})})]})}function je({panel:t,body:r}){if(!t)return e("div",{className:"h-full flex items-center justify-center text-ink/40",children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});return e(Je,{fallback:e("div",{className:"h-full flex items-center justify-center text-ink/40",children:e("span",{className:"text-xs font-mono",children:"Loading…"})}),children:e(Io,{value:r,children:t.render(r)})})}function Uo({enabled:t=!0,rootPath:r,refreshKey:l=0,onRefresh:p,onOpenFile:h,onClose:g,revealSignal:S=0}){let[v,x]=Ha("layout.mobileRightPanel",uc),{sessionId:c}=Oe(),w=Dt(),k=lo(rr("all"),Te,w.enabled),y=k.find((W)=>W.id===v)??k[0],T=Qd("right")==="tabs",I=u(()=>new Set(k.map((W)=>W.id)),[k]),N=vs("right",I,null);ks({enabled:T,revealed:Vm(S),view:v,home:N.home,chosenHome:N.chosenHome,openTab:N.open,known:I});let{open:M,tabs:A}=N,E=Ee(c,"layout.mobileRightPanel")!==void 0,O=(W)=>{if(W!==y?.id)Re(W)},R=i(!1),L={...N,select:(W)=>{R.current=!0,O(W),N.select(W)},open:(W)=>{R.current=!0,O(W),N.open(W)},close:(W)=>{R.current=!0,N.close(W)}};o(()=>{if(!T)return;if(N.active!==null&&N.active!==v)x(N.active)},[T,N.active,v,x]),o(()=>{if(!T||N.home)return;if(R.current){R.current=!1;return}if(!E)return;if(A.includes(v)||!I.has(v))return;M(v)},[T,N.home,E,v,A,M,I]);let q=Wp(r,t),{changes:z}=el(r,q,t),F=z.length>0,te=a((W)=>{if(W!==y?.id)Re(W);x(W)},[y?.id,x]);o(()=>{if(!Ge(y?.id))gc()},[y?.id]);let H=ze(w.enabled?"right":"all"),X=w.enabled?H.items:H.items.filter((W)=>W.id!==Te),ae={className:"h-full w-full",enabled:t||!y?.requiresWorkspace,active:!0,refreshKey:l,...r?{rootPath:r}:{},onRefresh:p,onOpenFile:h,onClose:g,showHeader:!1,layout:"phone"};return e("div",{className:"flex flex-col h-full w-full bg-paper text-ink relative select-none",children:[T?null:e($o,{catalog:k,activeId:y?.id??v,onSelect:te,hasGitChanges:F,onClose:g,menuProps:H.surfaceProps}),T?e("div",{className:"flex-1 min-h-0 flex flex-col",children:e(ys,{catalog:k,tabs:L,homeTitle:"Panel kanan",stripProps:_e(H.surfaceProps),actions:e(Ao,{side:"right",onClose:g}),children:e("div",{className:"h-full w-full",children:e(je,{panel:y,body:ae})})})}):null,H.anchor?e(Oo,{anchor:H.anchor,align:"right",items:X,hidden:H.hidden,onToggle:H.toggle,onClose:H.close}):null,T?null:e("div",{className:"flex-1 min-h-0 overflow-hidden relative",style:{paddingBottom:"env(safe-area-inset-bottom, 0px)"},children:e(je,{panel:y,body:ae})})]})}function Ne({label:t,onClick:r,active:l=!1,danger:p=!1,children:h}){let g=p?"bg-error text-canvas hover:bg-error/90":l?"bg-ink text-canvas":"text-ink/70 hover:bg-ink/10 hover:text-ink";return e("button",{type:"button",onClick:r,title:t,"aria-label":t,"aria-pressed":l||void 0,className:`${$e.mobile} flex-none cursor-pointer rounded-lg transition-colors ${g}`,children:h})}var xe=Tr.mobile;function Xo({actions:t}){let[r,l]=n(!1),p=i(null);return ue(p,()=>l(!1),r),o(()=>{if(!r)return;let h=(g)=>{if(g.key==="Escape")l(!1)};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[r]),e("div",{className:"relative flex-none",ref:p,children:[e("button",{type:"button",onClick:()=>l((h)=>!h),title:"More file actions","aria-label":"More file actions","aria-haspopup":"menu","aria-expanded":r,className:`${$e.mobile} flex-none cursor-pointer rounded-lg text-ink/70 transition-colors hover:bg-ink/10 hover:text-ink`,children:e(Ce,{size:Tr.mobile})}),r?e("div",{role:"menu","aria-label":"File actions",className:"absolute right-0 top-full z-50 mt-1 w-52 overflow-hidden rounded-xl border border-ink/15 bg-paper py-1 text-xs shadow-lg",children:t.map((h)=>{let g=h.icon;return e("button",{type:"button",role:"menuitem",onClick:()=>{l(!1),h.onSelect()},className:"flex w-full items-center gap-2 px-3 py-2.5 text-left text-ink/80 transition-colors hover:bg-ink/5 hover:text-ink",children:[e(g,{size:15,className:"flex-none text-ink/60"}),e("span",{className:"truncate",children:h.label})]},h.id)})}):null]})}var yt=420;function Yo({fileName:t,hasPreview:r,isPreview:l,hasReview:p,isReviewing:h,onToggleReview:g,wordWrap:S,copied:v,byteViewer:x=!1,missing:c=!1,onSave:w,onClose:k,onTogglePreview:y,onToggleFind:C,findOpen:T,onToggleWrap:I,onZoomOut:N,onZoomIn:M,onCopy:A,onDownload:E}){let O=Gc(yt),R=u(()=>{let L=[];if(!x)L.push({id:"wrap",label:S?"Word wrap: on":"Word wrap: off",icon:rn,onSelect:I},{id:"zoom-out",label:"Decrease font size",icon:Fa,onSelect:N},{id:"zoom-in",label:"Increase font size",icon:Ra,onSelect:M});if(!O)L.push({id:"copy",label:v?"Copied":"Copy content",icon:v?f:re,onSelect:A},{id:"download",label:"Download file",icon:fe,onSelect:E});return L},[x,O,S,v,I,N,M,A,E]);return e("header",{className:"bg-canvas border-b border-ink/10 flex items-center justify-between gap-1 px-3 flex-shrink-0 titlebar-drag-region",style:zo(),children:[e("div",{className:"flex items-center gap-1 min-w-0 titlebar-no-drag",children:[e(Ne,{label:"Close editor",onClick:k,children:e(an,{size:xe,strokeWidth:2})}),e("div",{className:"flex min-w-0 items-center gap-1.5",children:[e(ct,{name:t,size:15,className:`flex-shrink-0${c?" text-error":""}`}),e("span",{className:`truncate font-semibold text-xs${c?" text-error line-through":" text-ink"}`,children:t})]})]}),e("div",{className:"flex flex-none items-center gap-0.5 text-ink/70 titlebar-no-drag",children:[c&&w&&e(Ne,{label:"Save and recreate the file",onClick:w,danger:!0,children:e(mt,{size:xe})}),!x&&e(Ne,{label:T?"Close find":"Find in file",onClick:C,active:T,children:e(U,{size:xe})}),p&&e(Ne,{label:h?"Exit review mode":"Review this document",onClick:g,active:h,children:e(mn,{size:xe})}),r&&e(Ne,{label:l?"View source":"Show preview",onClick:y,active:l,children:l?e(Tt,{size:xe}):e(We,{size:xe})}),O&&e(d,{children:[e(Ne,{label:"Copy content",onClick:A,children:v?e(f,{size:xe,className:"text-success"}):e(re,{size:xe})}),e(Ne,{label:"Download file",onClick:E,children:e(fe,{size:xe})})]}),R.length>0&&e(Xo,{actions:R})]})]})}function Zo({fileName:t,content:r,path:l,root:p,repo:h,fontSize:g,scrollRef:S,onScroll:v,isLoading:x,unsupported:c,loadError:w,reviewActive:k,onExitReview:y}){return e("div",{ref:S,onScroll:v,"data-testid":"editor-scroller",className:"flex-1 min-h-0 overflow-auto relative bg-paper text-ink select-text",children:x?e("div",{className:"flex items-center justify-center h-full text-ink/40 text-xs gap-2",children:[e(m,{size:14,className:"animate-spin"}),e("span",{children:"Loading file content..."})]}):c?e("div",{className:"flex flex-col items-center justify-center h-full gap-2 px-6 text-center",children:[e(Yc,{size:20,className:"text-ink/40"}),e("span",{className:"text-xs text-ink/70 font-sans",children:[t," cannot be opened here"]}),e("span",{className:"text-[11px] text-ink/50 font-sans max-w-[42ch]",children:c})]}):w?e("div",{className:"flex flex-col items-center justify-center h-full gap-2 px-6 text-center",children:[e(_,{size:20,className:"text-error"}),e("span",{className:"text-xs text-error font-sans",children:["Could not read ",t]}),e("span",{className:"text-[11px] text-ink/50 font-mono break-all",children:w})]}):e("div",{className:"p-4 bg-paper text-ink min-h-full font-sans",style:{fontSize:`${g}px`},children:e(Zc,{content:r,file:{name:t,path:l,root:p,repo:h},active:k,onExit:y})})})}function Jo({file:t,editor:r,viewerKind:l,byteViewer:p,isPreview:h,isMd:g,content:S,language:v,wordWrap:x,fileKey:c,revealMarks:w,currentMark:k,surfaceRef:y,setCodeScroller:C,previewRef:T,scroll:I,fontSize:N,reviewActive:M,onExitReview:A,editorTheme:E,editorFontFamily:O,indentUnitText:R,typing:L}){let q=a(async(z)=>{let F=await iu(t,z,{interactive:!0,baseMtimeMs:r.baseMtimeMs});if(F.status==="written")return{ok:!0};if(F.status==="conflict")return{ok:!1,error:"This file changed on disk since it was opened."};if(F.status==="needs-permission")return{ok:!1,error:"Tap Save again to grant write access."};return{ok:!1,error:F.error}},[t,r.baseMtimeMs]);if(r.isImage&&r.imageUrl)return e(wi,{src:r.imageUrl,name:t.name,className:"flex-1 min-h-0"});if(r.isImage||au(l)&&(p||h))return e(Sl,{kind:l,path:t.path??t.name,name:t.name,source:r.byteSource,content:r.content,revision:r.revision,onContentChange:r.onChange,onSaveBytes:r.deviceBacked?void 0:q,onDirtyChange:r.setBinaryDirty});if(r.isLoading||r.unsupported||r.loadError||g&&h)return e(Zo,{fileName:t.name,content:S,path:t.path??t.name,root:t.root,repo:t.repo,fontSize:N,scrollRef:T,onScroll:I.onScroll,isLoading:r.isLoading,unsupported:r.unsupported,loadError:r.loadError,reviewActive:M,onExitReview:A});return e(eu,{ref:y,value:S,onValueChange:r.onChange,language:v,wordWrap:x,documentKey:c,marks:w,currentMark:k,onScroller:C,scrollTestId:"editor-scroller",className:"flex-1 min-h-0 text-ink select-text",themeVars:E.vars,themes:E.themes,indentUnitText:R,typing:L,padding:12,placeholder:"This file is empty",style:{fontFamily:O,fontSize:`${N}px`,lineHeight:ll}})}function et(){return e("div",{className:"flex items-start gap-2 px-3 py-2 border-b border-error/30 bg-error/10 text-error shrink-0",children:[e(_,{size:14,className:"shrink-0 mt-0.5"}),e("div",{className:"min-w-0",children:[e("div",{className:"text-[11.5px] font-sans",children:"This file was deleted from disk."}),e("div",{className:"text-[11px] font-sans text-error/80",children:"The buffer is still here. Saving recreates the file — autosave is off until then."})]})]})}function nt({isImage:t,byteViewer:r,viewerKind:l,lineCount:p,charCount:h,language:g,saveStatus:S,path:v,conflicts:x=0}){return e("footer",{className:"bg-canvas border-t border-ink/10 px-3 flex items-center justify-between text-[10px] text-ink/60 flex-shrink-0 font-mono",style:{height:"calc(1.75rem + env(safe-area-inset-bottom, 0px))",paddingBottom:"env(safe-area-inset-bottom, 0px)",paddingLeft:"max(0.75rem, env(safe-area-inset-left, 0px))",paddingRight:"max(0.75rem, env(safe-area-inset-right, 0px))"},children:[e("div",{className:"flex items-center space-x-3",children:t?e("span",{className:"uppercase",children:"Image"}):r?e("span",{className:"uppercase",children:Go[l]}):e(d,{children:[x>0&&e("span",{className:"text-error font-semibold tabular-nums",children:["⚠ ",x]}),e("span",{children:[p," lines"]}),e("span",{children:[h," chars"]}),e("span",{className:"uppercase",children:g})]})}),e("div",{className:"flex items-center space-x-2",children:[S==="saving"&&e(d,{children:[e(m,{size:10,className:"animate-spin"}),e("span",{children:"Saving…"})]}),S==="saved"&&e(d,{children:[e("span",{className:"w-1.5 h-1.5 rounded-full bg-success"}),e("span",{children:"Saved"})]}),S==="error"&&e(d,{children:[e("span",{className:"w-1.5 h-1.5 rounded-full bg-error"}),e("span",{className:"text-error",children:"Save failed"})]}),S==="idle"&&v&&e("span",{className:"truncate max-w-[140px]",children:v})]})]})}function it({path:t,content:r,ready:l,surfaceRef:p}){let h=cu(t,r,l),g=i(null);return o(()=>{if(!h||g.current===h.request)return;g.current=h.request;let S=h.matches[h.currentIndex];if(!S)return;p.current?.select(S.start,S.end,!1),p.current?.revealOffset(S.start)},[h,p]),{matches:h?.matches??[],currentIndex:h?.currentIndex??-1}}function rt({path:t,content:r,documentKey:l,ready:p,surfaceRef:h,toggleWordWrap:g}){let S=it({path:t,content:r,ready:p,surfaceRef:h}),v=lu({text:r,documentKey:l,readSelection:()=>h.current?.getSelection()??null,select:(x,c,w=!0)=>h.current?.select(x,c,w),reveal:(x)=>h.current?.revealOffset(x),applyDocument:(x,c,w)=>h.current?.applyDocument(x,c,w),toggleWordWrap:g});if(v.open&&v.matches.length>0)return{find:v,revealMarks:v.matches,currentMark:v.currentIndex};return{find:v,revealMarks:S.matches.length>0?S.matches:void 0,currentMark:S.currentIndex}}function st({path:t,symbols:r,total:l,truncated:p,emptyNotice:h,preview:g=!1}){let[S,v]=n(!1);if(!t)return null;let x=(c,w)=>{if(v(!1),g){let k=nd(r,w);if(k)rs({path:t,...k});return}ns({path:t,line:c.line,column:c.column,length:c.name.length})};return e(d,{children:[e("div",{className:"absolute bottom-14 right-3 z-20",children:e("button",{type:"button",onClick:()=>v(!0),"aria-label":`Outline (${l} symbols)`,title:"Outline",className:"flex h-9 w-9 items-center justify-center rounded-full border border-ink/20 bg-paper text-ink/60 shadow-sm transition-all hover:bg-ink/5 hover:text-ink",children:e(Yr,{size:16})})}),S&&e(Z,{onClose:()=>v(!1),maxWidthClass:"max-w-sm",zClass:"z-[70]",header:e("div",{className:"flex min-w-0 items-center gap-2",children:[e(Yr,{size:15,className:"flex-shrink-0 text-ink/50"}),e("span",{className:"text-sm font-medium",children:"Outline"}),e("span",{className:"font-mono text-[11px] text-ink/40",children:p?`${r.length}/${l}`:l})]}),children:e("div",{className:"max-h-[60vh] overflow-y-auto scrollbar-overlay-container py-1",children:[r.length===0?e("div",{className:"px-4 py-3 text-[11px] italic text-ink/40",children:h}):r.map((c,w)=>e("button",{type:"button",onClick:()=>x(c,w),"aria-label":g?`${ei(c.kind)} ${c.name}`:`${ei(c.kind)} ${c.name}, line ${c.line}`,className:"flex w-full min-w-0 items-center gap-2 px-4 py-2 text-left transition-colors hover:bg-ink/5 active:bg-ink/10",style:{paddingLeft:`${16+c.depth*12}px`},children:[e(Vu,{kind:c.kind,size:13}),e("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-ink",children:c.name}),!g&&e("span",{className:"flex-shrink-0 font-mono text-[10px] text-ink/40",children:c.line})]},`${c.line}:${c.kind}:${c.name}`)),p&&e("div",{className:"px-4 py-2 text-[11px] italic text-ink/40",children:Yu(l)})]})})]})}function lt({file:t,missing:r=!1,onClose:l,onFileSaved:p,onDropResult:h}){let g=Es(t.path??t.name),[S,v]=n({}),[x,c]=n(So),[w,k]=n(!0),y=Do(),C=Ci(),T=Au(),I=bu(),N=g==="markdown",M=Td[g]===!0,A=Cs[g]===!0,E=t.path??t.name,O=S[E]??A,R=mu(String(E)),L=N&&O,q=()=>v((Y)=>({...Y,[E]:!O})),z=qc({enabled:Boolean(t.root),onResult:h}),F=su(t,{flushOnUnmount:!0,reportSaveError:!0,downloadMimeType:"text/plain;charset=utf-8",onFileSaved:p,missing:r}),[te,H]=n(null),X=kl({tabKey:E,surface:N&&O?"rendered":"code",ready:F.loaded,slot:Ph,element:N&&O?void 0:te}),[ae,W]=n(null),ne=a((Y)=>{X.ref(Y),W(Y)},[X.ref]);nu({path:t.path??null,scroller:ae,preview:N&&O});let ie=i(null),{find:ee,revealMarks:J,currentMark:de}=rt({path:t.path??null,content:F.content,documentKey:`${E}\x00${F.language}`,ready:F.loaded&&!F.loadError,surfaceRef:ie,toggleWordWrap:()=>k((Y)=>!Y)}),{content:Q,language:oe}=F,pe=Q.split(`
2
- `).length,we=Xc(Q);uu({file:{id:E,name:t.name,path:t.path??E},editor:F,surfaceRef:ie,isPreview:O,exitPreview:()=>v((Y)=>({...Y,[E]:!1})),publish:!1});let{symbols:be,total:he,truncated:V,notice:j}=Ju({content:Q,language:oe,path:t.path??null,state:M?"not-a-document":F.loadError?"error":F.loaded?"ready":"loading",note:M?`${Go[g]} files have no text outline.`:F.loadError});return e("div",{className:"fixed inset-x-0 top-0 h-dvh z-[60] bg-paper flex flex-col font-mono text-xs select-none",...z.dropProps,...z.captureDropProps,children:[e(_l,{visible:z.isDragging}),e(Yo,{fileName:t.name,hasPreview:A,isPreview:O,wordWrap:w,copied:F.copied,byteViewer:M,missing:r,onSave:F.saveNow,onClose:l,onTogglePreview:q,hasReview:L,isReviewing:L&&R.active,onToggleReview:R.toggle,onToggleFind:()=>ee.open?ee.close():ee.openFind(),findOpen:ee.open,onToggleWrap:()=>k(!w),onZoomOut:()=>c((Y)=>Math.max(cl,Y-1)),onZoomIn:()=>c((Y)=>Math.min(ul,Y+1)),onCopy:F.copy,onDownload:F.download}),r&&e(et,{}),F.diskChange&&e(du,{fileName:t.name,onReload:F.reloadFromDisk,onKeepMine:F.keepMineAgainstDisk}),ee.open&&!M&&e("div",{className:"relative shrink-0 h-9 border-b border-ink/10 bg-paper",children:e(tu,{find:ee})}),e(Jo,{file:t,editor:F,viewerKind:g,byteViewer:M,isPreview:O,isMd:N,content:Q,language:oe,wordWrap:w,fileKey:E,revealMarks:J,currentMark:de,surfaceRef:ie,setCodeScroller:H,previewRef:ne,scroll:X,fontSize:x,reviewActive:L&&R.active,onExitReview:R.toggle,editorTheme:C,editorFontFamily:y,indentUnitText:gu(T),typing:I}),!M&&e(st,{path:t.path??null,symbols:be,total:he,truncated:V,emptyNotice:j,preview:N&&O}),e(nt,{isImage:F.isImage,byteViewer:M,viewerKind:g,lineCount:pe,charCount:Q.length,language:oe,saveStatus:F.saveStatus,path:t.path,conflicts:we}),F.saveMissingConfirm&&t.path&&e(pu,{fileName:t.name,filePath:t.path,onClose:F.cancelSaveMissing,onConfirm:F.confirmSaveMissing})]})}function dt({diff:t,onClose:r,onFileSaved:l}){let p=t.path.split("/").pop()||t.path,h=Boolean(t.staged),g=t.status||"M",S=er(g,h);return e("div",{className:"fixed inset-x-0 top-0 h-dvh z-[60] bg-paper flex flex-col",children:[e("header",{className:"bg-canvas border-b border-ink/10 flex items-center justify-between px-3 flex-shrink-0",style:zo(),children:[e("div",{className:"flex items-center space-x-2 min-w-0 pr-2",children:[e("button",{type:"button",onClick:r,className:"p-1.5 -ml-1 rounded-lg hover:bg-ink/5 active:bg-ink/10 text-ink transition-colors flex-shrink-0",title:"Back","aria-label":"Close diff",children:e(an,{size:18,strokeWidth:1.9})}),e(ct,{name:p,size:14,className:"flex-shrink-0"}),e("span",{className:"font-mono text-xs text-ink font-medium truncate",title:t.path,children:p})]}),e("span",{className:`px-1.5 py-0.5 text-[10px] font-mono font-semibold rounded border flex-shrink-0 ${S.badgeBgClass}`,children:[S.charStatus," ",S.label]})]}),e("div",{className:"flex-1 min-h-0",children:e(Jc,{className:"h-full",viewModeButtons:!1,filePath:t.path,status:g,isStaged:h,root:t.root,repo:t.repo||".",journalDiff:t.journal,readOnly:Boolean(t.journal),onFileSaved:l,tabKey:t.journal?rf(t.journal.path,t.journal.from,t.journal.to):nf(t.path,h)})})]})}function Ie(t,r){let l=t[r];return typeof l==="string"&&l.length>0?l:void 0}function Nt(t){let r=t.content;return typeof r==="string"?r:void 0}function Xe(t,r){let l=typeof t==="object"&&t!==null?t:{},p=(Ie(l,"path")??"").replace(/^\/+/,"");if(!p)return null;return{name:Ie(l,"name")??p.split("/").pop()??"file",path:p,content:Nt(l),root:Ie(l,"root")??r??void 0,repo:Ie(l,"repo"),handleId:Ie(l,"handleId"),deviceFile:l.deviceFile===!0?!0:void 0}}function pt(t){if(!t)return[];return[{id:"mobile-editor",path:t.path,root:t.root,repo:t.repo,content:t.content,handleId:t.handleId,deviceFile:t.deviceFile}]}function ut(t,r,l){Za(l);let p=nr(r);return ln(p,Pg,{folderId:r,worktreePath:l}),t.setSearchParams((h)=>{let g=Rt(h);return g.set("sessionId",p),g.set("folderId",r.toString()),g},{replace:!0}),t.afterNavigate?.(),p}function cp({onDesktopToggle:t,appSettings:r={}}){let{folders:l,isMock:p}=Ve(),h=Dt(),{sessionId:g}=Oe(),[S,v]=le(),x=S.get("sessionId"),c=x?Number.isNaN(Number(x))?x:Number(x):null,w=S.get("folderId"),k=w?Number.isNaN(Number(w))?w:Number(w):null,[y,C]=n("main"),T=Qe({dock:h,sessionId:g,currentScreen:y,setCurrentScreen:C}),[I,N]=n(null),[M,A]=n(null),[E,O]=n(0),[R,L]=n(!1),[q,z]=n("appearance"),[F,te]=n(!1),H=a(()=>O((V)=>V+1),[]),X=ou(pt(I),E),{pushToast:ae}=He(),W=a((V)=>ae(V.message,V.ok?"success":"error"),[ae]),ne=X.size>0;Ze({editorOpen:I!==null,diffOpen:M!==null,settingsOpen:R,offMainScreen:y!=="main",onCloseEditor:()=>N(null),onCloseDiff:()=>A(null),onCloseSettings:()=>{L(!1),te(!1)},onReturnToMain:()=>C("main")});let{folder:ie}=no(l,c),ee=ie??(k?l.find((V)=>String(V.id)===String(k))??null:null),J=xf(l,c)??ee?.project_path??null,de=!!ee,Q=qc({enabled:de,onResult:W});ge("omp:open-file",(V)=>{let Y=Xe(V.detail,J);if(Y)N(Y)}),ge("omp:open-diff",(V)=>{let j=V.detail;if(!j?.file)return;A({path:j.file.replace(/^\/+/,""),status:j.status,staged:j.staged,repo:j.repo,root:j.root??J??void 0,...j.source==="journal"&&j.journal?{journal:j.journal}:{}})}),ge("omp:view-subagent",()=>C("main")),ge("omp:open-settings",(V)=>{let j=V.detail;z(j?.category??"appearance"),te(Boolean(j?.autoOpenAdd)),L(!0)});let oe=(V)=>{v((j)=>{let Y=Rt(j);if(Y.set("sessionId",V.toString()),Y.has("subagent"))Y.delete("subagent");return Y},{replace:!0}),C("main")},pe=()=>{v(new URLSearchParams,{replace:!0}),C("main")},we=(V)=>{let j=Al(l,x,V);if(j)Za(j);v((Y)=>hc(Y,nr(V),V),{replace:!0}),C("main")},be=(V,j)=>ut({setSearchParams:v,afterNavigate:()=>C("main")},V,j),he=a((V)=>{let j=Xe(V,J);if(j)N(j)},[J]);return e("div",{"data-testid":"app-root",className:"app-window flex flex-col h-dvh w-screen overflow-hidden bg-canvas text-ink font-sans selection:bg-ink selection:text-canvas relative",children:[e(Sf,{}),e(Tf,{isMock:p}),e(Df,{workspacePath:J}),e("div",{className:`flex-1 min-h-0 w-full relative ${y==="main"?"block":"hidden"}`,...Q.dropProps,...Q.captureDropProps,children:[e(_l,{visible:Q.isDragging}),e(io,{activeSessionId:c,onSelectSession:oe,onNewSession:pe,onOpenSessionSidebar:T.openSessionDrawer,onOpenRightSidebar:T.openRightDrawer,appSettings:r})]}),e("div",{className:`flex-1 min-h-0 w-full ${y==="session"?"block":"hidden"}`,children:e(Ko,{activeSessionId:c,onSelectSession:oe,onNewSession:pe,onNewSessionForFolder:we,onNewWorktreeSession:be,onClose:()=>C("main"),onDesktopToggle:t,appSettings:r,rootPath:J??void 0,refreshKey:E,onRefresh:H,onOpenFile:he,revealSignal:T.left})}),y==="right"&&e("div",{className:"flex-1 min-h-0 w-full",children:e(Uo,{enabled:de,rootPath:J??void 0,refreshKey:E,onRefresh:H,onOpenFile:he,onClose:()=>C("main"),revealSignal:T.right})}),I&&e(lt,{file:I,missing:ne,onClose:()=>N(null),onFileSaved:H}),M&&e(dt,{diff:M,onClose:()=>A(null),onFileSaved:H}),e(ml,{isOpen:R,onClose:()=>{L(!1),te(!1)},initialCategory:q,autoOpenAddProvider:F,appSettings:r})]})}export{cp as MobileLayoutWrapper};
@@ -1 +0,0 @@
1
- import{qf}from"./index-abs635a1.js";export{qf as createArchitectureServices};
@@ -1 +0,0 @@
1
- import{Up}from"./index-nw5mvcaj.js";export{Up as default};
@@ -1 +0,0 @@
1
- import{cc}from"./index-dxvtjn6a.js";import"./index-z4530r3c.js";export{cc as default};
@@ -1 +0,0 @@
1
- import{Nd,Bs,a0,o0,i0,s0}from"./index-19x11s5w.js";export{a0 as css,s0 as gss,Bs as keywords,i0 as less,Nd as mkCSS,o0 as sCSS};
@@ -1 +0,0 @@
1
- import{Of}from"./index-abs635a1.js";export{Of as createCynefinServices};
@@ -1 +0,0 @@
1
- import{Hf}from"./index-abs635a1.js";export{Hf as createEventModelingServices};
@@ -1 +0,0 @@
1
- import"./index-x1fqhhpp.js";import"./index-j718pxb3.js";import{r0}from"./index-29npynva.js";export{r0 as diagram};
@@ -1 +0,0 @@
1
- import{$f}from"./index-abs635a1.js";export{$f as createGitGraphServices};
@@ -1 +0,0 @@
1
- import{dg}from"./index-d23eacf2.js";import"./index-qf3y3ahx.js";import"./index-64sqfr4a.js";import"./index-1c2jvnyh.js";import"./index-5wz0y88c.js";export{dg as default};
@@ -1 +0,0 @@
1
- import{Hn,Uo,pf,xs,yi,wl,yd,Cl,Mg,vd,mf,ff,gf,Af,Yh,El,kd,Jh,xd,Qr,Zh}from"./index-amys498v.js";export{Cl as IndentContext,Zh as StreamLanguage,xd as bracketMatching,El as codeFolding,gf as foldAll,mf as foldCode,kd as foldGutter,Yh as foldKeymap,vd as foldService,yi as getIndentUnit,yd as getIndentation,Jh as highlightingFor,Mg as indentOnInput,pf as indentService,wl as indentString,xs as indentUnit,Uo as language,Qr as matchBrackets,Hn as syntaxTree,Af as unfoldAll,ff as unfoldCode};
@@ -1,2 +0,0 @@
1
- import{n,o,s,R,ea,kc,Ig,_g,bh,wm}from"./index-amys498v.js";var Rd="omp:editor-theme-changed";function a(){if(typeof window>"u")return kc;return R("editorTheme")??kc}var p={theme:null,vars:{},themes:_g(null)};function Ci(){let[e,t]=n(a);if(o(()=>{let i=(d)=>{let E=d.detail;t(E||a())};return window.addEventListener(Rd,i),()=>window.removeEventListener(Rd,i)},[]),o(()=>{wm(e)},[e]),e===ea)return p;let r=Ig(e);return{theme:r,vars:bh(r),themes:_g(e)}}var m={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]},mt=s(m);var Fd="omp:editor-indent-changed",Ld=[2,4,8],fu={width:2,insertSpaces:!0};function Md(){if(typeof window>"u")return fu;let e=R("editorIndentWidth"),t=R("editorInsertSpaces");return{width:typeof e==="number"&&Ld.includes(e)?e:fu.width,insertSpaces:typeof t==="boolean"?t:fu.insertSpaces}}function gu(e){return e.insertSpaces?" ".repeat(e.width):"\t"}function Au(){let[e,t]=n(Md);return o(()=>{let r=(i)=>{let d=i.detail;t(d??Md())};return window.addEventListener(Fd,r),()=>window.removeEventListener(Fd,r)},[]),e}var Pd="omp:editor-typing-changed",Dl={autoCloseBrackets:!0,autocomplete:!0};function hu(){if(typeof window>"u")return Dl;let e=R("editorAutoCloseBrackets"),t=R("editorAutocomplete");return{autoCloseBrackets:typeof e==="boolean"?e:Dl.autoCloseBrackets,autocomplete:typeof t==="boolean"?t:Dl.autocomplete}}function bu(){let[e,t]=n(hu);return o(()=>{let r=(i)=>{let d=i.detail;t(d??hu())};return window.addEventListener(Pd,r),()=>window.removeEventListener(Pd,r)},[]),e}var Is="omp:editor-blame-changed",Nl={enabled:!0,inline:!1};function Ei(){if(typeof window>"u")return Nl;let e=R("editorBlame"),t=R("editorBlameInline");return{enabled:typeof e==="boolean"?e:Nl.enabled,inline:typeof t==="boolean"?t:Nl.inline}}function Od(){let[e,t]=n(Ei);return o(()=>{let r=(i)=>{let d=i.detail;t(d??Ei())};return window.addEventListener(Is,r),()=>window.removeEventListener(Is,r)},[]),e}
2
- export{mt,Rd,Ci,Fd,Ld,fu,Md,gu,Au,Pd,Dl,hu,bu,Is,Nl,Ei,Od};