@kabmo-labs/kabmo 0.50.0 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +503 -501
- package/dist/client/static/js/{Body-pd3nt4xa.js → Body-s3nh6vet.js} +3 -3
- package/dist/client/static/js/{CsvGrid-eksmqv8f.js → CsvGrid-j4h6cpnn.js} +2 -2
- package/dist/client/static/js/{DocxView-xfx1kt8x.js → DocxView-197x16zq.js} +3 -3
- package/dist/client/static/js/{DrawioView-2xyqg9bv.js → DrawioView-v6ps0cm5.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-ps3f0aa5.js → HtmlPreview-a2t5zngp.js} +1 -1
- package/dist/client/static/js/ImageView-ar7hz7jx.js +1 -0
- package/dist/client/static/js/LayoutWrapper-epef152a.js +2 -0
- package/dist/client/static/js/MergeDiffView-7rwjvzk5.js +1 -0
- package/dist/client/static/js/Modal-9nxt67fm.js +60 -0
- package/dist/client/static/js/{PdfView-8fp08jym.js → PdfView-gzhcym20.js} +1 -1
- package/dist/client/static/js/SessionsView-3h872gpe.js +1 -0
- package/dist/client/static/js/{SheetView-g7mstjdp.js → SheetView-baaynkb4.js} +8 -8
- package/dist/client/static/js/{SvgPreview-wsv4h6c6.js → SvgPreview-jzcqwwcc.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-1kgm1049.js → abnfDiagram-O67JEVCF-grb1sfhr.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-3hkq8grc.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-mtm210rw.js → architectureDiagram-NJMV4G6O-9084jzwr.js} +5 -5
- package/dist/client/static/js/{astro-dszrfwwn.js → astro-m3fcq2sa.js} +1 -1
- package/dist/client/static/js/bash-n7wcmq3s.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-s474vn2w.js → blockDiagram-BEXU5L5S-qqcjrg1b.js} +6 -6
- package/dist/client/static/js/c-ypdp030b.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-s68v6tc8.js → c4Diagram-YGBWAQC7-gc8fqbpc.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-291va3yk.js → classDiagram-v2-NBCMYWYE-pp6060kq.js} +7 -7
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-0zg7crdw.js → cose-bilkent-JH36ORCC-744ekavk.js} +1 -1
- package/dist/client/static/js/cpp-cxwev3gs.js +1 -0
- package/dist/client/static/js/css-6mxcqf8c.js +1 -0
- package/dist/client/static/js/css-9gak6bze.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-9m18e6m5.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-4gnmn3yc.js → cynefinDiagram-VND7K2PF-57dja6g9.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-nxmj6bkg.js → dagre-6A5THRUB-de4xrbrw.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-3171dabw.js → diagram-22UHCM2B-ky3ncyv8.js} +18 -18
- package/dist/client/static/js/{diagram-3UASUU5V-9h1pd6h8.js → diagram-3UASUU5V-zgg82bz9.js} +2 -2
- package/dist/client/static/js/{diagram-ATOU4E4O-ywfrbd6m.js → diagram-ATOU4E4O-r4s13e4n.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-t87b4wbk.js → diagram-CDSNMT55-my21t0kq.js} +5 -5
- package/dist/client/static/js/{diagram-MLGK6HIB-bzv52p97.js → diagram-MLGK6HIB-pvt20jtj.js} +2 -2
- package/dist/client/static/js/{diagram-MPIPVDR6-8f66rp0a.js → diagram-MPIPVDR6-as9dk4f3.js} +2 -2
- package/dist/client/static/js/{dockerfile-z3v0km9v.js → dockerfile-3b5caedj.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-3y4w2j6t.js → ebnfDiagram-ZINNZB2B-tj3hkcj4.js} +1 -1
- package/dist/client/static/js/{elixir-c701n0qg.js → elixir-7q2k61zb.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-d9d23jch.js → elk-276RUBZZ-5e7wczf3.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-w4z3501c.js → erDiagram-OPXOYQCR-5jje7qrh.js} +3 -3
- package/dist/client/static/js/{erlang-cpw5s1f9.js → erlang-tjsd7n4d.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-d4egnv9v.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-pdeqndnd.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-7wcxk4bm.js → ganttDiagram-FUAMR5RP-7hresycc.js} +4 -4
- package/dist/client/static/js/gitGraph-4MIJSDKK-grqv890n.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-sdh1hsb1.js → gitGraphDiagram-X574FWY7-8m202jb7.js} +17 -17
- package/dist/client/static/js/graphql-6rwdfcnf.js +1 -0
- package/dist/client/static/js/html-p76eszt9.js +1 -0
- package/dist/client/static/js/{index-zhnfq8br.js → index-0prwdwyb.js} +2 -2
- package/dist/client/static/js/{index-tew3rd6t.js → index-0y6tstk8.js} +1 -1
- package/dist/client/static/js/{index-1dx4dqzy.js → index-20hj80g4.js} +4 -4
- package/dist/client/static/js/index-21421tq7.js +2 -0
- package/dist/client/static/js/{index-0q39ajgh.js → index-254387vg.js} +2 -2
- package/dist/client/static/js/index-2y4gk5q5.js +2 -0
- package/dist/client/static/js/index-3fk8grhz.js +2 -0
- package/dist/client/static/js/index-3rrdmk9m.js +2 -0
- package/dist/client/static/js/{index-frhxbqhg.js → index-3sz9cztk.js} +1 -1
- package/dist/client/static/js/{index-9ydvkxz1.css → index-4m2d73m3.css} +1 -1
- package/dist/client/static/js/{index-7xn7gxgw.js → index-4nvcwtvr.js} +2 -2
- package/dist/client/static/js/index-4ppap7vb.js +9 -0
- package/dist/client/static/js/{index-vgwjn4de.js → index-4tbdws4r.js} +2 -2
- package/dist/client/static/js/{index-hqhz4eam.js → index-56hy2hcy.js} +1 -1
- package/dist/client/static/js/{index-dgkpbrdr.js → index-60g0e74a.js} +2 -2
- package/dist/client/static/js/{index-n54jd3aw.js → index-7ag37ghj.js} +11 -11
- package/dist/client/static/js/{index-bggz63br.js → index-7ehcjb3r.js} +7 -7
- package/dist/client/static/js/index-899yw6fh.js +2 -0
- package/dist/client/static/js/{index-4vaxdt8a.js → index-8pqx5n2p.js} +2 -2
- package/dist/client/static/js/{index-971stdh4.js → index-91jm3ywm.js} +2 -2
- package/dist/client/static/js/{index-5qwgexg6.js → index-9qf2h9jb.js} +4 -4
- package/dist/client/static/js/{index-wbma8kqw.js → index-9rp7h1nv.js} +23 -23
- package/dist/client/static/js/index-9rr23e0e.js +2 -0
- package/dist/client/static/js/index-9wj4ma9g.js +3 -0
- package/dist/client/static/js/{index-e471eprg.js → index-awtk0djy.js} +1 -1
- package/dist/client/static/js/{index-1d8v3bvm.js → index-awz6pyd0.js} +2 -2
- package/dist/client/static/js/index-cvx1vkrx.js +1 -0
- package/dist/client/static/js/{index-09ap9ncj.js → index-cwwg7k5f.js} +46 -46
- package/dist/client/static/js/{index-8fk7h2me.js → index-dzatbdws.js} +5 -5
- package/dist/client/static/js/{index-1adfks1n.js → index-e6ew77ph.js} +2 -2
- package/dist/client/static/js/{index-144aknp3.js → index-ej1va073.js} +2 -2
- package/dist/client/static/js/{index-cm8pa783.js → index-er7pj5k6.js} +2 -2
- package/dist/client/static/js/index-fm0t4pct.js +4 -0
- package/dist/client/static/js/{index-aqqj4xxy.js → index-g5wp6ksw.js} +2 -2
- package/dist/client/static/js/{index-ajqmcds5.js → index-gy4mtr2e.js} +2 -2
- package/dist/client/static/js/{index-kce86cnw.js → index-j9y4tjk0.js} +2 -2
- package/dist/client/static/js/{index-gws4prmg.js → index-kt7c42n7.js} +2 -2
- package/dist/client/static/js/index-ktmb341a.js +468 -0
- package/dist/client/static/js/{index-56319bht.js → index-m6zncj00.js} +2 -2
- package/dist/client/static/js/{index-jxxewcat.js → index-mpyd7qxj.js} +2 -2
- package/dist/client/static/js/{index-gcgsjd3c.js → index-ms80nne4.js} +2 -2
- package/dist/client/static/js/{index-k66w6d9b.js → index-my856e49.js} +2 -2
- package/dist/client/static/js/{index-c2mqr5fh.js → index-nt17ejrm.js} +2 -2
- package/dist/client/static/js/{index-zsx5vs3j.js → index-pvv340b4.js} +2 -2
- package/dist/client/static/js/{index-svx6rnfs.js → index-pxr36neg.js} +2 -2
- package/dist/client/static/js/{index-r2z0a118.js → index-q0k1am0g.js} +2 -2
- package/dist/client/static/js/{index-xrn2reb5.js → index-qrpx4sk1.js} +2 -2
- package/dist/client/static/js/{index-ajdzvegm.js → index-r2zsw7nw.js} +8 -8
- package/dist/client/static/js/{index-xgbcn89g.js → index-rbkvw2xs.js} +2 -2
- package/dist/client/static/js/{index-2g1ey1c9.js → index-scmtzcv1.js} +2 -2
- package/dist/client/static/js/{index-3rhk4apq.js → index-syvkpnc8.js} +1 -1
- package/dist/client/static/js/index-tfqqsj2g.js +1 -0
- package/dist/client/static/js/{index-7jdz4jr4.js → index-tj7xr4ta.js} +2 -2
- package/dist/client/static/js/{index-1vfej0gk.js → index-wvw70pgd.js} +2 -2
- package/dist/client/static/js/{index-qxzyvye9.js → index-wxs0x3g1.js} +2 -2
- package/dist/client/static/js/index-x507ndnc.js +314 -0
- package/dist/client/static/js/{index-1jx4nt2f.js → index-x87scjpa.js} +1 -1
- package/dist/client/static/js/{index-grkacfv3.js → index-xtrsvm0d.js} +2 -2
- package/dist/client/static/js/{index-ratbr10x.js → index-y1j18rha.js} +2 -2
- package/dist/client/static/js/{index-r6bm9sth.js → index-yv2ervdj.js} +7 -7
- package/dist/client/static/js/{index-k3vvk28c.js → index-z2pmt1bc.js} +1 -1
- package/dist/client/static/js/{index-ap6hv7s7.js → index-z446edg9.js} +1 -1
- package/dist/client/static/js/{index-1ec33b1j.js → index-zkgqa0c2.js} +2 -2
- package/dist/client/static/js/index-zwbw177x.js +2 -0
- package/dist/client/static/js/info-A6RAGUB7-rzpg7qk1.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-gtdp0z6p.js → infoDiagram-VRGFBTTK-5mb5w005.js} +2 -2
- package/dist/client/static/js/ini-kjcpgebh.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-c05m0sqq.js → ishikawaDiagram-OU5B5YK6-zk7fa0fm.js} +3 -3
- package/dist/client/static/js/java-0bcyv1jt.js +1 -0
- package/dist/client/static/js/javascript-0mqgcvps.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-kgk5ygm2.js → journeyDiagram-ZHPQQLJL-8jd7b2aw.js} +5 -5
- package/dist/client/static/js/json-mb8k0b1n.js +1 -0
- package/dist/client/static/js/jsx-8p6dqgpq.js +1 -0
- package/dist/client/static/js/{julia-w13bz4s1.js → julia-nwh5w343.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-q1w9w68s.js → kanban-definition-PNTS6WVX-yp9rks4k.js} +7 -7
- package/dist/client/static/js/lua-nxnqww9z.js +1 -0
- package/dist/client/static/js/markdown-8gbyxxjd.js +1 -0
- package/dist/client/static/js/{mermaid.core-1rz62j9g.js → mermaid.core-kxsxr8ec.js} +9 -9
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-3m3w6bnb.js → mindmap-definition-NLK3R4M7-anx2kj3b.js} +5 -5
- package/dist/client/static/js/one-dark-pro-wyegjr0d.js +1 -0
- package/dist/client/static/js/one-light-kp6c3eqh.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-eac14hsq.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-svd3ex4e.js → pegDiagram-GJSIUBJH-9egqyzkc.js} +1 -1
- package/dist/client/static/js/{perl-hcg3hacf.js → perl-wb4wtc9x.js} +1 -1
- package/dist/client/static/js/{php-q6hhp84p.js → php-9g594k9f.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-a9xqvysf.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-2nrkw034.js → pieDiagram-5QR66LMP-f3dvprbm.js} +3 -3
- package/dist/client/static/js/properties-d5bwhgwz.js +1 -0
- package/dist/client/static/js/python-fdwwjjhh.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-4895d1aq.js → quadrantDiagram-O4NWA36T-qsghd295.js} +6 -6
- package/dist/client/static/js/r-4d2ygtfj.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-jv2pm0fe.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-j74sc0b6.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-eaf19baz.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-d4j5nq31.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-ba862a9p.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-zj3g9yne.js → railroadDiagram-XR7U4H2S-6vmazht2.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-727yjvs8.js → requirementDiagram-PLB6GJNP-phs0wn1v.js} +5 -5
- package/dist/client/static/js/{ruby-wzqz8vw6.js → ruby-c4hxsegh.js} +1 -1
- package/dist/client/static/js/{rust-r94pgqvf.js → rust-e4whdswc.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-17c7p2pe.js → sankeyDiagram-IPEJSGJF-vkktegjk.js} +4 -4
- package/dist/client/static/js/{sass-xb3van7h.js → sass-6yxywx7t.js} +1 -1
- package/dist/client/static/js/{scss-ddg6t3x4.js → scss-9wz47c6t.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-wcmbpckr.js → sequenceDiagram-PO4LG4MO-37e6se72.js} +16 -16
- package/dist/client/static/js/{sizeCapture-INFHLROL-nkr57cd6.js → sizeCapture-INFHLROL-3b4nsa4s.js} +1 -1
- package/dist/client/static/js/sql-sd00wgem.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-vd7r8s78.js → stateDiagram-v2-GCMORJYK-2nnyqs9x.js} +3 -3
- package/dist/client/static/js/{svelte-wzaxz546.js → svelte-mm3jfpje.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-zhxm05ak.js → swimlanes-2SLR337P-eezd46ps.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-h78096xp.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-n7gbzhzd.js → timeline-definition-EJHVYXUP-pz0f2b4h.js} +6 -6
- package/dist/client/static/js/treeView-Q6P3EWNA-e8yb44pd.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-zvdv84vp.js +1 -0
- package/dist/client/static/js/typescript-5txwpd9t.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-davsnwkf.js → usecaseDiagram-POWQR4AR-hvg7a87b.js} +29 -29
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-gb54bh5k.js → vennDiagram-UO4OBE2U-03zh9phs.js} +8 -8
- package/dist/client/static/js/{vue-6zhfw7zx.js → vue-rcdqpz7q.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-hbv0cg4s.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-sf98cg9t.js → wardleyDiagram-VNRHLVJA-xy77th92.js} +5 -5
- package/dist/client/static/js/xml-vtrdnrn6.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-9nn09k40.js → xychartDiagram-PMCCYNJV-h48448cm.js} +4 -4
- package/dist/client/static/js/yaml-6k1tmwtm.js +1 -0
- package/package.json +2 -1
- package/src/client/components/common/MarkdownRenderer.tsx +31 -34
- package/src/client/components/common/ViewportSelector.tsx +4 -0
- package/src/client/components/common/command-palette/index.tsx +5 -2
- package/src/client/components/common/markdown-inline-file.test.tsx +131 -0
- package/src/client/components/common/search-select/OptionList.tsx +164 -0
- package/src/client/components/common/search-select/index.tsx +159 -136
- package/src/client/components/common/search-select/option.ts +16 -0
- package/src/client/components/common/search-select/search-select.test.tsx +61 -2
- package/src/client/components/common/sort-menu/index.tsx +9 -4
- package/src/client/components/layout/session-sidebar/HarnessFilter.tsx +26 -6
- package/src/client/components/layout/session-sidebar/scheduler-modal/ModelFields.tsx +45 -49
- package/src/client/components/layout/session-sidebar/scheduler-modal/TaskForm.tsx +31 -25
- package/src/client/components/settings/ProjectSelectorDropdown.tsx +40 -101
- package/src/client/components/settings/categories/agent-settings/DetailPane.tsx +12 -10
- package/src/client/components/settings/categories/command-settings/DetailPane.tsx +12 -10
- package/src/client/components/settings/categories/dictation-settings/CaptureSection.tsx +13 -18
- package/src/client/components/settings/categories/git-settings/CommitMessageSection.tsx +8 -9
- package/src/client/components/settings/categories/keyboard-settings/ComposerKeys.tsx +10 -10
- package/src/client/components/settings/categories/mcp-settings/AdvancedSection.tsx +21 -18
- package/src/client/components/settings/categories/mcp-settings/DetailPane.tsx +12 -7
- package/src/client/components/settings/categories/omp-settings/PresetBar.tsx +11 -11
- package/src/client/components/settings/categories/omp-settings/RoleEditor.test.ts +14 -11
- package/src/client/components/settings/categories/omp-settings/RowEditor.tsx +17 -16
- package/src/client/components/settings/categories/plugin-settings/MarketplacePane.tsx +11 -9
- package/src/client/components/settings/categories/plugin-settings/SettingsSection.tsx +10 -9
- package/src/client/components/settings/categories/provider-settings/AddModelModal.tsx +10 -8
- package/src/client/components/settings/categories/provider-settings/DialectFields.tsx +40 -24
- package/src/client/components/settings/categories/provider-settings/EntryAdvanced.tsx +13 -9
- package/src/client/components/settings/categories/provider-settings/EntryModal.tsx +22 -17
- package/src/client/components/settings/categories/provider-settings/PresetPicker.tsx +79 -50
- package/src/client/components/settings/categories/provider-settings/model-dialogs.test.tsx +14 -7
- package/src/client/components/settings/categories/voice-settings/SpeechSettings.test.tsx +117 -15
- package/src/client/components/settings/categories/voice-settings/SpeechSettings.tsx +27 -3
- package/src/client/components/settings/categories/voice-settings/speech/EndpointSection.tsx +3 -1
- package/src/client/components/settings/categories/voice-settings/speech/EngineSection.tsx +32 -2
- package/src/client/components/settings/categories/voice-settings/speech/ModelsSection.tsx +277 -0
- package/src/client/components/settings/categories/voice-settings/speech/TestSection.tsx +2 -1
- package/src/client/components/settings/categories/voice-settings/speech/VoiceSection.tsx +83 -41
- package/src/client/components/workspace/btw-panel/TopicMenu.tsx +20 -2
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.speech.test.tsx +35 -6
- package/src/client/components/workspace/chat-timeline/SpeechButton.tsx +111 -36
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +21 -6
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +7 -4
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +22 -6
- package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.tsx +17 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/index.tsx +8 -65
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Proc.test.ts +12 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/registry.test.ts +35 -218
- package/src/client/components/workspace/chat-timeline/tool-renderers/registry.ts +40 -177
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/DiffView.test.ts +13 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/FallbackToolJson.test.tsx +79 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/FallbackToolJson.tsx +86 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolBody.tsx +25 -16
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/card-header.test.ts +4 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/tool-view.ts +11 -4
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Card.plugin.test.ts +3 -1
- package/src/client/components/workspace/file-explorer/ArchiveModals.tsx +15 -15
- package/src/client/components/workspace/git-panel/BranchToolbar.tsx +30 -5
- package/src/client/data/mock/chat.ts +17 -0
- package/src/client/data/samples/tools-session.ts +8 -5
- package/src/client/hooks/editor/font.test.ts +21 -0
- package/src/client/hooks/editor/font.ts +12 -9
- package/src/client/hooks/settings/local-tts-models.ts +164 -0
- package/src/client/hooks/tts/tts-context.ts +6 -0
- package/src/client/hooks/tts/use-tts-player.ts +10 -0
- package/src/client/hooks/ui/markdown-render.ts +9 -1
- package/src/client/hooks/ui/markdown-scoped-links.ts +77 -0
- package/src/client/hooks/ui/open-inline-file.test.ts +144 -0
- package/src/client/hooks/ui/open-inline-file.ts +71 -0
- package/src/client/lib/commands/overlays.ts +16 -2
- package/src/client/lib/tts/player.test.ts +61 -0
- package/src/client/lib/tts/player.ts +120 -41
- package/src/client/tailwind.css +16 -0
- package/src/server/lib/chat/normalize-tools.server.test.ts +79 -0
- package/src/server/lib/chat/normalize-tools.server.ts +87 -0
- package/src/server/lib/harness/acp/background-replay.test.ts +36 -0
- package/src/server/lib/harness/acp/background-replay.ts +8 -3
- package/src/server/lib/harness/acp/frames-tool-shapes.test.ts +41 -13
- package/src/server/lib/harness/acp/frames-vendor-names.test.ts +209 -0
- package/src/server/lib/harness/acp/frames.test.ts +11 -20
- package/src/server/lib/harness/acp/frames.ts +5 -3
- package/src/server/lib/harness/acp/mapper.ts +5 -41
- package/src/server/lib/harness/acp/replay-transcript.ts +6 -1
- package/src/server/lib/harness/acp/subagent-frames.test.ts +1 -1
- package/src/server/lib/harness/acp/subagent-frames.ts +0 -2
- package/src/server/lib/harness/acp/tool-calls.ts +5 -16
- package/src/server/lib/harness/acp/tool-identity.test.ts +69 -8
- package/src/server/lib/harness/acp/tool-identity.ts +58 -10
- package/src/server/lib/harness/acp/tool-shape.ts +5 -3
- package/src/server/lib/harness/codex/transcript.server.test.ts +3 -1
- package/src/server/lib/harness/codex/transcript.server.ts +8 -15
- package/src/server/lib/lifecycle/paths.ts +12 -0
- package/src/server/lib/omp/session/messages.ts +5 -1
- package/src/server/lib/realtime/topics/peer-relay.server.ts +9 -1
- package/src/server/lib/realtime/topics/session.server.ts +5 -1
- package/src/server/lib/tts/engines/adapters.test.ts +17 -8
- package/src/server/lib/tts/engines/deepgram.ts +30 -9
- package/src/server/lib/tts/engines/index.ts +11 -0
- package/src/server/lib/tts/engines/local.ts +53 -0
- package/src/server/lib/tts/engines/sherpa-onnx-node.d.ts +38 -0
- package/src/server/lib/tts/engines/sherpa.test.ts +53 -0
- package/src/server/lib/tts/engines/sherpa.ts +287 -0
- package/src/server/lib/tts/local-models.server.ts +257 -0
- package/src/server/lib/tts/local-request.test.ts +66 -0
- package/src/server/lib/tts/local-request.ts +59 -0
- package/src/server/lib/tts/model-manifest.server.test.ts +71 -0
- package/src/server/lib/tts/model-manifest.server.ts +154 -0
- package/src/server/lib/tts/settings.server.ts +7 -4
- package/src/server/lib/tts/wav.test.ts +37 -0
- package/src/server/lib/tts/wav.ts +43 -0
- package/src/server/routes/chat/session-legacy-tools.test.ts +132 -0
- package/src/server/routes/chat/session.ts +10 -4
- package/src/server/routes/tts/index.ts +2 -0
- package/src/server/routes/tts/models.test.ts +148 -0
- package/src/server/routes/tts/models.ts +89 -0
- package/src/shared/lib/chat/tool/normalize.ts +67 -0
- package/src/shared/lib/chat/tool/render-key.test.ts +167 -0
- package/src/shared/lib/chat/tool/render-key.ts +247 -0
- package/src/shared/lib/chat/tool/tool-aliases.test.ts +42 -0
- package/src/shared/lib/chat/tool/tool-aliases.ts +59 -12
- package/src/shared/lib/fs/open-reference.test.ts +64 -0
- package/src/shared/lib/fs/open-reference.ts +74 -0
- package/src/shared/lib/icons/tint-hues.generated.ts +20 -20
- package/src/shared/lib/markdown/inline-file.test.ts +100 -0
- package/src/shared/lib/markdown/inline-file.ts +213 -0
- package/src/shared/lib/omp/session/messages-map.test.ts +2 -1
- package/src/shared/lib/omp/session/messages-parse.ts +3 -2
- package/src/shared/lib/omp/session/parse-message-blocks.ts +14 -0
- package/src/shared/lib/omp/subagent/transcript-client.ts +5 -1
- package/src/shared/lib/tts/engines.test.ts +28 -3
- package/src/shared/lib/tts/engines.ts +31 -6
- package/src/shared/lib/tts/local-models.test.ts +69 -0
- package/src/shared/lib/tts/local-models.ts +200 -0
- package/src/shared/lib/tts/speakable.test.ts +21 -1
- package/src/shared/lib/tts/speakable.ts +66 -33
- package/src/shared/lib/tts/voices.ts +125 -19
- package/src/shared/types/chat.ts +3 -0
- package/src/shared/types/index.ts +1 -0
- package/src/shared/types/tool-render.ts +37 -0
- package/dist/client/static/js/ImageView-7vse3k6x.js +0 -1
- package/dist/client/static/js/LayoutWrapper-qdp83fps.js +0 -2
- package/dist/client/static/js/MergeDiffView-hzsccppq.js +0 -1
- package/dist/client/static/js/Modal-zw9x5b6f.js +0 -60
- package/dist/client/static/js/SessionsView-qmgg03fv.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-g7b64973.js +0 -1
- package/dist/client/static/js/bash-z5pe89pt.js +0 -1
- package/dist/client/static/js/c-fy0fysfw.js +0 -1
- package/dist/client/static/js/cpp-wam8dze6.js +0 -1
- package/dist/client/static/js/css-ke51m4kc.js +0 -1
- package/dist/client/static/js/css-yryw442h.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-8bscrcct.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-pj22bng1.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-9h6g160j.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-hgw4jcvk.js +0 -1
- package/dist/client/static/js/graphql-0yv8dc1v.js +0 -1
- package/dist/client/static/js/html-zk3m0az9.js +0 -1
- package/dist/client/static/js/index-0ff2x5g9.js +0 -1
- package/dist/client/static/js/index-17jy16v3.js +0 -314
- package/dist/client/static/js/index-1kjgdyfk.js +0 -2
- package/dist/client/static/js/index-4z3qtazf.js +0 -2
- package/dist/client/static/js/index-779rptb2.js +0 -1
- package/dist/client/static/js/index-9jrej3ht.js +0 -3
- package/dist/client/static/js/index-bczhbk01.js +0 -2
- package/dist/client/static/js/index-evvmkk2f.js +0 -2
- package/dist/client/static/js/index-jr6q69r3.js +0 -465
- package/dist/client/static/js/index-qaxjp73x.js +0 -2
- package/dist/client/static/js/index-rgneq3zt.js +0 -2
- package/dist/client/static/js/index-tfwsch7a.js +0 -4
- package/dist/client/static/js/index-vn495w82.js +0 -9
- package/dist/client/static/js/info-A6RAGUB7-k0kv05ny.js +0 -1
- package/dist/client/static/js/ini-apj95p59.js +0 -1
- package/dist/client/static/js/java-khk2v3g4.js +0 -1
- package/dist/client/static/js/javascript-gez6yppm.js +0 -1
- package/dist/client/static/js/json-r78y6e80.js +0 -1
- package/dist/client/static/js/jsx-h7hfj8cz.js +0 -1
- package/dist/client/static/js/lua-pat2bzg3.js +0 -1
- package/dist/client/static/js/markdown-545zn05v.js +0 -1
- package/dist/client/static/js/one-dark-pro-7c942tnw.js +0 -1
- package/dist/client/static/js/one-light-tp8y6c5g.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-ne66q5h9.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-ej9aysvz.js +0 -1
- package/dist/client/static/js/properties-9f76xngb.js +0 -1
- package/dist/client/static/js/python-nwerpkfq.js +0 -1
- package/dist/client/static/js/r-39k5dr2p.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-375pe46t.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-hdgdfsc1.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-2p5ynn4a.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-2p1fxxen.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-g131pt42.js +0 -1
- package/dist/client/static/js/sql-4dcrp3sw.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-myzk2rg0.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-gfztfha9.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-kwtrwq1f.js +0 -1
- package/dist/client/static/js/typescript-q0493nmw.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-30dnzvww.js +0 -1
- package/dist/client/static/js/xml-91sb3gt9.js +0 -1
- package/dist/client/static/js/yaml-ghx4mjw1.js +0 -1
|
@@ -10,11 +10,15 @@
|
|
|
10
10
|
* under a run reflects playback started anywhere else (autoplay, another
|
|
11
11
|
* button), and the run's own id keeps two answers from sharing a state.
|
|
12
12
|
*
|
|
13
|
+
* While a run is being read it offers PAUSE and STOP as separate actions: stop
|
|
14
|
+
* drops the rest of the answer, pause keeps the sample it stopped on so the
|
|
15
|
+
* reader can resume mid-sentence (the player then never starts the next chunk).
|
|
16
|
+
*
|
|
13
17
|
* A footer with no TTS provider renders nothing: a control that cannot act is
|
|
14
18
|
* worse than an absent one.
|
|
15
19
|
*/
|
|
16
20
|
|
|
17
|
-
import { Loader2, Square, Volume2 } from 'lucide-preact';
|
|
21
|
+
import { Loader2, Pause, Play, Square, Volume2 } from 'lucide-preact';
|
|
18
22
|
import { useTts } from '@/client/hooks/tts/tts-context';
|
|
19
23
|
|
|
20
24
|
interface SpeechButtonProps {
|
|
@@ -30,81 +34,152 @@ export function SpeechButton({ text, speechKey, variant, onStarted }: SpeechButt
|
|
|
30
34
|
const tts = useTts();
|
|
31
35
|
if (!tts.enabled) return null;
|
|
32
36
|
|
|
33
|
-
const isReading = tts.activeKey === speechKey
|
|
37
|
+
const isReading = tts.activeKey === speechKey
|
|
38
|
+
&& (tts.status === 'playing' || tts.status === 'loading' || tts.status === 'paused');
|
|
39
|
+
const isPaused = isReading && tts.status === 'paused';
|
|
40
|
+
const isStarting = isReading && tts.status === 'loading';
|
|
34
41
|
const canRead = /[A-Za-z0-9]/.test(text);
|
|
35
42
|
const label = isReading ? 'Stop reading' : 'Read answer aloud';
|
|
36
43
|
const title = !canRead
|
|
37
44
|
? 'Nothing to read aloud — this run produced no text'
|
|
38
45
|
: isReading ? 'Stop reading' : 'Read answer aloud';
|
|
39
46
|
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
const togglePause = () => {
|
|
48
|
+
if (isPaused) tts.resume();
|
|
49
|
+
else tts.pause();
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const start = () => {
|
|
46
53
|
tts.speak(text, speechKey);
|
|
47
54
|
onStarted?.();
|
|
48
55
|
};
|
|
49
56
|
|
|
50
|
-
|
|
57
|
+
const pauseLabel = isPaused ? 'Resume reading' : 'Pause reading';
|
|
58
|
+
const pauseIcon = isStarting
|
|
59
|
+
? <Loader2 size={variant === 'desktop' ? 12 : variant === 'mobile' ? 16 : 20} className="animate-spin" />
|
|
60
|
+
: isPaused
|
|
61
|
+
? <Play size={variant === 'desktop' ? 12 : variant === 'mobile' ? 15 : 18} />
|
|
62
|
+
: <Pause size={variant === 'desktop' ? 12 : variant === 'mobile' ? 15 : 18} />;
|
|
63
|
+
|
|
64
|
+
if (variant === 'sheet') {
|
|
65
|
+
if (isReading) {
|
|
66
|
+
return (
|
|
67
|
+
<>
|
|
68
|
+
<button
|
|
69
|
+
type="button"
|
|
70
|
+
aria-label={pauseLabel}
|
|
71
|
+
aria-pressed={isPaused}
|
|
72
|
+
title={pauseLabel}
|
|
73
|
+
onClick={togglePause}
|
|
74
|
+
className="flex min-h-12 w-full items-center gap-3 rounded-lg px-3 text-left text-sm text-ink transition-colors hover:bg-ink/5 cursor-pointer"
|
|
75
|
+
>
|
|
76
|
+
<span className="shrink-0 text-ink/55">{pauseIcon}</span>
|
|
77
|
+
<span>{pauseLabel}</span>
|
|
78
|
+
</button>
|
|
79
|
+
<button
|
|
80
|
+
type="button"
|
|
81
|
+
aria-label="Stop reading"
|
|
82
|
+
title="Stop reading"
|
|
83
|
+
onClick={tts.stop}
|
|
84
|
+
className="flex min-h-12 w-full items-center gap-3 rounded-lg px-3 text-left text-sm text-ink transition-colors hover:bg-ink/5 cursor-pointer"
|
|
85
|
+
>
|
|
86
|
+
<Square size={18} className="shrink-0 text-ink/55" />
|
|
87
|
+
<span>Stop reading</span>
|
|
88
|
+
</button>
|
|
89
|
+
</>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
51
92
|
return (
|
|
52
93
|
<button
|
|
53
94
|
type="button"
|
|
54
95
|
disabled={!canRead}
|
|
55
|
-
aria-pressed={isReading}
|
|
56
96
|
aria-label={label}
|
|
57
97
|
title={title}
|
|
58
|
-
onClick={
|
|
59
|
-
className=
|
|
60
|
-
isReading ? 'text-ink bg-ink/10' : 'text-ink/50 hover:bg-ink/5 hover:text-ink'
|
|
61
|
-
}`}
|
|
98
|
+
onClick={start}
|
|
99
|
+
className="flex min-h-12 w-full items-center gap-3 rounded-lg px-3 text-left text-sm text-ink transition-colors hover:bg-ink/5 cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent"
|
|
62
100
|
>
|
|
63
|
-
{
|
|
64
|
-
|
|
65
|
-
: isReading
|
|
66
|
-
? <Square size={15} />
|
|
67
|
-
: <Volume2 size={16} />}
|
|
101
|
+
<Volume2 size={20} className="shrink-0 text-ink/55" />
|
|
102
|
+
<span>Read answer aloud</span>
|
|
68
103
|
</button>
|
|
69
104
|
);
|
|
70
105
|
}
|
|
71
106
|
|
|
72
|
-
if (variant === '
|
|
107
|
+
if (variant === 'mobile') {
|
|
108
|
+
if (isReading) {
|
|
109
|
+
return (
|
|
110
|
+
<span className="flex shrink-0 items-center">
|
|
111
|
+
<button
|
|
112
|
+
type="button"
|
|
113
|
+
aria-label={pauseLabel}
|
|
114
|
+
aria-pressed={isPaused}
|
|
115
|
+
title={pauseLabel}
|
|
116
|
+
onClick={togglePause}
|
|
117
|
+
className="rounded-md p-2 text-ink transition-colors hover:bg-ink/5 cursor-pointer"
|
|
118
|
+
>
|
|
119
|
+
{pauseIcon}
|
|
120
|
+
</button>
|
|
121
|
+
<button
|
|
122
|
+
type="button"
|
|
123
|
+
aria-label="Stop reading"
|
|
124
|
+
title="Stop reading"
|
|
125
|
+
onClick={tts.stop}
|
|
126
|
+
className="rounded-md p-2 text-ink transition-colors hover:bg-ink/5 cursor-pointer"
|
|
127
|
+
>
|
|
128
|
+
<Square size={15} />
|
|
129
|
+
</button>
|
|
130
|
+
</span>
|
|
131
|
+
);
|
|
132
|
+
}
|
|
73
133
|
return (
|
|
74
134
|
<button
|
|
75
135
|
type="button"
|
|
76
136
|
disabled={!canRead}
|
|
77
|
-
aria-pressed={isReading}
|
|
78
137
|
aria-label={label}
|
|
79
138
|
title={title}
|
|
80
|
-
onClick={
|
|
81
|
-
className="
|
|
139
|
+
onClick={start}
|
|
140
|
+
className="shrink-0 rounded-md p-2 text-ink/50 transition-colors hover:bg-ink/5 hover:text-ink cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed"
|
|
82
141
|
>
|
|
83
|
-
{
|
|
84
|
-
? <Loader2 size={20} className="shrink-0 animate-spin text-ink/55" />
|
|
85
|
-
: isReading
|
|
86
|
-
? <Square size={18} className="shrink-0 text-ink/55" />
|
|
87
|
-
: <Volume2 size={20} className="shrink-0 text-ink/55" />}
|
|
88
|
-
<span>{isReading ? 'Stop reading' : 'Read answer aloud'}</span>
|
|
142
|
+
<Volume2 size={16} />
|
|
89
143
|
</button>
|
|
90
144
|
);
|
|
91
145
|
}
|
|
92
146
|
|
|
147
|
+
if (isReading) {
|
|
148
|
+
return (
|
|
149
|
+
<span className="flex items-center">
|
|
150
|
+
<button
|
|
151
|
+
type="button"
|
|
152
|
+
aria-label={pauseLabel}
|
|
153
|
+
aria-pressed={isPaused}
|
|
154
|
+
title={pauseLabel}
|
|
155
|
+
onClick={togglePause}
|
|
156
|
+
className="flex items-center rounded p-1 text-ink transition-colors hover:bg-ink/5 cursor-pointer"
|
|
157
|
+
>
|
|
158
|
+
{pauseIcon}
|
|
159
|
+
</button>
|
|
160
|
+
<button
|
|
161
|
+
type="button"
|
|
162
|
+
aria-label="Stop reading"
|
|
163
|
+
title="Stop reading"
|
|
164
|
+
onClick={tts.stop}
|
|
165
|
+
className="flex items-center rounded p-1 text-ink transition-colors hover:bg-ink/5 cursor-pointer"
|
|
166
|
+
>
|
|
167
|
+
<Square size={11} />
|
|
168
|
+
</button>
|
|
169
|
+
</span>
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
93
173
|
return (
|
|
94
174
|
<button
|
|
95
175
|
type="button"
|
|
96
176
|
disabled={!canRead}
|
|
97
|
-
aria-pressed={isReading}
|
|
98
177
|
aria-label={label}
|
|
99
178
|
title={title}
|
|
100
|
-
onClick={
|
|
179
|
+
onClick={start}
|
|
101
180
|
className="flex items-center hover:text-ink transition-colors p-1 rounded hover:bg-ink/5 cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent"
|
|
102
181
|
>
|
|
103
|
-
{
|
|
104
|
-
? <Loader2 size={12} className="animate-spin" />
|
|
105
|
-
: isReading
|
|
106
|
-
? <Square size={11} />
|
|
107
|
-
: <Volume2 size={12} />}
|
|
182
|
+
<Volume2 size={12} />
|
|
108
183
|
</button>
|
|
109
184
|
);
|
|
110
185
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRef, useState } from 'preact/hooks';
|
|
2
|
-
import { Check, LockKeyhole } from 'lucide-preact';
|
|
2
|
+
import { Check, ChevronDown, LockKeyhole } from 'lucide-preact';
|
|
3
3
|
import { useOnClickOutside } from '@/client/hooks/ui/on-click-outside';
|
|
4
4
|
import type { ApprovalMode } from '@/shared/lib/omp/config/access-mode';
|
|
5
5
|
import { APPROVAL_MODES } from '@/shared/lib/omp/config/access-mode';
|
|
@@ -26,6 +26,7 @@ export interface AccessDropdownProps {
|
|
|
26
26
|
export function AccessDropdown({ value, onSelect, harness, iconOnly = false }: AccessDropdownProps) {
|
|
27
27
|
const [showAccess, setShowAccess] = useState(false);
|
|
28
28
|
const accessRef = useRef<HTMLDivElement>(null);
|
|
29
|
+
const listboxId = useRef(`access-listbox-${Math.random().toString(36).slice(2, 9)}`).current;
|
|
29
30
|
useOnClickOutside(accessRef, () => setShowAccess(false));
|
|
30
31
|
const copy = accessLevelCopy(harness);
|
|
31
32
|
|
|
@@ -40,7 +41,11 @@ export function AccessDropdown({ value, onSelect, harness, iconOnly = false }: A
|
|
|
40
41
|
<button
|
|
41
42
|
type="button"
|
|
42
43
|
onClick={() => setShowAccess(!showAccess)}
|
|
43
|
-
|
|
44
|
+
aria-label={`Access control: ${copy.labels[value]}`}
|
|
45
|
+
aria-haspopup="listbox"
|
|
46
|
+
aria-expanded={showAccess}
|
|
47
|
+
aria-controls={showAccess ? listboxId : undefined}
|
|
48
|
+
className="tap-chip flex items-center space-x-1 rounded-md px-1.5 py-1 text-xs font-medium text-muted transition-colors hover:bg-ink/5 hover:text-ink"
|
|
44
49
|
>
|
|
45
50
|
<LockKeyhole size={12} className="text-ink/60" />
|
|
46
51
|
{/* The label is dropped whole below the composer's label width — never
|
|
@@ -48,20 +53,30 @@ export function AccessDropdown({ value, onSelect, harness, iconOnly = false }: A
|
|
|
48
53
|
is what kept `Always ask` off two lines, and the flag is what keeps
|
|
49
54
|
the row from being squeezed into overlap. */}
|
|
50
55
|
{!iconOnly && <span className="whitespace-nowrap">{copy.labels[value]}</span>}
|
|
56
|
+
<ChevronDown size={11} className={`flex-shrink-0 text-ink/40 transition-transform ${showAccess ? 'rotate-180' : ''}`} />
|
|
51
57
|
</button>
|
|
52
58
|
{showAccess && (
|
|
53
|
-
<div
|
|
54
|
-
|
|
59
|
+
<div
|
|
60
|
+
id={listboxId}
|
|
61
|
+
role="listbox"
|
|
62
|
+
aria-label="Access control"
|
|
63
|
+
className={`glass-popover absolute bottom-full left-0 mb-1 ${copy.note ? 'w-56' : 'w-40'} bg-paper border border-ink/20 rounded-md shadow-lg z-50 py-1 text-xs`}
|
|
64
|
+
>
|
|
65
|
+
<div className="px-3 py-1.5 text-[10px] uppercase tracking-wider text-ink/40 font-semibold border-b border-ink/5 mb-1">Access Control</div>
|
|
55
66
|
{APPROVAL_MODES.map(mode => (
|
|
56
67
|
<button
|
|
57
68
|
key={mode}
|
|
58
69
|
type="button"
|
|
70
|
+
role="option"
|
|
71
|
+
aria-selected={value === mode}
|
|
59
72
|
onClick={() => handleSelect(mode)}
|
|
60
73
|
title={copy.descriptions[mode]}
|
|
61
|
-
className=
|
|
74
|
+
className={`w-full text-left px-3 py-1.5 flex items-center justify-between transition-colors hover:bg-ink/5 ${
|
|
75
|
+
value === mode ? 'bg-ink/10 font-medium text-ink' : 'text-ink/75'
|
|
76
|
+
}`}
|
|
62
77
|
>
|
|
63
78
|
<span>{copy.labels[mode]}</span>
|
|
64
|
-
{value === mode && <Check size={12} className="text-ink" />}
|
|
79
|
+
{value === mode && <Check size={12} className="text-ink shrink-0" />}
|
|
65
80
|
</button>
|
|
66
81
|
))}
|
|
67
82
|
{copy.note && (
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import { useRef, useState } from 'preact/hooks';
|
|
20
|
-
import { Check, Layers } from 'lucide-preact';
|
|
20
|
+
import { Check, ChevronDown, Layers } from 'lucide-preact';
|
|
21
21
|
import { useOnClickOutside } from '@/client/hooks/ui/on-click-outside';
|
|
22
22
|
import type { SessionModeState } from '@/shared/lib/harness/session-modes';
|
|
23
23
|
|
|
@@ -52,10 +52,11 @@ export function SessionModeDropdown({ mode, pending, onSelect, iconOnly = false
|
|
|
52
52
|
aria-expanded={open}
|
|
53
53
|
aria-label={`Session mode: ${label}`}
|
|
54
54
|
title={`Session mode: ${label}`}
|
|
55
|
-
className="tap-chip flex items-center space-x-1
|
|
55
|
+
className="tap-chip flex items-center space-x-1 rounded-md px-1.5 py-1 text-xs font-medium text-muted transition-colors hover:bg-ink/5 hover:text-ink disabled:cursor-wait disabled:opacity-60"
|
|
56
56
|
>
|
|
57
57
|
<Layers size={12} className="text-ink/60" />
|
|
58
58
|
{!iconOnly && <span className="max-w-[9rem] truncate">{label}</span>}
|
|
59
|
+
<ChevronDown size={11} className={`flex-shrink-0 text-ink/40 transition-transform ${open ? 'rotate-180' : ''}`} />
|
|
59
60
|
</button>
|
|
60
61
|
{open && (
|
|
61
62
|
<div
|
|
@@ -63,7 +64,7 @@ export function SessionModeDropdown({ mode, pending, onSelect, iconOnly = false
|
|
|
63
64
|
aria-label="Session mode"
|
|
64
65
|
className="glass-popover absolute bottom-full left-0 mb-1 w-44 bg-paper border border-ink/20 rounded-md shadow-lg z-50 py-1 text-xs"
|
|
65
66
|
>
|
|
66
|
-
<div className="px-3 py-1 text-[10px] uppercase tracking-wider text-ink/40 font-semibold mb-1">
|
|
67
|
+
<div className="px-3 py-1.5 text-[10px] uppercase tracking-wider text-ink/40 font-semibold border-b border-ink/5 mb-1">
|
|
67
68
|
Session Mode
|
|
68
69
|
</div>
|
|
69
70
|
{mode.values.map((choice) => (
|
|
@@ -76,7 +77,9 @@ export function SessionModeDropdown({ mode, pending, onSelect, iconOnly = false
|
|
|
76
77
|
setOpen(false);
|
|
77
78
|
onSelect(choice.value);
|
|
78
79
|
}}
|
|
79
|
-
className=
|
|
80
|
+
className={`w-full text-left px-3 py-1.5 flex items-center justify-between gap-2 transition-colors hover:bg-ink/5 ${
|
|
81
|
+
choice.value === mode.currentValue ? 'bg-ink/10 font-medium text-ink' : 'text-ink/75'
|
|
82
|
+
}`}
|
|
80
83
|
>
|
|
81
84
|
<span className="truncate">{choice.name}</span>
|
|
82
85
|
{choice.value === mode.currentValue && <Check size={12} className="text-ink shrink-0" />}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRef, useState } from 'preact/hooks';
|
|
2
|
-
import { Brain, Check } from 'lucide-preact';
|
|
2
|
+
import { Brain, Check, ChevronDown } from 'lucide-preact';
|
|
3
3
|
import { useOnClickOutside } from '@/client/hooks/ui/on-click-outside';
|
|
4
4
|
|
|
5
5
|
interface ThinkingLevelDropdownProps {
|
|
@@ -13,6 +13,7 @@ interface ThinkingLevelDropdownProps {
|
|
|
13
13
|
export function ThinkingLevelDropdown({ thinkingLevels, currentThinking, onSelect, iconOnly = false }: ThinkingLevelDropdownProps) {
|
|
14
14
|
const [showThinking, setShowThinking] = useState(false);
|
|
15
15
|
const thinkingRef = useRef<HTMLDivElement>(null);
|
|
16
|
+
const listboxId = useRef(`thinking-listbox-${Math.random().toString(36).slice(2, 9)}`).current;
|
|
16
17
|
useOnClickOutside(thinkingRef, () => setShowThinking(false));
|
|
17
18
|
|
|
18
19
|
const handleSelect = (level: string) => {
|
|
@@ -25,23 +26,38 @@ export function ThinkingLevelDropdown({ thinkingLevels, currentThinking, onSelec
|
|
|
25
26
|
<button
|
|
26
27
|
onClick={() => thinkingLevels.length > 0 && setShowThinking(!showThinking)}
|
|
27
28
|
disabled={thinkingLevels.length === 0}
|
|
28
|
-
|
|
29
|
+
aria-label={`Thinking level: ${currentThinking}`}
|
|
30
|
+
aria-haspopup="listbox"
|
|
31
|
+
aria-expanded={showThinking}
|
|
32
|
+
aria-controls={showThinking ? listboxId : undefined}
|
|
33
|
+
className="tap-chip flex items-center space-x-1 rounded-md px-1.5 py-1 text-xs font-medium text-muted transition-colors hover:bg-ink/5 hover:text-ink disabled:cursor-not-allowed disabled:opacity-40"
|
|
29
34
|
title={thinkingLevels.length === 0 ? 'This model exposes no thinking levels' : `Thinking Level: ${currentThinking}`}
|
|
30
35
|
>
|
|
31
36
|
<Brain size={12} className="text-ink/60" />
|
|
32
37
|
{!iconOnly && <span className="whitespace-nowrap">{currentThinking}</span>}
|
|
38
|
+
<ChevronDown size={11} className={`flex-shrink-0 text-ink/40 transition-transform ${showThinking ? 'rotate-180' : ''}`} />
|
|
33
39
|
</button>
|
|
34
40
|
{showThinking && thinkingLevels.length > 0 && (
|
|
35
|
-
<div
|
|
36
|
-
|
|
41
|
+
<div
|
|
42
|
+
id={listboxId}
|
|
43
|
+
role="listbox"
|
|
44
|
+
aria-label="Thinking level"
|
|
45
|
+
className="glass-popover absolute bottom-full left-0 mb-1 w-40 bg-paper border border-ink/20 rounded-md shadow-lg z-50 py-1 text-xs"
|
|
46
|
+
>
|
|
47
|
+
<div className="px-3 py-1.5 text-[10px] uppercase tracking-wider text-ink/40 font-semibold border-b border-ink/5 mb-1">Thinking Level</div>
|
|
37
48
|
{thinkingLevels.map(level => (
|
|
38
49
|
<button
|
|
39
50
|
key={level}
|
|
51
|
+
type="button"
|
|
52
|
+
role="option"
|
|
53
|
+
aria-selected={currentThinking === level}
|
|
40
54
|
onClick={() => handleSelect(level)}
|
|
41
|
-
className=
|
|
55
|
+
className={`w-full text-left px-3 py-1.5 flex items-center justify-between transition-colors hover:bg-ink/5 ${
|
|
56
|
+
currentThinking === level ? 'bg-ink/10 font-medium text-ink' : 'text-ink/75'
|
|
57
|
+
}`}
|
|
42
58
|
>
|
|
43
59
|
<span>{level}</span>
|
|
44
|
-
{currentThinking === level && <Check size={12} className="text-ink" />}
|
|
60
|
+
{currentThinking === level && <Check size={12} className="text-ink shrink-0" />}
|
|
45
61
|
</button>
|
|
46
62
|
))}
|
|
47
63
|
</div>
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
import { useEffect, useMemo, useRef, useState } from 'preact/hooks';
|
|
27
27
|
import { AlertTriangle, Check, ChevronDown, GitBranch } from 'lucide-preact';
|
|
28
28
|
import { useOnClickOutside } from '@/client/hooks/ui/on-click-outside';
|
|
29
|
+
import { PickerSearch } from '@/client/components/common/picker-search';
|
|
30
|
+
import { matchesPickerQuery } from '@/shared/lib/ui/picker-filter';
|
|
29
31
|
import { createWorktree, useWorktrees } from '@/client/hooks/workspace/worktree/index';
|
|
30
32
|
import { NewWorktreeModal } from '@/client/components/workspace/worktree-modal/index';
|
|
31
33
|
import type { SpawnTarget } from '@/client/hooks/chat/timeline/spawn-target';
|
|
@@ -70,6 +72,7 @@ export function worktreeLabel(worktrees: WorktreeInfo[], target: SpawnTarget | n
|
|
|
70
72
|
|
|
71
73
|
export function WorktreePicker({ folders, selectedFolderId, target, setTarget, onReport }: WorktreePickerProps) {
|
|
72
74
|
const [open, setOpen] = useState(false);
|
|
75
|
+
const [query, setQuery] = useState('');
|
|
73
76
|
const [creating, setCreating] = useState(false);
|
|
74
77
|
const [dialogOpen, setDialogOpen] = useState(false);
|
|
75
78
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
@@ -92,6 +95,7 @@ export function WorktreePicker({ folders, selectedFolderId, target, setTarget, o
|
|
|
92
95
|
// dialog is in the list the user is looking at.
|
|
93
96
|
useEffect(() => {
|
|
94
97
|
if (open) void refresh();
|
|
98
|
+
else setQuery('');
|
|
95
99
|
}, [open, refresh]);
|
|
96
100
|
|
|
97
101
|
// A pick is cleared by the WORKSPACE picker's own choice, never by an effect
|
|
@@ -100,6 +104,15 @@ export function WorktreePicker({ folders, selectedFolderId, target, setTarget, o
|
|
|
100
104
|
// and a mismatch check in that window wiped the very pick it was protecting.
|
|
101
105
|
|
|
102
106
|
const list = useMemo(() => worktrees.filter((worktree) => !worktree.isPrimary), [worktrees]);
|
|
107
|
+
// A repository accumulates worktrees; the panel is filtered rather than
|
|
108
|
+
// scrolled, and closing it clears the filter for the next open.
|
|
109
|
+
const visible = useMemo(
|
|
110
|
+
() => list.filter((worktree) => matchesPickerQuery(
|
|
111
|
+
`${worktree.branch || 'detached'} ${worktree.path}`,
|
|
112
|
+
query,
|
|
113
|
+
)),
|
|
114
|
+
[list, query],
|
|
115
|
+
);
|
|
103
116
|
const picked = selectedWorktree(worktrees, target);
|
|
104
117
|
const primary = worktrees.find((worktree) => worktree.isPrimary) ?? null;
|
|
105
118
|
const dirty = (picked ?? primary)?.dirty ?? 0;
|
|
@@ -175,6 +188,7 @@ export function WorktreePicker({ folders, selectedFolderId, target, setTarget, o
|
|
|
175
188
|
role="menu"
|
|
176
189
|
className="glass-popover absolute bottom-full left-0 mb-1.5 w-72 bg-paper border border-ink/10 rounded-lg shadow-lg z-50 flex flex-col overflow-hidden text-xs py-1"
|
|
177
190
|
>
|
|
191
|
+
<PickerSearch value={query} onChange={setQuery} ariaLabel="Search worktrees" placeholder="Search worktrees…" />
|
|
178
192
|
<div className="px-3 py-1.5 text-[10px] uppercase tracking-wider text-ink/40 font-semibold border-b border-ink/5">
|
|
179
193
|
Project root
|
|
180
194
|
</div>
|
|
@@ -232,8 +246,10 @@ export function WorktreePicker({ folders, selectedFolderId, target, setTarget, o
|
|
|
232
246
|
<div className="px-3 py-2 text-ink/40 italic">
|
|
233
247
|
{error ? 'Worktrees could not be read' : 'No worktrees yet'}
|
|
234
248
|
</div>
|
|
249
|
+
) : visible.length === 0 ? (
|
|
250
|
+
<div className="px-3 py-2 text-ink/40 italic">No match for “{query.trim()}”</div>
|
|
235
251
|
) : (
|
|
236
|
-
|
|
252
|
+
visible.map((worktree) => {
|
|
237
253
|
const active = target?.worktreePath === worktree.path;
|
|
238
254
|
return (
|
|
239
255
|
<button
|
|
@@ -4,13 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* The panel registry: a component per `ToolPanelKind
|
|
8
|
-
* card needs from it.
|
|
7
|
+
* The panel registry: a component per `ToolPanelKind`.
|
|
9
8
|
*
|
|
10
|
-
* `toolPanelKind`
|
|
11
|
-
* map from that key to the component.
|
|
12
|
-
*
|
|
13
|
-
*
|
|
9
|
+
* `toolPanelKind` reads the SERVER's `render` field (pure, in `registry.ts`);
|
|
10
|
+
* this file is only the map from that key to the component. A row the server
|
|
11
|
+
* could not classify resolves to no key, and `ToolBody` draws its JSON
|
|
12
|
+
* fallback instead of a guessed panel.
|
|
14
13
|
*/
|
|
15
14
|
|
|
16
15
|
import type { ReactNode } from 'preact/compat';
|
|
@@ -41,10 +40,10 @@ import { Edit } from '@/client/components/workspace/chat-timeline/tool-renderers
|
|
|
41
40
|
import { Mcp } from '@/client/components/workspace/chat-timeline/tool-renderers/panels/Mcp';
|
|
42
41
|
import { Wait } from '@/client/components/workspace/chat-timeline/tool-renderers/panels/Wait';
|
|
43
42
|
import { hashlineTargetPath } from '@/shared/lib/omp/session/hashline-patch';
|
|
44
|
-
import { procPathOf } from '@/shared/lib/omp/session/proc';
|
|
45
|
-
import { canonicalAgentToolName } from '@/shared/lib/chat/tool/tool-aliases';
|
|
46
43
|
import { getToolInputPath } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/tool-input';
|
|
47
|
-
import {
|
|
44
|
+
import { toolPanelKind, type ToolPanelKind } from '@/client/components/workspace/chat-timeline/tool-renderers/registry';
|
|
45
|
+
|
|
46
|
+
export { resolveToolKey } from '@/client/components/workspace/chat-timeline/tool-renderers/registry';
|
|
48
47
|
|
|
49
48
|
/** One panel component per kind. A kind with no entry falls back to generic
|
|
50
49
|
* Input/Output rendering; the record is total so a missing one is a type error. */
|
|
@@ -101,57 +100,6 @@ export function resolveTargetFile(tool: ToolCallData): string | undefined {
|
|
|
101
100
|
return undefined;
|
|
102
101
|
}
|
|
103
102
|
|
|
104
|
-
/**
|
|
105
|
-
* The canonical key for a tool call — omp's own name with Kabmo's legacy
|
|
106
|
-
* aliases folded. Used for icon selection and the header's title fallback.
|
|
107
|
-
*/
|
|
108
|
-
export function resolveToolKey(tool: ToolCallData): string {
|
|
109
|
-
// A `proc://` call is `read`/`write` transport, so the URL is the only thing
|
|
110
|
-
// that names what it did — the tool key drives the glyph and the header.
|
|
111
|
-
if (procPathOf(tool)) return 'proc';
|
|
112
|
-
// `read xd://<device>` is the device's docs: the key is `read`, so the glyph
|
|
113
|
-
// and the header describe a read rather than the device it documents.
|
|
114
|
-
if (isXdDocRead(tool)) return 'read';
|
|
115
|
-
// A sole tool command (`resolve "…"`, `lsp --help`) is that tool's call, not
|
|
116
|
-
// a shell run: the glyph and title must name what it did.
|
|
117
|
-
const commanded = effectiveToolName(tool);
|
|
118
|
-
if (commanded && commanded !== tool.name) return commanded.toLowerCase();
|
|
119
|
-
|
|
120
|
-
const details = tool.details as Record<string, unknown> | undefined;
|
|
121
|
-
const xdev = details?.xdev;
|
|
122
|
-
if (xdev && typeof xdev === 'object') {
|
|
123
|
-
const name = (xdev as Record<string, unknown>).tool;
|
|
124
|
-
if (typeof name === 'string' && name) return name.toLowerCase();
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
const rawTarget = (tool.target || '').toLowerCase();
|
|
128
|
-
const inputPath = getToolInputPath(tool.input)?.toLowerCase() ?? '';
|
|
129
|
-
const xdTarget = rawTarget.startsWith('xd://')
|
|
130
|
-
? rawTarget.slice(5)
|
|
131
|
-
: inputPath.startsWith('xd://')
|
|
132
|
-
? inputPath.slice(5)
|
|
133
|
-
: '';
|
|
134
|
-
if (xdTarget) {
|
|
135
|
-
const device = xdTarget.split(/[/?#]/)[0].trim();
|
|
136
|
-
if (device) return device;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
const rawName = canonicalAgentToolName(tool.name || '').toLowerCase();
|
|
140
|
-
if (rawName && rawName !== 'tool' && rawName !== 'custom') return rawName;
|
|
141
|
-
|
|
142
|
-
const titlePrefix = (tool.title || '').toLowerCase().split(/[\s—\-:]+/)[0]?.trim();
|
|
143
|
-
if (titlePrefix && TOOL_KEY_TITLES[titlePrefix]) return titlePrefix;
|
|
144
|
-
|
|
145
|
-
return (tool.type || '').toLowerCase();
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/** Title prefixes that name a tool when no `name` was sent (MOCK path). */
|
|
149
|
-
const TOOL_KEY_TITLES: Record<string, true> = {
|
|
150
|
-
grep: true, glob: true, read: true, write: true, edit: true, bash: true,
|
|
151
|
-
terminal: true, run_command: true, todo: true, eval: true, hub: true,
|
|
152
|
-
proc: true, lsp: true, github: true, task: true, resolve: true, reject: true,
|
|
153
|
-
};
|
|
154
|
-
|
|
155
103
|
/**
|
|
156
104
|
* Panel khusus per tool family — dirender di dalam body setiap render style.
|
|
157
105
|
* Classification is pure (`toolPanelKind`); this only maps the key to a
|
|
@@ -163,8 +111,3 @@ export function ToolDetailsPanel({ tool }: { tool: ToolCallData }): ReactNode {
|
|
|
163
111
|
return PANELS[kind]({ tool });
|
|
164
112
|
}
|
|
165
113
|
|
|
166
|
-
/** True kalau tool punya panel khusus yang sudah merender input/output sendiri —
|
|
167
|
-
* ToolBody tidak boleh render Input/Output generik lagi (anti dobel). */
|
|
168
|
-
export function hasToolDetailsPanel(tool: ToolCallData): boolean {
|
|
169
|
-
return toolPanelKind(tool) !== null;
|
|
170
|
-
}
|
|
@@ -22,6 +22,7 @@ import { h, render } from 'preact';
|
|
|
22
22
|
import { act } from 'preact/test-utils';
|
|
23
23
|
import { Proc } from '@/client/components/workspace/chat-timeline/tool-renderers/panels/Proc';
|
|
24
24
|
import { toolPanelKind } from '@/client/components/workspace/chat-timeline/tool-renderers/registry';
|
|
25
|
+
import { normalizeToolCall } from '@/shared/lib/chat/tool/normalize';
|
|
25
26
|
import type { ToolCallData } from '@/shared/types';
|
|
26
27
|
|
|
27
28
|
const DOM_GLOBALS = ['window', 'document', 'navigator', 'Node', 'Element', 'HTMLElement', 'HTMLInputElement', 'Event', 'MouseEvent', 'KeyboardEvent'] as const;
|
|
@@ -73,7 +74,17 @@ const KILL: Partial<ToolCallData> & Pick<ToolCallData, 'type'> = {
|
|
|
73
74
|
|
|
74
75
|
describe('Proc panel — a service the call named', () => {
|
|
75
76
|
test('reaches the panel from the transport, not the tool name', () => {
|
|
76
|
-
|
|
77
|
+
// The panel comes from the server's classification of the URL, so the test
|
|
78
|
+
// runs the same normalizer the ingress runs.
|
|
79
|
+
const call = normalizeToolCall({
|
|
80
|
+
id: 'c1',
|
|
81
|
+
type: 'write',
|
|
82
|
+
name: 'write',
|
|
83
|
+
title: 'write',
|
|
84
|
+
target: 'proc://kabmo-dev/kill',
|
|
85
|
+
input: { path: 'proc://kabmo-dev/kill' },
|
|
86
|
+
} as ToolCallData);
|
|
87
|
+
expect(toolPanelKind(call)).toBe('proc');
|
|
77
88
|
});
|
|
78
89
|
|
|
79
90
|
test('states the state, the exit code and the span it ran', async () => {
|