@kabmo-labs/kabmo 0.58.0 → 0.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +520 -489
- package/dist/client/static/js/{Body-karkrzkc.js → Body-jqq4654r.js} +3 -3
- package/dist/client/static/js/{CsvGrid-j03knmbe.js → CsvGrid-avw0taqb.js} +2 -2
- package/dist/client/static/js/{DocxView-e8408vzs.js → DocxView-d221vr6g.js} +3 -3
- package/dist/client/static/js/{DrawioView-fj4mfzch.js → DrawioView-gjsy7p01.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-9g8xwzgw.js → HtmlPreview-949393v1.js} +1 -1
- package/dist/client/static/js/ImageView-pan9pqtm.js +1 -0
- package/dist/client/static/js/LayoutWrapper-p0qmghgt.js +2 -0
- package/dist/client/static/js/MergeDiffView-swt467g7.js +1 -0
- package/dist/client/static/js/Modal-4spmcn44.js +60 -0
- package/dist/client/static/js/{PdfView-8jtdx5hd.js → PdfView-dzj2s6rj.js} +1 -1
- package/dist/client/static/js/SessionsView-b6szjdg5.js +1 -0
- package/dist/client/static/js/{SheetView-hwx8s864.js → SheetView-jpc178g5.js} +11 -11
- package/dist/client/static/js/{SvgPreview-ete36nzv.js → SvgPreview-94fap32p.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-7nsqzz6z.js → abnfDiagram-O67JEVCF-a6eyfzrj.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-bwn1drdz.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-xvpkfq2f.js → architectureDiagram-NJMV4G6O-pgmyfncy.js} +3 -3
- package/dist/client/static/js/{astro-rsrqgjjx.js → astro-ryr2ajmg.js} +1 -1
- package/dist/client/static/js/bash-zknkkwkw.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-0saahcs6.js → blockDiagram-BEXU5L5S-rf51jyb2.js} +6 -6
- package/dist/client/static/js/c-0w02jkxb.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-ktpqnb4a.js → c4Diagram-YGBWAQC7-0faj48jp.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-x67cz3ms.js → classDiagram-v2-NBCMYWYE-bvzsws8x.js} +6 -6
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-9wzmhkz8.js → cose-bilkent-JH36ORCC-j1amnd3m.js} +1 -1
- package/dist/client/static/js/cpp-p5b4vean.js +1 -0
- package/dist/client/static/js/css-9jzbvdyz.js +1 -0
- package/dist/client/static/js/css-sn00sq6v.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-jbc50ks8.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-dmmgmv99.js → cynefinDiagram-VND7K2PF-f73w6zzz.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-ygkkms1t.js → dagre-6A5THRUB-a5vgvjsg.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-qxj0pqb4.js → diagram-22UHCM2B-6y9efamp.js} +12 -12
- package/dist/client/static/js/{diagram-3UASUU5V-77k8w5dt.js → diagram-3UASUU5V-2mycy7xm.js} +2 -2
- package/dist/client/static/js/{diagram-ATOU4E4O-m0h86vf4.js → diagram-ATOU4E4O-10zgjb66.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-5v28kaeg.js → diagram-CDSNMT55-bewa52yf.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-zgcg9gaz.js → diagram-MLGK6HIB-mh3b7gd3.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-10c9s6e6.js → diagram-MPIPVDR6-gvdrbdm5.js} +2 -2
- package/dist/client/static/js/{dockerfile-dr9sdsqp.js → dockerfile-6bn19kg0.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-mz4022dz.js → ebnfDiagram-ZINNZB2B-2prre93c.js} +1 -1
- package/dist/client/static/js/{elixir-3dy25ex8.js → elixir-fyxw6d70.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-ccerbsag.js → elk-276RUBZZ-9t6t9kc6.js} +2 -2
- package/dist/client/static/js/{erDiagram-OPXOYQCR-a8vjyrrw.js → erDiagram-OPXOYQCR-etcggr5n.js} +6 -6
- package/dist/client/static/js/{erlang-v7344938.js → erlang-97ayje6m.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-b37ey01t.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-7c2ncsw7.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-sz1g29fp.js → ganttDiagram-FUAMR5RP-cdc4mwhs.js} +3 -3
- package/dist/client/static/js/gitGraph-4MIJSDKK-mvqq7tcs.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-efqk42q0.js → gitGraphDiagram-X574FWY7-55d0fa7x.js} +8 -8
- package/dist/client/static/js/graphql-xzykn0ba.js +1 -0
- package/dist/client/static/js/html-2zc3shky.js +1 -0
- package/dist/client/static/js/{index-mpyd7qxj.js → index-10vzyga1.js} +2 -2
- package/dist/client/static/js/{index-2f6psebk.js → index-27gwghmp.js} +2 -2
- package/dist/client/static/js/{index-t71k3b28.js → index-2f6afhze.js} +2 -2
- package/dist/client/static/js/{index-tnxp90ac.js → index-3akjcs82.js} +1 -1
- package/dist/client/static/js/{index-fhtnvqgf.js → index-3j2he86h.js} +2 -2
- package/dist/client/static/js/index-461ga40v.js +2 -0
- package/dist/client/static/js/{index-9qf2h9jb.js → index-51rbgeh9.js} +12 -12
- package/dist/client/static/js/{index-zh550byg.js → index-537m8a3x.js} +2 -2
- package/dist/client/static/js/{index-tdg7hz80.js → index-58z2hatp.js} +2 -2
- package/dist/client/static/js/{index-4tbdws4r.js → index-5e4e18tg.js} +2 -2
- package/dist/client/static/js/{index-xfyxmaj1.js → index-60cxxnpk.js} +62 -62
- package/dist/client/static/js/{index-th61y26d.js → index-69mnn71v.js} +2 -2
- package/dist/client/static/js/{index-8aqjj2x2.js → index-6bsez5n6.js} +1 -1
- package/dist/client/static/js/{index-gaa39w5q.js → index-8tzt0dek.js} +2 -2
- package/dist/client/static/js/{index-vb5a3g01.js → index-8z9aqgf3.js} +4 -4
- package/dist/client/static/js/{index-ewryzs4g.js → index-92h38pwg.js} +2 -2
- package/dist/client/static/js/{index-7ma44af3.js → index-9rvjegmy.js} +3 -3
- package/dist/client/static/js/{index-q0k1am0g.js → index-a3bpmw2r.js} +2 -2
- package/dist/client/static/js/{index-j863hg0d.js → index-a5ecn5yx.js} +6 -6
- package/dist/client/static/js/{index-6ey6y9em.js → index-ax8gaayq.js} +2 -2
- package/dist/client/static/js/{index-e42ys2q3.js → index-c253x7vt.js} +7 -7
- package/dist/client/static/js/{index-y0f3wbc3.js → index-d9sfavx1.js} +2 -2
- package/dist/client/static/js/{index-5tp3emtg.js → index-db6s66jr.js} +2 -2
- package/dist/client/static/js/index-eggbcdwx.js +481 -0
- package/dist/client/static/js/{index-ts8rhd06.js → index-f13ern5e.js} +1 -1
- package/dist/client/static/js/{index-ver116ed.js → index-f6t91mpp.js} +1 -1
- package/dist/client/static/js/{index-tc07gd33.js → index-fr91ghwb.js} +2 -2
- package/dist/client/static/js/{index-tq3t3qm4.js → index-fsa18ns9.js} +2 -2
- package/dist/client/static/js/{index-k56patms.js → index-fyt8m8ah.js} +2 -2
- package/dist/client/static/js/{index-gw4c5n3a.js → index-gcad7b6g.js} +2 -2
- package/dist/client/static/js/{index-rxt8sf9a.js → index-h1xbx74w.js} +2 -2
- package/dist/client/static/js/{index-q5q8a3qn.js → index-j1ksa4x2.js} +2 -2
- package/dist/client/static/js/{index-sxag9ptg.js → index-jct0jryd.js} +2 -2
- package/dist/client/static/js/{index-r1wrke3j.js → index-jpvng27a.js} +1 -1
- package/dist/client/static/js/{index-w5j1wgcz.js → index-me0b6wkw.js} +1 -1
- package/dist/client/static/js/{index-6x0kn8pb.js → index-mhrkjbjq.js} +2 -2
- package/dist/client/static/js/{index-nzq51nbb.js → index-mngpcca7.js} +5 -5
- package/dist/client/static/js/index-mttx9327.css +1 -0
- package/dist/client/static/js/{index-ssepzdaz.js → index-mx5y9vt9.js} +7 -7
- package/dist/client/static/js/{index-3ymw778n.js → index-ndqtff48.js} +2 -2
- package/dist/client/static/js/{index-wnk9k57k.js → index-nf4hq5tg.js} +55 -55
- package/dist/client/static/js/{index-f31c6jg8.js → index-njhrm5qa.js} +10 -10
- package/dist/client/static/js/index-nnwcbp2d.js +2 -0
- package/dist/client/static/js/{index-3p732mvs.js → index-np2rfq06.js} +2 -2
- package/dist/client/static/js/{index-kc5yt2cd.js → index-nwbr15b3.js} +2 -2
- package/dist/client/static/js/{index-2a0b9ya2.js → index-pa70qj4p.js} +1 -1
- package/dist/client/static/js/index-pe5f2gmn.js +1 -0
- package/dist/client/static/js/{index-qbqm3c91.js → index-pgy7ree5.js} +5 -5
- package/dist/client/static/js/index-pzwf6hwe.js +4 -0
- package/dist/client/static/js/{index-jnxmvxb8.js → index-q3k8r0ms.js} +11 -11
- package/dist/client/static/js/{index-qkcmspxq.js → index-rw84kefb.js} +2 -2
- package/dist/client/static/js/{index-gqsnyh8k.js → index-s9ts6qbj.js} +2 -2
- package/dist/client/static/js/{index-dqf0srrp.js → index-sg65xdey.js} +2 -2
- package/dist/client/static/js/{index-mkp3gwag.js → index-skvfxcd8.js} +1 -1
- package/dist/client/static/js/{index-6qqsy78z.js → index-sx2yz2wx.js} +1 -1
- package/dist/client/static/js/{index-6ac860yz.js → index-trq7bdvk.js} +2 -2
- package/dist/client/static/js/{index-v8xhgfeq.js → index-vs2y8gxr.js} +2 -2
- package/dist/client/static/js/index-wwyjzhgs.js +2 -0
- package/dist/client/static/js/{index-7s4dge1z.js → index-xe447cw3.js} +1 -1
- package/dist/client/static/js/index-y09de44h.js +2 -0
- package/dist/client/static/js/{index-jxsha63v.js → index-y4cx8cqf.js} +2 -2
- package/dist/client/static/js/{index-bkwax812.js → index-yg38s8t3.js} +1 -1
- package/dist/client/static/js/{index-dz18nn65.js → index-yh7gngsh.js} +2 -2
- package/dist/client/static/js/{index-3m1dksmy.js → index-yrwm437g.js} +2 -2
- package/dist/client/static/js/{index-7ynf3s2w.js → index-z82nd2bd.js} +2 -2
- package/dist/client/static/js/info-A6RAGUB7-zkv4crz7.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-rykcacj5.js → infoDiagram-VRGFBTTK-9xph6cr5.js} +2 -2
- package/dist/client/static/js/ini-62r3vxaf.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-rj752kd8.js → ishikawaDiagram-OU5B5YK6-3gshs3v8.js} +2 -2
- package/dist/client/static/js/java-kacycary.js +1 -0
- package/dist/client/static/js/javascript-zc1qnyyp.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-mtetwn6f.js → journeyDiagram-ZHPQQLJL-fa8x56mf.js} +3 -3
- package/dist/client/static/js/json-yrwpn6bd.js +1 -0
- package/dist/client/static/js/jsx-b40ag8q1.js +1 -0
- package/dist/client/static/js/{julia-mxe3pnz3.js → julia-agc5kfvg.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-4h5pw5mm.js → kanban-definition-PNTS6WVX-fybp2hh4.js} +5 -5
- package/dist/client/static/js/lua-bk961f37.js +1 -0
- package/dist/client/static/js/markdown-b7rgzgd6.js +1 -0
- package/dist/client/static/js/mermaid.core-jjh5ggp0.js +12 -0
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-67s4xy7h.js → mindmap-definition-NLK3R4M7-gtfbg619.js} +5 -5
- package/dist/client/static/js/one-dark-pro-vht9rv39.js +1 -0
- package/dist/client/static/js/one-light-arxc5whh.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-dgpge627.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-qykb6ssk.js → pegDiagram-GJSIUBJH-1a51sbqv.js} +1 -1
- package/dist/client/static/js/{perl-a8eeaqkn.js → perl-v5vbtzgf.js} +1 -1
- package/dist/client/static/js/{php-6gq92zt8.js → php-83qwy98t.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-b8pgsqrd.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-mymrrvck.js → pieDiagram-5QR66LMP-zd9svyyn.js} +3 -3
- package/dist/client/static/js/properties-k8gbzggp.js +1 -0
- package/dist/client/static/js/python-343tspad.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-6f8ahd40.js → quadrantDiagram-O4NWA36T-5gtw2m6s.js} +3 -3
- package/dist/client/static/js/r-ycdwmv8g.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-fmfe5y27.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-b5tks4ce.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-0sf4m0ze.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-pjfy3pt7.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-nr8ngt42.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-c3habpvw.js → railroadDiagram-XR7U4H2S-3ccwpfzz.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-nysqy6te.js → requirementDiagram-PLB6GJNP-sasndrrp.js} +4 -4
- package/dist/client/static/js/{ruby-mc826p2e.js → ruby-994n5j6e.js} +1 -1
- package/dist/client/static/js/{rust-m4f4vpvn.js → rust-n9z2c9m3.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-s5dtfp3z.js → sankeyDiagram-IPEJSGJF-2ahb4sda.js} +3 -3
- package/dist/client/static/js/{sass-8bq5r2tz.js → sass-p6g7qdv2.js} +1 -1
- package/dist/client/static/js/{scss-9wz47c6t.js → scss-4j4t3r6y.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-bb3yp049.js → sequenceDiagram-PO4LG4MO-bfj90kz1.js} +7 -7
- package/dist/client/static/js/{sizeCapture-INFHLROL-0m2msee7.js → sizeCapture-INFHLROL-5tygxmtc.js} +1 -1
- package/dist/client/static/js/sql-kwpd5w07.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-cd0qgj6t.js → stateDiagram-v2-GCMORJYK-533xw76e.js} +3 -3
- package/dist/client/static/js/{svelte-5vrwkc13.js → svelte-bek3h1sz.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-rpb01f7p.js → swimlanes-2SLR337P-gd3d04pk.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-xxmvdyg4.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-tqw2e6y1.js → timeline-definition-EJHVYXUP-fvqvgqvg.js} +3 -3
- package/dist/client/static/js/treeView-Q6P3EWNA-23r9fa68.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-mxxzdrj6.js +1 -0
- package/dist/client/static/js/tsx-gjxfjnbk.js +1 -0
- package/dist/client/static/js/typescript-4dchbnya.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-dhf4d5xg.js → usecaseDiagram-POWQR4AR-tm1f0m4x.js} +25 -25
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-ztkk79dv.js → vennDiagram-UO4OBE2U-2vdvv1hd.js} +4 -4
- package/dist/client/static/js/{vue-gmjnxjm3.js → vue-y44m889c.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-cbqtax1x.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-ahre5tmv.js → wardleyDiagram-VNRHLVJA-7avcjznx.js} +4 -4
- package/dist/client/static/js/xml-xs6qz3ya.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-vak2c50n.js → xychartDiagram-PMCCYNJV-g39y526n.js} +4 -4
- package/dist/client/static/js/yaml-174nk5bn.js +1 -0
- package/package.json +7 -7
- package/src/client/borders.css +15 -3
- package/src/client/components/common/ComposerTextarea.test.tsx +13 -1
- package/src/client/components/common/ComposerTextarea.tsx +8 -2
- package/src/client/components/common/MarkdownRenderer.tsx +11 -2
- package/src/client/components/common/anchored-menu/index.tsx +11 -4
- package/src/client/components/common/harness-glyph/harness-glyph.test.ts +0 -4
- package/src/client/components/common/harness-glyph/index.tsx +4 -5
- package/src/client/components/common/markdown-inline-file.test.tsx +90 -15
- package/src/client/components/common/session-actions-menu/index.test.tsx +45 -0
- package/src/client/components/common/session-actions-menu/index.tsx +6 -1
- package/src/client/components/common/session-row/TrailingSlot.tsx +6 -2
- package/src/client/components/common/session-row/index.tsx +32 -16
- package/src/client/components/common/session-row/session-row.test.tsx +56 -18
- package/src/client/components/layout/desktop-layout/RightColumn.tsx +4 -1
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +28 -35
- package/src/client/components/layout/desktop-layout/index.tsx +5 -3
- package/src/client/components/layout/desktop-layout/resizer/index.tsx +13 -3
- package/src/client/components/layout/desktop-layout/resizer/panel.test.ts +41 -0
- package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +21 -1
- package/src/client/components/layout/session-sidebar/CategoryHeader.worktree.test.tsx +1 -0
- package/src/client/components/layout/session-sidebar/CategoryItem.tsx +8 -2
- package/src/client/components/layout/session-sidebar/ClassicView.tsx +2 -0
- package/src/client/components/layout/session-sidebar/SessionList.tsx +4 -0
- package/src/client/components/layout/session-sidebar/SessionsView.tsx +22 -1
- package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +46 -8
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +9 -3
- package/src/client/components/layout/session-sidebar/modern/index.tsx +2 -0
- package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +36 -0
- package/src/client/components/layout/session-sidebar/search-results.test.tsx +29 -16
- package/src/client/components/layout/session-sidebar/session-list-states.test.tsx +1 -0
- package/src/client/components/layout/session-sidebar/variant-props.ts +2 -0
- package/src/client/components/mobile/LayoutWrapper.tsx +9 -0
- package/src/client/components/mobile/SessionSidebar.tsx +4 -0
- package/src/client/components/mobile/left-drawer-nav.test.tsx +1 -1
- package/src/client/components/mobile/mobile-session-sidebar/Body.tsx +4 -0
- package/src/client/components/mobile/mobile-session-sidebar/ClassicDrawer.tsx +3 -0
- package/src/client/components/mobile/mobile-session-sidebar/Item.test.tsx +85 -0
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +30 -14
- package/src/client/components/mobile/mobile-session-sidebar/List.tsx +4 -0
- package/src/client/components/settings/apply-side-effects.test.ts +31 -0
- package/src/client/components/settings/apply-side-effects.ts +7 -0
- package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.tsx +3 -2
- package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.test.tsx +95 -0
- package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.tsx +35 -0
- package/src/client/components/workspace/chat-timeline/ChatOverlays.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/MessageItem.gutter.test.ts +26 -0
- package/src/client/components/workspace/chat-timeline/MessageItem.tsx +6 -3
- package/src/client/components/workspace/chat-timeline/NewChatModal.tsx +5 -0
- package/src/client/components/workspace/chat-timeline/OrchestrationNotice.tsx +81 -162
- package/src/client/components/workspace/chat-timeline/SystemNotice.tsx +7 -3
- package/src/client/components/workspace/chat-timeline/ThinkingSection.test.tsx +17 -0
- package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +21 -7
- package/src/client/components/workspace/chat-timeline/ToolCallingSection.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/UserTurn.test.tsx +24 -6
- package/src/client/components/workspace/chat-timeline/UserTurn.tsx +17 -4
- package/src/client/components/workspace/chat-timeline/block-chrome.test.tsx +16 -0
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +104 -11
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +120 -43
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +28 -21
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.wait.test.tsx +48 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +47 -22
- package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.test.ts +24 -0
- package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.tsx +44 -18
- package/src/client/components/workspace/chat-timeline/chat-input/GoalSurfaces.tsx +2 -1
- package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.test.ts +35 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.tsx +33 -12
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.test.tsx +26 -2
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +67 -37
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +86 -1
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +90 -135
- package/src/client/components/workspace/chat-timeline/chat-input/VoiceButton.tsx +58 -0
- package/src/client/components/workspace/chat-timeline/chat-input/access-capability.test.tsx +151 -0
- package/src/client/components/workspace/chat-timeline/chat-input/action-base.ts +42 -0
- package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/chat-input/mode-icons.test.ts +108 -0
- package/src/client/components/workspace/chat-timeline/chat-input/mode-icons.tsx +122 -0
- package/src/client/components/workspace/chat-timeline/chat-input/modes-props.ts +5 -0
- package/src/client/components/workspace/chat-timeline/chat-input/narrow.test.tsx +78 -20
- package/src/client/components/workspace/chat-timeline/chat-input/styles/index.tsx +11 -5
- package/src/client/components/workspace/chat-timeline/chat-input/styles.test.tsx +19 -0
- package/src/client/components/workspace/chat-timeline/composer-dock-frame.test.tsx +9 -0
- package/src/client/components/workspace/chat-timeline/fork-preview.test.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/index.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/target-picker/ParentSessionPicker.test.tsx +21 -5
- package/src/client/components/workspace/chat-timeline/target-picker/ParentSessionPicker.tsx +100 -71
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.test.tsx +9 -9
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +83 -66
- package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.test.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.tsx +36 -15
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OptionRow.test.tsx +125 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OptionRow.tsx +84 -27
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Mcp.test.tsx +18 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Mcp.tsx +14 -5
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ArtifactChip.tsx +7 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolRowActions.tsx +10 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Card.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Compact.tsx +11 -6
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Minimal.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Trace.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.test.tsx +5 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.tsx +19 -12
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/parity.test.tsx +50 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/props.ts +2 -0
- package/src/client/components/workspace/model-dropdown/HarnessTabs.tsx +31 -10
- package/src/client/components/workspace/model-dropdown/Header.tsx +13 -5
- package/src/client/components/workspace/model-dropdown/Panel.tsx +18 -0
- package/src/client/components/workspace/model-dropdown/ThinkingLevels.tsx +51 -0
- package/src/client/components/workspace/model-dropdown/Trigger.tsx +99 -0
- package/src/client/components/workspace/model-dropdown/bands.ts +51 -0
- package/src/client/components/workspace/model-dropdown/harness-tabs.test.tsx +21 -5
- package/src/client/components/workspace/model-dropdown/index.tsx +20 -47
- package/src/client/components/workspace/model-dropdown/thinking-levels.test.tsx +108 -0
- package/src/client/components/workspace/model-dropdown/trigger.test.ts +54 -8
- package/src/client/hooks/chat/composer/attachments.test.ts +12 -0
- package/src/client/hooks/chat/composer/attachments.ts +16 -4
- package/src/client/hooks/chat/composer/pipeline.test.ts +14 -0
- package/src/client/hooks/chat/composer/pipeline.ts +15 -6
- package/src/client/hooks/chat/omp/session-list.activity.test.ts +20 -0
- package/src/client/hooks/chat/omp/session-merges.ts +18 -6
- package/src/client/hooks/chat/omp/session-sidebar-controller.ts +4 -0
- package/src/client/hooks/chat/timeline/access-ladder-wiring.test.ts +111 -0
- package/src/client/hooks/chat/timeline/access-ladder.test.ts +66 -0
- package/src/client/hooks/chat/timeline/access-ladder.ts +72 -0
- package/src/client/hooks/chat/timeline/access-mode.ts +11 -1
- package/src/client/hooks/chat/timeline/index.ts +4 -5
- package/src/client/hooks/chat/timeline/modes-contract.ts +10 -1
- package/src/client/hooks/chat/timeline/modes.ts +10 -2
- package/src/client/hooks/chat/timeline/scope.test.ts +17 -0
- package/src/client/hooks/chat/timeline/scope.ts +6 -1
- package/src/client/hooks/chat/timeline/send-refusal.test.ts +19 -0
- package/src/client/hooks/chat/timeline/send-steer.test.ts +17 -0
- package/src/client/hooks/chat/timeline/send.ts +17 -0
- package/src/client/hooks/editor/quick-open.ts +41 -0
- package/src/client/hooks/ui/border-style.test.ts +13 -0
- package/src/client/hooks/ui/markdown-render.ts +11 -6
- package/src/client/hooks/ui/open-inline-file.test.ts +16 -0
- package/src/client/hooks/ui/open-inline-file.ts +4 -2
- package/src/client/hooks/ui/show-more.ts +11 -1
- package/src/client/hooks/ui/ui-feedback.test.ts +11 -0
- package/src/client/hooks/ui/verified-inline-files.test.tsx +143 -0
- package/src/client/hooks/ui/verified-inline-files.ts +165 -0
- package/src/client/hooks/workspace/mobile-workspace-panels.test.tsx +116 -0
- package/src/client/hooks/workspace/mobile-workspace-panels.ts +73 -0
- package/src/client/hooks/workspace/panel-resize.test.ts +127 -0
- package/src/client/hooks/workspace/panel-resize.ts +81 -0
- package/src/client/hooks/workspace/session-list-limit.test.ts +80 -0
- package/src/client/hooks/workspace/session-list-limit.ts +69 -0
- package/src/client/hooks/workspace/session-pin.ts +58 -0
- package/src/client/hooks/workspace/workspace-panels-mode.test.tsx +87 -0
- package/src/client/hooks/workspace/workspace-panels-mode.ts +76 -0
- package/src/client/lib/router/branch-params.test.ts +17 -1
- package/src/client/lib/router/branch-params.ts +18 -0
- package/src/client/lib/ui/pressed.ts +15 -0
- package/src/client/tailwind.css +30 -10
- package/src/server/lib/connect/cloudflared.lifecycle.test.ts +25 -9
- package/src/server/lib/db/schema.test.ts +1 -1
- package/src/server/lib/db/schema.ts +17 -0
- package/src/server/lib/harness/activity.server.test.ts +81 -0
- package/src/server/lib/harness/activity.server.ts +55 -0
- package/src/server/lib/harness/spawn.server.ts +9 -0
- package/src/server/lib/omp/session/delete.server.ts +4 -2
- package/src/server/lib/omp/session/sidebar-activity.server.test.ts +24 -2
- package/src/server/lib/omp/session/sidebar-data.canonical.test.ts +14 -0
- package/src/server/lib/realtime/topics/session-data.server.ts +6 -5
- package/src/server/lib/realtime/topics/session-data.test.ts +35 -0
- package/src/server/lib/sessions/last-opened.server.test.ts +17 -0
- package/src/server/lib/sessions/last-opened.server.ts +18 -1
- package/src/server/routes/sessions/index.ts +3 -2
- package/src/server/routes/sessions/routes.test.ts +29 -46
- package/src/server/routes/sessions/session.ts +40 -62
- package/src/server/routes/sessions/state.test.ts +89 -0
- package/src/server/routes/sessions/state.ts +86 -0
- package/src/shared/lib/chat/attachment-budget.test.ts +74 -0
- package/src/shared/lib/chat/attachment-budget.ts +111 -0
- package/src/shared/lib/chat/attachments.test.ts +0 -17
- package/src/shared/lib/chat/attachments.ts +0 -53
- package/src/shared/lib/chat/orchestration/outcome-markdown.test.ts +57 -0
- package/src/shared/lib/chat/orchestration/outcome-markdown.ts +74 -0
- package/src/shared/lib/chat/timeline/block-chrome.test.ts +35 -0
- package/src/shared/lib/chat/timeline/block-chrome.ts +21 -0
- package/src/shared/lib/markdown/degenerate-emphasis.test.ts +64 -0
- package/src/shared/lib/markdown/degenerate-emphasis.ts +90 -0
- package/src/shared/lib/markdown/inline-file.test.ts +79 -22
- package/src/shared/lib/markdown/inline-file.ts +57 -25
- package/src/shared/lib/markdown/marked.ts +5 -1
- package/src/shared/lib/settings/defaults.ts +2 -0
- package/src/shared/lib/theme/border-style.ts +1 -1
- package/src/shared/lib/workspace/active-project.test.ts +17 -1
- package/src/shared/lib/workspace/active-project.ts +9 -0
- package/src/shared/lib/workspace/project-settings-delete.test.ts +97 -0
- package/src/shared/lib/workspace/project-settings.test.ts +2 -34
- package/src/shared/lib/workspace/project-settings.ts +6 -0
- package/src/shared/lib/workspace/session-list-limit.test.ts +31 -0
- package/src/shared/lib/workspace/session-list-limit.ts +32 -0
- package/src/shared/lib/workspace/sidebar-sort.test.ts +21 -0
- package/src/shared/lib/workspace/workspace-panel-widths.ts +1 -1
- package/src/shared/lib/workspace/workspace-session.test.ts +34 -0
- package/src/shared/lib/workspace/workspace-session.ts +40 -0
- package/src/shared/types/settings/state.ts +10 -0
- package/dist/client/static/js/ImageView-sz4fzz9k.js +0 -1
- package/dist/client/static/js/LayoutWrapper-q6q4h04a.js +0 -2
- package/dist/client/static/js/MergeDiffView-b8f013ws.js +0 -1
- package/dist/client/static/js/Modal-ahecatp5.js +0 -60
- package/dist/client/static/js/SessionsView-jwp8xvw5.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-dc7zys46.js +0 -1
- package/dist/client/static/js/bash-n5d0esqg.js +0 -1
- package/dist/client/static/js/c-pk766wx0.js +0 -1
- package/dist/client/static/js/cpp-3pt91jvm.js +0 -1
- package/dist/client/static/js/css-9gak6bze.js +0 -1
- package/dist/client/static/js/css-sp1cgdbr.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-9fx59e89.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-61d2ee91.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-104ywb7w.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-zkb30q0t.js +0 -1
- package/dist/client/static/js/graphql-2ntm7jyh.js +0 -1
- package/dist/client/static/js/html-mt2yb43b.js +0 -1
- package/dist/client/static/js/index-6h46r2de.js +0 -1
- package/dist/client/static/js/index-f44k9k8d.css +0 -1
- package/dist/client/static/js/index-k1576e2m.js +0 -2
- package/dist/client/static/js/index-k4qshngy.js +0 -4
- package/dist/client/static/js/index-rr79n77k.js +0 -470
- package/dist/client/static/js/index-vf01q99d.js +0 -2
- package/dist/client/static/js/index-x7h04xzf.js +0 -2
- package/dist/client/static/js/index-xygk0v3e.js +0 -2
- package/dist/client/static/js/info-A6RAGUB7-xxvyt8p8.js +0 -1
- package/dist/client/static/js/ini-bdk46a3d.js +0 -1
- package/dist/client/static/js/java-3g3925cf.js +0 -1
- package/dist/client/static/js/javascript-0mqgcvps.js +0 -1
- package/dist/client/static/js/json-hdyzmffz.js +0 -1
- package/dist/client/static/js/jsx-y8r9mrdq.js +0 -1
- package/dist/client/static/js/lua-wf5k6p3r.js +0 -1
- package/dist/client/static/js/markdown-9bf16dx7.js +0 -1
- package/dist/client/static/js/mermaid.core-bs542jma.js +0 -12
- package/dist/client/static/js/one-dark-pro-541ed4b7.js +0 -1
- package/dist/client/static/js/one-light-nr79mykt.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-cm8jeesg.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-8b9xgcxv.js +0 -1
- package/dist/client/static/js/properties-xk4dn00p.js +0 -1
- package/dist/client/static/js/python-7sgz05n4.js +0 -1
- package/dist/client/static/js/r-w4qxm0pv.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-fxr2x2mf.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-5qd45xk1.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-6fa00vpk.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-pcbtg7tj.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-r0fdhdtp.js +0 -1
- package/dist/client/static/js/sql-sd00wgem.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-zx36y2c8.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-9sn2h4ea.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-9fzms0pq.js +0 -1
- package/dist/client/static/js/tsx-h5yzg80q.js +0 -1
- package/dist/client/static/js/typescript-qy1sbhea.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-vy6rp5gp.js +0 -1
- package/dist/client/static/js/xml-mrk4xakv.js +0 -1
- package/dist/client/static/js/yaml-xaza6dra.js +0 -1
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +0 -67
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { WorkspaceFolderData } from '@/shared/types';
|
|
2
|
+
import { workspaceFolderIdFromSessionId } from '@/shared/lib/workspace/workspace-session';
|
|
2
3
|
|
|
3
4
|
export interface ActiveProjectScope {
|
|
4
5
|
folder: WorkspaceFolderData | null;
|
|
@@ -16,6 +17,14 @@ export function activeProjectForSession(
|
|
|
16
17
|
sessionId: string | number | null | undefined
|
|
17
18
|
): ActiveProjectScope {
|
|
18
19
|
if (!sessionId) return { folder: null, projectPath: null };
|
|
20
|
+
// A workspace session has no row in `sessions`: its folder is NAMED by the id,
|
|
21
|
+
// which is also what lets a cold restore resolve the context without a
|
|
22
|
+
// `?folderId=` param.
|
|
23
|
+
const workspaceFolderId = workspaceFolderIdFromSessionId(String(sessionId));
|
|
24
|
+
if (workspaceFolderId !== null) {
|
|
25
|
+
const folder = folders.find((entry) => String(entry.id) === workspaceFolderId) ?? null;
|
|
26
|
+
return { folder, projectPath: folder?.project_path ?? null };
|
|
27
|
+
}
|
|
19
28
|
for (const folder of folders) {
|
|
20
29
|
const ownsSession = (folder.sessions || []).some((s) => String(s.id) === String(sessionId));
|
|
21
30
|
if (ownsSession) return { folder, projectPath: folder.project_path ?? null };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Deleting a workspace folder: its sessions and files go, its project path is
|
|
8
|
+
* tombstoned, and the folder's own workspace session state (panels, last
|
|
9
|
+
* opened) goes with it. That last part is not a `sessions` row, so it has to
|
|
10
|
+
* be deleted explicitly or a reused id inherits the old folder's panels.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { afterAll, beforeAll, describe, expect, test } from 'bun:test';
|
|
14
|
+
import { mkdtempSync } from 'node:fs';
|
|
15
|
+
import * as os from 'node:os';
|
|
16
|
+
import * as path from 'node:path';
|
|
17
|
+
|
|
18
|
+
import { createDb, type DbClient } from '@kabmo-labs/kabmo-db/client';
|
|
19
|
+
import { deleteWorkspaceFolder } from '@/shared/lib/workspace/project-settings';
|
|
20
|
+
import { workspaceSessionId } from '@/shared/lib/workspace/workspace-session';
|
|
21
|
+
import { removeDir } from '@/test-support/remove-dir';
|
|
22
|
+
|
|
23
|
+
const SCHEMA = `
|
|
24
|
+
CREATE TABLE workspace_folders (
|
|
25
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
26
|
+
name TEXT NOT NULL,
|
|
27
|
+
project_path TEXT
|
|
28
|
+
);
|
|
29
|
+
CREATE TABLE sessions (id TEXT PRIMARY KEY, folder_id INTEGER);
|
|
30
|
+
CREATE TABLE files (id TEXT PRIMARY KEY, session_id TEXT);
|
|
31
|
+
CREATE TABLE deleted_workspaces (project_path TEXT PRIMARY KEY);
|
|
32
|
+
CREATE TABLE workspace_ui_state (workspace_id TEXT PRIMARY KEY, state TEXT NOT NULL DEFAULT '{}', updated_at DATETIME);
|
|
33
|
+
CREATE TABLE last_opened_sessions (client_id TEXT PRIMARY KEY, session_id TEXT NOT NULL, updated_at DATETIME);
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
let workRoot = '';
|
|
37
|
+
let dbCounter = 0;
|
|
38
|
+
const opened: DbClient[] = [];
|
|
39
|
+
|
|
40
|
+
beforeAll(() => {
|
|
41
|
+
workRoot = mkdtempSync(path.join(os.tmpdir(), 'omp-project-delete-'));
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
afterAll(() => {
|
|
45
|
+
for (const db of opened.splice(0)) db.raw.close();
|
|
46
|
+
removeDir(workRoot);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
async function freshDb(): Promise<DbClient> {
|
|
50
|
+
const db = createDb(path.join(workRoot, `db-${dbCounter++}.sqlite`));
|
|
51
|
+
opened.push(db);
|
|
52
|
+
await db.exec(SCHEMA);
|
|
53
|
+
return db;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async function insertFolder(db: DbClient, name: string, projectPath: string | null): Promise<number> {
|
|
57
|
+
const result = await db.run('INSERT INTO workspace_folders (name, project_path) VALUES (?, ?)', [name, projectPath]);
|
|
58
|
+
return result.lastID;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
describe('deleteWorkspaceFolder', () => {
|
|
62
|
+
test('returns false for an unknown folder', async () => {
|
|
63
|
+
const db = await freshDb();
|
|
64
|
+
expect(await deleteWorkspaceFolder(db, '404')).toBe(false);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
test('tombstones the project path and cascades sessions, files and workspace state', async () => {
|
|
68
|
+
const db = await freshDb();
|
|
69
|
+
const id = await insertFolder(db, 'doomed', '/work/doomed');
|
|
70
|
+
const other = await insertFolder(db, 'safe', '/work/safe');
|
|
71
|
+
const workspaceId = workspaceSessionId(id);
|
|
72
|
+
await db.run('INSERT INTO sessions (id, folder_id) VALUES (?, ?)', ['s1', id]);
|
|
73
|
+
await db.run('INSERT INTO sessions (id, folder_id) VALUES (?, ?)', ['s2', other]);
|
|
74
|
+
await db.run('INSERT INTO files (id, session_id) VALUES (?, ?)', ['f1', 's1']);
|
|
75
|
+
await db.run('INSERT INTO files (id, session_id) VALUES (?, ?)', ['f2', 's2']);
|
|
76
|
+
await db.run('INSERT INTO workspace_ui_state (workspace_id, state) VALUES (?, ?)', [workspaceId, '{"layout":{}}']);
|
|
77
|
+
await db.run('INSERT INTO last_opened_sessions (client_id, session_id) VALUES (?, ?)', ['c1', workspaceId]);
|
|
78
|
+
|
|
79
|
+
expect(await deleteWorkspaceFolder(db, String(id))).toBe(true);
|
|
80
|
+
expect(await db.get('SELECT * FROM workspace_ui_state WHERE workspace_id = ?', [workspaceId])).toBeNull();
|
|
81
|
+
expect(await db.get('SELECT * FROM last_opened_sessions WHERE session_id = ?', [workspaceId])).toBeNull();
|
|
82
|
+
expect(await db.get('SELECT * FROM workspace_folders WHERE id = ?', [id])).toBeNull();
|
|
83
|
+
expect(await db.get('SELECT * FROM sessions WHERE id = ?', ['s1'])).toBeNull();
|
|
84
|
+
expect(await db.get('SELECT * FROM files WHERE id = ?', ['f1'])).toBeNull();
|
|
85
|
+
expect(await db.get('SELECT * FROM sessions WHERE id = ?', ['s2'])).toBeTruthy();
|
|
86
|
+
expect(await db.get('SELECT * FROM files WHERE id = ?', ['f2'])).toBeTruthy();
|
|
87
|
+
const tombstone = await db.get<{ project_path: string }>('SELECT project_path FROM deleted_workspaces');
|
|
88
|
+
expect(tombstone?.project_path).toBe('/work/doomed');
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
test('a folder without a project path is deleted without a tombstone', async () => {
|
|
92
|
+
const db = await freshDb();
|
|
93
|
+
const id = await insertFolder(db, 'unbound', null);
|
|
94
|
+
expect(await deleteWorkspaceFolder(db, String(id))).toBe(true);
|
|
95
|
+
expect(await db.all('SELECT * FROM deleted_workspaces')).toEqual([]);
|
|
96
|
+
});
|
|
97
|
+
});
|
|
@@ -19,7 +19,6 @@ import * as path from 'node:path';
|
|
|
19
19
|
|
|
20
20
|
import { createDb, type DbClient } from '@kabmo-labs/kabmo-db/client';
|
|
21
21
|
import {
|
|
22
|
-
deleteWorkspaceFolder,
|
|
23
22
|
parseFolderSettingsPatch,
|
|
24
23
|
projectConfigFromFolder,
|
|
25
24
|
updateWorkspaceFolder,
|
|
@@ -43,6 +42,8 @@ const SCHEMA = `
|
|
|
43
42
|
CREATE TABLE sessions (id TEXT PRIMARY KEY, folder_id INTEGER);
|
|
44
43
|
CREATE TABLE files (id TEXT PRIMARY KEY, session_id TEXT);
|
|
45
44
|
CREATE TABLE deleted_workspaces (project_path TEXT PRIMARY KEY);
|
|
45
|
+
CREATE TABLE workspace_ui_state (workspace_id TEXT PRIMARY KEY, state TEXT NOT NULL DEFAULT '{}', updated_at DATETIME);
|
|
46
|
+
CREATE TABLE last_opened_sessions (client_id TEXT PRIMARY KEY, session_id TEXT NOT NULL, updated_at DATETIME);
|
|
46
47
|
CREATE TABLE app_settings (key TEXT PRIMARY KEY, value TEXT NOT NULL);
|
|
47
48
|
`;
|
|
48
49
|
|
|
@@ -218,39 +219,6 @@ describe('updateWorkspaceFolder', () => {
|
|
|
218
219
|
});
|
|
219
220
|
});
|
|
220
221
|
|
|
221
|
-
describe('deleteWorkspaceFolder', () => {
|
|
222
|
-
test('returns false for an unknown folder', async () => {
|
|
223
|
-
const db = await freshDb();
|
|
224
|
-
expect(await deleteWorkspaceFolder(db, '404')).toBe(false);
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
test('tombstones the project path and cascades sessions and files', async () => {
|
|
228
|
-
const db = await freshDb();
|
|
229
|
-
const id = await insertFolder(db, 'doomed', '/work/doomed');
|
|
230
|
-
const other = await insertFolder(db, 'safe', '/work/safe');
|
|
231
|
-
await db.run('INSERT INTO sessions (id, folder_id) VALUES (?, ?)', ['s1', id]);
|
|
232
|
-
await db.run('INSERT INTO sessions (id, folder_id) VALUES (?, ?)', ['s2', other]);
|
|
233
|
-
await db.run('INSERT INTO files (id, session_id) VALUES (?, ?)', ['f1', 's1']);
|
|
234
|
-
await db.run('INSERT INTO files (id, session_id) VALUES (?, ?)', ['f2', 's2']);
|
|
235
|
-
|
|
236
|
-
expect(await deleteWorkspaceFolder(db, String(id))).toBe(true);
|
|
237
|
-
expect(await folderRow(db, id)).toBeNull();
|
|
238
|
-
expect(await db.get('SELECT * FROM sessions WHERE id = ?', ['s1'])).toBeNull();
|
|
239
|
-
expect(await db.get('SELECT * FROM files WHERE id = ?', ['f1'])).toBeNull();
|
|
240
|
-
expect(await db.get('SELECT * FROM sessions WHERE id = ?', ['s2'])).toBeTruthy();
|
|
241
|
-
expect(await db.get('SELECT * FROM files WHERE id = ?', ['f2'])).toBeTruthy();
|
|
242
|
-
const tombstone = await db.get<{ project_path: string }>('SELECT project_path FROM deleted_workspaces');
|
|
243
|
-
expect(tombstone?.project_path).toBe('/work/doomed');
|
|
244
|
-
});
|
|
245
|
-
|
|
246
|
-
test('a folder without a project path is deleted without a tombstone', async () => {
|
|
247
|
-
const db = await freshDb();
|
|
248
|
-
const id = await insertFolder(db, 'unbound', null);
|
|
249
|
-
expect(await deleteWorkspaceFolder(db, String(id))).toBe(true);
|
|
250
|
-
expect(await db.all('SELECT * FROM deleted_workspaces')).toEqual([]);
|
|
251
|
-
});
|
|
252
|
-
});
|
|
253
|
-
|
|
254
222
|
describe('migrateLegacyProjectSettings', () => {
|
|
255
223
|
async function seedLegacy(db: DbClient, value: string): Promise<void> {
|
|
256
224
|
await db.run('INSERT OR REPLACE INTO app_settings (key, value) VALUES (?, ?)', ['omp_projects_config', value]);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DbClient } from '@kabmo-labs/kabmo-db/client';
|
|
2
2
|
import type { ProjectConfigItem } from '@/shared/types';
|
|
3
3
|
import { isRecord } from '@kabmo-labs/kabmo-guards';
|
|
4
|
+
import { workspaceSessionId } from '@/shared/lib/workspace/workspace-session';
|
|
4
5
|
|
|
5
6
|
export interface WorkspaceFolderRow {
|
|
6
7
|
id: number;
|
|
@@ -129,6 +130,11 @@ export async function deleteWorkspaceFolder(db: DbClient, folderId: string): Pro
|
|
|
129
130
|
);
|
|
130
131
|
}
|
|
131
132
|
|
|
133
|
+
// The folder's workspace session is not a `sessions` row, so its panel state
|
|
134
|
+
// and last-opened pointer are removed explicitly: leaving them makes a new
|
|
135
|
+
// folder that reuses the id inherit the old one's panels.
|
|
136
|
+
await db.run('DELETE FROM workspace_ui_state WHERE workspace_id = ?', [workspaceSessionId(folderId)]);
|
|
137
|
+
await db.run('DELETE FROM last_opened_sessions WHERE session_id = ?', [workspaceSessionId(folderId)]);
|
|
132
138
|
const sessionRows = await db.all('SELECT id FROM sessions WHERE folder_id = ?', [folderId]);
|
|
133
139
|
for (const session of sessionRows) {
|
|
134
140
|
await db.run('DELETE FROM files WHERE session_id = ?', [session.id]);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { describe, expect, test } from 'bun:test';
|
|
7
|
+
import {
|
|
8
|
+
DEFAULT_SESSION_LIST_LIMIT,
|
|
9
|
+
MAX_SESSION_LIST_LIMIT,
|
|
10
|
+
MIN_SESSION_LIST_LIMIT,
|
|
11
|
+
resolveSessionListLimit,
|
|
12
|
+
} from '@/shared/lib/workspace/session-list-limit';
|
|
13
|
+
|
|
14
|
+
describe('resolveSessionListLimit', () => {
|
|
15
|
+
test('falls back to the shipped count for an absent or hostile value', () => {
|
|
16
|
+
for (const value of [undefined, null, '20', Number.NaN, Number.POSITIVE_INFINITY]) {
|
|
17
|
+
expect(resolveSessionListLimit(value)).toBe(DEFAULT_SESSION_LIST_LIMIT);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
test('clamps a count onto the range the sidebar can draw', () => {
|
|
22
|
+
expect(resolveSessionListLimit(0)).toBe(MIN_SESSION_LIST_LIMIT);
|
|
23
|
+
expect(resolveSessionListLimit(-5)).toBe(MIN_SESSION_LIST_LIMIT);
|
|
24
|
+
expect(resolveSessionListLimit(MAX_SESSION_LIST_LIMIT + 1)).toBe(MAX_SESSION_LIST_LIMIT);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
test('keeps a valid count and rounds a fractional one', () => {
|
|
28
|
+
expect(resolveSessionListLimit(25)).toBe(25);
|
|
29
|
+
expect(resolveSessionListLimit(7.6)).toBe(8);
|
|
30
|
+
});
|
|
31
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* How many sessions one workspace lists before its reveal control.
|
|
8
|
+
*
|
|
9
|
+
* The list is windowed for height, so a workspace with hundreds of chats must
|
|
10
|
+
* not draw all of them on first paint. The window used to be a constant five;
|
|
11
|
+
* it is a preference now because the useful count depends on the display and on
|
|
12
|
+
* how the user reads the list. It is deliberately a COUNT only — which sessions
|
|
13
|
+
* fill the window is the sort's answer (`omp_sidebar_sort`), never a second
|
|
14
|
+
* choice on this control.
|
|
15
|
+
*
|
|
16
|
+
* Every read is clamped, so a value from a hand-edited row, another build, or
|
|
17
|
+
* an empty number field cannot make the list draw zero rows or a wall of them.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
export const DEFAULT_SESSION_LIST_LIMIT = 5;
|
|
21
|
+
|
|
22
|
+
export const MIN_SESSION_LIST_LIMIT = 1;
|
|
23
|
+
|
|
24
|
+
export const MAX_SESSION_LIST_LIMIT = 100;
|
|
25
|
+
|
|
26
|
+
/** A stored count within the range the sidebar can draw. */
|
|
27
|
+
export function resolveSessionListLimit(value: unknown): number {
|
|
28
|
+
if (typeof value !== 'number' || !Number.isFinite(value)) {
|
|
29
|
+
return DEFAULT_SESSION_LIST_LIMIT;
|
|
30
|
+
}
|
|
31
|
+
return Math.min(MAX_SESSION_LIST_LIMIT, Math.max(MIN_SESSION_LIST_LIMIT, Math.round(value)));
|
|
32
|
+
}
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
DEFAULT_SESSION_SORT_OPTION,
|
|
11
11
|
isValidSessionSortOption,
|
|
12
12
|
sortFolders,
|
|
13
|
+
sortSessionsPinnedFirst,
|
|
13
14
|
} from '@kabmo-labs/kabmo-workspace/sidebar/sidebar-sort';
|
|
14
15
|
import type { SessionItemData, SessionSortOption, WorkspaceFolderData } from '@/shared/types';
|
|
15
16
|
|
|
@@ -167,6 +168,26 @@ describe('sidebar-sort', () => {
|
|
|
167
168
|
});
|
|
168
169
|
});
|
|
169
170
|
|
|
171
|
+
describe('sortSessionsPinnedFirst', () => {
|
|
172
|
+
test('a pinned row leads rows with newer activity', () => {
|
|
173
|
+
const older = { ...makeSession('ses_old', undefined, '2024-01-01T00:00:00.000Z'), isPinned: true };
|
|
174
|
+
const newer = makeSession('ses_new', undefined, '2024-06-01T00:00:00.000Z');
|
|
175
|
+
const sorted = sortSessionsPinnedFirst([newer, older]);
|
|
176
|
+
expect(sorted.map((session) => session.id)).toEqual(['ses_old', 'ses_new']);
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
test('unpinned rows keep newest-activity order and the input is untouched', () => {
|
|
180
|
+
const sessions = [
|
|
181
|
+
makeSession('ses_old', undefined, '2024-01-01T00:00:00.000Z'),
|
|
182
|
+
makeSession('ses_new', undefined, '2024-06-01T00:00:00.000Z'),
|
|
183
|
+
];
|
|
184
|
+
const before = sessions.map((session) => session.id);
|
|
185
|
+
const sorted = sortSessionsPinnedFirst(sessions);
|
|
186
|
+
expect(sorted.map((session) => session.id)).toEqual(['ses_new', 'ses_old']);
|
|
187
|
+
expect(sessions.map((session) => session.id)).toEqual(before);
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
|
|
170
191
|
describe('isValidSessionSortOption', () => {
|
|
171
192
|
test('the default option is a valid, menu-listed value', () => {
|
|
172
193
|
expect(DEFAULT_SESSION_SORT_OPTION).toBe('LATEST_SESSION');
|
|
@@ -44,7 +44,7 @@ import type { PanelNavStyle } from '@/shared/lib/workspace/panel-nav';
|
|
|
44
44
|
* viewport with no scrollbar to reach it.
|
|
45
45
|
*
|
|
46
46
|
* 320 is the floor the composer's toolbar actually needs: below `@[420px]` every
|
|
47
|
-
* selector is icon-only (`ModeToggles`, `AccessDropdown
|
|
47
|
+
* selector is icon-only (`ModeToggles`, `AccessDropdown`),
|
|
48
48
|
* and 320 leaves a 24px-gutter message column about 40 characters wide. At 320
|
|
49
49
|
* the chat is cramped but whole; at 209 it is a column of clipped chips.
|
|
50
50
|
*/
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The workspace session id's shape is the boundary between a chat and a
|
|
8
|
+
* folder's panel scope. A false positive would make a real session render as a
|
|
9
|
+
* panel workspace; a false negative would put a `workspace-…` row in the
|
|
10
|
+
* sidebar and fetch a transcript for it.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { describe, expect, test } from 'bun:test';
|
|
14
|
+
|
|
15
|
+
import {
|
|
16
|
+
isWorkspaceSessionId,
|
|
17
|
+
workspaceFolderIdFromSessionId,
|
|
18
|
+
workspaceSessionId,
|
|
19
|
+
} from '@/shared/lib/workspace/workspace-session';
|
|
20
|
+
|
|
21
|
+
describe('workspaceSessionId', () => {
|
|
22
|
+
test('round-trips numeric and string folder ids', () => {
|
|
23
|
+
expect(workspaceSessionId(7)).toBe('workspace-7');
|
|
24
|
+
expect(workspaceSessionId('7')).toBe('workspace-7');
|
|
25
|
+
expect(workspaceFolderIdFromSessionId('workspace-7')).toBe('7');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
test('real session ids are not workspace ids', () => {
|
|
29
|
+
for (const id of ['1', '42', '0193a0f0-0000-7000-8000-000000000000', 'new-1761000000000', 'workspace-', null, undefined]) {
|
|
30
|
+
expect(isWorkspaceSessionId(id)).toBe(false);
|
|
31
|
+
expect(workspaceFolderIdFromSessionId(id)).toBeNull();
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The per-folder workspace session: a chat-shaped UI scope that is not a chat.
|
|
8
|
+
*
|
|
9
|
+
* The folder header's workspace button opens the folder's panels under an id of
|
|
10
|
+
* its own, so the right-panel view, widths, repo scope, open files and terminal
|
|
11
|
+
* state survive a reload per folder. That id must be recognisable everywhere a
|
|
12
|
+
* real session id is read, or the app treats it as one: the sidebar hydrates a
|
|
13
|
+
* pending row, the last-opened recorder stores a session that never existed,
|
|
14
|
+
* and the chat timeline fetches a transcript for it.
|
|
15
|
+
*
|
|
16
|
+
* One prefix and one predicate keep those readers agreeing.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export const WORKSPACE_SESSION_PREFIX = 'workspace-';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The sidebar's button asked for this folder's panels, from either layout.
|
|
23
|
+
* A repeat press must reveal the column without changing the URL.
|
|
24
|
+
*/
|
|
25
|
+
export const WORKSPACE_PANELS_OPEN_EVENT = 'omp:open-workspace-panels';
|
|
26
|
+
|
|
27
|
+
/** The synthetic session id a workspace folder's panels persist under. */
|
|
28
|
+
export function workspaceSessionId(folderId: string | number): string {
|
|
29
|
+
return `${WORKSPACE_SESSION_PREFIX}${String(folderId)}`;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** True for an id this module minted, never for a real omp/numeric session. */
|
|
33
|
+
export function isWorkspaceSessionId(id: unknown): id is string {
|
|
34
|
+
return typeof id === 'string' && id.startsWith(WORKSPACE_SESSION_PREFIX) && id.length > WORKSPACE_SESSION_PREFIX.length;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** The folder id inside a workspace session id, or null for a real session. */
|
|
38
|
+
export function workspaceFolderIdFromSessionId(id: unknown): string | null {
|
|
39
|
+
return isWorkspaceSessionId(id) ? id.slice(WORKSPACE_SESSION_PREFIX.length) : null;
|
|
40
|
+
}
|
|
@@ -201,6 +201,16 @@ export interface SettingsState {
|
|
|
201
201
|
* `classic` is the default so an upgrade rearranges nothing.
|
|
202
202
|
*/
|
|
203
203
|
sidebarStyle: SidebarStyle;
|
|
204
|
+
/**
|
|
205
|
+
* How many sessions one workspace lists before its `Show more` control.
|
|
206
|
+
*
|
|
207
|
+
* A COUNT, not a sort: the sort (`omp_sidebar_sort`) decides which sessions
|
|
208
|
+
* fill the window. Global and shared by desktop and phone, like the sidebar
|
|
209
|
+
* style itself — the useful number is a property of the person and the
|
|
210
|
+
* display, not of one conversation. Reads are clamped by
|
|
211
|
+
* `shared/lib/workspace/session-list-limit.ts`.
|
|
212
|
+
*/
|
|
213
|
+
sidebarSessionLimit: number;
|
|
204
214
|
/**
|
|
205
215
|
* How the DESKTOP left panel column is navigated (`rail` | `tabs`).
|
|
206
216
|
*
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e,p,zr}from"./index-rr79n77k.js";import{Mi}from"./index-vb5a3g01.js";import{Mu}from"./index-e42ys2q3.js";function g({source:t,name:r,revision:s=0}){let{url:i,loading:m,error:o}=Mu(t,s);if(o)return e(zr,{name:r,message:o});if(m||!i)return e("div",{className:"flex flex-1 items-center justify-center gap-2 text-xs text-ink/40",children:[e(p,{size:14,className:"animate-spin"}),e("span",{children:"Loading image…"})]});return e(Mi,{src:i,name:r,className:"flex-1 min-h-0"})}export{g as ImageView};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d,n,o,K,i,u,a,Fe,ce,Ut,Ic,e,s,Le,_e,p,dn,pn,I,dt,mn,f,C,le,pt,ae,fe,Nt,et,yn,de,Ke,pe,Sa,ia,nn,Da,ir,L,S,U,hl,h,sr,bl,He,we,an,Nh,io,Rm,kn,Qe,Qt,Po,Ve,kl,Or,he,X,mt,It,Rt,Oo,As,Rd,Tc,se,We,bs,Qc,i0,Lc,Mt,Fc,vs,zo,El,Bl,jo,rt,st,pa,at,Tl,Ao,Dl,ru,$a,au,jd,Is,za,qo,Wo,Ko,St,ur,Ds,Vo,Yo,Jo,ho,Ql,Rl,Ll,Ml,dr,jf,Hf,Zo,lu,qf,Ns,Qs,Wf,Rs,Vf,Yf,Jf,cu,Di,Fl,Ua,Ni,Zf,Xf,uu,eg,tg,ib,Yd,cb,ei,Jd,Sn,ng,rg,ag,og,BA,Pl,sg,lg,du,$l,mg,fg,np,gg,mb}from"./index-rr79n77k.js";import{lp}from"./index-k1576e2m.js";import"./index-jnxmvxb8.js";import{fu,gu,Au,hu,bu,yu,vu,Mi,ku,zl,xu}from"./index-vb5a3g01.js";import{Xs}from"./index-ssepzdaz.js";import"./index-t71k3b28.js";import{Ms,Eu,Bu,ti,Fs,Iu,_u,Su,Tu,Du,Nu,Ru,Lu}from"./index-e42ys2q3.js";import{wd,Cd,mi,Ed,Bd}from"./index-7ma44af3.js";import{ht,Fi,Pu,Ou,zu}from"./index-xygk0v3e.js";import{$s,ja,Ur,Uu,Gu,ni,ju,zs,Ap,zA,Us,Gs,js,Gr,Hs,qs,ri,Ws,Ks,Vs,Ys,Oi,ai,Js,Zs,Hu,hp,qu,Wu,Ku,Vu,Yu,Ju}from"./index-k4qshngy.js";import{Wa,Ka}from"./index-6ac860yz.js";import{Sd}from"./index-x7h04xzf.js";function Xe(t){let{editorOpen:r,diffOpen:l,settingsOpen:m,offMainScreen:b,onCloseEditor:g,onCloseDiff:x,onCloseSettings:v,onReturnToMain:w}=t;o(()=>mb(()=>{if(r)return g(),!0;if(l)return x(),!0;if(m)return v(),!0;if(b)return w(),!0;return!1}),[r,l,m,b,g,x,v,w])}var ft="terminal";function $e(t){return t===ft}function Re(t){if($e(t))i0()}function qe({dock:t,sessionId:r,currentScreen:l,setCurrentScreen:m}){let[b,g]=n(0),[x,v]=n(0),w=a(()=>{let y=we(r,"layout.mobileRightPanel")??Ic;Re(y),g((N)=>N+1),m("right")},[r,m]),c=a(()=>{v((y)=>y+1),m("session")},[m]),k=a((y)=>{let N=cb(y,t);if(!N)return;let R=we(r,"layout.mobileRightPanel");if(N==="right"&&(l!=="right"||R!==y))Re(y);if(an(r,N==="left"?"layout.mobileLeftPanel":"layout.mobileRightPanel",y),N==="right")g(0);m(N==="left"?"session":"right")},[t,r,l,m]);return se(Yd,(y)=>{let N=y.detail?.panelKey;if(N)k(N)}),{right:b,left:x,openSessionDrawer:c,openRightDrawer:w,openNamedPanel:k}}var bt={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]},Ye=s(bt);function Oe(){let t=bs(),[r,l]=n(null),m=a((x,v)=>{l({top:v,bottom:v,left:x,right:x})},[]),b=wd({enabled:t,onLongPress:m}),g=a(()=>l(null),[]);return{anchor:r,close:g,surfaceProps:{onContextMenu:(x)=>{x.preventDefault();let v=x.currentTarget.getBoundingClientRect();l({top:v.top,bottom:v.bottom,left:v.left,right:v.right})},onTouchStart:b.onTouchStart,onTouchMove:b.onTouchMove,onTouchEnd:b.onTouchEnd,onTouchCancel:b.onTouchCancel,onClickCapture:(x)=>{if(!b.consume())return;x.preventDefault(),x.stopPropagation()}}}}var gt=10,Ze=600000;function Je({activeSessionTitle:t,activeSessionId:r,onOpenSessionSidebar:l,onOpenRightSidebar:m,onNewSession:b,onSelectSession:g}){let{folders:x}=at(),v=np(),w=za(r),[c,k]=n(null),{hidden:y,setHidden:N}=rg(),R=Oe(),E=Jd("mobile"),W=u(()=>{let M=Date.now(),A=[];for(let D of x)for(let O of D.sessions??[]){if(O.is_archived===1)continue;let T=Nh(String(O.id)),B=O.updated_at?Date.parse(O.updated_at):0,Y=T!==void 0&&M-T<=Ze?T:B;if(T!==void 0&&M-T>Ze)continue;A.push({id:O.id,title:O.title,folderName:D.name,modified:Y})}return A.sort((D,O)=>O.modified-D.modified).slice(0,gt)},[x]),P=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 ${kl} px-3 z-20 titlebar-drag-region select-none`,...Ua(),...R.surfaceProps,style:ei(),children:[e("div",{className:"flex items-center space-x-2 flex-1 min-w-0 titlebar-no-drag",children:[e("button",{type:"button",onClick:l,className:"w-9 h-9 rounded-lg hover:bg-ink/5 active:bg-ink/10 text-ink transition-colors flex-shrink-0 inline-flex items-center justify-center",title:"Open Sessions","aria-label":"Open Sessions",children:e(Ye,{size:20,strokeWidth:2})}),e("span",{className:"relative font-bold text-sm tracking-tight flex items-center flex-shrink-0",children:[e($a,{glow:!0}),e("span",{className:"absolute -top-0.5 -right-1.5 flex",children:e(cu,{status:v})})]}),e("span",{className:"text-ink/25 font-light text-xs flex-shrink-0 select-none",children:"/"}),e("div",{className:"relative min-w-0 flex-1 max-w-[150px]","data-testid":"session-picker",children:[e("button",{type:"button",onClick:(M)=>{k((A)=>A?null:It(M.currentTarget))},className:"tap-chip flex w-full items-center space-x-1 text-xs font-semibold text-ink hover:text-ink/80 transition-colors py-1 min-w-0",title:P,"aria-haspopup":"menu","aria-expanded":c!==null,children:[e("span",{className:"truncate",children:P}),w&&e(p,{size:12,className:"animate-spin text-ink/50 flex-shrink-0",role:"status","aria-label":"Generating a session name…"}),e(C,{size:13,className:"text-ink/50 flex-shrink-0"})]}),c&&e(Rt,{anchor:c,align:"start",className:"w-72 bg-paper border border-ink/15 rounded-xl shadow-lg p-2 text-xs",onClose:()=>k(null),children:[e("button",{type:"button",onClick:()=>{k(null),b()},className:"w-full text-left px-3 py-2 rounded-lg bg-ink text-canvas flex items-center space-x-2 font-medium mb-1.5",children:[e(L,{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((M)=>e("button",{type:"button",onClick:()=>{k(null),g(M.id)},className:`w-full text-left px-2.5 py-1.5 rounded-lg flex items-center justify-between space-x-2 transition-colors ${String(r)===String(M.id)?"bg-ink/10 font-semibold text-ink":"hover:bg-ink/5 text-ink/80"}`,children:[e("span",{className:"min-w-0 flex flex-col",children:[e("span",{className:"truncate",children:M.title?M.title.charAt(0).toUpperCase()+M.title.slice(1):"Untitled"}),e("span",{className:"truncate text-[10px] text-ink/40 font-mono",children:M.folderName})]}),String(r)===String(M.id)&&e(f,{size:12,className:"flex-shrink-0"})]},M.id))})]})]})]}),e(ag,{layout:"mobile",sessionId:r==null?null:String(r),showRightPanel:!1,onToggleRightPanel:m,entries:E,hidden:y}),R.anchor?e(Zo,{anchor:R.anchor,title:"Navbar",align:"right",items:ng([...E.inline,...E.folded]).filter((M)=>M.id!==Sn.install).map((M)=>({...M,removable:!0})),hidden:y,onToggle:N,onClose:R.close}):null]})}function eo({activeSessionId:t,onSelectSession:r,onNewSession:l,onOpenSessionSidebar:m,onOpenRightSidebar:b,appSettings:g={}}){let{folders:x}=at(),[v,w]=n(null),c=u(()=>{if(!t)return"New session";for(let y of x){let N=y.sessions?.find((R)=>String(R.id)===String(t));if(N)return N.title}return null},[t,x]);return e("div",{className:"flex flex-col h-full w-full bg-canvas text-ink relative",children:[e(Je,{activeSessionTitle:v||c||"New session",activeSessionId:t,onOpenSessionSidebar:m,onOpenRightSidebar:b,onNewSession:l,onSelectSession:r}),e("main",{className:"flex-1 min-h-0",children:e(lg,{appSettings:g,onSessionTitle:w,variant:"mobile"})})]})}function oo({onClose:t,viewLabel:r="Sessions",menuProps:l}){return e("div",{className:"border-b border-ink/10 flex items-center justify-between px-3 flex-shrink-0 bg-canvas titlebar-drag-region select-none",...Ua(),...l,style:{...ei()},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($a,{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(og,{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(h,{size:19,strokeWidth:2})})]})]})}function to({onSettings:t,onKeyBindings:r,onAbout:l,updateAvailable:m,onUpdateClick:b,onDesktopToggle:g,shellDownload:x}){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(hl,{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(Sa,{size:14}),e("span",{children:"Keys"})]}),e("button",{type:"button",onClick:l,className:"flex items-center space-x-1 hover:text-ink transition-colors",children:[e(pe,{size:14}),e("span",{children:"About"})]}),x&&e(Jf,{download:x,variant:"label"}),g&&e("button",{type:"button",onClick:g,className:"flex items-center space-x-1 hover:text-ink transition-colors",title:"Switch to desktop view",children:[e(Da,{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",ru.version]}),m&&e("button",{type:"button",onClick:b,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 no(t){let r=Zf(),l=Yf();return se(au,()=>{t.onClose(),t.openAbout(),r.apply("kabmo").then((m)=>{if(!m)return;t.pushToast(m.message,Tc(m))})}),Xf(r,t.pushToast),{updates:r,shellDownload:l}}function ro(t,r,l){return t.filter((m)=>m.id!==r&&!(l&&m.side==="left"))}function so(t){return t}var vt=8;function Ae({panels:t,activeId:r,onSelect:l,hasGitChanges:m=!1}){let b=i(null),g=i(new Map),x=i({activeId:r,panels:t});x.current={activeId:r,panels:t};let v=i({signature:"",width:0}),w=a(()=>{let c=b.current,k=g.current.get(x.current.activeId);if(!c||!k||c.clientWidth<=0)return;let y=`${x.current.activeId}\x00${x.current.panels.map((P)=>P.id).join("\x00")}`,N=v.current;if(N.signature===y&&N.width===c.clientWidth)return;v.current={signature:y,width:c.clientWidth};let R=c.getBoundingClientRect(),E=k.getBoundingClientRect(),W=qf({scrollLeft:c.scrollLeft,clientWidth:c.clientWidth,scrollWidth:c.scrollWidth,start:E.left-R.left+c.scrollLeft,size:E.width},vt);if(W!==c.scrollLeft)c.scrollLeft=W},[]);return K(w,[r,t,w]),o(()=>{let c=b.current;if(!c||typeof ResizeObserver>"u")return;let k=new ResizeObserver(w);return k.observe(c),()=>k.disconnect()},[w]),e("div",{ref:b,className:"flex items-center space-x-1.5 overflow-x-auto no-scrollbar py-1",children:t.map((c)=>{let k=c.id===r;return e("button",{ref:(y)=>{if(y)g.current.set(c.id,y);else g.current.delete(c.id)},type:"button",onClick:()=>l(c.id),"aria-pressed":k,"aria-label":c.title,className:`tap-chip relative flex shrink-0 items-center transition-all cursor-pointer ${k?"space-x-1.5 px-3 py-1.5 rounded-lg text-xs font-semibold bg-ink text-canvas shadow-sm":"p-2 rounded-lg text-ink/70 hover:bg-ink/5"}`,title:c.title,children:[e(Ao,{panelId:c.id,builtin:c.builtin,icon:c.builtin?c.icon:void 0,name:c.builtin?c.label:c.name,...c.iconUrl?{iconUrl:c.iconUrl}:{},...c.color?{color:c.color}:{},size:Ut}),k&&e("span",{className:`shrink-0 whitespace-nowrap ${c.id==="git"?"tracking-wide":""}`,children:c.label}),c.id==="git"&&m&&e("span",{className:"absolute top-1 right-1 w-1.5 h-1.5 rounded-full bg-info",title:"Uncommitted changes"})]},c.id)})})}function ao({panels:t,activeId:r,onSelect:l,menuProps:m}){return e("div",{className:"px-3 py-1.5 border-b border-ink/10 bg-canvas flex-shrink-0",...m,children:e(Ae,{panels:t,activeId:r,onSelect:l})})}function lo({panelKey:t,panel:r,body:l}){if(!r)return e("div",{className:"flex-1 min-h-0",children:e(lu,{panelKey:t})});return e("div",{className:"flex-1 min-h-0 overflow-hidden relative",children:e(Fe,{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(Po,{value:l,children:r.render(l)})})})}var Te="w-9.5 h-9.5 rounded-xl border flex items-center justify-center transition-all flex-shrink-0 cursor-pointer shadow-xs",Ee="border-ink/15 bg-paper hover:bg-ink/5 text-ink/80 hover:text-ink",co="bg-ink/10 text-ink border-ink/30";function po({searchQuery:t,sortOption:r,optionsOpen:l,showArchived:m,optionsRef:b,onNewSession:g,onNewWorkspace:x,onScheduler:v,scheduledCount:w,onRefresh:c,refreshing:k,onToggleOptions:y,onSortChange:N,onResetSort:R,onToggleArchived:E,onHideArchived:W,onSearchChange:P,onClearSearch:M,onSelectWorkspaces:A,selecting:D}){let{ref:O,width:T}=zs(0),B=zA(T),Y={};for(let q of Ap.slice(0,B))Y[q]=!0;let z=Ap.slice(B),F=m?"Hide archived sessions":"Show archived sessions",te=w>0?`Scheduled tasks (${w} armed)`:"Scheduled tasks",H=[];if(z.includes("new-workspace"))H.push({id:"new-workspace",label:"New Workspace",icon:yn,onSelect:x});if(z.includes("refresh"))H.push({id:"refresh",label:"Refresh sessions",icon:S,onSelect:c});if(z.includes("scheduler"))H.push({id:"scheduler",label:te,icon:ja,onSelect:v});if(z.includes("archive"))H.push({id:"archive",label:F,icon:dt,onSelect:E,active:m});if(z.includes("select"))H.push({id:"select",label:D?"Cancel selection":"Select workspaces",icon:Ur,onSelect:A,active:D});return e("div",{className:"p-3 border-b border-ink/10 flex flex-col space-y-2.5 flex-shrink-0 bg-canvas",children:[e("div",{ref:O,className:"flex items-center space-x-2",children:[e("button",{type:"button",onClick:g,"aria-label":"New Session",title:"New Session",className:"flex-1 min-w-0 h-9.5 flex items-center justify-center space-x-2 px-3.5 rounded-xl bg-ink text-canvas hover:bg-ink/90 text-xs font-semibold transition-all shadow-xs",children:[e(L,{size:15,strokeWidth:2.4,className:"shrink-0"}),e("span",{className:"min-w-0 truncate",children:"New Session"})]}),Y["new-workspace"]&&e("button",{type:"button",onClick:x,className:`${Te} ${Ee}`,title:"New Workspace","aria-label":"New Workspace",children:e(yn,{size:16,strokeWidth:1.8})}),Y.scheduler&&e("button",{type:"button",onClick:v,className:`relative ${Te} ${Ee}`,title:te,"aria-label":w>0?`Scheduled tasks, ${w} armed`:"Scheduled tasks",children:[e(ja,{size:16,strokeWidth:1.8}),w>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:w>9?"9+":w})]}),Y.archive&&e("button",{type:"button",onClick:E,"aria-pressed":m,className:`${Te} ${m?"bg-warning/15 border-warning/40 text-warning-text":Ee}`,title:F,"aria-label":F,children:e(dt,{size:16,strokeWidth:1.8})}),Y.select&&e("button",{type:"button",onClick:A,"aria-pressed":D,className:`${Te} ${D?co:Ee}`,title:D?"Cancel selection":"Select workspaces","aria-label":D?"Cancel selection":"Select workspaces",children:e(Ur,{size:16,strokeWidth:1.8})}),Y.refresh&&e("button",{type:"button",onClick:c,className:`${Te} ${Ee}`,title:"Refresh sessions","aria-label":"Refresh sessions","aria-busy":k,children:e(S,{size:15,strokeWidth:1.8,className:k?"animate-spin":void 0})}),Y.sort&&e("div",{className:"relative flex-shrink-0",ref:b,children:[e("button",{type:"button",onClick:y,className:`${Te} ${l||r!=="A-Z"?co:Ee}`,title:"Sort workspaces","aria-label":"Sort workspaces",children:e($s,{size:15,strokeWidth:1.8})}),l&&e("div",{className:"glass-popover absolute right-0 top-full mt-2 w-52 bg-paper border border-ink/15 rounded-xl shadow-xl z-50 p-2 text-xs",children:e(ni,{variant:"mobile",sortOption:r,onSortChange:N})})]}),z.length>0&&e(ju,{actions:H,sortHidden:z.includes("sort"),sortOption:r,onSortChange:N,layout:"mobile"})]}),e("div",{className:"relative flex items-center",children:[e(U,{size:14,className:"absolute left-3 text-ink/40"}),e("input",{type:"text",value:t,onChange:(q)=>P(q.currentTarget.value),placeholder:"Search workspaces & sessions...",className:"w-full bg-paper border border-ink/15 rounded-xl pl-8 pr-8 py-2 text-xs text-ink placeholder-ink/40 focus:outline-none focus:border-ink/40 transition-colors font-mono"}),t&&e("button",{type:"button",onClick:M,className:"absolute right-2.5 text-ink/40 hover:text-ink p-1","aria-label":"Clear search",children:e(h,{size:13})})]}),(m||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:R,className:"hover:text-ink ml-0.5",title:"Reset sort",children:e(h,{size:10})})]}),m&&e("span",{className:"inline-flex items-center space-x-1 bg-warning/15 border border-warning/25 text-warning-text rounded-lg px-2 py-0.5 text-[10px] font-mono",children:[e(dt,{size:10}),e("span",{children:"Archived"}),e("button",{type:"button",onClick:W,className:"hover:text-warning-text ml-0.5",title:"Hide archived",children:e(h,{size:10})})]})]})]})}var xt="p-1.5 rounded-lg hover:bg-ink/10 active:bg-ink/15 text-ink/60 hover:text-ink";function mo({folder:t,canWorktree:r,onOpenFolder:l,onNewWorktree:m,onSelectSessions:b,confirmDelete:g,onPin:x,onDelete:v,onRequestDelete:w,onCancelDelete:c}){let[k,y]=n(!1),N=i(null),[R,E]=n(null),W=(P)=>()=>{y(!1),P()};return e("div",{className:"relative flex items-center",onClick:(P)=>P.stopPropagation(),children:[e("button",{ref:N,type:"button",onClick:(P)=>{if(P.stopPropagation(),N.current)E(It(N.current));y((M)=>!M)},className:xt,title:"Workspace options","aria-label":`Options for ${t.name}`,"aria-haspopup":"menu","aria-expanded":k,children:e(_e,{size:15})}),e(Rt,{anchor:k?R: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:()=>{y(!1),c()},children:e(Vs,{variant:"mobile",isPinned:t.isPinned,onOpenFolder:l?W(l):void 0,onNewWorktree:r&&m?W(m):void 0,onSelectSessions:b?W(b):void 0,confirmDelete:g,onPin:W(x),onDelete:W(v),onRequestDelete:w,onCancelDelete:c})})]})}var uo={inset:"",insetPx:0,slotWidth:16,markGap:8,padding:"py-2",glyph:st.touch};function fo({session:t,harness:r,isActive:l,status:m,awaitingInput:b=!1,timeAgo:g,timeTitle:x,runStartedAt:v,expandable:w=!1,isExpanded:c=!1,onToggleExpand:k,isChild:y=!1,folderId:N,onSelect:R,onArchive:E,onDelete:W,onRename:P,onRenameWithAi:M,waitingFor:A,onCancelWait:D,selectable:O=!1,selected:T=!1,onToggleSelect:B}){let{isEditing:Y,draft:z,setDraft:F,inputRef:te,startRename:H,handleKeyDown:q,handleBlur:re}=Ko(t.title,P),_=za(t.id),ne=Vo(),ie=ne.anchor!==null,ee=Boolean(P||E||W||D),J=Boolean(A),me=w&&Boolean(k),Q=t.title.charAt(0).toUpperCase()+t.title.slice(1);if(Y)return e("div",{className:"w-full rounded-lg flex items-center bg-ink/10",children:e("input",{ref:te,autoFocus:!0,value:z,onChange:(oe)=>F(oe.currentTarget.value),onKeyDown:q,onBlur:re,className:"flex-1 min-w-0 mx-2 my-1.5 bg-paper border border-ink/25 rounded px-2 py-1 text-xs text-ink outline-none focus:border-ink/50"})});return e(d,{children:[e("div",{"data-testid":"session-item","data-session-id":String(t.id),"data-menu-open":ie?"true":void 0,onContextMenu:ee&&!O?ne.openAtCursor:void 0,className:`w-full rounded-lg flex items-center transition-colors ${O&&T||ie?Ks:l?"bg-ink/10 font-medium text-ink":"hover:bg-ink/5 text-ink/85"}`,children:[e("button",{type:"button",onClick:O?B:R,className:"flex-1 text-left py-2 flex items-center justify-between min-w-0",children:[e("div",{className:"flex items-center min-w-0 pr-2",children:[O?e(Gr,{checked:T,label:`Select ${t.title}`,onChange:()=>B?.()}):e("span",{className:"w-4 flex-shrink-0 flex items-center justify-center",children:_?e("span",{role:"status","aria-label":"Generating a name…",children:e(p,{size:13,className:"text-ink/50 animate-spin"})}):b?e(Le,{size:13,className:"text-ink/70 animate-pulse"}):J?e("span",{role:"status","aria-label":`Waiting for ${A?.title??"another session"}`,children:e(Ke,{size:13,className:"text-ink/60 animate-pulse"})}):m==="stream"?e("span",{role:"status","aria-label":"Running",children:e(p,{size:13,className:"text-ink/50 animate-spin"})}):m?e(f,{size:13,className:"text-ink/50"}):y?e("span",{"data-testid":"child-indicator",className:"text-ink/35","aria-hidden":"true",children:e(de,{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(rt,{harness:r,size:st.touch})}),e("span",{className:"min-w-0 truncate text-xs",children:Q})]}),J&&e("span",{className:"text-[10px] text-ink/40 truncate",children:["waiting for ",A?.title??"another session"]}),t.worktree?e(Hs,{worktree:t.worktree}):null]})]}),e(Ws,{timeAgo:g,timeTitle:x,runStartedAt:v,className:"text-[11px] font-mono flex-shrink-0 ml-2",restingClassName:"text-ink/45"})]}),ee&&!O&&e("button",{type:"button",onClick:ne.openBelow,title:"Session actions","aria-label":"Session actions","aria-haspopup":"menu","aria-expanded":ie,className:"flex-shrink-0 py-1.5 pl-1.5 pr-1 text-ink/35 hover:text-ink rounded-lg cursor-pointer",children:e(_e,{size:16})}),me&&!O&&e("button",{type:"button",onClick:k,title:c?"Collapse sessions and subagents":"Expand sessions and subagents","aria-expanded":c,"aria-label":c?"Collapse sessions and subagents":"Expand sessions and subagents",className:"flex-shrink-0 py-1.5 pl-1.5 pr-1 flex items-center justify-center text-ink/50 hover:text-ink rounded-lg cursor-pointer",children:c?e(C,{size:14}):e(le,{size:14})})]}),ne.anchor&&e(Yo,{anchor:ne.anchor,sessionId:t.id,...r?{harness:r}:{},...N!==void 0?{folderId:N}:{},isArchived:t.is_archived===1,onRename:P?H:void 0,onRenameWithAi:M,onArchive:E,onDelete:W,onCancelWait:D,onClose:ne.close})]})}function bo(t,r){let[l,m]=n(!1);return{open:()=>m(!0),dialog:l?e(Jo,{isOpen:!0,onClose:()=>m(!1),root:t.project_path??null,folderId:t.id,folderName:t.name,onCreated:(b)=>{m(!1),r(b.path)}}):null}}function go({hiddenCount:t,canShowLess:r,onShowMore:l,onShowLess:m}){if(t<=0&&!r)return null;return e("div",{className:"flex items-center gap-1",children:[t>0&&e("button",{type:"button",onClick:l,className:"flex items-center min-w-0 text-left py-2 pr-3 text-xs text-ink/60 hover:text-ink",children:[e("span",{className:"w-4 h-4 flex-shrink-0 flex items-center justify-center",children:e(C,{size:12})}),e("span",{className:"w-2 shrink-0"}),e("span",{className:"truncate",children:["Show more sessions (",t,")"]})]}),r&&e("button",{type:"button",onClick:m,className:"ml-auto shrink-0 flex items-center gap-1 text-xs text-ink/60 hover:text-ink pl-3 py-2",children:[e(pt,{size:12}),e("span",{className:"truncate",children:"Show less"})]})]})}function vo(t){return t?"mb-4":"mb-1"}function So({folder:t,activeSessionId:r,onSelectSession:l,onNewSessionForFolder:m,onNewWorktreeSession:b,isExpanded:g,onToggleExpand:x,showArchived:v=!1,sessionStatus:w={},onToast:c,batch:k,onStartSessionSelection:y,onCancelWait:N}){let{visibleCount:R,showMore:E,showLess:W,canShowLess:P}=Gs(),M=bo(t,(G)=>b?.(t.id,G)),{refresh:A,runStartedAtMap:D}=at(),{expandedSessionIds:O,toggleSession:T}=Ds(),[B]=ce(),Y=B.get("subagent"),z=B.get("sessionId"),{confirmDelete:F,requestDelete:te,cancelDelete:H,handlePin:q,handleDelete:re,handleArchive:_,handleRename:ne,handleRenameWithAi:ie,handleOpenFolder:ee}=js(t,A,c),J=qo(),me=q,Q=re,oe=ee??void 0,ue=(t.sessions||[]).filter((G)=>v?G.is_archived===1:G.is_archived!==1),ke=pa(t.icon),{folderCheckbox:ge,sessionCheckboxes:be,folderSummary:V,toggleFolderSelection:j,rendered:Z,hiddenCount:ye}=Js({batch:k,folder:t,sessions:ue,showArchived:v,visibleCount:R,activeSessionId:r,sessionStatus:w}),Pe=ai(Z),Se=g||be,Ne=(G,Me)=>{let ve=String(G.id),je=String(r)===ve,ct=je&&z===ve&&Boolean(Y),ze=St(ve);return e(fo,{session:G,harness:G.harness,folderId:G.folder_id,isActive:je&&!ct,status:w[ve],awaitingInput:Boolean(G.awaitingInput),timeAgo:qs(G.updated_at??G.created_at),timeTitle:ri(G.updated_at??G.created_at),runStartedAt:w[ve]==="stream"?D[ve]:void 0,expandable:Me.expandable,isChild:Me.isChild,isExpanded:Me.isExpanded,onToggleExpand:Me.onToggleExpand,onSelect:()=>l(G.id),onArchive:()=>_(G),onDelete:ze?void 0:()=>J.requestDelete(G),onRename:ze?void 0:(ut)=>void ne(G,ut),onRenameWithAi:ze?void 0:()=>void ie(G),waitingFor:G.waitingFor?{title:G.waitingFor.title}:void 0,onCancelWait:G.waitingFor?()=>N?.(G.waitingFor.waitId):void 0,selectable:be,selected:Boolean(k?.selected.includes(ve)),onToggleSelect:k?()=>k.toggle(ve):void 0})},lt=(G)=>Ys(G,Pe.childrenOf,O,T);return e("div",{className:vo(Se),"data-testid":"session-folder",children:[e("div",{onClick:k?void 0:x,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:[ge&&V?e(Gr,{size:"md",checked:V.all,indeterminate:V.some,label:`Select ${t.name}`,onChange:j}):e(d,{children:e("span",{className:"w-4 h-4 flex items-center justify-center flex-shrink-0",children:t.customIconUrl?e("img",{src:t.customIconUrl,alt:"",className:"w-[15px] h-[15px] rounded-xs object-contain",referrerPolicy:"no-referrer"}):t.iconType==="chat"?e(nn,{size:15,className:"text-ink/80"}):e(ke,{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:ue.length}),t.project_path&&e(de,{size:13,className:"text-ink/50 ml-1"}),!k&&e(d,{children:[e("button",{type:"button",onClick:(G)=>{G.stopPropagation(),m(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(L,{size:15})}),e(mo,{folder:t,canWorktree:Boolean(b&&t.project_path),onOpenFolder:oe,onNewWorktree:b?()=>M.open():void 0,onSelectSessions:y?()=>y(t.id):void 0,confirmDelete:F,onPin:me,onDelete:Q,onRequestDelete:te,onCancelDelete:H}),e("span",{className:"flex items-center justify-center pr-1",children:g?e(C,{size:14}):e(le,{size:14})})]})]})]}),Se&&e("div",{className:"mt-0.5 space-y-0.5",children:[Pe.roots.map((G)=>{let Me=String(G.id),ve=lt(G);return e("div",{className:"space-y-0.5",children:[Ne(G,ve),ve.isExpanded&&e(Oi,{parentId:Me,hasSubagents:Boolean(G.hasSubagents),childrenOf:Pe.childrenOf,expandedIds:O,onToggle:T,activeSessionId:r===null?null:String(r),renderSession:Ne,style:uo})]},G.id)}),e(go,{hiddenCount:be?0:ye,canShowLess:!be&&P,onShowMore:E,onShowLess:W})]}),e(Wo,{session:J.pending,isDeleting:J.isDeleting,error:J.error,onClose:J.cancelDelete,onConfirm:()=>void J.confirmDelete()}),M.dialog]})}function xo({folders:t,activeSessionId:r,expandedFolders:l,showArchived:m,sessionStatus:b,onSelectSession:g,onNewSessionForFolder:x,onNewWorktreeSession:v,onToggleFolder:w,onToast:c,batch:k,onStartSessionSelection:y,onCancelWait:N}){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((R)=>e(So,{folder:R,activeSessionId:r,onSelectSession:g,onNewSessionForFolder:x,onNewWorktreeSession:v,isExpanded:l[R.id]??!0,onToggleExpand:()=>w(R.id),showArchived:m,sessionStatus:b,onToast:c,batch:k,onStartSessionSelection:y,onCancelWait:N},R.id))})}var wt=[3,2];function wo(){return e("div",{className:"flex-1 p-3 space-y-4","aria-hidden":"true",children:wt.map((t,r)=>e("div",{className:"space-y-2",children:[e("div",{className:"flex items-center gap-2 py-2",children:[e("span",{className:"w-4 h-4 rounded-sm animate-pulse bg-ink/10"}),e("span",{className:"h-3 w-24 rounded animate-pulse bg-ink/10"})]}),Array.from({length:t},(l,m)=>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-m%3*12}%`}})]},m))]},r))})}function ko({folders:t,initializing:r,failed:l,activeSessionId:m,expandedFolders:b,sessionStatus:g,searchQuery:x,sortOption:v,optionsOpen:w,showArchived:c,harnessFilter:k,onHarnessFilterChange:y,harnessOptions:N,optionsRef:R,scheduledCount:E,refreshing:W,selecting:P,batch:M,onNewSession:A,onNewWorkspace:D,onScheduler:O,onRefresh:T,onToggleOptions:B,onSortChange:Y,onResetSort:z,onToggleArchived:F,onHideArchived:te,onSearchChange:H,onClearSearch:q,onSelectWorkspaces:re,onSelectSession:_,onNewSessionForFolder:ne,onNewWorktreeSession:ie,onToggleFolder:ee,onToast:J,onStartSessionSelection:me,onCancelWait:Q}){return e(d,{children:[e(po,{searchQuery:x,sortOption:v,optionsOpen:w,showArchived:c,optionsRef:R,onNewSession:A,onNewWorkspace:D,onScheduler:O,scheduledCount:E,onRefresh:T,refreshing:W,onToggleOptions:B,onSortChange:Y,onResetSort:z,onToggleArchived:F,onHideArchived:te,onSearchChange:H,onClearSearch:q,onSelectWorkspaces:re,selecting:P}),e("div",{className:"px-3 pt-2 pb-1",children:e(Us,{options:N,value:k,onChange:y,touch:!0})}),l?e(Zs,{touch:!0,onRetry:T,refreshing:W}):r?e(wo,{}):e(xo,{folders:t,activeSessionId:m,expandedFolders:b,showArchived:c,sessionStatus:g,onSelectSession:_,onNewSessionForFolder:ne,onNewWorktreeSession:ie,onToggleFolder:ee,onToast:J,batch:M,onStartSessionSelection:me,onCancelWait:Q})]})}function yo({sidebarStyle:t,controller:r,batch:l,dock:m,dockBody:b,expandedFolders:g,optionsRef:x,activeSessionId:v,scheduledCount:w,onToggleFolder:c,onNewSession:k,onNewWorkspace:y,onScheduler:N,onToggleArchived:R,onNewSessionForFolder:E,onNewWorktreeSession:W,onToast:P,onArchiveSelected:M,onCancelWait:A}){let{initializing:D,failed:O,refreshNow:T,isRefreshing:B,searchQuery:Y,setSearchQuery:z,showArchived:F,setShowArchived:te,optionsOpen:H,setOptionsOpen:q,sortOption:re,handleSortChange:_,harnessFilter:ne,setHarnessFilter:ie,harnessOptions:ee,processedFolders:J,sessionStatus:me,handleSelectSession:Q}=r,{selection:oe,deleteRun:ue,archiveRun:ke,binding:ge,scopeFolder:be,available:V,selected:j}=l,Z={className:"flex-1 min-h-0 w-full",folders:J,initializing:D,failed:O,activeSessionId:v,sessionStatus:me,searchQuery:Y,onSearchChange:z,showArchived:F,onToggleArchived:R,sortOption:re,optionsOpen:H,onToggleOptions:()=>q(!H),onCloseOptions:()=>q(!1),onSortChange:_,harnessFilter:ne,onHarnessFilterChange:ie,harnessOptions:ee,onRefresh:T,refreshing:B,scheduledCount:w,onNewSession:k,onNewWorkspace:y,onScheduler:N,onSelectSession:Q,onNewSessionForFolder:E,onNewWorktreeSession:W,onToast:P,onCancelWait:A,batch:ge,onSelectWorkspaces:l.toggleWorkspaceSelection,onStartSessionSelection:(ye)=>oe.begin("session",ye)};return e(d,{children:[e("div",{className:m.showingSessions?"contents":"hidden",children:[t==="modern"?e(Hu,{...Z,touch:!0}):e(ko,{folders:J,initializing:D,failed:O,activeSessionId:v,expandedFolders:g,sessionStatus:me,searchQuery:Y,sortOption:re,optionsOpen:H,showArchived:F,harnessFilter:ne,onHarnessFilterChange:ie,harnessOptions:ee,optionsRef:x,scheduledCount:w,refreshing:B,selecting:oe.mode!==null,batch:ge,onNewSession:k,onNewWorkspace:y,onScheduler:N,onRefresh:T,onToggleOptions:()=>q(!H),onSortChange:_,onResetSort:()=>_("A-Z"),onToggleArchived:R,onHideArchived:()=>te(!1),onSearchChange:z,onClearSearch:()=>z(""),onSelectWorkspaces:l.toggleWorkspaceSelection,onSelectSession:Q,onNewSessionForFolder:E,onNewWorktreeSession:W,onToggleFolder:c,onToast:P,onStartSessionSelection:(ye)=>oe.begin("session",ye),onCancelWait:A}),oe.mode&&e(Yu,{drawer:!0,mode:oe.mode,count:j.length,total:V.length,busy:ue.isDeleting,archiving:ke.isArchiving,scopeLabel:be?.name,onSelectAll:()=>oe.selectAllOf(V),onUnselectAll:()=>oe.unselectAllOf(V),onDelete:()=>ue.request(j),onArchive:M,onCancel:oe.end})]}),m.showingSessions?null:e(lo,{panelKey:m.activeView,panel:m.activePanel,body:b})]})}function No(t,r){let l=t.tabs;Rs({enabled:t.tabsMode,revealed:Wf(r),storedView:t.activeView,home:l?.home??!1,chosenHome:l?.chosenHome??!1,openTab:l?.open??null,known:new Set(t.catalog.map((g)=>g.id))});let m=i(!1),b=l?{...l,select:(g)=>{m.current=!0,l.select(g)},open:(g)=>{m.current=!0,l.open(g)},close:(g)=>{m.current=!0,l.close(g)}}:null;return o(()=>{if(!t.tabsMode||!l)return;if(l.active!==null&&l.active!==t.activeView)t.setActiveView(l.active)},[t.tabsMode,l?.active,t.activeView,t.setActiveView]),o(()=>{if(!t.tabsMode||!l)return;if(m.current){m.current=!1;return}if(l.tabs.includes(t.activeView))return;if(!t.catalog.some((g)=>g.id===t.activeView))return;l.open(t.activeView)},[t.tabsMode,l,t.activeView,t.catalog]),{tabs:b}}function Ie(t){return{dragRegion:!0,layout:"mobile",rootProps:{...Ua(),...t},style:{paddingLeft:Ni(Di("0.75rem",!0)),paddingRight:Fl("0.75rem",!0)}}}function Co({side:t,onClose:r}){let l=t==="left"?dn:ir;return e("button",{type:"button",onClick:r,className:`${Ve.mobile} flex-none cursor-pointer rounded-lg text-ink/60 transition-colors hover:bg-ink/5 hover:text-ink titlebar-no-drag`,title:t==="left"?"Tutup panel kiri":"Tutup panel kanan","aria-label":t==="left"?"Close left sidebar":"Close right sidebar",children:e(l,{size:Or.mobile,strokeWidth:1.8})})}function Mo({activeSessionId:t,newWorkspaceOpen:r,onCloseNewWorkspace:l,schedulerOpen:m,onCloseScheduler:b,aboutOpen:g,onCloseAbout:x,updates:v,pushToast:w,batchDelete:c,batchMode:k,onEndBatch:y,scopeLabel:N}){return e(d,{children:[e(Is,{isOpen:r,onClose:l,onCreate:Ll,onClone:Ml}),e(Gu,{isOpen:m,onClose:b,activeSessionId:t===null?null:String(t),onToast:w}),e(jd,{isOpen:g,onClose:x,updates:v,onToast:w}),e(Vf,{updates:v}),e(Ju,{mode:k??"session",count:c.pending.length,scopeLabel:N,isDeleting:c.isDeleting,progress:c.progress,outcome:c.outcome,onClose:()=>{let R=c.outcome?.refused.length??0;if(c.cancel(),c.outcome&&R===0)y()},onConfirm:()=>{let R=k??"session";c.confirm(R).then((E)=>{if(E&&E.refused.length===0)y()})}})]})}function Ro(){let t=Qt(),r=dr("left"),[l,m]=io("layout.mobileLeftPanel",Qe),b=jf(l,t.enabled),g=lp("left"),x=t.enabled&&g==="tabs",v=u(()=>new Set(r.map((c)=>c.id)),[r]),w=Qs("left",v,Qe);return{catalog:r,activeView:b,setActiveView:m,showingSessions:b===Qe,activePanel:r.find((c)=>c.id===b),enabled:t.enabled,tabsMode:x,tabs:x?w:null}}function To(t){return{className:"w-full h-full",sessionId:t.sessionId===null?null:String(t.sessionId),enabled:t.requiresWorkspace?t.hasActiveContext===!0:!0,active:!0,refreshKey:t.refreshKey,...t.rootPath?{rootPath:t.rootPath}:{},...t.onRefresh?{onRefresh:t.onRefresh}:{},...t.onOpenFile?{onOpenFile:t.onOpenFile}:{},onClose:t.onClose,showHeader:!1,layout:"phone"}}function Eo({appSettings:t,onSelectSession:r,onClose:l,rootPath:m,refreshKey:b,onRefresh:g,onOpenFile:x}){let v=qu(t,{onSelectSession:r,onAfterSelect:l}),{folders:w,processedFolders:c,refreshNow:k,showArchived:y,activeSessionId:N}=v,R=Vu(c,y,k),[E,W]=n({1:!0,2:!0,3:!0}),P=i(null);he(P,()=>v.setOptionsOpen(!1));let M=(T)=>{W((z)=>({...z,[T]:!z[T]}));let B=w.find((z)=>z.id===T),Y=!(E[T]??B?.isExpanded??!0);hp(T,Y)},A=c.map((T)=>`${T.id}:${T.isExpanded}`).join("|");o(()=>{W(Object.fromEntries(c.map((T)=>[T.id,T.isExpanded])))},[A]);let D=Ro(),O=To({sessionId:N,refreshKey:b,rootPath:m,onRefresh:g,onOpenFile:x,onClose:l,requiresWorkspace:D.activePanel?.requiresWorkspace??!1,hasActiveContext:Boolean(m)});return{controller:v,batch:R,expandedFolders:E,toggleFolder:M,optionsRef:P,dock:D,dockBody:O}}function Be(t){let{disabledPanels:r}=kn(),{setEnabled:l}=Tl(),m=Oe(),b=Hf(t),g=a((x,v)=>{l(x,v)},[l]);return{...m,items:b,hidden:r,toggle:g}}function Do({activeSessionId:t,onSelectSession:r,onNewSession:l,onNewSessionForFolder:m,onNewWorktreeSession:b,onClose:g,onDesktopToggle:x,appSettings:v={},rootPath:w,refreshKey:c=0,onRefresh:k,onOpenFile:y,revealSignal:N=0}){let{controller:R,batch:E,expandedFolders:W,toggleFolder:P,optionsRef:M,dock:A,dockBody:D}=Eo({appSettings:v,onSelectSession:r,onClose:g,rootPath:w,refreshKey:c,onRefresh:k,onOpenFile:y}),{showArchived:O,setShowArchived:T}=R,{selection:B,deleteRun:Y,archiveRun:z,selected:F,scopeFolder:te}=E,H=Sd(),q=Be("left"),[re,_]=n(!1),[ne,ie]=n(!1),ee=Uu(),[J,me]=n(!1),{pushToast:Q}=We(),oe=Rl(Q);Wu({onNotice:Q});let{updates:ue,shellDownload:ke}=no({onClose:g,openAbout:()=>me(!0),pushToast:Q}),{tabs:ge}=No(A,N),be=()=>{l(),g()},V=()=>{z.archive(F).then((Se)=>{if(!Se)return;let Ne=Ku(Se);if(Ne)Q(Ne.message,Ne.tone);if(!Se.error)B.end()})},j=(Se)=>{m(Se),g()},Z=()=>{T(!O)},ye=b?(Se,Ne)=>{b(Se,Ne),g()}:void 0,Pe=e(yo,{sidebarStyle:H,controller:R,batch:E,dock:A,dockBody:D,expandedFolders:W,optionsRef:M,activeSessionId:t,scheduledCount:ee,onToggleFolder:P,onNewSession:be,onNewWorkspace:()=>_(!0),onScheduler:()=>ie(!0),onToggleArchived:Z,onNewSessionForFolder:j,...ye?{onNewWorktreeSession:ye}:{},onToast:Q,onArchiveSelected:V,onCancelWait:oe});return e("div",{className:"flex flex-col h-full w-full bg-canvas text-ink relative select-none",children:[e(oo,{onClose:g,viewLabel:A.showingSessions?"Sessions":A.activePanel?.label??"Panel",menuProps:q.surfaceProps}),!A.tabsMode&&so(A.enabled)?e(ao,{panels:A.catalog,activeId:A.activeView,onSelect:A.setActiveView,menuProps:q.surfaceProps}):null,A.tabsMode&&ge?e("div",{className:"flex-1 min-h-0 flex flex-col",children:e(Ns,{catalog:A.catalog,tabs:ge,pinned:Qe,homeTitle:"Panel kiri",stripProps:Ie(q.surfaceProps),children:e("div",{className:"h-full w-full",children:Pe})})}):null,q.anchor?e(Zo,{anchor:q.anchor,items:q.items,hidden:q.hidden,onToggle:q.toggle,onClose:q.close}):null,A.tabsMode?null:e("div",{className:"contents",children:Pe}),e(to,{onSettings:()=>window.dispatchEvent(new CustomEvent("omp:open-settings",{detail:{}})),onKeyBindings:Qc,onAbout:()=>me(!0),shellDownload:ke,onDesktopToggle:x,updateAvailable:ue.hasUpdate,onUpdateClick:()=>{me(!0),ue.check()}}),e(Mo,{activeSessionId:t,newWorkspaceOpen:re,onCloseNewWorkspace:()=>_(!1),schedulerOpen:ne,onCloseScheduler:()=>ie(!1),aboutOpen:J,onCloseAbout:()=>me(!1),updates:ue,pushToast:Q,batchDelete:Y,batchMode:B.mode,onEndBatch:B.end,scopeLabel:te?.name})]})}function Fo({catalog:t,activeId:r,onSelect:l,hasGitChanges:m,onClose:b,menuProps:g}){return e("div",{className:"border-b border-ink/10 flex items-center justify-between px-3 flex-shrink-0 bg-canvas titlebar-drag-region select-none",...Ua(),...g,style:ei(),children:[e("div",{className:"flex items-center min-w-0 titlebar-no-drag",children:e(Ae,{panels:t,activeId:r,onSelect:l,hasGitChanges:m})}),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(h,{size:20,strokeWidth:1.8})})]})}function Ue({panel:t,body:r}){if(!t)return e("div",{className:"h-full flex items-center justify-center text-ink/40",children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});return e(Fe,{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(Po,{value:r,children:t.render(r)})})}function Io({enabled:t=!0,rootPath:r,refreshKey:l=0,onRefresh:m,onOpenFile:b,onClose:g,revealSignal:x=0}){let[v,w]=io("layout.mobileRightPanel",Ic),{sessionId:c}=He(),k=Qt(),y=ro(dr("all"),Qe,k.enabled),N=y.find((_)=>_.id===v)??y[0],E=lp("right")==="tabs",W=u(()=>new Set(y.map((_)=>_.id)),[y]),P=Qs("right",W,null),M=we(c,"layout.mobileRightPanel")!==void 0;Rs({enabled:E,revealed:Wf(x),storedView:M?v:null,home:P.home,chosenHome:P.chosenHome,openTab:P.open,known:W});let{open:A,tabs:D}=P,O=(_)=>{if(_!==N?.id)Re(_)},T=i(!1),B={...P,select:(_)=>{T.current=!0,O(_),P.select(_)},open:(_)=>{T.current=!0,O(_),P.open(_)},close:(_)=>{T.current=!0,P.close(_)}};o(()=>{if(!E)return;if(P.active!==null&&P.active!==v)w(P.active)},[E,P.active,v,w]),o(()=>{if(!E||P.home)return;if(T.current){T.current=!1;return}if(!M)return;if(D.includes(v)||!W.has(v))return;A(v)},[E,P.home,M,v,D,A,W]);let Y=Rm(r,t),{changes:z}=bl(r,Y,t),F=z.length>0,te=a((_)=>{if(_!==N?.id)Re(_);w(_)},[N?.id,w]);o(()=>{if(!$e(N?.id))Lc()},[N?.id]);let H=Be(k.enabled?"right":"all"),q=k.enabled?H.items:H.items.filter((_)=>_.id!==Qe),re={className:"h-full w-full",enabled:t||!N?.requiresWorkspace,active:!0,refreshKey:l,...r?{rootPath:r}:{},onRefresh:m,onOpenFile:b,onClose:g,showHeader:!1,layout:"phone"};return e("div",{className:"flex flex-col h-full w-full bg-paper text-ink relative select-none",children:[E?null:e(Fo,{catalog:y,activeId:N?.id??v,onSelect:te,hasGitChanges:F,onClose:g,menuProps:H.surfaceProps}),E?e("div",{className:"flex-1 min-h-0 flex flex-col",children:e(Ns,{catalog:y,tabs:B,homeTitle:"Panel kanan",stripProps:Ie(H.surfaceProps),actions:e(Co,{side:"right",onClose:g}),children:e("div",{className:"h-full w-full",children:e(Ue,{panel:N,body:re})})})}):null,H.anchor?e(Zo,{anchor:H.anchor,align:"right",items:q,hidden:H.hidden,onToggle:H.toggle,onClose:H.close}):null,E?null:e("div",{className:"flex-1 min-h-0 overflow-hidden relative",style:{paddingBottom:"env(safe-area-inset-bottom, 0px)"},children:e(Ue,{panel:N,body:re})})]})}function Ce({label:t,onClick:r,active:l=!1,danger:m=!1,children:b}){let g=m?"bg-error text-error-on hover:bg-error/90":l?"bg-ink text-canvas":"text-ink/70 hover:bg-ink/10 hover:text-ink";return e("button",{type:"button",onClick:r,title:t,"aria-label":t,"aria-pressed":l||void 0,className:`${Ve.mobile} flex-none cursor-pointer rounded-lg transition-colors ${g}`,children:b})}var xe=Or.mobile;function Lo({actions:t}){let[r,l]=n(!1),m=i(null);return he(m,()=>l(!1),r),o(()=>{if(!r)return;let b=(g)=>{if(g.key==="Escape")l(!1)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[r]),e("div",{className:"relative flex-none",ref:m,children:[e("button",{type:"button",onClick:()=>l((b)=>!b),title:"More file actions","aria-label":"More file actions","aria-haspopup":"menu","aria-expanded":r,className:`${Ve.mobile} flex-none cursor-pointer rounded-lg text-ink/70 transition-colors hover:bg-ink/10 hover:text-ink`,children:e(_e,{size:Or.mobile})}),r?e("div",{role:"menu","aria-label":"File actions",className:"absolute right-0 top-full z-50 mt-1 w-52 overflow-hidden rounded-xl border border-ink/15 bg-paper py-1 text-xs shadow-lg",children:t.map((b)=>{let g=b.icon;return e("button",{type:"button",role:"menuitem",onClick:()=>{l(!1),b.onSelect()},className:"flex w-full items-center gap-2 px-3 py-2.5 text-left text-ink/80 transition-colors hover:bg-ink/5 hover:text-ink",children:[e(g,{size:15,className:"flex-none text-ink/60"}),e("span",{className:"truncate",children:b.label})]},b.id)})}):null]})}var kt=420;function Bo({fileName:t,hasPreview:r,isPreview:l,hasReview:m,isReviewing:b,onToggleReview:g,wordWrap:x,copied:v,byteViewer:w=!1,missing:c=!1,onSave:k,onClose:y,onTogglePreview:N,onToggleFind:R,findOpen:E,onToggleWrap:W,onZoomOut:P,onZoomIn:M,onCopy:A,onDownload:D}){let O=uu(kt),T=u(()=>{let B=[];if(!w)B.push({id:"wrap",label:x?"Word wrap: on":"Word wrap: off",icon:pn,onSelect:W},{id:"zoom-out",label:"Decrease font size",icon:Ka,onSelect:P},{id:"zoom-in",label:"Increase font size",icon:Wa,onSelect:M});if(!O)B.push({id:"copy",label:v?"Copied":"Copy content",icon:v?f:ae,onSelect:A},{id:"download",label:"Download file",icon:fe,onSelect:D});return B},[w,O,x,v,W,P,M,A,D]);return e("header",{className:"bg-canvas border-b border-ink/10 flex items-center justify-between gap-1 px-3 flex-shrink-0 titlebar-drag-region",style:ei(),children:[e("div",{className:"flex items-center gap-1 min-w-0 titlebar-no-drag",children:[e(Ce,{label:"Close editor",onClick:y,children:e(mn,{size:xe,strokeWidth:2})}),e("div",{className:"flex min-w-0 items-center gap-1.5",children:[e(mt,{name:t,size:15,className:`flex-shrink-0${c?" text-error-text":""}`}),e("span",{className:`truncate font-semibold text-xs${c?" text-error-text line-through":" text-ink"}`,children:t})]})]}),e("div",{className:"flex flex-none items-center gap-0.5 text-ink/70 titlebar-no-drag",children:[c&&k&&e(Ce,{label:"Save and recreate the file",onClick:k,danger:!0,children:e(ht,{size:xe})}),!w&&e(Ce,{label:E?"Close find":"Find in file",onClick:R,active:E,children:e(U,{size:xe})}),m&&e(Ce,{label:b?"Exit review mode":"Review this document",onClick:g,active:b,children:e(nn,{size:xe})}),r&&e(Ce,{label:l?"View source":"Show preview",onClick:N,active:l,children:l?e(Nt,{size:xe}):e(et,{size:xe})}),O&&e(d,{children:[e(Ce,{label:"Copy content",onClick:A,children:v?e(f,{size:xe,className:"text-success-text"}):e(ae,{size:xe})}),e(Ce,{label:"Download file",onClick:D,children:e(fe,{size:xe})})]}),T.length>0&&e(Lo,{actions:T})]})]})}function _o({fileName:t,content:r,path:l,root:m,repo:b,fontSize:g,scrollRef:x,onScroll:v,isLoading:w,unsupported:c,loadError:k,reviewActive:y,onExitReview:N}){return e("div",{ref:x,onScroll:v,"data-testid":"editor-scroller",className:"flex-1 min-h-0 overflow-auto relative bg-paper text-ink select-text",children:w?e("div",{className:"flex items-center justify-center h-full text-ink/40 text-xs gap-2",children:[e(p,{size:14,className:"animate-spin"}),e("span",{children:"Loading file content..."})]}):c?e("div",{className:"flex flex-col items-center justify-center h-full gap-2 px-6 text-center",children:[e(fu,{size:20,className:"text-ink/40"}),e("span",{className:"text-xs text-ink/70 font-sans",children:[t," cannot be opened here"]}),e("span",{className:"text-[11px] text-ink/50 font-sans max-w-[42ch]",children:c})]}):k?e("div",{className:"flex flex-col items-center justify-center h-full gap-2 px-6 text-center",children:[e(I,{size:20,className:"text-error-text"}),e("span",{className:"text-xs text-error-text font-sans",children:["Could not read ",t]}),e("span",{className:"text-[11px] text-ink/50 font-mono break-all",children:k})]}):e("div",{className:"p-4 bg-paper text-ink min-h-full font-sans",style:{fontSize:`${g}px`},children:e(Au,{content:r,file:{name:t,path:l,root:m,repo:b},active:y,onExit:N})})})}function Ho({file:t,editor:r,viewerKind:l,byteViewer:m,isPreview:b,isMd:g,content:x,language:v,wordWrap:w,fileKey:c,revealMarks:k,currentMark:y,surfaceRef:N,setCodeScroller:R,previewRef:E,scroll:W,fontSize:P,reviewActive:M,onExitReview:A,editorTheme:D,editorFontFamily:O,indentUnitText:T,typing:B}){let Y=a(async(z)=>{let F=await xu(t,z,{interactive:!0,baseMtimeMs:r.baseMtimeMs});if(F.status==="written")return{ok:!0};if(F.status==="conflict")return{ok:!1,error:"This file changed on disk since it was opened."};if(F.status==="needs-permission")return{ok:!1,error:"Tap Save again to grant write access."};return{ok:!1,error:F.error}},[t,r.baseMtimeMs]);if(r.isImage&&r.imageUrl)return e(Mi,{src:r.imageUrl,name:t.name,className:"flex-1 min-h-0"});if(r.isImage||ku(l)&&(m||b))return e(zl,{kind:l,path:t.path??t.name,name:t.name,source:r.byteSource,content:r.content,root:t.root,repo:t.repo,revision:r.revision,onContentChange:r.onChange,onSaveBytes:r.deviceBacked?void 0:Y,onDirtyChange:r.setBinaryDirty});if(r.isLoading||r.unsupported||r.loadError||g&&b)return e(_o,{fileName:t.name,content:x,path:t.path??t.name,root:t.root,repo:t.repo,fontSize:P,scrollRef:E,onScroll:W.onScroll,isLoading:r.isLoading,unsupported:r.unsupported,loadError:r.loadError,reviewActive:M,onExitReview:A});return e(bu,{ref:N,value:x,onValueChange:r.onChange,language:v,wordWrap:w,documentKey:c,marks:k,currentMark:y,onScroller:R,scrollTestId:"editor-scroller",className:"flex-1 min-h-0 text-ink select-text",themeVars:D.vars,themes:D.themes,indentUnitText:T,typing:B,padding:12,placeholder:"This file is empty",style:{fontFamily:O,fontSize:`${P}px`,lineHeight:vs}})}function $o(){return e("div",{className:"flex items-start gap-2 px-3 py-2 border-b border-error/30 bg-error/10 text-error-text shrink-0",children:[e(I,{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-text",children:"The buffer is still here. Saving recreates the file — autosave is off until then."})]})]})}function Uo({isImage:t,byteViewer:r,viewerKind:l,lineCount:m,charCount:b,language:g,saveStatus:x,path:v,conflicts:w=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:ti[l]}):e(d,{children:[w>0&&e("span",{className:"text-error-text font-semibold tabular-nums",children:["⚠ ",w]}),e("span",{children:[m," lines"]}),e("span",{children:[b," chars"]}),e("span",{className:"uppercase",children:g})]})}),e("div",{className:"flex items-center space-x-2",children:[x==="saving"&&e(d,{children:[e(p,{size:10,className:"animate-spin"}),e("span",{children:"Saving…"})]}),x==="saved"&&e(d,{children:[e("span",{className:"w-1.5 h-1.5 rounded-full bg-success"}),e("span",{children:"Saved"})]}),x==="error"&&e(d,{children:[e("span",{className:"w-1.5 h-1.5 rounded-full bg-error"}),e("span",{className:"text-error-text",children:"Save failed"})]}),x==="idle"&&v&&e("span",{className:"truncate max-w-[140px]",children:v})]})]})}function Go({path:t,content:r,ready:l,surfaceRef:m}){let b=Tu(t,r,l),g=i(null);return o(()=>{if(!b||g.current===b.request)return;g.current=b.request;let x=b.matches[b.currentIndex];if(!x)return;m.current?.select(x.start,x.end,!1),m.current?.revealOffset(x.start)},[b,m]),{matches:b?.matches??[],currentIndex:b?.currentIndex??-1}}function Xo({path:t,content:r,documentKey:l,ready:m,surfaceRef:b,toggleWordWrap:g}){let x=Go({path:t,content:r,ready:m,surfaceRef:b}),v=Su({text:r,documentKey:l,readSelection:()=>b.current?.getSelection()??null,select:(w,c,k=!0)=>b.current?.select(w,c,k),reveal:(w)=>b.current?.revealOffset(w),applyDocument:(w,c,k)=>b.current?.applyDocument(w,c,k),toggleWordWrap:g});if(v.open&&v.matches.length>0)return{find:v,revealMarks:v.matches,currentMark:v.currentIndex};return{find:v,revealMarks:x.matches.length>0?x.matches:void 0,currentMark:x.currentIndex}}function Qo({path:t,symbols:r,total:l,truncated:m,emptyNotice:b,preview:g=!1}){let[x,v]=n(!1);if(!t)return null;let w=(c,k)=>{if(v(!1),g){let y=Rd(r,k);if(y)As({path:t,...y});return}Oo({path:t,line:c.line,column:c.column,length:c.name.length})};return e(d,{children:[e("div",{className:"absolute bottom-14 right-3 z-20",children:e("button",{type:"button",onClick:()=>v(!0),"aria-label":`Outline (${l} symbols)`,title:"Outline",className:"flex h-9 w-9 items-center justify-center rounded-full border border-ink/20 bg-paper text-ink/60 shadow-sm transition-all hover:bg-ink/5 hover:text-ink",children:e(ia,{size:16})})}),x&&e(X,{onClose:()=>v(!1),maxWidthClass:"max-w-sm",zClass:"z-[70]",header:e("div",{className:"flex min-w-0 items-center gap-2",children:[e(ia,{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:m?`${r.length}/${l}`:l})]}),children:e("div",{className:"max-h-[60vh] overflow-y-auto scrollbar-overlay-container py-1",children:[r.length===0?e("div",{className:"px-4 py-3 text-[11px] italic text-ink/40",children:b}):r.map((c,k)=>e("button",{type:"button",onClick:()=>w(c,k),"aria-label":g?`${mi(c.kind)} ${c.name}`:`${mi(c.kind)} ${c.name}, line ${c.line}`,className:"flex w-full min-w-0 items-center gap-2 px-4 py-2 text-left transition-colors hover:bg-ink/5 active:bg-ink/10",style:{paddingLeft:`${16+c.depth*12}px`},children:[e(Cd,{kind:c.kind,size:13}),e("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-ink",children:c.name}),!g&&e("span",{className:"flex-shrink-0 font-mono text-[10px] text-ink/40",children:c.line})]},`${c.line}:${c.kind}:${c.name}`)),m&&e("div",{className:"px-4 py-2 text-[11px] italic text-ink/40",children:Ed(l)})]})})]})}function ot({file:t,missing:r=!1,onClose:l,onFileSaved:m,onDropResult:b}){let g=Fs(t.path??t.name),[x,v]=n({}),[w,c]=n(zo),[k,y]=n(!0),N=jo(),R=Fi(),E=Ou(),W=zu(),P=g==="markdown",M=Ms[g]===!0,A=Eu[g]===!0,D=t.path??t.name,O=x[D]??Bu(g),T=Lu(String(D)),B=P&&O,Y=()=>v((Z)=>({...Z,[D]:!O})),z=du({enabled:Boolean(t.root),onResult:b}),F=_u(t,{flushOnUnmount:!0,reportSaveError:!0,downloadMimeType:"text/plain;charset=utf-8",onFileSaved:m,missing:r}),[te,H]=n(null),q=Xs({tabKey:D,surface:P&&O?"rendered":"code",ready:F.loaded,slot:ib,element:P&&O?void 0:te}),[re,_]=n(null),ne=a((Z)=>{q.ref(Z),_(Z)},[q.ref]);vu({path:t.path??null,scroller:re,preview:P&&O});let ie=i(null),{find:ee,revealMarks:J,currentMark:me}=Xo({path:t.path??null,content:F.content,documentKey:`${D}\x00${F.language}`,ready:F.loaded&&!F.loadError,surfaceRef:ie,toggleWordWrap:()=>y((Z)=>!Z)}),{content:Q,language:oe}=F,ue=Q.split(`
|
|
2
|
-
`).length,ke=hu(Q);Du({file:{id:D,name:t.name,path:t.path??D},editor:F,surfaceRef:ie,isPreview:O,exitPreview:()=>v((Z)=>({...Z,[D]:!1})),publish:!1});let{symbols:ge,total:be,truncated:V,notice:j}=Bd({content:Q,language:oe,path:t.path??null,state:M?"not-a-document":F.loadError?"error":F.loaded?"ready":"loading",note:M?`${ti[g]} files have no text outline.`:F.loadError});return e("div",{className:"fixed inset-x-0 top-0 h-dvh z-[60] bg-paper flex flex-col font-mono text-xs select-none",...z.dropProps,...z.captureDropProps,children:[e($l,{visible:z.isDragging}),e(Bo,{fileName:t.name,hasPreview:A,isPreview:O,wordWrap:k,copied:F.copied,byteViewer:M,missing:r,onSave:F.saveNow,onClose:l,onTogglePreview:Y,hasReview:B,isReviewing:B&&T.active,onToggleReview:T.toggle,onToggleFind:()=>ee.open?ee.close():ee.openFind(),findOpen:ee.open,onToggleWrap:()=>y(!k),onZoomOut:()=>c((Z)=>Math.max(El,Z-1)),onZoomIn:()=>c((Z)=>Math.min(Bl,Z+1)),onCopy:F.copy,onDownload:F.download}),r&&e($o,{}),F.diskChange&&e(Nu,{fileName:t.name,onReload:F.reloadFromDisk,onKeepMine:F.keepMineAgainstDisk}),ee.open&&!M&&e("div",{className:"relative shrink-0 h-9 border-b border-ink/10 bg-paper",children:e(yu,{find:ee})}),e(Ho,{file:t,editor:F,viewerKind:g,byteViewer:M,isPreview:O,isMd:P,content:Q,language:oe,wordWrap:k,fileKey:D,revealMarks:J,currentMark:me,surfaceRef:ie,setCodeScroller:H,previewRef:ne,scroll:q,fontSize:w,reviewActive:B&&T.active,onExitReview:T.toggle,editorTheme:R,editorFontFamily:N,indentUnitText:Pu(E),typing:W}),!M&&e(Qo,{path:t.path??null,symbols:ge,total:be,truncated:V,emptyNotice:j,preview:P&&O}),e(Uo,{isImage:F.isImage,byteViewer:M,viewerKind:g,lineCount:ue,charCount:Q.length,language:oe,saveStatus:F.saveStatus,path:t.path,conflicts:ke}),F.saveMissingConfirm&&t.path&&e(Ru,{fileName:t.name,filePath:t.path,onClose:F.cancelSaveMissing,onConfirm:F.confirmSaveMissing})]})}function tt({diff:t,onClose:r,onFileSaved:l}){let m=t.path.split("/").pop()||t.path,b=Boolean(t.staged),g=t.status||"M",x=sr(g,b);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:ei(),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(mn,{size:18,strokeWidth:1.9})}),e(mt,{name:m,size:14,className:"flex-shrink-0"}),e("span",{className:"font-mono text-xs text-ink font-medium truncate",title:t.path,children:m})]}),e("span",{className:`px-1.5 py-0.5 text-[10px] font-mono font-semibold rounded border flex-shrink-0 ${x.badgeBgClass}`,children:[x.charStatus," ",x.label]})]}),e("div",{className:"flex-1 min-h-0",children:e(gu,{className:"h-full",viewModeButtons:!1,filePath:t.path,status:g,isStaged:b,root:t.root,repo:t.repo||".",journalDiff:t.journal,readOnly:Boolean(t.journal),onFileSaved:l,tabKey:t.journal?tg(t.journal.path,t.journal.from,t.journal.to):eg(t.path,b)})})]})}function De(t,r){let l=t[r];return typeof l==="string"&&l.length>0?l:void 0}function yt(t){let r=t.content;return typeof r==="string"?r:void 0}function Ge(t,r){let l=typeof t==="object"&&t!==null?t:{},m=(De(l,"path")??"").replace(/^\/+/,"");if(!m)return null;return{name:De(l,"name")??m.split("/").pop()??"file",path:m,content:yt(l),root:De(l,"root")??r??void 0,repo:De(l,"repo"),handleId:De(l,"handleId"),deviceFile:l.deviceFile===!0?!0:void 0}}function nt(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 it(t,r,l){ho(l);let m=ur(r);return an(m,BA,{folderId:r,worktreePath:l}),t.setSearchParams((b)=>{let g=Mt(b);return g.set("sessionId",m),g.set("folderId",r.toString()),g},{replace:!0}),t.afterNavigate?.(),m}function Qd({onDesktopToggle:t,appSettings:r={}}){let{folders:l,isMock:m}=at(),b=Qt(),{sessionId:g}=He(),[x,v]=ce(),w=x.get("sessionId"),c=w?Number.isNaN(Number(w))?w:Number(w):null,k=x.get("folderId"),y=k?Number.isNaN(Number(k))?k:Number(k):null,[N,R]=n("main"),E=qe({dock:b,sessionId:g,currentScreen:N,setCurrentScreen:R}),[W,P]=n(null),[M,A]=n(null),[D,O]=n(0),[T,B]=n(!1),[Y,z]=n("appearance"),[F,te]=n(!1),H=a(()=>O((V)=>V+1),[]),q=Iu(nt(W),D),{pushToast:re}=We(),_=a((V)=>re(V.message,V.ok?"success":"error"),[re]),ne=q.size>0;Xe({editorOpen:W!==null,diffOpen:M!==null,settingsOpen:T,offMainScreen:N!=="main",onCloseEditor:()=>P(null),onCloseDiff:()=>A(null),onCloseSettings:()=>{B(!1),te(!1)},onReturnToMain:()=>R("main")});let{folder:ie}=Pl(l,c),ee=ie??(y?l.find((V)=>String(V.id)===String(y))??null:null),J=sg(l,c)??ee?.project_path??null,me=!!ee,Q=du({enabled:me,onResult:_});se("omp:open-file",(V)=>{let Z=Ge(V.detail,J);if(Z)P(Z)}),se("omp:open-diff",(V)=>{let j=V.detail;if(!j?.file)return;A({path:j.file.replace(/^\/+/,""),status:j.status,staged:j.staged,repo:j.repo,root:j.root??J??void 0,...j.source==="journal"&&j.journal?{journal:j.journal}:{}})}),se("omp:view-subagent",()=>R("main")),se("omp:open-settings",(V)=>{let j=V.detail;z(j?.category??"appearance"),te(Boolean(j?.autoOpenAdd)),B(!0)});let oe=(V)=>{v((j)=>{let Z=Mt(j);if(Z.set("sessionId",V.toString()),Z.has("subagent"))Z.delete("subagent");return Z},{replace:!0}),R("main")},ue=()=>{v(new URLSearchParams,{replace:!0}),R("main")},ke=(V)=>{let j=Ql(l,w,V);if(j)ho(j);v((Z)=>Fc(Z,ur(V),V),{replace:!0}),R("main")},ge=(V,j)=>it({setSearchParams:v,afterNavigate:()=>R("main")},V,j),be=a((V)=>{let j=Ge(V,J);if(j)P(j)},[J]);return e("div",{"data-testid":"app-root",className:"app-window flex flex-col h-dvh w-screen overflow-hidden bg-canvas text-ink font-sans selection:bg-ink selection:text-canvas relative",children:[e(mg,{}),e(fg,{isMock:m}),e(gg,{workspacePath:J}),e("div",{className:`flex-1 min-h-0 w-full relative ${N==="main"?"block":"hidden"}`,...Q.dropProps,...Q.captureDropProps,children:[e($l,{visible:Q.isDragging}),e(eo,{activeSessionId:c,onSelectSession:oe,onNewSession:ue,onOpenSessionSidebar:E.openSessionDrawer,onOpenRightSidebar:E.openRightDrawer,appSettings:r})]}),e("div",{className:`flex-1 min-h-0 w-full ${N==="session"?"block":"hidden"}`,children:e(Do,{activeSessionId:c,onSelectSession:oe,onNewSession:ue,onNewSessionForFolder:ke,onNewWorktreeSession:ge,onClose:()=>R("main"),onDesktopToggle:t,appSettings:r,rootPath:J??void 0,refreshKey:D,onRefresh:H,onOpenFile:be,revealSignal:E.left})}),N==="right"&&e("div",{className:"flex-1 min-h-0 w-full",children:e(Io,{enabled:me,rootPath:J??void 0,refreshKey:D,onRefresh:H,onOpenFile:be,onClose:()=>R("main"),revealSignal:E.right})}),W&&e(ot,{file:W,missing:ne,onClose:()=>P(null),onFileSaved:H}),M&&e(tt,{diff:M,onClose:()=>A(null),onFileSaved:H}),e(Dl,{isOpen:T,onClose:()=>{B(!1),te(!1)},initialCategory:Y,autoOpenAddProvider:F,appSettings:r})]})}export{Qd as MobileLayoutWrapper};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{kg}from"./index-ssepzdaz.js";import"./index-jnxmvxb8.js";import"./index-t71k3b28.js";export{kg as MergeDiffView};
|