@kabmo-labs/kabmo 0.50.0 → 0.51.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 +503 -501
- package/dist/client/static/js/{Body-pd3nt4xa.js → Body-s3nh6vet.js} +3 -3
- package/dist/client/static/js/{CsvGrid-eksmqv8f.js → CsvGrid-j4h6cpnn.js} +2 -2
- package/dist/client/static/js/{DocxView-xfx1kt8x.js → DocxView-197x16zq.js} +3 -3
- package/dist/client/static/js/{DrawioView-2xyqg9bv.js → DrawioView-v6ps0cm5.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-ps3f0aa5.js → HtmlPreview-a2t5zngp.js} +1 -1
- package/dist/client/static/js/ImageView-ar7hz7jx.js +1 -0
- package/dist/client/static/js/LayoutWrapper-epef152a.js +2 -0
- package/dist/client/static/js/MergeDiffView-7rwjvzk5.js +1 -0
- package/dist/client/static/js/Modal-9nxt67fm.js +60 -0
- package/dist/client/static/js/{PdfView-8fp08jym.js → PdfView-gzhcym20.js} +1 -1
- package/dist/client/static/js/SessionsView-3h872gpe.js +1 -0
- package/dist/client/static/js/{SheetView-g7mstjdp.js → SheetView-baaynkb4.js} +8 -8
- package/dist/client/static/js/{SvgPreview-wsv4h6c6.js → SvgPreview-jzcqwwcc.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-1kgm1049.js → abnfDiagram-O67JEVCF-grb1sfhr.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-3hkq8grc.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-mtm210rw.js → architectureDiagram-NJMV4G6O-9084jzwr.js} +5 -5
- package/dist/client/static/js/{astro-dszrfwwn.js → astro-m3fcq2sa.js} +1 -1
- package/dist/client/static/js/bash-n7wcmq3s.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-s474vn2w.js → blockDiagram-BEXU5L5S-qqcjrg1b.js} +6 -6
- package/dist/client/static/js/c-ypdp030b.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-s68v6tc8.js → c4Diagram-YGBWAQC7-gc8fqbpc.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-291va3yk.js → classDiagram-v2-NBCMYWYE-pp6060kq.js} +7 -7
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-0zg7crdw.js → cose-bilkent-JH36ORCC-744ekavk.js} +1 -1
- package/dist/client/static/js/cpp-cxwev3gs.js +1 -0
- package/dist/client/static/js/css-6mxcqf8c.js +1 -0
- package/dist/client/static/js/css-9gak6bze.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-9m18e6m5.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-4gnmn3yc.js → cynefinDiagram-VND7K2PF-57dja6g9.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-nxmj6bkg.js → dagre-6A5THRUB-de4xrbrw.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-3171dabw.js → diagram-22UHCM2B-ky3ncyv8.js} +18 -18
- package/dist/client/static/js/{diagram-3UASUU5V-9h1pd6h8.js → diagram-3UASUU5V-zgg82bz9.js} +2 -2
- package/dist/client/static/js/{diagram-ATOU4E4O-ywfrbd6m.js → diagram-ATOU4E4O-r4s13e4n.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-t87b4wbk.js → diagram-CDSNMT55-my21t0kq.js} +5 -5
- package/dist/client/static/js/{diagram-MLGK6HIB-bzv52p97.js → diagram-MLGK6HIB-pvt20jtj.js} +2 -2
- package/dist/client/static/js/{diagram-MPIPVDR6-8f66rp0a.js → diagram-MPIPVDR6-as9dk4f3.js} +2 -2
- package/dist/client/static/js/{dockerfile-z3v0km9v.js → dockerfile-3b5caedj.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-3y4w2j6t.js → ebnfDiagram-ZINNZB2B-tj3hkcj4.js} +1 -1
- package/dist/client/static/js/{elixir-c701n0qg.js → elixir-7q2k61zb.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-d9d23jch.js → elk-276RUBZZ-5e7wczf3.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-w4z3501c.js → erDiagram-OPXOYQCR-5jje7qrh.js} +3 -3
- package/dist/client/static/js/{erlang-cpw5s1f9.js → erlang-tjsd7n4d.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-d4egnv9v.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-pdeqndnd.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-7wcxk4bm.js → ganttDiagram-FUAMR5RP-7hresycc.js} +4 -4
- package/dist/client/static/js/gitGraph-4MIJSDKK-grqv890n.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-sdh1hsb1.js → gitGraphDiagram-X574FWY7-8m202jb7.js} +17 -17
- package/dist/client/static/js/graphql-6rwdfcnf.js +1 -0
- package/dist/client/static/js/html-p76eszt9.js +1 -0
- package/dist/client/static/js/{index-zhnfq8br.js → index-0prwdwyb.js} +2 -2
- package/dist/client/static/js/{index-tew3rd6t.js → index-0y6tstk8.js} +1 -1
- package/dist/client/static/js/{index-1dx4dqzy.js → index-20hj80g4.js} +4 -4
- package/dist/client/static/js/index-21421tq7.js +2 -0
- package/dist/client/static/js/{index-0q39ajgh.js → index-254387vg.js} +2 -2
- package/dist/client/static/js/index-2y4gk5q5.js +2 -0
- package/dist/client/static/js/index-3fk8grhz.js +2 -0
- package/dist/client/static/js/index-3rrdmk9m.js +2 -0
- package/dist/client/static/js/{index-frhxbqhg.js → index-3sz9cztk.js} +1 -1
- package/dist/client/static/js/{index-9ydvkxz1.css → index-4m2d73m3.css} +1 -1
- package/dist/client/static/js/{index-7xn7gxgw.js → index-4nvcwtvr.js} +2 -2
- package/dist/client/static/js/index-4ppap7vb.js +9 -0
- package/dist/client/static/js/{index-vgwjn4de.js → index-4tbdws4r.js} +2 -2
- package/dist/client/static/js/{index-hqhz4eam.js → index-56hy2hcy.js} +1 -1
- package/dist/client/static/js/{index-dgkpbrdr.js → index-60g0e74a.js} +2 -2
- package/dist/client/static/js/{index-n54jd3aw.js → index-7ag37ghj.js} +11 -11
- package/dist/client/static/js/{index-bggz63br.js → index-7ehcjb3r.js} +7 -7
- package/dist/client/static/js/index-899yw6fh.js +2 -0
- package/dist/client/static/js/{index-4vaxdt8a.js → index-8pqx5n2p.js} +2 -2
- package/dist/client/static/js/{index-971stdh4.js → index-91jm3ywm.js} +2 -2
- package/dist/client/static/js/{index-5qwgexg6.js → index-9qf2h9jb.js} +4 -4
- package/dist/client/static/js/{index-wbma8kqw.js → index-9rp7h1nv.js} +23 -23
- package/dist/client/static/js/index-9rr23e0e.js +2 -0
- package/dist/client/static/js/index-9wj4ma9g.js +3 -0
- package/dist/client/static/js/{index-e471eprg.js → index-awtk0djy.js} +1 -1
- package/dist/client/static/js/{index-1d8v3bvm.js → index-awz6pyd0.js} +2 -2
- package/dist/client/static/js/index-cvx1vkrx.js +1 -0
- package/dist/client/static/js/{index-09ap9ncj.js → index-cwwg7k5f.js} +46 -46
- package/dist/client/static/js/{index-8fk7h2me.js → index-dzatbdws.js} +5 -5
- package/dist/client/static/js/{index-1adfks1n.js → index-e6ew77ph.js} +2 -2
- package/dist/client/static/js/{index-144aknp3.js → index-ej1va073.js} +2 -2
- package/dist/client/static/js/{index-cm8pa783.js → index-er7pj5k6.js} +2 -2
- package/dist/client/static/js/index-fm0t4pct.js +4 -0
- package/dist/client/static/js/{index-aqqj4xxy.js → index-g5wp6ksw.js} +2 -2
- package/dist/client/static/js/{index-ajqmcds5.js → index-gy4mtr2e.js} +2 -2
- package/dist/client/static/js/{index-kce86cnw.js → index-j9y4tjk0.js} +2 -2
- package/dist/client/static/js/{index-gws4prmg.js → index-kt7c42n7.js} +2 -2
- package/dist/client/static/js/index-ktmb341a.js +468 -0
- package/dist/client/static/js/{index-56319bht.js → index-m6zncj00.js} +2 -2
- package/dist/client/static/js/{index-jxxewcat.js → index-mpyd7qxj.js} +2 -2
- package/dist/client/static/js/{index-gcgsjd3c.js → index-ms80nne4.js} +2 -2
- package/dist/client/static/js/{index-k66w6d9b.js → index-my856e49.js} +2 -2
- package/dist/client/static/js/{index-c2mqr5fh.js → index-nt17ejrm.js} +2 -2
- package/dist/client/static/js/{index-zsx5vs3j.js → index-pvv340b4.js} +2 -2
- package/dist/client/static/js/{index-svx6rnfs.js → index-pxr36neg.js} +2 -2
- package/dist/client/static/js/{index-r2z0a118.js → index-q0k1am0g.js} +2 -2
- package/dist/client/static/js/{index-xrn2reb5.js → index-qrpx4sk1.js} +2 -2
- package/dist/client/static/js/{index-ajdzvegm.js → index-r2zsw7nw.js} +8 -8
- package/dist/client/static/js/{index-xgbcn89g.js → index-rbkvw2xs.js} +2 -2
- package/dist/client/static/js/{index-2g1ey1c9.js → index-scmtzcv1.js} +2 -2
- package/dist/client/static/js/{index-3rhk4apq.js → index-syvkpnc8.js} +1 -1
- package/dist/client/static/js/index-tfqqsj2g.js +1 -0
- package/dist/client/static/js/{index-7jdz4jr4.js → index-tj7xr4ta.js} +2 -2
- package/dist/client/static/js/{index-1vfej0gk.js → index-wvw70pgd.js} +2 -2
- package/dist/client/static/js/{index-qxzyvye9.js → index-wxs0x3g1.js} +2 -2
- package/dist/client/static/js/index-x507ndnc.js +314 -0
- package/dist/client/static/js/{index-1jx4nt2f.js → index-x87scjpa.js} +1 -1
- package/dist/client/static/js/{index-grkacfv3.js → index-xtrsvm0d.js} +2 -2
- package/dist/client/static/js/{index-ratbr10x.js → index-y1j18rha.js} +2 -2
- package/dist/client/static/js/{index-r6bm9sth.js → index-yv2ervdj.js} +7 -7
- package/dist/client/static/js/{index-k3vvk28c.js → index-z2pmt1bc.js} +1 -1
- package/dist/client/static/js/{index-ap6hv7s7.js → index-z446edg9.js} +1 -1
- package/dist/client/static/js/{index-1ec33b1j.js → index-zkgqa0c2.js} +2 -2
- package/dist/client/static/js/index-zwbw177x.js +2 -0
- package/dist/client/static/js/info-A6RAGUB7-rzpg7qk1.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-gtdp0z6p.js → infoDiagram-VRGFBTTK-5mb5w005.js} +2 -2
- package/dist/client/static/js/ini-kjcpgebh.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-c05m0sqq.js → ishikawaDiagram-OU5B5YK6-zk7fa0fm.js} +3 -3
- package/dist/client/static/js/java-0bcyv1jt.js +1 -0
- package/dist/client/static/js/javascript-0mqgcvps.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-kgk5ygm2.js → journeyDiagram-ZHPQQLJL-8jd7b2aw.js} +5 -5
- package/dist/client/static/js/json-mb8k0b1n.js +1 -0
- package/dist/client/static/js/jsx-8p6dqgpq.js +1 -0
- package/dist/client/static/js/{julia-w13bz4s1.js → julia-nwh5w343.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-q1w9w68s.js → kanban-definition-PNTS6WVX-yp9rks4k.js} +7 -7
- package/dist/client/static/js/lua-nxnqww9z.js +1 -0
- package/dist/client/static/js/markdown-8gbyxxjd.js +1 -0
- package/dist/client/static/js/{mermaid.core-1rz62j9g.js → mermaid.core-kxsxr8ec.js} +9 -9
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-3m3w6bnb.js → mindmap-definition-NLK3R4M7-anx2kj3b.js} +5 -5
- package/dist/client/static/js/one-dark-pro-wyegjr0d.js +1 -0
- package/dist/client/static/js/one-light-kp6c3eqh.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-eac14hsq.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-svd3ex4e.js → pegDiagram-GJSIUBJH-9egqyzkc.js} +1 -1
- package/dist/client/static/js/{perl-hcg3hacf.js → perl-wb4wtc9x.js} +1 -1
- package/dist/client/static/js/{php-q6hhp84p.js → php-9g594k9f.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-a9xqvysf.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-2nrkw034.js → pieDiagram-5QR66LMP-f3dvprbm.js} +3 -3
- package/dist/client/static/js/properties-d5bwhgwz.js +1 -0
- package/dist/client/static/js/python-fdwwjjhh.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-4895d1aq.js → quadrantDiagram-O4NWA36T-qsghd295.js} +6 -6
- package/dist/client/static/js/r-4d2ygtfj.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-jv2pm0fe.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-j74sc0b6.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-eaf19baz.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-d4j5nq31.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-ba862a9p.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-zj3g9yne.js → railroadDiagram-XR7U4H2S-6vmazht2.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-727yjvs8.js → requirementDiagram-PLB6GJNP-phs0wn1v.js} +5 -5
- package/dist/client/static/js/{ruby-wzqz8vw6.js → ruby-c4hxsegh.js} +1 -1
- package/dist/client/static/js/{rust-r94pgqvf.js → rust-e4whdswc.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-17c7p2pe.js → sankeyDiagram-IPEJSGJF-vkktegjk.js} +4 -4
- package/dist/client/static/js/{sass-xb3van7h.js → sass-6yxywx7t.js} +1 -1
- package/dist/client/static/js/{scss-ddg6t3x4.js → scss-9wz47c6t.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-wcmbpckr.js → sequenceDiagram-PO4LG4MO-37e6se72.js} +16 -16
- package/dist/client/static/js/{sizeCapture-INFHLROL-nkr57cd6.js → sizeCapture-INFHLROL-3b4nsa4s.js} +1 -1
- package/dist/client/static/js/sql-sd00wgem.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-vd7r8s78.js → stateDiagram-v2-GCMORJYK-2nnyqs9x.js} +3 -3
- package/dist/client/static/js/{svelte-wzaxz546.js → svelte-mm3jfpje.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-zhxm05ak.js → swimlanes-2SLR337P-eezd46ps.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-h78096xp.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-n7gbzhzd.js → timeline-definition-EJHVYXUP-pz0f2b4h.js} +6 -6
- package/dist/client/static/js/treeView-Q6P3EWNA-e8yb44pd.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-zvdv84vp.js +1 -0
- package/dist/client/static/js/typescript-5txwpd9t.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-davsnwkf.js → usecaseDiagram-POWQR4AR-hvg7a87b.js} +29 -29
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-gb54bh5k.js → vennDiagram-UO4OBE2U-03zh9phs.js} +8 -8
- package/dist/client/static/js/{vue-6zhfw7zx.js → vue-rcdqpz7q.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-hbv0cg4s.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-sf98cg9t.js → wardleyDiagram-VNRHLVJA-xy77th92.js} +5 -5
- package/dist/client/static/js/xml-vtrdnrn6.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-9nn09k40.js → xychartDiagram-PMCCYNJV-h48448cm.js} +4 -4
- package/dist/client/static/js/yaml-6k1tmwtm.js +1 -0
- package/package.json +2 -1
- package/src/client/components/common/MarkdownRenderer.tsx +31 -34
- package/src/client/components/common/ViewportSelector.tsx +4 -0
- package/src/client/components/common/command-palette/index.tsx +5 -2
- package/src/client/components/common/markdown-inline-file.test.tsx +131 -0
- package/src/client/components/common/search-select/OptionList.tsx +164 -0
- package/src/client/components/common/search-select/index.tsx +159 -136
- package/src/client/components/common/search-select/option.ts +16 -0
- package/src/client/components/common/search-select/search-select.test.tsx +61 -2
- package/src/client/components/common/sort-menu/index.tsx +9 -4
- package/src/client/components/layout/session-sidebar/HarnessFilter.tsx +26 -6
- package/src/client/components/layout/session-sidebar/scheduler-modal/ModelFields.tsx +45 -49
- package/src/client/components/layout/session-sidebar/scheduler-modal/TaskForm.tsx +31 -25
- package/src/client/components/settings/ProjectSelectorDropdown.tsx +40 -101
- package/src/client/components/settings/categories/agent-settings/DetailPane.tsx +12 -10
- package/src/client/components/settings/categories/command-settings/DetailPane.tsx +12 -10
- package/src/client/components/settings/categories/dictation-settings/CaptureSection.tsx +13 -18
- package/src/client/components/settings/categories/git-settings/CommitMessageSection.tsx +8 -9
- package/src/client/components/settings/categories/keyboard-settings/ComposerKeys.tsx +10 -10
- package/src/client/components/settings/categories/mcp-settings/AdvancedSection.tsx +21 -18
- package/src/client/components/settings/categories/mcp-settings/DetailPane.tsx +12 -7
- package/src/client/components/settings/categories/omp-settings/PresetBar.tsx +11 -11
- package/src/client/components/settings/categories/omp-settings/RoleEditor.test.ts +14 -11
- package/src/client/components/settings/categories/omp-settings/RowEditor.tsx +17 -16
- package/src/client/components/settings/categories/plugin-settings/MarketplacePane.tsx +11 -9
- package/src/client/components/settings/categories/plugin-settings/SettingsSection.tsx +10 -9
- package/src/client/components/settings/categories/provider-settings/AddModelModal.tsx +10 -8
- package/src/client/components/settings/categories/provider-settings/DialectFields.tsx +40 -24
- package/src/client/components/settings/categories/provider-settings/EntryAdvanced.tsx +13 -9
- package/src/client/components/settings/categories/provider-settings/EntryModal.tsx +22 -17
- package/src/client/components/settings/categories/provider-settings/PresetPicker.tsx +79 -50
- package/src/client/components/settings/categories/provider-settings/model-dialogs.test.tsx +14 -7
- package/src/client/components/settings/categories/voice-settings/SpeechSettings.test.tsx +117 -15
- package/src/client/components/settings/categories/voice-settings/SpeechSettings.tsx +27 -3
- package/src/client/components/settings/categories/voice-settings/speech/EndpointSection.tsx +3 -1
- package/src/client/components/settings/categories/voice-settings/speech/EngineSection.tsx +32 -2
- package/src/client/components/settings/categories/voice-settings/speech/ModelsSection.tsx +277 -0
- package/src/client/components/settings/categories/voice-settings/speech/TestSection.tsx +2 -1
- package/src/client/components/settings/categories/voice-settings/speech/VoiceSection.tsx +83 -41
- package/src/client/components/workspace/btw-panel/TopicMenu.tsx +20 -2
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.speech.test.tsx +35 -6
- package/src/client/components/workspace/chat-timeline/SpeechButton.tsx +111 -36
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +21 -6
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +7 -4
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +22 -6
- package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.tsx +17 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/index.tsx +8 -65
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Proc.test.ts +12 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/registry.test.ts +35 -218
- package/src/client/components/workspace/chat-timeline/tool-renderers/registry.ts +40 -177
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/DiffView.test.ts +13 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/FallbackToolJson.test.tsx +79 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/FallbackToolJson.tsx +86 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolBody.tsx +25 -16
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/card-header.test.ts +4 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/tool-view.ts +11 -4
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Card.plugin.test.ts +3 -1
- package/src/client/components/workspace/file-explorer/ArchiveModals.tsx +15 -15
- package/src/client/components/workspace/git-panel/BranchToolbar.tsx +30 -5
- package/src/client/data/mock/chat.ts +17 -0
- package/src/client/data/samples/tools-session.ts +8 -5
- package/src/client/hooks/editor/font.test.ts +21 -0
- package/src/client/hooks/editor/font.ts +12 -9
- package/src/client/hooks/settings/local-tts-models.ts +164 -0
- package/src/client/hooks/tts/tts-context.ts +6 -0
- package/src/client/hooks/tts/use-tts-player.ts +10 -0
- package/src/client/hooks/ui/markdown-render.ts +9 -1
- package/src/client/hooks/ui/markdown-scoped-links.ts +77 -0
- package/src/client/hooks/ui/open-inline-file.test.ts +144 -0
- package/src/client/hooks/ui/open-inline-file.ts +71 -0
- package/src/client/lib/commands/overlays.ts +16 -2
- package/src/client/lib/tts/player.test.ts +61 -0
- package/src/client/lib/tts/player.ts +120 -41
- package/src/client/tailwind.css +16 -0
- package/src/server/lib/chat/normalize-tools.server.test.ts +79 -0
- package/src/server/lib/chat/normalize-tools.server.ts +87 -0
- package/src/server/lib/harness/acp/background-replay.test.ts +36 -0
- package/src/server/lib/harness/acp/background-replay.ts +8 -3
- package/src/server/lib/harness/acp/frames-tool-shapes.test.ts +41 -13
- package/src/server/lib/harness/acp/frames-vendor-names.test.ts +209 -0
- package/src/server/lib/harness/acp/frames.test.ts +11 -20
- package/src/server/lib/harness/acp/frames.ts +5 -3
- package/src/server/lib/harness/acp/mapper.ts +5 -41
- package/src/server/lib/harness/acp/replay-transcript.ts +6 -1
- package/src/server/lib/harness/acp/subagent-frames.test.ts +1 -1
- package/src/server/lib/harness/acp/subagent-frames.ts +0 -2
- package/src/server/lib/harness/acp/tool-calls.ts +5 -16
- package/src/server/lib/harness/acp/tool-identity.test.ts +69 -8
- package/src/server/lib/harness/acp/tool-identity.ts +58 -10
- package/src/server/lib/harness/acp/tool-shape.ts +5 -3
- package/src/server/lib/harness/codex/transcript.server.test.ts +3 -1
- package/src/server/lib/harness/codex/transcript.server.ts +8 -15
- package/src/server/lib/lifecycle/paths.ts +12 -0
- package/src/server/lib/omp/session/messages.ts +5 -1
- package/src/server/lib/realtime/topics/peer-relay.server.ts +9 -1
- package/src/server/lib/realtime/topics/session.server.ts +5 -1
- package/src/server/lib/tts/engines/adapters.test.ts +17 -8
- package/src/server/lib/tts/engines/deepgram.ts +30 -9
- package/src/server/lib/tts/engines/index.ts +11 -0
- package/src/server/lib/tts/engines/local.ts +53 -0
- package/src/server/lib/tts/engines/sherpa-onnx-node.d.ts +38 -0
- package/src/server/lib/tts/engines/sherpa.test.ts +53 -0
- package/src/server/lib/tts/engines/sherpa.ts +287 -0
- package/src/server/lib/tts/local-models.server.ts +257 -0
- package/src/server/lib/tts/local-request.test.ts +66 -0
- package/src/server/lib/tts/local-request.ts +59 -0
- package/src/server/lib/tts/model-manifest.server.test.ts +71 -0
- package/src/server/lib/tts/model-manifest.server.ts +154 -0
- package/src/server/lib/tts/settings.server.ts +7 -4
- package/src/server/lib/tts/wav.test.ts +37 -0
- package/src/server/lib/tts/wav.ts +43 -0
- package/src/server/routes/chat/session-legacy-tools.test.ts +132 -0
- package/src/server/routes/chat/session.ts +10 -4
- package/src/server/routes/tts/index.ts +2 -0
- package/src/server/routes/tts/models.test.ts +148 -0
- package/src/server/routes/tts/models.ts +89 -0
- package/src/shared/lib/chat/tool/normalize.ts +67 -0
- package/src/shared/lib/chat/tool/render-key.test.ts +167 -0
- package/src/shared/lib/chat/tool/render-key.ts +247 -0
- package/src/shared/lib/chat/tool/tool-aliases.test.ts +42 -0
- package/src/shared/lib/chat/tool/tool-aliases.ts +59 -12
- package/src/shared/lib/fs/open-reference.test.ts +64 -0
- package/src/shared/lib/fs/open-reference.ts +74 -0
- package/src/shared/lib/icons/tint-hues.generated.ts +20 -20
- package/src/shared/lib/markdown/inline-file.test.ts +100 -0
- package/src/shared/lib/markdown/inline-file.ts +213 -0
- package/src/shared/lib/omp/session/messages-map.test.ts +2 -1
- package/src/shared/lib/omp/session/messages-parse.ts +3 -2
- package/src/shared/lib/omp/session/parse-message-blocks.ts +14 -0
- package/src/shared/lib/omp/subagent/transcript-client.ts +5 -1
- package/src/shared/lib/tts/engines.test.ts +28 -3
- package/src/shared/lib/tts/engines.ts +31 -6
- package/src/shared/lib/tts/local-models.test.ts +69 -0
- package/src/shared/lib/tts/local-models.ts +200 -0
- package/src/shared/lib/tts/speakable.test.ts +21 -1
- package/src/shared/lib/tts/speakable.ts +66 -33
- package/src/shared/lib/tts/voices.ts +125 -19
- package/src/shared/types/chat.ts +3 -0
- package/src/shared/types/index.ts +1 -0
- package/src/shared/types/tool-render.ts +37 -0
- package/dist/client/static/js/ImageView-7vse3k6x.js +0 -1
- package/dist/client/static/js/LayoutWrapper-qdp83fps.js +0 -2
- package/dist/client/static/js/MergeDiffView-hzsccppq.js +0 -1
- package/dist/client/static/js/Modal-zw9x5b6f.js +0 -60
- package/dist/client/static/js/SessionsView-qmgg03fv.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-g7b64973.js +0 -1
- package/dist/client/static/js/bash-z5pe89pt.js +0 -1
- package/dist/client/static/js/c-fy0fysfw.js +0 -1
- package/dist/client/static/js/cpp-wam8dze6.js +0 -1
- package/dist/client/static/js/css-ke51m4kc.js +0 -1
- package/dist/client/static/js/css-yryw442h.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-8bscrcct.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-pj22bng1.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-9h6g160j.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-hgw4jcvk.js +0 -1
- package/dist/client/static/js/graphql-0yv8dc1v.js +0 -1
- package/dist/client/static/js/html-zk3m0az9.js +0 -1
- package/dist/client/static/js/index-0ff2x5g9.js +0 -1
- package/dist/client/static/js/index-17jy16v3.js +0 -314
- package/dist/client/static/js/index-1kjgdyfk.js +0 -2
- package/dist/client/static/js/index-4z3qtazf.js +0 -2
- package/dist/client/static/js/index-779rptb2.js +0 -1
- package/dist/client/static/js/index-9jrej3ht.js +0 -3
- package/dist/client/static/js/index-bczhbk01.js +0 -2
- package/dist/client/static/js/index-evvmkk2f.js +0 -2
- package/dist/client/static/js/index-jr6q69r3.js +0 -465
- package/dist/client/static/js/index-qaxjp73x.js +0 -2
- package/dist/client/static/js/index-rgneq3zt.js +0 -2
- package/dist/client/static/js/index-tfwsch7a.js +0 -4
- package/dist/client/static/js/index-vn495w82.js +0 -9
- package/dist/client/static/js/info-A6RAGUB7-k0kv05ny.js +0 -1
- package/dist/client/static/js/ini-apj95p59.js +0 -1
- package/dist/client/static/js/java-khk2v3g4.js +0 -1
- package/dist/client/static/js/javascript-gez6yppm.js +0 -1
- package/dist/client/static/js/json-r78y6e80.js +0 -1
- package/dist/client/static/js/jsx-h7hfj8cz.js +0 -1
- package/dist/client/static/js/lua-pat2bzg3.js +0 -1
- package/dist/client/static/js/markdown-545zn05v.js +0 -1
- package/dist/client/static/js/one-dark-pro-7c942tnw.js +0 -1
- package/dist/client/static/js/one-light-tp8y6c5g.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-ne66q5h9.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-ej9aysvz.js +0 -1
- package/dist/client/static/js/properties-9f76xngb.js +0 -1
- package/dist/client/static/js/python-nwerpkfq.js +0 -1
- package/dist/client/static/js/r-39k5dr2p.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-375pe46t.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-hdgdfsc1.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-2p5ynn4a.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-2p1fxxen.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-g131pt42.js +0 -1
- package/dist/client/static/js/sql-4dcrp3sw.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-myzk2rg0.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-gfztfha9.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-kwtrwq1f.js +0 -1
- package/dist/client/static/js/typescript-q0493nmw.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-30dnzvww.js +0 -1
- package/dist/client/static/js/xml-91sb3gt9.js +0 -1
- package/dist/client/static/js/yaml-ghx4mjw1.js +0 -1
|
@@ -37,27 +37,133 @@ export const ELEVENLABS_VOICES: readonly TtsVoiceOption[] = [
|
|
|
37
37
|
{ id: 'JBFqnCBsd6RMkjVDRZzb', label: 'George (public)' },
|
|
38
38
|
];
|
|
39
39
|
|
|
40
|
-
/**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{ id: 'aura-2-
|
|
51
|
-
{ id: 'aura-2-
|
|
52
|
-
{ id: 'aura-2-
|
|
53
|
-
{ id: 'aura-2-
|
|
54
|
-
{ id: 'aura-2-
|
|
55
|
-
{ id: 'aura-2-
|
|
56
|
-
{ id: 'aura-2-
|
|
57
|
-
{ id: 'aura-2-
|
|
58
|
-
{ id: 'aura-2-
|
|
40
|
+
/**
|
|
41
|
+
* Deepgram's model id is its voice, so this doubles as the model list.
|
|
42
|
+
*
|
|
43
|
+
* Two generations, told apart by the id's prefix and served on different
|
|
44
|
+
* endpoints: `aura-2-*` on `/v1/speak` (seven languages), `flux-*` on
|
|
45
|
+
* `/v2/speak` (41, Indonesian included). Aura is listed first because it is
|
|
46
|
+
* the engine's default; every Flux entry names its language in the label, and
|
|
47
|
+
* a typed id follows the same `flux-{voice}-{language}` shape.
|
|
48
|
+
*/
|
|
49
|
+
const AURA_VOICES: readonly TtsModelOption[] = [
|
|
50
|
+
{ id: 'aura-2-thalia-en', label: 'Thalia — English (American, female)', hint: 'Default; clear and neutral.' },
|
|
51
|
+
{ id: 'aura-2-andromeda-en', label: 'Andromeda — English (American, female)', hint: 'Warm and conversational.' },
|
|
52
|
+
{ id: 'aura-2-helena-en', label: 'Helena — English (American, female)', hint: 'Bright and friendly.' },
|
|
53
|
+
{ id: 'aura-2-apollo-en', label: 'Apollo — English (American, male)', hint: 'Confident, news-like.' },
|
|
54
|
+
{ id: 'aura-2-arcas-en', label: 'Arcas — English (American, male)', hint: 'Calm and steady.' },
|
|
55
|
+
{ id: 'aura-2-orion-en', label: 'Orion — English (American, male)', hint: 'Deep and measured.' },
|
|
56
|
+
{ id: 'aura-2-zeus-en', label: 'Zeus — English (American, male)', hint: 'Authoritative.' },
|
|
57
|
+
{ id: 'aura-2-agustina-es', label: 'Agustina — Spanish (female)', hint: 'Spanish; codeswitches with English.' },
|
|
58
|
+
{ id: 'aura-2-alvaro-es', label: 'Alvaro — Spanish (male)', hint: 'Spanish.' },
|
|
59
|
+
{ id: 'aura-2-agathe-fr', label: 'Agathe — French (female)', hint: 'French.' },
|
|
60
|
+
{ id: 'aura-2-hector-fr', label: 'Hector — French (male)', hint: 'French.' },
|
|
61
|
+
{ id: 'aura-2-aurelia-de', label: 'Aurelia — German (female)', hint: 'German.' },
|
|
62
|
+
{ id: 'aura-2-julius-de', label: 'Julius — German (male)', hint: 'German.' },
|
|
63
|
+
{ id: 'aura-2-cesare-it', label: 'Cesare — Italian (male)', hint: 'Italian.' },
|
|
64
|
+
{ id: 'aura-2-livia-it', label: 'Livia — Italian (female)', hint: 'Italian.' },
|
|
65
|
+
{ id: 'aura-2-ama-ja', label: 'Ama — Japanese (female)', hint: 'Japanese.' },
|
|
66
|
+
{ id: 'aura-2-ebisu-ja', label: 'Ebisu — Japanese (male)', hint: 'Japanese.' },
|
|
59
67
|
];
|
|
60
68
|
|
|
69
|
+
/** Flux TTS: the language is the id's last segment, and no `language` field exists. */
|
|
70
|
+
const FLUX_VOICES: readonly TtsModelOption[] = [
|
|
71
|
+
{ id: 'flux-haley-en', label: 'Haley — English (American, female)', hint: 'Flux · English.' },
|
|
72
|
+
{ id: 'flux-hannah-en', label: 'Hannah — English (American, female)', hint: 'Flux · English.' },
|
|
73
|
+
{ id: 'flux-brooke-en', label: 'Brooke — English (American, female)', hint: 'Flux · English.' },
|
|
74
|
+
{ id: 'flux-sienna-en', label: 'Sienna — English (American, female)', hint: 'Flux · English.' },
|
|
75
|
+
{ id: 'flux-heather-en', label: 'Heather — English (American, female)', hint: 'Flux · English.' },
|
|
76
|
+
{ id: 'flux-kit-en', label: 'Kit — English (British, male)', hint: 'Flux · English.' },
|
|
77
|
+
{ id: 'flux-colin-en', label: 'Colin — English (British, male)', hint: 'Flux · English.' },
|
|
78
|
+
{ id: 'flux-sean-en', label: 'Sean — English (British, male)', hint: 'Flux · English.' },
|
|
79
|
+
{ id: 'flux-gemma-en', label: 'Gemma — English (British, female)', hint: 'Flux · English.' },
|
|
80
|
+
{ id: 'flux-cole-en', label: 'Cole — English (American, male)', hint: 'Flux · English.' },
|
|
81
|
+
{ id: 'flux-cliff-en', label: 'Cliff — English (American, male)', hint: 'Flux · English.' },
|
|
82
|
+
{ id: 'flux-miles-en', label: 'Miles — English (American, male)', hint: 'Flux · English.' },
|
|
83
|
+
{ id: 'flux-alexis-en', label: 'Alexis — English (American, female)', hint: 'Flux · English.' },
|
|
84
|
+
{ id: 'flux-afsana-bn', label: 'Afsana — Bengali (female)', hint: 'Flux · Bengali, early access.' },
|
|
85
|
+
{ id: 'flux-mamun-bn', label: 'Mamun — Bengali (male)', hint: 'Flux · Bengali, early access.' },
|
|
86
|
+
{ id: 'flux-desislava-bg', label: 'Desislava — Bulgarian (female)', hint: 'Flux · Bulgarian, early access.' },
|
|
87
|
+
{ id: 'flux-judit-ca', label: 'Judit — Catalan (female)', hint: 'Flux · Catalan, early access.' },
|
|
88
|
+
{ id: 'flux-jordi-ca', label: 'Jordi — Catalan (male)', hint: 'Flux · Catalan, early access.' },
|
|
89
|
+
{ id: 'flux-lijuan-zh', label: 'Lijuan — Chinese (female)', hint: 'Flux · Chinese, early access.' },
|
|
90
|
+
{ id: 'flux-bo-zh', label: 'Bo — Chinese (male)', hint: 'Flux · Chinese, early access.' },
|
|
91
|
+
{ id: 'flux-danijela-hr', label: 'Danijela — Croatian (female)', hint: 'Flux · Croatian, early access.' },
|
|
92
|
+
{ id: 'flux-dalibor-hr', label: 'Dalibor — Croatian (male)', hint: 'Flux · Croatian, early access.' },
|
|
93
|
+
{ id: 'flux-jakub-cs', label: 'Jakub — Czech (male)', hint: 'Flux · Czech, early access.' },
|
|
94
|
+
{ id: 'flux-pernille-da', label: 'Pernille — Danish (female)', hint: 'Flux · Danish, early access.' },
|
|
95
|
+
{ id: 'flux-rasmus-da', label: 'Rasmus — Danish (male)', hint: 'Flux · Danish, early access.' },
|
|
96
|
+
{ id: 'flux-anouk-nl', label: 'Anouk — Dutch (female)', hint: 'Flux · Dutch.' },
|
|
97
|
+
{ id: 'flux-bram-nl', label: 'Bram — Dutch (male)', hint: 'Flux · Dutch.' },
|
|
98
|
+
{ id: 'flux-triin-et', label: 'Triin — Estonian (female)', hint: 'Flux · Estonian, early access.' },
|
|
99
|
+
{ id: 'flux-kirsi-fi', label: 'Kirsi — Finnish (female)', hint: 'Flux · Finnish, early access.' },
|
|
100
|
+
{ id: 'flux-teemu-fi', label: 'Teemu — Finnish (male)', hint: 'Flux · Finnish, early access.' },
|
|
101
|
+
{ id: 'flux-brigitte-fr', label: 'Brigitte — French (female)', hint: 'Flux · French.' },
|
|
102
|
+
{ id: 'flux-arnaud-fr', label: 'Arnaud — French (male)', hint: 'Flux · French.' },
|
|
103
|
+
{ id: 'flux-janine-de', label: 'Janine — German (female)', hint: 'Flux · German.' },
|
|
104
|
+
{ id: 'flux-benjamin-de', label: 'Benjamin — German (male)', hint: 'Flux · German.' },
|
|
105
|
+
{ id: 'flux-kostas-el', label: 'Kostas — Greek (male)', hint: 'Flux · Greek, early access.' },
|
|
106
|
+
{ id: 'flux-bhavna-gu', label: 'Bhavna — Gujarati (female)', hint: 'Flux · Gujarati, early access.' },
|
|
107
|
+
{ id: 'flux-jignesh-gu', label: 'Jignesh — Gujarati (male)', hint: 'Flux · Gujarati, early access.' },
|
|
108
|
+
{ id: 'flux-anjali-hi', label: 'Anjali — Hindi (female)', hint: 'Flux · Hindi.' },
|
|
109
|
+
{ id: 'flux-ajay-hi', label: 'Ajay — Hindi (male)', hint: 'Flux · Hindi.' },
|
|
110
|
+
{ id: 'flux-eszter-hu', label: 'Eszter — Hungarian (female)', hint: 'Flux · Hungarian, early access.' },
|
|
111
|
+
{ id: 'flux-bence-hu', label: 'Bence — Hungarian (male)', hint: 'Flux · Hungarian, early access.' },
|
|
112
|
+
{ id: 'flux-dewi-id', label: 'Dewi — Indonesian (female)', hint: 'Flux · Indonesian; recommended for Bahasa.' },
|
|
113
|
+
{ id: 'flux-fajar-id', label: 'Fajar — Indonesian (male)', hint: 'Flux · Indonesian.' },
|
|
114
|
+
{ id: 'flux-fitri-id', label: 'Fitri — Indonesian (female)', hint: 'Flux · Indonesian.' },
|
|
115
|
+
{ id: 'flux-rizky-id', label: 'Rizky — Indonesian (male)', hint: 'Flux · Indonesian.' },
|
|
116
|
+
{ id: 'flux-teguh-id', label: 'Teguh — Indonesian (male)', hint: 'Flux · Indonesian.' },
|
|
117
|
+
{ id: 'flux-angela-it', label: 'Angela — Italian (female)', hint: 'Flux · Italian.' },
|
|
118
|
+
{ id: 'flux-federico-it', label: 'Federico — Italian (male)', hint: 'Flux · Italian.' },
|
|
119
|
+
{ id: 'flux-ayumi-ja', label: 'Ayumi — Japanese (female)', hint: 'Flux · Japanese.' },
|
|
120
|
+
{ id: 'flux-hayato-ja', label: 'Hayato — Japanese (male)', hint: 'Flux · Japanese.' },
|
|
121
|
+
{ id: 'flux-manjunath-kn', label: 'Manjunath — Kannada (male)', hint: 'Flux · Kannada, early access.' },
|
|
122
|
+
{ id: 'flux-eunji-ko', label: 'Eunji — Korean (female)', hint: 'Flux · Korean, early access.' },
|
|
123
|
+
{ id: 'flux-hyunwoo-ko', label: 'Hyunwoo — Korean (male)', hint: 'Flux · Korean, early access.' },
|
|
124
|
+
{ id: 'flux-agnese-lv', label: 'Agnese — Latvian (female)', hint: 'Flux · Latvian, early access.' },
|
|
125
|
+
{ id: 'flux-edgars-lv', label: 'Edgars — Latvian (male)', hint: 'Flux · Latvian, early access.' },
|
|
126
|
+
{ id: 'flux-goda-lt', label: 'Goda — Lithuanian (female)', hint: 'Flux · Lithuanian, early access.' },
|
|
127
|
+
{ id: 'flux-izzah-ms', label: 'Izzah — Malay (female)', hint: 'Flux · Malay, early access.' },
|
|
128
|
+
{ id: 'flux-haziq-ms', label: 'Haziq — Malay (male)', hint: 'Flux · Malay, early access.' },
|
|
129
|
+
{ id: 'flux-pooja-mr', label: 'Pooja — Marathi (female)', hint: 'Flux · Marathi, early access.' },
|
|
130
|
+
{ id: 'flux-pratik-mr', label: 'Pratik — Marathi (male)', hint: 'Flux · Marathi, early access.' },
|
|
131
|
+
{ id: 'flux-ida-no', label: 'Ida — Norwegian (female)', hint: 'Flux · Norwegian, early access.' },
|
|
132
|
+
{ id: 'flux-erlend-no', label: 'Erlend — Norwegian (male)', hint: 'Flux · Norwegian, early access.' },
|
|
133
|
+
{ id: 'flux-ewa-pl', label: 'Ewa — Polish (female)', hint: 'Flux · Polish, early access.' },
|
|
134
|
+
{ id: 'flux-bartosz-pl', label: 'Bartosz — Polish (male)', hint: 'Flux · Polish, early access.' },
|
|
135
|
+
{ id: 'flux-bianca-pt', label: 'Bianca — Portuguese (female)', hint: 'Flux · Portuguese.' },
|
|
136
|
+
{ id: 'flux-bruno-pt', label: 'Bruno — Portuguese (male)', hint: 'Flux · Portuguese.' },
|
|
137
|
+
{ id: 'flux-ioana-ro', label: 'Ioana — Romanian (female)', hint: 'Flux · Romanian, early access.' },
|
|
138
|
+
{ id: 'flux-cosmin-ro', label: 'Cosmin — Romanian (male)', hint: 'Flux · Romanian, early access.' },
|
|
139
|
+
{ id: 'flux-natalia-ru', label: 'Natalia — Russian (female)', hint: 'Flux · Russian.' },
|
|
140
|
+
{ id: 'flux-andrei-ru', label: 'Andrei — Russian (male)', hint: 'Flux · Russian.' },
|
|
141
|
+
{ id: 'flux-dominika-sk', label: 'Dominika — Slovak (female)', hint: 'Flux · Slovak, early access.' },
|
|
142
|
+
{ id: 'flux-juraj-sk', label: 'Juraj — Slovak (male)', hint: 'Flux · Slovak, early access.' },
|
|
143
|
+
{ id: 'flux-katja-sl', label: 'Katja — Slovenian (female)', hint: 'Flux · Slovenian, early access.' },
|
|
144
|
+
{ id: 'flux-gregor-sl', label: 'Gregor — Slovenian (male)', hint: 'Flux · Slovenian, early access.' },
|
|
145
|
+
{ id: 'flux-aina-es', label: 'Aina — Spanish (female)', hint: 'Flux · Spanish.' },
|
|
146
|
+
{ id: 'flux-alfredo-es', label: 'Alfredo — Spanish (male)', hint: 'Flux · Spanish.' },
|
|
147
|
+
{ id: 'flux-charlotta-sv', label: 'Charlotta — Swedish (female)', hint: 'Flux · Swedish, early access.' },
|
|
148
|
+
{ id: 'flux-axel-sv', label: 'Axel — Swedish (male)', hint: 'Flux · Swedish, early access.' },
|
|
149
|
+
{ id: 'flux-liezel-tl', label: 'Liezel — Tagalog (female)', hint: 'Flux · Tagalog, early access.' },
|
|
150
|
+
{ id: 'flux-jerome-tl', label: 'Jerome — Tagalog (male)', hint: 'Flux · Tagalog, early access.' },
|
|
151
|
+
{ id: 'flux-kavya-ta', label: 'Kavya — Tamil (female)', hint: 'Flux · Tamil, early access.' },
|
|
152
|
+
{ id: 'flux-gokul-ta', label: 'Gokul — Tamil (male)', hint: 'Flux · Tamil, early access.' },
|
|
153
|
+
{ id: 'flux-sravani-te', label: 'Sravani — Telugu (female)', hint: 'Flux · Telugu, early access.' },
|
|
154
|
+
{ id: 'flux-pavan-te', label: 'Pavan — Telugu (male)', hint: 'Flux · Telugu, early access.' },
|
|
155
|
+
{ id: 'flux-dilek-tr', label: 'Dilek — Turkish (female)', hint: 'Flux · Turkish, early access.' },
|
|
156
|
+
{ id: 'flux-emre-tr', label: 'Emre — Turkish (male)', hint: 'Flux · Turkish, early access.' },
|
|
157
|
+
{ id: 'flux-solomiya-uk', label: 'Solomiya — Ukrainian (female)', hint: 'Flux · Ukrainian, early access.' },
|
|
158
|
+
{ id: 'flux-denys-uk', label: 'Denys — Ukrainian (male)', hint: 'Flux · Ukrainian, early access.' },
|
|
159
|
+
{ id: 'flux-ambreen-ur', label: 'Ambreen — Urdu (female)', hint: 'Flux · Urdu, early access.' },
|
|
160
|
+
{ id: 'flux-usman-ur', label: 'Usman — Urdu (male)', hint: 'Flux · Urdu, early access.' },
|
|
161
|
+
{ id: 'flux-hoa-vi', label: 'Hoa — Vietnamese (female)', hint: 'Flux · Vietnamese, early access.' },
|
|
162
|
+
{ id: 'flux-minh-vi', label: 'Minh — Vietnamese (male)', hint: 'Flux · Vietnamese, early access.' },
|
|
163
|
+
];
|
|
164
|
+
|
|
165
|
+
export const DEEPGRAM_VOICES: readonly TtsModelOption[] = [...AURA_VOICES, ...FLUX_VOICES];
|
|
166
|
+
|
|
61
167
|
export const XAI_VOICES: readonly TtsVoiceOption[] = [
|
|
62
168
|
{ id: 'eve', label: 'Eve (default)' },
|
|
63
169
|
{ id: 'ara', label: 'Ara' },
|
package/src/shared/types/chat.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'preact/compat';
|
|
2
2
|
import type { ApprovalMode } from '@/shared/lib/omp/config/access-mode';
|
|
3
3
|
import type { IrcMessageData } from '@/shared/types/omp/session';
|
|
4
|
+
import type { ToolRender } from '@/shared/types/tool-render';
|
|
4
5
|
|
|
5
6
|
/** One image a tool result returned (a `read` of a picture, an `eval` that
|
|
6
7
|
* painted one). Exactly one payload field is set: omp externalizes anything
|
|
@@ -113,6 +114,8 @@ export interface ToolCallData {
|
|
|
113
114
|
type: ToolType;
|
|
114
115
|
title: string;
|
|
115
116
|
name?: string;
|
|
117
|
+
/** Server-normalized family; absent means "not normalized" (JSON body). */
|
|
118
|
+
render?: ToolRender;
|
|
116
119
|
/** Short human intent (omp arguments.i) — ditampilkan sebelum tools. */
|
|
117
120
|
intent?: string;
|
|
118
121
|
target?: string;
|
|
@@ -3,6 +3,7 @@ export * from '@/shared/types/theme';
|
|
|
3
3
|
export * from '@/shared/types/fs';
|
|
4
4
|
export * from '@/shared/types/git';
|
|
5
5
|
export * from '@/shared/types/chat';
|
|
6
|
+
export * from '@/shared/types/tool-render';
|
|
6
7
|
export * from '@/shared/types/schedule';
|
|
7
8
|
export * from '@/shared/types/waiting';
|
|
8
9
|
export * from '@/shared/types/btw';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The renderer family a tool call belongs to — the SERVER's classification.
|
|
8
|
+
*
|
|
9
|
+
* Kept in its own module because `chat.ts` is at the repo's per-file ceiling,
|
|
10
|
+
* and because this is the one type a producer writes and every renderer reads:
|
|
11
|
+
* `resolveToolRender` decides it once at ingress, and a client must never
|
|
12
|
+
* derive it again from a name, a title or a transport kind.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The renderer family a tool call belongs to. This is a SERVER-computed fact:
|
|
17
|
+
* `resolveToolRender` decides it once at ingress (ACP blocks, omp frames, a
|
|
18
|
+
* stored transcript) and every client consumes it verbatim. A client must not
|
|
19
|
+
* derive it from `name`/`title`/`kind`/`type` again — that is how one logical
|
|
20
|
+
* shell call drew a Bash card on one harness and a generic body on another.
|
|
21
|
+
*/
|
|
22
|
+
export type ToolRenderKey =
|
|
23
|
+
| 'read' | 'edit' | 'write' | 'bash' | 'eval' | 'grep' | 'search_fs'
|
|
24
|
+
| 'todo' | 'task' | 'web_search' | 'lsp' | 'ast_edit' | 'resolve'
|
|
25
|
+
| 'reject' | 'proc' | 'github' | 'checkpoint' | 'security_scan' | 'debug'
|
|
26
|
+
| 'manage_skill' | 'context_notes' | 'memory_edit' | 'goal' | 'ask'
|
|
27
|
+
| 'think' | 'mcp' | 'wait'
|
|
28
|
+
/** No panel: the body is the JSON fallback. */
|
|
29
|
+
| 'custom';
|
|
30
|
+
|
|
31
|
+
export interface ToolRender {
|
|
32
|
+
key: ToolRenderKey;
|
|
33
|
+
/** False when the producer could not classify the call. The body then shows
|
|
34
|
+
* the call as JSON instead of guessing a panel. */
|
|
35
|
+
normalized: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e,p,$r}from"./index-jr6q69r3.js";import{Qi}from"./index-1dx4dqzy.js";import{Nu}from"./index-ajdzvegm.js";function g({source:t,name:r,revision:s=0}){let{url:i,loading:m,error:o}=Nu(t,s);if(o)return e($r,{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(Qi,{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,Me,ce,Ut,Ec,e,s,Re,Be,p,sn,ln,I,ut,cn,f,B,se,dt,re,Ae,Nt,Xe,An,ue,We,de,_a,oa,hn,Ta,nr,M,S,U,bl,h,rr,yl,je,xe,tn,Ah,no,Im,yn,Ne,Qt,Lo,Ke,xl,Fr,me,Z,pt,gs,As,Id,_c,le,qe,bs,jh,Dc,It,Lt,Mt,Qc,ks,Fo,Il,_l,Ld,$o,nt,it,da,rt,Dl,lo,Nl,Zc,Pa,Xc,Fd,Ss,Oa,Uo,Go,jo,St,ir,Qs,Ho,qo,Wo,co,Rl,Ll,Ml,Fl,sr,Rf,Lf,Ko,ru,Mf,Rs,Ls,Ff,Ms,Of,$f,zf,au,_i,Pl,$a,Si,Uf,Gf,ou,iu,jf,Hf,j0,Gd,W0,Yo,jd,Bn,qf,Wf,Kf,Vf,fA,uo,Jf,Zf,su,$l,rg,ag,Vd,og,J0}from"./index-jr6q69r3.js";import{tp}from"./index-qaxjp73x.js";import"./index-n54jd3aw.js";import{uu,du,pu,mu,fu,gu,Au,Qi,hu,zl,bu}from"./index-1dx4dqzy.js";import{tl}from"./index-bggz63br.js";import"./index-0q39ajgh.js";import{Ps,ku,xu,Jo,Os,wu,Cu,Eu,Bu,Iu,_u,Tu,Du}from"./index-ajdzvegm.js";import{yd,vd,ci,kd,xd}from"./index-9jrej3ht.js";import{At,Ri,Ru,Lu,Fu}from"./index-bczhbk01.js";import{Us,Ua,zr,Pu,Ou,Zo,$u,Gs,cp,SA,js,Hs,qs,Ur,Ws,Ks,Xo,Vs,Ys,Js,Zs,Mi,ei,Xs,el,zu,up,Uu,Gu,ju,Hu,qu,Wu}from"./index-tfwsch7a.js";import{Ha,qa}from"./index-ajqmcds5.js";function Ye(t){let{editorOpen:r,diffOpen:l,settingsOpen:m,offMainScreen:b,onCloseEditor:g,onCloseDiff:x,onCloseSettings:v,onReturnToMain:w}=t;o(()=>J0(()=>{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 vt="terminal";function Ve(t){return t===vt}function Ee(t){if(Ve(t))jh()}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")??Ec;Ee(y),g((N)=>N+1),m("right")},[r,m]),c=a(()=>{v((y)=>y+1),m("session")},[m]),k=a((y)=>{let N=W0(y,t);if(!N)return;let R=xe(r,"layout.mobileRightPanel");if(N==="right"&&(l!=="right"||R!==y))Ee(y);if(tn(r,N==="left"?"layout.mobileLeftPanel":"layout.mobileRightPanel",y),N==="right")g(0);m(N==="left"?"session":"right")},[t,r,l,m]);return le(Gd,(y)=>{let N=y.detail?.panelKey;if(N)k(N)}),{right:b,left:x,openSessionDrawer:c,openRightDrawer:w,openNamedPanel:k}}var xt={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]},Je=s(xt);function Ie(){let t=bs(),[r,l]=n(null),m=a((x,v)=>{l({top:v,bottom:v,left:x,right:x})},[]),b=yd({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 wt=10,Qe=600000;function eo({activeSessionTitle:t,activeSessionId:r,onOpenSessionSidebar:l,onOpenRightSidebar:m,onNewSession:b,onSelectSession:g}){let{folders:x}=rt(),v=Vd(),w=Oa(r),[c,k]=n(null),{hidden:y,setHidden:N}=Wf(),R=Ie(),E=jd("mobile"),L=u(()=>{let P=Date.now(),A=[];for(let D of x)for(let O of D.sessions??[]){if(O.is_archived===1)continue;let T=Ah(String(O.id)),W=O.updated_at?Date.parse(O.updated_at):0,q=T!==void 0&&P-T<=Qe?T:W;if(T!==void 0&&P-T>Qe)continue;A.push({id:O.id,title:O.title,folderName:D.name,modified:q})}return A.sort((D,O)=>O.modified-D.modified).slice(0,wt)},[x]),C=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 ${xl} px-3 z-20 titlebar-drag-region select-none`,...$a(),...R.surfaceProps,style:Yo(),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(Je,{size:20,strokeWidth:2})}),e("span",{className:"relative font-bold text-sm tracking-tight flex items-center flex-shrink-0",children:[e(Pa,{glow:!0}),e("span",{className:"absolute -top-0.5 -right-1.5 flex",children:e(au,{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:(P)=>{k((A)=>A?null:It(P.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:C,"aria-haspopup":"menu","aria-expanded":c!==null,children:[e("span",{className:"truncate",children:C}),w&&e(p,{size:12,className:"animate-spin text-ink/50 flex-shrink-0",role:"status","aria-label":"Generating a session name…"}),e(B,{size:13,className:"text-ink/50 flex-shrink-0"})]}),c&&e(Lt,{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(M,{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:L.length===0?e("div",{className:"px-2.5 py-2 text-ink/40 italic",children:"No sessions yet"}):L.map((P)=>e("button",{type:"button",onClick:()=>{k(null),g(P.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(P.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:P.title?P.title.charAt(0).toUpperCase()+P.title.slice(1):"Untitled"}),e("span",{className:"truncate text-[10px] text-ink/40 font-mono",children:P.folderName})]}),String(r)===String(P.id)&&e(f,{size:12,className:"flex-shrink-0"})]},P.id))})]})]})]}),e(Kf,{layout:"mobile",sessionId:r==null?null:String(r),showRightPanel:!1,onToggleRightPanel:m,entries:E,hidden:y}),R.anchor?e(Ko,{anchor:R.anchor,title:"Navbar",align:"right",items:qf([...E.inline,...E.folded]).filter((P)=>P.id!==Bn.install).map((P)=>({...P,removable:!0})),hidden:y,onToggle:N,onClose:R.close}):null]})}function oo({activeSessionId:t,onSelectSession:r,onNewSession:l,onOpenSessionSidebar:m,onOpenRightSidebar:b,appSettings:g={}}){let{folders:x}=rt(),[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(eo,{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(Zf,{appSettings:g,onSessionTitle:w,variant:"mobile"})})]})}function to({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",...$a(),...l,style:{...Yo()},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(Pa,{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(Vf,{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 io({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(bl,{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(_a,{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(de,{size:14}),e("span",{children:"About"})]}),x&&e(zf,{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(Ta,{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",Zc.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 ro(t){let r=Uf(),l=$f();return le(Xc,()=>{t.onClose(),t.openAbout(),r.apply("kabmo").then((m)=>{if(!m)return;t.pushToast(m.message,_c(m))})}),Gf(r,t.pushToast),{updates:r,shellDownload:l}}function so(t,r,l){return t.filter((m)=>m.id!==r&&!(l&&m.side==="left"))}function ao(t){return t}var kt=8;function Le({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((C)=>C.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(),L=Mf({scrollLeft:c.scrollLeft,clientWidth:c.clientWidth,scrollWidth:c.scrollWidth,start:E.left-R.left+c.scrollLeft,size:E.width},kt);if(L!==c.scrollLeft)c.scrollLeft=L},[]);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(lo,{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 po({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(Le,{panels:t,activeId:r,onSelect:l})})}function mo({panelKey:t,panel:r,body:l}){if(!r)return e("div",{className:"flex-1 min-h-0",children:e(ru,{panelKey:t})});return e("div",{className:"flex-1 min-h-0 overflow-hidden relative",children:e(Me,{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(Lo,{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",fo="bg-ink/10 text-ink border-ink/30";function ho({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:L,onSearchChange:C,onClearSearch:P,onSelectWorkspaces:A,selecting:D}){let{ref:O,width:T}=Gs(0),W=SA(T),q={};for(let X of cp.slice(0,W))q[X]=!0;let z=cp.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:An,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:Ua,onSelect:v});if(z.includes("archive"))H.push({id:"archive",label:F,icon:ut,onSelect:E,active:m});if(z.includes("select"))H.push({id:"select",label:D?"Cancel selection":"Select workspaces",icon:zr,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(M,{size:15,strokeWidth:2.4,className:"shrink-0"}),e("span",{className:"min-w-0 truncate",children:"New Session"})]}),q["new-workspace"]&&e("button",{type:"button",onClick:x,className:`${De} ${Oe}`,title:"New Workspace","aria-label":"New Workspace",children:e(An,{size:16,strokeWidth:1.8})}),q.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(Ua,{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})]}),q.archive&&e("button",{type:"button",onClick:E,"aria-pressed":m,className:`${De} ${m?"bg-warning/15 border-warning/40 text-warning":Oe}`,title:F,"aria-label":F,children:e(ut,{size:16,strokeWidth:1.8})}),q.select&&e("button",{type:"button",onClick:A,"aria-pressed":D,className:`${De} ${D?fo:Oe}`,title:D?"Cancel selection":"Select workspaces","aria-label":D?"Cancel selection":"Select workspaces",children:e(zr,{size:16,strokeWidth:1.8})}),q.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})}),q.sort&&e("div",{className:"relative flex-shrink-0",ref:b,children:[e("button",{type:"button",onClick:y,className:`${De} ${l||r!=="A-Z"?fo:Oe}`,title:"Sort workspaces","aria-label":"Sort workspaces",children:e(Us,{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(Zo,{variant:"mobile",sortOption:r,onSortChange:N})})]}),z.length>0&&e($u,{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:(X)=>C(X.currentTarget.value),placeholder:"Search workspaces & sessions...",className:"w-full bg-paper border border-ink/15 rounded-xl pl-8 pr-8 py-2 text-xs text-ink placeholder-ink/40 focus:outline-none focus:border-ink/40 transition-colors font-mono"}),t&&e("button",{type:"button",onClick:P,className:"absolute right-2.5 text-ink/40 hover:text-ink p-1","aria-label":"Clear search",children:e(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 rounded-lg px-2 py-0.5 text-[10px] font-mono",children:[e(ut,{size:10}),e("span",{children:"Archived"}),e("button",{type:"button",onClick:L,className:"hover:text-warning-hover ml-0.5",title:"Hide archived",children:e(h,{size:10})})]})]})]})}var yt="p-1.5 rounded-lg hover:bg-ink/10 active:bg-ink/15 text-ink/60 hover:text-ink";function bo({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),L=(C)=>()=>{y(!1),C()};return e("div",{className:"relative flex items-center",onClick:(C)=>C.stopPropagation(),children:[e("button",{ref:N,type:"button",onClick:(C)=>{if(C.stopPropagation(),N.current)E(It(N.current));y((P)=>!P)},className:yt,title:"Workspace options","aria-label":`Options for ${t.name}`,"aria-haspopup":"menu","aria-expanded":k,children:e(Be,{size:15})}),e(Lt,{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(Js,{variant:"mobile",isPinned:t.isPinned,onOpenFolder:l?L(l):void 0,onNewWorktree:r&&m?L(m):void 0,onSelectSessions:b?L(b):void 0,confirmDelete:g,onPin:L(x),onDelete:L(v),onRequestDelete:w,onCancelDelete:c})})]})}var go={inset:"",insetPx:0,slotWidth:16,markGap:8,padding:"py-2",glyph:it.touch};function vo({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:L,onRename:C,onRenameWithAi:P,waitingFor:A,onCancelWait:D,selectable:O=!1,selected:T=!1,onToggleSelect:W}){let{isEditing:q,draft:z,setDraft:F,inputRef:te,startRename:H,handleKeyDown:X,handleBlur:ae}=jo(t.title,C),_=Oa(t.id),ne=Ho(),ie=ne.anchor!==null,ee=Boolean(C||E||L||D),J=Boolean(A),pe=w&&Boolean(k),Q=t.title.charAt(0).toUpperCase()+t.title.slice(1);if(q)return e("div",{className:"w-full rounded-lg flex items-center bg-ink/10",children:e("input",{ref:te,autoFocus:!0,value:z,onChange:(oe)=>F(oe.currentTarget.value),onKeyDown:X,onBlur:ae,className:"flex-1 min-w-0 mx-2 my-1.5 bg-paper border border-ink/25 rounded px-2 py-1 text-xs text-ink outline-none focus:border-ink/50"})});return e(d,{children:[e("div",{"data-testid":"session-item","data-session-id":String(t.id),"data-menu-open":ie?"true":void 0,onContextMenu:ee&&!O?ne.openAtCursor:void 0,className:`w-full rounded-lg flex items-center transition-colors ${O&&T||ie?Ys: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(Ur,{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(Re,{size:13,className:"text-ink/70 animate-pulse"}):J?e("span",{role:"status","aria-label":`Waiting for ${A?.title??"another session"}`,children:e(We,{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(ue,{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(nt,{harness:r,size:it.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(Ws,{worktree:t.worktree}):null]})]}),e(Vs,{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(Be,{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(B,{size:14}):e(se,{size:14})})]}),ne.anchor&&e(qo,{anchor:ne.anchor,sessionId:t.id,...r?{harness:r}:{},...N!==void 0?{folderId:N}:{},isArchived:t.is_archived===1,onRename:C?H:void 0,onRenameWithAi:P,onArchive:E,onDelete:L,onCancelWait:D,onClose:ne.close})]})}function So(t,r){let[l,m]=n(!1);return{open:()=>m(!0),dialog:l?e(Wo,{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 xo({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(B,{size:12})}),e("span",{className:"w-2 shrink-0"}),e("span",{className:"truncate",children:["Show more sessions (",t,")"]})]}),r&&e("button",{type:"button",onClick: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(dt,{size:12}),e("span",{className:"truncate",children:"Show less"})]})]})}function wo(t){return t?"mb-4":"mb-1"}function ko({folder:t,activeSessionId:r,onSelectSession:l,onNewSessionForFolder: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:L,canShowLess:C}=Hs(),P=So(t,(G)=>b?.(t.id,G)),{refresh:A,runStartedAtMap:D}=rt(),{expandedSessionIds:O,toggleSession:T}=Qs(),[W]=ce(),q=W.get("subagent"),z=W.get("sessionId"),{confirmDelete:F,requestDelete:te,cancelDelete:H,handlePin:X,handleDelete:ae,handleArchive:_,handleRename:ne,handleRenameWithAi:ie,handleOpenFolder:ee}=qs(t,A,c),J=Uo(),pe=X,Q=ae,oe=ee??void 0,fe=(t.sessions||[]).filter((G)=>v?G.is_archived===1:G.is_archived!==1),we=da(t.icon),{folderCheckbox:be,sessionCheckboxes:he,folderSummary:V,toggleFolderSelection:j,rendered:Y,hiddenCount:ke}=Xs({batch:k,folder:t,sessions:fe,showArchived:v,visibleCount:R,activeSessionId:r,sessionStatus:w}),Pe=ei(Y),ve=g||he,ye=(G,Te)=>{let ge=String(G.id),Ge=String(r)===ge,bt=Ge&&z===ge&&Boolean(q),ze=St(ge);return e(vo,{session:G,harness:G.harness,folderId:G.folder_id,isActive:Ge&&!bt,status:w[ge],awaitingInput:Boolean(G.awaitingInput),timeAgo:Ks(G.updated_at??G.created_at),timeTitle:Xo(G.updated_at??G.created_at),runStartedAt:w[ge]==="stream"?D[ge]:void 0,expandable:Te.expandable,isChild:Te.isChild,isExpanded:Te.isExpanded,onToggleExpand:Te.onToggleExpand,onSelect:()=>l(G.id),onArchive:()=>_(G),onDelete:ze?void 0:()=>J.requestDelete(G),onRename:ze?void 0:(gt)=>void ne(G,gt),onRenameWithAi:ze?void 0:()=>void ie(G),waitingFor:G.waitingFor?{title:G.waitingFor.title}:void 0,onCancelWait:G.waitingFor?()=>N?.(G.waitingFor.waitId):void 0,selectable:he,selected:Boolean(k?.selected.includes(ge)),onToggleSelect:k?()=>k.toggle(ge):void 0})},ht=(G)=>Zs(G,Pe.childrenOf,O,T);return e("div",{className:wo(ve),"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:[be&&V?e(Ur,{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(hn,{size:15,className:"text-ink/80"}):e(we,{size:15,className:"text-ink/80",style:{color:t.accentColor||void 0}})})}),e("span",{className:"text-sm font-semibold text-ink truncate",children:t.name})]}),e("div",{className:"flex items-center space-x-2 text-xs text-ink/60",children:[e("span",{className:"font-mono text-[11px] text-ink/70",children:fe.length}),t.project_path&&e(ue,{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(M,{size:15})}),e(bo,{folder:t,canWorktree:Boolean(b&&t.project_path),onOpenFolder:oe,onNewWorktree:b?()=>P.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(B,{size:14}):e(se,{size:14})})]})]})]}),ve&&e("div",{className:"mt-0.5 space-y-0.5",children:[Pe.roots.map((G)=>{let Te=String(G.id),ge=ht(G);return e("div",{className:"space-y-0.5",children:[ye(G,ge),ge.isExpanded&&e(Mi,{parentId:Te,hasSubagents:Boolean(G.hasSubagents),childrenOf:Pe.childrenOf,expandedIds:O,onToggle:T,activeSessionId:r===null?null:String(r),renderSession:ye,style:go})]},G.id)}),e(xo,{hiddenCount:he?0:ke,canShowLess:!he&&C,onShowMore:E,onShowLess:L})]}),e(Go,{session:J.pending,isDeleting:J.isDeleting,error:J.error,onClose:J.cancelDelete,onConfirm:()=>void J.confirmDelete()}),P.dialog]})}function yo({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(ko,{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 Ct=[3,2];function No(){return e("div",{className:"flex-1 p-3 space-y-4","aria-hidden":"true",children:Ct.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 Co({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:L,selecting:C,batch:P,onNewSession:A,onNewWorkspace:D,onScheduler:O,onRefresh:T,onToggleOptions:W,onSortChange:q,onResetSort:z,onToggleArchived:F,onHideArchived:te,onSearchChange:H,onClearSearch:X,onSelectWorkspaces:ae,onSelectSession:_,onNewSessionForFolder:ne,onNewWorktreeSession:ie,onToggleFolder:ee,onToast:J,onStartSessionSelection:pe,onCancelWait:Q}){return e(d,{children:[e(ho,{searchQuery:x,sortOption:v,optionsOpen:w,showArchived:c,optionsRef:R,onNewSession:A,onNewWorkspace:D,onScheduler:O,scheduledCount:E,onRefresh:T,refreshing:L,onToggleOptions:W,onSortChange:q,onResetSort:z,onToggleArchived:F,onHideArchived:te,onSearchChange:H,onClearSearch:X,onSelectWorkspaces:ae,selecting:C}),e("div",{className:"px-3 pt-2 pb-1",children:e(js,{options:N,value:k,onChange:y,touch:!0})}),l?e(el,{touch:!0,onRetry:T,refreshing:L}):r?e(No,{}):e(yo,{folders:t,activeSessionId:m,expandedFolders:b,showArchived:c,sessionStatus:g,onSelectSession:_,onNewSessionForFolder:ne,onNewWorktreeSession:ie,onToggleFolder:ee,onToast:J,batch:P,onStartSessionSelection:pe,onCancelWait:Q})]})}function Po({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:L,onToast:C,onArchiveSelected:P,onCancelWait:A}){let{initializing:D,failed:O,refreshNow:T,isRefreshing:W,searchQuery:q,setSearchQuery:z,showArchived:F,setShowArchived:te,optionsOpen:H,setOptionsOpen:X,sortOption:ae,handleSortChange:_,harnessFilter:ne,setHarnessFilter:ie,harnessOptions:ee,processedFolders:J,sessionStatus:pe,handleSelectSession:Q}=r,{selection:oe,deleteRun:fe,archiveRun:we,binding:be,scopeFolder:he,available:V,selected:j}=l,Y={className:"flex-1 min-h-0 w-full",folders:J,initializing:D,failed:O,activeSessionId:v,sessionStatus:pe,searchQuery:q,onSearchChange:z,showArchived:F,onToggleArchived:R,sortOption:ae,optionsOpen:H,onToggleOptions:()=>X(!H),onCloseOptions:()=>X(!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:L,onToast:C,onCancelWait:A,batch:be,onSelectWorkspaces:l.toggleWorkspaceSelection,onStartSessionSelection:(ke)=>oe.begin("session",ke)};return e(d,{children:[e("div",{className:m.showingSessions?"contents":"hidden",children:[t==="modern"?e(zu,{...Y,touch:!0}):e(Co,{folders:J,initializing:D,failed:O,activeSessionId:v,expandedFolders:g,sessionStatus:pe,searchQuery:q,sortOption:ae,optionsOpen:H,showArchived:F,harnessFilter:ne,onHarnessFilterChange:ie,harnessOptions:ee,optionsRef:x,scheduledCount:w,refreshing:W,selecting:oe.mode!==null,batch:be,onNewSession:k,onNewWorkspace:y,onScheduler:N,onRefresh:T,onToggleOptions:()=>X(!H),onSortChange:_,onResetSort:()=>_("A-Z"),onToggleArchived:R,onHideArchived:()=>te(!1),onSearchChange:z,onClearSearch:()=>z(""),onSelectWorkspaces:l.toggleWorkspaceSelection,onSelectSession:Q,onNewSessionForFolder:E,onNewWorktreeSession:L,onToggleFolder:c,onToast:C,onStartSessionSelection:(ke)=>oe.begin("session",ke),onCancelWait:A}),oe.mode&&e(qu,{drawer:!0,mode:oe.mode,count:j.length,total:V.length,busy:fe.isDeleting,archiving:we.isArchiving,scopeLabel:he?.name,onSelectAll:()=>oe.selectAllOf(V),onUnselectAll:()=>oe.unselectAllOf(V),onDelete:()=>fe.request(j),onArchive:P,onCancel:oe.end})]}),m.showingSessions?null:e(mo,{panelKey:m.activeView,panel:m.activePanel,body:b})]})}function Mo(t,r){let l=t.tabs;Ms({enabled:t.tabsMode,revealed:Ff(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 _e(t){return{dragRegion:!0,layout:"mobile",rootProps:{...$a(),...t},style:{paddingLeft:Si(_i("0.75rem",!0)),paddingRight:Pl("0.75rem",!0)}}}function Ro({side:t,onClose:r}){let l=t==="left"?sn:nr;return e("button",{type:"button",onClick:r,className:`${Ke.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:Fr.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(Ss,{isOpen:r,onClose:l,onCreate:Ml,onClone:Fl}),e(Ou,{isOpen:m,onClose:b,activeSessionId:t===null?null:String(t),onToast:w}),e(Fd,{isOpen:g,onClose:x,updates:v,onToast:w}),e(Of,{updates:v}),e(Wu,{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=Qt(),r=sr("left"),[l,m]=no("layout.mobileLeftPanel",Ne),b=Rf(l,t.enabled),g=tp("left"),x=t.enabled&&g==="tabs",v=u(()=>new Set(r.map((c)=>c.id)),[r]),w=Ls("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 Oo({appSettings:t,onSelectSession:r,onClose:l,rootPath:m,refreshKey:b,onRefresh:g,onOpenFile:x}){let v=Uu(t,{onSelectSession:r,onAfterSelect:l}),{folders:w,processedFolders:c,refreshNow:k,showArchived:y,activeSessionId:N}=v,R=Hu(c,y,k),[E,L]=n({1:!0,2:!0,3:!0}),C=i(null);me(C,()=>v.setOptionsOpen(!1));let P=(T)=>{L((z)=>({...z,[T]:!z[T]}));let W=w.find((z)=>z.id===T),q=!(E[T]??W?.isExpanded??!0);up(T,q)},A=c.map((T)=>`${T.id}:${T.isExpanded}`).join("|");o(()=>{L(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:P,optionsRef:C,dock:D,dockBody:O}}function He(t){let{disabledPanels:r}=yn(),{setEnabled:l}=Dl(),m=Ie(),b=Lf(t),g=a((x,v)=>{l(x,v)},[l]);return{...m,items:b,hidden:r,toggle:g}}function Ao({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:L,toggleFolder:C,optionsRef:P,dock:A,dockBody:D}=Oo({appSettings:v,onSelectSession:r,onClose:g,rootPath:w,refreshKey:c,onRefresh:k,onOpenFile:y}),{showArchived:O,setShowArchived:T}=R,{selection:W,deleteRun:q,archiveRun:z,selected:F,scopeFolder:te}=E,H=Ld(),X=He("left"),[ae,_]=n(!1),[ne,ie]=n(!1),ee=Pu(),[J,pe]=n(!1),{pushToast:Q}=qe(),oe=Ll(Q);Gu({onNotice:Q});let{updates:fe,shellDownload:we}=ro({onClose:g,openAbout:()=>pe(!0),pushToast:Q}),{tabs:be}=Mo(A,N),he=()=>{l(),g()},V=()=>{z.archive(F).then((ve)=>{if(!ve)return;let ye=ju(ve);if(ye)Q(ye.message,ye.tone);if(!ve.error)W.end()})},j=(ve)=>{m(ve),g()},Y=()=>{T(!O)},ke=b?(ve,ye)=>{b(ve,ye),g()}:void 0,Pe=e(Po,{sidebarStyle:H,controller:R,batch:E,dock:A,dockBody:D,expandedFolders:L,optionsRef:P,activeSessionId:t,scheduledCount:ee,onToggleFolder:C,onNewSession:he,onNewWorkspace:()=>_(!0),onScheduler:()=>ie(!0),onToggleArchived:Y,onNewSessionForFolder:j,...ke?{onNewWorktreeSession:ke}:{},onToast:Q,onArchiveSelected:V,onCancelWait:oe});return e("div",{className:"flex flex-col h-full w-full bg-canvas text-ink relative select-none",children:[e(to,{onClose:g,viewLabel:A.showingSessions?"Sessions":A.activePanel?.label??"Panel",menuProps:X.surfaceProps}),!A.tabsMode&&ao(A.enabled)?e(po,{panels:A.catalog,activeId:A.activeView,onSelect:A.setActiveView,menuProps:X.surfaceProps}):null,A.tabsMode&&be?e("div",{className:"flex-1 min-h-0 flex flex-col",children:e(Rs,{catalog:A.catalog,tabs:be,pinned:Ne,homeTitle:"Panel kiri",stripProps:_e(X.surfaceProps),children:e("div",{className:"h-full w-full",children:Pe})})}):null,X.anchor?e(Ko,{anchor:X.anchor,items:X.items,hidden:X.hidden,onToggle:X.toggle,onClose:X.close}):null,A.tabsMode?null:e("div",{className:"contents",children:Pe}),e(io,{onSettings:()=>window.dispatchEvent(new CustomEvent("omp:open-settings",{detail:{}})),onKeyBindings:ou,onAbout:()=>pe(!0),shellDownload:we,onDesktopToggle:x,updateAvailable:fe.hasUpdate,onUpdateClick:()=>{pe(!0),fe.check()}}),e(To,{activeSessionId:t,newWorkspaceOpen:ae,onCloseNewWorkspace:()=>_(!1),schedulerOpen:ne,onCloseScheduler:()=>ie(!1),aboutOpen:J,onCloseAbout:()=>pe(!1),updates:fe,pushToast:Q,batchDelete:q,batchMode:W.mode,onEndBatch:W.end,scopeLabel:te?.name})]})}function Io({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",...$a(),...g,style:Yo(),children:[e("div",{className:"flex items-center min-w-0 titlebar-no-drag",children:e(Le,{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 $e({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(Me,{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(Lo,{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]=no("layout.mobileRightPanel",Ec),{sessionId:c}=je(),k=Qt(),y=so(sr("all"),Ne,k.enabled),N=y.find((_)=>_.id===v)??y[0],E=tp("right")==="tabs",L=u(()=>new Set(y.map((_)=>_.id)),[y]),C=Ls("right",L,null),P=xe(c,"layout.mobileRightPanel")!==void 0;Ms({enabled:E,revealed:Ff(x),storedView:P?v:null,home:C.home,chosenHome:C.chosenHome,openTab:C.open,known:L});let{open:A,tabs:D}=C,O=(_)=>{if(_!==N?.id)Ee(_)},T=i(!1),W={...C,select:(_)=>{T.current=!0,O(_),C.select(_)},open:(_)=>{T.current=!0,O(_),C.open(_)},close:(_)=>{T.current=!0,C.close(_)}};o(()=>{if(!E)return;if(C.active!==null&&C.active!==v)w(C.active)},[E,C.active,v,w]),o(()=>{if(!E||C.home)return;if(T.current){T.current=!1;return}if(!P)return;if(D.includes(v)||!L.has(v))return;A(v)},[E,C.home,P,v,D,A,L]);let q=Im(r,t),{changes:z}=yl(r,q,t),F=z.length>0,te=a((_)=>{if(_!==N?.id)Ee(_);w(_)},[N?.id,w]);o(()=>{if(!Ve(N?.id))Dc()},[N?.id]);let H=He(k.enabled?"right":"all"),X=k.enabled?H.items:H.items.filter((_)=>_.id!==Ne),ae={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(Io,{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(Rs,{catalog:y,tabs:W,homeTitle:"Panel kanan",stripProps:_e(H.surfaceProps),actions:e(Ro,{side:"right",onClose:g}),children:e("div",{className:"h-full w-full",children:e($e,{panel:N,body:ae})})})}):null,H.anchor?e(Ko,{anchor:H.anchor,align:"right",items:X,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($e,{panel:N,body:ae})})]})}function Ce({label:t,onClick:r,active:l=!1,danger:m=!1,children:b}){let g=m?"bg-error text-canvas hover:bg-error/90":l?"bg-ink text-canvas":"text-ink/70 hover:bg-ink/10 hover:text-ink";return e("button",{type:"button",onClick:r,title:t,"aria-label":t,"aria-pressed":l||void 0,className:`${Ke.mobile} flex-none cursor-pointer rounded-lg transition-colors ${g}`,children:b})}var Se=Fr.mobile;function _o({actions:t}){let[r,l]=n(!1),m=i(null);return me(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:`${Ke.mobile} flex-none cursor-pointer rounded-lg text-ink/70 transition-colors hover:bg-ink/10 hover:text-ink`,children:e(Be,{size:Fr.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 Pt=420;function zo({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:L,onZoomOut:C,onZoomIn:P,onCopy:A,onDownload:D}){let O=iu(Pt),T=u(()=>{let W=[];if(!w)W.push({id:"wrap",label:x?"Word wrap: on":"Word wrap: off",icon:ln,onSelect:L},{id:"zoom-out",label:"Decrease font size",icon:qa,onSelect:C},{id:"zoom-in",label:"Increase font size",icon:Ha,onSelect:P});if(!O)W.push({id:"copy",label:v?"Copied":"Copy content",icon:v?f:re,onSelect:A},{id:"download",label:"Download file",icon:Ae,onSelect:D});return W},[w,O,x,v,L,C,P,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:Yo(),children:[e("div",{className:"flex items-center gap-1 min-w-0 titlebar-no-drag",children:[e(Ce,{label:"Close editor",onClick:y,children:e(cn,{size:Se,strokeWidth:2})}),e("div",{className:"flex min-w-0 items-center gap-1.5",children:[e(pt,{name:t,size:15,className:`flex-shrink-0${c?" text-error":""}`}),e("span",{className:`truncate font-semibold text-xs${c?" text-error line-through":" text-ink"}`,children:t})]})]}),e("div",{className:"flex flex-none items-center gap-0.5 text-ink/70 titlebar-no-drag",children:[c&&k&&e(Ce,{label:"Save and recreate the file",onClick:k,danger:!0,children:e(At,{size:Se})}),!w&&e(Ce,{label:E?"Close find":"Find in file",onClick:R,active:E,children:e(U,{size:Se})}),m&&e(Ce,{label:b?"Exit review mode":"Review this document",onClick:g,active:b,children:e(hn,{size:Se})}),r&&e(Ce,{label:l?"View source":"Show preview",onClick:N,active:l,children:l?e(Nt,{size:Se}):e(Xe,{size:Se})}),O&&e(d,{children:[e(Ce,{label:"Copy content",onClick:A,children:v?e(f,{size:Se,className:"text-success"}):e(re,{size:Se})}),e(Ce,{label:"Download file",onClick:D,children:e(Ae,{size:Se})})]}),T.length>0&&e(_o,{actions:T})]})]})}function Vo({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(uu,{size:20,className:"text-ink/40"}),e("span",{className:"text-xs text-ink/70 font-sans",children:[t," cannot be opened here"]}),e("span",{className:"text-[11px] text-ink/50 font-sans max-w-[42ch]",children:c})]}):k?e("div",{className:"flex flex-col items-center justify-center h-full gap-2 px-6 text-center",children:[e(I,{size:20,className:"text-error"}),e("span",{className:"text-xs text-error font-sans",children:["Could not read ",t]}),e("span",{className:"text-[11px] text-ink/50 font-mono break-all",children:k})]}):e("div",{className:"p-4 bg-paper text-ink min-h-full font-sans",style:{fontSize:`${g}px`},children:e(pu,{content:r,file:{name:t,path:l,root:m,repo:b},active:y,onExit:N})})})}function Qo({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:L,fontSize:C,reviewActive:P,onExitReview:A,editorTheme:D,editorFontFamily:O,indentUnitText:T,typing:W}){let q=a(async(z)=>{let F=await bu(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(Qi,{src:r.imageUrl,name:t.name,className:"flex-1 min-h-0"});if(r.isImage||hu(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:q,onDirtyChange:r.setBinaryDirty});if(r.isLoading||r.unsupported||r.loadError||g&&b)return e(Vo,{fileName:t.name,content:x,path:t.path??t.name,root:t.root,repo:t.repo,fontSize:C,scrollRef:E,onScroll:L.onScroll,isLoading:r.isLoading,unsupported:r.unsupported,loadError:r.loadError,reviewActive:P,onExitReview:A});return e(fu,{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:`${C}px`,lineHeight:ks}})}function et(){return e("div",{className:"flex items-start gap-2 px-3 py-2 border-b border-error/30 bg-error/10 text-error shrink-0",children:[e(I,{size:14,className:"shrink-0 mt-0.5"}),e("div",{className:"min-w-0",children:[e("div",{className:"text-[11.5px] font-sans",children:"This file was deleted from disk."}),e("div",{className:"text-[11px] font-sans text-error/80",children:"The buffer is still here. Saving recreates the file — autosave is off until then."})]})]})}function ot({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:Jo[l]}):e(d,{children:[w>0&&e("span",{className:"text-error 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",children:"Save failed"})]}),x==="idle"&&v&&e("span",{className:"truncate max-w-[140px]",children:v})]})]})}function tt({path:t,content:r,ready:l,surfaceRef:m}){let b=Bu(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 st({path:t,content:r,documentKey:l,ready:m,surfaceRef:b,toggleWordWrap:g}){let x=tt({path:t,content:r,ready:m,surfaceRef:b}),v=Eu({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 at({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=Id(r,k);if(y)As({path:t,...y});return}gs({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(oa,{size:16})})}),x&&e(Z,{onClose:()=>v(!1),maxWidthClass:"max-w-sm",zClass:"z-[70]",header:e("div",{className:"flex min-w-0 items-center gap-2",children:[e(oa,{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?`${ci(c.kind)} ${c.name}`:`${ci(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(vd,{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:kd(l)})]})})]})}function lt({file:t,missing:r=!1,onClose:l,onFileSaved:m,onDropResult:b}){let g=Os(t.path??t.name),[x,v]=n({}),[w,c]=n(Fo),[k,y]=n(!0),N=$o(),R=Ri(),E=Lu(),L=Fu(),C=g==="markdown",P=Ps[g]===!0,A=ku[g]===!0,D=t.path??t.name,O=x[D]??xu(g),T=Du(String(D)),W=C&&O,q=()=>v((Y)=>({...Y,[D]:!O})),z=su({enabled:Boolean(t.root),onResult:b}),F=Cu(t,{flushOnUnmount:!0,reportSaveError:!0,downloadMimeType:"text/plain;charset=utf-8",onFileSaved:m,missing:r}),[te,H]=n(null),X=tl({tabKey:D,surface:C&&O?"rendered":"code",ready:F.loaded,slot:j0,element:C&&O?void 0:te}),[ae,_]=n(null),ne=a((Y)=>{X.ref(Y),_(Y)},[X.ref]);Au({path:t.path??null,scroller:ae,preview:C&&O});let ie=i(null),{find:ee,revealMarks:J,currentMark:pe}=st({path:t.path??null,content:F.content,documentKey:`${D}\x00${F.language}`,ready:F.loaded&&!F.loadError,surfaceRef:ie,toggleWordWrap:()=>y((Y)=>!Y)}),{content:Q,language:oe}=F,fe=Q.split(`
|
|
2
|
-
`).length,we=mu(Q);Iu({file:{id:D,name:t.name,path:t.path??D},editor:F,surfaceRef:ie,isPreview:O,exitPreview:()=>v((Y)=>({...Y,[D]:!1})),publish:!1});let{symbols:be,total:he,truncated:V,notice:j}=xd({content:Q,language:oe,path:t.path??null,state:P?"not-a-document":F.loadError?"error":F.loaded?"ready":"loading",note:P?`${Jo[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(zo,{fileName:t.name,hasPreview:A,isPreview:O,wordWrap:k,copied:F.copied,byteViewer:P,missing:r,onSave:F.saveNow,onClose:l,onTogglePreview:q,hasReview:W,isReviewing:W&&T.active,onToggleReview:T.toggle,onToggleFind:()=>ee.open?ee.close():ee.openFind(),findOpen:ee.open,onToggleWrap:()=>y(!k),onZoomOut:()=>c((Y)=>Math.max(Il,Y-1)),onZoomIn:()=>c((Y)=>Math.min(_l,Y+1)),onCopy:F.copy,onDownload:F.download}),r&&e(et,{}),F.diskChange&&e(_u,{fileName:t.name,onReload:F.reloadFromDisk,onKeepMine:F.keepMineAgainstDisk}),ee.open&&!P&&e("div",{className:"relative shrink-0 h-9 border-b border-ink/10 bg-paper",children:e(gu,{find:ee})}),e(Qo,{file:t,editor:F,viewerKind:g,byteViewer:P,isPreview:O,isMd:C,content:Q,language:oe,wordWrap:k,fileKey:D,revealMarks:J,currentMark:pe,surfaceRef:ie,setCodeScroller:H,previewRef:ne,scroll:X,fontSize:w,reviewActive:W&&T.active,onExitReview:T.toggle,editorTheme:R,editorFontFamily:N,indentUnitText:Ru(E),typing:L}),!P&&e(at,{path:t.path??null,symbols:be,total:he,truncated:V,emptyNotice:j,preview:C&&O}),e(ot,{isImage:F.isImage,byteViewer:P,viewerKind:g,lineCount:fe,charCount:Q.length,language:oe,saveStatus:F.saveStatus,path:t.path,conflicts:we}),F.saveMissingConfirm&&t.path&&e(Tu,{fileName:t.name,filePath:t.path,onClose:F.cancelSaveMissing,onConfirm:F.confirmSaveMissing})]})}function ct({diff:t,onClose:r,onFileSaved:l}){let m=t.path.split("/").pop()||t.path,b=Boolean(t.staged),g=t.status||"M",x=rr(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:Yo(),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(cn,{size:18,strokeWidth:1.9})}),e(pt,{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(du,{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?Hf(t.journal.path,t.journal.from,t.journal.to):jf(t.path,b)})})]})}function Fe(t,r){let l=t[r];return typeof l==="string"&&l.length>0?l:void 0}function Rt(t){let r=t.content;return typeof r==="string"?r:void 0}function Ue(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:Rt(l),root:Fe(l,"root")??r??void 0,repo:Fe(l,"repo"),handleId:Fe(l,"handleId"),deviceFile:l.deviceFile===!0?!0:void 0}}function mt(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 ft(t,r,l){co(l);let m=ir(r);return tn(m,fA,{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 op({onDesktopToggle:t,appSettings:r={}}){let{folders:l,isMock:m}=rt(),b=Qt(),{sessionId:g}=je(),[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}),[L,C]=n(null),[P,A]=n(null),[D,O]=n(0),[T,W]=n(!1),[q,z]=n("appearance"),[F,te]=n(!1),H=a(()=>O((V)=>V+1),[]),X=wu(mt(L),D),{pushToast:ae}=qe(),_=a((V)=>ae(V.message,V.ok?"success":"error"),[ae]),ne=X.size>0;Ye({editorOpen:L!==null,diffOpen:P!==null,settingsOpen:T,offMainScreen:N!=="main",onCloseEditor:()=>C(null),onCloseDiff:()=>A(null),onCloseSettings:()=>{W(!1),te(!1)},onReturnToMain:()=>R("main")});let{folder:ie}=uo(l,c),ee=ie??(y?l.find((V)=>String(V.id)===String(y))??null:null),J=Jf(l,c)??ee?.project_path??null,pe=!!ee,Q=su({enabled:pe,onResult:_});le("omp:open-file",(V)=>{let Y=Ue(V.detail,J);if(Y)C(Y)}),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 Y=Mt(j);if(Y.set("sessionId",V.toString()),Y.has("subagent"))Y.delete("subagent");return Y},{replace:!0}),R("main")},fe=()=>{v(new URLSearchParams,{replace:!0}),R("main")},we=(V)=>{let j=Rl(l,w,V);if(j)co(j);v((Y)=>Qc(Y,ir(V),V),{replace:!0}),R("main")},be=(V,j)=>ft({setSearchParams:v,afterNavigate:()=>R("main")},V,j),he=a((V)=>{let j=Ue(V,J);if(j)C(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(rg,{}),e(ag,{isMock:m}),e(og,{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(oo,{activeSessionId:c,onSelectSession:oe,onNewSession:fe,onOpenSessionSidebar:E.openSessionDrawer,onOpenRightSidebar:E.openRightDrawer,appSettings:r})]}),e("div",{className:`flex-1 min-h-0 w-full ${N==="session"?"block":"hidden"}`,children:e(Ao,{activeSessionId:c,onSelectSession:oe,onNewSession:fe,onNewSessionForFolder:we,onNewWorktreeSession:be,onClose:()=>R("main"),onDesktopToggle:t,appSettings:r,rootPath:J??void 0,refreshKey:D,onRefresh:H,onOpenFile:he,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:he,onClose:()=>R("main"),revealSignal:E.right})}),L&&e(lt,{file:L,missing:ne,onClose:()=>C(null),onFileSaved:H}),P&&e(ct,{diff:P,onClose:()=>A(null),onFileSaved:H}),e(Nl,{isOpen:T,onClose:()=>{W(!1),te(!1)},initialCategory:q,autoOpenAddProvider:F,appSettings:r})]})}export{op as MobileLayoutWrapper};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{dg}from"./index-bggz63br.js";import"./index-n54jd3aw.js";import"./index-0q39ajgh.js";export{dg as MergeDiffView};
|