@kabmo-labs/kabmo 0.57.0 → 0.58.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 +523 -506
- package/dist/client/static/js/Body-karkrzkc.js +3 -0
- package/dist/client/static/js/{CsvGrid-t84xmbk9.js → CsvGrid-j03knmbe.js} +2 -2
- package/dist/client/static/js/{DocxView-4jda3szm.js → DocxView-e8408vzs.js} +2 -2
- package/dist/client/static/js/{DrawioView-9qvvtnvt.js → DrawioView-fj4mfzch.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-4pba1ys5.js → HtmlPreview-9g8xwzgw.js} +1 -1
- package/dist/client/static/js/ImageView-sz4fzz9k.js +1 -0
- package/dist/client/static/js/LayoutWrapper-q6q4h04a.js +2 -0
- package/dist/client/static/js/MergeDiffView-b8f013ws.js +1 -0
- package/dist/client/static/js/Modal-ahecatp5.js +60 -0
- package/dist/client/static/js/{PdfView-sny55sne.js → PdfView-8jtdx5hd.js} +1 -1
- package/dist/client/static/js/SessionsView-jwp8xvw5.js +1 -0
- package/dist/client/static/js/{SheetView-ezqak2b4.js → SheetView-hwx8s864.js} +11 -11
- package/dist/client/static/js/{SvgPreview-q1cvdf4s.js → SvgPreview-ete36nzv.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-ftm2qwa3.js → abnfDiagram-O67JEVCF-7nsqzz6z.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-dc7zys46.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-j8kqfzmf.js → architectureDiagram-NJMV4G6O-xvpkfq2f.js} +11 -11
- package/dist/client/static/js/{astro-asmathwv.js → astro-rsrqgjjx.js} +1 -1
- package/dist/client/static/js/bash-n5d0esqg.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-m3zpsp9h.js → blockDiagram-BEXU5L5S-0saahcs6.js} +7 -7
- package/dist/client/static/js/c-pk766wx0.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-myshvbrx.js → c4Diagram-YGBWAQC7-ktpqnb4a.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-s0cwmsj4.js → classDiagram-v2-NBCMYWYE-x67cz3ms.js} +5 -5
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-t5t02sfr.js → cose-bilkent-JH36ORCC-9wzmhkz8.js} +1 -1
- package/dist/client/static/js/cpp-3pt91jvm.js +1 -0
- package/dist/client/static/js/css-sp1cgdbr.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-9fx59e89.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-6yxd72sh.js → cynefinDiagram-VND7K2PF-dmmgmv99.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-vft5103m.js → dagre-6A5THRUB-ygkkms1t.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-yy2jfvxt.js → diagram-22UHCM2B-qxj0pqb4.js} +14 -14
- package/dist/client/static/js/{diagram-3UASUU5V-1xqhzq20.js → diagram-3UASUU5V-77k8w5dt.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-f11cxgvm.js → diagram-ATOU4E4O-m0h86vf4.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-gqmkfcp7.js → diagram-CDSNMT55-5v28kaeg.js} +5 -5
- package/dist/client/static/js/{diagram-MLGK6HIB-1fg7304a.js → diagram-MLGK6HIB-zgcg9gaz.js} +2 -2
- package/dist/client/static/js/{diagram-MPIPVDR6-mem80369.js → diagram-MPIPVDR6-10c9s6e6.js} +2 -2
- package/dist/client/static/js/{dockerfile-jarjwxp9.js → dockerfile-dr9sdsqp.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-4rcbvfrj.js → ebnfDiagram-ZINNZB2B-mz4022dz.js} +1 -1
- package/dist/client/static/js/{elixir-7q2k61zb.js → elixir-3dy25ex8.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-ykd0stxz.js → elk-276RUBZZ-ccerbsag.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-b2th9bk4.js → erDiagram-OPXOYQCR-a8vjyrrw.js} +5 -5
- package/dist/client/static/js/{erlang-tjsd7n4d.js → erlang-v7344938.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-61d2ee91.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-104ywb7w.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-64p5r7cx.js → ganttDiagram-FUAMR5RP-sz1g29fp.js} +4 -4
- package/dist/client/static/js/gitGraph-4MIJSDKK-zkb30q0t.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-z3yc333r.js → gitGraphDiagram-X574FWY7-efqk42q0.js} +15 -15
- package/dist/client/static/js/graphql-2ntm7jyh.js +1 -0
- package/dist/client/static/js/html-mt2yb43b.js +1 -0
- package/dist/client/static/js/{index-w659dhe5.js → index-2a0b9ya2.js} +1 -1
- package/dist/client/static/js/index-2f6psebk.js +2 -0
- package/dist/client/static/js/{index-j9y4tjk0.js → index-3m1dksmy.js} +2 -2
- package/dist/client/static/js/{index-668fc1df.js → index-3p732mvs.js} +2 -2
- package/dist/client/static/js/{index-3x88t8g9.js → index-3ymw778n.js} +2 -2
- package/dist/client/static/js/{index-rbkvw2xs.js → index-5tp3emtg.js} +2 -2
- package/dist/client/static/js/{index-h4qmywn5.js → index-6ac860yz.js} +2 -2
- package/dist/client/static/js/{index-77wznmg5.js → index-6ey6y9em.js} +2 -2
- package/dist/client/static/js/index-6h46r2de.js +1 -0
- package/dist/client/static/js/index-6qqsy78z.js +1 -0
- package/dist/client/static/js/{index-25zpywv7.js → index-6x0kn8pb.js} +2 -2
- package/dist/client/static/js/{index-dxx49b9m.js → index-7ma44af3.js} +3 -3
- package/dist/client/static/js/index-7s4dge1z.js +1 -0
- package/dist/client/static/js/{index-my856e49.js → index-7ynf3s2w.js} +2 -2
- package/dist/client/static/js/index-8aqjj2x2.js +1 -0
- package/dist/client/static/js/index-bkwax812.js +1 -0
- package/dist/client/static/js/{index-60g0e74a.js → index-dqf0srrp.js} +2 -2
- package/dist/client/static/js/{index-mdmtxh1c.js → index-dz18nn65.js} +2 -2
- package/dist/client/static/js/{index-5m0se6fk.js → index-e42ys2q3.js} +7 -7
- package/dist/client/static/js/{index-wxs0x3g1.js → index-ewryzs4g.js} +2 -2
- package/dist/client/static/js/{index-t415df0c.js → index-f31c6jg8.js} +22 -22
- package/dist/client/static/js/index-f44k9k8d.css +1 -0
- package/dist/client/static/js/{index-nnqyew8n.js → index-fhtnvqgf.js} +2 -2
- package/dist/client/static/js/{index-396g4zz4.js → index-gaa39w5q.js} +2 -2
- package/dist/client/static/js/{index-hmjb96kb.js → index-gqsnyh8k.js} +2 -2
- package/dist/client/static/js/index-gw4c5n3a.js +2 -0
- package/dist/client/static/js/index-j863hg0d.js +9 -0
- package/dist/client/static/js/{index-e4yj4kbe.js → index-jnxmvxb8.js} +12 -12
- package/dist/client/static/js/{index-0prwdwyb.js → index-jxsha63v.js} +2 -2
- package/dist/client/static/js/index-k1576e2m.js +2 -0
- package/dist/client/static/js/index-k4qshngy.js +4 -0
- package/dist/client/static/js/{index-3x3nhs8n.js → index-k56patms.js} +2 -2
- package/dist/client/static/js/{index-8pqx5n2p.js → index-kc5yt2cd.js} +2 -2
- package/dist/client/static/js/index-mkp3gwag.js +1 -0
- package/dist/client/static/js/{index-q9gbwqbe.js → index-nzq51nbb.js} +7 -7
- package/dist/client/static/js/{index-c2vc6znd.js → index-q5q8a3qn.js} +2 -2
- package/dist/client/static/js/{index-g71wn1pr.js → index-qbqm3c91.js} +5 -5
- package/dist/client/static/js/{index-sw370sk7.js → index-qkcmspxq.js} +2 -2
- package/dist/client/static/js/index-r1wrke3j.js +1 -0
- package/dist/client/static/js/index-rr79n77k.js +470 -0
- package/dist/client/static/js/{index-y1j18rha.js → index-rxt8sf9a.js} +2 -2
- package/dist/client/static/js/{index-6m5n8b6w.js → index-ssepzdaz.js} +6 -6
- package/dist/client/static/js/{index-rsyqf691.js → index-sxag9ptg.js} +2 -2
- package/dist/client/static/js/{index-k57bandz.js → index-t71k3b28.js} +2 -2
- package/dist/client/static/js/index-tc07gd33.js +2 -0
- package/dist/client/static/js/{index-m6eh5g1q.js → index-tdg7hz80.js} +2 -2
- package/dist/client/static/js/{index-nt17ejrm.js → index-th61y26d.js} +2 -2
- package/dist/client/static/js/{index-ebnd5hnr.js → index-tnxp90ac.js} +1 -1
- package/dist/client/static/js/{index-ms80nne4.js → index-tq3t3qm4.js} +2 -2
- package/dist/client/static/js/index-ts8rhd06.js +1 -0
- package/dist/client/static/js/{index-xtrsvm0d.js → index-v8xhgfeq.js} +2 -2
- package/dist/client/static/js/{index-n71ffk62.js → index-vb5a3g01.js} +4 -4
- package/dist/client/static/js/{index-bwwgtesb.js → index-ver116ed.js} +1 -1
- package/dist/client/static/js/{index-hge0y4vn.js → index-vf01q99d.js} +2 -2
- package/dist/client/static/js/{index-wgcgshdh.js → index-w5j1wgcz.js} +1 -1
- package/dist/client/static/js/{index-cwwg7k5f.js → index-wnk9k57k.js} +27 -27
- package/dist/client/static/js/{index-2gf593e3.js → index-x7h04xzf.js} +2 -2
- package/dist/client/static/js/{index-kbaffwp1.js → index-xfyxmaj1.js} +85 -85
- package/dist/client/static/js/index-xygk0v3e.js +2 -0
- package/dist/client/static/js/{index-kt7c42n7.js → index-y0f3wbc3.js} +2 -2
- package/dist/client/static/js/index-zh550byg.js +2 -0
- package/dist/client/static/js/info-A6RAGUB7-xxvyt8p8.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-59xq3n1b.js → infoDiagram-VRGFBTTK-rykcacj5.js} +1 -1
- package/dist/client/static/js/ini-bdk46a3d.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-v18q4qt7.js → ishikawaDiagram-OU5B5YK6-rj752kd8.js} +3 -3
- package/dist/client/static/js/java-3g3925cf.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-etazj0p8.js → journeyDiagram-ZHPQQLJL-mtetwn6f.js} +5 -5
- package/dist/client/static/js/json-hdyzmffz.js +1 -0
- package/dist/client/static/js/jsx-y8r9mrdq.js +1 -0
- package/dist/client/static/js/{julia-d18zhpyp.js → julia-mxe3pnz3.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-ph15e5p2.js → kanban-definition-PNTS6WVX-4h5pw5mm.js} +3 -3
- package/dist/client/static/js/lua-wf5k6p3r.js +1 -0
- package/dist/client/static/js/markdown-9bf16dx7.js +1 -0
- package/dist/client/static/js/{mermaid.core-7ygd161b.js → mermaid.core-bs542jma.js} +8 -8
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-j5xsftrf.js → mindmap-definition-NLK3R4M7-67s4xy7h.js} +5 -5
- package/dist/client/static/js/one-dark-pro-541ed4b7.js +1 -0
- package/dist/client/static/js/one-light-nr79mykt.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-cm8jeesg.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-09nvb70v.js → pegDiagram-GJSIUBJH-qykb6ssk.js} +1 -1
- package/dist/client/static/js/{perl-sns2qvmf.js → perl-a8eeaqkn.js} +1 -1
- package/dist/client/static/js/{php-3q6v9eey.js → php-6gq92zt8.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-8b9xgcxv.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-6ymh1960.js → pieDiagram-5QR66LMP-mymrrvck.js} +2 -2
- package/dist/client/static/js/properties-xk4dn00p.js +1 -0
- package/dist/client/static/js/python-7sgz05n4.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-hk61avw2.js → quadrantDiagram-O4NWA36T-6f8ahd40.js} +6 -6
- package/dist/client/static/js/r-w4qxm0pv.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-fxr2x2mf.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-5qd45xk1.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-6fa00vpk.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-pcbtg7tj.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-r0fdhdtp.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-3jvqrfnb.js → railroadDiagram-XR7U4H2S-c3habpvw.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-zthfj48k.js → requirementDiagram-PLB6GJNP-nysqy6te.js} +12 -12
- package/dist/client/static/js/{ruby-f9k99tfq.js → ruby-mc826p2e.js} +1 -1
- package/dist/client/static/js/{rust-q7n7q6dy.js → rust-m4f4vpvn.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-nh5d6xte.js → sankeyDiagram-IPEJSGJF-s5dtfp3z.js} +4 -4
- package/dist/client/static/js/{sass-2syegq28.js → sass-8bq5r2tz.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-crej9b40.js → sequenceDiagram-PO4LG4MO-bb3yp049.js} +21 -21
- package/dist/client/static/js/{sizeCapture-INFHLROL-nvvxw58j.js → sizeCapture-INFHLROL-0m2msee7.js} +1 -1
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-e6tztjnj.js → stateDiagram-v2-GCMORJYK-cd0qgj6t.js} +3 -3
- package/dist/client/static/js/{svelte-mm3jfpje.js → svelte-5vrwkc13.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-xhdqjqmf.js → swimlanes-2SLR337P-rpb01f7p.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-zx36y2c8.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-9cve31zc.js → timeline-definition-EJHVYXUP-tqw2e6y1.js} +5 -5
- package/dist/client/static/js/treeView-Q6P3EWNA-9sn2h4ea.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-9fzms0pq.js +1 -0
- package/dist/client/static/js/tsx-h5yzg80q.js +1 -0
- package/dist/client/static/js/typescript-qy1sbhea.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-asycstwe.js → usecaseDiagram-POWQR4AR-dhf4d5xg.js} +41 -41
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-gbzk6era.js → vennDiagram-UO4OBE2U-ztkk79dv.js} +7 -7
- package/dist/client/static/js/{vue-e8e3q3hj.js → vue-gmjnxjm3.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-vy6rp5gp.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-1swwfszr.js → wardleyDiagram-VNRHLVJA-ahre5tmv.js} +5 -5
- package/dist/client/static/js/xml-mrk4xakv.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-v7qkwv0b.js → xychartDiagram-PMCCYNJV-vak2c50n.js} +6 -6
- package/dist/client/static/js/yaml-xaza6dra.js +1 -0
- package/package.json +6 -6
- package/src/client/bootstrap.d.ts +11 -0
- package/src/client/borders.css +3 -4
- package/src/client/components/auth/login-screen/index.tsx +1 -1
- package/src/client/components/common/ComposerPicker.tsx +1 -1
- package/src/client/components/common/CopyButton.tsx +1 -1
- package/src/client/components/common/FolderPicker.tsx +1 -1
- package/src/client/components/common/SubagentStatusIcon.tsx +2 -2
- package/src/client/components/common/ViewportSelector.tsx +2 -2
- package/src/client/components/common/batch-selection/BatchActionBar.tsx +1 -1
- package/src/client/components/common/batch-selection/BatchDeleteModal.tsx +4 -4
- package/src/client/components/common/checkbox/style.ts +1 -1
- package/src/client/components/common/context-usage-button/McpSection.tsx +3 -2
- package/src/client/components/common/file-icon/index.tsx +3 -3
- package/src/client/components/common/harness-glyph/index.tsx +4 -3
- package/src/client/components/common/image-viewer/fullscreen.tsx +1 -1
- package/src/client/components/common/image-viewer/index.tsx +2 -2
- package/src/client/components/common/markdown-review/ReviewPopover.tsx +2 -2
- package/src/client/components/common/markdown-review/ReviewSummary.tsx +3 -3
- package/src/client/components/common/plugin-render-boundary/index.tsx +1 -1
- package/src/client/components/common/server-control/Panel.tsx +1 -1
- package/src/client/components/common/server-control/Row.tsx +3 -3
- package/src/client/components/common/session-actions-menu/MenuItem.tsx +2 -2
- package/src/client/components/common/session-branch/SubagentRow.tsx +1 -1
- package/src/client/components/common/session-delete-modal/index.tsx +4 -4
- package/src/client/components/common/session-row/StatusSlot.tsx +1 -1
- package/src/client/components/common/session-row/index.tsx +40 -2
- package/src/client/components/common/session-row/session-row.test.tsx +46 -3
- package/src/client/components/common/shell-update-button/Modal.tsx +1 -1
- package/src/client/components/common/todo-row/index.tsx +1 -1
- package/src/client/components/common/window-controls/index.tsx +1 -1
- package/src/client/components/common/workspace-options-menu/index.tsx +4 -4
- package/src/client/components/layout/session-sidebar/Toolbar.tsx +2 -2
- package/src/client/components/layout/session-sidebar/WorktreeBadge.tsx +1 -1
- package/src/client/components/layout/session-sidebar/about-modal/UpdateLogDialog.tsx +1 -1
- package/src/client/components/layout/session-sidebar/about-modal/UpdateSection.tsx +3 -3
- package/src/client/components/layout/session-sidebar/about-modal/index.tsx +1 -1
- package/src/client/components/layout/session-sidebar/modern/FilterChips.tsx +1 -1
- package/src/client/components/layout/session-sidebar/new-workspace-modal/DirectoryList.tsx +2 -2
- package/src/client/components/layout/session-sidebar/new-workspace-modal/index.tsx +1 -1
- package/src/client/components/layout/session-sidebar/scheduler-modal/ModelFields.tsx +1 -1
- package/src/client/components/layout/session-sidebar/scheduler-modal/TaskForm.tsx +1 -1
- package/src/client/components/layout/session-sidebar/scheduler-modal/TaskList.tsx +4 -4
- package/src/client/components/layout/session-sidebar/scheduler-modal/index.tsx +1 -1
- package/src/client/components/layout/update-popup/Actions.tsx +1 -1
- package/src/client/components/mobile/mobile-right-sidebar/Action.tsx +1 -1
- package/src/client/components/mobile/mobile-right-sidebar/Header.tsx +3 -3
- package/src/client/components/mobile/mobile-right-sidebar/MissingFileBanner.tsx +2 -2
- package/src/client/components/mobile/mobile-right-sidebar/PreviewScroller.tsx +2 -2
- package/src/client/components/mobile/mobile-right-sidebar/StatusBar.tsx +2 -2
- package/src/client/components/mobile/mobile-session-sidebar/Toolbar.tsx +3 -3
- package/src/client/components/settings/Modal.tsx +8 -3
- package/src/client/components/settings/SettingsSidebarList.tsx +2 -2
- package/src/client/components/settings/Sidebar.tsx +3 -3
- package/src/client/components/settings/apply-side-effects.test.ts +46 -0
- package/src/client/components/settings/apply-side-effects.ts +8 -0
- package/src/client/components/settings/categories/BehaviorSettings.tsx +1 -1
- package/src/client/components/settings/categories/OmpSettings.tsx +3 -3
- package/src/client/components/settings/categories/UsageSettings.tsx +3 -3
- package/src/client/components/settings/categories/agent-settings/DetailPane.tsx +5 -5
- package/src/client/components/settings/categories/appearance-settings/CustomThemeEditor.tsx +177 -0
- package/src/client/components/settings/categories/appearance-settings/CustomThemeSection.test.tsx +136 -0
- package/src/client/components/settings/categories/appearance-settings/CustomThemeSection.tsx +180 -0
- package/src/client/components/settings/categories/appearance-settings/ThemeCard.tsx +1 -1
- package/src/client/components/settings/categories/appearance-settings/ThemeGrid.tsx +6 -5
- package/src/client/components/settings/categories/appearance-settings/ThemePreview.tsx +106 -0
- package/src/client/components/settings/categories/appearance-settings/ThemeSection.tsx +7 -3
- package/src/client/components/settings/categories/behavior-settings/Editor.tsx +1 -1
- package/src/client/components/settings/categories/chat-settings/ToolRenderSection.tsx +1 -1
- package/src/client/components/settings/categories/command-settings/DetailPane.tsx +4 -4
- package/src/client/components/settings/categories/dictation-settings/ExternalSection.tsx +1 -1
- package/src/client/components/settings/categories/git-settings/CommitMessageSection.tsx +1 -1
- package/src/client/components/settings/categories/git-settings/IdentitySection.tsx +2 -2
- package/src/client/components/settings/categories/harness-settings/AccountLoginPanel.tsx +3 -3
- package/src/client/components/settings/categories/harness-settings/AccountsPanel.tsx +13 -83
- package/src/client/components/settings/categories/harness-settings/HarnessImportControls.tsx +1 -1
- package/src/client/components/settings/categories/mcp-settings/ConnectionTest.tsx +1 -1
- package/src/client/components/settings/categories/mcp-settings/DetailPane.tsx +5 -5
- package/src/client/components/settings/categories/mcp-settings/ImportModal.tsx +1 -1
- package/src/client/components/settings/categories/mcp-settings/KeyValueSection.tsx +1 -1
- package/src/client/components/settings/categories/mcp-settings/SidebarList.tsx +2 -2
- package/src/client/components/settings/categories/omp-settings/ConfigTabs.tsx +4 -4
- package/src/client/components/settings/categories/omp-settings/OrderedChips.tsx +1 -1
- package/src/client/components/settings/categories/omp-settings/PresetBar.tsx +3 -3
- package/src/client/components/settings/categories/omp-settings/RoleEditor.tsx +2 -2
- package/src/client/components/settings/categories/omp-settings/RowEditor.tsx +2 -2
- package/src/client/components/settings/categories/panel-plugins/GitFreshness.tsx +2 -2
- package/src/client/components/settings/categories/panel-plugins/InstallForm.tsx +3 -3
- package/src/client/components/settings/categories/panel-plugins/InstalledList.tsx +1 -1
- package/src/client/components/settings/categories/panel-plugins/Meta.tsx +1 -1
- package/src/client/components/settings/categories/panel-plugins/PluginCard.tsx +5 -5
- package/src/client/components/settings/categories/panel-plugins/ReadmeModal.tsx +1 -1
- package/src/client/components/settings/categories/panel-plugins/Registries.tsx +4 -4
- package/src/client/components/settings/categories/panel-plugins/Section.tsx +3 -3
- package/src/client/components/settings/categories/panel-plugins/SettingsModal.tsx +2 -2
- package/src/client/components/settings/categories/panel-plugins/SyncBlockedNotice.tsx +2 -2
- package/src/client/components/settings/categories/panel-plugins/Toolbar.tsx +1 -1
- package/src/client/components/settings/categories/plugin-settings/DetailPane.tsx +2 -2
- package/src/client/components/settings/categories/plugin-settings/MarketplacePane.tsx +4 -4
- package/src/client/components/settings/categories/plugin-settings/SettingsSection.tsx +1 -1
- package/src/client/components/settings/categories/plugin-settings/SidebarList.tsx +4 -4
- package/src/client/components/settings/categories/project-settings/AddProjectModal.tsx +1 -1
- package/src/client/components/settings/categories/project-settings/DeleteProjectModal.tsx +3 -3
- package/src/client/components/settings/categories/project-settings/DetailsHeader.tsx +1 -1
- package/src/client/components/settings/categories/project-settings/IconGrid.tsx +3 -3
- package/src/client/components/settings/categories/project-settings/SidebarList.tsx +1 -1
- package/src/client/components/settings/categories/project-settings/WorktreeSettings.tsx +2 -2
- package/src/client/components/settings/categories/provider-settings/AddModelModal.tsx +3 -3
- package/src/client/components/settings/categories/provider-settings/AddProviderModal.tsx +2 -2
- package/src/client/components/settings/categories/provider-settings/AuthSection.tsx +3 -3
- package/src/client/components/settings/categories/provider-settings/DeleteProviderModal.tsx +3 -3
- package/src/client/components/settings/categories/provider-settings/EntryAdvanced.tsx +1 -1
- package/src/client/components/settings/categories/provider-settings/EntryModal.tsx +2 -2
- package/src/client/components/settings/categories/provider-settings/LoginModal.tsx +2 -2
- package/src/client/components/settings/categories/provider-settings/LogoutProviderModal.tsx +3 -3
- package/src/client/components/settings/categories/provider-settings/ModelCapabilitiesModal.tsx +1 -1
- package/src/client/components/settings/categories/provider-settings/PriceFields.tsx +1 -1
- package/src/client/components/settings/categories/skill-catalog/GitImportPanel.tsx +1 -1
- package/src/client/components/settings/categories/skill-catalog/SkillCard.tsx +1 -1
- package/src/client/components/settings/categories/skill-catalog/SourceRail.tsx +1 -1
- package/src/client/components/settings/categories/skill-settings/DetailHeader.tsx +7 -7
- package/src/client/components/settings/categories/skill-settings/DetailPane.tsx +1 -1
- package/src/client/components/settings/categories/skill-settings/SidebarList.tsx +2 -2
- package/src/client/components/settings/categories/usage-settings/ProviderCard.tsx +1 -1
- package/src/client/components/settings/categories/usage-settings/SavedResetsSection.tsx +2 -2
- package/src/client/components/settings/categories/usage-settings/SidebarList.tsx +1 -1
- package/src/client/components/settings/categories/usage-settings/TokenHarborCard.tsx +1 -1
- package/src/client/components/settings/categories/voice-settings/speech/EndpointSection.tsx +2 -2
- package/src/client/components/settings/categories/voice-settings/speech/EngineSection.tsx +5 -5
- package/src/client/components/settings/categories/voice-settings/speech/ModelsSection.tsx +4 -4
- package/src/client/components/workspace/browser-panel/ActivityToasts.tsx +2 -2
- package/src/client/components/workspace/browser-panel/EngineNotice.tsx +1 -1
- package/src/client/components/workspace/browser-panel/index.tsx +2 -2
- package/src/client/components/workspace/browser-toolbar/clusters.tsx +2 -2
- package/src/client/components/workspace/btw-panel/Messages.tsx +2 -2
- package/src/client/components/workspace/btw-panel/TopicMenu.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/AiMessageFooterSheet.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/ChangedFilesSummary.tsx +7 -7
- package/src/client/components/workspace/chat-timeline/ComposerDock.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/IrcNotice.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/MessageItem.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/OrchestrationNotice.tsx +5 -5
- package/src/client/components/workspace/chat-timeline/QueueList.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/SubagentControls.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/SystemNotice.tsx +5 -5
- package/src/client/components/workspace/chat-timeline/TaskResultContent.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/UndoConfirmModal.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/block-chrome.test.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerNotice.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.tsx +11 -11
- package/src/client/components/workspace/chat-timeline/chat-input/GoalModal.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/chat-input/VoiceNotice.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/props.ts +3 -3
- package/src/client/components/workspace/chat-timeline/plan-review/index.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FormAsk.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FormDialog.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/QuestionCard.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/SwipeDeck.tsx +7 -7
- package/src/client/components/workspace/chat-timeline/tool-renderers/extension-dialog/ApprovalBody.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/hashline-patch/index.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/AstEdit.tsx +5 -5
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.tsx +9 -9
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Debug.tsx +5 -5
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Edit.tsx +5 -5
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Eval.tsx +6 -6
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/FileMatches.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Github.tsx +7 -7
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Goal.tsx +5 -5
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/GoalRecord.tsx +5 -5
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Lsp.tsx +9 -9
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/ManageSkill.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Proc.tsx +8 -8
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Resolve.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/SecurityScan.tsx +6 -6
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/TaskResult.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Todo.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.tsx +7 -7
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ArtifactChip.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/DiffView.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/EnvelopeHeader.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolCardShell.tsx +4 -4
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolFactChips.tsx +5 -5
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolRowActions.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/card-header.ts +10 -8
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/status-glyph.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/toggle-label.test.ts +37 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/toggle-label.ts +17 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.test.tsx +50 -21
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.tsx +21 -17
- package/src/client/components/workspace/context-panel/RawJsonViewer.tsx +2 -2
- package/src/client/components/workspace/diff-panel/ConflictBanner.tsx +3 -3
- package/src/client/components/workspace/diff-panel/Toolbar.tsx +3 -3
- package/src/client/components/workspace/diff-panel/index.tsx +3 -3
- package/src/client/components/workspace/diff-panel/toolbar-git-actions.tsx +1 -1
- package/src/client/components/workspace/editor/ConflictStrip.tsx +2 -2
- package/src/client/components/workspace/editor/ExternalChangeStrip.tsx +2 -2
- package/src/client/components/workspace/editor/FilePane.tsx +6 -6
- package/src/client/components/workspace/editor/FindWidget.tsx +2 -2
- package/src/client/components/workspace/editor/GoToLineModal.tsx +1 -1
- package/src/client/components/workspace/editor/SaveAsModal.tsx +3 -3
- package/src/client/components/workspace/editor/SaveDeletedFileModal.tsx +2 -2
- package/src/client/components/workspace/editor/StatusBar.tsx +1 -1
- package/src/client/components/workspace/editor/Tabs.test.ts +3 -3
- package/src/client/components/workspace/editor/Tabs.tsx +6 -6
- package/src/client/components/workspace/editor/Toolbar.tsx +4 -4
- package/src/client/components/workspace/editor/toolbar-clusters.tsx +1 -1
- package/src/client/components/workspace/editor/viewers/DataGrid.tsx +1 -1
- package/src/client/components/workspace/editor/viewers/GridToolbar.tsx +2 -2
- package/src/client/components/workspace/editor/viewers/SheetView.tsx +2 -2
- package/src/client/components/workspace/editor/viewers/ViewerError.tsx +2 -2
- package/src/client/components/workspace/file-explorer/ArchiveModals.tsx +1 -1
- package/src/client/components/workspace/file-explorer/ContextMenu.tsx +3 -3
- package/src/client/components/workspace/file-explorer/Modals.tsx +3 -3
- package/src/client/components/workspace/file-explorer/RowLabel.test.tsx +2 -2
- package/src/client/components/workspace/git-panel/BranchToolbar.tsx +2 -2
- package/src/client/components/workspace/git-panel/ChangesList.tsx +3 -3
- package/src/client/components/workspace/git-panel/ConflictItem.tsx +3 -3
- package/src/client/components/workspace/git-panel/FileItem.tsx +1 -1
- package/src/client/components/workspace/git-panel/Modals.tsx +1 -1
- package/src/client/components/workspace/git-panel/OperationBar.tsx +4 -4
- package/src/client/components/workspace/git-panel/StashSection.tsx +1 -1
- package/src/client/components/workspace/git-panel/TreeItem.tsx +2 -2
- package/src/client/components/workspace/git-panel/branch-modal/BranchRow.tsx +2 -2
- package/src/client/components/workspace/git-panel/branch-modal/DeleteDialog.tsx +2 -2
- package/src/client/components/workspace/git-panel/branch-modal/index.tsx +2 -2
- package/src/client/components/workspace/model-dropdown/HarnessTabs.tsx +31 -76
- package/src/client/components/workspace/model-dropdown/Item.tsx +2 -2
- package/src/client/components/workspace/model-dropdown/Panel.tsx +15 -9
- package/src/client/components/workspace/model-dropdown/Section.tsx +1 -1
- package/src/client/components/workspace/model-dropdown/harness-tabs.test.tsx +12 -83
- package/src/client/components/workspace/model-dropdown/index.tsx +2 -2
- package/src/client/components/workspace/model-dropdown/picker-close.test.tsx +16 -2
- package/src/client/components/workspace/plan-panel/PageView.tsx +2 -2
- package/src/client/components/workspace/plan-panel/index.tsx +2 -2
- package/src/client/components/workspace/plugin-panel/Error.tsx +1 -1
- package/src/client/components/workspace/repo-picker/Modal.tsx +3 -3
- package/src/client/components/workspace/repo-picker/Row.tsx +5 -5
- package/src/client/components/workspace/search-panel/Body.tsx +2 -2
- package/src/client/components/workspace/terminal-panel/Header.tsx +3 -3
- package/src/client/components/workspace/terminal-panel/KeyBar.tsx +2 -2
- package/src/client/components/workspace/terminal-panel/QuickActions.tsx +1 -1
- package/src/client/components/workspace/terminal-panel/RealtimeTerminalView.tsx +1 -1
- package/src/client/components/workspace/terminal-panel/index.tsx +1 -1
- package/src/client/components/workspace/usage-panel/index.tsx +3 -3
- package/src/client/components/workspace/user-browser-panel/AddressBar.tsx +1 -1
- package/src/client/components/workspace/wiki-panel/PageView.tsx +2 -2
- package/src/client/components/workspace/wiki-panel/index.tsx +2 -2
- package/src/client/components/workspace/worktree-modal/index.tsx +1 -1
- package/src/client/data/settings/omp-schema.json +27 -7
- package/src/client/hooks/chat/timeline/session-harness.ts +2 -1
- package/src/client/hooks/editor/use-unload-guard.tsx +2 -2
- package/src/client/hooks/models/use-harness-accounts-panel.ts +142 -0
- package/src/client/hooks/ui/border-style.test.ts +1 -2
- package/src/client/hooks/ui/theme.ts +23 -2
- package/src/client/main.tsx +7 -1
- package/src/client/tailwind-contrast.test.ts +22 -7
- package/src/client/tailwind.css +115 -18
- package/src/server/lib/assets/theme-css.server.test.ts +31 -1
- package/src/server/lib/assets/theme-css.server.ts +15 -1
- package/src/server/lib/dictation/capability.server.test.ts +9 -6
- package/src/server/lib/dictation/worker-process.ts +9 -2
- package/src/server/lib/harness/accounts.test.ts +5 -3
- package/src/server/lib/harness/acp/acp-todos.test.ts +23 -0
- package/src/server/lib/omp/session/delete.server.ts +4 -0
- package/src/server/lib/realtime/topics/session-data.server.ts +63 -1
- package/src/server/lib/realtime/topics/session-data.test.ts +154 -0
- package/src/server/lib/tray/runtime.server.ts +5 -0
- package/src/server/plugins/ssr.ts +16 -4
- package/src/server/routes/settings/root.ts +11 -0
- package/src/server/routes/settings/settings-store-routes.test.ts +37 -0
- package/src/shared/lib/chat/timeline/block-chrome.ts +2 -2
- package/src/shared/lib/chat/todo/flat-list.test.ts +81 -0
- package/src/shared/lib/chat/todo/flat-list.ts +29 -0
- package/src/shared/lib/chat/todo/parser.ts +7 -53
- package/src/shared/lib/chat/todo/progress.test.ts +3 -3
- package/src/shared/lib/chat/todo/progress.ts +3 -3
- package/src/shared/lib/fs/git-status.test.ts +22 -22
- package/src/shared/lib/fs/git-status.ts +31 -31
- package/src/shared/lib/icons/icon-paint-authority.ts +5 -4
- package/src/shared/lib/omp/config/schema-releases-19-4.test.ts +20 -3
- package/src/shared/lib/settings/defaults.ts +1 -0
- package/src/shared/lib/theme/catalog.test.ts +42 -0
- package/src/shared/lib/theme/catalog.ts +66 -11
- package/src/shared/lib/theme/css.ts +25 -1
- package/src/shared/lib/theme/custom.test.ts +156 -0
- package/src/shared/lib/theme/custom.ts +260 -0
- package/src/shared/lib/theme/ink-scale.test.ts +83 -2
- package/src/shared/lib/theme/ink-scale.ts +74 -9
- package/src/shared/lib/theme/shell-palette.ts +3 -3
- package/src/shared/lib/theme/theme.test.ts +28 -13
- package/src/shared/types/settings/state.ts +11 -3
- package/tsconfig.json +6 -0
- package/dist/client/static/js/Body-k96gtstv.js +0 -3
- package/dist/client/static/js/ImageView-0gf5xdsv.js +0 -1
- package/dist/client/static/js/LayoutWrapper-pwbq5syv.js +0 -2
- package/dist/client/static/js/MergeDiffView-m4jkr786.js +0 -1
- package/dist/client/static/js/Modal-yjszc3vy.js +0 -60
- package/dist/client/static/js/SessionsView-q3800n83.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-3hkq8grc.js +0 -1
- package/dist/client/static/js/bash-n7wcmq3s.js +0 -1
- package/dist/client/static/js/c-20y64hcp.js +0 -1
- package/dist/client/static/js/cpp-ty6n0dg9.js +0 -1
- package/dist/client/static/js/css-ncvxaxt0.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-9m18e6m5.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-d4egnv9v.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-f3bdtc1z.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-grqv890n.js +0 -1
- package/dist/client/static/js/graphql-6rwdfcnf.js +0 -1
- package/dist/client/static/js/html-p76eszt9.js +0 -1
- package/dist/client/static/js/index-1mm7kyjd.js +0 -1
- package/dist/client/static/js/index-3w18s59k.js +0 -9
- package/dist/client/static/js/index-ep353yxd.js +0 -2
- package/dist/client/static/js/index-ewtv8gg7.js +0 -1
- package/dist/client/static/js/index-gr07t5c4.js +0 -2
- package/dist/client/static/js/index-jd2h5tvh.js +0 -2
- package/dist/client/static/js/index-k6wms0kx.js +0 -1
- package/dist/client/static/js/index-k9v6477a.js +0 -1
- package/dist/client/static/js/index-mv83hpva.js +0 -1
- package/dist/client/static/js/index-nr5gwny1.js +0 -470
- package/dist/client/static/js/index-rqpbva78.js +0 -2
- package/dist/client/static/js/index-taz2nfym.css +0 -1
- package/dist/client/static/js/index-x6945djv.js +0 -1
- package/dist/client/static/js/index-y5mf2w81.js +0 -1
- package/dist/client/static/js/index-y69cbdvd.js +0 -2
- package/dist/client/static/js/index-y6qtx68e.js +0 -1
- package/dist/client/static/js/index-yktwxghr.js +0 -2
- package/dist/client/static/js/index-zj65csnm.js +0 -4
- package/dist/client/static/js/info-A6RAGUB7-rzpg7qk1.js +0 -1
- package/dist/client/static/js/ini-kjcpgebh.js +0 -1
- package/dist/client/static/js/java-0bcyv1jt.js +0 -1
- package/dist/client/static/js/json-xha2drny.js +0 -1
- package/dist/client/static/js/jsx-8p6dqgpq.js +0 -1
- package/dist/client/static/js/lua-njwwdj4s.js +0 -1
- package/dist/client/static/js/markdown-8gbyxxjd.js +0 -1
- package/dist/client/static/js/one-dark-pro-4s2rr12v.js +0 -1
- package/dist/client/static/js/one-light-3bkk59ww.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-eac14hsq.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-a9xqvysf.js +0 -1
- package/dist/client/static/js/properties-d5bwhgwz.js +0 -1
- package/dist/client/static/js/python-fdwwjjhh.js +0 -1
- package/dist/client/static/js/r-4d2ygtfj.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-jv2pm0fe.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-j74sc0b6.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-eaf19baz.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-d4j5nq31.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-ba862a9p.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-hbwg3m3k.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-e8yb44pd.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-zvdv84vp.js +0 -1
- package/dist/client/static/js/tsx-dk8rpgtw.js +0 -1
- package/dist/client/static/js/typescript-5txwpd9t.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-hbv0cg4s.js +0 -1
- package/dist/client/static/js/xml-8516fzfp.js +0 -1
- package/dist/client/static/js/yaml-6k1tmwtm.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d,n,o,i,le,e,Le,_e,p,dt,f,E,ue,pt,yn,de,Ke,F,S,U,h,rn,ft,It,Rt,We,Lc,Zm,ua,rt,st,pa,_l,at,Bs,za,jo,Ho,qo,St,ur,Ts,Wo,Ko,Vo,fo,Nl,Ql,Rl,Ll}from"./index-nr5gwny1.js";import{Os,ja,Ur,Pu,Ou,ei,$u,$s,up,SA,TA,zs,Us,Gs,Gr,js,Hs,ti,qs,Ws,Ks,Vs,Mi,ni,Ys,Js,zu,Uu,Gu,ju,Hu,qu,Wu}from"./index-zj65csnm.js";import{no,Ed}from"./index-2gf593e3.js";var ie="shrink-0 w-7 h-7 inline-flex items-center justify-center rounded border transition-colors cursor-pointer",re="border-ink/15 bg-paper text-ink/70 hover:bg-ink/5 hover:text-ink",fe="border-ink/30 bg-ink/10 text-ink";function ye({isSearchVisible:t,searchQuery:c,showArchived:m,optionsOpen:u,sortOption:C,onToggleSearch:N,onSearchChange:v,onToggleArchived:A,onHideArchived:W,onToggleOptions:k,onCloseOptions:I,onSortChange:O,onNewSession:P,onNewWorkspace:x,onScheduler:B,scheduledCount:l,onRefresh:M,refreshing:z,onSelectWorkspaces:L,selecting:b}){let{ref:R,width:_}=$s(SA),H=TA(_),r=new Set(up.slice(0,H)),a=up.slice(H),G=m?"Hide Archive":"Show Archive",j=l>0?`Scheduled tasks (${l} armed)`:"Scheduled tasks",w=[];if(a.includes("new-workspace"))w.push({id:"new-workspace",label:"New Workspace",icon:yn,onSelect:x});if(a.includes("refresh"))w.push({id:"refresh",label:"Refresh sessions",icon:S,onSelect:M});if(a.includes("search"))w.push({id:"search",label:"Search sessions",icon:U,onSelect:N,active:t});if(a.includes("archive"))w.push({id:"archive",label:G,icon:dt,onSelect:A,active:m});if(a.includes("select"))w.push({id:"select",label:b?"Cancel selection":"Select workspaces",icon:Ur,onSelect:L,active:b});if(a.includes("scheduler"))w.push({id:"scheduler",label:j,icon:ja,onSelect:B});return e("div",{className:"p-3 border-b border-ink/10 flex flex-col space-y-3",children:[e("div",{ref:R,className:"flex items-center justify-between gap-2 px-1 text-ink/60",children:[e("div",{className:"flex flex-1 min-w-0 items-center gap-1.5",children:[e("button",{type:"button",title:"New Session","aria-label":"New Session",onClick:P,className:"flex-1 min-w-[52px] h-7 flex items-center justify-center space-x-1.5 px-2 rounded bg-ink text-canvas text-xs font-semibold hover:bg-ink/90 transition-colors cursor-pointer",children:[e(F,{size:14,className:"shrink-0"}),e("span",{className:"truncate",children:"New Session"})]}),r.has("new-workspace")&&e("button",{type:"button",title:"New Workspace","aria-label":"New Workspace",onClick:x,className:`${ie} ${re}`,children:e(yn,{size:14})}),r.has("scheduler")&&e("button",{type:"button",title:j,"aria-label":l>0?`Scheduled tasks, ${l} armed`:"Scheduled tasks",onClick:B,className:`relative ${ie} ${re}`,children:[e(ja,{size:14}),l>0&&e("span",{className:"absolute -top-1 -right-1 min-w-[10px] h-[10px] px-[2px] rounded-full bg-ink text-canvas text-[7px] leading-[10px] text-center font-semibold",children:l>9?"9+":l})]}),r.has("refresh")&&e("button",{type:"button",title:"Refresh sessions",onClick:M,className:`${ie} ${re}`,"aria-label":"Refresh sessions","aria-busy":z,children:e(S,{size:14,className:z?"animate-spin":""})})]}),e("div",{className:"ml-auto flex items-center gap-1.5 shrink-0",children:[r.has("search")&&e("button",{type:"button",title:t?"Hide search":"Search sessions","aria-label":t?"Hide search":"Search sessions","aria-pressed":t,onClick:N,className:`${ie} ${t?fe:re}`,children:e(U,{size:14})}),r.has("select")&&e("button",{type:"button",title:b?"Cancel selection":"Select workspaces","aria-label":b?"Cancel selection":"Select workspaces","aria-pressed":b,onClick:L,className:`${ie} ${b?fe:re}`,children:e(Ur,{size:14})}),r.has("archive")&&e("button",{type:"button",title:G,"aria-label":G,"aria-pressed":m,onClick:A,className:`${ie} ${m?fe:re}`,children:e(dt,{size:14})}),r.has("sort")&&e("div",{className:"relative",children:[e("button",{type:"button",title:"Sort workspaces","aria-label":"Sort workspaces","aria-haspopup":"menu","aria-expanded":u,onClick:k,className:`${ie} ${u||C!=="A-Z"?fe:re}`,children:e(Os,{size:14})}),u&&e("div",{className:"glass-popover absolute right-0 top-full mt-2 w-48 bg-paper border border-ink/15 rounded-lg shadow-lg z-50 py-1",onMouseLeave:I,children:e(ei,{variant:"desktop",sortOption:C,onSortChange:O})})]}),w.length>0&&e($u,{actions:w,sortHidden:a.includes("sort"),sortOption:C,onSortChange:O})]})]}),t&&e("div",{className:"pt-1",children:e("input",{type:"text",placeholder:"Search workspaces & sessions...",value:c,onChange:(K)=>v(K.currentTarget.value),autoFocus:!0,className:"w-full bg-ink/5 border border-ink/10 rounded px-2.5 py-1.5 outline-none focus:border-ink/30 text-xs text-ink placeholder-ink/40 transition-colors"})}),m&&e("div",{className:"flex items-center justify-between bg-warning/10 border border-warning/25 text-warning rounded px-2.5 py-1.5 text-[10px] font-medium",children:[e("div",{className:"flex items-center space-x-1.5",children:[e(dt,{size:10}),e("span",{children:"Showing Archived"})]}),e("button",{className:"hover:text-warning-hover",onClick:W,children:e(h,{size:10})})]})]})}var Ce={inset:"px-2",insetPx:8,slotWidth:16,markGap:8,padding:"py-1.5",glyph:st.compact};function Ae({sessionId:t,title:c,harness:m,isActive:u=!1,isArchived:C=!1,status:N,awaitingInput:v=!1,timeAgo:A,timeTitle:W,runStartedAt:k,onClick:I,onArchive:O,onDelete:P,onRename:x,onRenameWithAi:B,expandable:l=!1,isExpanded:M=!1,onToggleExpand:z,isChild:L=!1,folderId:b,waitingFor:R,onCancelWait:_,worktree:H,selectable:r=!1,selected:a=!1,onToggleSelect:G}){let j=za(t),w=Boolean(l&&z),K=Boolean(R),V=w&&!(v||N==="stream"||K)&&!j,J=Boolean(j||v||N)&&!V,{isEditing:q,draft:y,setDraft:T,inputRef:ee,startRename:ae,handleKeyDown:Y,handleBlur:ne}=qo(c,x),Q=Wo(),te=Q.anchor!==null,se=Boolean(x||O||P||_);return e(d,{children:[e("div",{"data-testid":"session-item","data-session-id":String(t),"data-selected":r&&a?"true":void 0,"data-menu-open":te?"true":void 0,onClick:q?void 0:r?G:I,onContextMenu:se&&!q&&!r?Q.openAtCursor:void 0,className:`group/item relative flex items-center w-full rounded-lg px-2 py-1.5 cursor-pointer text-xs transition-colors select-none ${r&&a||te?Ws:u?"bg-ink/10 font-medium text-ink":"text-ink/75 hover:text-ink hover:bg-ink/5"}`,children:[r?e(d,{children:[e(Gr,{checked:a,label:`Select ${c}`,onChange:()=>G?.()}),e("span",{className:"w-2 shrink-0"})]}):e(d,{children:[e("span",{className:"relative w-4 h-4 shrink-0",children:[w&&z&&e("button",{type:"button",onClick:(Z)=>{Z.stopPropagation(),z(Z)},title:M?"Collapse sessions and subagents":"Expand sessions and subagents","aria-expanded":M,className:`peer absolute inset-0 flex items-center justify-center rounded cursor-pointer transition-opacity ${V?"text-ink/60 hover:text-ink":"text-ink/40 hover:text-ink pointer-events-none opacity-0 group-hover/item:pointer-events-auto group-hover/item:opacity-100 focus-visible:opacity-100"}`,children:M?e(E,{size:13}):e(ue,{size:13})}),J&&e("span",{className:`pointer-events-none absolute inset-0 flex items-center justify-center text-ink/60 transition-opacity ${w?"group-hover/item:opacity-0 peer-focus-visible:opacity-0":""}`,children:j?e("span",{role:"status","aria-label":"Generating a name…",children:e(p,{size:12,className:"animate-spin"})}):v?e(Le,{size:12,className:"animate-pulse text-ink/80"}):K?e("span",{role:"status","aria-label":`Waiting for ${R?.title??"another session"}`,children:e(Ke,{size:12,className:"animate-pulse text-ink/60"})}):N==="stream"?e("span",{role:"status","aria-label":"Running",children:e(p,{size:12,className:"animate-spin"})}):e(f,{size:12})}),L&&!w&&!J&&e("span",{"data-testid":"child-indicator","aria-hidden":"true",className:"pointer-events-none absolute inset-0 flex items-center justify-center text-ink/35",children:e(de,{size:12,"aria-hidden":"true"})})]}),e("span",{className:"w-2 shrink-0"})]}),m&&e("span",{className:"mr-1.5 flex shrink-0 items-center",children:e(rt,{harness:m,size:st.compact})}),q?e("input",{ref:ee,autoFocus:!0,value:y,onChange:(Z)=>T(Z.currentTarget.value),onClick:(Z)=>Z.stopPropagation(),onKeyDown:Y,onBlur:ne,className:"flex-1 min-w-0 bg-paper border border-ink/25 rounded px-1 py-0.5 text-xs text-ink outline-none focus:border-ink/50"}):e("span",{className:"flex-1 min-w-0 flex flex-col leading-snug",children:[e("span",{className:"min-w-0 truncate",children:c.charAt(0).toUpperCase()+c.slice(1)}),K&&e("span",{className:"truncate text-[10px] text-ink/40 font-normal",children:["waiting for ",R?.title??"another session"]}),H&&!q&&e(js,{worktree:H})]}),!q&&e(qs,{timeAgo:A,timeTitle:W,runStartedAt:k,className:"shrink-0 ml-2 font-mono text-[10px]"}),!q&&se&&!r&&e("button",{type:"button",onClick:Q.openBelow,title:"Session actions","aria-label":"Session actions","aria-haspopup":"menu","aria-expanded":te,className:"shrink-0 ml-1 p-1 text-ink/40 hover:text-ink hover:bg-ink/10 rounded cursor-pointer",children:e(_e,{size:14})})]}),Q.anchor&&e(Ko,{anchor:Q.anchor,sessionId:t,...m?{harness:m}:{},...b!==void 0?{folderId:b}:{},isArchived:C,onRename:x?ae:void 0,onRenameWithAi:B,onArchive:O,onDelete:P,onCancelWait:_,onClose:Q.close})]})}function Oe({folder:t,isOpen:c,onToggleFolder:m,checkbox:u,batchActive:C,showMenu:N,onToggleMenu:v,onCloseMenu:A,onNewSession:W,onNewWorktreeSession:k,onOpenFolder:I,onSelectSessions:O,confirmDelete:P,onPin:x,onDelete:B,onRequestDelete:l,onCancelDelete:M}){let z=pa(t.icon),[L,b]=n(!1),R=Boolean(k&&t.project_path),_=i(null),[H,r]=n(null);return e("div",{className:"group flex items-center justify-between h-7 text-xs font-semibold text-ink px-2 hover:bg-ink/5 rounded-md transition-colors select-none",children:[e("div",{className:"flex-1 h-full flex items-center cursor-pointer min-w-0",onClick:C?void 0:m,children:[u?e(d,{children:[e(Gr,{size:"md",checked:u.checked,indeterminate:u.indeterminate,label:u.label,onChange:u.onChange}),e("span",{className:"w-2 shrink-0"})]}):e(d,{children:[e("span",{className:"relative w-4 h-4 flex items-center justify-center shrink-0",children:[e("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover:opacity-0 touch-hidden",children:t.customIconUrl?e("img",{src:t.customIconUrl,alt:"",className:"w-[15px] h-[15px] rounded-xs object-contain shrink-0",referrerPolicy:"no-referrer"}):e(z,{size:15,className:"project-accent-mark text-ink/75",style:_l(t.accentColor)})}),e("span",{className:"absolute inset-0 flex items-center justify-center text-ink/60 opacity-0 transition-opacity group-hover:opacity-100 touch-visible",children:c?e(E,{size:13}):e(ue,{size:13})})]}),e("span",{className:"w-2 shrink-0"})]}),t.isPinned&&e(no,{size:11,className:"text-ink/60 shrink-0 mr-1.5"}),e("span",{className:"truncate text-[13px] font-semibold tracking-tight",children:t.name})]}),!C&&e("div",{className:"flex items-center space-x-0.5 pl-1",children:[e("button",{type:"button",title:"New Session","aria-label":`New session in ${t.name}`,className:"w-5 h-5 flex items-center justify-center text-ink/40 hover:text-ink hover:bg-ink/10 rounded cursor-pointer transition-colors",onClick:(a)=>{a.stopPropagation(),W()},children:e(F,{size:12})}),e("div",{className:"relative flex items-center",children:[e("button",{ref:_,type:"button",title:`Options for ${t.name}`,"aria-label":`Options for ${t.name}`,"aria-haspopup":"menu","aria-expanded":N,className:"w-5 h-5 flex items-center justify-center text-ink/40 hover:text-ink hover:bg-ink/10 rounded cursor-pointer transition-colors",onClick:(a)=>{if(a.stopPropagation(),_.current)r(It(_.current));v()},children:e(_e,{size:12})}),e(Rt,{anchor:N?H:null,align:"end",ariaLabel:`Options for ${t.name}`,className:"glass-popover w-44 rounded-md border border-ink/15 bg-paper py-1 text-xs shadow-lg",onClose:A,children:e(Ks,{variant:"desktop",isPinned:t.isPinned,onOpenFolder:I,onSelectSessions:O,onNewWorktree:R?()=>{v(),b(!0)}:void 0,confirmDelete:P,onPin:x,onDelete:B,onRequestDelete:l,onCancelDelete:M})})]})]}),R&&e(Vo,{isOpen:L,onClose:()=>b(!1),root:t.project_path??null,folderId:t.id,folderName:t.name,onCreated:(a)=>{b(!1),k?.(t.id,a.path)}})]})}function Te({folder:t,activeSessionId:c,onSelectSession:m,onNewSessionForFolder:u,onNewWorktreeSession:C,forceExpanded:N=!1,showArchived:v=!1,sessionStatus:A={},onToast:W,batch:k,onStartSessionSelection:I,onCancelWait:O}){let[P,x]=n(t.isExpanded||!1),[B,l]=n(!1),{visibleCount:M,showMore:z,showLess:L,canShowLess:b}=Us(),[R]=le(),_=R.get("subagent"),H=R.get("sessionId"),{expandedSessionIds:r,toggleSession:a}=Ts();o(()=>{if(typeof t.isExpanded==="boolean")x(t.isExpanded)},[t.isExpanded]);let{refresh:G,runStartedAtMap:j}=at(),w=ft(),{confirmDelete:K,requestDelete:oe,cancelDelete:V,handlePin:J,handleDelete:q,handleArchive:y,handleRename:T,handleRenameWithAi:ee,handleOpenFolder:ae}=Gs(t,G,W),Y=jo(),ne=()=>{l(!1),V()},Q=t.sessions,te=()=>{let s=!P;if(x(s),typeof t.id!=="number")return;w.submit({isExpanded:String(s)},{method:"POST",action:`/api/folders/${t.id}/toggle`})},se=()=>{J(),l(!1)},Z=()=>{q(),l(!1)},ge=ae?()=>{ae(),l(!1)}:void 0,he=N||P,me=(Q||[]).filter((s)=>v?s.is_archived===1:s.is_archived!==1),{folderCheckbox:g,sessionCheckboxes:D,folderSummary:ce,toggleFolderSelection:be,rendered:Fe,hiddenCount:ke}=Ys({batch:k,folder:t,sessions:me,showArchived:v,visibleCount:M,activeSessionId:c,sessionStatus:A}),Se=ni(Fe),Ie=he||D,xe=ke>0,we=(s,pe)=>{let X=String(s.id),Ne=c!==null?String(c)===X:s.is_active===1,Me=Ne&&H===X&&Boolean(_),ve=St(X);return e(Ae,{sessionId:s.id,title:s.title,harness:s.harness,folderId:s.folder_id,isActive:Ne&&!Me,isArchived:s.is_archived===1,status:A[X],awaitingInput:Boolean(s.awaitingInput),worktree:s.worktree,timeAgo:Hs(s.updated_at??s.created_at),timeTitle:ti(s.updated_at??s.created_at),runStartedAt:A[X]==="stream"?j[X]:void 0,onClick:()=>m(s.id),onArchive:()=>y(s),onDelete:ve?void 0:()=>Y.requestDelete(s),onRename:ve?void 0:(Ee)=>void T(s,Ee),onRenameWithAi:ve?void 0:()=>void ee(s),expandable:pe.expandable,isChild:pe.isChild,isExpanded:pe.isExpanded,onToggleExpand:pe.onToggleExpand,waitingFor:s.waitingFor?{title:s.waitingFor.title}:void 0,onCancelWait:s.waitingFor?()=>O?.(s.waitingFor.waitId):void 0,selectable:D,selected:Boolean(k?.selected.includes(X)),onToggleSelect:k?()=>k.toggle(X):void 0})},Be=(s)=>Vs(s,Se.childrenOf,r,a);return e("div",{className:"space-y-1",children:[e(Oe,{folder:t,isOpen:he,onToggleFolder:te,checkbox:g&&ce?{checked:ce.all,indeterminate:ce.some,label:`Select ${t.name}`,onChange:be}:null,batchActive:Boolean(k),showMenu:B,onToggleMenu:()=>l(!B),onCloseMenu:ne,onNewSession:()=>u(t.id),onNewWorktreeSession:C,onOpenFolder:ge,onSelectSessions:I?()=>{l(!1),I(t.id)}:void 0,confirmDelete:K,onPin:se,onDelete:Z,onRequestDelete:oe,onCancelDelete:V}),Ie&&e("div",{className:"space-y-0.5",children:[Se.roots.map((s)=>{let pe=String(s.id),X=Be(s);return e("div",{className:"space-y-0.5",children:[we(s,X),X.isExpanded&&e(Mi,{parentId:pe,hasSubagents:Boolean(s.hasSubagents),childrenOf:Se.childrenOf,expandedIds:r,onToggle:a,activeSessionId:c===null?null:String(c),renderSession:we,style:Ce})]},s.id)}),(xe||b)&&!D&&e("div",{className:"flex items-center gap-1",children:[xe&&e("button",{type:"button",onClick:z,className:"flex items-center min-w-0 text-xs text-ink/45 hover:text-ink/80 py-1.5 px-2 rounded-lg hover:bg-ink/5 transition-colors cursor-pointer select-none",children:[e("span",{className:"w-4 h-4 shrink-0 flex items-center justify-center",children:e(E,{size:12})}),e("span",{className:"w-2 shrink-0"}),e("span",{className:"truncate leading-snug",children:["Show more sessions (",ke,")"]})]}),b&&e("button",{type:"button",onClick:L,className:"ml-auto shrink-0 flex items-center gap-1 text-xs text-ink/45 hover:text-ink/80 py-1.5 px-2 rounded-lg hover:bg-ink/5 transition-colors cursor-pointer select-none",children:[e(pt,{size:12}),e("span",{className:"truncate leading-snug",children:"Show less"})]})]}),me.length===0&&e("div",{className:"px-3 py-2 text-[11px] text-ink/40 italic",children:v?"No archived sessions.":"No sessions."})]}),e(Ho,{session:Y.pending,isDeleting:Y.isDeleting,error:Y.error,onClose:Y.cancelDelete,onConfirm:()=>void Y.confirmDelete()})]})}function De({folders:t,activeSessionId:c,searchQuery:m,showArchived:u,harnessFilter:C,sessionStatus:N,onSelectSession:v,onNewSessionForFolder:A,onNewWorktreeSession:W,onToast:k,batch:I,onStartSessionSelection:O,onCancelWait:P}){return e("div",{className:"flex-1 scrollbar-overlay-container p-2 space-y-4",children:t.length===0?e("div",{className:"text-center py-8 text-xs text-muted",children:m?"No results found.":C?`No chats on ${ua(C)}.`:"No workspaces available."}):t.map((x)=>e(Te,{folder:x,activeSessionId:c,onSelectSession:v,onNewSessionForFolder:A,onNewWorktreeSession:W,forceExpanded:m.trim().length>0,showArchived:u,sessionStatus:N,onToast:k,batch:I,onStartSessionSelection:O,onCancelWait:P},x.id))})}var ze=[3,2];function Re(){return e("div",{className:"flex-1 p-2 space-y-4","aria-hidden":"true",children:ze.map((t,c)=>e("div",{className:"space-y-1.5",children:[e("div",{className:"flex items-center gap-2 px-1 py-1.5",children:[e("span",{className:"w-3.5 h-3.5 rounded-sm animate-pulse bg-ink/10"}),e("span",{className:"h-3 w-24 rounded animate-pulse bg-ink/10"})]}),Array.from({length:t},(m,u)=>e("div",{className:"flex items-center gap-2 rounded px-2 py-1.5",children:[e("span",{className:"w-4 h-4 rounded-full animate-pulse bg-ink/10"}),e("span",{className:"h-3 rounded animate-pulse bg-ink/10",style:{width:`${58-u%3*12}%`}})]},u))]},c))})}function Pe({className:t="",folders:c,initializing:m,failed:u,activeSessionId:C,sessionStatus:N,searchQuery:v,onSearchChange:A,showArchived:W,onToggleArchived:k,sortOption:I,optionsOpen:O,onToggleOptions:P,onCloseOptions:x,onSortChange:B,harnessFilter:l,onHarnessFilterChange:M,harnessOptions:z,onRefresh:L,refreshing:b,scheduledCount:R,onNewSession:_,onNewWorkspace:H,onScheduler:r,onSelectSession:a,onNewSessionForFolder:G,onNewWorktreeSession:j,onToast:w,onCancelWait:K,batch:oe,onSelectWorkspaces:V,onStartSessionSelection:J}){let[q,y]=n(!1),T=q||v.length>0,ee=Boolean(oe);return e("div",{className:`flex flex-col ${t}`,children:[e(ye,{isSearchVisible:T,searchQuery:v,showArchived:W,optionsOpen:O,sortOption:I,onToggleSearch:()=>{if(T)y(!1),A("");else y(!0)},onSearchChange:A,onToggleArchived:k,onHideArchived:k,onToggleOptions:P,onCloseOptions:x,onSortChange:B,onNewSession:_,onNewWorkspace:H,onScheduler:r,scheduledCount:R,onRefresh:L,refreshing:b,onSelectWorkspaces:V,selecting:ee}),e("div",{className:"px-3 pt-2 pb-1",children:e(zs,{options:z,value:l,onChange:M})}),u?e(Js,{onRetry:L,refreshing:b}):m?e(Re,{}):e(De,{folders:c,activeSessionId:C,searchQuery:v,showArchived:W,harnessFilter:l,sessionStatus:N,onSelectSession:a,onNewSessionForFolder:G,onNewWorktreeSession:j,onToast:w,batch:oe,onStartSessionSelection:J,onCancelWait:K})]})}function Wn({className:t="",appSettings:c={}}){let{folders:m,initializing:u,failed:C,refreshNow:N,isRefreshing:v,activeSessionId:A,sessionParam:W,searchQuery:k,setSearchQuery:I,showArchived:O,setShowArchived:P,optionsOpen:x,setOptionsOpen:B,sortOption:l,handleSortChange:M,harnessFilter:z,setHarnessFilter:L,harnessOptions:b,processedFolders:R,sessionStatus:_,handleSelectSession:H}=Uu(c,{expandSearchMatches:!0}),[,r]=le(),a=Ed(),[G,j]=n(!1),[w,K]=n(!1),oe=Pu(),{pushToast:V}=We(),J=Ql(V);Gu({onNotice:V});let q=Hu(R,O,N),{selection:y,deleteRun:T,archiveRun:ee,binding:ae,scopeFolder:Y,available:ne,selected:Q}=q,te=()=>{ee.archive(Q).then((g)=>{if(!g)return;let D=ju(g);if(D)V(D.message,D.tone);if(!g.error)y.end()})},se=(g)=>{let D=Nl(m,W,g);if(D)fo(D)},Z=()=>{Zm({replace:!0})},ge=(g,D)=>{se(g);let ce=ur(g);rn(ce,"chat.spawnTarget",{folderId:g,worktreePath:D}),r((be)=>Lc(be,ce,g),{replace:!0})},he=(g)=>{se(g),r((D)=>Lc(D,ur(g),g),{replace:!0})},me={className:`flex-1 min-h-0 w-full ${t}`,folders:R,initializing:u,failed:C,activeSessionId:A,sessionStatus:_,searchQuery:k,onSearchChange:I,showArchived:O,onToggleArchived:()=>P(!O),sortOption:l,optionsOpen:x,onToggleOptions:()=>B(!x),onCloseOptions:()=>B(!1),onSortChange:M,harnessFilter:z,onHarnessFilterChange:L,harnessOptions:b,onRefresh:N,refreshing:v,scheduledCount:oe,onNewSession:Z,onNewWorkspace:()=>j(!0),onScheduler:()=>K(!0),onSelectSession:H,onNewSessionForFolder:he,onNewWorktreeSession:ge,onToast:V,onCancelWait:J,batch:ae,onSelectWorkspaces:q.toggleWorkspaceSelection,onStartSessionSelection:(g)=>y.begin("session",g)};return e(d,{children:[e("div",{className:"flex flex-col h-full",children:[a==="modern"?e(zu,{...me}):e(Pe,{...me}),y.mode&&e(qu,{mode:y.mode,count:Q.length,total:ne.length,busy:T.isDeleting,archiving:ee.isArchiving,scopeLabel:Y?.name,onSelectAll:()=>y.selectAllOf(ne),onUnselectAll:()=>y.unselectAllOf(ne),onDelete:()=>T.request(Q),onArchive:te,onCancel:y.end})]}),e(Wu,{mode:y.mode??"session",count:T.pending.length,scopeLabel:Y?.name,isDeleting:T.isDeleting,progress:T.progress,outcome:T.outcome,onClose:()=>{let g=T.outcome?.refused.length??0;if(T.cancel(),T.outcome&&g===0)y.end()},onConfirm:()=>{let g=y.mode??"session";T.confirm(g).then((D)=>{if(D&&D.refused.length===0)y.end()})}}),e(Bs,{isOpen:G,onClose:()=>j(!1),onCreate:Rl,onClone:Ll}),e(Ou,{isOpen:w,onClose:()=>K(!1),activeSessionId:typeof W==="string"?W:null,onToast:V})]})}export{Wn as SessionsView};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Eg}from"./index-cwwg7k5f.js";export{Eg as createArchitectureServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Cm}from"./index-kt7c42n7.js";export{Cm as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{pi}from"./index-396g4zz4.js";export{pi as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ec}from"./index-m6eh5g1q.js";import"./index-396g4zz4.js";export{Ec as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{np,Ms,tb,nb,rb,ab}from"./index-668fc1df.js";export{tb as css,ab as gss,Ms as keywords,rb as less,np as mkCSS,nb as sCSS};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{yg}from"./index-cwwg7k5f.js";export{yg as createCynefinServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Bg}from"./index-cwwg7k5f.js";export{Bg as createEventModelingServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./index-kbaffwp1.js";import"./index-sw370sk7.js";import{eb}from"./index-t415df0c.js";export{eb as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{vg}from"./index-cwwg7k5f.js";export{vg as createGitGraphServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Hg}from"./index-rbkvw2xs.js";import"./index-j9y4tjk0.js";import"./index-nnqyew8n.js";import"./index-q0k1am0g.js";import"./index-wxs0x3g1.js";export{Hg as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{qn}from"./index-60g0e74a.js";import"./index-q0k1am0g.js";import"./index-mpyd7qxj.js";export{qn as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d,n,o,u,le,e,B,p,pn,Pe,U,bh,Te,yl,xt,so,nt,J}from"./index-nr5gwny1.js";function F(a){if(!Number.isFinite(a)||a<=0)return"";return new Date(a).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}function P({files:a,selected:h,onSelect:b}){let[i,l]=n(""),r=u(()=>{let t=i.trim().toLowerCase();if(!t)return a;return a.filter((c)=>c.title.toLowerCase().includes(t))},[a,i]);return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-canvas/40",children:[e("div",{className:"flex flex-shrink-0 items-center gap-1.5 border-b border-ink/10 px-2 py-1.5",children:[e(U,{size:12,className:"flex-shrink-0 text-ink/40"}),e("input",{type:"search",value:i,onChange:(t)=>l(t.target.value),placeholder:"Filter plans…","aria-label":"Filter plans",className:"min-w-0 flex-1 bg-transparent text-[11px] text-ink outline-none placeholder:text-ink/35"})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:r.length===0?e("p",{className:"px-3 py-2 text-[11px] text-ink/40 italic",children:a.length===0?"No plan yet":"No plan matches the filter"}):e("ul",{className:"py-1",children:r.map((t)=>{let c=t.path===h,m=F(t.modifiedAt);return e("li",{children:e("button",{type:"button",onClick:()=>b(t.path),"aria-current":c?"true":void 0,title:`${t.path}${m?` · ${m}`:""}`,className:`flex w-full items-start gap-1.5 px-2.5 py-1.5 text-left transition-colors ${c?"bg-ink/10 font-semibold text-ink":"text-ink/80 hover:bg-ink/5 hover:text-ink"}`,children:[e(Pe,{size:12,className:`mt-0.5 flex-shrink-0 ${c?"text-ink":"text-ink/40"}`}),e("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block truncate text-[11.5px]",children:t.title}),m&&e("span",{className:"block truncate font-mono text-[10px] text-ink/40",children:m})]})]})},t.path)})})})]})}function y({file:a,content:h,isLoading:b,error:i,truncated:l,onBack:r}){return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-paper",children:[e("div",{className:"flex flex-shrink-0 items-center gap-1.5 border-b border-ink/10 px-2.5 py-1.5",children:[e("button",{type:"button",onClick:r,title:"Back to the plan list","aria-label":"Back to the plan list",className:"flex-shrink-0 rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink @[520px]:hidden",children:e(pn,{size:13})}),e("span",{className:"min-w-0 flex-1 truncate text-[11px] text-ink/50",title:a?.path??"",children:a?.path??"Plan"}),b&&e(p,{size:12,className:"flex-shrink-0 animate-spin text-ink/40"})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:i?e("div",{className:"flex flex-col items-center gap-2 px-6 py-8 text-center",children:[e(B,{size:16,className:"text-error"}),e("p",{className:"text-xs text-error",children:i})]}):!h?e("div",{className:"px-6 py-8 text-center text-xs text-ink/40",children:b?"Reading the plan…":"This plan is empty."}):e("article",{className:"mx-auto max-w-4xl px-5 py-4",children:[e(J,{content:h,className:"max-w-none"}),l&&e("p",{className:"mt-4 border-t border-ink/10 pt-2 text-[11px] text-ink/50",children:"This plan is longer than the reader's budget and was cut off."})]})})]})}function X({className:a="",active:h=!0,tabsMode:b=!1}){let[i]=le(),l=i.get("sessionId"),[r,t]=yl("plan.selectedFile",null),[c,m]=n(!1),k=r&&r.sessionId===l?r.path:null,s=Te(l?bh(l):null,{enabled:h}),x=s.data?.files??[],v=s.data?.current??null,f=u(()=>{if(k&&x.some((g)=>g.path===k))return k;return v},[k,x,v]),w=u(()=>x.find((g)=>g.path===f)??null,[x,f]);o(()=>{if(!l||!f||f===k)return;t({sessionId:l,path:f})},[l,f,k,t]),o(()=>{m(!1)},[l]);let S=(g)=>{if(l)t({sessionId:l,path:g});m(!0)};if(!l)return e("div",{className:`flex h-full flex-col items-center justify-center bg-paper text-ink/40 ${a}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});let N=x.length>0;return e("div",{className:`@container flex h-full min-h-0 w-full flex-col bg-paper text-xs text-ink ${a}`,children:[e(xt,{left:e(d,{children:[e(Pe,{size:12,className:"flex-shrink-0 text-ink/50"}),e(so,{id:"plan",tabsMode:b,children:e("span",{className:"truncate text-[11px] font-medium text-ink/70",children:"Plan mode"})}),N&&e("span",{className:"flex-shrink-0 rounded border border-ink/15 bg-ink/5 px-1.5 py-0.5 font-mono text-[10px] text-ink/60",children:x.length})]}),right:e(nt,{label:"Re-read the plan",onClick:s.refresh,busy:s.isLoading||s.refreshing,disabled:s.isLoading})}),s.stale&&!s.data?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(B,{size:16,className:"text-error"}),e("p",{className:"text-error",children:"The plan could not be read."}),e("button",{type:"button",onClick:s.refresh,className:"text-[11px] font-semibold text-ink/70 underline underline-offset-2 hover:text-ink",children:"Try again"})]}):!s.data?e("div",{className:"flex flex-1 items-center justify-center gap-2 text-ink/40",children:[e(p,{size:14,className:"animate-spin"}),e("span",{children:"Reading the plan…"})]}):!N?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(Pe,{size:18,className:"text-ink/30"}),e("p",{className:"max-w-sm text-[11px] leading-relaxed text-ink/60",children:"No plan yet. Turn on Plan mode in the composer, and the plan this session writes will appear here."})]}):e("div",{className:"flex min-h-0 flex-1 flex-col @[520px]:flex-row-reverse",children:[e("div",{className:`min-h-0 w-full @[520px]:w-52 @[520px]:flex-shrink-0 border-b border-ink/10 @[520px]:border-b-0 @[520px]:border-l ${c?"hidden @[520px]:flex":"flex"} flex-col`,children:e(P,{files:x,selected:f,onSelect:S})}),e("div",{className:`min-w-0 min-h-0 flex-1 ${c?"flex":"hidden @[520px]:flex"} flex-col`,children:e(y,{file:w,content:s.data.content,isLoading:s.isLoading,error:s.stale?"The plan could not be read.":null,truncated:s.data.truncated,onBack:()=>m(!1)})})]})]})}export{X as PlanPanel};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{d,n,o,K,i,u,a,Dr,e,s,ro,_e,ao,p,Kn,Ne,Q,I,dt,f,E,ue,pt,ae,fe,de,Jn,fn,Zn,F,S,Ra,U,La,vn,h,Mr,Lo,sr,Bm,Te,T,_m,Jg,xr,wr,xt,nt,he,_d,Ei,X,mt,ft,On,an,gt,wl,We,be,J}from"./index-nr5gwny1.js";import{wm,Tr}from"./index-jd2h5tvh.js";var jt={name:"folder-tree",size:24,node:[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]},Ve=s(jt);var Ut={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]},Ye=s(Ut);function Xe({message:t,hasStagedChanges:l,isBusy:c=!1,amend:r=!1,seeded:m=!1,isGenerating:g=!1,suggestion:x=null,generated:v=!1,onToggleAmend:N,onChangeMessage:P,onCommit:w,onGenerate:C,onUseSuggestion:R,onDismissSuggestion:G}){let M=t.trim().length>0&&!c&&(r||l),k=(r||l)&&!c&&!g,b=r?"Rewrite the previous commit with this message":l?"Commit staged changes":"Stage changes first",y=g?"Generating…":r||l?"Generate a commit message from the staged changes":"Stage changes first";return e("div",{className:"border-t border-ink/10 bg-canvas/50 p-3 flex flex-col gap-2",children:[x&&e("div",{className:"rounded border border-ink/20 bg-paper p-2.5 space-y-2",children:[e("div",{className:"flex items-center justify-between gap-2",children:[e("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-ink/45",children:"Generated message"}),e("div",{className:"flex items-center gap-1",children:[e("button",{type:"button",onClick:R,className:"px-2 py-0.5 rounded bg-ink text-canvas text-[10px] font-medium hover:bg-ink/90 transition-colors cursor-pointer",children:"Use"}),e("button",{type:"button",onClick:G,className:"px-2 py-0.5 rounded border border-ink/20 text-ink/70 text-[10px] font-medium hover:bg-ink/5 transition-colors cursor-pointer",children:"Dismiss"})]})]}),e("pre",{className:"whitespace-pre-wrap break-words text-[11px] text-ink/80 font-mono max-h-32 overflow-y-auto",children:x})]}),e("textarea",{value:t,onChange:(L)=>P(L.currentTarget.value),onKeyDown:(L)=>{if(L.key==="Enter"&&(L.metaKey||L.ctrlKey)&&M)L.preventDefault(),w()},placeholder:r?"New message for the previous commit (⌘/Ctrl+Enter to commit)":"Commit message (⌘/Ctrl+Enter to commit)",rows:5,className:"w-full resize-y min-h-[100px] max-h-[200px] bg-paper border border-ink/20 rounded px-2.5 py-1.5 text-xs text-ink placeholder-ink/40 focus:outline-none focus:border-ink/40 transition-colors font-mono"}),v&&t.trim().length>0&&e("div",{className:"flex items-center gap-1 text-[10px] text-ink/40",children:[e(Ne,{size:10})," Generated from staged changes"]}),e("div",{className:"flex flex-wrap items-center gap-2",children:[e("label",{className:"flex items-center gap-1.5 text-[11px] text-ink/70 cursor-pointer select-none",children:[e("input",{type:"checkbox",checked:r,onChange:(L)=>N?.(L.currentTarget.checked),className:`${be} accent-ink cursor-pointer`}),"Amend"]}),r&&m&&e("span",{className:"text-[10px] text-ink/40",title:"The previous commit's message, loaded as an editable starting point",children:"previous message loaded"}),e("button",{type:"button",onClick:C,disabled:!k,title:y,"aria-label":"Generate commit message with AI",className:"ml-auto flex items-center justify-center gap-1.5 px-3 py-1.5 rounded border border-ink/20 text-ink/80 hover:bg-ink/5 transition-colors cursor-pointer text-xs font-medium disabled:opacity-40 disabled:cursor-not-allowed",children:[g?e(p,{size:12,className:"animate-spin"}):e(Ne,{size:12}),g?"Generating…":"Generate"]}),e("button",{type:"button",onClick:w,disabled:!M,title:b,className:"flex items-center justify-center gap-1.5 px-3 py-1.5 rounded bg-ink text-canvas hover:bg-ink/90 transition-colors cursor-pointer text-xs font-medium disabled:opacity-40 disabled:cursor-not-allowed",children:[e(f,{size:12}),r?"Amend commit":"Commit"]})]})]})}function Qe({operation:t,conflicts:l,isBusy:c,onAbort:r,onContinue:m}){let g=Lo[t],x=l.length,v=x===0,N=t!=="stash-pop";return e("div",{className:"border-t border-warning/30 bg-warning/5 p-3 flex flex-col gap-2",children:[e("div",{className:"flex items-center gap-2 text-xs text-ink",children:[e(I,{size:13,className:"text-warning flex-shrink-0"}),e("span",{className:"font-medium",children:[g.charAt(0).toUpperCase()+g.slice(1)," in progress"]}),e("span",{className:`font-mono tabular-nums text-[10px] ${v?"text-success":"text-warning"}`,children:v?"all conflicts resolved":`${x} conflict${x===1?"":"s"} left`})]}),!v&&e("div",{className:"max-h-20 overflow-y-auto scrollbar-overlay-container font-mono text-[10px] text-warning/90 space-y-0.5",children:l.map((P)=>e("div",{className:"truncate",title:P,children:P},P))}),e("div",{className:"flex items-stretch gap-2",children:[e("button",{type:"button",onClick:r,disabled:c,title:`Abort the ${g} and restore the previous state`,className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-1.5 rounded border border-error/40 text-error hover:bg-error/10 transition-colors cursor-pointer text-xs font-medium disabled:opacity-40 disabled:cursor-not-allowed",children:[e(vn,{size:12}),"Abort ",g]}),N&&e("button",{type:"button",onClick:m,disabled:c||!v,title:v?`Conclude the ${g}`:`Resolve all ${x} conflict(s) first`,className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-1.5 rounded border border-transparent bg-ink text-canvas hover:bg-ink/90 transition-colors cursor-pointer text-xs font-medium disabled:opacity-40 disabled:cursor-not-allowed",children:[e(Jn,{size:12}),"Continue ",g]})]})]})}function Ze({branchRef:t,showBranchMenu:l,setShowBranchMenu:c,branch:r,branches:m,remoteBranches:g,onCheckout:x,onMerge:v,onOpenBranchPrompt:N,onManageBranches:P,optionsRef:w,showOptions:C,setShowOptions:R,onHistory:G,onGraph:M,viewMode:k,setViewMode:b,isBusy:y=!1,syncCount:L={ahead:0,behind:0},syncing:B=!1,onSync:z,onFetch:q,detached:A=!1}){let[V,Y]=n("");o(()=>{if(!l)Y("")},[l]);let _=V.trim(),H=u(()=>m.filter((D)=>an(D,_)),[m,_]),O=u(()=>g.filter((D)=>an(D,_)),[g,_]);return e("div",{className:"p-3 border-b border-ink/10 bg-canvas/50 flex items-center justify-between",children:[e("div",{className:"relative",ref:t,children:[e("button",{onClick:()=>c(!l),className:"flex items-center space-x-1.5 hover:bg-ink/5 px-2 py-1 -ml-2 rounded transition-colors text-[11px] text-ink/80 font-medium",title:A?`Detached HEAD at ${r}`:`On branch ${r}`,children:[e(de,{size:12,className:A?"text-warning":"text-ink/60"}),e("span",{className:`truncate max-w-[140px] ${A?"font-mono text-warning":""}`,children:r}),e(E,{size:12,className:"text-ink/40"})]}),l&&e("div",{className:"glass-popover absolute top-full left-0 mt-1 w-64 bg-paper border border-ink/20 rounded-md shadow-lg z-50 flex flex-col overflow-hidden text-xs",children:[e(On,{value:V,onChange:Y,ariaLabel:"Search branches",placeholder:"Search branches…"}),e("div",{className:"max-h-48 scrollbar-overlay-container py-1",children:[H.length>0&&e(d,{children:[e("div",{className:"px-3 py-1 text-[10px] uppercase tracking-wider text-ink/40 font-semibold",children:"Local"}),H.map((D)=>e("div",{className:"flex items-center group/branch",children:[e("button",{onClick:()=>{x(D),c(!1)},className:"flex-1 min-w-0 text-left px-3 py-2 hover:bg-ink/5 flex items-center justify-between transition-colors",children:[e("span",{className:"truncate",children:D}),r===D&&e(f,{size:12,className:"text-ink flex-shrink-0"})]}),r!==D&&e("button",{type:"button",onClick:()=>{v(D),c(!1)},title:`Merge ${D} into ${r}`,"aria-label":`Merge ${D} into ${r}`,className:"touch-visible opacity-0 group-hover/branch:opacity-100 px-2 py-2 text-ink/40 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer flex-shrink-0",children:e(Jn,{size:12})})]},D))]}),O.length>0&&e(d,{children:[e("div",{className:"px-3 py-1 text-[10px] uppercase tracking-wider text-ink/40 font-semibold",children:"Remote"}),O.map((D)=>e("div",{className:"flex items-center group/branch",children:[e("button",{onClick:()=>{x(D),c(!1)},className:"flex-1 min-w-0 text-left px-3 py-2 hover:bg-ink/5 flex items-center justify-between transition-colors",children:[e("span",{className:"truncate",children:D}),r===D&&e(f,{size:12,className:"text-ink flex-shrink-0"})]}),r!==D&&e("button",{type:"button",onClick:()=>{v(D),c(!1)},title:`Merge ${D} into ${r}`,"aria-label":`Merge ${D} into ${r}`,className:"touch-visible opacity-0 group-hover/branch:opacity-100 px-2 py-2 text-ink/40 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer flex-shrink-0",children:e(Jn,{size:12})})]},D))]}),H.length===0&&O.length===0&&e("div",{className:"px-3 py-2 text-ink/40 italic",children:["No match for “",_,"”"]}),e("div",{className:"w-full h-px bg-ink/10 my-1"}),e("button",{onClick:()=>{N(),c(!1)},className:"w-full text-left px-3 py-2 hover:bg-ink/5 flex items-center space-x-2 transition-colors text-ink/80 italic",children:[e(F,{size:12}),e("span",{children:"Create new branch..."})]}),e("button",{onClick:P,className:"w-full text-left px-3 py-2 hover:bg-ink/5 flex items-center space-x-2 transition-colors text-ink/80",children:[e(La,{size:12}),e("span",{children:"Manage branches..."})]})]})]})]}),e("div",{className:"flex items-center space-x-2 text-ink/40 relative",ref:w,children:[e("button",{type:"button",onClick:q,disabled:y,title:"Fetch from all remotes and prune deleted branches","aria-label":"Fetch",className:"p-1 rounded hover:text-ink hover:bg-ink/5 cursor-pointer transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:e(ro,{size:13})}),e("button",{type:"button",onClick:z,disabled:y,title:B?"Syncing with upstream…":L.ahead>0&&L.behind>0?`Pull ${L.behind} then push ${L.ahead} commit(s)`:L.ahead>0?`Push ${L.ahead} commit(s)`:L.behind>0?`Pull ${L.behind} commit(s)`:"Up to date — sync anyway","aria-label":"Sync with upstream","aria-busy":B,className:`flex items-center gap-1 p-1 rounded hover:text-ink hover:bg-ink/5 cursor-pointer transition-colors disabled:cursor-not-allowed ${B?"":"disabled:opacity-40"}`,children:[e(S,{size:13,className:B?"animate-spin":"","aria-hidden":"true"}),e("span",{className:"font-mono tabular-nums text-[10px]",children:["↑",L.ahead," ↓",L.behind]})]}),e("button",{type:"button",onClick:G,title:"Commit History","aria-label":"Commit History",className:"p-1 rounded hover:text-ink hover:bg-ink/5 cursor-pointer transition-colors",children:e(Kn,{size:13})}),e("button",{type:"button",onClick:M,title:"Git Graph","aria-label":"Git Graph",className:"p-1 rounded hover:text-ink hover:bg-ink/5 cursor-pointer transition-colors",children:e(Jn,{size:13})}),e("button",{type:"button",onClick:()=>R(!C),title:"View Options","aria-label":"View Options","aria-expanded":C,className:"p-1 rounded hover:text-ink hover:bg-ink/5 cursor-pointer transition-colors",children:e(_e,{size:13})}),C&&e("div",{className:"glass-popover absolute right-0 top-full mt-1 w-36 bg-paper border border-ink/15 rounded-md shadow-lg z-50 py-1 font-mono text-xs",children:[e("button",{type:"button",onClick:()=>{b("flat"),R(!1)},className:"w-full px-3 py-1.5 text-left text-ink hover:bg-ink/5 flex items-center justify-between transition-colors",children:[e("div",{className:"flex items-center space-x-1.5",children:[e(Ye,{size:12,className:"text-ink/60"}),e("span",{children:"View as List"})]}),k==="flat"&&e(f,{size:12,className:"text-ink"})]}),e("button",{type:"button",onClick:()=>{b("tree"),R(!1)},className:"w-full px-3 py-1.5 text-left text-ink hover:bg-ink/5 flex items-center justify-between transition-colors",children:[e("div",{className:"flex items-center space-x-1.5",children:[e(Ve,{size:12,className:"text-ink/60"}),e("span",{children:"View as Tree"})]}),k==="tree"&&e(f,{size:12,className:"text-ink"})]})]})]})]})}function Je({activeRepo:t,repos:l,isRefreshing:c,rootPath:r,reposScanning:m,onSelectRepo:g,onRefresh:x,onRefreshRepos:v}){return e(xt,{left:e(d,{children:[e(wm,{size:12,className:"text-ink/50 flex-shrink-0","aria-hidden":!0}),e(Tr,{rootPath:r,activeRepo:t,onSelectRepo:g,repos:l,scanning:m,onRefreshRepos:v})]}),right:e(nt,{label:"Refresh",onClick:x,busy:c})})}function Fe({change:t,isStaged:l,repo:c,rootPath:r,onAction:m}){let g=sr(t.status,l),{charStatus:x,colorClass:v}=g,N=t.file.split("/"),P=N.pop()||t.file,w=N.length>0?N.join("/"):"";return e("div",{className:"flex items-center justify-between px-3 py-1 hover:bg-ink/5 cursor-pointer group text-[11px] transition-colors",onClick:()=>{window.dispatchEvent(new CustomEvent("omp:open-diff",{detail:{file:t.file,staged:l,status:x,repo:c||".",root:r}}))},children:[e("div",{className:"flex items-center space-x-1.5 flex-1 min-w-0 pr-2",children:[e("span",{className:`font-bold font-mono text-[10px] w-3 flex-shrink-0 text-center ${v}`,title:`Status: ${g.label}`,children:x}),e(mt,{name:P,size:12,className:"flex-shrink-0"}),e("span",{className:`truncate ${v}`,title:t.file,children:P}),w&&e("span",{className:"text-[10px] text-ink/40 truncate ml-1",children:w})]}),e("div",{className:"flex items-center space-x-1 text-ink/40 flex-shrink-0",children:e("div",{className:"flex items-center touch-visible opacity-0 group-hover:opacity-100 space-x-1",children:[!l&&e(d,{children:[e("button",{type:"button",onClick:(R)=>{R.stopPropagation(),m("revert",t.file)},title:"Discard Changes",className:"w-5 h-5 flex items-center justify-center rounded hover:text-error hover:bg-error/10 cursor-pointer transition-colors",children:e(vn,{size:11})}),e("button",{type:"button",onClick:(R)=>{R.stopPropagation(),m("stage",t.file)},title:"Stage Changes",className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(F,{size:11})})]}),l&&e("button",{type:"button",onClick:(R)=>{R.stopPropagation(),m("unstage",t.file)},title:"Unstage Changes",className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(fn,{size:11})})]})})]})}function et({change:t,repo:l,rootPath:c,onResolve:r}){let[m,g]=n(!1),[x,v]=n(null),N=t.file.split("/"),P=N.pop()||t.file,w=N.length>0?N.join("/"):"",C=()=>{window.dispatchEvent(new CustomEvent("omp:open-diff",{detail:{file:t.file,staged:!1,status:t.status,repo:l,root:c}}))},R=async()=>{let k=!m;if(g(k),k&&x===null){let b=new URLSearchParams({conflictMarkers:"1",file:t.file,repo:l||"."});if(c)b.set("root",c);try{let L=await(await fetch(`/api/fs/git?${b.toString()}`)).json();v(L.markers??{})}catch{v({})}}},G=x?.ours||"ours",M=x?.theirs||"theirs";return e("div",{className:"border-b border-warning/20 last:border-b-0",children:[e("div",{className:"flex items-center justify-between px-3 py-1 hover:bg-warning/5 cursor-pointer group text-[11px] transition-colors",onClick:C,children:[e("div",{className:"flex items-center space-x-1.5 flex-1 min-w-0 pr-2",children:[e(ao,{size:11,className:"text-warning flex-shrink-0"}),e(mt,{name:P,size:12,className:"flex-shrink-0"}),e("span",{className:"truncate text-warning",title:t.file,children:P}),w&&e("span",{className:"text-[10px] text-ink/40 truncate ml-1",children:w}),Mr(t.status)&&e("span",{className:"text-[10px] text-warning/70 font-mono flex-shrink-0",children:t.status})]}),e("button",{type:"button",onClick:(k)=>{k.stopPropagation(),R()},title:m?"Hide resolve actions":"Show resolve actions","aria-label":m?"Hide resolve actions":"Show resolve actions","aria-expanded":m,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors flex-shrink-0",children:m?e(pt,{size:11}):e(E,{size:11})})]}),m&&e("div",{className:"px-3 pb-2 pt-0.5 flex flex-wrap items-center gap-1.5",children:[e("button",{type:"button",onClick:()=>r(t.file,"ours"),title:`Take ${G} — \`git checkout --ours\` then stage`,className:"px-2 py-0.5 text-[10px] font-mono rounded border border-ink/20 hover:bg-ink/5 text-ink/80 hover:text-ink transition-colors cursor-pointer max-w-[45%] truncate",children:["take ",G]}),e("button",{type:"button",onClick:()=>r(t.file,"theirs"),title:`Take ${M} — \`git checkout --theirs\` then stage`,className:"px-2 py-0.5 text-[10px] font-mono rounded border border-ink/20 hover:bg-ink/5 text-ink/80 hover:text-ink transition-colors cursor-pointer max-w-[45%] truncate",children:["take ",M]}),e("button",{type:"button",onClick:()=>r(t.file,""),title:"Mark resolved: the file was edited by hand, this stages it",className:"px-2 py-0.5 text-[10px] font-mono rounded border border-ink/20 hover:bg-ink/5 text-ink/80 hover:text-ink transition-colors cursor-pointer flex items-center gap-1",children:[e(f,{size:10}),"mark resolved"]})]})]})}function Wt(t){let l={id:"",name:"",path:"",type:"folder",children:[],changeCount:0};for(let r of t){let m=r.file.replace(/^[./]+/,""),g=m.endsWith("/"),x=m.replace(/\/$/,"").split("/").filter(Boolean),v=l,N="";for(let P=0;P<x.length;P++){let w=x[P];N=N?`${N}/${w}`:w;let C=P===x.length-1;if(C&&!g)v.children.push({id:N,name:w,path:N,type:"file",change:r,children:[],changeCount:1});else{let G=v.children.find((M)=>M.type==="folder"&&M.name===w);if(!G)G={id:N,name:w,path:N,type:"folder",children:[],changeCount:0,change:C&&g?r:void 0},v.children.push(G);v=G}}}function c(r){if(r.type==="file")return 1;let m=r.change?1:0;for(let g of r.children)m+=c(g);return r.changeCount=m,r.children.sort((g,x)=>{if(g.type==="folder"&&x.type==="file")return-1;if(g.type==="file"&&x.type==="folder")return 1;return g.name.localeCompare(x.name)}),m}return c(l),l.children}function tt(t){let{sessionId:l,ready:c,read:r}=_m(),m=u(()=>Wt(t),[t]),g=u(()=>{let R=new Set;function G(M){for(let k of M)if(k.type==="folder"){if(R.add(k.id),k.children&&k.children.length>0)G(k.children)}}return G(m),R},[m]),[x,v]=T("git.expandedFolders",[]),N=u(()=>new Set(x),[x]),P=i(null);o(()=>{if(!c||P.current===l)return;if(g.size===0)return;if(P.current=l,r("git.expandedFolders",[]).length>0)return;v(Array.from(g))},[c,l,g,r,v]);let w=a((R)=>{v((G)=>{let M=new Set(G);if(M.has(R))M.delete(R);else M.add(R);return Array.from(M)})},[v]),C=a((R)=>N.has(R),[N]);return{tree:m,expandedFolders:N,toggleFolder:w,isFolderOpen:C,expandAll:()=>v(Array.from(g)),collapseAll:()=>v([])}}function He({node:t,isStaged:l,isFolderOpen:c,toggleFolder:r,onAction:m,repo:g,rootPath:x}){let v=t.type==="folder",N=v?c(t.id):!1;if(v)return e("div",{className:"select-none",children:[e("div",{className:"flex items-center justify-between px-2 py-1 hover:bg-ink/5 cursor-pointer rounded group transition-colors text-[11px]",onClick:()=>r(t.id),children:[e("div",{className:"flex items-center space-x-1.5 flex-1 min-w-0 pr-1",children:[e("span",{className:"w-3.5 h-3.5 flex items-center justify-center text-ink/40 flex-shrink-0",children:N?e(E,{size:12}):e(ue,{size:12})}),e(mt,{name:t.name,isFolder:!0,isOpen:N,size:13,className:"flex-shrink-0"}),e("span",{className:"font-medium text-ink truncate",children:t.name}),e("span",{className:"text-[10px] text-ink/40 font-normal px-1 py-0.2 bg-ink/5 rounded-full ml-1",children:t.changeCount})]}),e("div",{className:"flex items-center space-x-1 text-ink/40 flex-shrink-0",children:e("div",{className:"flex items-center touch-visible opacity-0 group-hover:opacity-100 space-x-1",children:!l?e(d,{children:[e("button",{type:"button",onClick:(k)=>{k.stopPropagation(),m("revert",t.path)},title:`Discard changes in ${t.name}`,className:"w-5 h-5 flex items-center justify-center rounded hover:text-error hover:bg-error/10 cursor-pointer transition-colors",children:e(vn,{size:11})}),e("button",{type:"button",onClick:(k)=>{k.stopPropagation(),m("stage",t.path)},title:`Stage ${t.name}`,className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(F,{size:11})})]}):e("button",{type:"button",onClick:(k)=>{k.stopPropagation(),m("unstage",t.path)},title:`Unstage ${t.name}`,className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(fn,{size:11})})})})]}),N&&t.children&&t.children.length>0&&e("div",{className:"ml-3 border-l border-ink/10 pl-1",children:t.children.map((k)=>e(He,{node:k,isStaged:l,isFolderOpen:c,toggleFolder:r,onAction:m,repo:g,rootPath:x},k.id))})]});let P=t.change,w=sr(P?.status||"M",l),{charStatus:C,colorClass:R}=w,G=P?P.file:t.path;return e("div",{className:"flex items-center justify-between px-2 py-0.5 hover:bg-ink/5 cursor-pointer rounded group transition-colors text-[11px]",onClick:()=>{window.dispatchEvent(new CustomEvent("omp:open-diff",{detail:{file:G,staged:l,status:C,repo:g||".",root:x}}))},children:[e("div",{className:"flex items-center space-x-1.5 flex-1 min-w-0 pr-1",children:[e("span",{className:"w-3.5 h-3.5 flex items-center justify-center flex-shrink-0",children:e("span",{className:`font-bold font-mono text-[10px] ${R}`,title:`Status: ${w.label}`,children:C})}),e(mt,{name:t.name,size:12,className:"flex-shrink-0"}),e("span",{className:`truncate ${R}`,title:G,children:t.name})]}),e("div",{className:"flex items-center space-x-1 text-ink/40 flex-shrink-0",children:e("div",{className:"flex items-center touch-visible opacity-0 group-hover:opacity-100 space-x-1",children:!l?e(d,{children:[e("button",{type:"button",onClick:(k)=>{k.stopPropagation(),m("revert",G)},title:"Discard Changes",className:"w-5 h-5 flex items-center justify-center rounded hover:text-error hover:bg-error/10 cursor-pointer transition-colors",children:e(vn,{size:11})}),e("button",{type:"button",onClick:(k)=>{k.stopPropagation(),m("stage",G)},title:"Stage Changes",className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(F,{size:11})})]}):e("button",{type:"button",onClick:(k)=>{k.stopPropagation(),m("unstage",G)},title:"Unstage Changes",className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(fn,{size:11})})})})]})}function ze({changes:t,isStaged:l,repo:c,rootPath:r,onAction:m}){let{tree:g,isFolderOpen:x,toggleFolder:v}=tt(t);if(g.length===0)return null;return e("div",{className:"py-0.5",children:g.map((N)=>e(He,{node:N,isStaged:l,isFolderOpen:x,toggleFolder:v,onAction:m,repo:c,rootPath:r},N.id))})}function ot({changes:t,isLoading:l,viewMode:c,repo:r,rootPath:m,onAction:g,onResolve:x}){let[v,N]=T("git.stagedExpanded",!0),[P,w]=T("git.unstagedExpanded",!0),[C,R]=T("git.conflictsExpanded",!0),G=t.filter((b)=>Mr(b.status)),M=t.filter((b)=>{if(Mr(b.status))return!1;let y=b.status;return y&&y[0]!==" "&&y[0]!=="?"}),k=t.filter((b)=>{if(Mr(b.status))return!1;let y=b.status;return y&&y[1]!==" "&&y[1]!=="?"||y==="??"});if(l&&t.length===0)return e("div",{className:"flex-1 scrollbar-overlay-container font-mono text-[11px] text-ink/80",children:e("div",{className:"p-4 text-center text-ink/40 italic",children:"Loading..."})});if(t.length===0)return e("div",{className:"flex-1 scrollbar-overlay-container font-mono text-[11px] text-ink/80",children:e("div",{className:"p-4 text-center text-ink/40 italic",children:"No changes found."})});return e("div",{className:"flex-1 scrollbar-overlay-container font-mono text-[11px] text-ink/80",children:e("div",{className:"py-1",children:[G.length>0&&e("div",{className:"mb-2",children:[e("div",{className:"flex items-center justify-between px-3 py-1 group hover:bg-warning/5 cursor-pointer transition-colors",onClick:()=>R(!C),children:e("div",{className:"flex items-center space-x-1 font-semibold text-warning text-xs",children:[e("span",{className:"w-3 text-center",children:C?"▾":"▸"}),e("span",{children:"Conflicts"}),e("span",{className:"text-warning/70 font-normal ml-1 border border-warning/30 rounded-full px-1.5 text-[10px] bg-paper",children:G.length})]})}),C&&G.map((b)=>e(et,{change:b,repo:r,rootPath:m,onResolve:x??(()=>{})},`conflict-${b.file}`))]}),M.length>0&&e("div",{className:"mb-2",children:[e("div",{className:"flex items-center justify-between px-3 py-1 group hover:bg-ink/5 cursor-pointer transition-colors",onClick:()=>N(!v),children:[e("div",{className:"flex items-center space-x-1 font-semibold text-ink text-xs",children:[e("span",{className:"w-3 text-center",children:v?"▾":"▸"}),e("span",{children:"Staged Changes"}),e("span",{className:"text-ink/40 font-normal ml-1 border border-ink/20 rounded-full px-1.5 text-[10px] bg-paper",children:M.length})]}),e("div",{className:"touch-visible opacity-0 group-hover:opacity-100 flex items-center space-x-1 text-ink/40 flex-shrink-0",children:e("button",{type:"button",onClick:(b)=>{b.stopPropagation(),g("unstage_all")},title:"Unstage All Changes",className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(fn,{size:12})})})]}),v&&(c==="tree"?e(ze,{changes:M,isStaged:!0,repo:r,rootPath:m,onAction:g}):M.map((b)=>e(Fe,{change:b,isStaged:!0,repo:r,rootPath:m,onAction:g},b.file+"staged")))]}),k.length>0&&e("div",{children:[e("div",{className:"flex items-center justify-between px-3 py-1 group hover:bg-ink/5 cursor-pointer transition-colors",onClick:()=>w(!P),children:[e("div",{className:"flex items-center space-x-1 font-semibold text-ink text-xs",children:[e("span",{className:"w-3 text-center",children:P?"▾":"▸"}),e("span",{children:"Changes"}),e("span",{className:"text-ink/40 font-normal ml-1 border border-ink/20 rounded-full px-1.5 text-[10px] bg-paper",children:k.length})]}),e("div",{className:"touch-visible opacity-0 group-hover:opacity-100 flex items-center space-x-1 text-ink/40 flex-shrink-0",children:[e("button",{type:"button",onClick:(b)=>{b.stopPropagation(),g("revert_all")},title:"Discard All Changes",className:"w-5 h-5 flex items-center justify-center rounded hover:text-error hover:bg-error/10 cursor-pointer transition-colors",children:e(vn,{size:12})}),e("button",{type:"button",onClick:(b)=>{b.stopPropagation(),g("stage_all")},title:"Stage All Changes",className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(F,{size:12})})]})]}),P&&(c==="tree"?e(ze,{changes:k,isStaged:!1,repo:r,rootPath:m,onAction:g}):k.map((b)=>e(Fe,{change:b,isStaged:!1,repo:r,rootPath:m,onAction:g},b.file+"unstaged")))]})]})})}function st({matches:t,loaded:l,total:c,hasMore:r,isFiltering:m}){if(m)return`${t} of ${l} loaded`;if(typeof c==="number"&&c>0)return r||l<c?`${l} of ${c}`:`${c} commits`;return r?`${l}+ commits`:`${l} commits`}function rt({isGraphMode:t,onToggleMode:l,searchQuery:c,onSearchChange:r,onRefresh:m,onClose:g,isRefreshing:x,totalCommits:v,loadedCount:N,totalCount:P,hasMore:w}){let C=st({matches:v,loaded:N,total:P,hasMore:w,isFiltering:c.trim().length>0});return e("div",{className:`flex flex-col gap-2 px-3 lg:px-5 py-3 border-b border-ink/10 bg-paper select-none
|
|
2
|
-
pl-[max(0.75rem,env(safe-area-inset-left,0px))] pr-[max(0.75rem,env(safe-area-inset-right,0px))]`,children:[e("div",{className:"flex items-center justify-between gap-2 lg:gap-4",children:[e("div",{className:"flex flex-col min-w-0",children:[e("div",{className:"flex items-center gap-2.5 min-w-0",children:[e("h2",{className:"text-base font-semibold text-ink tracking-tight",children:t?"Graph":"History"}),e("span",{className:"text-[11px] font-mono px-2 py-0.5 rounded-full bg-ink/5 text-ink/80 border border-ink/10 whitespace-nowrap",children:C})]}),e("p",{className:"text-xs text-muted mt-0.5 hidden lg:block",children:t?"Follow branch topology and inspect commits.":"Browse recent commits and inspect changed files."})]}),e("div",{className:"flex items-center gap-1.5 lg:gap-2 flex-shrink-0",children:[e("div",{className:"flex items-center text-xs lg:bg-ink/5 lg:p-0.5 lg:rounded-lg lg:border lg:border-ink/10",children:[e("button",{type:"button",onClick:()=>l(!1),title:"History view","aria-label":"History view","aria-pressed":!t,className:`tap-target flex items-center justify-center gap-1.5 p-2 rounded-md font-medium transition-colors cursor-pointer lg:px-2.5 lg:py-1 ${!t?"bg-ink/5 text-ink lg:bg-paper lg:shadow-xs":"text-ink/80 lg:hover:text-ink lg:hover:bg-ink/5"}`,children:[e(Kn,{size:13,"aria-hidden":"true"}),e("span",{className:"hidden lg:inline",children:"History"})]}),e("button",{type:"button",onClick:()=>l(!0),title:"Graph view","aria-label":"Graph view","aria-pressed":t,className:`tap-target flex items-center justify-center gap-1.5 p-2 rounded-md font-medium transition-colors cursor-pointer lg:px-2.5 lg:py-1 ${t?"bg-ink/5 text-ink lg:bg-paper lg:shadow-xs":"text-ink/80 lg:hover:text-ink lg:hover:bg-ink/5"}`,children:[e(Jn,{size:13,"aria-hidden":"true"}),e("span",{className:"hidden lg:inline",children:"Graph"})]})]}),e("button",{type:"button",onClick:m,disabled:x,className:"tap-target flex items-center justify-center gap-1.5 p-2 rounded-md text-ink/70 transition-colors cursor-pointer text-xs disabled:opacity-40 lg:px-2.5 lg:py-1.5 lg:border lg:border-ink/15 lg:hover:bg-ink/5 lg:hover:text-ink",title:"Refresh commit history","aria-label":"Refresh commit history",children:[e(Ra,{size:13,className:x?"animate-spin text-ink":"","aria-hidden":"true"}),e("span",{className:"hidden lg:inline",children:"Refresh"})]}),e("button",{type:"button",onClick:g,className:"tap-target p-2 -mr-1 rounded-md hover:bg-ink/5 text-muted hover:text-ink transition-colors cursor-pointer",title:"Close modal","aria-label":"Close commit history",children:e(h,{size:16,"aria-hidden":"true"})})]})]}),e("div",{className:"relative mt-1",children:[e(U,{size:13,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-ink/55","aria-hidden":"true"}),e("input",{type:"text",value:c,onChange:(R)=>r(R.currentTarget.value),placeholder:"Filter commits by message, author, or hash...","aria-label":"Filter commits",className:"w-full bg-ink/[0.03] border border-ink/15 rounded-md pl-8 pr-3 py-1.5 text-xs text-ink placeholder-ink/40 focus:outline-none focus:border-ink/40 transition-colors font-mono"}),c&&e("button",{type:"button",onClick:()=>r(""),"aria-label":"Clear filter",className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-ink/55 hover:text-ink cursor-pointer",children:e(h,{size:12,"aria-hidden":"true"})})]})]})}var le=["#38bdf8","#f97316","#a855f7","#10b981","#ec4899","#eab308","#06b6d4","#6366f1"];function Oe(t,l){if(!t||!l)return!1;if(t===l)return!0;let c=Math.min(t.length,l.length);if(c>=4)return t.substring(0,c)===l.substring(0,c);return!1}function Ge(t){let l=new Map,c=[];for(let r of t){if(typeof r.lane==="number"){l.set(r.hash,r.lane);continue}let m=c.findIndex((x)=>Oe(x,r.hash)||Oe(x,r.shortHash));if(m===-1)if(m=c.indexOf(null),m===-1)m=c.length,c.push(r.hash);else c[m]=r.hash;l.set(r.hash,m);let g=r.parents&&r.parents[0];if(g)c[m]=g;else c[m]=null;if(r.parents&&r.parents.length>1)for(let x=1;x<r.parents.length;x++){let v=r.parents[x];if(!c.some((P)=>Oe(P,v))){let P=c.indexOf(null);if(P===-1)c.push(v);else c[P]=v}}}return l}function it(t,l,c,r){let m=[],g=new Map;t.forEach((x,v)=>{if(g.set(x.hash,v),x.shortHash)g.set(x.shortHash,v);if(x.hash.length>=7)g.set(x.hash.substring(0,7),v)});for(let x of t){let v=l.get(x.hash)??0,N=c[x.hash]??0,P=le[v%le.length];if(!x.parents||x.parents.length===0)continue;for(let w of x.parents){let C=g.get(w);if(typeof C!=="number"&&w.length>=7)C=g.get(w.substring(0,7));if(typeof C==="number"){let R=t[C],G=l.get(R.hash)??v,M=c[R.hash]??N+60;m.push({fromHash:x.hash,toHash:R.hash,fromLane:v,toLane:G,fromY:N,toY:M,color:le[v%le.length]})}else m.push({fromHash:x.hash,toHash:"tail-"+x.hash,fromLane:v,toLane:v,fromY:N,toY:Math.max(N+80,r),color:P})}}return m}function at(t,l,c,r){if(Math.abs(t-c)<1)return`M ${t} ${l} L ${c} ${r}`;let m=r-l,g=l+m*0.45,x=r-m*0.45;return`M ${t} ${l} C ${t} ${g}, ${c} ${x}, ${c} ${r}`}function lt({commits:t,nodePositions:l,expandedHash:c,hoveredHash:r,isGraphMode:m,laneWidth:g=18,paddingLeft:x=16,totalHeight:v}){let N=u(()=>{if(!m){let R=new Map;return t.forEach((G)=>R.set(G.hash,0)),R}return Ge(t)},[t,m]),P=u(()=>{let R=0;return N.forEach((G)=>{if(G>R)R=G}),R},[N]),w=m?(P+1)*g+x*2:36,C=u(()=>{if(!m){let R=[];for(let G=0;G<t.length-1;G++){let M=l[t[G].hash]??G*60+20,k=l[t[G+1].hash]??(G+1)*60+20;R.push({fromHash:t[G].hash,toHash:t[G+1].hash,fromLane:0,toLane:0,fromY:M,toY:k,color:"var(--theme-ink)"})}return R}return it(t,N,l,v)},[t,N,l,v,m]);return e("div",{className:"absolute top-0 left-0 pointer-events-none z-10",style:{width:w,height:v},"aria-hidden":"true",children:e("svg",{className:"w-full h-full overflow-visible",style:{width:w,height:v},children:[C.map((R)=>{let G=m?x+R.fromLane*g:16,M=m?x+R.toLane*g:16,k=m?R.color:"currentColor",b=m?0.95:0.25,y=at(G,R.fromY,M,R.toY);return e("path",{d:y,fill:"none",stroke:k,strokeWidth:m?2.25:1.5,strokeLinecap:"round",strokeLinejoin:"round",strokeOpacity:b},`${R.fromHash}->${R.toHash}`)}),t.map((R)=>{let G=N.get(R.hash)??0,M=m?x+G*g:16,k=l[R.hash]??20,b=c===R.hash||c===R.shortHash,y=r===R.hash||r===R.shortHash,L=m?le[G%le.length]:"var(--theme-success)";return e("g",{"data-commit-node":R.hash,children:[(b||y)&&e("circle",{cx:M,cy:k,r:8,fill:L,fillOpacity:b?0.35:0.2,stroke:L,strokeWidth:1}),e("circle",{"data-commit-dot":"",cx:M,cy:k,r:m?4:4.5,fill:m?"var(--theme-paper)":L,stroke:L,strokeWidth:m?2.5:1.5}),m&&e("circle",{cx:M,cy:k,r:1.8,fill:L})]},`node-${R.hash}`)})]})})}var qt=[{action:"checkout",label:"checkout"},{action:"create_branch_here",label:"create branch here"},{action:"cherry_pick",label:"cherry-pick"},{action:"revert",label:"revert"},{action:"reset",label:"reset..."},{action:"merge",label:"merge into current"},{action:"rebase",label:"rebase onto this"}];function ct({commit:t,onAction:l}){return e("div",{className:"flex flex-wrap items-center gap-1.5 pt-1.5 pb-2",children:qt.map(({action:c,label:r})=>e("button",{type:"button",onClick:(m)=>{m.stopPropagation(),l(c,t)},className:"px-2.5 py-1 text-[11px] font-mono rounded border border-ink/20 hover:bg-ink/5 text-ink/80 hover:text-ink transition-colors cursor-pointer",children:r},c))})}var Se=3;function Kt(t){let l=[];for(let c=0;c<t.length;c+=1){if(t[c].type!=="context"){l.push({row:t[c],index:c});continue}let r=c;while(r<t.length&&t[r].type==="context")r+=1;let m=r-c;if(m>Se*2+1){for(let g=c;g<c+Se;g+=1)l.push({row:t[g],index:g});l.push({row:{type:"elided",count:m-Se*2},index:-1});for(let g=r-Se;g<r;g+=1)l.push({row:t[g],index:g})}else for(let g=c;g<r;g+=1)l.push({row:t[g],index:g});c=r-1}return l}function ut({diffText:t,isLoading:l,filePath:c,fullContext:r=!1,onToggleContext:m}){let g=Ei(),x=u(()=>{if(!t)return[];let w=[],C=1,R=1,G=t.split(/\r?\n/),k=G.some((b)=>b.startsWith("@@"))?G:[`@@ -0,0 +1,${G.length} @@`,...G.map((b)=>b.startsWith("+")||b.startsWith("-")?b:`+${b}`)];for(let b of k){if(b.startsWith("diff --git")||b.startsWith("index ")||b.startsWith("---")||b.startsWith("+++")||b.startsWith("new file mode")||b.startsWith("deleted file mode")||b.startsWith("similarity index")||b.startsWith("old mode")||b.startsWith("new mode")||b.startsWith("\\ No newline"))continue;if(b.startsWith("@@")){let y=b.match(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);if(y)C=parseInt(y[1],10),R=parseInt(y[2],10);w.push({type:"meta",text:b})}else if(b.startsWith("+"))w.push({type:"add",text:b.slice(1),newNum:R++});else if(b.startsWith("-"))w.push({type:"del",text:b.slice(1),oldNum:C++});else{let y=b.startsWith(" ")?b.slice(1):b;w.push({type:"context",text:y,oldNum:C++,newNum:R++})}}return w},[t]),v=gt(c),N=u(()=>{let w=Array(x.length).fill(""),C=-1,R=(G)=>{if(C<0)return;let M=_d(x.slice(C,G).map((k)=>k.text).join(`
|
|
3
|
-
`),v);for(let k=C;k<G;k++)w[k]=M[k-C]??"";C=-1};return x.forEach((G,M)=>{if(G.type==="meta")R(M);else if(C<0)C=M}),R(x.length),w},[x,v,g]),P=u(()=>r?x.map((w,C)=>({row:w,index:C})):Kt(x),[x,r]);if(l)return e("div",{className:"my-2 p-4 rounded bg-canvas border border-ink/10 text-muted font-mono text-xs flex items-center justify-center",children:"Loading commit diff..."});if(!t||x.length===0)return e("div",{className:"my-2 p-3 rounded bg-canvas border border-ink/10 text-muted font-mono text-xs text-center",children:"No diff content available for this file."});return e("div",{className:"my-2 rounded border border-ink/15 bg-paper overflow-hidden text-[11px] font-mono leading-relaxed text-ink",children:[e("div",{className:"flex items-center justify-between px-3 py-1.5 bg-canvas border-b border-ink/10 text-ink/70 text-[10.5px]",children:[e("span",{className:"font-semibold text-muted",children:"Diff preview"}),e("button",{type:"button",onClick:m,disabled:!m,className:"hover:text-ink flex items-center gap-1 cursor-pointer transition-colors disabled:opacity-40 disabled:cursor-default",title:r?"Show only the changed hunks":"Read the whole file around the change","aria-pressed":r,children:r?e(d,{children:[e(pt,{size:12,"aria-hidden":"true"})," Collapse context"]}):e(d,{children:[e(E,{size:12,"aria-hidden":"true"})," Expand all context"]})})]}),e("div",{className:"overflow-x-auto max-h-72 select-text",children:e("div",{className:"w-max min-w-full divide-y divide-ink/[0.04]",children:P.map(({row:w,index:C},R)=>{if(w.type==="elided")return e("div",{className:"px-3 py-1 bg-canvas text-muted text-[10px] text-center select-none",title:`${w.count} unchanged line(s) hidden`,children:["⋯ ",w.count," unchanged line",w.count===1?"":"s"," hidden ⋯"]},`elided-${R}`);let G=w,M=C;if(G.type==="meta")return e("div",{className:"flex items-center gap-2 px-3 py-1 bg-canvas border-y border-ink/10 text-muted text-[10px] font-semibold",children:[e("span",{children:"↕"}),e("span",{children:G.text})]},M);let k=G.type==="add",b=G.type==="del";return e("div",{className:`flex items-start font-mono ${k?"bg-success/10 hover:bg-success/15":b?"bg-error/10 hover:bg-error/15":"text-ink hover:bg-ink/[0.02]"}`,children:[e("div",{className:`w-10 flex-shrink-0 text-right pr-2 py-0.5 select-none border-r border-ink/10 text-[10px] tabular-nums font-mono ${b?"bg-error/15 text-ink/80 font-semibold":k?"bg-success/15 text-ink/80":"bg-canvas/50 text-muted"}`,children:G.oldNum??(k?"+":"")}),e("div",{className:`w-10 flex-shrink-0 text-right pr-2 py-0.5 select-none border-r border-ink/10 text-[10px] tabular-nums font-mono ${k?"bg-success/15 text-ink/80 font-semibold":b?"bg-error/15 text-ink/80":"bg-canvas/50 text-muted"}`,children:G.newNum??(b?"-":"")}),e("div",{className:`w-4 flex-shrink-0 text-center py-0.5 select-none font-bold ${k||b?"text-ink/80":"opacity-0"}`,children:k?"+":b?"-":" "}),e("div",{className:"flex-1 py-0.5 pr-3 whitespace-pre text-ink",children:G.text?e("span",{className:"shiki",dangerouslySetInnerHTML:{__html:N[M]}}):" "})]},M)})})})]})}function ht({commit:t,isExpanded:l,onToggleExpand:c,onAction:r,onToggleFile:m,isExpandedFile:g,isLoadingFile:x,isFullContextFile:v,onToggleContext:N,fileDiffs:P,headerRef:w}){let[C,R]=n(!1),G=t.body?.trim()??"",M=G.length>0,k=t.files??[],b=k.length,y=b>0,L=M||y,B=(A)=>{A.stopPropagation(),navigator.clipboard.writeText(t.hash),R(!0),setTimeout(()=>R(!1),2000)},z=(A,V)=>{A.stopPropagation(),m(t.hash,V)},q=L?"border-b border-ink/5 transition-colors cursor-pointer hover:bg-ink/[0.015]":"border-b border-ink/5";return e("div",{onClick:L?c:void 0,"data-testid":"commit-row","data-commit-hash":t.hash,className:q,children:e("div",{className:"py-2.5 flex flex-col",children:[e("div",{className:"flex flex-col gap-1",children:[t.refs&&t.refs.length>0&&e("div",{className:"flex flex-wrap items-center gap-1.5 pb-0.5",children:t.refs.map((A,V)=>{let Y=A.includes("stash"),_=A.includes("HEAD")||A.includes("main")||A.includes("master");return e("span",{className:`px-2 py-0.5 rounded text-[10px] font-mono border ${Y?"bg-warning/10 text-ink/80 border-warning/25 font-semibold":_?"bg-ink/10 text-ink font-semibold border-ink/20":"bg-canvas text-muted border-ink/10 font-medium"}`,children:A},V)})}),e("div",{ref:w,className:"flex items-start gap-1.5",children:e("button",{type:"button",onClick:L?(A)=>{A.stopPropagation(),c()}:void 0,"aria-expanded":L?l:void 0,className:"flex flex-1 min-w-0 items-start gap-1.5 text-left cursor-pointer rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink/20",children:[e("span",{"data-commit-title":"",className:"text-[13px] font-semibold text-ink leading-snug break-words flex-1 min-w-0",children:t.message}),L&&e("span",{className:"text-ink/55 flex-shrink-0 mt-0.5","aria-hidden":"true",children:l?e(E,{size:13}):e(ue,{size:13})})]})}),M&&l&&e("div",{className:"border-l-2 border-ink/15 pl-3 py-1",children:e(J,{content:G,className:"text-ink/70"})}),e("div",{className:"flex items-center gap-x-2 gap-y-0.5 text-[11px] text-muted font-mono flex-wrap",children:[e("span",{children:t.author}),e("span",{children:t.date}),e("button",{type:"button",onClick:B,title:"Copy commit hash","aria-label":`Copy commit hash ${t.shortHash}`,className:"inline-flex items-center gap-1 hover:text-ink transition-colors cursor-pointer text-ink/70",children:[e("span",{children:t.shortHash}),C?e(f,{size:11,className:"text-success-text","aria-hidden":"true"}):e(ae,{size:11,"aria-hidden":"true"})]}),y&&e("span",{children:[b," ",b===1?"file":"files"]})]})]}),l&&e("div",{className:"mt-2",children:e(ct,{commit:t,onAction:r})}),y&&l&&e("div",{className:"mt-2 flex flex-col gap-1",children:k.map((A,V)=>{let Y=g(t.hash,A.file),_=`${t.hash}:${A.file}`,H=P[_]!==void 0?P[_]:A.diff,O=x(t.hash,A.file),D=A.status==="A"?"text-success-text font-bold":A.status==="D"?"text-error-text font-bold":A.status==="R"?"text-meta-text font-bold":"text-info-text font-bold";return e("div",{className:"flex flex-col",children:[e("button",{type:"button",onClick:(oe)=>z(oe,A),"aria-expanded":Y,className:"flex w-full items-center gap-2 py-1 px-2 rounded text-[11.5px] font-mono text-ink/80 transition-colors group cursor-pointer border border-transparent hover:border-ink/10 text-left",children:[e("span",{className:`w-3.5 text-center flex-shrink-0 text-[11px] ${D}`,children:A.status||"M"}),e("span",{className:"truncate flex-1 min-w-0 text-ink/90 group-hover:text-ink font-medium",children:A.file}),e("span",{className:"flex items-center gap-1 text-[10.5px] tabular-nums flex-shrink-0 font-medium",children:[e("span",{className:"text-success-text",children:["+",A.additions]}),e("span",{className:"text-ink/30",children:"/"}),e("span",{className:"text-error-text",children:["-",A.deletions]})]}),e("span",{className:"text-ink/55 group-hover:text-ink flex-shrink-0",children:Y?e(E,{size:13,"aria-hidden":"true"}):e(ue,{size:13,"aria-hidden":"true"})})]}),Y&&e("div",{className:"pl-4 pr-1",children:e(ut,{diffText:H,isLoading:O,filePath:A.file,fullContext:v(t.hash,A.file),onToggleContext:()=>N(t.hash,A)})})]},V)})})]})})}var xe=50;function Vt(t){if(!Array.isArray(t))return[];let l=[];for(let c of t){if(!c||typeof c!=="object")continue;let r=c;if(typeof r.file!=="string"||!r.file)continue;l.push({file:r.file,status:typeof r.status==="string"?r.status:"M",additions:typeof r.additions==="number"&&Number.isFinite(r.additions)?r.additions:0,deletions:typeof r.deletions==="number"&&Number.isFinite(r.deletions)?r.deletions:0,diff:typeof r.diff==="string"?r.diff:void 0})}return l}function Ie(t){if(!Array.isArray(t))return[];let l=[];for(let c of t){if(!c||typeof c!=="object")continue;let r=c,m=typeof r.hash==="string"&&r.hash?r.hash:"";if(!m)continue;l.push({hash:m,shortHash:typeof r.shortHash==="string"&&r.shortHash?r.shortHash:m.slice(0,8),author:typeof r.author==="string"?r.author:"Unknown",date:typeof r.date==="string"?r.date:typeof r.time==="string"?r.time:"",message:typeof r.message==="string"?r.message:"",body:typeof r.body==="string"?r.body:void 0,parents:Array.isArray(r.parents)?r.parents.filter((g)=>typeof g==="string"):[],refs:Array.isArray(r.refs)?r.refs.filter((g)=>typeof g==="string"):[],files:Vt(r.files),lane:typeof r.lane==="number"?r.lane:void 0})}return l}function bt({output:t,isGraphMode:l,rootPath:c,activeRepo:r}){let[m,g]=n(!1),[x,v]=n(t?.hasMore??t?.data?.length===xe),[N,P]=n(t?.total),w=u(()=>Ie(t?.data),[t?.data]),C=Array.isArray(t?.data)?t.data.length:0,[R,G]=n(w),[M,k]=n(C);o(()=>{if(G(w),k(C),v(t?.hasMore??C===xe),typeof t?.total==="number")P(t.total)},[w,C,t?.hasMore,t?.total]);let b=a(async()=>{if(m||!x)return;g(!0);try{let y=new FormData;if(y.set("actionType",l?"graph":"history"),y.set("limit",String(xe)),y.set("skip",String(M)),c)y.set("root",c);if(r)y.set("repo",r);let B=await(await fetch("/api/fs/git",{method:"POST",body:y})).json();if(B.success&&Array.isArray(B.data)){let z=Ie(B.data),q=B.data.length;if(G((A)=>{let V=new Set(A.map((_)=>_.hash)),Y=z.filter((_)=>!V.has(_.hash));return[...A,...Y]}),k((A)=>A+q),v(Boolean(B.hasMore??q===xe)),typeof B.total==="number")P(B.total)}else v(!1)}catch(y){console.error("Failed to load more commits:",y)}finally{g(!1)}},[m,x,l,M,c,r]);return{commits:R,hasMore:x,totalCount:N,isLoadingMore:m,handleLoadMore:b}}function vt({onExecuteAction:t,rootPath:l,activeRepo:c}){let[r,m]=n({}),[g,x]=n(new Set),[v,N]=n(new Set),[P,w]=n(new Set),C=a(async(k,b,y)=>{let L=`${k}:${b.file}`;N((B)=>new Set(B).add(L));try{let B=new FormData;if(B.set("actionType","commit_diff"),B.set("hash",k),B.set("file",b.file),y)B.set("full","1");if(l)B.set("root",l);if(c&&c!==".")B.set("repo",c);let q=await(await fetch("/api/fs/git",{method:"POST",body:B})).json();if(q&&typeof q.diff==="string")m((A)=>({...A,[L]:q.diff}));else if(q&&q.error)m((A)=>({...A,[L]:`// Error: ${q.error}`}))}catch(B){console.error("Failed to load file diff:",B);let z=B instanceof Error?B.message:"Network error";m((q)=>({...q,[L]:`// Error loading diff: ${z}`}))}finally{N((B)=>{let z=new Set(B);return z.delete(L),z})}},[l,c]),R=a(async(k,b)=>{let y=`${k}:${b.file}`,L=!g.has(y);if(x((B)=>{let z=new Set(B);if(z.has(y))z.delete(y);else z.add(y);return z}),L&&r[y]===void 0&&!b.diff)await C(k,b,!1)},[g,r,C]),G=a(async(k,b)=>{let y=`${k}:${b.file}`,L=!P.has(y);w((B)=>{let z=new Set(B);if(z.has(y))z.delete(y);else z.add(y);return z}),await C(k,b,L)},[P,C]),M=a((k,b)=>{if(!t)return;if(k==="checkout")t("checkout",void 0,{branch:b.hash});else if(k==="create_branch_here"){let y=window.prompt(`Create new branch at commit ${b.shortHash}:`,`branch-${b.shortHash}`);if(y?.trim())t("create_branch_at",void 0,{branch:y.trim(),hash:b.hash})}else if(k==="cherry_pick"){if(window.confirm(`Cherry-pick commit ${b.shortHash} onto current branch?`))t("cherry_pick",void 0,{hash:b.hash})}else if(k==="revert"){if(window.confirm(`Revert commit ${b.shortHash}?`))t("revert_commit",void 0,{hash:b.hash})}else if(k==="reset"){let y=window.prompt(`Reset current branch to ${b.shortHash} (soft, mixed, hard):`,"soft");if(y&&["soft","mixed","hard"].includes(y.toLowerCase()))t("reset_commit",void 0,{hash:b.hash,mode:y.toLowerCase()})}else if(k==="merge"){if(window.confirm(`Merge commit ${b.shortHash} into current branch?`))t("merge_commit",void 0,{hash:b.hash})}else if(k==="rebase"){if(window.confirm(`Rebase current branch onto commit ${b.shortHash}?`))t("rebase_commit",void 0,{hash:b.hash})}},[t]);return{fileDiffs:r,expandedFiles:g,loadingFiles:v,fullContextFiles:P,handleToggleFile:R,handleToggleContext:G,handleCommitAction:M}}function kt(t){let[l,c]=n({page:t,hash:""}),r=l.page===t?l.hash:"",m=a((g)=>{c((x)=>{let v=x.page===t&&x.hash===g;return{page:t,hash:v?"":g}})},[t]);return{expandedHash:r,toggleExpanded:m}}function je({output:t,onClose:l,onRefresh:c,onExecuteAction:r,rootPath:m,activeRepo:g}){if(o(()=>{if(!t)return;let j=(W)=>{if(W.key==="Escape")l()};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[t,l]),!t)return null;let[x,v]=n(()=>({title:t.title,graph:t.title.toLowerCase().includes("graph")}));if(x.title!==t.title)v({title:t.title,graph:t.title.toLowerCase().includes("graph")});let N=x.graph,P=(j)=>v((W)=>({...W,graph:j})),[w,C]=n(""),{expandedHash:R,toggleExpanded:G}=kt(t),[M,k]=n(!1),{commits:b,hasMore:y,totalCount:L,isLoadingMore:B,handleLoadMore:z}=bt({output:t,isGraphMode:N,rootPath:m,activeRepo:g}),{fileDiffs:q,expandedFiles:A,loadingFiles:V,fullContextFiles:Y,handleToggleFile:_,handleToggleContext:H,handleCommitAction:O}=vt({onExecuteAction:r,rootPath:m,activeRepo:g}),D=u(()=>{if(!w.trim())return b;let j=w.toLowerCase().trim();return b.filter((W)=>W.message.toLowerCase().includes(j)||W.author.toLowerCase().includes(j)||W.shortHash.toLowerCase().includes(j)||W.hash.toLowerCase().includes(j)||W.refs?.some((ne)=>ne.toLowerCase().includes(j)))},[b,w]),oe=i(null),se=i(null),ve=i(null),me=i({}),[pe,ke]=n({}),[Pe,$e]=n(800);o(()=>{let j=ve.current;if(!j||!y||B||w.trim())return;let W=new IntersectionObserver((ne)=>{if(ne[0].isIntersecting)z()},{root:oe.current,threshold:0.1});return W.observe(j),()=>W.disconnect()},[y,B,w,z]);let re=a(()=>{if(!oe.current||!se.current)return;let j=oe.current.getBoundingClientRect(),W=oe.current.scrollTop,ne={};D.forEach((ge,Ee)=>{let we=me.current[ge.hash];if(we){let ce=we.getBoundingClientRect();ne[ge.hash]=ce.top+ce.height/2-j.top+W}else ne[ge.hash]=Ee*60+20}),ke(ne);let De=se.current.offsetHeight;$e(Math.max(De,oe.current.clientHeight,600))},[D]);K(()=>{re();let j=requestAnimationFrame(()=>{re()});return()=>cancelAnimationFrame(j)},[re,D,q,A,N,R]),o(()=>{let j=se.current;if(!j)return;let W=new ResizeObserver(()=>{re()});W.observe(j);for(let ne of Array.from(j.children))W.observe(ne);return()=>W.disconnect()},[re,D]);let ee=u(()=>Ge(D),[D]),Me=u(()=>{let j=0;return ee.forEach((W)=>{if(W>j)j=W}),j},[ee]),ye=18,Ce=16,Le=N?(Me+1)*ye+Ce*2:36,Ae=()=>{k(!0),c?.(),setTimeout(()=>k(!1),600)};return e("div",{className:"fixed inset-0 z-50 modal-scrim backdrop-blur-xs flex items-center justify-center p-0 lg:p-5",onClick:l,role:"dialog","aria-modal":"true","aria-label":t.title,children:e("div",{className:`glass-overlay bg-paper border-ink/20 shadow-2xl flex flex-col overflow-hidden
|
|
4
|
-
w-full h-full rounded-none border-0
|
|
5
|
-
lg:w-[min(94vw,1200px)] lg:h-[88vh] lg:rounded-xl lg:border
|
|
6
|
-
pt-[env(safe-area-inset-top,0px)] lg:pt-0`,onClick:(j)=>j.stopPropagation(),children:[e(rt,{isGraphMode:N,onToggleMode:P,searchQuery:w,onSearchChange:C,onRefresh:Ae,onClose:l,isRefreshing:M,totalCommits:D.length,loadedCount:b.length,totalCount:L,hasMore:y}),e("div",{ref:oe,className:`flex-1 overflow-y-auto scrollbar-overlay-container relative select-text
|
|
7
|
-
px-3 lg:px-5
|
|
8
|
-
pl-[max(0.75rem,env(safe-area-inset-left,0px))] pr-[max(0.75rem,env(safe-area-inset-right,0px))]`,children:D.length===0?e("div",{className:"flex flex-col items-center justify-center py-20 text-muted font-mono text-xs",children:w.trim()?"No matching commits found.":"No commits in this branch."}):e("div",{className:"relative min-h-full pb-8",children:[e(lt,{commits:D,nodePositions:pe,expandedHash:R,isGraphMode:N,laneWidth:ye,paddingLeft:Ce,totalHeight:Pe}),e("div",{ref:se,className:"flex flex-col relative z-20",style:{paddingLeft:`${Le}px`},children:[D.map((j)=>e(ht,{commit:j,isExpanded:R===j.hash,onToggleExpand:()=>G(j.hash),onAction:O,onToggleFile:_,isExpandedFile:(W,ne)=>A.has(`${W}:${ne}`),isLoadingFile:(W,ne)=>V.has(`${W}:${ne}`),isFullContextFile:(W,ne)=>Y.has(`${W}:${ne}`),onToggleContext:H,fileDiffs:q,headerRef:(W)=>{me.current[j.hash]=W}},j.hash)),e("div",{ref:ve,className:"pt-3 pb-4 px-4 flex items-center justify-center",children:B?e("div",{className:"flex items-center gap-2 text-xs text-muted font-mono py-2",children:[e(p,{size:14,className:"animate-spin text-info-text","aria-hidden":"true"}),e("span",{children:"Loading more commits..."})]}):y&&!w.trim()?e("button",{type:"button",onClick:z,className:"px-3 py-1.5 text-xs font-mono text-ink/70 hover:text-ink bg-ink/5 hover:bg-ink/10 rounded-md border border-ink/10 transition-colors cursor-pointer",children:"Load more commits..."}):D.length>10?e("div",{className:"text-[11px] font-mono text-muted py-2",children:["End of commit history (",typeof L==="number"&&L>0?L:b.length," commits)"]}):null})]})]})})]})})}function yt({children:t,onClose:l}){return e("div",{className:"fixed inset-0 z-50 modal-scrim flex items-center justify-center modal-safe",onClick:l,role:"dialog","aria-modal":"true",children:e("div",{className:"glass-overlay bg-paper border border-ink/20 rounded-lg shadow-xl flex flex-col overflow-hidden w-[min(94vw,420px)] max-h-[80vh]",onClick:(c)=>c.stopPropagation(),children:t})})}function Ct({modal:t,onClose:l,onConfirm:c}){if(!t)return null;return e(yt,{onClose:l,children:[e("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-ink/10",children:[e(I,{size:16,className:"text-error flex-shrink-0"}),e("h3",{className:"text-sm font-semibold text-ink",children:"Confirm Action"})]}),e("div",{className:"px-4 py-4 text-xs text-ink/80 leading-relaxed",children:t.message}),e("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-ink/10",children:[e("button",{type:"button",onClick:l,className:"px-3 py-1.5 rounded border border-ink/20 text-ink/70 hover:bg-ink/5 hover:text-ink transition-colors cursor-pointer text-xs",children:"Cancel"}),e("button",{type:"button",onClick:c,className:"px-3 py-1.5 rounded bg-error text-canvas hover:bg-error/90 transition-colors cursor-pointer text-xs font-medium",children:"Confirm"})]})]})}function Nt({isOpen:t,branchName:l,inputRef:c,onChange:r,onClose:m,onCreate:g}){if(!t)return null;let x=a(()=>{if(l.trim())g()},[l,g]);return e(yt,{onClose:m,children:[e("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-ink/10",children:[e(Jn,{size:16,className:"text-ink/60 flex-shrink-0"}),e("h3",{className:"text-sm font-semibold text-ink",children:"Create New Branch"})]}),e("div",{className:"px-4 py-4",children:e("input",{ref:c,type:"text",value:l,onChange:(v)=>r(v.currentTarget.value),onKeyDown:(v)=>{if(v.key==="Enter")x();if(v.key==="Escape")m()},placeholder:"branch-name",className:"w-full bg-canvas border border-ink/20 rounded px-3 py-2 text-xs focus:outline-none focus:border-ink/40 text-ink placeholder-ink/40 transition-colors"})}),e("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-ink/10",children:[e("button",{type:"button",onClick:m,className:"px-3 py-1.5 rounded border border-ink/20 text-ink/70 hover:bg-ink/5 hover:text-ink transition-colors cursor-pointer text-xs",children:"Cancel"}),e("button",{type:"button",onClick:x,disabled:!l.trim(),className:"px-3 py-1.5 rounded bg-ink text-canvas hover:bg-ink/90 transition-colors cursor-pointer text-xs font-medium disabled:opacity-40 disabled:cursor-not-allowed",children:"Create"})]})]})}function wt({branch:t,detached:l,onCheckout:c,onMerge:r,onRename:m,onDelete:g}){let x=t.current&&!l;return e("div",{className:"grid grid-cols-[1rem_minmax(0,1fr)_minmax(0,9.5rem)_4.25rem_4rem] items-start gap-x-2 px-4 py-2 border-b border-ink/5 last:border-b-0 hover:bg-ink/[0.02] group/row transition-colors",children:[e("div",{className:"h-5 flex items-center justify-center",children:x&&e(f,{size:12,className:"text-ink","aria-label":"Current branch"})}),e("button",{type:"button",onClick:c,disabled:x,title:x?"Already on this branch":`Check out ${t.name}`,className:"min-w-0 text-left cursor-pointer disabled:cursor-default",children:[e("div",{className:"h-5 flex items-center gap-1.5 min-w-0",children:[e(de,{size:11,className:x?"text-ink/60 flex-shrink-0":"text-ink/40 flex-shrink-0"}),e("span",{className:`truncate text-xs ${x?"font-semibold text-ink":"text-ink/90"}`,children:t.name})]}),t.subject&&e("div",{className:"h-4 flex items-center pl-[18px] min-w-0",children:e("span",{className:"truncate text-[10px] text-ink/40",title:t.subject,children:t.subject})})]}),e("div",{className:"h-5 flex items-center justify-end min-w-0",children:e(Yt,{branch:t})}),e("div",{className:"h-5 flex items-center justify-end",children:t.date&&e("span",{className:"text-[10px] text-ink/40 truncate",children:t.date})}),e("div",{className:"h-5 flex items-center justify-end gap-0.5 touch-visible opacity-0 group-hover/row:opacity-100",children:[!x&&e("button",{type:"button",onClick:r,title:`Merge ${t.name} into the current branch`,"aria-label":`Merge ${t.name} into the current branch`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(Jn,{size:11})}),e("button",{type:"button",onClick:m,title:`Rename ${t.name}`,"aria-label":`Rename ${t.name}`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(Zn,{size:11})}),!x&&e("button",{type:"button",onClick:g,title:`Delete ${t.name}`,"aria-label":`Delete ${t.name}`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-error hover:bg-error/10 cursor-pointer transition-colors",children:e(Q,{size:11})})]})]})}function Yt({branch:t}){if(t.gone)return e("span",{className:"text-[10px] font-mono text-warning border border-warning/30 rounded px-1 truncate",title:`${t.upstream} no longer exists on the remote — fetch --prune to drop it`,children:"gone"});if(!t.upstream)return e("span",{className:"text-[10px] font-mono text-ink/40 truncate",title:"No upstream: this branch has never been published",children:"unpublished"});return e("span",{className:"flex items-center gap-1 text-[10px] font-mono text-ink/50 min-w-0",children:[e("span",{className:"truncate",title:t.upstream,children:t.upstream}),(t.ahead>0||t.behind>0)&&e("span",{className:"tabular-nums text-ink/70 flex-shrink-0",children:[t.ahead>0&&`↑${t.ahead}`,t.behind>0&&`↓${t.behind}`]})]})}function Rt({branch:t,onClose:l,onSubmit:c}){if(!t)return null;return e(Xt,{branch:t,onClose:l,onSubmit:c})}function Xt({branch:t,onClose:l,onSubmit:c}){let[r,m]=n(t.name),[g,x]=n(!1),v=r.trim(),N=v===t.name,P=v.length>0&&!N,w=()=>{if(P)c(t.name,v,g)};return e(X,{onClose:l,maxWidthClass:"max-w-[min(94vw,460px)]",header:e("div",{className:"flex items-center gap-2",children:[e("h2",{className:"text-sm font-semibold text-ink",children:"Rename branch"}),e("span",{className:"text-[10px] font-mono text-ink/50 truncate",children:t.name})]}),children:[e("div",{className:"px-5 py-4 flex flex-col gap-3",children:[e("div",{children:[e("label",{className:"text-[10px] uppercase tracking-wider text-ink/50 font-semibold",htmlFor:"branch-rename-input",children:"New name"}),e("input",{id:"branch-rename-input",type:"text",value:r,autoFocus:!0,onChange:(C)=>m(C.currentTarget.value),onKeyDown:(C)=>{if(C.key==="Enter")w();if(C.key==="Escape")l()},className:"mt-1 w-full bg-paper border border-ink/20 rounded px-2.5 py-1.5 text-xs font-mono text-ink focus:outline-none focus:border-ink/40 transition-colors"}),N&&v.length>0&&e("p",{className:"mt-1 text-[10px] text-ink/50",children:"The name is unchanged."})]}),e("div",{className:"text-[10px] font-mono text-ink/60 flex flex-col gap-0.5 border border-ink/10 rounded p-2 bg-canvas/40",children:[e("div",{className:"flex items-center justify-between gap-2",children:[e("span",{className:"text-ink/40",children:"upstream"}),e("span",{className:"truncate",children:t.upstream||"none (unpublished)"})]}),e("p",{className:"text-ink/40 leading-relaxed mt-0.5",children:"A local rename keeps this upstream unchanged — a plain push afterwards will refuse until the upstream matches the new name, which is what the remote option below does."})]}),e("label",{className:"flex items-start gap-2 text-[11px] text-ink/80 cursor-pointer select-none",children:[e("input",{type:"checkbox",checked:g,onChange:(C)=>x(C.currentTarget.checked),className:`${be} accent-ink cursor-pointer mt-0.5`}),e("span",{className:"flex flex-col gap-0.5",children:[e("span",{children:"Also rename it on the remote"}),e("span",{className:"text-[10px] font-mono text-ink/50",children:["git push -u ",t.upstream?t.upstream.split("/")[0]:"origin"," ",v||"<new>",e("br",{}),"git push ",t.upstream?t.upstream.split("/")[0]:"origin"," --delete ",t.name,e("br",{}),"git fetch --prune"]})]})]})]}),e("div",{className:"flex items-center justify-end gap-2 px-5 py-3 border-t border-ink/10",children:[e("button",{type:"button",onClick:l,className:"px-3 py-1.5 rounded border border-ink/20 text-ink/70 hover:bg-ink/5 hover:text-ink transition-colors cursor-pointer text-xs",children:"Cancel"}),e("button",{type:"button",onClick:w,disabled:!P,className:"px-3 py-1.5 rounded bg-ink text-canvas hover:bg-ink/90 transition-colors cursor-pointer text-xs font-medium disabled:opacity-40 disabled:cursor-not-allowed",children:"Rename"})]})]})}function Gt({branch:t,force:l,onForceChange:c,onClose:r,onConfirm:m}){if(!t)return null;return e(X,{onClose:r,maxWidthClass:"max-w-[min(94vw,440px)]",header:e("div",{className:"flex items-center gap-2",children:[e(I,{size:15,className:"text-error flex-shrink-0"}),e("h2",{className:"text-sm font-semibold text-ink",children:"Delete branch"})]}),children:[e("div",{className:"px-5 py-4 flex flex-col gap-3 text-xs text-ink/80 leading-relaxed",children:[e("p",{children:["Delete ",e("span",{className:"font-mono font-semibold text-ink",children:t.name}),t.upstream&&e(d,{children:[" ","(tracks ",e("span",{className:"font-mono",children:t.upstream}),")"]}),"?"]}),e("div",{className:"text-[10px] font-mono text-ink/60 border border-ink/10 rounded p-2 bg-canvas/40 flex flex-col gap-0.5",children:[e("div",{className:"flex items-center justify-between gap-2",children:[e("span",{className:"text-ink/40",children:"last commit"}),e("span",{className:"truncate",children:t.subject||"–"})]}),e("div",{className:"flex items-center justify-between gap-2",children:[e("span",{className:"text-ink/40",children:"when"}),e("span",{children:t.date||"–"})]})]}),e("label",{className:"flex items-start gap-2 cursor-pointer select-none text-[11px]",children:[e("input",{type:"checkbox",checked:l,onChange:(g)=>c(g.currentTarget.checked),className:`${be} accent-error cursor-pointer mt-0.5`}),e("span",{className:"flex flex-col gap-0.5",children:[e("span",{className:"text-error font-medium",children:"Delete even if its commits are not merged"}),e("span",{className:"text-[10px] font-mono text-ink/50",children:["git branch ",l?"-D":"-d"," ",t.name]}),e("span",{className:"text-ink/50",children:"Without this, git refuses when the branch holds commits no other branch has. Leaving it off is the safe default."})]})]})]}),e("div",{className:"flex items-center justify-end gap-2 px-5 py-3 border-t border-ink/10",children:[e("button",{type:"button",onClick:r,className:"px-3 py-1.5 rounded border border-ink/20 text-ink/70 hover:bg-ink/5 hover:text-ink transition-colors cursor-pointer text-xs",children:"Cancel"}),e("button",{type:"button",onClick:()=>m(t.name),className:"px-3 py-1.5 rounded bg-error text-canvas hover:bg-error/90 transition-colors cursor-pointer text-xs font-medium",children:["Delete ",l?"(force)":""]})]})]})}function St({isOpen:t,rootPath:l,repo:c,currentBranch:r,detached:m,isBusy:g,onClose:x,onAction:v,onConfirmDelete:N}){let[P,w]=n([]),[C,R]=n(!1),[G,M]=n(null),[k,b]=n(""),[y,L]=n(null),[B,z]=n(null),[q,A]=n(!1),V=a(async()=>{R(!0),M(null);let H=new URLSearchParams({branches:"1",repo:c||"."});if(l)H.set("root",l);try{let O=await fetch(`/api/fs/git?${H.toString()}`),D=await O.json();if(D.success&&Array.isArray(D.branches))w(D.branches);else M(D.error||`Failed to read branches (HTTP ${O.status})`)}catch(O){M(O instanceof Error?O.message:"Failed to read branches")}finally{R(!1)}},[l,c]);o(()=>{if(t)V()},[t,V]);let Y=i(!1);o(()=>{if(!t){Y.current=!1;return}if(Y.current&&!g)V();Y.current=g},[t,g,V]),o(()=>{if(!t)L(null),z(null),A(!1),b("")},[t]);let _=u(()=>{let H=k.trim().toLowerCase();if(!H)return P;return P.filter((O)=>O.name.toLowerCase().includes(H)||O.upstream.toLowerCase().includes(H))},[P,k]);if(!t)return null;return e(d,{children:[e(X,{onClose:x,maxWidthClass:"max-w-[min(96vw,720px)]",header:e("div",{className:"flex items-center gap-2 min-w-0",children:[e("h2",{className:"text-sm font-semibold text-ink",children:"Branches"}),e("span",{className:"text-[10px] font-mono text-ink/50",children:m?`detached at ${r}`:`on ${r}`})]}),children:[e("div",{className:"px-5 py-3 flex items-center gap-2 border-b border-ink/10",children:[e(U,{size:12,className:"text-ink/40 flex-shrink-0"}),e("input",{type:"text",value:k,onChange:(H)=>b(H.currentTarget.value),placeholder:"Filter branches…","aria-label":"Filter branches",className:"flex-1 min-w-0 bg-transparent outline-none text-xs text-ink placeholder-ink/40",autoFocus:!0}),e("button",{type:"button",onClick:()=>void V(),disabled:C,title:"Refresh","aria-label":"Refresh branches",className:"text-ink/40 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 flex-shrink-0",children:e(S,{size:12,className:C?"animate-spin":""})})]}),e("div",{className:"min-h-[40vh] max-h-[60vh] overflow-y-auto scrollbar-overlay-container",children:C&&P.length===0?e("div",{className:"flex items-center justify-center gap-2 py-12 text-xs text-ink/50 font-mono",children:[e(p,{size:14,className:"animate-spin text-info"}),"Loading branches…"]}):G?e("div",{className:"py-12 px-6 text-center text-xs text-error font-mono",children:G}):_.length===0?e("div",{className:"py-12 text-center text-xs text-ink/40 font-mono",children:k.trim()?"No matching branches.":"No branches."}):_.map((H)=>e(wt,{branch:H,detached:m,onCheckout:()=>{v("checkout",{branch:H.name}),x()},onMerge:()=>{v("merge_branch",{branch:H.name}),x()},onRename:()=>L(H),onDelete:()=>{z(H),A(!1)}},H.name))})]}),e(Rt,{branch:y,onClose:()=>L(null),onSubmit:(H,O,D)=>{v("rename_branch",{branch:H,newName:O,...D?{remote:"1"}:{}}),L(null)}},y?.name??"none"),e(Gt,{branch:B,force:q,onForceChange:A,onClose:()=>{z(null),A(!1)},onConfirm:(H)=>{N(H,q),z(null),A(!1)}})]})}function Pt({mounted:t,confirmModal:l,onCloseConfirm:c,onConfirm:r,branchPrompt:m,newBranchName:g,newBranchInputRef:x,onNewBranchNameChange:v,onCloseBranchPrompt:N,onCreateBranch:P,viewingOutput:w,onCloseOutput:C,onRefreshOutput:R,onExecuteAction:G,branchModalOpen:M,onCloseBranchModal:k,rootPath:b,activeRepo:y,currentBranch:L,detached:B,isBusy:z,onBranchAction:q,onConfirmDeleteBranch:A}){if(!t)return null;return e(d,{children:[e(Ct,{modal:l,onClose:c,onConfirm:r}),e(Nt,{isOpen:m,branchName:g,inputRef:x,onChange:v,onClose:N,onCreate:P}),e(je,{output:w,onClose:C,onRefresh:R,onExecuteAction:G,rootPath:b,activeRepo:y}),e(St,{isOpen:M,rootPath:b,repo:y,currentBranch:L,detached:B,isBusy:z,onClose:k,onAction:q,onConfirmDelete:A})]})}function $t({rootPath:t,repo:l,isBusy:c,onAction:r}){let[m,g]=T("git.stashExpanded",!1),[x,v]=n([]),[N,P]=n(!1),[w,C]=n(""),[R,G]=n(!1),M=Dr(),k=a(async()=>{P(!0);let y=new URLSearchParams({stashes:"1",repo:l||"."});if(t)y.set("root",t);try{let B=await(await fetch(`/api/fs/git?${y.toString()}`)).json();v(B.stashes??[])}catch{v([])}finally{P(!1)}},[t,l]);o(()=>{if(m)k()},[m,k,c]);let b=(y,L)=>{if(r(y,L),y==="stash_push")C(""),G(!1)};return e("div",{className:"border-t border-ink/10 bg-canvas/30 flex-shrink-0",children:[e("div",{className:"flex items-center hover:bg-ink/5 transition-colors",children:[e("button",{type:"button",onClick:()=>g(!m),"aria-expanded":m,"aria-controls":M,title:m?"Hide stashes":"Show stashes",className:"flex flex-1 min-w-0 items-center space-x-1 py-1.5 pl-3 pr-2 text-left font-semibold text-xs text-ink transition-colors cursor-pointer",children:[e("span",{className:"w-3 text-center font-mono","aria-hidden":"true",children:m?"▾":"▸"}),e(dt,{size:12}),e("span",{children:"Stash"}),x.length>0&&e("span",{className:"font-normal ml-1 border border-ink/20 rounded-full px-1.5 text-[10px] text-ink/50",children:x.length})]}),e("button",{type:"button",onClick:()=>b("stash_push",{...w.trim()?{message:w.trim()}:{},...R?{untracked:"1"}:{}}),disabled:c,title:"Stash the working tree",className:"mr-3 flex flex-shrink-0 items-center gap-1 px-2 py-0.5 text-[10px] font-mono rounded border border-ink/20 hover:bg-ink/5 text-ink/70 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed",children:[e(F,{size:10}),"Save"]})]}),e("div",{className:"section-reveal","data-expanded":m,id:M,inert:!m,children:e("div",{children:e("div",{className:"px-3 pb-2 flex flex-col gap-1.5",children:[e("div",{className:"flex items-center gap-1.5",children:[e("input",{type:"text",value:w,onChange:(y)=>C(y.currentTarget.value),placeholder:"Stash message (optional)","aria-label":"Stash message",className:"flex-1 min-w-0 bg-paper border border-ink/20 rounded px-2 py-1 text-[11px] text-ink placeholder-ink/40 focus:outline-none focus:border-ink/40 transition-colors font-mono"}),e("label",{className:"flex items-center gap-1 text-[10px] text-ink/60 cursor-pointer select-none flex-shrink-0",title:"Also stash untracked files (-u)",children:[e("input",{type:"checkbox",checked:R,onChange:(y)=>G(y.currentTarget.checked),className:`${be} accent-ink cursor-pointer`}),"-u"]})]}),N&&x.length===0?e("div",{className:"text-[10px] text-ink/40 italic py-1",children:"Loading…"}):x.length===0?e("div",{className:"text-[10px] text-ink/40 italic py-1",children:"No stash entries."}):e("div",{className:"max-h-40 overflow-y-auto scrollbar-overlay-container flex flex-col",children:x.map((y)=>e("div",{className:"grid grid-cols-[4rem_minmax(0,1fr)_3.5rem_4.5rem] items-center gap-x-1 group/stash py-0.5",children:[e("span",{className:"text-[10px] font-mono text-ink/50 truncate",children:y.ref}),e("span",{className:"min-w-0 truncate text-[10px] text-ink/80",title:y.subject,children:y.subject}),e("span",{className:"text-[10px] text-ink/40 text-right truncate",children:y.date}),e("div",{className:"flex items-center justify-end gap-0.5 touch-visible opacity-0 group-hover/stash:opacity-100",children:[e("button",{type:"button",onClick:()=>b("stash_apply",{ref:y.ref,pop:"1"}),disabled:c,title:"Pop: apply and remove the entry","aria-label":"Pop stash",className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors disabled:opacity-40",children:e(fe,{size:10})}),e("button",{type:"button",onClick:()=>b("stash_apply",{ref:y.ref}),disabled:c,title:"Apply: keep the entry","aria-label":"Apply stash",className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors disabled:opacity-40",children:e(dt,{size:10})}),e("button",{type:"button",onClick:()=>b("stash_drop",{ref:y.ref}),disabled:c,title:"Drop: discard the entry (the stash is not recoverable from the panel)","aria-label":"Drop stash",className:"w-5 h-5 flex items-center justify-center rounded hover:text-error hover:bg-error/10 cursor-pointer transition-colors disabled:opacity-40",children:e(Q,{size:10})})]})]},y.ref))})]})})})]})}function Mt({repo:t,isBusy:l,onInit:c}){let r=t==="."?"this folder":t;return e("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[e(de,{size:26,className:"text-ink/25","aria-hidden":!0}),e("div",{className:"font-mono space-y-1",children:[e("p",{className:"text-xs text-ink/70",children:"Not a Git repository"}),e("p",{className:"text-[11px] leading-4 text-ink/40",children:["Initialize one in ",r," to track changes, commit and manage branches."]})]}),e("button",{type:"button",onClick:c,disabled:l,"aria-label":"Initialize Git repository",title:`git init in ${r}`,className:"flex items-center justify-center gap-1.5 px-3 py-1.5 rounded bg-ink text-canvas hover:bg-ink/90 transition-colors cursor-pointer text-xs font-medium disabled:opacity-40 disabled:cursor-not-allowed",children:[e(de,{size:12,"aria-hidden":!0}),"Initialize repository"]})]})}function Tt(t,l,c){let r=ft(),{pickedRepo:m,setActiveRepo:g,ready:x}=xr(t),{repos:v,scanning:N,rescan:P}=wr(t,l),w=Jg(m,v),C=i(w);C.current=w;let R=i("");R.current=`${t??""}\x00${w}`;let G=i(""),M=i(""),k=i(void 0);if(r.data!==k.current)k.current=r.data,M.current=G.current;let b=l&&x?Bm(`${t??""}\x00${w}`):null,y=Te(b),L=i(y.refresh);L.current=y.refresh;let B=M.current===R.current?r.data:void 0,z=y.data??B,q=z?.syncCount??B?.syncCount,A=a((_)=>{if(!l)return;let H=_??C.current,O=new URLSearchParams;if(t)O.set("root",t);if(H)O.set("repo",H);O.set("sync","1"),O.set("t",String(Date.now())),G.current=R.current;let D=L.current;r.load(`/api/fs/git?${O.toString()}`).then(()=>D())},[l,t,r.load]);o(()=>{if(!x)return;A()},[c,t,l,x,w,A]);let V=r.state==="loading",Y=V||y.refreshing;return{activeRepo:w,setActiveRepo:g,repos:v,reposScanning:N,refreshRepos:P,isReading:V,isRefreshing:Y,data:z,syncCount:q,loadRepo:A,refreshTopic:y.refresh}}function Lt(t,l){let c=ft(),r=i(null),m=a((g,x,v)=>{r.current={actionType:g,extra:v};let N=new FormData;if(N.append("actionType",g),N.append("repo",l),t)N.append("root",t);if(x)N.append("file",x);if(v)Object.entries(v).forEach(([P,w])=>N.append(P,w));c.submit(N,{method:"POST",action:"/api/fs/git"})},[l,t,c]);return{state:c.state,execute:m,data:c.data,lastAction:r.current}}function At({rootPath:t,repo:l,execute:c}){let{sessionId:r}=_m(),[m,g]=T("git.commitDraft",""),[x,v]=T("git.amend",!1),[N,P]=n(!1),[w,C]=n(null),[R,G]=n(!1),M=i(!1),k=i(null),b=i(m);b.current=m;let y=i(x);y.current=x;let L=i(g);L.current=g;let B=a((_)=>{g(_),G(!1)},[g]),z=a(()=>{if(M.current)return;M.current=!0,P(!0),C(null);let _={...t?{root:t}:{},repo:l,...r?{sessionId:r}:{},...y.current?{amend:!0}:{}};fetch("/api/fs/git-message",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(_)}).then(async(H)=>{let O=await H.json().catch(()=>null);if(!H.ok||typeof O?.message!=="string"||!O.message.trim())throw Error(typeof O?.error==="string"?O.error:`Request failed (HTTP ${H.status})`);let D=O.message.trim();if(b.current.trim().length===0)L.current(D),G(!0);else C(D)}).catch((H)=>{wl(H instanceof Error?H.message:String(H),"error")}).finally(()=>{M.current=!1,P(!1)})},[t,l,r]),q=a(()=>{if(w===null)return;g(w),G(!0),C(null)},[w,g]),A=a(()=>C(null),[]);o(()=>{if(!x)return;if(b.current.trim().length>0)return;let _=new URLSearchParams({headMessage:"1"});if(t)_.set("root",t);if(l)_.set("repo",l);let H=!1;return fetch(`/api/fs/git?${_.toString()}`).then((O)=>O.json()).then((O)=>{if(H)return;if(!y.current||b.current.trim().length>0)return;let D=typeof O?.message==="string"?O.message:"";if(D.length===0)return;k.current=D,L.current(D)}).catch(()=>{}),()=>{H=!0}},[x,r,t,l]);let V=a((_)=>{if(_){v(!0);return}if(k.current!==null&&b.current===k.current)g("");k.current=null,v(!1)},[v,g]),Y=a(()=>{c("commit",void 0,{message:b.current,...y.current?{amend:"1"}:{}}),g(""),v(!1),k.current=null,C(null),G(!1)},[c,v,g]);return{message:m,setMessage:B,amend:x,seeded:k.current!==null&&m===k.current,toggleAmend:V,commit:Y,isGenerating:N,suggestion:w,generated:R,generate:z,useSuggestion:q,dismissSuggestion:A}}var Dt=48;function Qt(t,l){let c=l?.branch?.trim()??"",r=(l?.hash??"").slice(0,7),m=l?.ref?.trim()||"stash@{0}";switch(t){case"init":return{done:"Initialized the repository"};case"fetch":return{done:"Fetched every remote"};case"push":return{done:"Pushed to upstream"};case"pull":return{done:"Pulled from upstream",stopped:"Pulled"};case"sync":return{done:"Synced with upstream",stopped:"Pulled, but nothing was pushed"};case"abort_operation":return{done:"Aborted the operation in progress"};case"continue_operation":return{done:"Concluded the operation"};case"commit":{if(l?.amend==="1")return{done:"Amended the last commit"};let g=(l?.message??"").split(`
|
|
9
|
-
`)[0].trim();if(!g)return{done:"Commit created"};return{done:`Committed “${g.length>Dt?`${g.slice(0,Dt-1)}…`:g}”`}}case"checkout":return{done:c?`Switched to ${c}`:"Switched branch"};case"create_branch":case"create_branch_at":return{done:c?`Created branch ${c}`:"Created branch"};case"rename_branch":{let g=l?.newName?.trim()??"";return{done:c&&g?`Renamed ${c} to ${g}`:"Renamed branch"}}case"delete_branch":return{done:c?`Deleted branch ${c}`:"Deleted branch"};case"merge_branch":return{done:c?`Merged ${c}`:"Merged branch",stopped:c?`Merging ${c}`:"Merging the branch"};case"merge_commit":return{done:r?`Merged commit ${r}`:"Merged commit",stopped:r?`Merging ${r}`:"Merging the commit"};case"cherry_pick":return{done:r?`Cherry-picked ${r}`:"Cherry-picked commit",stopped:r?`Cherry-picking ${r}`:"Cherry-picking the commit"};case"revert_commit":return{done:r?`Reverted commit ${r}`:"Reverted commit",stopped:r?`Reverting ${r}`:"Reverting the commit"};case"rebase_commit":return{done:r?`Rebased onto ${r}`:"Rebased",stopped:r?`Rebasing onto ${r}`:"Rebasing"};case"reset_commit":{let g=l?.mode??"mixed";return{done:r?`Reset to ${r} (${g})`:`Reset (${g})`}}case"stash_push":return{done:"Stashed your changes"};case"stash_apply":return{done:l?.pop==="1"?`Popped ${m}`:`Applied ${m}`,stopped:l?.pop==="1"?`Popping ${m}`:`Applying ${m}`};case"stash_drop":return{done:`Dropped ${m}`};default:return null}}function Et({actionType:t,extra:l,stopped:c}){let r=Qt(t,l);if(!c)return r?.done??null;let m=Lo[c]??c,g=r?.stopped??r?.done??"",x=t==="sync"?"resolve it above, then Sync again":"resolve it above";return g?`${g} — the ${m} stopped on a conflict; ${x}`:`The ${m} stopped on a conflict; ${x}`}function Bt(t){let{fetcher:l,onPage:c,onReload:r,onSuccess:m,onError:g}=t,x=i(null),v=i({onPage:c,onReload:r,onSuccess:m,onError:g});v.current={onPage:c,onReload:r,onSuccess:m,onError:g},o(()=>{if(l.state!=="idle"||!l.data)return;let N=l.data;if(N===x.current)return;x.current=N;let P=v.current;if(N.type==="history"||N.type==="graph"){P.onPage({title:N.type==="graph"?"Git Graph":"Commit History",data:N.data||[],hasMore:N.hasMore,total:N.total});return}if(!N.success){P.onError(N.error||"Git operation failed");return}P.onReload();let w=l.lastAction,C=w?Et({...w,stopped:N.stopped}):null;if(C)P.onSuccess(C,N.stopped?"warning":"success")},[l.state,l.data,l.lastAction])}function Ft(t,l,c,r){if(t==="revert")return{type:t,file:l,message:`Are you sure you want to discard changes in ${l}?`};if(t==="revert_all")return{type:t,message:"Are you sure you want to discard ALL unstaged changes? This cannot be undone."};if(t==="abort_operation"){let m=r?Lo[r]:"operation";return{type:t,message:`Abort the ${m}? Everything resolved so far is discarded and the working tree returns to its pre-${m} state.`}}if(t==="delete_branch"){let m=c?.branch??"",g=c?.force==="1";return{type:t,extra:{branch:m,...g?{force:"1"}:{}},message:g?`Delete branch ${m} even though its commits are not merged? This cannot be undone from the panel.`:`Delete branch ${m}?`}}if(t==="stash_drop"){let m=c?.ref||"the top entry";return{type:t,extra:{ref:c?.ref??""},message:`Drop ${m}? The stash entry is removed — this cannot be undone from the panel.`}}return null}function Lr({className:t="",enabled:l=!0,rootPath:c,refreshKey:r=0}){let{activeRepo:m,setActiveRepo:g,repos:x,reposScanning:v,refreshRepos:N,isReading:P,isRefreshing:w,data:C,syncCount:R,loadRepo:G,refreshTopic:M}=Tt(c,l,r),k=Lt(c,m),[b,y]=T("git.viewMode","flat"),[L,B]=n(!1),z=i(null),[q,A]=n(!1),V=i(null),[Y,_]=n(null),[H,O]=n(!1),[D,oe]=n(""),se=i(null),[ve,me]=n(!1),[pe,ke]=n(null),[Pe,$e]=n(!1),{pushToast:re}=We();o(()=>{$e(!0)},[]),o(()=>{if(H&&se.current)se.current.focus()},[H]),Bt({fetcher:k,onPage:ke,onReload:G,onSuccess:(Z,te)=>re(Z,te),onError:(Z)=>re(Z,"error")}),he(z,()=>B(!1)),he(V,()=>A(!1));let ee=k.execute,{message:Me,setMessage:ye,amend:Ce,seeded:Le,toggleAmend:Ae,commit:j,isGenerating:W,suggestion:ne,generated:De,generate:ge,useSuggestion:Ee,dismissSuggestion:we}=At({rootPath:c,repo:m,execute:ee}),ce=(Z,te,Re)=>{let Ke=Ft(Z,te,Re,C?.state?.operation??null);if(Ke){_(Ke);return}ee(Z,te,Re)},Ht=(Z,te)=>{ee("resolve_conflict",Z,te?{side:te}:void 0)},Ue=C?.branch||"main",zt=C?.branches||["main"],Ot=C?.remoteBranches||[],qe=C?.changes||[],ie=P||k.state!=="idle",Be=k.state==="idle"?null:k.lastAction?.actionType??null,It=Be==="sync"||Be==="push"||Be==="pull",_t=qe.filter((Z)=>{if(Mr(Z.status))return!1;let te=Z.status;return te&&te[0]!==" "&&te[0]!=="?"});if(!l)return e("div",{className:`flex flex-col h-full bg-paper items-center justify-center text-ink/40 ${t}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});return e("div",{className:`flex flex-col h-full bg-paper relative ${t}`,children:[e(Pt,{mounted:Pe,confirmModal:Y,onCloseConfirm:()=>_(null),onConfirm:()=>{if(Y)ee(Y.type,Y.file,Y.extra),_(null)},branchPrompt:H,newBranchName:D,newBranchInputRef:se,onNewBranchNameChange:oe,onCloseBranchPrompt:()=>{O(!1),oe("")},onCreateBranch:()=>{if(D.trim())ee("create_branch",void 0,{branch:D.trim()}),O(!1),oe("")},viewingOutput:pe,onCloseOutput:()=>ke(null),onRefreshOutput:()=>{if(pe)ee(pe.title.toLowerCase().includes("graph")?"graph":"history")},onExecuteAction:(Z,te,Re)=>ee(Z,te,Re),branchModalOpen:ve,onCloseBranchModal:()=>me(!1),rootPath:c,activeRepo:m,currentBranch:Ue,detached:C?.state?.detached??!1,isBusy:ie,onBranchAction:(Z,te)=>ee(Z,void 0,te),onConfirmDeleteBranch:(Z,te)=>{ee("delete_branch",void 0,{branch:Z,...te?{force:"1"}:{}})}}),e(Je,{activeRepo:m,repos:x,isRefreshing:w,rootPath:c,reposScanning:v,onSelectRepo:(Z)=>{g(Z)},onRefresh:()=>{M(),G()},onRefreshRepos:N}),C?.isRepo===!1?e(Mt,{repo:m,isBusy:ie,onInit:()=>ee("init")}):e(d,{children:[e(Ze,{branchRef:V,showBranchMenu:q,setShowBranchMenu:A,branch:Ue,branches:zt,remoteBranches:Ot,onCheckout:(Z)=>ee("checkout",void 0,{branch:Z}),onMerge:(Z)=>ee("merge_branch",void 0,{branch:Z}),onOpenBranchPrompt:()=>O(!0),onManageBranches:()=>{me(!0),A(!1)},optionsRef:z,showOptions:L,setShowOptions:B,onHistory:()=>ee("history"),onGraph:()=>ee("graph"),viewMode:b,setViewMode:y,isBusy:ie,syncCount:R,syncing:It,onSync:()=>ee("sync"),onFetch:()=>ee("fetch"),detached:C?.state?.detached??!1}),C?.state?.operation?e(Qe,{operation:C.state.operation,conflicts:C.state.conflicts,isBusy:ie,onAbort:()=>ce("abort_operation"),onContinue:()=>ee("continue_operation")}):e(Xe,{message:Me,hasStagedChanges:_t.length>0,isBusy:ie,amend:Ce,seeded:Le,isGenerating:W,suggestion:ne,generated:De,onToggleAmend:Ae,onChangeMessage:ye,onCommit:j,onGenerate:ge,onUseSuggestion:Ee,onDismissSuggestion:we}),e(ot,{changes:qe,isLoading:ie,viewMode:b,repo:m,rootPath:c,onAction:ce,onResolve:Ht}),e($t,{rootPath:c,repo:m,isBusy:ie,onAction:(Z,te)=>ce(Z,void 0,te)})]})]})}export{Lr as GitPanel};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d,n,o,i,a,e,p,Q,pn,Ia,Ue,F,S,er,h,He,we,T,Jh,Km,Nd,Zh,Rc}from"./index-nr5gwny1.js";import{rd}from"./index-y69cbdvd.js";import"./index-h4qmywn5.js";var Oe={idle:"Kosong",loading:"Memuat",ready:"Siap"},ee="p-1 rounded hover:bg-ink/5 disabled:opacity-25 disabled:hover:bg-transparent text-ink/70 hover:text-ink cursor-pointer disabled:cursor-not-allowed transition-colors";function ae({url:t,input:r,loading:s,error:l,canGoBack:c,canGoForward:u,viewportMode:f,zoomLevel:m,onInputChange:g,onSubmit:y,onBack:U,onForward:L,onReload:w,onOpenExternal:E,onIncludeInChat:b,onChangeViewport:z,onZoomIn:N,onZoomOut:C,onResetZoom:x,onSetZoom:k,annotate:R,focusKey:A}){let O=i(void 0),D=i(null),G=i(null);o(()=>{if(O.current===t)return;O.current=t;let v=G.current;if(G.current=null,!t)return;if(v!==null&&v!==r)return;g(t)},[t,r,g]);let M=i(A);o(()=>{if(A===void 0||M.current===A)return;if(M.current=A,t)return;D.current?.focus()},[A,t]);let B=(v)=>{G.current=v,g(v)},I=!t?"idle":s?"loading":"ready",P=I==="ready"?"bg-success animate-pulse":I==="loading"?"bg-ink/40 animate-pulse":"bg-ink/25",Z=e("div",{className:"flex items-center bg-canvas border border-ink/10 rounded-md p-0.5 space-x-0.5 flex-shrink-0",children:[e("button",{type:"button",onClick:U,disabled:!c,"aria-label":"Back",title:"Back",className:ee,children:e(pn,{size:12})}),e("button",{type:"button",onClick:L,disabled:!u,"aria-label":"Maju",title:"Maju",className:ee,children:e(Ia,{size:12})}),e("button",{type:"button",onClick:w,disabled:!t,"aria-label":"Reload",title:"Reload",className:ee,children:e(S,{size:12,className:s?"animate-spin":void 0})})]});return e(rd,{twoRows:!0,url:t,statusDotClass:P,statusLabel:Oe[I],viewportMode:f,zoomLevel:m,onChangeViewport:z,onZoomIn:N,onZoomOut:C,onResetZoom:x,onSetZoom:k,annotate:R,onIncludeInChat:b,onOpenExternal:E,openExternalLabel:"Buka di tab baru",openExternalTitle:"Buka di tab baru (untuk situs yang menolak iframe)",children:e("div",{className:"flex items-center flex-1 min-w-0 space-x-1.5",children:[Z,e("form",{className:`flex-1 min-w-0 flex items-center bg-canvas border rounded-md px-2 py-1 space-x-1 focus-within:border-ink/40 ${l?"border-error":"border-ink/15"}`,onSubmit:(v)=>{v.preventDefault(),y(r)},children:[e(Ue,{size:12,className:"text-ink/40 flex-shrink-0"}),e("input",{ref:D,type:"text",value:r,onChange:(v)=>B(v.currentTarget.value),placeholder:"Type an address (e.g. localhost:5173) and press Enter…","aria-label":"Browser address","aria-invalid":l!==void 0&&l!==null,title:l??void 0,spellcheck:!1,autoComplete:"off",className:`w-full min-w-0 bg-transparent outline-none font-mono text-[11px] placeholder:text-ink/35 ${l?"text-error":"text-ink/90"}`})]})]})})}var ie={"desktop-16-9":"w-full max-w-[1280px] aspect-video max-h-full border border-ink/20 rounded-lg shadow-md overflow-hidden my-auto",laptop:"w-[1024px] max-w-full h-[768px] max-h-full border border-ink/20 rounded-lg shadow-md overflow-hidden my-auto",tablet:"w-[768px] max-w-full h-[1024px] max-h-full border border-ink/20 rounded-lg shadow-md overflow-hidden my-auto",mobile:"w-[375px] max-w-full h-[667px] max-h-full border border-ink/20 rounded-xl shadow-md overflow-hidden my-auto","mobile-lg":"w-[414px] max-w-full h-[896px] max-h-full border border-ink/20 rounded-xl shadow-md overflow-hidden my-auto",responsive:"w-full h-full border-0"};function le(t){let r=t.trim();if(!r)return"";try{let s=new URL(r),l=s.pathname==="/"?"":s.pathname;return`${s.hostname}${l}`.slice(0,64)}catch{return r.slice(0,64)}}var X=12,ce=60,ze=8192,de=0;function W(){return de+=1,`tab-${Date.now().toString(36)}-${de}`}function Y(t,r=""){return r?{id:t,history:[r],index:0,frameKey:0}:{id:t,history:[],index:-1,frameKey:0}}function K(t){if(!t||t.index<0)return"";return t.history[t.index]??""}function te(t){return Boolean(t)&&t.index>0}function ne(t){return Boolean(t)&&t.index>=0&&t.index<t.history.length-1}function ue(t,r){if(K(t)===r)return re(t);let s=[...t.history.slice(0,t.index+1),r],l=Math.max(0,s.length-ce),c=l>0?s.slice(l):s;return{...t,history:c,index:c.length-1,frameKey:t.frameKey+1}}function oe(t,r){let s=t.index+r;if(s<0||s>=t.history.length)return t;return{...t,index:s}}function re(t){return{...t,frameKey:t.frameKey+1}}function pe(t,r,s){let l=t.findIndex((f)=>f.id===s);if(l===-1)return{tabs:t,activeId:r};let c=t.filter((f)=>f.id!==s);if(r!==s)return{tabs:c,activeId:r};let u=c[Math.min(l,c.length-1)]??null;return{tabs:c,activeId:u?u.id:null}}function me(t,r){return t.find((s)=>s.id===r)??t[t.length-1]??null}function Fe(t){if(!Array.isArray(t))return[];let r=[];for(let s of t){if(typeof s!=="string")continue;let l=s.trim();if(!l||l.length>ze)continue;if(r.push(l),r.length>=ce)break}return r}function se(t){if(!Array.isArray(t))return[];let r=[],s=new Set;for(let l of t){if(typeof l!=="object"||l===null)continue;let c=l,u=typeof c.id==="string"?c.id.trim():"";if(!u||s.has(u))continue;let f=Fe(c.history),m=typeof c.index==="number"&&Number.isFinite(c.index)?Math.trunc(c.index):-1,g=f.length===0?-1:Math.min(f.length-1,Math.max(0,m===-1?0:m)),y=typeof c.frameKey==="number"&&Number.isFinite(c.frameKey)?Math.trunc(c.frameKey):0;if(s.add(u),r.push({id:u,history:f,index:g,frameKey:Math.max(0,y)}),r.length>=X)break}return r}function fe(t){return le(K(t))||"Tab baru"}var Ke="clipboard-read; clipboard-write; fullscreen";function he({tabs:t,activeTabId:r,loadingTabId:s,viewportMode:l,zoomLevel:c,onLoad:u,active:f=!0,overlay:m,onFrame:g}){let y=i(new Map),U=t.map((w)=>`${w.id}:${w.frameKey}`).join("|");if(o(()=>{g?.(r?y.current.get(r)??null:null)},[r,g,U]),!f)return null;let L=t.filter((w)=>K(w)!=="");if(L.length===0)return e("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center select-none",children:[e("div",{className:"w-12 h-12 rounded-xl bg-ink/5 border border-ink/10 flex items-center justify-center text-ink/40 mb-3",children:e(Ue,{size:22})}),e("h3",{className:"text-sm font-semibold text-ink mb-1",children:"Browser Anda"}),e("p",{className:"text-xs text-ink/60 max-w-sm",children:"Type an address above and press Enter. The page loads inside this panel."}),e("p",{className:"text-[11px] text-ink/45 max-w-sm mt-2",children:"Sebagian situs (Google, GitHub) menolak ditampilkan dalam iframe — pakai tombol buka di tab baru."})]});return e("div",{className:"flex-1 min-h-0 relative flex items-center justify-center p-2 overflow-auto bg-canvas/60",children:L.map((w)=>{let E=K(w),b=w.id===r,z=w.id===s;return e("div",{"data-user-browser-tab":w.id,className:b?"relative flex-1 min-h-0 flex items-center justify-center":"hidden",children:[z?e("div",{className:"absolute inset-0 z-10 flex items-center justify-center pointer-events-none",children:e("div",{className:"flex items-center space-x-2 px-3 py-1.5 rounded-md bg-paper border border-ink/15",children:[e(p,{size:13,className:"animate-spin text-ink/50"}),e("span",{className:"text-[11px] font-mono text-ink/60",children:"Memuat…"})]})}):null,e("div",{className:`relative flex flex-col bg-white ${ie[l]} transition-all duration-200`,style:{zoom:c!==100?`${c}%`:void 0,transformOrigin:"top center"},children:[e("iframe",{ref:(N)=>{if(N)y.current.set(w.id,N);else y.current.delete(w.id)},src:E,title:`Browser pengguna ${w.id}`,onLoad:()=>u(w.id),referrerPolicy:"no-referrer",allow:Ke,className:"w-full h-full bg-white border-0",style:b&&m?{pointerEvents:"none"}:void 0},`${w.id}:${w.frameKey}`),b?m:null]})]},w.id)})})}var be="cursor-pointer transition-colors";function ge({tabs:t,activeTabId:r,canOpenTab:s,onSelect:l,onClose:c,onNewTab:u}){let f=i(null);return o(()=>{f.current?.scrollIntoView({block:"nearest",inline:"nearest"})},[r,t.length]),e("div",{"data-toolbar-band":"strip",className:"h-8 px-1.5 border-b border-ink/10 bg-paper flex items-center gap-1 flex-shrink-0 select-none",children:[e("div",{className:"flex-1 min-w-0 flex items-center gap-1 overflow-x-auto",children:t.map((m)=>{let g=m.id===r,y=fe(m),U=K(m);return e("div",{ref:g?f:void 0,className:`group flex items-center rounded border flex-shrink-0 ${g?"bg-ink text-canvas border-ink":"bg-paper text-ink/70 border-ink/15 hover:border-ink/35 hover:text-ink"}`,children:[e("button",{type:"button",onClick:()=>l(m.id),"aria-pressed":g,"aria-label":`Tab ${y}`,title:U?`${y}
|
|
2
|
-
${U}`:y,className:`pl-2 pr-1 py-0.5 text-[11px] font-mono max-w-[150px] truncate ${be}`,children:y}),e("button",{type:"button",onClick:()=>c(m.id),"aria-label":`Tutup tab ${y}`,title:`Tutup tab ${y}`,className:`mr-0.5 p-1 rounded hover:bg-error hover:text-paper ${be} ${g?"text-on-ink-muted":"text-ink/40 opacity-0 group-hover:opacity-100 focus-visible:opacity-100"}`,children:e(h,{size:11})})]},m.id)})}),e("button",{type:"button",onClick:u,disabled:!s,"aria-label":"Tab baru",title:s?"Tab baru":`Maksimal ${X} tab`,className:"p-1 rounded hover:bg-ink/5 text-ink/60 hover:text-ink disabled:opacity-30 disabled:hover:bg-transparent disabled:cursor-not-allowed cursor-pointer transition-colors flex-shrink-0",children:e(F,{size:13})})]})}var xe="w-full min-w-0 bg-canvas border border-ink/15 rounded px-2 py-1 text-[11px] font-mono text-ink placeholder:text-ink/35 focus:outline-none focus:border-ink/40";function De(t){if(!t||t.ok)return null;if(t.reason==="cross-origin")return"This page is cross-origin, so its elements cannot be read. Name the part and add a note instead.";if(t.reason==="no-frame")return"The page has not loaded, so its elements cannot be read yet.";return"There is no element at this point (empty space). Name the part instead."}function ve({shape:t,index:r,readability:s,onLabel:l,onNote:c}){let u=De(s),f=t.element;return e("div",{className:"flex items-start gap-1.5 min-w-0",children:[e("span",{className:"text-[11px] font-mono text-ink/45 pt-1 flex-shrink-0",children:[Nd[t.tool]," #",r]}),e("div",{className:"flex-1 min-w-0 space-y-1",children:[e("div",{className:"flex items-center gap-1 flex-wrap",children:[e("span",{className:"text-[10px] uppercase font-mono text-ink/40",children:"bagian"}),Zh.map((m)=>{let g=t.label===m;return e("button",{type:"button",onClick:()=>l(g?"":m),"aria-pressed":g,className:`px-1.5 py-0.5 rounded-full border text-[10px] font-mono transition-colors cursor-pointer ${g?"bg-ink text-canvas border-ink":"bg-canvas text-ink/65 border-ink/15 hover:border-ink/40"}`,children:m},m)}),e("input",{value:t.label,onInput:(m)=>l(m.currentTarget.value),placeholder:"or type your own…","aria-label":"Name of the marked part",spellcheck:!1,className:`${xe} flex-1 min-w-[110px]`})]}),e("textarea",{value:t.note,onInput:(m)=>c(m.currentTarget.value),placeholder:"What is wrong with this part? (e.g. the Pay button looks disabled)",rows:2,"aria-label":"Annotation note",className:`${xe} resize-y`}),f?e("p",{className:"text-[10px] font-mono text-ink/45 truncate",title:f.path,children:["elemen: ",f.path,f.state?` · ${f.state}`:""]}):null,u?e("p",{className:"text-[10px] text-ink/40",children:u}):null]})]})}var Ge=["box","pin","arrow"],Ve="px-2 py-1 rounded text-[11px] font-mono border transition-colors cursor-pointer",j="flex items-center gap-1 px-2 py-1 rounded text-[11px] border border-ink/15 hover:border-ink/40 text-ink/80 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed";function ye({tool:t,shapes:r,selectedId:s,readability:l,onTool:c,onLabel:u,onNote:f,onRemove:m,onReset:g,onCancel:y,onSend:U}){let L=r.find((E)=>E.id===s)??null,w=r.length>0;return e("div",{className:"flex-shrink-0 border-b border-ink/10 bg-paper px-2.5 py-1.5 space-y-1.5 select-none",children:[e("div",{className:"flex items-center gap-1.5",children:[e("span",{className:"text-[10px] uppercase font-mono text-ink/50 mr-1",children:"Anotasi"}),Ge.map((E)=>e("button",{type:"button",onClick:()=>c(E),"aria-pressed":t===E,className:`${Ve} ${t===E?"bg-ink text-canvas border-ink":"bg-canvas text-ink/70 border-ink/15 hover:border-ink/40"}`,children:Nd[E]},E)),e("span",{className:"text-[11px] font-mono text-ink/45 ml-1",children:r.length>0?`${r.length} mark${r.length===1?"":"s"}`:"drag on the page to mark a part"}),e("div",{className:"flex-1"}),e("button",{type:"button",onClick:g,disabled:!w,className:j,title:"Clear all marks",children:[e(Q,{size:12})," Bersihkan"]}),e("button",{type:"button",onClick:U,disabled:!w,className:j,title:"Kirim anotasi ke draft chat",children:[e(er,{size:12})," Kirim ke chat"]}),e("button",{type:"button",onClick:y,className:j,title:"Tutup mode anotasi",children:e(h,{size:12})})]}),L?e("div",{className:"flex items-start gap-1.5",children:[e("div",{className:"flex-1 min-w-0",children:e(ve,{shape:L,index:r.indexOf(L)+1,readability:l,onLabel:(E)=>u(L.id,E),onNote:(E)=>f(L.id,E)})}),e("button",{type:"button",onClick:()=>m(L.id),className:j,title:"Remove this mark",children:e(Q,{size:12})})]}):e("p",{className:"text-[11px] text-ink/45",children:"This page cannot be screenshotted, so what gets sent is the area, the part name and your note."})]})}var Te=0;function ke(){return Te+=1,`annot-${Date.now().toString(36)}-${Te}`}function Ae(t){let[r,s]=n(!1),[l,c]=n("box"),[u,f]=n([]),[m,g]=n(null);o(()=>{f([]),g(null)},[t]);let y=a(()=>{s((N)=>!N),g(null)},[]),U=a(()=>{g(null),s(!1)},[]),L=a((N)=>{f((C)=>[...C,N]),g(N.id)},[]),w=a((N,C)=>{f((x)=>x.map((k)=>k.id===N?{...k,note:C}:k))},[]),E=a((N,C)=>{f((x)=>x.map((k)=>k.id===N?{...k,label:C}:k))},[]),b=a((N)=>{f((C)=>C.filter((x)=>x.id!==N)),g((C)=>C===N?null:C)},[]),z=a(()=>{f([]),g(null)},[]);return{active:r,tool:l,shapes:u,selectedId:m,setTool:c,toggle:y,close:U,add:L,setNote:w,setLabel:E,select:g,remove:b,reset:z}}var Xe=4,V="var(--theme-error)";function Be({shapes:t,tool:r,selectedId:s,onMeasure:l,onAdd:c,onSelect:u}){let f=i(null),m=i(null),[g,y]=n(null),[U,L]=n({width:0,height:0});o(()=>{let x=f.current;if(!x)return;let k=()=>{let A=x.getBoundingClientRect();if(A.width<=0||A.height<=0)return;L((O)=>O.width===A.width&&O.height===A.height?O:{width:A.width,height:A.height}),l({width:A.width,height:A.height})};if(k(),typeof ResizeObserver!=="function")return;let R=new ResizeObserver(k);return R.observe(x),()=>R.disconnect()},[l]);let w=(x)=>{let k=f.current;if(!k)return null;let R=k.getBoundingClientRect(),A={x:x.clientX-R.left,y:x.clientY-R.top};return{normalized:Jh(R,A),px:A.x,py:A.y}},E=(x)=>{if(x.button!==0)return;let k=w(x);if(!k)return;x.preventDefault(),u(null),x.currentTarget.setPointerCapture?.(x.pointerId);let R={id:ke(),tool:r,start:k.normalized,end:k.normalized,label:"",note:""};m.current=R,y(R)},b=(x)=>{let k=m.current;if(!k)return;let R=w(x);if(!R)return;let A={...k,end:R.normalized};m.current=A,y(A)},z=(x)=>{let k=m.current;if(!k)return;let R=w(x),A=R?{...k,end:R.normalized}:k;if(m.current=null,y(null),x.currentTarget.releasePointerCapture?.(x.pointerId),A.tool!=="pin"){let O=f.current?.getBoundingClientRect();if((O?Math.hypot((A.end.x-A.start.x)*O.width,(A.end.y-A.start.y)*O.height):0)<Xe)return}c(A)},N=()=>{m.current=null,y(null)},C=g?[...t,g]:t;return e("div",{ref:f,className:"absolute inset-0 cursor-crosshair touch-none",onPointerDown:E,onPointerMove:b,onPointerUp:z,onPointerCancel:N,children:e("svg",{className:"absolute inset-0 w-full h-full",viewBox:`0 0 ${Math.max(1,U.width)} ${Math.max(1,U.height)}`,preserveAspectRatio:"none","aria-label":"Page annotation area",children:C.map((x,k)=>e(We,{shape:x,index:k+1,box:U,selected:x.id===s,onSelect:()=>u(x.id)},x.id))})})}function We({shape:t,index:r,box:s,selected:l,onSelect:c}){let u={x:t.start.x*s.width,y:t.start.y*s.height},f={x:t.end.x*s.width,y:t.end.y*s.height},m=Km(t),g=l?3:2,y=String(r);return e("g",{onPointerDown:(L)=>{L.stopPropagation(),L.preventDefault(),c()},className:"cursor-pointer",children:[t.tool==="box"&&e("rect",{x:m.x*s.width,y:m.y*s.height,width:Math.max(1,m.width*s.width),height:Math.max(1,m.height*s.height),fill:V,fillOpacity:l?0.16:0.1,stroke:V,strokeWidth:g,vectorEffect:"non-scaling-stroke",rx:3}),t.tool==="arrow"&&e(d,{children:[e("line",{x1:u.x,y1:u.y,x2:f.x,y2:f.y,stroke:V,strokeWidth:g,vectorEffect:"non-scaling-stroke"}),e("circle",{cx:f.x,cy:f.y,r:4,fill:V})]}),t.tool==="pin"&&e("circle",{cx:u.x,cy:u.y,r:7,fill:V,fillOpacity:l?0.5:0.3,stroke:V,strokeWidth:g}),e("circle",{cx:u.x,cy:u.y,r:9,fill:V}),e("text",{x:u.x,y:u.y,textAnchor:"middle",dominantBaseline:"central",fontSize:11,fontWeight:700,fill:"var(--theme-paper)",children:y})]})}function Ee(t){let r=t.trim();if(!r)return r;let s=/^[a-z][a-z0-9+.-]*:/i.test(r)?r:`https://${r}`,l=new URL(s);if(l.protocol!=="http:"&&l.protocol!=="https:")throw Error("Only http and https URLs are allowed");return l.toString()}var Ne="userBrowser.tabs",Se="userBrowser.activeTabId",Ze="userBrowser.inputUrl",Ye="userBrowser.history",je="userBrowser.historyIndex";function Me(){let[t,r]=T(Ne,[]),[s,l]=T(Se,null),[c,u]=T(Ze,""),[f,m]=n(null),[g,y]=n(void 0),{sessionId:U,ready:L}=He(),w=i(null),E=(M,B)=>we(U,M)??B,b=me(t,s),z=K(b);o(()=>{if(!L||w.current===U)return;w.current=U;let M=E(Ne,[]),B=se(M);if(B.length>0){if(JSON.stringify(B)!==JSON.stringify(M))r(B);let Z=E(Se,null);if(!B.some((v)=>v.id===Z))l(B[B.length-1].id);return}let[I]=se([{id:W(),history:E(Ye,[]),index:E(je,-1),frameKey:0}]),P=I&&I.history.length>0?I:Y(W());r([P]),l(P.id)},[L,U,r,l]);let N=a((M,B)=>{r((I)=>I.map((P)=>P.id===M?B(P):P))},[r]),C=a((M)=>{let B=M.trim();if(!B)return;let I;try{I=Ee(B)}catch(P){y(P instanceof Error?P.message:"Alamat tidak valid");return}if(y(void 0),u(I),!b){let P=Y(W(),I);r([P]),l(P.id),m(P.id);return}m(b.id),N(b.id,(P)=>ue(P,I))},[b,l,u,r,N]),x=a(()=>{if(!b||!te(b))return;m(b.id),N(b.id,(M)=>oe(M,-1))},[b,N]),k=a(()=>{if(!b||!ne(b))return;m(b.id),N(b.id,(M)=>oe(M,1))},[b,N]),R=a(()=>{if(!b||!z)return;m(b.id),N(b.id,re)},[b,z,N]),A=a((M)=>{m((B)=>B===M?null:B)},[]),O=a(()=>{if(t.length>=X)return;let M=Y(W());r((B)=>[...B,M]),l(M.id),u(""),y(void 0)},[l,u,r,t.length]),D=a((M)=>{let B=t.find((I)=>I.id===M);if(!B)return;l(M),u(K(B)),y(void 0)},[l,u,t]),G=a((M)=>{let B=pe(t,s,M);if(B.tabs.length===0){let I=Y(W());r([I]),l(I.id),u("");return}if(r(B.tabs),B.activeId!==s){l(B.activeId);let I=B.tabs.find((P)=>P.id===B.activeId);u(K(I)),y(void 0)}},[s,l,u,r,t]);return{tabs:t,activeTab:b,activeTabId:b?.id??null,url:z,input:c,setInput:u,frameKey:b?.frameKey??0,loading:f!==null&&f===b?.id,error:g,canGoBack:te(b),canGoForward:ne(b),canOpenTab:t.length<X,submit:C,goBack:x,goForward:k,reload:R,markLoaded:A,openTab:O,selectTab:D,closeTab:G}}function qe(t){if(!t)return"no-frame";try{return t.contentDocument?"readable":"cross-origin"}catch{return"cross-origin"}}function q(t){let r=t.replace(/\s+/g," ").trim();return r.length>60?`${r.slice(0,59)}…`:r}function Je(t){let r=t.tagName.toLowerCase();if(t.id)return`${r}#${t.id}`;for(let l of["data-testid","data-test","aria-label"]){let c=t.getAttribute(l);if(c)return`${r}[${l}="${q(c)}"]`}let s=t.getAttribute("role");if(s)return`${r}[role="${s}"]`;return r}function Qe(t){let r=[],s=t;while(s&&r.length<4){if(s.tagName.toLowerCase()==="html")break;r.unshift(Je(s)),s=s.parentElement}return r.join(" > ")}function et(t){let r=[];if(t.disabled)r.push("nonaktif");if(t instanceof HTMLSelectElement||t.tagName.toLowerCase()==="select"){let s=t,c=s.selectedOptions?.[0]?.textContent?.trim()||s.value;if(c)r.push(`nilai "${q(c)}"`);let u=s.options?.length??0;if(u>0)r.push(`${u} opsi`)}else if(t.tagName.toLowerCase()==="input"){let s=t;if(s.type)r.push(`tipe ${s.type}`);if(s.type!=="password"&&s.placeholder)r.push(`placeholder "${q(s.placeholder)}"`)}return r.length>0?r.join(", "):void 0}function tt(t){let r={path:Qe(t),tag:t.tagName.toLowerCase()},s=t.getAttribute("role");if(s)r.role=s;let l=q(t.innerText??t.textContent??"");if(l)r.text=l;let c=et(t);if(c)r.state=c;return r}function Le(t,r){let s=qe(t);if(s!=="readable")return{ok:!1,reason:s};let{contentWindow:l,contentDocument:c}=t;if(!l||!c)return{ok:!1,reason:"cross-origin"};try{let u=Math.min(Math.max(r.x,0),1)*l.innerWidth,f=Math.min(Math.max(r.y,0),1)*l.innerHeight,m=c.elementFromPoint(u,f);if(!m||m===c.documentElement||m===c.body)return{ok:!1,reason:"no-element"};return{ok:!0,element:tt(m)}}catch{return{ok:!1,reason:"cross-origin"}}}function on({className:t="",active:r=!0}){let[s,l]=T("userBrowser.viewportMode","responsive"),[c,u]=T("userBrowser.zoomLevel",100),[f,m]=n(null),[g,y]=n(null),[U,L]=n(null),{tabs:w,activeTabId:E,url:b,input:z,setInput:N,loading:C,error:x,canGoBack:k,canGoForward:R,canOpenTab:A,submit:O,goBack:D,goForward:G,reload:M,markLoaded:B,openTab:I,selectTab:P,closeTab:Z}=Me(),v=Ae(`${E??""}:${w.find((_)=>_.id===E)?.frameKey??0}`),Ie=a(()=>{if(!b)return;window.open(b,"_blank","noopener,noreferrer")},[b]),Re=a(()=>{if(!b)return;Rc({url:b})},[b]),Pe=a((_)=>{m((H)=>H&&H.width===_.width&&H.height===_.height?H:_)},[]),Ce=a((_)=>{let H=Le(g,_.start);L(H),v.add(H.ok?{..._,element:H.element}:_)},[v,g]),_e=a(()=>{if(!b||v.shapes.length===0)return;let _=c/100;Rc({url:b,annotations:v.shapes,panel:{width:(f?.width??0)/_,height:(f?.height??0)/_,viewportMode:s,zoom:c}}),v.close()},[b,v,f,s,c]),J=v.active&&Boolean(b),$e=C?E??null:null;return e("div",{"data-user-browser-panel":"",className:`flex flex-col h-full w-full bg-paper text-ink overflow-hidden ${t}`,children:[e(ge,{tabs:w,activeTabId:E,canOpenTab:A,onSelect:P,onClose:Z,onNewTab:I}),e(ae,{url:b,input:z,loading:C,error:x,canGoBack:k,canGoForward:R,viewportMode:s,zoomLevel:c,onInputChange:N,onSubmit:O,onBack:D,onForward:G,onReload:M,onOpenExternal:Ie,onIncludeInChat:Re,onChangeViewport:l,onZoomIn:()=>u((_)=>Math.min(200,_+10)),onZoomOut:()=>u((_)=>Math.max(50,_-10)),onResetZoom:()=>u(100),onSetZoom:u,focusKey:E??void 0,annotate:{active:J,count:v.shapes.length,onToggle:v.toggle}}),J&&e(ye,{tool:v.tool,shapes:v.shapes,selectedId:v.selectedId,readability:U,onTool:v.setTool,onLabel:v.setLabel,onNote:v.setNote,onRemove:v.remove,onReset:v.reset,onCancel:v.close,onSend:_e}),e(he,{tabs:w,activeTabId:E,loadingTabId:$e,viewportMode:s,zoomLevel:c,onLoad:B,onFrame:y,active:r,overlay:J?e(Be,{shapes:v.shapes,tool:v.tool,selectedId:v.selectedId,onMeasure:Pe,onAdd:Ce,onSelect:v.select}):null})]})}export{on as UserBrowserPanel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d,n,o,i,u,a,e,B,p,pn,mn,Ie,ia,U,vh,Te,T,xr,wr,xt,nt,X,J}from"./index-nr5gwny1.js";import{Tr}from"./index-jd2h5tvh.js";function K({sections:c,selected:t,onSelect:l}){let[r,k]=n(""),x=u(()=>{let f=r.trim().toLowerCase();if(!f)return c;return c.map((g)=>({...g,links:g.links.filter((s)=>s.label.toLowerCase().includes(f)||(s.path??s.target).toLowerCase().includes(f))})).filter((g)=>g.links.length>0)},[c,r]),m=c.some((f)=>f.links.length>0);return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-canvas/40",children:[e("div",{className:"flex items-center gap-1.5 border-b border-ink/10 px-2 py-1.5 flex-shrink-0",children:[e(U,{size:11,className:"flex-shrink-0 text-ink/40"}),e("input",{type:"text",value:r,onChange:(f)=>k(f.currentTarget.value),placeholder:"Filter pages…",title:"Filter wiki pages",className:"w-full min-w-0 bg-transparent text-xs text-ink outline-none placeholder-ink/40"}),r&&e("button",{type:"button",onClick:()=>k(""),title:"Clear filter",className:"flex-shrink-0 text-ink/40 hover:text-ink",children:"×"})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:x.length===0?e("p",{className:"px-3 py-2 text-[11px] italic text-ink/40",children:m?"No page matches the filter":"This wiki has no pages"}):x.map((f,g)=>e("div",{className:"py-0.5",children:[f.title&&e("div",{className:"px-2.5 py-1 text-[10px] font-semibold uppercase tracking-wider text-ink/40",children:f.title}),f.links.map((s,h)=>{let b=s.path!==null&&s.path===t,w=`${s.path??s.target}-${h}`;if(s.path)return e("button",{type:"button",onClick:()=>l(s.path),title:s.path,"aria-current":b?"page":void 0,className:`flex w-full items-center gap-1 px-2.5 py-1 text-left text-xs transition-colors ${b?"bg-ink/8 font-medium text-ink":"text-ink/70 hover:bg-ink/5 hover:text-ink"}`,children:e("span",{className:"truncate",children:s.label})},w);if(s.url)return e("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",title:s.url,className:"flex w-full items-center gap-1 px-2.5 py-1 text-left text-xs text-ink/70 hover:bg-ink/5 hover:text-ink",children:[e("span",{className:"truncate",children:s.label}),e(Ie,{size:10,className:"flex-shrink-0 text-ink/30"})]},w);return e("div",{title:`Not in this wiki: ${s.target}`,className:"flex w-full items-center px-2.5 py-1 text-left text-xs text-ink/35 line-through decoration-ink/20",children:e("span",{className:"truncate",children:s.label})},w)}),f.notes.map((s,h)=>e("p",{className:"px-2.5 py-0.5 text-[10px] leading-snug text-ink/50",children:s},`note-${h}`))]},`${f.title??"links"}-${g}`))})]})}function j({open:c,onClick:t}){return e("button",{type:"button",onClick:t,title:"Browse wiki pages","aria-label":"Browse wiki pages","aria-expanded":c,className:"absolute bottom-3 right-3 z-20 flex h-9 w-9 items-center justify-center rounded-full border border-ink/20 bg-paper text-ink/60 shadow-sm transition-all hover:bg-ink/5 hover:text-ink",children:e(ia,{size:16})})}function V({open:c,sections:t,selected:l,onSelect:r,onClose:k}){if(o(()=>{if(!c)return;let x=(m)=>{if(m.key==="Escape")k()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[c,k]),!c)return null;return e(X,{onClose:k,maxWidthClass:"max-w-sm",zClass:"z-[70]",ariaLabel:"Wiki pages",header:e("div",{className:"flex min-w-0 items-center gap-2",children:[e(ia,{size:15,className:"flex-shrink-0 text-ink/50"}),e("span",{className:"text-sm font-medium",children:"Wiki pages"})]}),children:e("div",{className:"flex h-[60vh] min-h-0 flex-col",children:e(K,{sections:t,selected:l,onSelect:(x)=>{r(x),k()}})})})}function re(c,t){if(!c.webUrl)return null;let r=(t.split("/").pop()??t).replace(/\.(md|markdown)$/i,"");return c.provider==="gitlab"?`${c.webUrl.replace(/\/home$/,"")}/${encodeURIComponent(t.replace(/\.(md|markdown)$/i,""))}`:`${c.webUrl}/${encodeURIComponent(r)}`}function G({repo:c,entries:t,path:l,page:r,isLoading:k,error:x,rootPath:m,repoScope:f,onNavigate:g,onBack:s}){let h=re(c,l),b=u(()=>({path:l,entries:t,root:m,repo:f}),[l,t,m,f]);return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-paper",children:[e("div",{className:"flex flex-shrink-0 items-center gap-1.5 border-b border-ink/10 px-2.5 py-1.5",children:[s&&e("button",{type:"button",onClick:s,title:"Back to the page list","aria-label":"Back to the page list",className:"flex-shrink-0 rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink @[520px]:hidden",children:e(pn,{size:13})}),e("span",{className:"min-w-0 flex-1 truncate text-[11px] text-ink/50",title:l,children:l}),k&&e(p,{size:12,className:"flex-shrink-0 animate-spin text-ink/40"}),h&&e("a",{href:h,target:"_blank",rel:"noopener noreferrer",title:"Open this page on the wiki host","aria-label":"Open this page on the wiki host",className:"flex-shrink-0 rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink",children:e(Ie,{size:13})})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:x?e("div",{className:"flex flex-col items-center gap-2 px-6 py-8 text-center",children:[e(B,{size:16,className:"text-error"}),e("p",{className:"text-xs text-error",children:x})]}):!r?e("div",{className:"px-6 py-8 text-center text-xs text-ink/40",children:k?"Loading page…":"No page selected"}):e("article",{className:"mx-auto max-w-4xl px-5 py-4",children:[e(J,{content:r.content,className:"max-w-none",wikiScope:b,onWikiNavigate:g}),r.truncated&&e("p",{className:"mt-4 border-t border-ink/10 pt-2 text-[11px] text-ink/50",children:"This page is longer than the reader's budget and was cut off."})]})})]})}function O(c,t){return`${c??""}\x00${t}`}function H(c,t){let l=new URLSearchParams;if(c)l.set("root",c);if(t&&t!==".")l.set("repo",t);return l}function Q(c){let{rootPath:t,repo:l,enabled:r,active:k,revisionKey:x=0}=c,m=O(t,l),[f,g]=n(null),s=i(m);s.current=m;let h=Te(vh(m),{enabled:r&&k}),{refresh:b}=h;o(()=>{g(null)},[m]);let w=a((P)=>{if(!r)return;if(!P?.force){b();return}let W=s.current,R=H(t,l);R.set("refresh","1"),fetch(`/api/wiki?${R.toString()}`).then(async(N)=>{let y=await N.json();if(!N.ok)throw Error(y?.error||`Wiki request failed (${N.status})`)}).then(()=>{if(s.current!==W)return;g(null),b()}).catch((N)=>{if(s.current!==W)return;g(N instanceof Error?N.message:"Failed to load the wiki")})},[r,t,l,b]);return o(()=>{if(x>0)b()},[x]),{data:h.data,isLoading:h.isLoading,refreshing:h.refreshing,error:f,reload:w}}function Y(c){let{rootPath:t,repo:l,path:r,enabled:k,active:x,revisionKey:m=0}=c,f=`${O(t,l)}\x00${r??""}`,[g,s]=n({scope:f,data:null}),[h,b]=n(!1),[w,P]=n(null),W=i(0);return o(()=>{if(!k||!x||!r){s({scope:f,data:null}),P(null);return}let R=++W.current;b(!0);let N=H(t,l);N.set("path",r),fetch(`/api/wiki/page?${N.toString()}`).then(async(y)=>{let C=await y.json();if(!y.ok)throw Error(C?.error||`Page request failed (${y.status})`);return C}).then((y)=>{if(W.current!==R)return;s({scope:f,data:y}),P(null)}).catch((y)=>{if(W.current!==R)return;P(y instanceof Error?y.message:"Failed to load the page")}).finally(()=>{if(W.current===R)b(!1)})},[f,t,l,r,k,x,m]),{data:g.scope===f?g.data:null,isLoading:h,error:w}}function Z(c){let t=[];for(let l of c){if(!l.isMarkdown)continue;let r=t[t.length-1],k={label:l.title,target:l.path,path:l.path,url:null};if(r&&r.title===(l.folder||"Pages")){r.links.push(k);continue}t.push({title:l.folder||"Pages",links:[k],notes:[]})}return t}var oe={"no-remote":"This repository has no origin remote, so there is no wiki to find.","unsupported-remote":"The origin remote is not a URL a wiki can be derived from.","no-wiki":"This project has no wiki (or Kabmo cannot read it).",unreachable:"The wiki could not be reached."};function qe({className:c="",enabled:t=!0,active:l=!0,rootPath:r,refreshKey:k=0,layout:x="desktop"}){let m=x==="phone",{activeRepo:f,setActiveRepo:g}=xr(r),{repos:s,scanning:h,rescan:b}=wr(r,t),w=O(r,f),[P,W]=T("wiki.selectedPage",null),[R,N]=n(!1),[y,C]=n(!1),[ee,te]=n(0),v=Q({rootPath:r,repo:f,enabled:t,active:l,revisionKey:k}),A=v.data?.entries??[],M=u(()=>A.filter((L)=>L.isMarkdown),[A]),z=u(()=>v.data?.sidebar??Z(A),[v.data?.sidebar,A]),ie=u(()=>z.some((L)=>L.links.length>0),[z]),_=P&&P.scope===w?P.path:null,E=u(()=>{if(_&&M.some((F)=>F.path===_))return _;return(M.find((F)=>F.title.toLowerCase()==="home")??M[0])?.path??null},[_,M]),D=Y({rootPath:r,repo:f,path:E,enabled:t,active:l,revisionKey:ee});o(()=>{if(!E||E===_)return;W({scope:w,path:E})},[E,_,w,W]),o(()=>{N(!1),C(!1)},[w]);let q=(L)=>{if(W({scope:w,path:L}),!m)C(!0)},ne=()=>{v.reload({force:!0}),te((L)=>L+1)},S=v.data?.repo??null,I=v.data&&!S?v.data:null;if(!t)return e("div",{className:`flex h-full flex-col items-center justify-center bg-paper text-ink/40 ${c}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});return e("div",{className:`@container flex h-full min-h-0 w-full flex-col bg-paper text-xs text-ink ${c}`,children:[e(xt,{left:e(d,{children:[e(Tr,{rootPath:r,activeRepo:f,onSelectRepo:g,repos:s,scanning:h,onRefreshRepos:b}),S&&e("span",{className:"flex-shrink-0 rounded border border-ink/15 bg-ink/5 px-1.5 py-0.5 font-mono text-[10px] uppercase tracking-wider text-ink/60",title:`${S.host}/${S.slug} · ${S.revision.slice(0,8)}`,children:S.provider})]}),right:e(d,{children:[S?.webUrl&&e("a",{href:S.webUrl,target:"_blank",rel:"noopener noreferrer",title:"Open the wiki on its host","aria-label":"Open the wiki on its host",className:"rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink",children:e(Ie,{size:13})}),e(nt,{label:"Re-fetch the wiki",onClick:ne,busy:v.isLoading||v.refreshing,disabled:v.isLoading})]})}),v.error&&!v.data?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(B,{size:16,className:"text-error"}),e("p",{className:"text-error",children:v.error}),e("button",{type:"button",onClick:()=>v.reload(),className:"text-[11px] font-semibold text-ink/70 underline underline-offset-2 hover:text-ink",children:"Try again"})]}):!v.data?e("div",{className:"flex flex-1 items-center justify-center gap-2 text-ink/40",children:[e(p,{size:14,className:"animate-spin"}),e("span",{children:"Reading the wiki…"})]}):I?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(mn,{size:18,className:"text-ink/30"}),e("p",{className:"max-w-sm text-[11px] leading-relaxed text-ink/60",children:oe[I.reason??"no-wiki"]}),I.detail&&e("p",{className:"max-w-sm break-words font-mono text-[10px] text-ink/40",children:I.detail})]}):e("div",{className:"flex min-h-0 flex-1 flex-col @[520px]:flex-row-reverse",children:[e("div",{className:`${m?"hidden":y?"hidden @[520px]:flex":"flex"} min-h-0 w-full flex-col @[520px]:w-52 @[520px]:flex-shrink-0 @[520px]:border-l @[520px]:border-ink/10`,children:e(K,{sections:z,selected:E,onSelect:q})}),e("div",{className:`relative min-w-0 min-h-0 flex-1 ${m?"flex":y?"flex":"hidden @[520px]:flex"} flex-col`,children:[S&&E?e(G,{repo:S,entries:A,path:E,page:D.data,isLoading:D.isLoading,error:D.error,rootPath:r,repoScope:f,onNavigate:q,onBack:m?void 0:()=>C(!1)}):e("div",{className:"flex h-full items-center justify-center px-6 text-center text-[11px] text-ink/40",children:"This wiki has no markdown pages."}),m&&ie&&e(j,{open:R,onClick:()=>N(!0)}),e(V,{open:R,sections:z,selected:E,onSelect:q,onClose:()=>N(!1)})]})]})]})}export{qe as WikiPanel};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n,o,s,N}from"./index-nr5gwny1.js";import{Wr,ql,fg,gg,HA,Xu}from"./index-k57bandz.js";var ap="omp:editor-theme-changed";function a(){if(typeof window>"u")return ql;return N("editorTheme")??ql}var p={theme:null,vars:{},themes:gg(null)};function Li(){let[e,t]=n(a);if(o(()=>{let i=(d)=>{let E=d.detail;t(E||a())};return window.addEventListener(ap,i),()=>window.removeEventListener(ap,i)},[]),o(()=>{Xu(e)},[e]),e===Wr)return p;let r=fg(e);return{theme:r,vars:HA(r),themes:gg(e)}}var m={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]},ht=s(m);var op="omp:editor-indent-changed",ip=[2,4,8],Qu={width:2,insertSpaces:!0};function sp(){if(typeof window>"u")return Qu;let e=N("editorIndentWidth"),t=N("editorInsertSpaces");return{width:typeof e==="number"&&ip.includes(e)?e:Qu.width,insertSpaces:typeof t==="boolean"?t:Qu.insertSpaces}}function Ru(e){return e.insertSpaces?" ".repeat(e.width):"\t"}function Lu(){let[e,t]=n(sp);return o(()=>{let r=(i)=>{let d=i.detail;t(d??sp())};return window.addEventListener(op,r),()=>window.removeEventListener(op,r)},[]),e}var lp="omp:editor-typing-changed",Ul={autoCloseBrackets:!0,autocomplete:!0};function Fu(){if(typeof window>"u")return Ul;let e=N("editorAutoCloseBrackets"),t=N("editorAutocomplete");return{autoCloseBrackets:typeof e==="boolean"?e:Ul.autoCloseBrackets,autocomplete:typeof t==="boolean"?t:Ul.autocomplete}}function Mu(){let[e,t]=n(Fu);return o(()=>{let r=(i)=>{let d=i.detail;t(d??Fu())};return window.addEventListener(lp,r),()=>window.removeEventListener(lp,r)},[]),e}var Ps="omp:editor-blame-changed",Gl={enabled:!0,inline:!1};function Fi(){if(typeof window>"u")return Gl;let e=N("editorBlame"),t=N("editorBlameInline");return{enabled:typeof e==="boolean"?e:Gl.enabled,inline:typeof t==="boolean"?t:Gl.inline}}function cp(){let[e,t]=n(Fi);return o(()=>{let r=(i)=>{let d=i.detail;t(d??Fi())};return window.addEventListener(Ps,r),()=>window.removeEventListener(Ps,r)},[]),e}
|
|
2
|
-
export{ht,ap,Li,op,ip,Qu,sp,Ru,Lu,lp,Ul,Fu,Mu,Ps,Gl,Fi,cp};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d,n,o,i,u,a,e,s,p,I,ra,rs,f,ae,en,de,S,U,Lo,Nm,X,Bt,eA,Mm,Sd}from"./index-nr5gwny1.js";var q={name:"folder-git-2",size:24,node:[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]},wm=s(q);function O({row:t,active:r,name:l,loading:h,onSelect:c,onCopyPath:g,onReveal:N}){return e("div",{className:"grid grid-cols-[1rem_minmax(0,1fr)_3.5rem] items-start gap-x-2 px-4 py-2 border-b border-ink/5 last:border-b-0 hover:bg-ink/[0.02] group/row transition-colors",children:[e("div",{className:"h-5 flex items-center justify-center",children:r&&e(f,{size:12,className:"text-ink","aria-label":"Selected repository"})}),e("button",{type:"button",onClick:c,disabled:r||!t.isRepo,title:!t.isRepo?t.error??"Not a git repository":r?"Already showing this repository":`Show ${t.path}`,className:"min-w-0 text-left cursor-pointer disabled:cursor-default",children:e("div",{className:"h-5 flex items-center gap-1.5 min-w-0",children:[e(de,{size:11,className:r?"text-ink/60 flex-shrink-0":"text-ink/40 flex-shrink-0"}),e("span",{className:`truncate text-xs ${r?"font-semibold text-ink":"text-ink/90"}`,children:l})]})}),e("div",{className:"h-5 flex items-center justify-end gap-0.5 touch-visible opacity-0 group-hover/row:opacity-100",children:[e("button",{type:"button",onClick:g,disabled:h,title:`Copy the absolute path of ${t.path}`,"aria-label":`Copy path of ${t.path}`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors disabled:opacity-30 disabled:cursor-default",children:e(ae,{size:11})}),e("button",{type:"button",onClick:N,title:`Reveal ${t.path} in the file manager`,"aria-label":`Reveal ${t.path}`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(en,{size:11})})]}),e("div",{className:"col-start-2 col-span-2 flex flex-wrap items-center gap-x-2 gap-y-0.5 min-w-0 mt-0.5",children:[t.isRepo?e(d,{children:[e("span",{className:`text-[10px] font-mono truncate ${t.detached?"text-warning":"text-ink/50"}`,title:t.detached?`Detached HEAD at ${t.branch}`:`On branch ${t.branch}`,children:t.branch}),e("span",{className:"text-[10px] text-ink/25","aria-hidden":!0,children:"·"}),e(Q,{row:t})]}):e("span",{className:"text-[10px] text-ink/40 truncate",children:t.error??"Not a git repository"}),t.isRepo&&t.subject&&e(d,{children:[e("span",{className:"text-[10px] text-ink/25","aria-hidden":!0,children:"·"}),e("span",{className:"text-[10px] text-ink/40 truncate min-w-0",title:t.subject,children:t.subject})]})]})]})}function Q({row:t}){let r=[];if(t.operation)r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:t.operation==="stash-pop"?`A stash pop stopped on ${t.conflicts} conflict(s)`:`A ${Lo[t.operation]} is in progress, stopped on ${t.conflicts} conflict(s)`,children:[e(I,{size:9}),Lo[t.operation]]},"operation"));else if(t.conflicts>0)r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:`${t.conflicts} conflicted path(s)`,children:[e(I,{size:9}),t.conflicts]},"conflicts"));if(t.changed>0||t.untracked>0)r.push(e("span",{className:"flex-shrink-0 rounded border border-info/30 px-1 text-[10px] font-mono tabular-nums text-info",title:`${t.changed} changed, ${t.untracked} untracked`,children:[t.changed>0?`${t.changed}±`:"",t.changed>0&&t.untracked>0?" ":"",t.untracked>0?`${t.untracked}?`:""]},"dirty"));if(t.gone)r.push(e("span",{className:"flex-shrink-0 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:`${t.upstream} no longer exists on the remote — fetch --prune to drop it`,children:"gone"},"gone"));else if(t.upstream&&(t.ahead>0||t.behind>0))r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 text-[10px] font-mono tabular-nums text-ink/60",title:`${t.ahead} ahead of, ${t.behind} behind ${t.upstream}`,children:[t.ahead>0&&e("span",{className:"flex items-center",children:[e(rs,{size:9}),t.ahead]}),t.behind>0&&e("span",{className:"flex items-center",children:[e(ra,{size:9}),t.behind]})]},"track"));if(r.length===0)return e("span",{className:"text-[10px] font-mono text-ink/30",title:"Nothing to report: clean and in sync",children:"clean, in sync"});return e(d,{children:r})}function H(t){let{open:r,rootPath:l,scanning:h}=t,[c,g]=n([]),[N,k]=n(!1),[C,A]=n(!1),[z,y]=n(null),[D,E]=n(0),j=t.repos.join("\x00"),G=i(!0),b=i(null);o(()=>(G.current=!0,()=>{G.current=!1,b.current?.abort(),b.current=null}),[]);let M=a(async()=>{b.current?.abort();let v=new AbortController;b.current=v,A(!0),k(!0);try{let R=new URLSearchParams({repoDetails:"1"});if(l)R.set("root",l);let w=await fetch(`/api/fs/git?${R.toString()}`,{signal:v.signal}),F=await w.json();if(!G.current||b.current!==v)return;if(!w.ok||!Array.isArray(F.details)){y(F.error||`Failed to read repositories (HTTP ${w.status})`);return}g(F.details),y(null)}catch(R){if(!G.current||b.current!==v)return;if(R instanceof Error&&R.name==="AbortError")return;y(R instanceof Error?R.message:"Failed to read repositories")}finally{if(G.current&&b.current===v)b.current=null,A(!1),k(!1)}},[l]);o(()=>{if(!r){g([]),y(null),k(!1);return}M()},[r,M,j,h,D]);let L=a(()=>E((v)=>v+1),[]);return{details:c,loading:N,reading:C,error:z,refresh:L}}function B(t){let r=new Map;for(let l of t){if(!l||l==="."){if(!r.has(""))r.set("",{key:"",label:null,paths:[]});r.get("").paths.push(".");continue}let h=l.indexOf("/"),c=h===-1?"":l.slice(0,h),g=r.get(c);if(!g)g={key:c,label:c===""?null:c,paths:[]},r.set(c,g);g.paths.push(l)}for(let l of r.values())l.paths.sort((h,c)=>h==="."?-1:c==="."?1:h.localeCompare(c));return[...r.values()].sort((l,h)=>{if(l.key==="")return-1;if(h.key==="")return 1;return l.key.localeCompare(h.key)})}function _(t,r){if(t===".")return"workspace root";if(r==="")return t;return t.slice(r.length+1)}function W({isOpen:t,rootPath:r,activeRepo:l,repos:h,scanning:c,onSelectRepo:g,onRefreshRepos:N,onClose:k}){let[C,A]=n(""),[z,y]=n(null),{details:D,loading:E,reading:j,error:G,refresh:b}=H({open:t,rootPath:r,repos:h,scanning:c});o(()=>{if(!t)A(""),y(null)},[t]);let M=u(()=>{let x=C.trim().toLowerCase();if(!x)return D;return D.filter((m)=>m.path.toLowerCase().includes(x))},[D,C]),L=u(()=>B(M.map((x)=>x.path)),[M]),v=u(()=>{let x=new Map;for(let m of D)x.set(m.path,m);return x},[D]),R=a(()=>{N(),b()},[N,b]),w=a(async(x)=>{let m=r?Sd(r,x==="."?"":x):x,P=await Bt(m);y(P?{text:`Copied ${m}`,kind:"success"}:{text:"Clipboard unavailable",kind:"error"})},[r]),F=a(async(x)=>{let m=new FormData;if(m.append("actionType","open_explorer"),m.append("path","."),m.append("repo",x),r)m.append("root",r);try{let P=await fetch("/api/fs/action",{method:"POST",body:m}),T=await P.json();if(!P.ok||T.error)y({text:T.error||"Could not open the file manager",kind:"error"})}catch{y({text:"Could not open the file manager",kind:"error"})}},[r]);if(!t)return null;return e(X,{onClose:k,maxWidthClass:"max-w-[min(96vw,720px)]",header:e("div",{className:"flex items-center gap-2 min-w-0",children:[e(wm,{size:14,className:"text-ink/60 flex-shrink-0"}),e("h2",{className:"text-sm font-semibold text-ink",children:"Repositories"}),e("span",{className:"text-[10px] font-mono text-ink/50 truncate",children:[h.length," in this workspace"]})]}),children:[e("div",{className:"px-5 py-3 flex items-center gap-2 border-b border-ink/10",children:[e(U,{size:12,className:"text-ink/40 flex-shrink-0"}),e("input",{type:"text",value:C,onChange:(x)=>A(x.currentTarget.value),placeholder:"Filter repositories…","aria-label":"Filter repositories",className:"flex-1 min-w-0 bg-transparent outline-none text-xs text-ink placeholder-ink/40",autoFocus:!0}),e("button",{type:"button",onClick:R,disabled:j||c,title:"Re-discover repositories and re-read their state","aria-label":"Refresh repositories",className:"text-ink/40 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 flex-shrink-0",children:e(S,{size:12,className:j||c?"animate-spin":""})})]}),c&&e("div",{className:"px-5 py-1.5 border-b border-ink/10 text-[10px] font-mono text-ink/50 flex items-center gap-1.5",children:[e(p,{size:10,className:"animate-spin"}),"Still discovering repositories in this workspace…"]}),z&&e("div",{className:`px-5 py-1.5 border-b border-ink/10 text-[10px] font-mono truncate ${z.kind==="error"?"text-error":"text-ink/60"}`,title:z.text,role:"status",children:z.text}),e("div",{className:"min-h-[40vh] max-h-[60vh] overflow-y-auto scrollbar-overlay-container",children:E&&D.length===0?e("div",{className:"flex items-center justify-center gap-2 py-12 text-xs text-ink/50 font-mono",children:[e(p,{size:14,className:"animate-spin text-info"}),"Reading repositories…"]}):G?e("div",{className:"py-12 px-6 text-center text-xs text-error font-mono",children:G}):M.length===0?e("div",{className:"py-12 text-center text-xs text-ink/40 font-mono",children:C.trim()?"No matching repositories.":"No repositories in this workspace."}):L.map((x)=>e("div",{children:[e("div",{className:"px-4 py-1 text-[10px] uppercase tracking-wider text-ink/40 font-semibold bg-canvas/40 border-b border-ink/5 sticky top-0",children:x.label??eA(".",r)}),x.paths.map((m)=>{let P=v.get(m);if(!P)return null;return e(O,{row:P,active:m===l,name:_(m,x.key),loading:j,onSelect:()=>{g(m),k()},onCopyPath:()=>void w(m),onReveal:()=>void F(m)},m)})]},x.key))})]})}function Tr({rootPath:t,activeRepo:r,onSelectRepo:l,repos:h,scanning:c,onRefreshRepos:g}){let[N,k]=n(!1),C=u(()=>({root:t??null,repo:r,rows:Mm(t,h),scanning:c,ready:!0,setRepo:l,refresh:g}),[t,r,h,c,l,g]),A=a(()=>k(!0),[]);return e("div",{className:"relative min-w-0",children:[e(Nm,{scope:C,onManage:A}),e(W,{isOpen:N,rootPath:t,activeRepo:r,repos:h,scanning:c,onSelectRepo:l,onRefreshRepos:g,onClose:()=>k(!1)})]})}
|
|
2
|
-
export{wm,Tr};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{zn,Ao,fp,Pi,ri,Xs,Ku,el,dg,Vu,gp,Ap,hp,bp,NA,tl,Yu,QA,Ju,Er,RA}from"./index-6m5n8b6w.js";import"./index-e4yj4kbe.js";export{el as IndentContext,RA as StreamLanguage,Ju as bracketMatching,tl as codeFolding,hp as foldAll,gp as foldCode,Yu as foldGutter,NA as foldKeymap,Vu as foldService,ri as getIndentUnit,Ku as getIndentation,QA as highlightingFor,dg as indentOnInput,fp as indentService,Xs as indentString,Pi as indentUnit,Ao as language,Er as matchBrackets,zn as syntaxTree,bp as unfoldAll,Ap as unfoldCode};
|