@kabmo-labs/kabmo 0.58.1 → 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 +513 -495
- package/dist/client/static/js/{Body-ysmhxbvk.js → Body-jqq4654r.js} +3 -3
- package/dist/client/static/js/{CsvGrid-w90pxyn2.js → CsvGrid-avw0taqb.js} +2 -2
- package/dist/client/static/js/{DocxView-evxn6kaq.js → DocxView-d221vr6g.js} +3 -3
- package/dist/client/static/js/{DrawioView-tmdevwf4.js → DrawioView-gjsy7p01.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-bpsn2z9p.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-txxn6qff.js → PdfView-dzj2s6rj.js} +1 -1
- package/dist/client/static/js/SessionsView-b6szjdg5.js +1 -0
- package/dist/client/static/js/{SheetView-52b33e6f.js → SheetView-jpc178g5.js} +11 -11
- package/dist/client/static/js/{SvgPreview-hrk4pfm1.js → SvgPreview-94fap32p.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-at77sybc.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-raw33jgg.js → architectureDiagram-NJMV4G6O-pgmyfncy.js} +3 -3
- package/dist/client/static/js/{astro-qha7sceh.js → astro-ryr2ajmg.js} +1 -1
- package/dist/client/static/js/bash-zknkkwkw.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-b6e90fbk.js → blockDiagram-BEXU5L5S-rf51jyb2.js} +4 -4
- package/dist/client/static/js/c-0w02jkxb.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-msg9y1c6.js → c4Diagram-YGBWAQC7-0faj48jp.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-jmrd1h8r.js → classDiagram-v2-NBCMYWYE-bvzsws8x.js} +4 -4
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-na65ebq3.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-9xkkw71m.js → cynefinDiagram-VND7K2PF-f73w6zzz.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-p59f19tv.js → dagre-6A5THRUB-a5vgvjsg.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-2e2rcvn7.js → diagram-22UHCM2B-6y9efamp.js} +9 -9
- package/dist/client/static/js/{diagram-3UASUU5V-r9ds8vgr.js → diagram-3UASUU5V-2mycy7xm.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-jgwxv7v8.js → diagram-ATOU4E4O-10zgjb66.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-20m35eqq.js → diagram-CDSNMT55-bewa52yf.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-vt3kxt2m.js → diagram-MLGK6HIB-mh3b7gd3.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-c47rgxf1.js → diagram-MPIPVDR6-gvdrbdm5.js} +2 -2
- package/dist/client/static/js/{dockerfile-gtcyey0q.js → dockerfile-6bn19kg0.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-aszw3xy3.js → ebnfDiagram-ZINNZB2B-2prre93c.js} +1 -1
- package/dist/client/static/js/{elixir-w92v180e.js → elixir-fyxw6d70.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-gbvr3gry.js → elk-276RUBZZ-9t6t9kc6.js} +2 -2
- package/dist/client/static/js/{erDiagram-OPXOYQCR-1hqca8qe.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-07v22te5.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-y068jtz9.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-r8d4bk86.js → index-10vzyga1.js} +2 -2
- package/dist/client/static/js/{index-8d8ce00v.js → index-27gwghmp.js} +2 -2
- package/dist/client/static/js/{index-zhgh7a31.js → index-2f6afhze.js} +2 -2
- package/dist/client/static/js/{index-nptbz7sv.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-s4dpkds5.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-gqrt766t.js → index-60cxxnpk.js} +61 -61
- package/dist/client/static/js/{index-th61y26d.js → index-69mnn71v.js} +2 -2
- package/dist/client/static/js/{index-e0kahttb.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-zs7kw0be.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-f61c25vn.js → index-9rvjegmy.js} +3 -3
- package/dist/client/static/js/{index-80kx6dm6.js → index-a3bpmw2r.js} +2 -2
- package/dist/client/static/js/{index-xmg1x6zv.js → index-a5ecn5yx.js} +5 -5
- package/dist/client/static/js/{index-azz46nwc.js → index-ax8gaayq.js} +2 -2
- package/dist/client/static/js/{index-wn28m9h7.js → index-c253x7vt.js} +8 -8
- package/dist/client/static/js/{index-y0f3wbc3.js → index-d9sfavx1.js} +2 -2
- package/dist/client/static/js/{index-5hvt233n.js → index-db6s66jr.js} +2 -2
- package/dist/client/static/js/index-eggbcdwx.js +481 -0
- package/dist/client/static/js/{index-e4nge3f4.js → index-f13ern5e.js} +1 -1
- package/dist/client/static/js/index-f6t91mpp.js +2 -0
- package/dist/client/static/js/{index-wxqcnsrq.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-fv7nybnf.js → index-fyt8m8ah.js} +2 -2
- package/dist/client/static/js/{index-007sewcn.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-medk4f18.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-qefssj0m.js → index-jpvng27a.js} +1 -1
- package/dist/client/static/js/{index-vw8b29ek.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-fe92hqmb.js → index-mngpcca7.js} +4 -4
- package/dist/client/static/js/index-mttx9327.css +1 -0
- package/dist/client/static/js/{index-5xxbbzqa.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-cmjyet7w.js → index-nf4hq5tg.js} +27 -27
- package/dist/client/static/js/{index-cpp43af3.js → index-njhrm5qa.js} +9 -9
- 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-2s17netq.js → index-nwbr15b3.js} +2 -2
- package/dist/client/static/js/{index-an7fq7f6.js → index-pa70qj4p.js} +1 -1
- package/dist/client/static/js/index-pe5f2gmn.js +1 -0
- package/dist/client/static/js/{index-1e0rt7c6.js → index-pgy7ree5.js} +5 -5
- package/dist/client/static/js/index-pzwf6hwe.js +4 -0
- package/dist/client/static/js/{index-7sq6cjt1.js → index-q3k8r0ms.js} +11 -11
- package/dist/client/static/js/{index-j830qk07.js → index-rw84kefb.js} +2 -2
- package/dist/client/static/js/{index-94d416ee.js → index-s9ts6qbj.js} +2 -2
- package/dist/client/static/js/{index-vny4ymjf.js → index-sg65xdey.js} +1 -1
- package/dist/client/static/js/{index-hb7a7m9m.js → index-skvfxcd8.js} +1 -1
- package/dist/client/static/js/{index-1e710snk.js → index-sx2yz2wx.js} +1 -1
- package/dist/client/static/js/{index-kzzvrqnv.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-374xq5a4.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-c9aqx3ht.js → index-yg38s8t3.js} +1 -1
- package/dist/client/static/js/{index-dxq1tbwm.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-1x83h4k4.js → infoDiagram-VRGFBTTK-9xph6cr5.js} +2 -2
- package/dist/client/static/js/ini-62r3vxaf.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-et6z3c28.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-sw669e7a.js → journeyDiagram-ZHPQQLJL-fa8x56mf.js} +2 -2
- 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-z14p8jsx.js → julia-agc5kfvg.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-aqxg95kx.js → kanban-definition-PNTS6WVX-fybp2hh4.js} +6 -6
- 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-530anpc4.js → mindmap-definition-NLK3R4M7-gtfbg619.js} +4 -4
- 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-5zar6hvy.js → pegDiagram-GJSIUBJH-1a51sbqv.js} +1 -1
- package/dist/client/static/js/{perl-1na2x6yd.js → perl-v5vbtzgf.js} +1 -1
- package/dist/client/static/js/{php-x75tt7w3.js → php-83qwy98t.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-b8pgsqrd.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-3bx8syvw.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-yaarpr2e.js → quadrantDiagram-O4NWA36T-5gtw2m6s.js} +2 -2
- 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-ag41q4nt.js → railroadDiagram-XR7U4H2S-3ccwpfzz.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-g8sr48h4.js → requirementDiagram-PLB6GJNP-sasndrrp.js} +3 -3
- package/dist/client/static/js/{ruby-3h22qahv.js → ruby-994n5j6e.js} +1 -1
- package/dist/client/static/js/{rust-r27demr5.js → rust-n9z2c9m3.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-t1wbd1hh.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-c04ezwnn.js → scss-4j4t3r6y.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-407mjqty.js → sequenceDiagram-PO4LG4MO-bfj90kz1.js} +7 -7
- package/dist/client/static/js/{sizeCapture-INFHLROL-w38zb9ky.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-4cvgymkc.js → stateDiagram-v2-GCMORJYK-533xw76e.js} +3 -3
- package/dist/client/static/js/{svelte-egg3x4tw.js → svelte-bek3h1sz.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-w7ts2rzw.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-nq46nzy9.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-q144snzb.js → usecaseDiagram-POWQR4AR-tm1f0m4x.js} +15 -15
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-2wemak2p.js → vennDiagram-UO4OBE2U-2vdvv1hd.js} +4 -4
- package/dist/client/static/js/{vue-d7p4wv35.js → vue-y44m889c.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-cbqtax1x.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-bb2qvvgr.js → wardleyDiagram-VNRHLVJA-7avcjznx.js} +4 -4
- package/dist/client/static/js/xml-xs6qz3ya.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-9dr05fdq.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/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/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 +45 -28
- 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 +27 -11
- 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/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/ThinkingSection.test.tsx +17 -0
- package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +9 -3
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +39 -2
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +19 -4
- 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 +44 -21
- 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 +24 -0
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +14 -3
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +24 -1
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +78 -135
- package/src/client/components/workspace/chat-timeline/chat-input/VoiceButton.tsx +58 -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/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/index.tsx +1 -1
- 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/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/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/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/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-ssazqckj.js +0 -1
- package/dist/client/static/js/LayoutWrapper-qwpfq4dq.js +0 -2
- package/dist/client/static/js/MergeDiffView-en6aazw8.js +0 -1
- package/dist/client/static/js/Modal-zjnhj9nb.js +0 -60
- package/dist/client/static/js/SessionsView-eryjtmb2.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-v05ap4e3.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-q2k6afe3.js +0 -1
- package/dist/client/static/js/css-sp1cgdbr.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-sqv0ze38.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-t4dzf5s7.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-c16xmjyv.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-0jq8y0qd.js +0 -1
- package/dist/client/static/js/graphql-qx4tt6ze.js +0 -1
- package/dist/client/static/js/html-5e0g8664.js +0 -1
- package/dist/client/static/js/index-4ddgpqm0.css +0 -1
- package/dist/client/static/js/index-5g2j626a.js +0 -1
- package/dist/client/static/js/index-cc7qbfvn.js +0 -477
- package/dist/client/static/js/index-f27wvdky.js +0 -4
- package/dist/client/static/js/index-m5n0zsft.js +0 -2
- package/dist/client/static/js/index-rqt8mem9.js +0 -2
- package/dist/client/static/js/index-s9k82stc.js +0 -2
- package/dist/client/static/js/index-skwem10a.js +0 -2
- package/dist/client/static/js/index-tv9rn2nd.js +0 -2
- package/dist/client/static/js/info-A6RAGUB7-szttx3v5.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-av46zx4c.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-6cgqsgcf.js +0 -12
- package/dist/client/static/js/one-dark-pro-9hnhtkpr.js +0 -1
- package/dist/client/static/js/one-light-2n5y8592.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-401149bv.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-bgfv8tfz.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-pw720590.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-n2a30ngs.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-rn5rx9qt.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-t4yryhtd.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-c4ebgvrr.js +0 -1
- package/dist/client/static/js/sql-sd00wgem.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-v82nym6b.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-bxgt5yhm.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-hh3595m0.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-6bza7h1b.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.test.tsx +0 -110
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +0 -86
|
@@ -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-cc7qbfvn.js";import{Mi}from"./index-zs7kw0be.js";import{Mu}from"./index-wn28m9h7.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,Pe,ce,Ut,Ic,e,s,Le,Ie,p,dn,pn,B,mt,mn,f,C,se,ft,ae,me,Qt,nt,yn,de,Ye,Ae,Sa,ia,nn,Da,ir,L,S,U,hl,h,sr,bl,We,xe,an,Nh,io,Rm,kn,Ne,Rt,Po,Je,kl,Or,$e,X,gt,Re,Me,Oo,As,Rd,Tc,le,Ve,bs,Qc,i0,Lc,Mt,Fc,vs,zo,El,Bl,jo,ot,ct,pa,it,Tl,Ao,Dl,ru,$a,au,jd,Is,za,qo,Wo,Ko,Tt,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,_n,ng,rg,ag,og,BA,Pl,sg,lg,du,$l,mg,fg,np,gg,mb}from"./index-cc7qbfvn.js";import{lp}from"./index-tv9rn2nd.js";import"./index-7sq6cjt1.js";import{fu,gu,Au,hu,bu,yu,vu,Mi,ku,zl,xu}from"./index-zs7kw0be.js";import{Xs}from"./index-5xxbbzqa.js";import"./index-zhgh7a31.js";import{Ms,Eu,Bu,ti,Fs,Iu,_u,Su,Tu,Du,Nu,Ru,Lu}from"./index-wn28m9h7.js";import{wd,Cd,mi,Ed,Bd}from"./index-f61c25vn.js";import{yt,Fi,Pu,Ou,zu}from"./index-skwem10a.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-f27wvdky.js";import{Wa,Ka}from"./index-kzzvrqnv.js";import{Sd}from"./index-m5n0zsft.js";function qe(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 ht="terminal";function Ue(t){return t===ht}function Ee(t){if(Ue(t))i0()}function Ze({dock:t,sessionId:r,currentScreen:l,setCurrentScreen:m}){let[b,g]=n(0),[x,v]=n(0),w=a(()=>{let y=xe(r,"layout.mobileRightPanel")??Ic;Ee(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=xe(r,"layout.mobileRightPanel");if(N==="right"&&(l!=="right"||R!==y))Ee(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 le(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"}]]},Qe=s(bt);function Be(){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 vt=10,eo=600000;function oo({activeSessionTitle:t,activeSessionId:r,onOpenSessionSidebar:l,onOpenRightSidebar:m,onNewSession:b,onSelectSession:g}){let{folders:x}=it(),v=np(),w=za(r),[c,k]=n(null),{hidden:y,setHidden:N}=rg(),R=Be(),E=Jd("mobile"),I=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)),W=O.updated_at?Date.parse(O.updated_at):0,Y=T!==void 0&&M-T<=eo?T:W;if(T!==void 0&&M-T>eo)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,vt)},[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(Qe,{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:Re(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(Me,{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:I.length===0?e("div",{className:"px-2.5 py-2 text-ink/40 italic",children:"No sessions yet"}):I.map((M)=>e("button",{type:"button",onClick:()=>{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!==_n.install).map((M)=>({...M,removable:!0})),hidden:y,onToggle:N,onClose:R.close}):null]})}function to({activeSessionId:t,onSelectSession:r,onNewSession:l,onOpenSessionSidebar:m,onOpenRightSidebar:b,appSettings:g={}}){let{folders:x}=it(),[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(oo,{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 no({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 ro({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(Ae,{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 so(t){let r=Zf(),l=Yf();return le(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 ao(t,r,l){return t.filter((m)=>m.id!==r&&!(l&&m.side==="left"))}function lo(t){return t}var St=8;function _e({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(),I=qf({scrollLeft:c.scrollLeft,clientWidth:c.clientWidth,scrollWidth:c.scrollWidth,start:E.left-R.left+c.scrollLeft,size:E.width},St);if(I!==c.scrollLeft)c.scrollLeft=I},[]);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 co({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(_e,{panels:t,activeId:r,onSelect:l})})}function po({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(Pe,{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 De="w-9.5 h-9.5 rounded-xl border flex items-center justify-center transition-all flex-shrink-0 cursor-pointer shadow-xs",Oe="border-ink/15 bg-paper hover:bg-ink/5 text-ink/80 hover:text-ink",mo="bg-ink/10 text-ink border-ink/30";function uo({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:I,onSearchChange:P,onClearSearch:M,onSelectWorkspaces:A,selecting:D}){let{ref:O,width:T}=zs(0),W=zA(T),Y={};for(let q of Ap.slice(0,W))Y[q]=!0;let z=Ap.slice(W),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:mt,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:`${De} ${Oe}`,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 ${De} ${Oe}`,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:`${De} ${m?"bg-warning/15 border-warning/40 text-warning-text":Oe}`,title:F,"aria-label":F,children:e(mt,{size:16,strokeWidth:1.8})}),Y.select&&e("button",{type:"button",onClick:A,"aria-pressed":D,className:`${De} ${D?mo:Oe}`,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:`${De} ${Oe}`,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:`${De} ${l||r!=="A-Z"?mo:Oe}`,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(mt,{size:10}),e("span",{children:"Archived"}),e("button",{type:"button",onClick:I,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 fo({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),I=(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(Re(N.current));y((M)=>!M)},className:xt,title:"Workspace options","aria-label":`Options for ${t.name}`,"aria-haspopup":"menu","aria-expanded":k,children:e(Ie,{size:15})}),e(Me,{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?I(l):void 0,onNewWorktree:r&&m?I(m):void 0,onSelectSessions:b?I(b):void 0,confirmDelete:g,onPin:I(x),onDelete:I(v),onRequestDelete:w,onCancelDelete:c})})]})}var bo={inset:"",insetPx:0,slotWidth:16,markGap:8,padding:"py-2",glyph:ct.touch};function go({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:I,onRename:P,onRenameWithAi:M,waitingFor:A,onCancelWait:D,selectable:O=!1,selected:T=!1,onToggleSelect:W}){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||I||D),J=Boolean(A),pe=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?W: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:()=>W?.()}):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(Ye,{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(ot,{harness:r,size:ct.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(Ie,{size:16})}),pe&&!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(se,{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:I,onCancelWait:D,onClose:ne.close})]})}function vo(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 So({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(ft,{size:12}),e("span",{className:"truncate",children:"Show less"})]})]})}function xo(t){return t?"mb-4":"mb-1"}function wo({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:I,canShowLess:P}=Gs(),M=vo(t,(G)=>b?.(t.id,G)),{refresh:A,runStartedAtMap:D}=it(),{expandedSessionIds:O,toggleSession:T}=Ds(),[W]=ce(),Y=W.get("subagent"),z=W.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(),pe=q,Q=re,oe=ee??void 0,ue=(t.sessions||[]).filter((G)=>v?G.is_archived===1:G.is_archived!==1),Se=pa(t.icon),{folderCheckbox:he,sessionCheckboxes:fe,folderSummary:V,toggleFolderSelection:j,rendered:Z,hiddenCount:we}=Js({batch:k,folder:t,sessions:ue,showArchived:v,visibleCount:R,activeSessionId:r,sessionStatus:w}),Ce=ai(Z),ge=g||fe,ke=(G,Te)=>{let be=String(G.id),Xe=String(r)===be,pt=Xe&&z===be&&Boolean(Y),Ke=Tt(be);return e(go,{session:G,harness:G.harness,folderId:G.folder_id,isActive:Xe&&!pt,status:w[be],awaitingInput:Boolean(G.awaitingInput),timeAgo:qs(G.updated_at??G.created_at),timeTitle:ri(G.updated_at??G.created_at),runStartedAt:w[be]==="stream"?D[be]:void 0,expandable:Te.expandable,isChild:Te.isChild,isExpanded:Te.isExpanded,onToggleExpand:Te.onToggleExpand,onSelect:()=>l(G.id),onArchive:()=>_(G),onDelete:Ke?void 0:()=>J.requestDelete(G),onRename:Ke?void 0:(ut)=>void ne(G,ut),onRenameWithAi:Ke?void 0:()=>void ie(G),waitingFor:G.waitingFor?{title:G.waitingFor.title}:void 0,onCancelWait:G.waitingFor?()=>N?.(G.waitingFor.waitId):void 0,selectable:fe,selected:Boolean(k?.selected.includes(be)),onToggleSelect:k?()=>k.toggle(be):void 0})},dt=(G)=>Ys(G,Ce.childrenOf,O,T);return e("div",{className:xo(ge),"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:[he&&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(Se,{size:15,className:"text-ink/80",style:{color:t.accentColor||void 0}})})}),e("span",{className:"text-sm font-semibold text-ink truncate",children:t.name})]}),e("div",{className:"flex items-center space-x-2 text-xs text-ink/60",children:[e("span",{className:"font-mono text-[11px] text-ink/70",children: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(fo,{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:pe,onDelete:Q,onRequestDelete:te,onCancelDelete:H}),e("span",{className:"flex items-center justify-center pr-1",children:g?e(C,{size:14}):e(se,{size:14})})]})]})]}),ge&&e("div",{className:"mt-0.5 space-y-0.5",children:[Ce.roots.map((G)=>{let Te=String(G.id),be=dt(G);return e("div",{className:"space-y-0.5",children:[ke(G,be),be.isExpanded&&e(Oi,{parentId:Te,hasSubagents:Boolean(G.hasSubagents),childrenOf:Ce.childrenOf,expandedIds:O,onToggle:T,activeSessionId:r===null?null:String(r),renderSession:ke,style:bo})]},G.id)}),e(So,{hiddenCount:fe?0:we,canShowLess:!fe&&P,onShowMore:E,onShowLess:I})]}),e(Wo,{session:J.pending,isDeleting:J.isDeleting,error:J.error,onClose:J.cancelDelete,onConfirm:()=>void J.confirmDelete()}),M.dialog]})}function ko({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(wo,{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 yo(){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 No({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:I,selecting:P,batch:M,onNewSession:A,onNewWorkspace:D,onScheduler:O,onRefresh:T,onToggleOptions:W,onSortChange:Y,onResetSort:z,onToggleArchived:F,onHideArchived:te,onSearchChange:H,onClearSearch:q,onSelectWorkspaces:re,onSelectSession:_,onNewSessionForFolder:ne,onNewWorktreeSession:ie,onToggleFolder:ee,onToast:J,onStartSessionSelection:pe,onCancelWait:Q}){return e(d,{children:[e(uo,{searchQuery:x,sortOption:v,optionsOpen:w,showArchived:c,optionsRef:R,onNewSession:A,onNewWorkspace:D,onScheduler:O,scheduledCount:E,onRefresh:T,refreshing:I,onToggleOptions:W,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:I}):r?e(yo,{}):e(ko,{folders:t,activeSessionId:m,expandedFolders:b,showArchived:c,sessionStatus:g,onSelectSession:_,onNewSessionForFolder:ne,onNewWorktreeSession:ie,onToggleFolder:ee,onToast:J,batch:M,onStartSessionSelection:pe,onCancelWait:Q})]})}function Co({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:I,onToast:P,onArchiveSelected:M,onCancelWait:A}){let{initializing:D,failed:O,refreshNow:T,isRefreshing:W,searchQuery:Y,setSearchQuery:z,showArchived:F,setShowArchived:te,optionsOpen:H,setOptionsOpen:q,sortOption:re,handleSortChange:_,harnessFilter:ne,setHarnessFilter:ie,harnessOptions:ee,processedFolders:J,sessionStatus:pe,handleSelectSession:Q}=r,{selection:oe,deleteRun:ue,archiveRun:Se,binding:he,scopeFolder:fe,available:V,selected:j}=l,Z={className:"flex-1 min-h-0 w-full",folders:J,initializing:D,failed:O,activeSessionId:v,sessionStatus:pe,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:W,scheduledCount:w,onNewSession:k,onNewWorkspace:y,onScheduler:N,onSelectSession:Q,onNewSessionForFolder:E,onNewWorktreeSession:I,onToast:P,onCancelWait:A,batch:he,onSelectWorkspaces:l.toggleWorkspaceSelection,onStartSessionSelection:(we)=>oe.begin("session",we)};return e(d,{children:[e("div",{className:m.showingSessions?"contents":"hidden",children:[t==="modern"?e(Hu,{...Z,touch:!0}):e(No,{folders:J,initializing:D,failed:O,activeSessionId:v,expandedFolders:g,sessionStatus:pe,searchQuery:Y,sortOption:re,optionsOpen:H,showArchived:F,harnessFilter:ne,onHarnessFilterChange:ie,harnessOptions:ee,optionsRef:x,scheduledCount:w,refreshing:W,selecting:oe.mode!==null,batch:he,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:I,onToggleFolder:c,onToast:P,onStartSessionSelection:(we)=>oe.begin("session",we),onCancelWait:A}),oe.mode&&e(Yu,{drawer:!0,mode:oe.mode,count:j.length,total:V.length,busy:ue.isDeleting,archiving:Se.isArchiving,scopeLabel:fe?.name,onSelectAll:()=>oe.selectAllOf(V),onUnselectAll:()=>oe.unselectAllOf(V),onDelete:()=>ue.request(j),onArchive:M,onCancel:oe.end})]}),m.showingSessions?null:e(po,{panelKey:m.activeView,panel:m.activePanel,body:b})]})}function Mo(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 He(t){return{dragRegion:!0,layout:"mobile",rootProps:{...Ua(),...t},style:{paddingLeft:Ni(Di("0.75rem",!0)),paddingRight:Fl("0.75rem",!0)}}}function Ro({side:t,onClose:r}){let l=t==="left"?dn:ir;return e("button",{type:"button",onClick:r,className:`${Je.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 To({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 Eo(){let t=Rt(),r=dr("left"),[l,m]=io("layout.mobileLeftPanel",Ne),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,Ne);return{catalog:r,activeView:b,setActiveView:m,showingSessions:b===Ne,activePanel:r.find((c)=>c.id===b),enabled:t.enabled,tabsMode:x,tabs:x?w:null}}function Do(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 Fo({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,I]=n({1:!0,2:!0,3:!0}),P=i(null);$e(P,()=>v.setOptionsOpen(!1));let M=(T)=>{I((z)=>({...z,[T]:!z[T]}));let W=w.find((z)=>z.id===T),Y=!(E[T]??W?.isExpanded??!0);hp(T,Y)},A=c.map((T)=>`${T.id}:${T.isExpanded}`).join("|");o(()=>{I(Object.fromEntries(c.map((T)=>[T.id,T.isExpanded])))},[A]);let D=Eo(),O=Do({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 ze(t){let{disabledPanels:r}=kn(),{setEnabled:l}=Tl(),m=Be(),b=Hf(t),g=a((x,v)=>{l(x,v)},[l]);return{...m,items:b,hidden:r,toggle:g}}function Io({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:I,toggleFolder:P,optionsRef:M,dock:A,dockBody:D}=Fo({appSettings:v,onSelectSession:r,onClose:g,rootPath:w,refreshKey:c,onRefresh:k,onOpenFile:y}),{showArchived:O,setShowArchived:T}=R,{selection:W,deleteRun:Y,archiveRun:z,selected:F,scopeFolder:te}=E,H=Sd(),q=ze("left"),[re,_]=n(!1),[ne,ie]=n(!1),ee=Uu(),[J,pe]=n(!1),{pushToast:Q}=Ve(),oe=Rl(Q);Wu({onNotice:Q});let{updates:ue,shellDownload:Se}=so({onClose:g,openAbout:()=>pe(!0),pushToast:Q}),{tabs:he}=Mo(A,N),fe=()=>{l(),g()},V=()=>{z.archive(F).then((ge)=>{if(!ge)return;let ke=Ku(ge);if(ke)Q(ke.message,ke.tone);if(!ge.error)W.end()})},j=(ge)=>{m(ge),g()},Z=()=>{T(!O)},we=b?(ge,ke)=>{b(ge,ke),g()}:void 0,Ce=e(Co,{sidebarStyle:H,controller:R,batch:E,dock:A,dockBody:D,expandedFolders:I,optionsRef:M,activeSessionId:t,scheduledCount:ee,onToggleFolder:P,onNewSession:fe,onNewWorkspace:()=>_(!0),onScheduler:()=>ie(!0),onToggleArchived:Z,onNewSessionForFolder:j,...we?{onNewWorktreeSession:we}:{},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(no,{onClose:g,viewLabel:A.showingSessions?"Sessions":A.activePanel?.label??"Panel",menuProps:q.surfaceProps}),!A.tabsMode&&lo(A.enabled)?e(co,{panels:A.catalog,activeId:A.activeView,onSelect:A.setActiveView,menuProps:q.surfaceProps}):null,A.tabsMode&&he?e("div",{className:"flex-1 min-h-0 flex flex-col",children:e(Ns,{catalog:A.catalog,tabs:he,pinned:Ne,homeTitle:"Panel kiri",stripProps:He(q.surfaceProps),children:e("div",{className:"h-full w-full",children:Ce})})}):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:Ce}),e(ro,{onSettings:()=>window.dispatchEvent(new CustomEvent("omp:open-settings",{detail:{}})),onKeyBindings:Qc,onAbout:()=>pe(!0),shellDownload:Se,onDesktopToggle:x,updateAvailable:ue.hasUpdate,onUpdateClick:()=>{pe(!0),ue.check()}}),e(To,{activeSessionId:t,newWorkspaceOpen:re,onCloseNewWorkspace:()=>_(!1),schedulerOpen:ne,onCloseScheduler:()=>ie(!1),aboutOpen:J,onCloseAbout:()=>pe(!1),updates:ue,pushToast:Q,batchDelete:Y,batchMode:W.mode,onEndBatch:W.end,scopeLabel:te?.name})]})}function Lo({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(_e,{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 Ge({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(Pe,{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 Bo({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}=We(),k=Rt(),y=ao(dr("all"),Ne,k.enabled),N=y.find((_)=>_.id===v)??y[0],E=lp("right")==="tabs",I=u(()=>new Set(y.map((_)=>_.id)),[y]),P=Qs("right",I,null),M=xe(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:I});let{open:A,tabs:D}=P,O=(_)=>{if(_!==N?.id)Ee(_)},T=i(!1),W={...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)||!I.has(v))return;A(v)},[E,P.home,M,v,D,A,I]);let Y=Rm(r,t),{changes:z}=bl(r,Y,t),F=z.length>0,te=a((_)=>{if(_!==N?.id)Ee(_);w(_)},[N?.id,w]);o(()=>{if(!Ue(N?.id))Lc()},[N?.id]);let H=ze(k.enabled?"right":"all"),q=k.enabled?H.items:H.items.filter((_)=>_.id!==Ne),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(Lo,{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:W,homeTitle:"Panel kanan",stripProps:He(H.surfaceProps),actions:e(Ro,{side:"right",onClose:g}),children:e("div",{className:"h-full w-full",children:e(Ge,{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(Ge,{panel:N,body:re})})]})}function ye({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:`${Je.mobile} flex-none cursor-pointer rounded-lg transition-colors ${g}`,children:b})}var ve=Or.mobile;function _o({actions:t}){let[r,l]=n(!1),m=i(null);return $e(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:`${Je.mobile} flex-none cursor-pointer rounded-lg text-ink/70 transition-colors hover:bg-ink/10 hover:text-ink`,children:e(Ie,{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 Ho({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:I,onZoomOut:P,onZoomIn:M,onCopy:A,onDownload:D}){let O=uu(kt),T=u(()=>{let W=[];if(!w)W.push({id:"wrap",label:x?"Word wrap: on":"Word wrap: off",icon:pn,onSelect:I},{id:"zoom-out",label:"Decrease font size",icon:Ka,onSelect:P},{id:"zoom-in",label:"Increase font size",icon:Wa,onSelect:M});if(!O)W.push({id:"copy",label:v?"Copied":"Copy content",icon:v?f:ae,onSelect:A},{id:"download",label:"Download file",icon:me,onSelect:D});return W},[w,O,x,v,I,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(ye,{label:"Close editor",onClick:y,children:e(mn,{size:ve,strokeWidth:2})}),e("div",{className:"flex min-w-0 items-center gap-1.5",children:[e(gt,{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(ye,{label:"Save and recreate the file",onClick:k,danger:!0,children:e(yt,{size:ve})}),!w&&e(ye,{label:E?"Close find":"Find in file",onClick:R,active:E,children:e(U,{size:ve})}),m&&e(ye,{label:b?"Exit review mode":"Review this document",onClick:g,active:b,children:e(nn,{size:ve})}),r&&e(ye,{label:l?"View source":"Show preview",onClick:N,active:l,children:l?e(Qt,{size:ve}):e(nt,{size:ve})}),O&&e(d,{children:[e(ye,{label:"Copy content",onClick:A,children:v?e(f,{size:ve,className:"text-success-text"}):e(ae,{size:ve})}),e(ye,{label:"Download file",onClick:D,children:e(me,{size:ve})})]}),T.length>0&&e(_o,{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(B,{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 Uo({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:I,fontSize:P,reviewActive:M,onExitReview:A,editorTheme:D,editorFontFamily:O,indentUnitText:T,typing:W}){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:I.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:W,padding:12,placeholder:"This file is empty",style:{fontFamily:O,fontSize:`${P}px`,lineHeight:vs}})}function Go(){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(B,{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 Xo({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 Qo({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 et({path:t,content:r,documentKey:l,ready:m,surfaceRef:b,toggleWordWrap:g}){let x=Qo({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 tt({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 rt({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(),I=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)),W=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:pe}=et({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,Se=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:he,total:fe,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(Ho,{fileName:t.name,hasPreview:A,isPreview:O,wordWrap:k,copied:F.copied,byteViewer:M,missing:r,onSave:F.saveNow,onClose:l,onTogglePreview:Y,hasReview:W,isReviewing:W&&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(Go,{}),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(Uo,{file:t,editor:F,viewerKind:g,byteViewer:M,isPreview:O,isMd:P,content:Q,language:oe,wordWrap:k,fileKey:D,revealMarks:J,currentMark:pe,surfaceRef:ie,setCodeScroller:H,previewRef:ne,scroll:q,fontSize:w,reviewActive:W&&T.active,onExitReview:T.toggle,editorTheme:R,editorFontFamily:N,indentUnitText:Pu(E),typing:I}),!M&&e(tt,{path:t.path??null,symbols:he,total:fe,truncated:V,emptyNotice:j,preview:P&&O}),e(Xo,{isImage:F.isImage,byteViewer:M,viewerKind:g,lineCount:ue,charCount:Q.length,language:oe,saveStatus:F.saveStatus,path:t.path,conflicts:Se}),F.saveMissingConfirm&&t.path&&e(Ru,{fileName:t.name,filePath:t.path,onClose:F.cancelSaveMissing,onConfirm:F.confirmSaveMissing})]})}function st({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(gt,{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 Fe(t,r){let l=t[r];return typeof l==="string"&&l.length>0?l:void 0}function Nt(t){let r=t.content;return typeof r==="string"?r:void 0}function je(t,r){let l=typeof t==="object"&&t!==null?t:{},m=(Fe(l,"path")??"").replace(/^\/+/,"");if(!m)return null;return{name:Fe(l,"name")??m.split("/").pop()??"file",path:m,content:Nt(l),root:Fe(l,"root")??r??void 0,repo:Fe(l,"repo"),handleId:Fe(l,"handleId"),deviceFile:l.deviceFile===!0?!0:void 0}}function at(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 lt(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}=it(),b=Rt(),{sessionId:g}=We(),[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=Ze({dock:b,sessionId:g,currentScreen:N,setCurrentScreen:R}),[I,P]=n(null),[M,A]=n(null),[D,O]=n(0),[T,W]=n(!1),[Y,z]=n("appearance"),[F,te]=n(!1),H=a(()=>O((V)=>V+1),[]),q=Iu(at(I),D),{pushToast:re}=Ve(),_=a((V)=>re(V.message,V.ok?"success":"error"),[re]),ne=q.size>0;qe({editorOpen:I!==null,diffOpen:M!==null,settingsOpen:T,offMainScreen:N!=="main",onCloseEditor:()=>P(null),onCloseDiff:()=>A(null),onCloseSettings:()=>{W(!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,pe=!!ee,Q=du({enabled:pe,onResult:_});le("omp:open-file",(V)=>{let Z=je(V.detail,J);if(Z)P(Z)}),le("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}:{}})}),le("omp:view-subagent",()=>R("main")),le("omp:open-settings",(V)=>{let j=V.detail;z(j?.category??"appearance"),te(Boolean(j?.autoOpenAdd)),W(!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")},Se=(V)=>{let j=Ql(l,w,V);if(j)ho(j);v((Z)=>Fc(Z,ur(V),V),{replace:!0}),R("main")},he=(V,j)=>lt({setSearchParams:v,afterNavigate:()=>R("main")},V,j),fe=a((V)=>{let j=je(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(to,{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(Io,{activeSessionId:c,onSelectSession:oe,onNewSession:ue,onNewSessionForFolder:Se,onNewWorktreeSession:he,onClose:()=>R("main"),onDesktopToggle:t,appSettings:r,rootPath:J??void 0,refreshKey:D,onRefresh:H,onOpenFile:fe,revealSignal:E.left})}),N==="right"&&e("div",{className:"flex-1 min-h-0 w-full",children:e(Bo,{enabled:pe,rootPath:J??void 0,refreshKey:D,onRefresh:H,onOpenFile:fe,onClose:()=>R("main"),revealSignal:E.right})}),I&&e(rt,{file:I,missing:ne,onClose:()=>P(null),onFileSaved:H}),M&&e(st,{diff:M,onClose:()=>A(null),onFileSaved:H}),e(Dl,{isOpen:T,onClose:()=>{W(!1),te(!1)},initialCategory:Y,autoOpenAddProvider:F,appSettings:r})]})}export{Qd as MobileLayoutWrapper};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{kg}from"./index-5xxbbzqa.js";import"./index-7sq6cjt1.js";import"./index-zhgh7a31.js";export{kg as MergeDiffView};
|