@kabmo-labs/kabmo 0.32.0 → 0.32.1
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.
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +308 -308
- package/dist/client/static/js/{CsvGrid-amafmq3z.js → CsvGrid-4gx0jevc.js} +2 -2
- package/dist/client/static/js/{DocxView-851ps9t0.js → DocxView-0667nr8h.js} +5 -5
- package/dist/client/static/js/{DrawioView-kw1vy3r2.js → DrawioView-522v0d0r.js} +2 -2
- package/dist/client/static/js/ImageView-t8xp60hm.js +1 -0
- package/dist/client/static/js/LayoutWrapper-xjnveecv.js +2 -0
- package/dist/client/static/js/{Modal-f8x3j3be.js → Modal-k2jr9hc4.js} +14 -14
- package/dist/client/static/js/{PdfView-f5jkm0rs.js → PdfView-3fx172xh.js} +1 -1
- package/dist/client/static/js/SessionsView-n3agmf5t.js +1 -0
- package/dist/client/static/js/{SheetView-23zxy30b.js → SheetView-nmrdb1b8.js} +23 -23
- package/dist/client/static/js/{SvgPreview-c341y50e.js → SvgPreview-0xsc6xam.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-2dc3mpk6.js → abnfDiagram-O67JEVCF-jj31rs62.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-1y9zvsyt.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-7jmrr5ja.js → architectureDiagram-NJMV4G6O-ay3yr7pf.js} +3 -3
- package/dist/client/static/js/{astro-sjtf954j.js → astro-qgx1r159.js} +1 -1
- package/dist/client/static/js/bash-m0qjsyy0.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-jrk2m0ea.js → blockDiagram-BEXU5L5S-4x33e16k.js} +3 -3
- package/dist/client/static/js/c-wkgxb1t1.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-48cyncjd.js → c4Diagram-YGBWAQC7-dtb81cgz.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-gm7jt1cd.js → classDiagram-v2-NBCMYWYE-vk5a2n9w.js} +3 -3
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-g0g3z0xp.js → cose-bilkent-JH36ORCC-6rbjbe19.js} +1 -1
- package/dist/client/static/js/cpp-y0t6mynx.js +1 -0
- package/dist/client/static/js/css-t4ngafan.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-k2188qcq.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-6vjde6am.js → cynefinDiagram-VND7K2PF-vyjksedr.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-q6k8bx1j.js → dagre-6A5THRUB-7hey38z5.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-87cmze2n.js → diagram-22UHCM2B-aes06jde.js} +11 -11
- package/dist/client/static/js/{diagram-3UASUU5V-1ejbr2p4.js → diagram-3UASUU5V-3cfkgm3x.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-vaw1r6k2.js → diagram-ATOU4E4O-z8mfhwpy.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-gxm9zv7d.js → diagram-CDSNMT55-t4821ctz.js} +2 -2
- package/dist/client/static/js/{diagram-MLGK6HIB-x010xswm.js → diagram-MLGK6HIB-23yxbfrx.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-qtcq7e6c.js → diagram-MPIPVDR6-chhtf7v0.js} +2 -2
- package/dist/client/static/js/{dockerfile-k5xbramm.js → dockerfile-5b87ghm7.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-nwwbasfh.js → ebnfDiagram-ZINNZB2B-9jejcvfr.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-xcp7thax.js → elk-276RUBZZ-xhhtkf58.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-xj1tp716.js → erDiagram-OPXOYQCR-mt2apjjb.js} +5 -5
- package/dist/client/static/js/{erlang-rz1g9mxy.js → erlang-6m6tpt72.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-pdr0qn0n.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-zvz0mxne.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-f7q96bea.js → ganttDiagram-FUAMR5RP-8cm7a29w.js} +3 -3
- package/dist/client/static/js/gitGraph-4MIJSDKK-wmqf046s.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-1rydkyq9.js → gitGraphDiagram-X574FWY7-5s0gbnx2.js} +2 -2
- package/dist/client/static/js/graphql-692h0n2x.js +1 -0
- package/dist/client/static/js/{index-52bgxh6f.js → index-2gfc25tq.js} +1 -1
- package/dist/client/static/js/{index-x64kqgen.js → index-2xj14800.js} +2 -2
- package/dist/client/static/js/{index-8m3q2zpb.js → index-360d7j0d.js} +1 -1
- package/dist/client/static/js/{index-123e8tqq.js → index-3vhznzgr.js} +1 -1
- package/dist/client/static/js/{index-y139vc12.js → index-4s8ttfxj.js} +175 -175
- package/dist/client/static/js/{index-9nbxb421.js → index-532btjmp.js} +2 -2
- package/dist/client/static/js/{index-c8jzx6b0.js → index-59jb53v3.js} +1 -1
- package/dist/client/static/js/{index-2t2tnc3x.js → index-5x95n3hx.js} +1 -1
- package/dist/client/static/js/{index-f63y3mjj.js → index-5y7c62sm.js} +4 -4
- package/dist/client/static/js/index-61tm0v57.js +1 -0
- package/dist/client/static/js/{index-fc2j6bq2.js → index-629kfbcb.js} +2 -2
- package/dist/client/static/js/{index-0n9c85ke.js → index-6q80csr0.js} +2 -2
- package/dist/client/static/js/{index-6sdctwv2.js → index-7fdp9c7m.js} +2 -2
- package/dist/client/static/js/index-7n68yx6m.js +2 -0
- package/dist/client/static/js/{index-pe9j88d4.js → index-9sd0vjmh.js} +2 -2
- package/dist/client/static/js/{index-m6wwc5h6.js → index-9t82sx0w.js} +2 -2
- package/dist/client/static/js/{index-xa7nrnda.js → index-a0bdavdr.js} +2 -2
- package/dist/client/static/js/{index-xpf2ra60.js → index-a6k2hqke.js} +1 -1
- package/dist/client/static/js/{index-e26rd868.js → index-a733k69t.js} +2 -2
- package/dist/client/static/js/{index-31jrebvn.js → index-ay34b398.js} +6 -6
- package/dist/client/static/js/{index-w4re5r8w.js → index-bbggh3f8.js} +2 -2
- package/dist/client/static/js/{index-73xfkyea.js → index-brj8qwa6.js} +2 -2
- package/dist/client/static/js/{index-fmxn1rzs.js → index-c0x6s6f7.js} +2 -2
- package/dist/client/static/js/{index-vmvcse63.js → index-c93sp4yh.js} +1 -1
- package/dist/client/static/js/{index-e7a3fkvv.js → index-dnp07j57.js} +1 -1
- package/dist/client/static/js/{index-pkyrkkbt.js → index-dq1kdt03.js} +2 -2
- package/dist/client/static/js/{index-ggaqh9rt.js → index-dt7e1328.js} +2 -2
- package/dist/client/static/js/{index-hkq0y3pn.js → index-ehcpzk5b.js} +2 -2
- package/dist/client/static/js/{index-tr8754r0.js → index-ejgd8w3s.js} +45 -45
- package/dist/client/static/js/{index-0a1ekhqf.js → index-fdbfzshx.js} +2 -2
- package/dist/client/static/js/{index-c20a46ww.js → index-g33knza2.js} +2 -2
- package/dist/client/static/js/{index-hhm62nfj.js → index-gbfg0anm.js} +2 -2
- package/dist/client/static/js/{index-2n5wy1sh.js → index-h06bcfds.js} +1 -1
- package/dist/client/static/js/{index-22jaxtz1.js → index-h7pn9qw6.js} +2 -2
- package/dist/client/static/js/{index-qmh0h87h.js → index-hc2jmzpx.js} +48 -48
- package/dist/client/static/js/{index-nsrnyqcm.js → index-jppt5mgc.js} +2 -2
- package/dist/client/static/js/{index-deex10rz.js → index-jz9fpznk.js} +5 -5
- package/dist/client/static/js/{index-r416e9dt.js → index-kg86e3sy.js} +11 -11
- package/dist/client/static/js/{index-e6rar25v.js → index-kpspnztv.js} +2 -2
- package/dist/client/static/js/index-nmmxb4va.js +2 -0
- package/dist/client/static/js/{index-zca66d5d.js → index-p7btwjvj.js} +3 -3
- package/dist/client/static/js/{index-gvwqjpcr.js → index-pf5sbesf.js} +2 -2
- package/dist/client/static/js/{index-ynqnbvn2.js → index-pf7syd7t.js} +3 -3
- package/dist/client/static/js/{index-3anc30zh.js → index-qkscve6n.js} +2 -2
- package/dist/client/static/js/index-qnwqaczk.js +4 -0
- package/dist/client/static/js/{index-5zd1jx9r.js → index-rg8jpbsw.js} +2 -2
- package/dist/client/static/js/{index-hyry1n8x.js → index-sa9cp6km.js} +2 -2
- package/dist/client/static/js/{index-f519m6s3.js → index-vd0e25p0.js} +1 -1
- package/dist/client/static/js/{index-cwaz6geq.js → index-vtbbfwx0.js} +2 -2
- package/dist/client/static/js/{index-14wppnkx.js → index-wzma5n54.js} +2 -2
- package/dist/client/static/js/{index-s9vp6p70.js → index-x07kp3jz.js} +2 -2
- package/dist/client/static/js/{index-8a3tmm1h.js → index-xj9649ac.js} +7 -7
- package/dist/client/static/js/{index-vrbcj11n.js → index-xya34x4v.js} +2 -2
- package/dist/client/static/js/{index-yvcpdk5f.js → index-ye3sr7db.js} +2 -2
- package/dist/client/static/js/{index-w5131mtt.js → index-z4v1xmh1.js} +2 -2
- package/dist/client/static/js/{index-0g25yrc0.js → index-z5s27s26.js} +1 -1
- package/dist/client/static/js/info-A6RAGUB7-zg3twte6.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-ptg07tp2.js → infoDiagram-VRGFBTTK-3w1yz32c.js} +1 -1
- package/dist/client/static/js/ini-cg0a5wm3.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-bdk2dkf5.js → ishikawaDiagram-OU5B5YK6-ckt471dy.js} +1 -1
- package/dist/client/static/js/java-vcck089n.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-kez0ha4c.js → journeyDiagram-ZHPQQLJL-kfvn4w7e.js} +2 -2
- package/dist/client/static/js/json-j5q8nt57.js +1 -0
- package/dist/client/static/js/jsx-ht9zyzwa.js +1 -0
- package/dist/client/static/js/{julia-nmr85k8z.js → julia-0j0gsjvc.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-dhzp3qg5.js → kanban-definition-PNTS6WVX-0q36cm83.js} +3 -3
- package/dist/client/static/js/lua-ke895s2q.js +1 -0
- package/dist/client/static/js/markdown-gwmsh53r.js +1 -0
- package/dist/client/static/js/{mermaid.core-h7wttbss.js → mermaid.core-b1ssa824.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-tq5dd1em.js → mindmap-definition-NLK3R4M7-e2ym5en8.js} +4 -4
- package/dist/client/static/js/one-dark-pro-4geyzhjj.js +1 -0
- package/dist/client/static/js/one-light-tqssjm9t.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-3pav51g0.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-e5hrdfzv.js → pegDiagram-GJSIUBJH-t8bbdyhe.js} +1 -1
- package/dist/client/static/js/{perl-prxcva8r.js → perl-7n7e9ncg.js} +1 -1
- package/dist/client/static/js/{php-m9kcctzs.js → php-32vy69vd.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-wqfh7zdk.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-axvbvnz8.js → pieDiagram-5QR66LMP-envv4brj.js} +2 -2
- package/dist/client/static/js/properties-mzvvbqg5.js +1 -0
- package/dist/client/static/js/python-3w64wsyd.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-wtn28cfm.js → quadrantDiagram-O4NWA36T-72rk137a.js} +3 -3
- package/dist/client/static/js/r-32re2zwb.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-w7qjdr2g.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-rhr99kkj.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-c4jeea3m.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-x2ee66ex.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-yw8wjfwg.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-avjkq945.js → railroadDiagram-XR7U4H2S-1ej0f5hr.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-bntx7r6q.js → requirementDiagram-PLB6GJNP-rvdaknpd.js} +3 -3
- package/dist/client/static/js/{ruby-t06c0e7g.js → ruby-5ty7fys7.js} +1 -1
- package/dist/client/static/js/{rust-6gqjxyf0.js → rust-2geezrcs.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-ps8nkdm2.js → sankeyDiagram-IPEJSGJF-nxvhtdaw.js} +3 -3
- package/dist/client/static/js/{sass-gsbyn3wh.js → sass-mey5150f.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-3ckf1q6z.js → sequenceDiagram-PO4LG4MO-n5cn5qrt.js} +6 -6
- package/dist/client/static/js/{sizeCapture-INFHLROL-akvcr1x7.js → sizeCapture-INFHLROL-r074kj7s.js} +1 -1
- package/dist/client/static/js/sql-g8wcshpc.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-c82914fz.js → stateDiagram-v2-GCMORJYK-vxghxdb0.js} +3 -3
- package/dist/client/static/js/{svelte-j54gfrvq.js → svelte-3ewx0hzx.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-scgdefh4.js → swimlanes-2SLR337P-qkkv894p.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-y81h9n27.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-z2ha1rhq.js → timeline-definition-EJHVYXUP-5tbq4ex2.js} +2 -2
- package/dist/client/static/js/treeView-Q6P3EWNA-ekz05ccs.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-aq6qymjr.js +1 -0
- package/dist/client/static/js/tsx-0p183w2f.js +1 -0
- package/dist/client/static/js/typescript-t9a5jyvv.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-3wdmrfmk.js → usecaseDiagram-POWQR4AR-6p8hf0b7.js} +15 -15
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-7m5tatzv.js → vennDiagram-UO4OBE2U-7k5jsxf9.js} +1 -1
- package/dist/client/static/js/{vue-y8bb5f3h.js → vue-06rdf4wh.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-z34tj4y3.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-55ps9s4z.js → wardleyDiagram-VNRHLVJA-km2x4er8.js} +3 -3
- package/dist/client/static/js/xml-81hxjjt4.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-8bsjtm4t.js → xychartDiagram-PMCCYNJV-kr3sgr4m.js} +2 -2
- package/dist/client/static/js/yaml-yssayv8a.js +1 -0
- package/package.json +1 -1
- package/src/client/components/common/session-actions-menu/index.tsx +6 -1
- package/src/client/components/layout/session-sidebar/SessionsView.tsx +20 -33
- package/src/client/components/mobile/LayoutWrapper.tsx +16 -26
- package/src/client/components/mobile/worktree-session.ts +4 -1
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +16 -15
- package/src/client/components/workspace/chat-timeline/fork-preview.test.tsx +11 -0
- package/src/client/hooks/chat/btw/mode.ts +5 -1
- package/src/client/hooks/chat/omp/session-sidebar-controller.ts +9 -3
- package/src/client/hooks/chat/timeline/new-chat.ts +4 -1
- package/src/client/hooks/chat/timeline/pending-dispatch.ts +6 -10
- package/src/client/hooks/chat/waiting/dispatch.ts +4 -1
- package/src/client/hooks/workspace/batch-delete-run.ts +5 -1
- package/src/client/hooks/workspace/session-delete.ts +5 -1
- package/src/client/lib/router/branch-params.test.ts +62 -0
- package/src/client/lib/router/branch-params.ts +48 -0
- package/src/server/lib/assets/shell-settings.server.test.ts +35 -0
- package/src/server/lib/assets/shell-settings.server.ts +33 -0
- package/src/server/lib/realtime/topics/peer-relay.server.test.ts +1 -11
- package/src/server/plugins/ssr.ts +20 -8
- package/src/test-support/peer-harness.ts +13 -5
- package/dist/client/static/js/ImageView-ksx9bbct.js +0 -1
- package/dist/client/static/js/LayoutWrapper-9ftz050x.js +0 -2
- package/dist/client/static/js/SessionsView-wzdf1cp6.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-4wsd6vk0.js +0 -1
- package/dist/client/static/js/bash-h6pkqvth.js +0 -1
- package/dist/client/static/js/c-thbdzmwv.js +0 -1
- package/dist/client/static/js/cpp-r1za1kke.js +0 -1
- package/dist/client/static/js/css-qsv4vvke.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-eycwde8c.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-srqbnmey.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-yj98317w.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-5jcrvn94.js +0 -1
- package/dist/client/static/js/graphql-275pg7ya.js +0 -1
- package/dist/client/static/js/index-b08zd4eq.js +0 -1
- package/dist/client/static/js/index-g0pkzanm.js +0 -2
- package/dist/client/static/js/index-ga2xdef3.js +0 -2
- package/dist/client/static/js/index-xzfsaqyz.js +0 -4
- package/dist/client/static/js/info-A6RAGUB7-mbt0ryx5.js +0 -1
- package/dist/client/static/js/ini-jqdrx98c.js +0 -1
- package/dist/client/static/js/java-70zqqrkr.js +0 -1
- package/dist/client/static/js/json-kxk8gfet.js +0 -1
- package/dist/client/static/js/jsx-h1035eqk.js +0 -1
- package/dist/client/static/js/lua-j2356waf.js +0 -1
- package/dist/client/static/js/markdown-ffw6rgk6.js +0 -1
- package/dist/client/static/js/one-dark-pro-8acf6cn2.js +0 -1
- package/dist/client/static/js/one-light-ysc1knem.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-a5yw789s.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-x0y4v4r2.js +0 -1
- package/dist/client/static/js/properties-55mrarxr.js +0 -1
- package/dist/client/static/js/python-dhypc3j4.js +0 -1
- package/dist/client/static/js/r-6b8dt1wp.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-trrc3ta1.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-dxgvx21w.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-rbgkd8sk.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-exgw7j47.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-28tpamzk.js +0 -1
- package/dist/client/static/js/sql-9dq913c8.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-0x2ashav.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-1a00b6kc.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-2q4f2f7m.js +0 -1
- package/dist/client/static/js/tsx-wh5xgm7f.js +0 -1
- package/dist/client/static/js/typescript-ge85req5.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-x9v91the.js +0 -1
- package/dist/client/static/js/xml-7bgz40qa.js +0 -1
- package/dist/client/static/js/yaml-4ht9416k.js +0 -1
- package/src/client/components/layout/session-sidebar/new-session-context.test.ts +0 -55
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
import { useCallback, useState } from 'preact/hooks';
|
|
24
24
|
import { useSearchParams } from '@/client/lib/router/search-params';
|
|
25
|
+
import { clearBranchParams } from '@/client/lib/router/branch-params';
|
|
25
26
|
import { forgetSession } from '@/shared/lib/workspace/session-state/store';
|
|
26
27
|
import {
|
|
27
28
|
deleteSessionsBatch,
|
|
@@ -74,7 +75,10 @@ export function useBatchDeleteRun(refresh: () => void): BatchDeleteRun {
|
|
|
74
75
|
const openSession = searchParams.get('sessionId');
|
|
75
76
|
if (openSession && result.removed.includes(openSession)) {
|
|
76
77
|
setSearchParams((prev) => {
|
|
77
|
-
|
|
78
|
+
// A pending draft's branch hints belong to a chat that no longer
|
|
79
|
+
// exists: the landing page would otherwise draw the forked source's
|
|
80
|
+
// transcript above an empty composer.
|
|
81
|
+
const next = clearBranchParams(prev);
|
|
78
82
|
next.delete('sessionId');
|
|
79
83
|
next.delete('subagent');
|
|
80
84
|
return next;
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
import { useCallback, useState } from 'preact/hooks';
|
|
25
25
|
import { useSearchParams } from '@/client/lib/router/search-params';
|
|
26
|
+
import { clearBranchParams } from '@/client/lib/router/branch-params';
|
|
26
27
|
import { forgetSession } from '@/shared/lib/workspace/session-state/store';
|
|
27
28
|
import type { SessionItemData } from '@/shared/types';
|
|
28
29
|
|
|
@@ -74,7 +75,10 @@ export function useSessionDelete(): SessionDeleteActions {
|
|
|
74
75
|
forgetSession(sessionId);
|
|
75
76
|
if (searchParams.get('sessionId') === sessionId) {
|
|
76
77
|
setSearchParams((prev) => {
|
|
77
|
-
|
|
78
|
+
// The deleted chat is gone, and with it any pending draft's branch
|
|
79
|
+
// hints the URL still carried: a bare landing page showing a forked
|
|
80
|
+
// source's transcript would be the next thing the user sees.
|
|
81
|
+
const next = clearBranchParams(prev);
|
|
78
82
|
next.delete('sessionId');
|
|
79
83
|
// A subagent transcript belongs to the session being removed.
|
|
80
84
|
next.delete('subagent');
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A cancelled fork must not leak into the next chat.
|
|
8
|
+
*
|
|
9
|
+
* Reported: fork a chat, back out of it, press New Session — the new chat's
|
|
10
|
+
* view still carried the source transcript above its composer. Cause: the URL
|
|
11
|
+
* kept `?forkFrom=`/`?forkAt=` and `usePendingBranch` reads them as the CURRENT
|
|
12
|
+
* pending chat's branch whenever the store entry lacks one, which a brand-new
|
|
13
|
+
* entry always does. These assert the navigation rule that prevents it.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { describe, expect, test } from 'bun:test';
|
|
17
|
+
import { clearBranchParams, newSessionParams } from '@/client/lib/router/branch-params';
|
|
18
|
+
|
|
19
|
+
function forkedUrl(): URLSearchParams {
|
|
20
|
+
return new URLSearchParams('sessionId=new-100&folderId=3&forkFrom=abc&forkAt=entry-9');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
describe('newSessionParams', () => {
|
|
24
|
+
test('a new chat after a cancelled fork carries no branch hints', () => {
|
|
25
|
+
const next = newSessionParams(forkedUrl(), 'new-200', 3);
|
|
26
|
+
expect(next.get('sessionId')).toBe('new-200');
|
|
27
|
+
expect(next.get('forkFrom')).toBeNull();
|
|
28
|
+
expect(next.get('forkAt')).toBeNull();
|
|
29
|
+
expect(next.get('parentSessionId')).toBeNull();
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
test('the folder the new chat runs in survives', () => {
|
|
33
|
+
expect(newSessionParams(forkedUrl(), 'new-200', 7).get('folderId')).toBe('7');
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
test('a chat with no folder drops the stale one instead of keeping it', () => {
|
|
37
|
+
expect(newSessionParams(forkedUrl(), 'new-200', null).get('folderId')).toBeNull();
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
test('a stale parent hint from a child session is cleared too', () => {
|
|
41
|
+
const next = newSessionParams(
|
|
42
|
+
new URLSearchParams('sessionId=new-1&parentSessionId=parent-1'),
|
|
43
|
+
'new-2',
|
|
44
|
+
1,
|
|
45
|
+
);
|
|
46
|
+
expect(next.get('parentSessionId')).toBeNull();
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
describe('clearBranchParams', () => {
|
|
51
|
+
test('keeps the chat the URL names and its unrelated params', () => {
|
|
52
|
+
const next = clearBranchParams(new URLSearchParams('sessionId=real-1&subagent=sub-2'));
|
|
53
|
+
expect(next.get('sessionId')).toBe('real-1');
|
|
54
|
+
expect(next.get('subagent')).toBe('sub-2');
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test('does not mutate the caller’s params', () => {
|
|
58
|
+
const prev = forkedUrl();
|
|
59
|
+
clearBranchParams(prev);
|
|
60
|
+
expect(prev.get('forkFrom')).toBe('abc');
|
|
61
|
+
});
|
|
62
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The BRANCH hints a pending chat carries in the URL, and the rule that they
|
|
8
|
+
* never outlive the chat they describe.
|
|
9
|
+
*
|
|
10
|
+
* `?forkFrom=` / `?forkAt=` / `?parentSessionId=` are a reload twin of the
|
|
11
|
+
* pending store entry, not chat-navigation state: they answer "what does THIS
|
|
12
|
+
* draft branch from". Left in the URL when the URL starts naming a different
|
|
13
|
+
* chat, they are read back as that chat's own branch — measured as: press Fork,
|
|
14
|
+
* leave it, press New Session, and the new chat opened with the source
|
|
15
|
+
* transcript still filled above its composer, because `usePendingBranch` fell
|
|
16
|
+
* back to the stale `forkFrom`. That is why every navigation that is not
|
|
17
|
+
* deliberately opening a branch clears all three in one place.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/** Drop every branch hint, keeping the rest of the query intact. */
|
|
21
|
+
export function clearBranchParams(params: URLSearchParams): URLSearchParams {
|
|
22
|
+
const next = new URLSearchParams(params);
|
|
23
|
+
next.delete('parentSessionId');
|
|
24
|
+
next.delete('forkFrom');
|
|
25
|
+
next.delete('forkAt');
|
|
26
|
+
return next;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The query a chat opened in a KNOWN context is started with: a workspace's own
|
|
31
|
+
* `+`, a worktree chat, a child, a fork — the id, the folder it will run in, and
|
|
32
|
+
* no branch hints. A new chat is top-level unless the call that opened it names
|
|
33
|
+
* a branch, and that call sets its hints itself.
|
|
34
|
+
*
|
|
35
|
+
* The sidebar's primary New Session does NOT use this: it opens the landing on
|
|
36
|
+
* a clean URL, because nothing has been chosen there yet.
|
|
37
|
+
*/
|
|
38
|
+
export function newSessionParams(
|
|
39
|
+
prev: URLSearchParams,
|
|
40
|
+
pendingId: string,
|
|
41
|
+
folderId: number | string | null,
|
|
42
|
+
): URLSearchParams {
|
|
43
|
+
const next = clearBranchParams(prev);
|
|
44
|
+
next.set('sessionId', pendingId);
|
|
45
|
+
if (folderId != null) next.set('folderId', String(folderId));
|
|
46
|
+
else next.delete('folderId');
|
|
47
|
+
return next;
|
|
48
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The regression this pins: a password-protected install drew its login screen
|
|
8
|
+
* in the shipped default palette because the shell gated the STORED settings on
|
|
9
|
+
* `authenticated` — while the workspace behind the password used the chosen
|
|
10
|
+
* one. Presentation is not a secret; only the published map is.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { describe, expect, test } from 'bun:test';
|
|
14
|
+
import { splitShellSettings } from '@/server/lib/assets/shell-settings.server';
|
|
15
|
+
import { readSettingsBlob } from '@/shared/lib/settings/keys';
|
|
16
|
+
|
|
17
|
+
const STORED = {
|
|
18
|
+
kabmo_settings: { theme: 'one-dark-pro-soft', surfaceStyle: 'glass' },
|
|
19
|
+
omp_provider_registry: { secret: 'must-not-leak' },
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
describe('splitShellSettings', () => {
|
|
23
|
+
test('an unauthenticated visitor still paints the stored theme', () => {
|
|
24
|
+
const split = splitShellSettings(STORED, false);
|
|
25
|
+
expect(readSettingsBlob(split.presentation).theme).toBe('one-dark-pro-soft');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
test('an unauthenticated visitor is published no settings at all', () => {
|
|
29
|
+
expect(splitShellSettings(STORED, false).published).toEqual({});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
test('an authenticated request publishes the whole map', () => {
|
|
33
|
+
expect(splitShellSettings(STORED, true).published).toBe(STORED);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Which stored settings the shell may PAINT, and which it may PUBLISH.
|
|
8
|
+
*
|
|
9
|
+
* The two are not the same audience. The palette, the surface material and the
|
|
10
|
+
* icon tone are presentation: the login screen is the shell too, and it has to
|
|
11
|
+
* paint the theme the install chose rather than the shipped default. The
|
|
12
|
+
* published `appSettings` map is different — it carries the provider registry
|
|
13
|
+
* and every other stored preference, which is exactly what the password
|
|
14
|
+
* protects.
|
|
15
|
+
*
|
|
16
|
+
* Gating both on `authenticated` is what shipped, and it made a password-
|
|
17
|
+
* protected install draw its login screen in the default palette while the
|
|
18
|
+
* workspace behind it used the chosen one.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
export interface ShellSettings {
|
|
22
|
+
/** Presentation facts the first frame paints, for every visitor. */
|
|
23
|
+
presentation: Record<string, unknown>;
|
|
24
|
+
/** The map handed to the client; empty until the request is authenticated. */
|
|
25
|
+
published: Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function splitShellSettings(
|
|
29
|
+
settings: Record<string, unknown>,
|
|
30
|
+
authenticated: boolean,
|
|
31
|
+
): ShellSettings {
|
|
32
|
+
return { presentation: settings, published: authenticated ? settings : {} };
|
|
33
|
+
}
|
|
@@ -206,17 +206,7 @@ describe('peer session relay', () => {
|
|
|
206
206
|
|
|
207
207
|
try {
|
|
208
208
|
const value = (await sessionDescriptor(sessionId).resolve(topic)) as { running?: boolean };
|
|
209
|
-
|
|
210
|
-
const { listInstanceRecords } = await import('@/server/lib/lifecycle/instance');
|
|
211
|
-
const { processParentPid } = await import('@/server/lib/lifecycle/identity');
|
|
212
|
-
const diag = JSON.stringify({
|
|
213
|
-
holder,
|
|
214
|
-
parentNow: processParentPid(holder.pid),
|
|
215
|
-
records: listInstanceRecords(),
|
|
216
|
-
ownership: await resolveSessionOwnership(sessionId),
|
|
217
|
-
calls: ownerCalls,
|
|
218
|
-
});
|
|
219
|
-
expect(ownerCalls, diag).toEqual([`/api/agent/${sessionId}`]);
|
|
209
|
+
expect(ownerCalls, JSON.stringify({ holder })).toEqual([`/api/agent/${sessionId}`]);
|
|
220
210
|
expect(value.running).toBe(true);
|
|
221
211
|
} finally {
|
|
222
212
|
ownerServer.stop(true);
|
|
@@ -23,6 +23,7 @@ import { readSettingsBlob } from '@/shared/lib/settings/keys';
|
|
|
23
23
|
import { resolveTheme } from '@/shared/lib/theme/catalog';
|
|
24
24
|
import { FIRST_FRAME_STYLE_ELEMENT_ID } from '@/shared/lib/theme/first-frame';
|
|
25
25
|
import { applyShellDocumentFacts } from '@/server/lib/assets/shell-attributes.server';
|
|
26
|
+
import { splitShellSettings } from '@/server/lib/assets/shell-settings.server';
|
|
26
27
|
import { SURFACE_STYLE_SETTING_KEY } from '@/shared/lib/theme/surface-style';
|
|
27
28
|
import { ICON_STYLE_SETTING_KEY } from '@/shared/lib/theme/icon-style';
|
|
28
29
|
import { windowChromeColor } from '@/shared/lib/theme/chrome';
|
|
@@ -169,7 +170,10 @@ export const ssrRoutes = new Elysia({ name: 'ssr' }).get('*', async ({ request }
|
|
|
169
170
|
if (pathname === THEMED_MANIFEST_ROUTE) {
|
|
170
171
|
const source = await manifestSource();
|
|
171
172
|
if (!source) return new Response('Not found', { status: 404 });
|
|
172
|
-
|
|
173
|
+
// The manifest's colours are presentation, so they follow the stored theme
|
|
174
|
+
// for an unauthenticated visitor too — the login screen is what that
|
|
175
|
+
// visitor sees, and the install's splash must not disagree with it.
|
|
176
|
+
const manifestSettings = await readSettings();
|
|
173
177
|
return new Response(themedManifest(source, resolveTheme(storedThemeId(manifestSettings))), {
|
|
174
178
|
headers: { 'content-type': 'application/manifest+json; charset=utf-8', 'cache-control': 'no-store' },
|
|
175
179
|
});
|
|
@@ -182,13 +186,21 @@ export const ssrRoutes = new Elysia({ name: 'ssr' }).get('*', async ({ request }
|
|
|
182
186
|
const asset = await tryServeStatic(pathname, request);
|
|
183
187
|
if (asset) return asset;
|
|
184
188
|
// An unauthenticated visitor still gets the shell — it IS the login screen —
|
|
185
|
-
// but not the settings map. `appSettings` carries the provider registry
|
|
186
|
-
//
|
|
187
|
-
//
|
|
188
|
-
//
|
|
189
|
-
//
|
|
189
|
+
// but not the settings map. `appSettings` carries the provider registry and
|
|
190
|
+
// every stored preference, and publishing it to whoever can reach the port
|
|
191
|
+
// would hand out exactly what the password protects. The client answers "is
|
|
192
|
+
// auth required" from `/api/auth/state` and renders the login screen without
|
|
193
|
+
// it.
|
|
194
|
+
//
|
|
195
|
+
// The stored settings are still READ for both audiences: the palette, the
|
|
196
|
+
// surface material and the icon tone are presentation, and the login screen
|
|
197
|
+
// has to paint the theme the install chose. Only the published map is gated
|
|
198
|
+
// (`splitShellSettings`).
|
|
190
199
|
const authenticated = isAuthenticatedRequest(request);
|
|
191
|
-
const settings
|
|
200
|
+
const { presentation: settings, published: publishedSettings } = splitShellSettings(
|
|
201
|
+
await readSettings(),
|
|
202
|
+
authenticated,
|
|
203
|
+
);
|
|
192
204
|
// Both blobs, legacy beneath: an install that predates the rename still has
|
|
193
205
|
// its theme in the old row, and the SSR shell is what paints the first frame.
|
|
194
206
|
// Resolved through the catalog: an id this build no longer ships (a
|
|
@@ -221,7 +233,7 @@ export const ssrRoutes = new Elysia({ name: 'ssr' }).get('*', async ({ request }
|
|
|
221
233
|
// questions: "this browser has a session" versus "there is a session to have".
|
|
222
234
|
// A Kabmo running open answers `authenticated: true` for every visitor, so
|
|
223
235
|
// the navbar cannot use it to decide whether a sign-out control applies.
|
|
224
|
-
const bootstrap = JSON.stringify({ initialIsMobile, shellVersion: androidVersion, iosShellVersion: iosVersion, isAndroid, authenticated, authEnabled: isAuthEnabled(), production: !DEV_ASSETS_ENABLED, appSettings:
|
|
236
|
+
const bootstrap = JSON.stringify({ initialIsMobile, shellVersion: androidVersion, iosShellVersion: iosVersion, isAndroid, authenticated, authEnabled: isAuthEnabled(), production: !DEV_ASSETS_ENABLED, appSettings: publishedSettings }).replace(/</g, '\\u003c');
|
|
225
237
|
// The template's own `<meta name="theme-color">` is REWRITTEN, not joined by
|
|
226
238
|
// a second tag: with both present Chrome reads the first one, so an appended
|
|
227
239
|
// tag would leave a dark theme painting light browser chrome.
|
|
@@ -24,7 +24,7 @@ import { join } from 'node:path';
|
|
|
24
24
|
import type { RealtimeConnection } from '@/server/lib/realtime/hub.server';
|
|
25
25
|
import { sessionLeasePath } from '@/server/lib/omp/session/ownership.server';
|
|
26
26
|
import { leaseHeldByAnother } from '@/server/lib/omp/session/lease-flock.server';
|
|
27
|
-
import { processParentPid } from '@/server/lib/lifecycle/identity';
|
|
27
|
+
import { isProcessAlive, processParentPid } from '@/server/lib/lifecycle/identity';
|
|
28
28
|
import type { RealtimeServerFrame } from '@/shared/lib/realtime/protocol';
|
|
29
29
|
|
|
30
30
|
/** Spin the event loop until `condition` holds, up to `timeoutMs`. */
|
|
@@ -221,11 +221,19 @@ export async function holdLeaseInForeignProcess(sessionId: string): Promise<Fore
|
|
|
221
221
|
await waitUntil(() => leaseHeldByAnother(lease) === true);
|
|
222
222
|
// Held AND reparented: until the wrapper exits, the holder's parent is the
|
|
223
223
|
// wrapper itself, which no instance record can name.
|
|
224
|
+
//
|
|
225
|
+
// "Reparented" means the parent ALIVE and UNCHANGED across two polls, not
|
|
226
|
+
// merely different from the wrapper: a caller writes an instance record naming
|
|
227
|
+
// this pid, and the guard drops a record whose pid is dead — so reading a
|
|
228
|
+
// parent that is about to be replaced is the difference between a forwarded
|
|
229
|
+
// resolve and a local answer.
|
|
230
|
+
let settled: number | null = null;
|
|
224
231
|
await waitUntil(() => {
|
|
225
232
|
const parent = processParentPid(pid);
|
|
226
|
-
|
|
233
|
+
const stable = parent !== null && parent !== child.pid && isProcessAlive(parent) && parent === settled;
|
|
234
|
+
settled = parent;
|
|
235
|
+
return stable;
|
|
227
236
|
});
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
return { pid, parentPid };
|
|
237
|
+
if (settled === null) throw new Error('the foreign holder vanished before it was reparented');
|
|
238
|
+
return { pid, parentPid: settled };
|
|
231
239
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e,m,Ni,Er}from"./index-y139vc12.js";import{_c}from"./index-r416e9dt.js";function g({source:t,name:r,revision:s=0}){let{url:i,loading:n,error:o}=_c(t,s);if(o)return e(Er,{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(Ni,{src:i,name:r,className:"flex-1 min-h-0"})}export{g as ImageView};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d,n,i,V,o,u,a,We,oe,an,dp,e,Gn,Ds,Ze,Ht,TA,Ma,gp,s,ze,Ee,m,Wt,D,Xe,Kt,f,I,se,et,ie,he,wt,Ge,Zt,fe,Ue,pe,fa,zr,Xt,Aa,Y,C,F,Ns,y,ut,Kn,Ai,le,J,rt,Go,jo,Su,Gl,_e,Ve,$t,zt,Os,bi,$s,zs,xi,gt,Et,Kr,je,js,ic,tm,xa,oc,nm,wa,Ci,Ei,Bi,bt,hn,Zo,Ii,_i,Si,Hs,Ca,Xo,Ws,Vr,Am,pc,gm,hm,bm,mc,Vn,kr,Ti,Di,ym,fc,Ga,vm,km,Rg,Ou,Fg,xm,wm,Ks,Ni,qf,Pm,gc,tl,jm,qm,Vu,Hm,Zg}from"./index-y139vc12.js";import{kc,xc,wc,Cc,Ec,Bc,Ic,Xu,ns,Ri,rs,Sc,nl,Tc,Dc,Qc,Nc,Rc,Fc,Mc,Lc,Pc}from"./index-r416e9dt.js";import{xu,Gi,wu,Cu}from"./index-zca66d5d.js";import{yt,co,$c,zc,Gc}from"./index-g0pkzanm.js";import{os,Ba,Br,ol,jc,qc,Fi,Hc,ss,ld,nA,ls,cs,Ir,us,ds,Mi,ps,ms,fs,po,As,gs,hs,Wc,cd,Kc,Vc,Yc,Jc,Zc,Xc,eu,tu}from"./index-xzfsaqyz.js";import{nu}from"./index-w4re5r8w.js";import{_a,Sa}from"./index-pkyrkkbt.js";function He(t){let{editorOpen:r,diffOpen:c,settingsOpen:p,offMainScreen:h,onCloseEditor:b,onCloseDiff:v,onCloseSettings:S,onReturnToMain:x}=t;i(()=>Zg(()=>{if(r)return b(),!0;if(c)return v(),!0;if(p)return S(),!0;if(h)return x(),!0;return!1}),[r,c,p,h,b,v,S,x])}var Yt={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]},$e=s(Yt);var Qt=10,Ke=600000;function qe({activeSessionTitle:t,activeSessionId:r,onOpenSessionSidebar:c,onOpenRightSidebar:p,onNewSession:h,onSelectSession:b}){let{folders:v}=je(),S=Vu(),x=wa(r),[l,g]=n(null),w=u(()=>{let k=Date.now(),E=[];for(let T of v)for(let N of T.sessions??[]){if(N.is_archived===1)continue;let P=TA(String(N.id)),H=N.updated_at?Date.parse(N.updated_at):0,A=P!==void 0&&k-P<=Ke?P:H;if(P!==void 0&&k-P>Ke)continue;E.push({id:N.id,title:N.title,folderName:T.name,modified:A})}return E.sort((T,N)=>N.modified-T.modified).slice(0,Qt)},[v]),M=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 ${Hs} px-3 z-20 titlebar-drag-region select-none`,...Ti(),style:{height:"calc(3.5rem + env(safe-area-inset-top, 0px))",paddingLeft:Di(Vn("0.75rem",!0)),paddingRight:kr("0.75rem",!0),paddingTop:"env(safe-area-inset-top, 0px)"},children:[e("div",{className:"flex items-center space-x-2 flex-1 min-w-0 titlebar-no-drag",children:[e("button",{type:"button",onClick:c,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($e,{size:20,strokeWidth:2})}),e("span",{className:"relative font-bold text-sm tracking-tight flex items-center flex-shrink-0",children:[e(xa,{glow:!0}),e("span",{className:"absolute -top-0.5 -right-1.5 flex",children:e(mc,{status:S})})]}),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:(k)=>{g((E)=>E?null:$t(k.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:M,"aria-haspopup":"menu","aria-expanded":l!==null,children:[e("span",{className:"truncate",children:M}),x&&e(m,{size:12,className:"animate-spin text-ink/50 flex-shrink-0",role:"status","aria-label":"Generating a session name…"}),e(I,{size:13,className:"text-ink/50 flex-shrink-0"})]}),l&&e(zt,{anchor:l,align:"start",className:"w-72 bg-paper border border-ink/15 rounded-xl shadow-lg p-2 text-xs",onClose:()=>g(null),children:[e("button",{type:"button",onClick:()=>{g(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 active:scale-98",children:[e(Y,{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:w.length===0?e("div",{className:"px-2.5 py-2 text-ink/40 italic",children:"No sessions yet"}):w.map((k)=>e("button",{type:"button",onClick:()=>{g(null),b(k.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(k.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:k.title?k.title.charAt(0).toUpperCase()+k.title.slice(1):"Untitled"}),e("span",{className:"truncate text-[10px] text-ink/40 font-mono",children:k.folderName})]}),String(r)===String(k.id)&&e(f,{size:12,className:"flex-shrink-0"})]},k.id))})]})]})]}),e(xm,{layout:"mobile",sessionId:r==null?null:String(r),showRightPanel:!1,onToggleRightPanel:p})]})}function Ye({activeSessionId:t,onSelectSession:r,onNewSession:c,onOpenSessionSidebar:p,onOpenRightSidebar:h,appSettings:b={}}){let{folders:v}=je(),[S,x]=n(null),l=u(()=>{if(!t)return"New session";for(let w of v){let M=w.sessions?.find((k)=>String(k.id)===String(t));if(M)return M.title}return null},[t,v]);return e("div",{className:"flex flex-col h-full w-full bg-canvas text-ink relative",children:[e(qe,{activeSessionTitle:S||l||"New session",activeSessionId:t,onOpenSessionSidebar:p,onOpenRightSidebar:h,onNewSession:c,onSelectSession:r}),e("main",{className:"flex-1 min-h-0",children:e(Pm,{appSettings:b,onSessionTitle:x,variant:"mobile"})})]})}function Qe({onClose:t,viewLabel:r="Sessions"}){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",...Ti(),style:{height:"calc(3.5rem + env(safe-area-inset-top, 0px))",paddingLeft:Di(Vn("0.75rem",!0)),paddingRight:kr("0.75rem",!0),paddingTop:"env(safe-area-inset-top, 0px)"},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(xa,{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(wm,{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(y,{size:19,strokeWidth:2})})]})]})}var Me="w-9.5 h-9.5 rounded-xl border active:scale-95 flex items-center justify-center transition-all flex-shrink-0 cursor-pointer shadow-xs",Pe="border-ink/15 bg-paper hover:bg-ink/5 text-ink/80 hover:text-ink",Je="bg-ink/10 text-ink border-ink/30";function tt({searchQuery:t,sortOption:r,optionsOpen:c,showArchived:p,optionsRef:h,onNewSession:b,onNewWorkspace:v,onScheduler:S,scheduledCount:x,onRefresh:l,refreshing:g,onToggleOptions:w,onSortChange:M,onResetSort:k,onToggleArchived:E,onHideArchived:T,onSearchChange:N,onClearSearch:P,onSelectWorkspaces:H,selecting:A}){let{ref:z,width:W}=ss(0),Z=nA(W),U={};for(let X of ld.slice(0,Z))U[X]=!0;let _=ld.slice(Z),R=p?"Hide archived sessions":"Show archived sessions",ee=x>0?`Scheduled tasks (${x} armed)`:"Scheduled tasks",q=[];if(_.includes("new-workspace"))q.push({id:"new-workspace",label:"New Workspace",icon:Zt,onSelect:v});if(_.includes("refresh"))q.push({id:"refresh",label:"Refresh sessions",icon:C,onSelect:l});if(_.includes("scheduler"))q.push({id:"scheduler",label:ee,icon:Ba,onSelect:S});if(_.includes("archive"))q.push({id:"archive",label:R,icon:Xe,onSelect:E,active:p});if(_.includes("select"))q.push({id:"select",label:A?"Cancel selection":"Select workspaces",icon:Br,onSelect:H,active:A});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:z,className:"flex items-center space-x-2",children:[e("button",{type:"button",onClick:b,"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 active:scale-[0.98] text-xs font-semibold transition-all shadow-xs",children:[e(Y,{size:15,strokeWidth:2.4,className:"shrink-0"}),e("span",{className:"min-w-0 truncate",children:"New Session"})]}),U["new-workspace"]&&e("button",{type:"button",onClick:v,className:`${Me} ${Pe}`,title:"New Workspace","aria-label":"New Workspace",children:e(Zt,{size:16,strokeWidth:1.8})}),U.scheduler&&e("button",{type:"button",onClick:S,className:`relative ${Me} ${Pe}`,title:ee,"aria-label":x>0?`Scheduled tasks, ${x} armed`:"Scheduled tasks",children:[e(Ba,{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})]}),U.archive&&e("button",{type:"button",onClick:E,"aria-pressed":p,className:`${Me} ${p?"bg-warning/15 border-warning/40 text-warning":Pe}`,title:R,"aria-label":R,children:e(Xe,{size:16,strokeWidth:1.8})}),U.select&&e("button",{type:"button",onClick:H,"aria-pressed":A,className:`${Me} ${A?Je:Pe}`,title:A?"Cancel selection":"Select workspaces","aria-label":A?"Cancel selection":"Select workspaces",children:e(Br,{size:16,strokeWidth:1.8})}),U.refresh&&e("button",{type:"button",onClick:l,className:`${Me} ${Pe}`,title:"Refresh sessions","aria-label":"Refresh sessions","aria-busy":g,children:e(C,{size:15,strokeWidth:1.8,className:g?"animate-spin":void 0})}),U.sort&&e("div",{className:"relative flex-shrink-0",ref:h,children:[e("button",{type:"button",onClick:w,className:`${Me} ${c||r!=="A-Z"?Je:Pe}`,title:"Sort workspaces","aria-label":"Sort workspaces",children:e(os,{size:15,strokeWidth:1.8})}),c&&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(Fi,{variant:"mobile",sortOption:r,onSortChange:M})})]}),_.length>0&&e(Hc,{actions:q,sortHidden:_.includes("sort"),sortOption:r,onSortChange:M,layout:"mobile"})]}),e("div",{className:"relative flex items-center",children:[e(F,{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:P,className:"absolute right-2.5 text-ink/40 hover:text-ink p-1","aria-label":"Clear search",children:e(y,{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:k,className:"hover:text-ink ml-0.5",title:"Reset sort",children:e(y,{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(Xe,{size:10}),e("span",{children:"Archived"}),e("button",{type:"button",onClick:T,className:"hover:text-warning-hover ml-0.5",title:"Hide archived",children:e(y,{size:10})})]})]})]})}var Jt="p-1.5 rounded-lg hover:bg-ink/10 active:bg-ink/15 text-ink/60 hover:text-ink";function ot({folder:t,canWorktree:r,onOpenFolder:c,onNewWorktree:p,onSelectSessions:h,confirmDelete:b,onPin:v,onDelete:S,onRequestDelete:x,onCancelDelete:l}){let[g,w]=n(!1),M=o(null),[k,E]=n(null),T=(N)=>()=>{w(!1),N()};return e("div",{className:"relative flex items-center",onClick:(N)=>N.stopPropagation(),children:[e("button",{ref:M,type:"button",onClick:(N)=>{if(N.stopPropagation(),M.current)E($t(M.current));w((P)=>!P)},className:Jt,title:"Workspace options","aria-label":`Options for ${t.name}`,"aria-haspopup":"menu","aria-expanded":g,children:e(Ee,{size:15})}),e(zt,{anchor:g?k: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:()=>{w(!1),l()},children:e(ms,{variant:"mobile",isPinned:t.isPinned,onOpenFolder:c?T(c):void 0,onNewWorktree:r&&p?T(p):void 0,onSelectSessions:h?T(h):void 0,confirmDelete:b,onPin:T(v),onDelete:T(S),onRequestDelete:x,onCancelDelete:l})})]})}var nt={inset:"",insetPx:0,slotWidth:16,markGap:8,padding:"py-2",glyph:Et.touch};function it({session:t,harness:r,isActive:c,status:p,awaitingInput:h=!1,timeAgo:b,timeTitle:v,runStartedAt:S,expandable:x=!1,isExpanded:l=!1,onToggleExpand:g,isChild:w=!1,folderId:M,onSelect:k,onArchive:E,onDelete:T,onRename:N,onRenameWithAi:P,waitingFor:H,onCancelWait:A,selectable:z=!1,selected:W=!1,onToggleSelect:Z}){let{isEditing:U,draft:_,setDraft:R,inputRef:ee,startRename:q,handleKeyDown:X,handleBlur:be}=Bi(t.title,N),me=wa(t.id),te=Ii(),ne=Boolean(N||E||T||A),G=Boolean(H),K=x&&Boolean(g),ue=t.title.charAt(0).toUpperCase()+t.title.slice(1);if(U)return e("div",{className:"w-full rounded-lg flex items-center bg-ink/10",children:e("input",{ref:ee,autoFocus:!0,value:_,onChange:(re)=>R(re.currentTarget.value),onKeyDown:X,onBlur:be,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),onContextMenu:ne&&!z?te.openAtCursor:void 0,className:`w-full rounded-lg flex items-center transition-colors ${z&&W?"bg-ink/10 ring-1 ring-inset ring-ink/20 text-ink":c?"bg-ink/10 font-medium text-ink":"hover:bg-ink/5 text-ink/85"}`,children:[e("button",{type:"button",onClick:z?Z:k,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:[z?e(Ir,{checked:W,label:`Select ${t.title}`,onChange:()=>Z?.()}):e("span",{className:"w-4 flex-shrink-0 flex items-center justify-center",children:me?e("span",{role:"status","aria-label":"Generating a name…",children:e(m,{size:13,className:"text-ink/50 animate-spin"})}):h?e(ze,{size:13,className:"text-ink/70 animate-pulse"}):G?e("span",{role:"status","aria-label":`Waiting for ${H?.title??"another session"}`,children:e(Ue,{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"}):w?e("span",{"data-testid":"child-indicator",className:"text-ink/35","aria-hidden":"true",children:e(fe,{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(gt,{harness:r,size:Et.touch})}),e("span",{className:"min-w-0 truncate text-xs",children:ue})]}),G&&e("span",{className:"text-[10px] text-ink/40 truncate",children:["waiting for ",H?.title??"another session"]}),t.worktree?e(us,{worktree:t.worktree}):null]})]}),e(ps,{timeAgo:b,timeTitle:v,runStartedAt:S,className:"text-[11px] text-ink/45 font-mono flex-shrink-0 ml-2"})]}),ne&&!z&&e("button",{type:"button",onClick:te.openBelow,title:"Session actions","aria-label":"Session actions","aria-haspopup":"menu","aria-expanded":te.anchor!==null,className:"flex-shrink-0 py-1.5 pl-1.5 pr-1 text-ink/35 hover:text-ink rounded-lg cursor-pointer",children:e(Ee,{size:16})}),K&&!z&&e("button",{type:"button",onClick:g,title:l?"Collapse sessions and subagents":"Expand sessions and subagents","aria-expanded":l,"aria-label":l?"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:l?e(I,{size:14}):e(se,{size:14})})]}),te.anchor&&e(_i,{anchor:te.anchor,sessionId:t.id,...r?{harness:r}:{},...M!==void 0?{folderId:M}:{},isArchived:t.is_archived===1,onRename:N?q:void 0,onRenameWithAi:P,onArchive:E,onDelete:T,onCancelWait:A,onClose:te.close})]})}function st(t,r){let[c,p]=n(!1);return{open:()=>p(!0),dialog:c?e(Si,{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 at({hiddenCount:t,canShowLess:r,onShowMore:c,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:c,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(I,{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(et,{size:12}),e("span",{className:"truncate",children:"Show less"})]})]})}function lt(t){return t?"mb-4":"mb-1"}function dt({folder:t,activeSessionId:r,onSelectSession:c,onNewSessionForFolder:p,onNewWorktreeSession:h,isExpanded:b,onToggleExpand:v,showArchived:S=!1,sessionStatus:x={},onToast:l,batch:g,onStartSessionSelection:w,onCancelWait:M}){let{visibleCount:k,showMore:E,showLess:T,canShowLess:N}=ls(),P=st(t,(B)=>h?.(t.id,B)),{refresh:H,runStartedAtMap:A}=je(),{expandedSessionIds:z,toggleSession:W}=Zo(),[Z]=oe(),U=Z.get("subagent"),_=Z.get("sessionId"),{confirmDelete:R,requestDelete:ee,cancelDelete:q,handlePin:X,handleDelete:be,handleArchive:me,handleRename:te,handleRenameWithAi:ne,handleOpenFolder:G}=cs(t,H,l),K=Ci(),ue=X,re=be,ge=G??void 0,xe=(t.sessions||[]).filter((B)=>S?B.is_archived===1:B.is_archived!==1),Se=Kr(t.icon),{folderCheckbox:ve,sessionCheckboxes:L,folderSummary:O,toggleFolderSelection:Q,rendered:j,hiddenCount:ke}=gs({batch:g,folder:t,sessions:xe,showArchived:S,visibleCount:k,activeSessionId:r,sessionStatus:x}),we=As(j),Ne=b||L,ye=(B,de)=>{let ce=String(B.id),Te=String(r)===ce,Ae=Te&&_===ce&&Boolean(U),Re=bt(ce);return e(it,{session:B,harness:B.harness,folderId:B.folder_id,isActive:Te&&!Ae,status:x[ce],awaitingInput:Boolean(B.awaitingInput),timeAgo:ds(B.updated_at??B.created_at),timeTitle:Mi(B.updated_at??B.created_at),runStartedAt:x[ce]==="stream"?A[ce]:void 0,expandable:de.expandable,isChild:de.isChild,isExpanded:de.isExpanded,onToggleExpand:de.onToggleExpand,onSelect:()=>c(B.id),onArchive:()=>me(B),onDelete:Re?void 0:()=>K.requestDelete(B),onRename:Re?void 0:(Fe)=>void te(B,Fe),onRenameWithAi:Re?void 0:()=>void ne(B),waitingFor:B.waitingFor?{title:B.waitingFor.title}:void 0,onCancelWait:B.waitingFor?()=>M?.(B.waitingFor.waitId):void 0,selectable:L,selected:Boolean(g?.selected.includes(ce)),onToggleSelect:g?()=>g.toggle(ce):void 0})},Ce=(B)=>fs(B,we.childrenOf,z,W);return e("div",{className:lt(Ne),"data-testid":"session-folder",children:[e("div",{onClick:g?void 0:v,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:[ve&&O?e(Ir,{size:"md",checked:O.all,indeterminate:O.some,label:`Select ${t.name}`,onChange:Q}):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(Xt,{size:15,className:"text-ink/80"}):e(Se,{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:xe.length}),t.project_path&&e(fe,{size:13,className:"text-ink/50 ml-1"}),!g&&e(d,{children:[e("button",{type:"button",onClick:(B)=>{B.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(Y,{size:15})}),e(ot,{folder:t,canWorktree:Boolean(h&&t.project_path),onOpenFolder:ge,onNewWorktree:h?()=>P.open():void 0,onSelectSessions:w?()=>w(t.id):void 0,confirmDelete:R,onPin:ue,onDelete:re,onRequestDelete:ee,onCancelDelete:q}),e("span",{className:"flex items-center justify-center pr-1",children:b?e(I,{size:14}):e(se,{size:14})})]})]})]}),Ne&&e("div",{className:"mt-0.5 space-y-0.5",children:[we.roots.map((B)=>{let de=String(B.id),ce=Ce(B);return e("div",{className:"space-y-0.5",children:[ye(B,ce),ce.isExpanded&&e(po,{parentId:de,hasSubagents:Boolean(B.hasSubagents),childrenOf:we.childrenOf,expandedIds:z,onToggle:W,activeSessionId:r===null?null:String(r),renderSession:ye,style:nt})]},B.id)}),e(at,{hiddenCount:L?0:ke,canShowLess:!L&&N,onShowMore:E,onShowLess:T})]}),e(Ei,{session:K.pending,isDeleting:K.isDeleting,error:K.error,onClose:K.cancelDelete,onConfirm:()=>void K.confirmDelete()}),P.dialog]})}function ct({folders:t,activeSessionId:r,expandedFolders:c,showArchived:p,sessionStatus:h,onSelectSession:b,onNewSessionForFolder:v,onNewWorktreeSession:S,onToggleFolder:x,onToast:l,batch:g,onStartSessionSelection:w,onCancelWait:M}){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((k)=>e(dt,{folder:k,activeSessionId:r,onSelectSession:b,onNewSessionForFolder:v,onNewWorktreeSession:S,isExpanded:c[k.id]??!0,onToggleExpand:()=>x(k.id),showArchived:p,sessionStatus:h,onToast:l,batch:g,onStartSessionSelection:w,onCancelWait:M},k.id))})}var eo=[3,2];function pt(){return e("div",{className:"flex-1 p-3 space-y-4","aria-hidden":"true",children:eo.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},(c,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 mt({folders:t,initializing:r,failed:c,activeSessionId:p,expandedFolders:h,sessionStatus:b,searchQuery:v,sortOption:S,optionsOpen:x,showArchived:l,optionsRef:g,scheduledCount:w,refreshing:M,selecting:k,batch:E,onNewSession:T,onNewWorkspace:N,onScheduler:P,onRefresh:H,onToggleOptions:A,onSortChange:z,onResetSort:W,onToggleArchived:Z,onHideArchived:U,onSearchChange:_,onClearSearch:R,onSelectWorkspaces:ee,onSelectSession:q,onNewSessionForFolder:X,onNewWorktreeSession:be,onToggleFolder:me,onToast:te,onStartSessionSelection:ne,onCancelWait:G}){return e(d,{children:[e(tt,{searchQuery:v,sortOption:S,optionsOpen:x,showArchived:l,optionsRef:g,onNewSession:T,onNewWorkspace:N,onScheduler:P,scheduledCount:w,onRefresh:H,refreshing:M,onToggleOptions:A,onSortChange:z,onResetSort:W,onToggleArchived:Z,onHideArchived:U,onSearchChange:_,onClearSearch:R,onSelectWorkspaces:ee,selecting:k}),c?e(hs,{touch:!0,onRetry:H,refreshing:M}):r?e(pt,{}):e(ct,{folders:t,activeSessionId:p,expandedFolders:h,showArchived:l,sessionStatus:b,onSelectSession:q,onNewSessionForFolder:X,onNewWorktreeSession:be,onToggleFolder:me,onToast:te,batch:E,onStartSessionSelection:ne,onCancelWait:G})]})}function ft({onSettings:t,onKeyBindings:r,onAbout:c,updateAvailable:p,onUpdateClick:h,onDesktopToggle:b,shellDownload:v}){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(Ns,{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(fa,{size:14}),e("span",{children:"Keys"})]}),e("button",{type:"button",onClick:c,className:"flex items-center space-x-1 hover:text-ink transition-colors",children:[e(pe,{size:14}),e("span",{children:"About"})]}),v&&e(bm,{download:v,variant:"label"}),b&&e("button",{type:"button",onClick:b,className:"flex items-center space-x-1 hover:text-ink transition-colors",title:"Switch to desktop view",children:[e(Aa,{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",tm.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 ht(t,r,c){return t.filter((p)=>p.id!==r&&!(c&&p.side==="left"))}function vt(t){return t}function xt(t,r=0){let{scrollLeft:c,clientWidth:p,scrollWidth:h,start:b,size:v}=t,S=Math.max(0,h-p),x=b-r,l=b+v+r;if(v+r*2>=p)return Math.max(0,Math.min(S,x));let g=c;if(x<c)g=x;else if(l>c+p)g=l-p;return Math.max(0,Math.min(S,g))}var to=8;function Ie({panels:t,activeId:r,onSelect:c,hasGitChanges:p=!1}){let h=o(null),b=o(new Map),v=o({activeId:r,panels:t});v.current={activeId:r,panels:t};let S=o({signature:"",width:0}),x=a(()=>{let l=h.current,g=b.current.get(v.current.activeId);if(!l||!g||l.clientWidth<=0)return;let w=`${v.current.activeId}\x00${v.current.panels.map((N)=>N.id).join("\x00")}`,M=S.current;if(M.signature===w&&M.width===l.clientWidth)return;S.current={signature:w,width:l.clientWidth};let k=l.getBoundingClientRect(),E=g.getBoundingClientRect(),T=xt({scrollLeft:l.scrollLeft,clientWidth:l.clientWidth,scrollWidth:l.scrollWidth,start:E.left-k.left+l.scrollLeft,size:E.width},to);if(T!==l.scrollLeft)l.scrollLeft=T},[]);return V(x,[r,t,x]),i(()=>{let l=h.current;if(!l||typeof ResizeObserver>"u")return;let g=new ResizeObserver(x);return g.observe(l),()=>g.disconnect()},[x]),e("div",{ref:h,className:"flex items-center space-x-1.5 overflow-x-auto no-scrollbar py-1",children:t.map((l)=>{let g=l.id===r;return e("button",{ref:(w)=>{if(w)b.current.set(l.id,w);else b.current.delete(l.id)},type:"button",onClick:()=>c(l.id),"aria-pressed":g,"aria-label":l.title,className:`relative flex items-center transition-all cursor-pointer ${g?"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:l.title,children:[e(js,{panelId:l.id,builtin:l.builtin,icon:l.builtin?l.icon:void 0,name:l.builtin?l.label:l.name,...l.iconUrl?{iconUrl:l.iconUrl}:{},...l.color?{color:l.color}:{},size:an}),g&&e("span",{className:l.id==="git"?"tracking-wide":void 0,children:l.label}),l.id==="git"&&p&&e("span",{className:"absolute top-1 right-1 w-1.5 h-1.5 rounded-full bg-info",title:"Uncommitted changes"})]},l.id)})})}function St({panels:t,activeId:r,onSelect:c}){return e("div",{className:"px-3 py-1.5 border-b border-ink/10 bg-canvas flex-shrink-0",children:e(Ie,{panels:t,activeId:r,onSelect:c})})}function kt({panelKey:t,panel:r,body:c}){if(!r)return e("div",{className:"flex-1 min-h-0",children:e(pc,{panelKey:t})});return e("div",{className:"flex-1 min-h-0 overflow-hidden relative",children:e(We,{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(Ai,{value:c,children:r.render(c)})})})}function Nt({activeSessionId:t,newWorkspaceOpen:r,onCloseNewWorkspace:c,schedulerOpen:p,onCloseScheduler:h,aboutOpen:b,onCloseAbout:v,updates:S,pushToast:x,batchDelete:l,batchMode:g,onEndBatch:w,scopeLabel:M}){return e(d,{children:[e(ol,{isOpen:r,onClose:c,onCreate:Yc,onClone:Jc}),e(qc,{isOpen:p,onClose:h,activeSessionId:t===null?null:String(t),onToast:x}),e(nm,{isOpen:b,onClose:v,updates:S,onToast:x}),e(gm,{updates:S}),e(tu,{mode:g??"session",count:l.pending.length,scopeLabel:M,isDeleting:l.isDeleting,outcome:l.outcome,onClose:()=>{let k=l.outcome?.refused.length??0;if(l.cancel(),l.outcome&&k===0)w()},onConfirm:()=>{let k=g??"session";l.confirm(k).then((E)=>{if(E&&E.refused.length===0)w()})}})]})}function Ct(){let t=Kn(),r=Vr("left"),[c,p]=Ma("layout.mobileLeftPanel",ut),h=Am(c,t.enabled);return{catalog:r,activeView:h,setActiveView:p,showingSessions:h===ut,activePanel:r.find((b)=>b.id===h),enabled:t.enabled}}function Rt(t){return{className:"w-full h-full",sessionId:t.sessionId===null?null:String(t.sessionId),enabled:!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 Mt({appSettings:t,onSelectSession:r,onClose:c,rootPath:p,refreshKey:h,onRefresh:b,onOpenFile:v}){let S=Kc(t,{onSelectSession:r,onAfterSelect:c}),{folders:x,processedFolders:l,refreshNow:g,showArchived:w,activeSessionId:M}=S,k=Xc(l,w,g),[E,T]=n({1:!0,2:!0,3:!0}),N=o(null);le(N,()=>S.setOptionsOpen(!1));let P=(W)=>{T((_)=>({..._,[W]:!_[W]}));let Z=x.find((_)=>_.id===W),U=!(E[W]??Z?.isExpanded??!0);cd(W,U)},H=l.map((W)=>`${W.id}:${W.isExpanded}`).join("|");i(()=>{T(Object.fromEntries(l.map((W)=>[W.id,W.isExpanded])))},[H]);let A=Ct(),z=Rt({sessionId:M,refreshKey:h,rootPath:p,onRefresh:b,onOpenFile:v,onClose:c});return{controller:S,batch:k,expandedFolders:E,toggleFolder:P,optionsRef:N,dock:A,dockBody:z}}function Pt({activeSessionId:t,onSelectSession:r,onNewSession:c,onNewSessionForFolder:p,onNewWorktreeSession:h,onClose:b,onDesktopToggle:v,appSettings:S={},rootPath:x,refreshKey:l=0,onRefresh:g,onOpenFile:w}){let{controller:M,batch:k,expandedFolders:E,toggleFolder:T,optionsRef:N,dock:P,dockBody:H}=Mt({appSettings:S,onSelectSession:r,onClose:b,rootPath:x,refreshKey:l,onRefresh:g,onOpenFile:w}),{initializing:A,failed:z,refreshNow:W,isRefreshing:Z,searchQuery:U,setSearchQuery:_,showArchived:R,setShowArchived:ee,optionsOpen:q,setOptionsOpen:X,sortOption:be,handleSortChange:me,processedFolders:te,sessionStatus:ne,handleSelectSession:G}=M,{selection:K,deleteRun:ue,archiveRun:re,binding:ge,scopeFolder:xe,available:Se,selected:ve}=k,L=nu(),[O,Q]=n(!1),[j,ke]=n(!1),we=jc(),[Ne,ye]=n(!1),Ce=ym(),B=hm(),{pushToast:de}=Ve(),ce=Ws(de);Vc({onNotice:de}),_e(oc,()=>{b(),ye(!0),Ce.apply("kabmo").then((ae)=>{if(!ae)return;de(ae.message,Gl(ae))})});let Te=()=>{c(),b()},Ae=()=>{re.archive(ve).then((ae)=>{if(!ae)return;let Oe=Zc(ae);if(Oe)de(Oe.message,Oe.tone);if(!ae.error)K.end()})},Re=(ae)=>{p(ae),b()},Fe=()=>{ee(!R)},Be=h?(ae,Oe)=>{h(ae,Oe),b()}:void 0,qt={className:"flex-1 min-h-0 w-full",folders:te,initializing:A,failed:z,activeSessionId:t,sessionStatus:ne,searchQuery:U,onSearchChange:_,showArchived:R,onToggleArchived:Fe,sortOption:be,optionsOpen:q,onToggleOptions:()=>X(!q),onCloseOptions:()=>X(!1),onSortChange:me,onRefresh:W,refreshing:Z,scheduledCount:we,onNewSession:Te,onNewWorkspace:()=>Q(!0),onScheduler:()=>ke(!0),onSelectSession:G,onNewSessionForFolder:Re,onNewWorktreeSession:Be,onToast:de,onCancelWait:ce,batch:ge,onSelectWorkspaces:k.toggleWorkspaceSelection,onStartSessionSelection:(ae)=>K.begin("session",ae)};return e("div",{className:"flex flex-col h-full w-full bg-canvas text-ink relative select-none",children:[e(Qe,{onClose:b,viewLabel:P.showingSessions?"Sessions":P.activePanel?.label??"Panel"}),vt(P.enabled)?e(St,{panels:P.catalog,activeId:P.activeView,onSelect:P.setActiveView}):null,e("div",{className:P.showingSessions?"contents":"hidden",children:[L==="modern"?e(Wc,{...qt,touch:!0}):e(mt,{folders:te,initializing:A,failed:z,activeSessionId:t,expandedFolders:E,sessionStatus:ne,searchQuery:U,sortOption:be,optionsOpen:q,showArchived:R,optionsRef:N,scheduledCount:we,refreshing:Z,selecting:K.mode!==null,batch:ge,onNewSession:Te,onNewWorkspace:()=>Q(!0),onScheduler:()=>ke(!0),onRefresh:W,onToggleOptions:()=>X(!q),onSortChange:me,onResetSort:()=>me("A-Z"),onToggleArchived:Fe,onHideArchived:()=>ee(!1),onSearchChange:_,onClearSearch:()=>_(""),onSelectWorkspaces:k.toggleWorkspaceSelection,onSelectSession:G,onNewSessionForFolder:Re,onNewWorktreeSession:Be,onToggleFolder:T,onToast:de,onStartSessionSelection:(ae)=>K.begin("session",ae),onCancelWait:ce}),K.mode&&e(eu,{drawer:!0,mode:K.mode,count:ve.length,total:Se.length,busy:ue.isDeleting,archiving:re.isArchiving,scopeLabel:xe?.name,onSelectAll:()=>K.selectAllOf(Se),onUnselectAll:()=>K.unselectAllOf(Se),onDelete:()=>ue.request(ve),onArchive:Ae,onCancel:K.end})]}),P.showingSessions?null:e(kt,{panelKey:P.activeView,panel:P.activePanel,body:H}),e(ft,{onSettings:()=>window.dispatchEvent(new CustomEvent("omp:open-settings",{detail:{}})),onKeyBindings:fc,onAbout:()=>ye(!0),shellDownload:B,onDesktopToggle:v,updateAvailable:Ce.hasUpdate,onUpdateClick:()=>{ye(!0),Ce.check()}}),e(Nt,{activeSessionId:t,newWorkspaceOpen:O,onCloseNewWorkspace:()=>Q(!1),schedulerOpen:j,onCloseScheduler:()=>ke(!1),aboutOpen:Ne,onCloseAbout:()=>ye(!1),updates:Ce,pushToast:de,batchDelete:ue,batchMode:K.mode,onEndBatch:K.end,scopeLabel:xe?.name})]})}function Tt({enabled:t=!0,rootPath:r,refreshKey:c=0,onRefresh:p,onOpenFile:h,onClose:b}){let[v,S]=Ma("layout.mobileRightPanel",dp),x=Kn(),l=ht(Vr("all"),ut,x.enabled),g=l.find((T)=>T.id===v)??l[0],w=gp(r,t),{changes:M}=Ds(r,w,t),k=M.length>0,E={className:"h-full w-full",enabled:t||!g?.requiresWorkspace,active:!0,refreshKey:c,...r?{rootPath:r}:{},onRefresh:p,onOpenFile:h,onClose:b,showHeader:!1,layout:"phone"};return e("div",{className:"flex flex-col h-full w-full bg-paper text-ink relative select-none",children:[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",...Ti(),style:{height:"calc(3.5rem + env(safe-area-inset-top, 0px))",paddingTop:"env(safe-area-inset-top, 0px)",paddingLeft:Di(Vn("0.75rem",!0)),paddingRight:kr("0.75rem",!0)},children:[e("div",{className:"flex items-center min-w-0 titlebar-no-drag",children:e(Ie,{panels:l,activeId:g?.id??v,onSelect:S,hasGitChanges:k})}),e("button",{type:"button",onClick:b,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(y,{size:20,strokeWidth:1.8})})]}),e("div",{className:"flex-1 min-h-0 overflow-hidden relative",style:{paddingBottom:"env(safe-area-inset-bottom, 0px)"},children:g?e(We,{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(Ai,{value:E,children:g.render(E)})}):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"})})})]})}function Ot({fileName:t,hasPreview:r,isPreview:c,hasReview:p,isReviewing:h,onToggleReview:b,wordWrap:v,copied:S,byteViewer:x=!1,missing:l=!1,onSave:g,onClose:w,onTogglePreview:M,onToggleFind:k,findOpen:E,onToggleWrap:T,onZoomOut:N,onZoomIn:P,onCopy:H,onDownload:A}){return e("header",{className:"bg-canvas border-b border-ink/10 flex items-center justify-between px-3 flex-shrink-0",style:{height:"calc(3rem + env(safe-area-inset-top, 0px))",paddingTop:"env(safe-area-inset-top, 0px)",paddingLeft:Vn("0.75rem",!0),paddingRight:kr("0.75rem",!0)},children:[e("div",{className:"flex items-center space-x-2 min-w-0 pr-2",children:[e("button",{type:"button",onClick:w,className:"p-1.5 rounded-lg hover:bg-ink/10 text-ink transition-colors active:scale-90 flex-shrink-0 cursor-pointer",title:"Close editor","aria-label":"Close editor",children:e(Kt,{size:18,strokeWidth:2})}),e("div",{className:"flex items-center space-x-1.5 truncate",children:[e(rt,{name:t,size:15,className:`flex-shrink-0${l?" text-error":""}`}),e("span",{className:`font-semibold text-xs truncate${l?" text-error line-through":" text-ink"}`,children:t})]})]}),e("div",{className:"flex items-center space-x-1 text-ink/70 flex-shrink-0",children:[l&&g&&e("button",{type:"button",onClick:g,className:"p-1.5 rounded bg-error text-canvas hover:bg-error/90 transition-colors cursor-pointer",title:"Save and recreate the file","aria-label":"Save and recreate the file",children:e(yt,{size:15})}),!x&&e("button",{type:"button",onClick:k,className:`p-1.5 rounded hover:bg-ink/10 transition-colors cursor-pointer ${E?"bg-ink text-canvas":""}`,title:E?"Close find":"Find in file","aria-label":E?"Close find":"Find in file","aria-pressed":E,children:e(F,{size:15})}),p&&e("button",{type:"button",onClick:b,className:`p-1.5 rounded hover:bg-ink/10 transition-colors cursor-pointer ${h?"bg-ink text-canvas":""}`,title:h?"Exit review mode":"Review this document","aria-label":h?"Exit review mode":"Review this document","aria-pressed":h,children:e(Xt,{size:15})}),r&&e("button",{type:"button",onClick:M,className:`p-1.5 rounded hover:bg-ink/10 transition-colors cursor-pointer ${c?"bg-ink text-canvas":""}`,title:c?"View source":"Show preview","aria-label":c?"View source":"Show preview",children:c?e(wt,{size:15}):e(Ge,{size:15})}),!x&&e(d,{children:[e("button",{type:"button",onClick:T,className:`p-1.5 rounded hover:bg-ink/10 transition-colors cursor-pointer ${v?"text-ink":""}`,title:"Toggle word wrap",children:e(Wt,{size:15})}),e("button",{type:"button",onClick:N,className:"p-1.5 rounded hover:bg-ink/10 transition-colors cursor-pointer",title:"Decrease font size",children:e(Sa,{size:15})}),e("button",{type:"button",onClick:P,className:"p-1.5 rounded hover:bg-ink/10 transition-colors cursor-pointer",title:"Increase font size",children:e(_a,{size:15})})]}),e("button",{type:"button",onClick:H,className:"p-1.5 rounded hover:bg-ink/10 transition-colors cursor-pointer",title:"Copy content",children:S?e(f,{size:15,className:"text-success"}):e(ie,{size:15})}),e("button",{type:"button",onClick:A,className:"p-1.5 rounded hover:bg-ink/10 transition-colors cursor-pointer",title:"Download file",children:e(he,{size:15})})]})]})}function Dt({fileName:t,content:r,path:c,root:p,repo:h,fontSize:b,scrollRef:v,onScroll:S,isLoading:x,unsupported:l,loadError:g,reviewActive:w,onExitReview:M}){return e("div",{ref:v,onScroll:S,"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..."})]}):l?e("div",{className:"flex flex-col items-center justify-center h-full gap-2 px-6 text-center",children:[e(kc,{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:l})]}):g?e("div",{className:"flex flex-col items-center justify-center h-full gap-2 px-6 text-center",children:[e(D,{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:g})]}):e("div",{className:"p-4 bg-paper text-ink min-h-full font-sans",style:{fontSize:`${b}px`},children:e(wc,{content:r,file:{name:t,path:c,root:p,repo:h},active:w,onExit:M})})})}function Ft({file:t,editor:r,viewerKind:c,byteViewer:p,isPreview:h,isMd:b,content:v,language:S,wordWrap:x,fileKey:l,revealMarks:g,currentMark:w,surfaceRef:M,setCodeScroller:k,previewRef:E,scroll:T,fontSize:N,reviewActive:P,onExitReview:H,editorTheme:A,editorFontFamily:z,indentUnitText:W,typing:Z}){let U=a(async(_)=>{let R=await Dc(t,_,{interactive:!0,baseMtimeMs:r.baseMtimeMs});if(R.status==="written")return{ok:!0};if(R.status==="conflict")return{ok:!1,error:"This file changed on disk since it was opened."};if(R.status==="needs-permission")return{ok:!1,error:"Tap Save again to grant write access."};return{ok:!1,error:R.error}},[t,r.baseMtimeMs]);if(r.isImage&&r.imageUrl)return e(Ni,{src:r.imageUrl,name:t.name,className:"flex-1 min-h-0"});if(r.isImage||Sc(c)&&(p||h))return e(nl,{kind:c,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:U,onDirtyChange:r.setBinaryDirty});if(r.isLoading||r.unsupported||r.loadError||b&&h)return e(Dt,{fileName:t.name,content:v,path:t.path??t.name,root:t.root,repo:t.repo,fontSize:N,scrollRef:E,onScroll:T.onScroll,isLoading:r.isLoading,unsupported:r.unsupported,loadError:r.loadError,reviewActive:P,onExitReview:H});return e(Ec,{ref:M,value:v,onValueChange:r.onChange,language:S,wordWrap:x,documentKey:l,marks:g,currentMark:w,onScroller:k,scrollTestId:"editor-scroller",className:"flex-1 min-h-0 text-ink select-text",themeVars:A.vars,themes:A.themes,indentUnitText:W,typing:Z,padding:12,placeholder:"This file is empty",style:{fontFamily:z,fontSize:`${N}px`,lineHeight:Os}})}function It(){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(D,{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 At({isImage:t,byteViewer:r,viewerKind:c,lineCount:p,charCount:h,language:b,saveStatus:v,path:S,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:Ri[c]}):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:b})]})}),e("div",{className:"flex items-center space-x-2",children:[v==="saving"&&e(d,{children:[e(m,{size:10,className:"animate-spin"}),e("span",{children:"Saving…"})]}),v==="saved"&&e(d,{children:[e("span",{className:"w-1.5 h-1.5 rounded-full bg-success"}),e("span",{children:"Saved"})]}),v==="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"})]}),v==="idle"&&S&&e("span",{className:"truncate max-w-[140px]",children:S})]})]})}function Lt({path:t,content:r,ready:c,surfaceRef:p}){let h=Rc(t,r,c),b=o(null);return i(()=>{if(!h||b.current===h.request)return;b.current=h.request;let v=h.matches[h.currentIndex];if(!v)return;p.current?.select(v.start,v.end,!1),p.current?.revealOffset(v.start)},[h,p]),{matches:h?.matches??[],currentIndex:h?.currentIndex??-1}}function Bt({path:t,content:r,documentKey:c,ready:p,surfaceRef:h,toggleWordWrap:b}){let v=Lt({path:t,content:r,ready:p,surfaceRef:h}),S=Nc({text:r,documentKey:c,readSelection:()=>h.current?.getSelection()??null,select:(x,l,g=!0)=>h.current?.select(x,l,g),reveal:(x)=>h.current?.revealOffset(x),applyDocument:(x,l,g)=>h.current?.applyDocument(x,l,g),toggleWordWrap:b});if(S.open&&S.matches.length>0)return{find:S,revealMarks:S.matches,currentMark:S.currentIndex};return{find:S,revealMarks:v.matches.length>0?v.matches:void 0,currentMark:v.currentIndex}}function _t({path:t,symbols:r,total:c,truncated:p,emptyNotice:h,preview:b=!1}){let[v,S]=n(!1);if(!t)return null;let x=(l,g)=>{if(S(!1),b){let w=Su(r,g);if(w)jo({path:t,...w});return}Go({path:t,line:l.line,column:l.column,length:l.name.length})};return e(d,{children:[e("div",{className:"absolute bottom-14 right-3 z-20",children:e("button",{type:"button",onClick:()=>S(!0),"aria-label":`Outline (${c} 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 active:scale-95",children:e(zr,{size:16})})}),v&&e(J,{onClose:()=>S(!1),maxWidthClass:"max-w-sm",zClass:"z-[70]",header:e("div",{className:"flex min-w-0 items-center gap-2",children:[e(zr,{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}/${c}`:c})]}),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((l,g)=>e("button",{type:"button",onClick:()=>x(l,g),"aria-label":b?`${Gi(l.kind)} ${l.name}`:`${Gi(l.kind)} ${l.name}, line ${l.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+l.depth*12}px`},children:[e(xu,{kind:l.kind,size:13}),e("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-ink",children:l.name}),!b&&e("span",{className:"flex-shrink-0 font-mono text-[10px] text-ink/40",children:l.line})]},`${l.line}:${l.kind}:${l.name}`)),p&&e("div",{className:"px-4 py-2 text-[11px] italic text-ink/40",children:wu(c)})]})})]})}function Vt({file:t,missing:r=!1,onClose:c,onFileSaved:p,onDropResult:h}){let b=rs(t.path??t.name),[v,S]=n({}),[x,l]=n(bi),[g,w]=n(!0),M=xi(),k=co(),E=zc(),T=Gc(),N=b==="markdown",P=Xu[b]===!0,H=ns[b]===!0,A=t.path??t.name,z=v[A]??H,W=Pc(String(A)),Z=N&&z,U=()=>S((j)=>({...j,[A]:!z})),_=gc({enabled:Boolean(t.root),onResult:h}),R=Qc(t,{flushOnUnmount:!0,reportSaveError:!0,downloadMimeType:"text/plain;charset=utf-8",onFileSaved:p,missing:r}),[ee,q]=n(null),X=Ks({tabKey:A,surface:N&&z?"rendered":"code",ready:R.loaded,slot:Rg,element:N&&z?void 0:ee}),[be,me]=n(null),te=a((j)=>{X.ref(j),me(j)},[X.ref]);Ic({path:t.path??null,scroller:be,preview:N&&z});let ne=o(null),{find:G,revealMarks:K,currentMark:ue}=Bt({path:t.path??null,content:R.content,documentKey:`${A}\x00${R.language}`,ready:R.loaded&&!R.loadError,surfaceRef:ne,toggleWordWrap:()=>w((j)=>!j)}),{content:re,language:ge}=R,xe=re.split(`
|
|
2
|
-
`).length,Se=Cc(re);Fc({file:{id:A,name:t.name,path:t.path??A},editor:R,surfaceRef:ne,isPreview:z,exitPreview:()=>S((j)=>({...j,[A]:!1})),publish:!1});let{symbols:ve,total:L,truncated:O,notice:Q}=Cu({content:re,language:ge,path:t.path??null,state:P?"not-a-document":R.loadError?"error":R.loaded?"ready":"loading",note:P?`${Ri[b]} files have no text outline.`:R.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",..._.dropProps,..._.captureDropProps,children:[e(tl,{visible:_.isDragging}),e(Ot,{fileName:t.name,hasPreview:H,isPreview:z,wordWrap:g,copied:R.copied,byteViewer:P,missing:r,onSave:R.saveNow,onClose:c,onTogglePreview:U,hasReview:Z,isReviewing:Z&&W.active,onToggleReview:W.toggle,onToggleFind:()=>G.open?G.close():G.openFind(),findOpen:G.open,onToggleWrap:()=>w(!g),onZoomOut:()=>l((j)=>Math.max($s,j-1)),onZoomIn:()=>l((j)=>Math.min(zs,j+1)),onCopy:R.copy,onDownload:R.download}),r&&e(It,{}),R.diskChange&&e(Mc,{fileName:t.name,onReload:R.reloadFromDisk,onKeepMine:R.keepMineAgainstDisk}),G.open&&!P&&e("div",{className:"relative shrink-0 h-9 border-b border-ink/10 bg-paper",children:e(Bc,{find:G})}),e(Ft,{file:t,editor:R,viewerKind:b,byteViewer:P,isPreview:z,isMd:N,content:re,language:ge,wordWrap:g,fileKey:A,revealMarks:K,currentMark:ue,surfaceRef:ne,setCodeScroller:q,previewRef:te,scroll:X,fontSize:x,reviewActive:Z&&W.active,onExitReview:W.toggle,editorTheme:k,editorFontFamily:M,indentUnitText:$c(E),typing:T}),!P&&e(_t,{path:t.path??null,symbols:ve,total:L,truncated:O,emptyNotice:Q,preview:N&&z}),e(At,{isImage:R.isImage,byteViewer:P,viewerKind:b,lineCount:xe,charCount:re.length,language:ge,saveStatus:R.saveStatus,path:t.path,conflicts:Se}),R.saveMissingConfirm&&t.path&&e(Lc,{fileName:t.name,filePath:t.path,onClose:R.cancelSaveMissing,onConfirm:R.confirmSaveMissing})]})}function Ut({diff:t,onClose:r,onFileSaved:c}){let p=t.path.split("/").pop()||t.path,h=Boolean(t.staged),b=t.status||"M",v=Gn(b,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:{height:"calc(3rem + env(safe-area-inset-top, 0px))",paddingTop:"env(safe-area-inset-top, 0px)",paddingLeft:Vn("0.75rem",!0),paddingRight:kr("0.75rem",!0)},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(Kt,{size:18,strokeWidth:1.9})}),e(rt,{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 ${v.badgeBgClass}`,children:[v.charStatus," ",v.label]})]}),e("div",{className:"flex-1 min-h-0",children:e(xc,{className:"h-full",viewModeButtons:!1,filePath:t.path,status:b,isStaged:h,root:t.root,repo:t.repo||".",onFileSaved:c,tabKey:km(t.path,h)})})]})}function De(t,r){let c=t[r];return typeof c==="string"&&c.length>0?c:void 0}function oo(t){let r=t.content;return typeof r==="string"?r:void 0}function Le(t,r){let c=typeof t==="object"&&t!==null?t:{},p=(De(c,"path")??"").replace(/^\/+/,"");if(!p)return null;return{name:De(c,"name")??p.split("/").pop()??"file",path:p,content:oo(c),root:De(c,"root")??r??void 0,repo:De(c,"repo"),handleId:De(c,"handleId"),deviceFile:c.deviceFile===!0?!0:void 0}}function Gt(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 jt(t,r,c){Ca(c);let p=hn(r);return Ht(p,qf,{folderId:r,worktreePath:c}),t.setSearchParams((h)=>{let b=new URLSearchParams(h);return b.set("sessionId",p),b.set("folderId",r.toString()),b},{replace:!0}),t.afterNavigate?.(),p}function Wl({onDesktopToggle:t,appSettings:r={}}){let{folders:c,isMock:p}=je(),h=Kn(),{sessionId:b}=Ze(),[v,S]=oe(),x=v.get("sessionId"),l=x?Number.isNaN(Number(x))?x:Number(x):null,g=v.get("folderId"),w=g?Number.isNaN(Number(g))?g:Number(g):null,[M,k]=n("main"),[E,T]=n(null),[N,P]=n(null),[H,A]=n(0),[z,W]=n(!1),[Z,U]=n("appearance"),[_,R]=n(!1),ee=a(()=>A((L)=>L+1),[]),q=Tc(Gt(E),H),{pushToast:X}=Ve(),be=a((L)=>X(L.message,L.ok?"success":"error"),[X]),me=q.size>0;He({editorOpen:E!==null,diffOpen:N!==null,settingsOpen:z,offMainScreen:M!=="main",onCloseEditor:()=>T(null),onCloseDiff:()=>P(null),onCloseSettings:()=>{W(!1),R(!1)},onReturnToMain:()=>k("main")});let{folder:te}=Ga(c,l),ne=te??(w?c.find((L)=>String(L.id)===String(w))??null:null),G=vm(c,l)??ne?.project_path??null,K=!!ne,ue=gc({enabled:K,onResult:be});_e("omp:open-file",(L)=>{let Q=Le(L.detail,G);if(Q)T(Q)}),_e("omp:open-diff",(L)=>{let O=L.detail;if(!O?.file)return;P({path:O.file.replace(/^\/+/,""),status:O.status,staged:O.staged,repo:O.repo,root:O.root??G??void 0})}),_e("omp:view-subagent",()=>k("main")),_e(Ou,(L)=>{let O=L.detail?.panelKey;if(!O)return;let Q=Fg(O,h);if(!Q)return;Ht(b,Q==="left"?"layout.mobileLeftPanel":"layout.mobileRightPanel",O),k(Q==="left"?"session":"right")}),_e("omp:open-settings",(L)=>{let O=L.detail;U(O?.category??"appearance"),R(Boolean(O?.autoOpenAdd)),W(!0)});let re=(L)=>{S((O)=>{if(O.set("sessionId",L.toString()),O.has("subagent"))O.delete("subagent");return O},{replace:!0}),k("main")},ge=()=>{let L=Xo(c,x,w??void 0);if(L)Ca(L);S((O)=>{let Q=O.get("sessionId"),j=new URLSearchParams(O),ke=Q?c.find((we)=>we.sessions?.some((Ne)=>String(Ne.id)===String(Q))):void 0;if(j.set("sessionId",hn(ke?.id??w??null)),ke)j.set("folderId",ke.id.toString());return j},{replace:!0}),k("main")},xe=(L)=>{let O=Xo(c,x,L);if(O)Ca(O);S((Q)=>{let j=new URLSearchParams(Q);return j.set("sessionId",hn(L)),j.set("folderId",L.toString()),j},{replace:!0}),k("main")},Se=(L,O)=>jt({setSearchParams:S,afterNavigate:()=>k("main")},L,O),ve=a((L)=>{let O=Le(L,G);if(O)T(O)},[G]);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(jm,{}),e(qm,{isMock:p}),e(Hm,{workspacePath:G}),e("div",{className:`flex-1 min-h-0 w-full relative ${M==="main"?"block":"hidden"}`,...ue.dropProps,...ue.captureDropProps,children:[e(tl,{visible:ue.isDragging}),e(Ye,{activeSessionId:l,onSelectSession:re,onNewSession:ge,onOpenSessionSidebar:()=>k("session"),onOpenRightSidebar:()=>k("right"),appSettings:r})]}),e("div",{className:`flex-1 min-h-0 w-full ${M==="session"?"block":"hidden"}`,children:e(Pt,{activeSessionId:l,onSelectSession:re,onNewSession:ge,onNewSessionForFolder:xe,onNewWorktreeSession:Se,onClose:()=>k("main"),onDesktopToggle:t,appSettings:r,rootPath:G??void 0,refreshKey:H,onRefresh:ee,onOpenFile:ve})}),M==="right"&&e("div",{className:"flex-1 min-h-0 w-full",children:e(Tt,{enabled:K,rootPath:G??void 0,refreshKey:H,onRefresh:ee,onOpenFile:ve,onClose:()=>k("main")})}),E&&e(Vt,{file:E,missing:me,onClose:()=>T(null),onFileSaved:ee}),N&&e(Ut,{diff:N,onClose:()=>P(null),onFileSaved:ee}),e(ic,{isOpen:z,onClose:()=>{W(!1),R(!1)},initialCategory:Z,autoOpenAddProvider:_,appSettings:r})]})}export{Wl as MobileLayoutWrapper};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d,n,i,o,oe,e,Ht,ze,Ee,m,Xe,f,I,se,et,Zt,fe,Ue,Y,C,F,y,at,Ve,$t,zt,gt,Et,Kr,Gs,je,wa,Ci,Ei,Bi,bt,hn,Zo,Ii,_i,Si,Ca,Xo,Ws}from"./index-y139vc12.js";import{os,Ba,Br,ol,jc,qc,Fi,Hc,ss,sd,eA,tA,ls,cs,Ir,us,ds,Mi,ps,ms,fs,po,As,gs,hs,Wc,Kc,Vc,Yc,Jc,Zc,Xc,eu,tu}from"./index-xzfsaqyz.js";import{Ia,nu}from"./index-w4re5r8w.js";var re="shrink-0 w-7 h-7 inline-flex items-center justify-center rounded border transition-colors cursor-pointer",ae="border-ink/15 bg-paper text-ink/70 hover:bg-ink/5 hover:text-ink",ge="border-ink/30 bg-ink/10 text-ink";function Ne({isSearchVisible:t,searchQuery:h,showArchived:c,optionsOpen:g,sortOption:T,onToggleSearch:k,onSearchChange:S,onToggleArchived:N,onHideArchived:R,onToggleOptions:x,onCloseOptions:z,onSortChange:A,onNewSession:P,onNewWorkspace:W,onScheduler:L,scheduledCount:p,onRefresh:B,refreshing:M,onSelectWorkspaces:q,selecting:b}){let{ref:O,width:E}=ss(eA),H=tA(E),a=new Set(sd.slice(0,H)),l=sd.slice(H),j=c?"Hide Archive":"Show Archive",U=p>0?`Scheduled tasks (${p} armed)`:"Scheduled tasks",u=[];if(l.includes("new-workspace"))u.push({id:"new-workspace",label:"New Workspace",icon:Zt,onSelect:W});if(l.includes("refresh"))u.push({id:"refresh",label:"Refresh sessions",icon:C,onSelect:B});if(l.includes("search"))u.push({id:"search",label:"Search sessions",icon:F,onSelect:k,active:t});if(l.includes("archive"))u.push({id:"archive",label:j,icon:Xe,onSelect:N,active:c});if(l.includes("select"))u.push({id:"select",label:b?"Cancel selection":"Select workspaces",icon:Br,onSelect:q,active:b});if(l.includes("scheduler"))u.push({id:"scheduler",label:U,icon:Ba,onSelect:L});return e("div",{className:"p-3 border-b border-ink/10 flex flex-col space-y-3",children:[e("div",{ref:O,className:"flex items-center justify-between gap-2 px-1 text-ink/60",children:[e("div",{className:"flex flex-1 min-w-0 items-center gap-1.5",children:[e("button",{type:"button",title:"New Session","aria-label":"New Session",onClick:P,className:"flex-1 min-w-[52px] h-7 flex items-center justify-center space-x-1.5 px-2 rounded bg-ink text-canvas text-xs font-semibold hover:bg-ink/90 transition-colors cursor-pointer",children:[e(Y,{size:14,className:"shrink-0"}),e("span",{className:"truncate",children:"New Session"})]}),a.has("new-workspace")&&e("button",{type:"button",title:"New Workspace","aria-label":"New Workspace",onClick:W,className:`${re} ${ae}`,children:e(Zt,{size:14})}),a.has("scheduler")&&e("button",{type:"button",title:U,"aria-label":p>0?`Scheduled tasks, ${p} armed`:"Scheduled tasks",onClick:L,className:`relative ${re} ${ae}`,children:[e(Ba,{size:14}),p>0&&e("span",{className:"absolute -top-1 -right-1 min-w-[10px] h-[10px] px-[2px] rounded-full bg-ink text-canvas text-[7px] leading-[10px] text-center font-semibold",children:p>9?"9+":p})]}),a.has("refresh")&&e("button",{type:"button",title:"Refresh sessions",onClick:B,className:`${re} ${ae}`,"aria-label":"Refresh sessions","aria-busy":M,children:e(C,{size:14,className:M?"animate-spin":""})})]}),e("div",{className:"ml-auto flex items-center gap-1.5 shrink-0",children:[a.has("search")&&e("button",{type:"button",title:t?"Hide search":"Search sessions","aria-label":t?"Hide search":"Search sessions","aria-pressed":t,onClick:k,className:`${re} ${t?ge:ae}`,children:e(F,{size:14})}),a.has("select")&&e("button",{type:"button",title:b?"Cancel selection":"Select workspaces","aria-label":b?"Cancel selection":"Select workspaces","aria-pressed":b,onClick:q,className:`${re} ${b?ge:ae}`,children:e(Br,{size:14})}),a.has("archive")&&e("button",{type:"button",title:j,"aria-label":j,"aria-pressed":c,onClick:N,className:`${re} ${c?ge:ae}`,children:e(Xe,{size:14})}),a.has("sort")&&e("div",{className:"relative",children:[e("button",{type:"button",title:"Sort workspaces","aria-label":"Sort workspaces","aria-haspopup":"menu","aria-expanded":g,onClick:x,className:`${re} ${g||T!=="A-Z"?ge:ae}`,children:e(os,{size:14})}),g&&e("div",{className:"glass-popover absolute right-0 top-full mt-2 w-48 bg-paper border border-ink/15 rounded-lg shadow-lg z-50 py-1",onMouseLeave:z,children:e(Fi,{variant:"desktop",sortOption:T,onSortChange:A})})]}),u.length>0&&e(Hc,{actions:u,sortHidden:l.includes("sort"),sortOption:T,onSortChange:A})]})]}),t&&e("div",{className:"pt-1",children:e("input",{type:"text",placeholder:"Search workspaces & sessions...",value:h,onChange:(G)=>S(G.currentTarget.value),autoFocus:!0,className:"w-full bg-ink/5 border border-ink/10 rounded px-2.5 py-1.5 outline-none focus:border-ink/30 text-xs text-ink placeholder-ink/40 transition-colors"})}),c&&e("div",{className:"flex items-center justify-between bg-warning/10 border border-warning/25 text-warning rounded px-2.5 py-1.5 text-[10px] font-medium",children:[e("div",{className:"flex items-center space-x-1.5",children:[e(Xe,{size:10}),e("span",{children:"Showing Archived"})]}),e("button",{className:"hover:text-warning-hover",onClick:R,children:e(y,{size:10})})]})]})}var Ce={inset:"px-2",insetPx:8,slotWidth:16,markGap:8,padding:"py-1.5",glyph:Et.compact};function Ae({sessionId:t,title:h,harness:c,isActive:g=!1,isArchived:T=!1,status:k,awaitingInput:S=!1,timeAgo:N,timeTitle:R,runStartedAt:x,onClick:z,onArchive:A,onDelete:P,onRename:W,onRenameWithAi:L,expandable:p=!1,isExpanded:B=!1,onToggleExpand:M,isChild:q=!1,folderId:b,waitingFor:O,onCancelWait:E,worktree:H,selectable:a=!1,selected:l=!1,onToggleSelect:j}){let U=wa(t),u=Boolean(p&&M),G=Boolean(O),v=u&&!(S||k==="stream"||G)&&!U,D=Boolean(U||S||k)&&!v,{isEditing:V,draft:pe,setDraft:le,inputRef:te,startRename:ee,handleKeyDown:X,handleBlur:ie}=Bi(h,W),Z=Ii(),ce=Boolean(W||A||P||E);return e(d,{children:[e("div",{"data-testid":"session-item","data-session-id":String(t),"data-selected":a&&l?"true":void 0,onClick:V?void 0:a?j:z,onContextMenu:ce&&!V&&!a?Z.openAtCursor:void 0,className:`group/item relative flex items-center w-full rounded-lg px-2 py-1.5 cursor-pointer text-xs transition-colors select-none ${a&&l?"bg-ink/10 text-ink ring-1 ring-inset ring-ink/20":g?"bg-ink/10 font-medium text-ink":"text-ink/75 hover:text-ink hover:bg-ink/5"}`,children:[a?e(d,{children:[e(Ir,{checked:l,label:`Select ${h}`,onChange:()=>j?.()}),e("span",{className:"w-2 shrink-0"})]}):e(d,{children:[e("span",{className:"relative w-4 h-4 shrink-0",children:[u&&M&&e("button",{type:"button",onClick:(J)=>{J.stopPropagation(),M(J)},title:B?"Collapse sessions and subagents":"Expand sessions and subagents","aria-expanded":B,className:`peer absolute inset-0 flex items-center justify-center rounded cursor-pointer transition-opacity ${v?"text-ink/60 hover:text-ink":"text-ink/40 hover:text-ink pointer-events-none opacity-0 group-hover/item:pointer-events-auto group-hover/item:opacity-100 focus-visible:opacity-100"}`,children:B?e(I,{size:13}):e(se,{size:13})}),D&&e("span",{className:`pointer-events-none absolute inset-0 flex items-center justify-center text-ink/60 transition-opacity ${u?"group-hover/item:opacity-0 peer-focus-visible:opacity-0":""}`,children:U?e("span",{role:"status","aria-label":"Generating a name…",children:e(m,{size:12,className:"animate-spin"})}):S?e(ze,{size:12,className:"animate-pulse text-ink/80"}):G?e("span",{role:"status","aria-label":`Waiting for ${O?.title??"another session"}`,children:e(Ue,{size:12,className:"animate-pulse text-ink/60"})}):k==="stream"?e("span",{role:"status","aria-label":"Running",children:e(m,{size:12,className:"animate-spin"})}):e(f,{size:12})}),q&&!u&&!D&&e("span",{"data-testid":"child-indicator","aria-hidden":"true",className:"pointer-events-none absolute inset-0 flex items-center justify-center text-ink/35",children:e(fe,{size:12,"aria-hidden":"true"})})]}),e("span",{className:"w-2 shrink-0"})]}),c&&e("span",{className:"mr-1.5 flex shrink-0 items-center",children:e(gt,{harness:c,size:Et.compact})}),V?e("input",{ref:te,autoFocus:!0,value:pe,onChange:(J)=>le(J.currentTarget.value),onClick:(J)=>J.stopPropagation(),onKeyDown:X,onBlur:ie,className:"flex-1 min-w-0 bg-paper border border-ink/25 rounded px-1 py-0.5 text-xs text-ink outline-none focus:border-ink/50"}):e("span",{className:"flex-1 min-w-0 flex flex-col leading-snug",children:[e("span",{className:"min-w-0 truncate",children:h.charAt(0).toUpperCase()+h.slice(1)}),G&&e("span",{className:"truncate text-[10px] text-ink/40 font-normal",children:["waiting for ",O?.title??"another session"]}),H&&!V&&e(us,{worktree:H})]}),!V&&e(ps,{timeAgo:N,timeTitle:R,runStartedAt:x,className:"shrink-0 ml-2 font-mono text-[10px] text-ink/40"}),!V&&ce&&!a&&e("button",{type:"button",onClick:Z.openBelow,title:"Session actions","aria-label":"Session actions","aria-haspopup":"menu","aria-expanded":Z.anchor!==null,className:"shrink-0 ml-1 p-1 text-ink/40 hover:text-ink hover:bg-ink/10 rounded cursor-pointer",children:e(Ee,{size:14})})]}),Z.anchor&&e(_i,{anchor:Z.anchor,sessionId:t,...c?{harness:c}:{},...b!==void 0?{folderId:b}:{},isArchived:T,onRename:W?ee:void 0,onRenameWithAi:L,onArchive:A,onDelete:P,onCancelWait:E,onClose:Z.close})]})}function Oe({folder:t,isOpen:h,onToggleFolder:c,checkbox:g,batchActive:T,showMenu:k,onToggleMenu:S,onCloseMenu:N,onNewSession:R,onNewWorktreeSession:x,onOpenFolder:z,onSelectSessions:A,confirmDelete:P,onPin:W,onDelete:L,onRequestDelete:p,onCancelDelete:B}){let M=Kr(t.icon),[q,b]=n(!1),O=Boolean(x&&t.project_path),E=o(null),[H,a]=n(null);return e("div",{className:"group flex items-center justify-between h-7 text-xs font-semibold text-ink px-2 hover:bg-ink/5 rounded-md transition-colors select-none",children:[e("div",{className:"flex-1 h-full flex items-center cursor-pointer min-w-0",onClick:T?void 0:c,children:[g?e(d,{children:[e(Ir,{size:"md",checked:g.checked,indeterminate:g.indeterminate,label:g.label,onChange:g.onChange}),e("span",{className:"w-2 shrink-0"})]}):e(d,{children:[e("span",{className:"relative w-4 h-4 flex items-center justify-center shrink-0",children:[e("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover:opacity-0 touch-hidden",children:t.customIconUrl?e("img",{src:t.customIconUrl,alt:"",className:"w-[15px] h-[15px] rounded-xs object-contain shrink-0",referrerPolicy:"no-referrer"}):e(M,{size:15,className:"project-accent-mark text-ink/75",style:Gs(t.accentColor)})}),e("span",{className:"absolute inset-0 flex items-center justify-center text-ink/60 opacity-0 transition-opacity group-hover:opacity-100 touch-visible",children:h?e(I,{size:13}):e(se,{size:13})})]}),e("span",{className:"w-2 shrink-0"})]}),t.isPinned&&e(Ia,{size:11,className:"text-ink/60 shrink-0 mr-1.5"}),e("span",{className:"truncate text-[13px] font-semibold tracking-tight",children:t.name})]}),!T&&e("div",{className:"flex items-center space-x-0.5 pl-1",children:[e("button",{type:"button",title:"New Session","aria-label":`New session in ${t.name}`,className:"w-5 h-5 flex items-center justify-center text-ink/40 hover:text-ink hover:bg-ink/10 rounded cursor-pointer transition-colors",onClick:(l)=>{l.stopPropagation(),R()},children:e(Y,{size:12})}),e("div",{className:"relative flex items-center",children:[e("button",{ref:E,type:"button",title:`Options for ${t.name}`,"aria-label":`Options for ${t.name}`,"aria-haspopup":"menu","aria-expanded":k,className:"w-5 h-5 flex items-center justify-center text-ink/40 hover:text-ink hover:bg-ink/10 rounded cursor-pointer transition-colors",onClick:(l)=>{if(l.stopPropagation(),E.current)a($t(E.current));S()},children:e(Ee,{size:12})}),e(zt,{anchor:k?H:null,align:"end",ariaLabel:`Options for ${t.name}`,className:"glass-popover w-44 rounded-md border border-ink/15 bg-paper py-1 text-xs shadow-lg",onClose:N,children:e(ms,{variant:"desktop",isPinned:t.isPinned,onOpenFolder:z,onSelectSessions:A,onNewWorktree:O?()=>{S(),b(!0)}:void 0,confirmDelete:P,onPin:W,onDelete:L,onRequestDelete:p,onCancelDelete:B})})]})]}),O&&e(Si,{isOpen:q,onClose:()=>b(!1),root:t.project_path??null,folderId:t.id,folderName:t.name,onCreated:(l)=>{b(!1),x?.(t.id,l.path)}})]})}function De({folder:t,activeSessionId:h,onSelectSession:c,onNewSessionForFolder:g,onNewWorktreeSession:T,forceExpanded:k=!1,showArchived:S=!1,sessionStatus:N={},onToast:R,batch:x,onStartSessionSelection:z,onCancelWait:A}){let[P,W]=n(t.isExpanded||!1),[L,p]=n(!1),{visibleCount:B,showMore:M,showLess:q,canShowLess:b}=ls(),[O]=oe(),E=O.get("subagent"),H=O.get("sessionId"),{expandedSessionIds:a,toggleSession:l}=Zo();i(()=>{if(typeof t.isExpanded==="boolean")W(t.isExpanded)},[t.isExpanded]);let{refresh:j,runStartedAtMap:U}=je(),u=at(),{confirmDelete:G,requestDelete:ne,cancelDelete:v,handlePin:D,handleDelete:V,handleArchive:pe,handleRename:le,handleRenameWithAi:te,handleOpenFolder:ee}=cs(t,j,R),X=Ci(),ie=()=>{p(!1),v()},Z=t.sessions,ce=()=>{let s=!P;if(W(s),typeof t.id!=="number")return;u.submit({isExpanded:String(s)},{method:"POST",action:`/api/folders/${t.id}/toggle`})},J=()=>{D(),p(!1)},ue=()=>{V(),p(!1)},r=ee?()=>{ee(),p(!1)}:void 0,w=k||P,_=(Z||[]).filter((s)=>S?s.is_archived===1:s.is_archived!==1),{folderCheckbox:he,sessionCheckboxes:K,folderSummary:me,toggleFolderSelection:Se,rendered:Pe,hiddenCount:ke}=gs({batch:x,folder:t,sessions:_,showArchived:S,visibleCount:B,activeSessionId:h,sessionStatus:N}),be=As(Pe),We=w||K,xe=ke>0,we=(s,de)=>{let Q=String(s.id),ye=h!==null?String(h)===Q:s.is_active===1,Be=ye&&H===Q&&Boolean(E),ve=bt(Q);return e(Ae,{sessionId:s.id,title:s.title,harness:s.harness,folderId:s.folder_id,isActive:ye&&!Be,isArchived:s.is_archived===1,status:N[Q],awaitingInput:Boolean(s.awaitingInput),worktree:s.worktree,timeAgo:ds(s.updated_at??s.created_at),timeTitle:Mi(s.updated_at??s.created_at),runStartedAt:N[Q]==="stream"?U[Q]:void 0,onClick:()=>c(s.id),onArchive:()=>pe(s),onDelete:ve?void 0:()=>X.requestDelete(s),onRename:ve?void 0:(Me)=>void le(s,Me),onRenameWithAi:ve?void 0:()=>void te(s),expandable:de.expandable,isChild:de.isChild,isExpanded:de.isExpanded,onToggleExpand:de.onToggleExpand,waitingFor:s.waitingFor?{title:s.waitingFor.title}:void 0,onCancelWait:s.waitingFor?()=>A?.(s.waitingFor.waitId):void 0,selectable:K,selected:Boolean(x?.selected.includes(Q)),onToggleSelect:x?()=>x.toggle(Q):void 0})},Fe=(s)=>fs(s,be.childrenOf,a,l);return e("div",{className:"space-y-1",children:[e(Oe,{folder:t,isOpen:w,onToggleFolder:ce,checkbox:he&&me?{checked:me.all,indeterminate:me.some,label:`Select ${t.name}`,onChange:Se}:null,batchActive:Boolean(x),showMenu:L,onToggleMenu:()=>p(!L),onCloseMenu:ie,onNewSession:()=>g(t.id),onNewWorktreeSession:T,onOpenFolder:r,onSelectSessions:z?()=>{p(!1),z(t.id)}:void 0,confirmDelete:G,onPin:J,onDelete:ue,onRequestDelete:ne,onCancelDelete:v}),We&&e("div",{className:"space-y-0.5",children:[be.roots.map((s)=>{let de=String(s.id),Q=Fe(s);return e("div",{className:"space-y-0.5",children:[we(s,Q),Q.isExpanded&&e(po,{parentId:de,hasSubagents:Boolean(s.hasSubagents),childrenOf:be.childrenOf,expandedIds:a,onToggle:l,activeSessionId:h===null?null:String(h),renderSession:we,style:Ce})]},s.id)}),(xe||b)&&!k&&!K&&e("div",{className:"flex items-center gap-1",children:[xe&&e("button",{type:"button",onClick:M,className:"flex items-center min-w-0 text-xs text-ink/45 hover:text-ink/80 py-1.5 px-2 rounded-lg hover:bg-ink/5 transition-colors cursor-pointer select-none",children:[e("span",{className:"w-4 h-4 shrink-0 flex items-center justify-center",children:e(I,{size:12})}),e("span",{className:"w-2 shrink-0"}),e("span",{className:"truncate leading-snug",children:["Show more sessions (",ke,")"]})]}),b&&e("button",{type:"button",onClick:q,className:"ml-auto shrink-0 flex items-center gap-1 text-xs text-ink/45 hover:text-ink/80 py-1.5 px-2 rounded-lg hover:bg-ink/5 transition-colors cursor-pointer select-none",children:[e(et,{size:12}),e("span",{className:"truncate leading-snug",children:"Show less"})]})]}),_.length===0&&e("div",{className:"px-3 py-2 text-[11px] text-ink/40 italic",children:S?"No archived sessions.":"No sessions."})]}),e(Ei,{session:X.pending,isDeleting:X.isDeleting,error:X.error,onClose:X.cancelDelete,onConfirm:()=>void X.confirmDelete()})]})}function Ie({folders:t,activeSessionId:h,searchQuery:c,showArchived:g,sessionStatus:T,onSelectSession:k,onNewSessionForFolder:S,onNewWorktreeSession:N,onToast:R,batch:x,onStartSessionSelection:z,onCancelWait:A}){return e("div",{className:"flex-1 scrollbar-overlay-container p-2 space-y-4",children:t.length===0?e("div",{className:"text-center py-8 text-xs text-muted",children:c?"No results found.":"No workspaces available."}):t.map((P)=>e(De,{folder:P,activeSessionId:h,onSelectSession:k,onNewSessionForFolder:S,onNewWorktreeSession:N,forceExpanded:!!c,showArchived:g,sessionStatus:T,onToast:R,batch:x,onStartSessionSelection:z,onCancelWait:A},P.id))})}var Le=[3,2];function Te(){return e("div",{className:"flex-1 p-2 space-y-4","aria-hidden":"true",children:Le.map((t,h)=>e("div",{className:"space-y-1.5",children:[e("div",{className:"flex items-center gap-2 px-1 py-1.5",children:[e("span",{className:"w-3.5 h-3.5 rounded-sm animate-pulse bg-ink/10"}),e("span",{className:"h-3 w-24 rounded animate-pulse bg-ink/10"})]}),Array.from({length:t},(c,g)=>e("div",{className:"flex items-center gap-2 rounded px-2 py-1.5",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-g%3*12}%`}})]},g))]},h))})}function Re({className:t="",folders:h,initializing:c,failed:g,activeSessionId:T,sessionStatus:k,searchQuery:S,onSearchChange:N,showArchived:R,onToggleArchived:x,sortOption:z,optionsOpen:A,onToggleOptions:P,onCloseOptions:W,onSortChange:L,onRefresh:p,refreshing:B,scheduledCount:M,onNewSession:q,onNewWorkspace:b,onScheduler:O,onSelectSession:E,onNewSessionForFolder:H,onNewWorktreeSession:a,onToast:l,onCancelWait:j,batch:U,onSelectWorkspaces:u,onStartSessionSelection:G}){let[ne,v]=n(!1),D=ne||S.length>0,V=Boolean(U);return e("div",{className:`flex flex-col ${t}`,children:[e(Ne,{isSearchVisible:D,searchQuery:S,showArchived:R,optionsOpen:A,sortOption:z,onToggleSearch:()=>{if(D)v(!1),N("");else v(!0)},onSearchChange:N,onToggleArchived:x,onHideArchived:x,onToggleOptions:P,onCloseOptions:W,onSortChange:L,onNewSession:q,onNewWorkspace:b,onScheduler:O,scheduledCount:M,onRefresh:p,refreshing:B,onSelectWorkspaces:u,selecting:V}),g?e(hs,{onRetry:p,refreshing:B}):c?e(Te,{}):e(Ie,{folders:h,activeSessionId:T,searchQuery:S,showArchived:R,sessionStatus:k,onSelectSession:E,onNewSessionForFolder:H,onNewWorktreeSession:a,onToast:l,batch:U,onStartSessionSelection:G,onCancelWait:j})]})}function vo({className:t="",appSettings:h={}}){let{folders:c,initializing:g,failed:T,refreshNow:k,isRefreshing:S,activeSessionId:N,sessionParam:R,searchQuery:x,setSearchQuery:z,showArchived:A,setShowArchived:P,optionsOpen:W,setOptionsOpen:L,sortOption:p,handleSortChange:B,processedFolders:M,sessionStatus:q,handleSelectSession:b}=Kc(h,{expandSearchMatches:!0}),[,O]=oe(),E=nu(),[H,a]=n(!1),[l,j]=n(!1),U=jc(),{pushToast:u}=Ve(),G=Ws(u);Vc({onNotice:u});let ne=Xc(M,A,k),{selection:v,deleteRun:D,archiveRun:V,binding:pe,scopeFolder:le,available:te,selected:ee}=ne,X=()=>{V.archive(ee).then((r)=>{if(!r)return;let w=Zc(r);if(w)u(w.message,w.tone);if(!r.error)v.end()})},ie=(r)=>{let w=Xo(c,R,r);if(w)Ca(w)},Z=()=>{ie(),O((r)=>{let w=r.get("sessionId"),_=new URLSearchParams(r),K=(w?c.find((me)=>me.sessions?.some((Se)=>String(Se.id)===String(w))):void 0)?.id??(r.get("folderId")?Number(r.get("folderId")):null);if(_.set("sessionId",hn(K)),K!=null)_.set("folderId",String(K));else _.delete("folderId");return _},{replace:!0})},ce=(r,w)=>{ie(r);let _=hn(r);Ht(_,"chat.spawnTarget",{folderId:r,worktreePath:w}),O((he)=>{let K=new URLSearchParams(he);return K.set("sessionId",_),K.set("folderId",r.toString()),K},{replace:!0})},J=(r)=>{ie(r),O((w)=>{let _=new URLSearchParams(w);return _.set("sessionId",hn(r)),_.set("folderId",r.toString()),_},{replace:!0})},ue={className:`flex-1 min-h-0 w-full ${t}`,folders:M,initializing:g,failed:T,activeSessionId:N,sessionStatus:q,searchQuery:x,onSearchChange:z,showArchived:A,onToggleArchived:()=>P(!A),sortOption:p,optionsOpen:W,onToggleOptions:()=>L(!W),onCloseOptions:()=>L(!1),onSortChange:B,onRefresh:k,refreshing:S,scheduledCount:U,onNewSession:Z,onNewWorkspace:()=>a(!0),onScheduler:()=>j(!0),onSelectSession:b,onNewSessionForFolder:J,onNewWorktreeSession:ce,onToast:u,onCancelWait:G,batch:pe,onSelectWorkspaces:ne.toggleWorkspaceSelection,onStartSessionSelection:(r)=>v.begin("session",r)};return e(d,{children:[e("div",{className:"flex flex-col h-full",children:[E==="modern"?e(Wc,{...ue}):e(Re,{...ue}),v.mode&&e(eu,{mode:v.mode,count:ee.length,total:te.length,busy:D.isDeleting,archiving:V.isArchiving,scopeLabel:le?.name,onSelectAll:()=>v.selectAllOf(te),onUnselectAll:()=>v.unselectAllOf(te),onDelete:()=>D.request(ee),onArchive:X,onCancel:v.end})]}),e(tu,{mode:v.mode??"session",count:D.pending.length,scopeLabel:le?.name,isDeleting:D.isDeleting,outcome:D.outcome,onClose:()=>{let r=D.outcome?.refused.length??0;if(D.cancel(),D.outcome&&r===0)v.end()},onConfirm:()=>{let r=v.mode??"session";D.confirm(r).then((w)=>{if(w&&w.refused.length===0)v.end()})}}),e(ol,{isOpen:H,onClose:()=>a(!1),onCreate:Yc,onClone:Jc}),e(qc,{isOpen:l,onClose:()=>j(!1),activeSessionId:typeof R==="string"?R:null,onToast:u})]})}export{vo as SessionsView};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{of}from"./index-tr8754r0.js";export{of as createArchitectureServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{up}from"./index-73xfkyea.js";export{up as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ji}from"./index-m6wwc5h6.js";export{ji as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ol}from"./index-cwaz6geq.js";import"./index-m6wwc5h6.js";export{Ol as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ed,as,eh,th,nh,rh}from"./index-gvwqjpcr.js";export{eh as css,rh as gss,as as keywords,nh as less,ed as mkCSS,th as sCSS};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Xm}from"./index-tr8754r0.js";export{Xm as createCynefinServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{sf}from"./index-tr8754r0.js";export{sf as createEventModelingServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./index-qmh0h87h.js";import"./index-pe9j88d4.js";import{Xg}from"./index-31jrebvn.js";export{Xg as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ef}from"./index-tr8754r0.js";export{ef as createGitGraphServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Bf}from"./index-x64kqgen.js";import"./index-nsrnyqcm.js";import"./index-9nbxb421.js";import"./index-0j518hqm.js";import"./index-vrbcj11n.js";export{Bf as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ln,Qi,Im,es,oo,Ys,Uu,Js,jf,Gu,_m,Sm,Tm,Dm,Hg,Zs,ju,Wg,qu,Cr,Kg}from"./index-y139vc12.js";export{Js as IndentContext,Kg as StreamLanguage,qu as bracketMatching,Zs as codeFolding,Tm as foldAll,_m as foldCode,ju as foldGutter,Hg as foldKeymap,Gu as foldService,oo as getIndentUnit,Uu as getIndentation,Wg as highlightingFor,jf as indentOnInput,Im as indentService,Ys as indentString,es as indentUnit,Qi as language,Cr as matchBrackets,Ln as syntaxTree,Dm as unfoldAll,Sm as unfoldCode};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n,i,s,W,Hr,Vl,Ff,Mf,gg,jp}from"./index-y139vc12.js";var p={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"}]]},yt=s(p);var td="omp:editor-theme-changed";function a(){if(typeof window>"u")return Vl;return W("editorTheme")??Vl}var m={theme:null,vars:{},themes:Mf(null)};function co(){let[e,t]=n(a);if(i(()=>{let r=(d)=>{let E=d.detail;t(E||a())};return window.addEventListener(td,r),()=>window.removeEventListener(td,r)},[]),i(()=>{jp(e)},[e]),e===Hr)return m;let o=Ff(e);return{theme:o,vars:gg(o),themes:Mf(e)}}var nd="omp:editor-indent-changed",rd=[2,4,8],Oc={width:2,insertSpaces:!0};function ad(){if(typeof window>"u")return Oc;let e=W("editorIndentWidth"),t=W("editorInsertSpaces");return{width:typeof e==="number"&&rd.includes(e)?e:Oc.width,insertSpaces:typeof t==="boolean"?t:Oc.insertSpaces}}function $c(e){return e.insertSpaces?" ".repeat(e.width):"\t"}function zc(){let[e,t]=n(ad);return i(()=>{let o=(r)=>{let d=r.detail;t(d??ad())};return window.addEventListener(nd,o),()=>window.removeEventListener(nd,o)},[]),e}var id="omp:editor-typing-changed",al={autoCloseBrackets:!0,autocomplete:!0};function Uc(){if(typeof window>"u")return al;let e=W("editorAutoCloseBrackets"),t=W("editorAutocomplete");return{autoCloseBrackets:typeof e==="boolean"?e:al.autoCloseBrackets,autocomplete:typeof t==="boolean"?t:al.autocomplete}}function Gc(){let[e,t]=n(Uc);return i(()=>{let o=(r)=>{let d=r.detail;t(d??Uc())};return window.addEventListener(id,o),()=>window.removeEventListener(id,o)},[]),e}var is="omp:editor-blame-changed",il={enabled:!0,inline:!1};function uo(){if(typeof window>"u")return il;let e=W("editorBlame"),t=W("editorBlameInline");return{enabled:typeof e==="boolean"?e:il.enabled,inline:typeof t==="boolean"?t:il.inline}}function od(){let[e,t]=n(uo);return i(()=>{let o=(r)=>{let d=r.detail;t(d??uo())};return window.addEventListener(is,o),()=>window.removeEventListener(is,o)},[]),e}
|
|
2
|
-
export{yt,td,co,nd,rd,Oc,ad,$c,zc,id,al,Uc,Gc,is,il,uo,od};
|