@kabmo-labs/kabmo 0.49.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 +606 -560
- package/dist/client/static/js/{Body-9h5hd351.js → Body-s3nh6vet.js} +3 -3
- package/dist/client/static/js/{CsvGrid-s05k1q18.js → CsvGrid-j4h6cpnn.js} +2 -2
- package/dist/client/static/js/{DocxView-x6sjw5ht.js → DocxView-197x16zq.js} +3 -3
- package/dist/client/static/js/{DrawioView-jashn8sf.js → DrawioView-v6ps0cm5.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-eygzgtyc.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-syhjmyqf.js → PdfView-gzhcym20.js} +1 -1
- package/dist/client/static/js/SessionsView-3h872gpe.js +1 -0
- package/dist/client/static/js/{SheetView-26r0e506.js → SheetView-baaynkb4.js} +22 -22
- package/dist/client/static/js/{SvgPreview-2fk85jzz.js → SvgPreview-jzcqwwcc.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-fdka7pxr.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-9084jzwr.js +36 -0
- package/dist/client/static/js/{astro-rn2bvwpm.js → astro-m3fcq2sa.js} +1 -1
- package/dist/client/static/js/bash-n7wcmq3s.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-vpcmd3vx.js → blockDiagram-BEXU5L5S-qqcjrg1b.js} +8 -8
- package/dist/client/static/js/c-ypdp030b.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-1rgpdnbq.js → c4Diagram-YGBWAQC7-gc8fqbpc.js} +3 -3
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-fbsejvb9.js → classDiagram-v2-NBCMYWYE-pp6060kq.js} +9 -9
- package/dist/client/static/js/cose-bilkent-JH36ORCC-744ekavk.js +1 -0
- 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-7ta5vbrw.js → cynefinDiagram-VND7K2PF-57dja6g9.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-b8gtt32x.js → dagre-6A5THRUB-de4xrbrw.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-7emepy7h.js → diagram-22UHCM2B-ky3ncyv8.js} +21 -21
- package/dist/client/static/js/diagram-3UASUU5V-zgg82bz9.js +24 -0
- package/dist/client/static/js/{diagram-ATOU4E4O-t113exk3.js → diagram-ATOU4E4O-r4s13e4n.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-pyj3x97y.js → diagram-CDSNMT55-my21t0kq.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-183sgpjh.js → diagram-MLGK6HIB-pvt20jtj.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-fmbj4hcx.js → diagram-MPIPVDR6-as9dk4f3.js} +2 -2
- package/dist/client/static/js/{dockerfile-qay672za.js → dockerfile-3b5caedj.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-eafvfws2.js → ebnfDiagram-ZINNZB2B-tj3hkcj4.js} +1 -1
- package/dist/client/static/js/{elixir-t8bep87c.js → elixir-7q2k61zb.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-573f1vfs.js → elk-276RUBZZ-5e7wczf3.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-4z1r88ej.js → erDiagram-OPXOYQCR-5jje7qrh.js} +12 -12
- package/dist/client/static/js/{erlang-261km7r1.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-49jd7msz.js → ganttDiagram-FUAMR5RP-7hresycc.js} +6 -6
- package/dist/client/static/js/gitGraph-4MIJSDKK-grqv890n.js +1 -0
- package/dist/client/static/js/gitGraphDiagram-X574FWY7-8m202jb7.js +106 -0
- 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-0w4jqzqk.js → index-0prwdwyb.js} +2 -2
- package/dist/client/static/js/{index-3v8k8ms3.js → index-0y6tstk8.js} +1 -1
- package/dist/client/static/js/index-20hj80g4.js +4 -0
- package/dist/client/static/js/index-21421tq7.js +2 -0
- package/dist/client/static/js/{index-gg910gpv.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-rz0tz4hg.js → index-3sz9cztk.js} +1 -1
- package/dist/client/static/js/index-4m2d73m3.css +1 -0
- package/dist/client/static/js/{index-2bf0txsp.js → index-4nvcwtvr.js} +2 -2
- package/dist/client/static/js/index-4ppap7vb.js +9 -0
- package/dist/client/static/js/{index-qs4n116g.js → index-4tbdws4r.js} +2 -2
- package/dist/client/static/js/index-56hy2hcy.js +1 -0
- package/dist/client/static/js/{index-7rmps91t.js → index-60g0e74a.js} +2 -2
- package/dist/client/static/js/{index-zp40g8ah.js → index-7ag37ghj.js} +12 -12
- package/dist/client/static/js/{index-z6y8j93w.js → index-7ehcjb3r.js} +7 -7
- package/dist/client/static/js/index-899yw6fh.js +2 -0
- package/dist/client/static/js/{index-2yzt8h3d.js → index-8pqx5n2p.js} +2 -2
- package/dist/client/static/js/{index-dh060b7r.js → index-91jm3ywm.js} +2 -2
- package/dist/client/static/js/{index-yg083mk0.js → index-9qf2h9jb.js} +6 -6
- package/dist/client/static/js/{index-tcfpzqb9.js → index-9rp7h1nv.js} +20 -20
- 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-awtk0djy.js +1 -0
- package/dist/client/static/js/{index-4dnc1kys.js → index-awz6pyd0.js} +2 -2
- package/dist/client/static/js/index-cvx1vkrx.js +1 -0
- package/dist/client/static/js/{index-c3whkrwa.js → index-cwwg7k5f.js} +33 -33
- package/dist/client/static/js/{index-ykc14gez.js → index-dzatbdws.js} +6 -6
- package/dist/client/static/js/{index-j37m7pn9.js → index-e6ew77ph.js} +2 -2
- package/dist/client/static/js/{index-tb35a328.js → index-ej1va073.js} +2 -2
- package/dist/client/static/js/{index-4ccs971z.js → index-er7pj5k6.js} +2 -2
- package/dist/client/static/js/index-fm0t4pct.js +4 -0
- package/dist/client/static/js/{index-0857zpr0.js → index-g5wp6ksw.js} +2 -2
- package/dist/client/static/js/{index-nzvte8s5.js → index-gy4mtr2e.js} +2 -2
- package/dist/client/static/js/{index-1yq96wpa.js → index-j9y4tjk0.js} +2 -2
- package/dist/client/static/js/{index-7ff9scbm.js → index-kt7c42n7.js} +2 -2
- package/dist/client/static/js/index-ktmb341a.js +468 -0
- package/dist/client/static/js/{index-taev57jw.js → index-m6zncj00.js} +2 -2
- package/dist/client/static/js/{index-dmc82cxb.js → index-mpyd7qxj.js} +2 -2
- package/dist/client/static/js/{index-1p880x6e.js → index-ms80nne4.js} +2 -2
- package/dist/client/static/js/{index-yyjw1ty9.js → index-my856e49.js} +2 -2
- package/dist/client/static/js/{index-pygy21w5.js → index-nnqyew8n.js} +2 -2
- package/dist/client/static/js/{index-qwxawph7.js → index-nt17ejrm.js} +2 -2
- package/dist/client/static/js/index-pvv340b4.js +2 -0
- package/dist/client/static/js/{index-nbm5r9g1.js → index-pxr36neg.js} +2 -2
- package/dist/client/static/js/{index-5ztdqm1w.js → index-q0k1am0g.js} +2 -2
- package/dist/client/static/js/{index-tc6k8qt7.js → index-qrpx4sk1.js} +2 -2
- package/dist/client/static/js/{index-473hk8nb.js → index-r2zsw7nw.js} +9 -9
- package/dist/client/static/js/{index-gaqjrzdb.js → index-rbkvw2xs.js} +2 -2
- package/dist/client/static/js/{index-wbsvg1d9.js → index-scmtzcv1.js} +2 -2
- package/dist/client/static/js/{index-bmaktvm2.js → index-syvkpnc8.js} +1 -1
- package/dist/client/static/js/index-tfqqsj2g.js +1 -0
- package/dist/client/static/js/{index-4z5ram7g.js → index-tj7xr4ta.js} +1 -1
- package/dist/client/static/js/{index-h8hjcdj1.js → index-wvw70pgd.js} +2 -2
- package/dist/client/static/js/{index-5dn4159w.js → index-wxs0x3g1.js} +2 -2
- package/dist/client/static/js/index-x507ndnc.js +314 -0
- package/dist/client/static/js/{index-gr8sqjpz.js → index-x87scjpa.js} +1 -1
- package/dist/client/static/js/{index-s5vegk6q.js → index-xtrsvm0d.js} +2 -2
- package/dist/client/static/js/{index-e8mt8rag.js → index-y1j18rha.js} +2 -2
- package/dist/client/static/js/{index-7dqq7cjp.js → index-yv2ervdj.js} +5 -5
- package/dist/client/static/js/{index-gz7kvpnm.js → index-z2pmt1bc.js} +1 -1
- package/dist/client/static/js/{index-5p8dwr4y.js → index-z446edg9.js} +1 -1
- package/dist/client/static/js/{index-a4636gt1.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-xsar9j6v.js → infoDiagram-VRGFBTTK-5mb5w005.js} +2 -2
- package/dist/client/static/js/ini-kjcpgebh.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-g2rvt9jp.js → ishikawaDiagram-OU5B5YK6-zk7fa0fm.js} +2 -2
- 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-q95v18zc.js → journeyDiagram-ZHPQQLJL-8jd7b2aw.js} +6 -6
- 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-pe5vpc2m.js → julia-nwh5w343.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-2e7m7ds3.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-kxsxr8ec.js +12 -0
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-banecvf8.js → mindmap-definition-NLK3R4M7-anx2kj3b.js} +7 -7
- 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-6erykm1c.js → pegDiagram-GJSIUBJH-9egqyzkc.js} +1 -1
- package/dist/client/static/js/{perl-cc2eqye8.js → perl-wb4wtc9x.js} +1 -1
- package/dist/client/static/js/{php-p9bvnpsv.js → php-9g594k9f.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-a9xqvysf.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-jn1d905q.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-sz4afnp1.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-ewzhhth2.js → railroadDiagram-XR7U4H2S-6vmazht2.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-fcs3xd42.js → requirementDiagram-PLB6GJNP-phs0wn1v.js} +6 -6
- package/dist/client/static/js/{ruby-65s2ca5d.js → ruby-c4hxsegh.js} +1 -1
- package/dist/client/static/js/{rust-ec1j2hwy.js → rust-e4whdswc.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-2r829rjf.js → sankeyDiagram-IPEJSGJF-vkktegjk.js} +5 -5
- package/dist/client/static/js/{sass-p6cssgq8.js → sass-6yxywx7t.js} +1 -1
- package/dist/client/static/js/{scss-qfx8wt3b.js → scss-9wz47c6t.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-3mnte9tv.js → sequenceDiagram-PO4LG4MO-37e6se72.js} +13 -13
- package/dist/client/static/js/{sizeCapture-INFHLROL-r6hf9265.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-hm2f0wdb.js → stateDiagram-v2-GCMORJYK-2nnyqs9x.js} +6 -6
- package/dist/client/static/js/{svelte-jz3a190v.js → svelte-mm3jfpje.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-s58xzqhw.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-ezm1c4pz.js → timeline-definition-EJHVYXUP-pz0f2b4h.js} +12 -12
- 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/tsx-dk8rpgtw.js +1 -0
- package/dist/client/static/js/typescript-5txwpd9t.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-ryvgs5ac.js → usecaseDiagram-POWQR4AR-hvg7a87b.js} +82 -82
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-rd5prsf1.js → vennDiagram-UO4OBE2U-03zh9phs.js} +8 -8
- package/dist/client/static/js/{vue-rv4pea8r.js → vue-rcdqpz7q.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-hbv0cg4s.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-1kt8q8a4.js → wardleyDiagram-VNRHLVJA-xy77th92.js} +4 -4
- package/dist/client/static/js/xml-vtrdnrn6.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-q39bbgq4.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/header-button/index.tsx +10 -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/apply-side-effects.test.ts +16 -0
- package/src/client/components/settings/apply-side-effects.ts +8 -0
- package/src/client/components/settings/categories/AppearanceSettings.test.tsx +1 -0
- package/src/client/components/settings/categories/AppearanceSettings.tsx +2 -0
- package/src/client/components/settings/categories/HarnessSettings.tsx +8 -0
- package/src/client/components/settings/categories/TokenUsageSettings.tsx +26 -3
- package/src/client/components/settings/categories/agent-settings/DetailPane.tsx +12 -10
- package/src/client/components/settings/categories/appearance-settings/RightSideSection.test.tsx +97 -0
- package/src/client/components/settings/categories/appearance-settings/RightSideSection.tsx +94 -0
- package/src/client/components/settings/categories/appearance-settings/groups.ts +4 -3
- 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/harness-settings/AccountLoginPanel.tsx +224 -0
- package/src/client/components/settings/categories/harness-settings/AccountsPanel.test.tsx +139 -0
- package/src/client/components/settings/categories/harness-settings/AccountsPanel.tsx +349 -0
- package/src/client/components/settings/categories/harness-settings/AddAccountForm.tsx +58 -0
- package/src/client/components/settings/categories/harness-settings/HarnessCard.tsx +33 -0
- 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/token-usage-settings/HarnessFilter.tsx +59 -0
- package/src/client/components/settings/categories/token-usage-settings/panel.test.tsx +37 -0
- package/src/client/components/settings/categories/usage-settings/limit-groups.test.ts +10 -0
- package/src/client/components/settings/categories/usage-settings/limit-groups.ts +4 -1
- package/src/client/components/settings/categories/usage-settings/providers.ts +28 -0
- package/src/client/components/settings/categories/usage-settings/usage-visibility.test.ts +60 -0
- package/src/client/components/settings/categories/voice-settings/SpeechSettings.test.tsx +147 -5
- package/src/client/components/settings/categories/voice-settings/SpeechSettings.tsx +27 -3
- package/src/client/components/settings/categories/voice-settings/speech/EndpointSection.tsx +11 -3
- 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 +123 -50
- 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/components/workspace/usage-panel/index.test.tsx +92 -12
- package/src/client/components/workspace/usage-panel/index.tsx +48 -12
- package/src/client/data/mock/chat.ts +17 -0
- package/src/client/data/mock/token-usage.ts +53 -10
- package/src/client/data/samples/tools-session.ts +8 -5
- package/src/client/hooks/chat/timeline/reader-input.ts +53 -1
- package/src/client/hooks/chat/timeline/scroll-activity.test.ts +103 -0
- package/src/client/hooks/chat/timeline/scroll-geometry.ts +9 -4
- package/src/client/hooks/chat/timeline/scroll.ts +19 -2
- package/src/client/hooks/editor/font.test.ts +21 -0
- package/src/client/hooks/editor/font.ts +12 -9
- package/src/client/hooks/models/harness-accounts.ts +143 -0
- package/src/client/hooks/models/harness-catalog.ts +9 -2
- package/src/client/hooks/models/use-harnesses-controller.ts +12 -0
- package/src/client/hooks/models/use-harnesses.ts +14 -0
- package/src/client/hooks/settings/hide-empty-providers.test.ts +132 -0
- package/src/client/hooks/settings/hide-empty-providers.ts +49 -0
- package/src/client/hooks/settings/local-tts-models.ts +164 -0
- package/src/client/hooks/settings/useTokenUsage.ts +7 -2
- 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/hooks/workspace/panel-tabs.ts +1 -1
- package/src/client/hooks/workspace/right-side.test.ts +75 -1
- package/src/client/hooks/workspace/right-side.ts +71 -10
- 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/antigravity/home.server.ts +27 -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/db/schema.ts +5 -1
- package/src/server/lib/harness/account-identity.server.ts +163 -0
- package/src/server/lib/harness/account-login.server.test.ts +151 -0
- package/src/server/lib/harness/account-login.server.ts +232 -0
- package/src/server/lib/harness/accounts.server.ts +339 -0
- package/src/server/lib/harness/accounts.test.ts +147 -0
- package/src/server/lib/harness/acp/background-probe.test.ts +314 -0
- package/src/server/lib/harness/acp/background-probe.ts +288 -0
- package/src/server/lib/harness/acp/background-replay.test.ts +37 -1
- package/src/server/lib/harness/acp/background-replay.ts +8 -3
- package/src/server/lib/harness/acp/background-work.test.ts +4 -194
- package/src/server/lib/harness/acp/background-work.ts +4 -207
- package/src/server/lib/harness/acp/client.ts +3 -0
- package/src/server/lib/harness/acp/commands.ts +2 -2
- 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/one-shot.server.ts +4 -2
- package/src/server/lib/harness/acp/prewarm.server.ts +21 -16
- package/src/server/lib/harness/acp/replay-transcript.ts +6 -1
- package/src/server/lib/harness/acp/session-background.test.ts +2 -1
- package/src/server/lib/harness/acp/session-intake.test.ts +8 -0
- package/src/server/lib/harness/acp/session-intake.ts +12 -3
- package/src/server/lib/harness/acp/session-options.ts +2 -0
- package/src/server/lib/harness/acp/session-process.ts +1 -0
- package/src/server/lib/harness/acp/session-wiring.test.ts +2 -0
- package/src/server/lib/harness/acp/session-wiring.ts +22 -0
- package/src/server/lib/harness/acp/session.ts +3 -3
- package/src/server/lib/harness/acp/stdio.test.ts +52 -0
- package/src/server/lib/harness/acp/stdio.ts +7 -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/auto-probe.server.ts +2 -2
- 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/harness/launch-table.ts +6 -1
- package/src/server/lib/harness/launch.ts +1 -0
- package/src/server/lib/harness/schema.server.ts +37 -0
- package/src/server/lib/harness/session-delete.server.ts +4 -2
- package/src/server/lib/harness/session-import.server.ts +21 -7
- package/src/server/lib/harness/session-store.server.test.ts +12 -0
- package/src/server/lib/harness/session-store.server.ts +21 -6
- package/src/server/lib/harness/session-transcript.server.ts +2 -1
- package/src/server/lib/harness/spawn.server.ts +27 -6
- package/src/server/lib/lifecycle/paths.ts +12 -0
- package/src/server/lib/models/provider-icon-fetch.test.ts +57 -3
- package/src/server/lib/models/provider-icon-fetch.ts +9 -1
- package/src/server/lib/models/provider-icon-store.server.ts +61 -0
- package/src/server/lib/models/provider-icon-store.test.ts +55 -0
- package/src/server/lib/models/provider-icon-svg.ts +57 -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/schedule/runtime.server.ts +4 -1
- package/src/server/lib/sessions/dispatch.server.ts +4 -1
- package/src/server/lib/sessions/fork.server.ts +2 -0
- package/src/server/lib/sessions/resolve.server.ts +4 -0
- package/src/server/lib/sessions/spawn.server.ts +4 -2
- package/src/server/lib/tts/engines/adapters.test.ts +50 -8
- package/src/server/lib/tts/engines/deepgram.ts +30 -9
- package/src/server/lib/tts/engines/elevenlabs.ts +6 -0
- package/src/server/lib/tts/engines/gemini.ts +116 -0
- package/src/server/lib/tts/engines/index.ts +14 -0
- package/src/server/lib/tts/engines/local.ts +53 -0
- package/src/server/lib/tts/engines/openai.ts +21 -4
- 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/lib/usage/antigravity-quota.test.ts +249 -0
- package/src/server/lib/usage/antigravity-quota.ts +197 -0
- package/src/server/lib/usage/antigravity.test.ts +20 -0
- package/src/server/lib/usage/antigravity.ts +267 -0
- package/src/server/lib/usage/index-harness.test.ts +162 -0
- package/src/server/lib/usage/index-parse.test.ts +1 -0
- package/src/server/lib/usage/index-parse.ts +12 -4
- package/src/server/lib/usage/index-query.server.ts +64 -2
- package/src/server/lib/usage/index-scan.server.ts +68 -152
- package/src/server/lib/usage/index-schema.server.ts +24 -8
- package/src/server/lib/usage/index-schema.test.ts +54 -0
- package/src/server/lib/usage/index-sources.server.ts +54 -0
- package/src/server/lib/usage/providers.server.test.ts +67 -1
- package/src/server/lib/usage/providers.server.ts +82 -3
- package/src/server/lib/usage/sources/claude.server.ts +187 -0
- package/src/server/lib/usage/sources/claude.test.ts +86 -0
- package/src/server/lib/usage/sources/codex.server.ts +155 -0
- package/src/server/lib/usage/sources/codex.test.ts +53 -0
- package/src/server/lib/usage/sources/dsh.server.ts +120 -0
- package/src/server/lib/usage/sources/dsh.test.ts +49 -0
- package/src/server/lib/usage/sources/helpers.ts +191 -0
- package/src/server/lib/usage/sources/jsonl.server.ts +78 -0
- package/src/server/lib/usage/sources/jsonl.test.ts +72 -0
- package/src/server/lib/usage/sources/omp.server.ts +124 -0
- package/src/server/lib/usage/sources/opencode.server.ts +203 -0
- package/src/server/lib/usage/sources/opencode.test.ts +104 -0
- package/src/server/lib/usage/sources/qwen.server.ts +122 -0
- package/src/server/lib/usage/sources/qwen.test.ts +62 -0
- package/src/server/lib/usage/sources/types.ts +53 -0
- package/src/server/lib/usage/sources/zcode.server.ts +131 -0
- package/src/server/lib/usage/sources/zcode.test.ts +87 -0
- package/src/server/routes/agent/harness-command.ts +2 -0
- package/src/server/routes/agent/prewarm.ts +7 -2
- 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/harness/accounts.test.ts +99 -0
- package/src/server/routes/harness/accounts.ts +106 -0
- package/src/server/routes/harness/root.ts +13 -1
- package/src/server/routes/sessions/local-image.ts +2 -2
- package/src/server/routes/telemetry/tokens.test.ts +20 -0
- package/src/server/routes/telemetry/tokens.ts +12 -3
- 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/server/routes/tts/speak.test.ts +40 -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/harness/accounts.test.ts +41 -0
- package/src/shared/lib/harness/accounts.ts +175 -0
- package/src/shared/lib/icons/tint-hues.generated.ts +26 -25
- package/src/shared/lib/markdown/ascii-art.test.ts +154 -0
- package/src/shared/lib/markdown/ascii-art.ts +158 -0
- 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/markdown/marked.ts +24 -2
- package/src/shared/lib/models/provider/identity.test.ts +34 -0
- package/src/shared/lib/models/provider/identity.ts +28 -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/settings/defaults.ts +2 -0
- package/src/shared/lib/tts/engines.test.ts +39 -2
- package/src/shared/lib/tts/engines.ts +87 -61
- 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/settings.ts +1 -1
- 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 +204 -0
- package/src/shared/lib/workspace/right-side-hidden.ts +57 -0
- package/src/shared/lib/workspace/session-state/store.ts +7 -5
- package/src/shared/types/chat.ts +3 -0
- package/src/shared/types/harness.ts +5 -0
- package/src/shared/types/index.ts +1 -0
- package/src/shared/types/settings/state.ts +12 -0
- package/src/shared/types/tokenUsage.ts +21 -0
- package/src/shared/types/tool-render.ts +37 -0
- package/src/test-support/preload.ts +9 -0
- package/dist/client/static/js/ImageView-g50pk5pt.js +0 -1
- package/dist/client/static/js/LayoutWrapper-tag0qpts.js +0 -2
- package/dist/client/static/js/MergeDiffView-c4mb8m1w.js +0 -1
- package/dist/client/static/js/Modal-pf9p6m1k.js +0 -59
- package/dist/client/static/js/SessionsView-2r1grxxs.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-ee9wjsht.js +0 -1
- package/dist/client/static/js/architectureDiagram-NJMV4G6O-278nx8rt.js +0 -36
- package/dist/client/static/js/bash-36shcpcw.js +0 -1
- package/dist/client/static/js/c-kxeqssf9.js +0 -1
- package/dist/client/static/js/cose-bilkent-JH36ORCC-ydq7mvy0.js +0 -1
- package/dist/client/static/js/cpp-wtk1s3d7.js +0 -1
- package/dist/client/static/js/css-0a0r6rp3.js +0 -1
- package/dist/client/static/js/css-xhnrhg4e.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-gs16zjqa.js +0 -1
- package/dist/client/static/js/diagram-3UASUU5V-06nptkzc.js +0 -24
- package/dist/client/static/js/eventmodeling-NTZA5JFV-ftz7zrz5.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-ax0qfmp3.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-3rtkds4s.js +0 -1
- package/dist/client/static/js/gitGraphDiagram-X574FWY7-5p9mgq7n.js +0 -106
- package/dist/client/static/js/graphql-w9ajhndp.js +0 -1
- package/dist/client/static/js/html-krfbq5wp.js +0 -1
- package/dist/client/static/js/index-05n22cg9.js +0 -4
- package/dist/client/static/js/index-14dgbjsm.js +0 -2
- package/dist/client/static/js/index-2jgx68m0.js +0 -1
- package/dist/client/static/js/index-333rq9yy.js +0 -1
- package/dist/client/static/js/index-38g2eevc.js +0 -314
- package/dist/client/static/js/index-80fjn77c.js +0 -2
- package/dist/client/static/js/index-9wc36am3.css +0 -1
- package/dist/client/static/js/index-bvpzzhn2.js +0 -4
- package/dist/client/static/js/index-e19dbqd3.js +0 -2
- package/dist/client/static/js/index-epzvftkq.js +0 -1
- package/dist/client/static/js/index-fbg5vhhw.js +0 -2
- package/dist/client/static/js/index-mbtenbyc.js +0 -9
- package/dist/client/static/js/index-pv4z2mp2.js +0 -463
- package/dist/client/static/js/index-t522tpxt.js +0 -3
- package/dist/client/static/js/index-xw1bptp5.js +0 -2
- package/dist/client/static/js/index-yr3exz70.js +0 -2
- package/dist/client/static/js/index-zdw8bd5t.js +0 -2
- package/dist/client/static/js/index-zyefab6q.js +0 -1
- package/dist/client/static/js/info-A6RAGUB7-vr5mxm6f.js +0 -1
- package/dist/client/static/js/ini-zx7x1jj1.js +0 -1
- package/dist/client/static/js/java-bbw6kdcr.js +0 -1
- package/dist/client/static/js/javascript-p2a8rbpw.js +0 -1
- package/dist/client/static/js/json-zh7m2fyg.js +0 -1
- package/dist/client/static/js/jsx-3zyyt0eh.js +0 -1
- package/dist/client/static/js/lua-d656k76a.js +0 -1
- package/dist/client/static/js/markdown-b5w681mm.js +0 -1
- package/dist/client/static/js/mermaid.core-dzajkp0g.js +0 -12
- package/dist/client/static/js/one-dark-pro-z965dedc.js +0 -1
- package/dist/client/static/js/one-light-capdx801.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-ncb5xxtn.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-ff8fpvc4.js +0 -1
- package/dist/client/static/js/properties-3c6rmnqp.js +0 -1
- package/dist/client/static/js/python-a3x3zpv1.js +0 -1
- package/dist/client/static/js/r-7h3gwype.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-gbj4b1hf.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-ndv5tqgr.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-yjzj09s1.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-e6pw7e5z.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-9734dxy4.js +0 -1
- package/dist/client/static/js/sql-7a5vavm0.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-z4pt2kn1.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-rs10d4p5.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-ey6c5x9f.js +0 -1
- package/dist/client/static/js/tsx-4a9b8tqf.js +0 -1
- package/dist/client/static/js/typescript-kas107wb.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-kd9swrdr.js +0 -1
- package/dist/client/static/js/xml-3g4bdtpa.js +0 -1
- package/dist/client/static/js/yaml-ktxjn917.js +0 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { useState } from 'preact/hooks';
|
|
2
|
-
import { Check, ChevronDown } from 'lucide-preact';
|
|
1
|
+
import { useMemo, useState } from 'preact/hooks';
|
|
2
|
+
import { Check, ChevronDown, Search } from 'lucide-preact';
|
|
3
3
|
import type { PresetProviderOption } from '@/shared/types/settings/provider';
|
|
4
4
|
import { groupProviderPresets } from '@/shared/lib/models/provider/presets';
|
|
5
|
+
import { matchesPickerQuery } from '@/shared/lib/ui/picker-filter';
|
|
5
6
|
import { ProviderIconPlate } from '@/client/components/common/provider-icon/Plate';
|
|
6
7
|
|
|
7
8
|
interface PresetPickerProps {
|
|
@@ -18,10 +19,20 @@ interface PresetPickerProps {
|
|
|
18
19
|
* models.yml, and an "Other dialects" entry exists precisely because the
|
|
19
20
|
* endpoint is NOT OpenAI-shaped. Listing them in one flat grid made a keyless
|
|
20
21
|
* Ollama row look like a hosted API that would ask for a key.
|
|
22
|
+
*
|
|
23
|
+
* The catalog grows with every provider omp learns, so it is SEARCHED like the
|
|
24
|
+
* app's other catalogs rather than scrolled; the groups keep the order the
|
|
25
|
+
* source gave them.
|
|
21
26
|
*/
|
|
22
27
|
export function PresetPicker({ presets, selectedPresetId, onSelectPreset }: PresetPickerProps) {
|
|
23
28
|
const [collapsed, setCollapsed] = useState<Record<string, boolean>>({});
|
|
24
|
-
const
|
|
29
|
+
const [query, setQuery] = useState('');
|
|
30
|
+
|
|
31
|
+
const visible = useMemo(
|
|
32
|
+
() => presets.filter((preset) => matchesPickerQuery(`${preset.name} ${preset.slug} ${preset.group}`, query)),
|
|
33
|
+
[presets, query],
|
|
34
|
+
);
|
|
35
|
+
const groups = groupProviderPresets(visible);
|
|
25
36
|
|
|
26
37
|
if (presets.length === 0) {
|
|
27
38
|
return (
|
|
@@ -32,54 +43,72 @@ export function PresetPicker({ presets, selectedPresetId, onSelectPreset }: Pres
|
|
|
32
43
|
}
|
|
33
44
|
|
|
34
45
|
return (
|
|
35
|
-
<div className="
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
<div className="space-y-2">
|
|
47
|
+
<div className="flex items-center gap-1.5 rounded-lg border border-ink/15 bg-paper px-2 py-1.5">
|
|
48
|
+
<Search size={12} className="shrink-0 text-ink/40" />
|
|
49
|
+
<input
|
|
50
|
+
type="text"
|
|
51
|
+
value={query}
|
|
52
|
+
onInput={(event) => setQuery(event.currentTarget.value)}
|
|
53
|
+
aria-label="Search providers"
|
|
54
|
+
placeholder="Search providers…"
|
|
55
|
+
className="min-w-0 flex-1 bg-transparent text-xs text-ink outline-none placeholder:text-ink/35"
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<div className="max-h-52 scrollbar-overlay-container pr-1 space-y-2">
|
|
60
|
+
{groups.length === 0 ? (
|
|
61
|
+
<p className="px-2 py-3 text-xs italic text-ink/40">No match for “{query.trim()}”</p>
|
|
62
|
+
) : null}
|
|
63
|
+
|
|
64
|
+
{groups.map((entry) => {
|
|
65
|
+
const isCollapsed = collapsed[entry.group] === true;
|
|
66
|
+
return (
|
|
67
|
+
<div key={entry.group}>
|
|
68
|
+
<button
|
|
69
|
+
type="button"
|
|
70
|
+
onClick={() => setCollapsed((prev) => ({ ...prev, [entry.group]: !isCollapsed }))}
|
|
71
|
+
className="w-full flex items-center gap-1.5 px-0.5 py-1 text-[10px] font-semibold tracking-wider text-ink/50 uppercase hover:text-ink/80 transition-colors cursor-pointer"
|
|
72
|
+
>
|
|
73
|
+
<ChevronDown
|
|
74
|
+
size={11}
|
|
75
|
+
className={`transition-transform ${isCollapsed ? '-rotate-90' : ''}`}
|
|
76
|
+
/>
|
|
77
|
+
<span>{entry.group}</span>
|
|
78
|
+
<span className="text-ink/30 normal-case tracking-normal">{entry.options.length}</span>
|
|
79
|
+
</button>
|
|
52
80
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
{!isCollapsed && (
|
|
82
|
+
<div className="grid grid-cols-2 gap-2 pt-1">
|
|
83
|
+
{entry.options.map((preset) => {
|
|
84
|
+
const isSelected = preset.id === selectedPresetId;
|
|
85
|
+
return (
|
|
86
|
+
<button
|
|
87
|
+
key={preset.id}
|
|
88
|
+
type="button"
|
|
89
|
+
onClick={() => onSelectPreset(preset)}
|
|
90
|
+
title={preset.defaultUrl}
|
|
91
|
+
className={`flex items-center gap-2 p-2 rounded-lg border text-left text-xs transition-colors cursor-pointer ${
|
|
92
|
+
isSelected
|
|
93
|
+
? 'border-ink/50 bg-ink/5 font-semibold text-ink shadow-2xs'
|
|
94
|
+
: 'border-ink/15 hover:border-ink/30 text-ink/70'
|
|
95
|
+
}`}
|
|
96
|
+
>
|
|
97
|
+
<ProviderIconPlate
|
|
98
|
+
provider={{ icon: preset.icon, slug: preset.slug, name: preset.name }}
|
|
99
|
+
size={18}
|
|
100
|
+
/>
|
|
101
|
+
<span className="truncate flex-1">{preset.name}</span>
|
|
102
|
+
{isSelected && <Check size={12} className="shrink-0 text-ink" />}
|
|
103
|
+
</button>
|
|
104
|
+
);
|
|
105
|
+
})}
|
|
106
|
+
</div>
|
|
107
|
+
)}
|
|
108
|
+
</div>
|
|
109
|
+
);
|
|
110
|
+
})}
|
|
111
|
+
</div>
|
|
83
112
|
</div>
|
|
84
113
|
);
|
|
85
114
|
}
|
|
@@ -111,7 +111,7 @@ describe('ModelCapabilitiesModal', () => {
|
|
|
111
111
|
});
|
|
112
112
|
|
|
113
113
|
describe('AddModelModal', () => {
|
|
114
|
-
test('offers the kind picker, so a non-chat model is not registered as chat', () => {
|
|
114
|
+
test('offers the kind picker, so a non-chat model is not registered as chat', async () => {
|
|
115
115
|
act(() => {
|
|
116
116
|
render(
|
|
117
117
|
h(AddModelModal, {
|
|
@@ -125,11 +125,18 @@ describe('AddModelModal', () => {
|
|
|
125
125
|
);
|
|
126
126
|
});
|
|
127
127
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
)
|
|
131
|
-
expect(
|
|
132
|
-
expect(
|
|
133
|
-
|
|
128
|
+
// The kind is a searchable select now: the trigger names the current value
|
|
129
|
+
// and the rows are portalled, so the list is read from `document.body`.
|
|
130
|
+
const trigger = container.querySelector('button[role="combobox"][aria-label="Model kind"]') as HTMLButtonElement | null;
|
|
131
|
+
expect(trigger).not.toBeNull();
|
|
132
|
+
expect(trigger!.textContent).toContain('Chat');
|
|
133
|
+
|
|
134
|
+
await act(async () => {
|
|
135
|
+
trigger!.dispatchEvent(new window.MouseEvent('click', { bubbles: true }));
|
|
136
|
+
await Promise.resolve();
|
|
137
|
+
});
|
|
138
|
+
const kinds = [...document.querySelectorAll('[role="option"]')].map((option) => option.textContent);
|
|
139
|
+
expect(kinds).toContain('Embedding');
|
|
140
|
+
expect(kinds).toContain('Rerank');
|
|
134
141
|
});
|
|
135
142
|
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { UsageHarnessRow } from '@/shared/types';
|
|
2
|
+
import { costLabel } from '@/shared/lib/usage/view';
|
|
3
|
+
|
|
4
|
+
interface TokenUsageHarnessFilterProps {
|
|
5
|
+
harnesses: UsageHarnessRow[];
|
|
6
|
+
selected: string;
|
|
7
|
+
onSelect: (harness: string) => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The harness chips.
|
|
12
|
+
*
|
|
13
|
+
* A chip row rather than another dropdown: the choice is a short list of the
|
|
14
|
+
* agents that actually recorded usage, and the counts are the context needed to
|
|
15
|
+
* choose one — a menu would hide them behind a click on every period change.
|
|
16
|
+
*
|
|
17
|
+
* Only harnesses the index READ are listed (the payload says so), because a
|
|
18
|
+
* filter entry that can only ever empty the panel is worse than no entry.
|
|
19
|
+
*/
|
|
20
|
+
export function TokenUsageHarnessFilter({ harnesses, selected, onSelect }: TokenUsageHarnessFilterProps) {
|
|
21
|
+
if (harnesses.length === 0) return null;
|
|
22
|
+
const total = harnesses.reduce(
|
|
23
|
+
(acc, row) => {
|
|
24
|
+
acc.records += row.records;
|
|
25
|
+
acc.cost += row.cost;
|
|
26
|
+
return acc;
|
|
27
|
+
},
|
|
28
|
+
{ records: 0, cost: 0 },
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div className="flex min-w-0 items-center gap-2">
|
|
33
|
+
<span className="shrink-0 font-mono text-[10px] font-semibold uppercase tracking-wider text-ink/40">
|
|
34
|
+
Harness
|
|
35
|
+
</span>
|
|
36
|
+
<div role="group" aria-label="Filter by harness" className="flex min-w-0 gap-1 overflow-x-auto pb-0.5">
|
|
37
|
+
{[{ id: 'all', name: 'All', records: total.records, cost: total.cost }, ...harnesses].map((row) => (
|
|
38
|
+
<button
|
|
39
|
+
key={row.id}
|
|
40
|
+
type="button"
|
|
41
|
+
aria-pressed={selected === row.id}
|
|
42
|
+
onClick={() => onSelect(row.id)}
|
|
43
|
+
title={`${row.name} · ${costLabel(row.cost)}`}
|
|
44
|
+
className={`shrink-0 rounded-full border px-2 py-0.5 text-[10px] font-medium transition-colors ${
|
|
45
|
+
selected === row.id
|
|
46
|
+
? 'border-ink/70 bg-ink text-paper'
|
|
47
|
+
: 'border-ink/10 bg-ink/5 text-ink/65 hover:bg-ink/10'
|
|
48
|
+
}`}
|
|
49
|
+
>
|
|
50
|
+
{row.name}{' '}
|
|
51
|
+
<span className={`ml-1 tabular-nums ${selected === row.id ? 'text-paper/70' : 'text-ink/35'}`}>
|
|
52
|
+
{row.records.toLocaleString('en-US')}
|
|
53
|
+
</span>
|
|
54
|
+
</button>
|
|
55
|
+
))}
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
@@ -23,6 +23,7 @@ import { h, render } from 'preact';
|
|
|
23
23
|
import { act } from 'preact/test-utils';
|
|
24
24
|
import { TokenUsageControls } from '@/client/components/settings/categories/token-usage-settings/Controls';
|
|
25
25
|
import { TokenUsageBreakdown } from '@/client/components/settings/categories/token-usage-settings/Breakdown';
|
|
26
|
+
import { TokenUsageHarnessFilter } from '@/client/components/settings/categories/token-usage-settings/HarnessFilter';
|
|
26
27
|
import { dayRows, providerModelRows } from '@/shared/lib/usage/breakdown';
|
|
27
28
|
import { timeRangeOptions } from '@/shared/lib/usage/range';
|
|
28
29
|
import type { UsageProviderRow, UsageTotals } from '@/shared/types';
|
|
@@ -237,3 +238,39 @@ describe('TokenUsageBreakdown', () => {
|
|
|
237
238
|
expect(text.match(/deepseek-v4-1-flash/g)).toHaveLength(1);
|
|
238
239
|
});
|
|
239
240
|
});
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
describe('TokenUsageHarnessFilter', () => {
|
|
244
|
+
const row = (id: string, name: string, cost: number, records: number) => ({
|
|
245
|
+
id, name, cost, records,
|
|
246
|
+
tokens: 0, input: 0, output: 0, cacheRead: 0, cacheWrite: 0, reasoning: 0,
|
|
247
|
+
cacheReadCost: 0, unpriced: 0,
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
const filter = (selected: string): string[] => {
|
|
251
|
+
const picked: string[] = [];
|
|
252
|
+
render(
|
|
253
|
+
h(TokenUsageHarnessFilter, {
|
|
254
|
+
harnesses: [row('omp-rpc', 'omp', 4, 10), row('claude', 'claude', 1, 2), row('codex', 'codex', 0, 0)],
|
|
255
|
+
selected,
|
|
256
|
+
onSelect: (id: string) => picked.push(id),
|
|
257
|
+
}),
|
|
258
|
+
container,
|
|
259
|
+
);
|
|
260
|
+
return picked;
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
test('renders All plus every harness, including one with no turns this period', () => {
|
|
264
|
+
filter('all');
|
|
265
|
+
const labels = [...container.querySelectorAll('button')].map((button) => button.textContent?.replace(/\s+/g, ' ').trim());
|
|
266
|
+
expect(labels).toEqual(['All 12', 'omp 10', 'claude 2', 'codex 0']);
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
test('reports the clicked harness and marks the active one', () => {
|
|
270
|
+
const picked = filter('claude');
|
|
271
|
+
const buttons = [...container.querySelectorAll('button')];
|
|
272
|
+
expect(buttons.find((button) => button.textContent?.startsWith('claude'))?.getAttribute('aria-pressed')).toBe('true');
|
|
273
|
+
act(() => buttons.find((button) => button.textContent?.startsWith('codex'))?.click());
|
|
274
|
+
expect(picked).toEqual(['codex']);
|
|
275
|
+
});
|
|
276
|
+
});
|
|
@@ -88,6 +88,16 @@ describe('groupProviderLimits', () => {
|
|
|
88
88
|
expect(groups[0]?.limits).toHaveLength(1);
|
|
89
89
|
});
|
|
90
90
|
|
|
91
|
+
test("the CLI's own slug gets the same family sections as omp's", () => {
|
|
92
|
+
// Kabmo reads Antigravity's quota locally under `antigravity-cli` when omp
|
|
93
|
+
// has no provider row; the sections must not depend on which slug it is.
|
|
94
|
+
const groups = groupProviderLimits('antigravity-cli', [
|
|
95
|
+
limit('antigravity-cli:google:default:weekly'),
|
|
96
|
+
limit('antigravity-cli:anthropic:default:5h'),
|
|
97
|
+
]);
|
|
98
|
+
expect(groups.map((group) => group.title)).toEqual(['Google', 'Claude & GPT (shared)']);
|
|
99
|
+
});
|
|
100
|
+
|
|
91
101
|
test('no limits means no groups, so the caller draws its empty state', () => {
|
|
92
102
|
expect(groupProviderLimits('anthropic', [])).toEqual([]);
|
|
93
103
|
});
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
27
|
import type { UsageLimitWindow } from '@/shared/types';
|
|
28
|
+
import { isAntigravityProviderSlug } from '@/shared/lib/models/provider/identity';
|
|
28
29
|
|
|
29
30
|
export interface LimitGroup {
|
|
30
31
|
/** Stable key inside one provider's section: `windows`, `balance`, `google`, … */
|
|
@@ -113,6 +114,8 @@ export function groupProviderLimits(providerId: string, limits: UsageLimitWindow
|
|
|
113
114
|
if (limits.length === 0) return [];
|
|
114
115
|
const slug = providerId.trim().toLowerCase();
|
|
115
116
|
if (slug === 'anthropic') return groupClaude(limits);
|
|
116
|
-
|
|
117
|
+
// omp names the provider `google-antigravity`, the Antigravity CLI installs
|
|
118
|
+
// as `antigravity-cli`; both emit one row per model family and window.
|
|
119
|
+
if (isAntigravityProviderSlug(slug)) return groupAntigravity(limits);
|
|
117
120
|
return [{ id: 'all', title: QUOTA_TITLE, limits: [...limits] }];
|
|
118
121
|
}
|
|
@@ -51,6 +51,34 @@ function limitHint(limits: UsageLimitWindow[]): string | undefined {
|
|
|
51
51
|
return binding.windowLabel ? `${percent}% · ${binding.windowLabel}` : `${percent}% used`;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Whether the Usage panel has anything to draw for this provider: native quota
|
|
56
|
+
* windows, or a rich report that came back with data (kenari wallet/quota/
|
|
57
|
+
* usage, DeepSeek or Token Portal balance, Token Harbor allowance).
|
|
58
|
+
*
|
|
59
|
+
* The rich objects count only by their payload. A report carrying just an
|
|
60
|
+
* `error` (the server returns `{ error }` when the upstream call failed) is a
|
|
61
|
+
* failure, never usage.
|
|
62
|
+
*
|
|
63
|
+
* A provider whose read FAILED is kept whatever else it has: the error is the
|
|
64
|
+
* card's content, and dropping it would hide the one row that explains why a
|
|
65
|
+
* configured provider is silent. Everything else with no data — an untracked
|
|
66
|
+
* gateway, or an adapter that returned nothing — is what the panel's
|
|
67
|
+
* "hide providers without quota" filter removes.
|
|
68
|
+
*/
|
|
69
|
+
export function hasUsageToShow(summary: UsageProviderSummary): boolean {
|
|
70
|
+
if (summary.error) return true;
|
|
71
|
+
if (summary.limits.length > 0) return true;
|
|
72
|
+
return Boolean(
|
|
73
|
+
summary.kenari?.balance
|
|
74
|
+
|| summary.kenari?.usage
|
|
75
|
+
|| summary.kenari?.quota
|
|
76
|
+
|| summary.deepseek?.balance
|
|
77
|
+
|| summary.tokenHarbor?.allowance
|
|
78
|
+
|| summary.tokenPortal?.balance,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
54
82
|
/** Derives the provider list (status + hint) from a usage report. */
|
|
55
83
|
export function buildProviders(report: UsageReport): ProviderEntry[] {
|
|
56
84
|
return report.providers.map((summary) => ({
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* `hasUsageToShow` decides which cards the Usage panel's hide filter drops.
|
|
8
|
+
*
|
|
9
|
+
* The cases a wrong implementation gets silently:
|
|
10
|
+
*
|
|
11
|
+
* - A rich report counts by its PAYLOAD. The server returns `{ error }` when an
|
|
12
|
+
* upstream call fails, so a `summary.kenari` that is present but carries only
|
|
13
|
+
* an error is a failure, not usage — treating presence as usage would keep
|
|
14
|
+
* exactly the cards the filter exists to remove.
|
|
15
|
+
* - A failed read is KEPT whatever its windows say. Hiding it would be a silent
|
|
16
|
+
* fallback: the panel would lose the one row that explains why a configured
|
|
17
|
+
* provider reports nothing.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { describe, expect, test } from 'bun:test';
|
|
21
|
+
import { hasUsageToShow } from '@/client/components/settings/categories/usage-settings/providers';
|
|
22
|
+
import type { UsageLimitWindow, UsageProviderSummary } from '@/shared/types';
|
|
23
|
+
|
|
24
|
+
const window = (overrides: Partial<UsageLimitWindow> = {}): UsageLimitWindow =>
|
|
25
|
+
({ id: 'w', label: 'Window', unit: 'percent', status: 'ok', ...overrides }) as UsageLimitWindow;
|
|
26
|
+
|
|
27
|
+
const summary = (overrides: Partial<UsageProviderSummary> = {}): UsageProviderSummary =>
|
|
28
|
+
({ id: 'p', name: 'P', credentialSources: [], tracked: true, limits: [], ...overrides }) as UsageProviderSummary;
|
|
29
|
+
|
|
30
|
+
describe('hasUsageToShow', () => {
|
|
31
|
+
test('a native window is usage', () => {
|
|
32
|
+
expect(hasUsageToShow(summary({ limits: [window({ usedFraction: 0.1 })] }))).toBe(true);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
test('a provider with no quota source and no balance endpoint is not', () => {
|
|
36
|
+
// The card's whole body is "No quota source for this provider" — the row the
|
|
37
|
+
// panel's hide filter exists to drop.
|
|
38
|
+
expect(hasUsageToShow(summary({ tracked: false, limits: [] }))).toBe(false);
|
|
39
|
+
expect(hasUsageToShow(summary({ tracked: true, limits: [], limitsUnavailable: true }))).toBe(false);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test('a rich report counts by its payload, not by its presence', () => {
|
|
43
|
+
expect(hasUsageToShow(summary({ deepseek: { balance: { isAvailable: true, entries: [] } } }))).toBe(true);
|
|
44
|
+
expect(hasUsageToShow(summary({ kenari: { quota: { planName: null, windows: [], coupon: null } } }))).toBe(true);
|
|
45
|
+
expect(hasUsageToShow(summary({
|
|
46
|
+
tokenPortal: {
|
|
47
|
+
balance: {
|
|
48
|
+
label: null, currency: 'IDR', balance: 0, limit: null,
|
|
49
|
+
limitRemaining: null, isFreeTier: false, sessionBudget: null,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
}))).toBe(true);
|
|
53
|
+
expect(hasUsageToShow(summary({ deepseek: { error: 'unreachable' } }))).toBe(false);
|
|
54
|
+
expect(hasUsageToShow(summary({ kenari: { error: 'kenari quota failed' }, tokenHarbor: { error: 'unreachable' } }))).toBe(false);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test('a failed read is kept, whatever the windows say', () => {
|
|
58
|
+
expect(hasUsageToShow(summary({ error: 'invalid or expired credential', limits: [] }))).toBe(true);
|
|
59
|
+
});
|
|
60
|
+
});
|
|
@@ -26,11 +26,27 @@ const originalFetch = globalThis.fetch;
|
|
|
26
26
|
|
|
27
27
|
type Updater = Partial<SettingsState> | ((prev: SettingsState) => SettingsState);
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
const SUPERTONIC = {
|
|
30
|
+
id: 'supertonic-3',
|
|
31
|
+
label: 'Supertonic 3',
|
|
32
|
+
arch: 'supertonic',
|
|
33
|
+
languages: ['en', 'id'],
|
|
34
|
+
defaultLanguage: 'en',
|
|
35
|
+
voices: 2,
|
|
36
|
+
voiceLabels: ['Female 1', 'Male 1'],
|
|
37
|
+
sampleRate: 44100,
|
|
38
|
+
sizeBytes: 146_000_000,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
function stubServer(
|
|
42
|
+
local: { available: boolean; reason?: string } = { available: true },
|
|
43
|
+
models: Record<string, unknown> = { models: [], catalog: [], jobs: [], runtime: { available: true } },
|
|
44
|
+
): void {
|
|
45
|
+
globalThis.fetch = (async (input: RequestInfo | URL) => {
|
|
46
|
+
const url = typeof input === 'string' ? input : input instanceof URL ? input.pathname : input.url;
|
|
47
|
+
if (url.includes('/api/tts/models')) return Response.json(models);
|
|
48
|
+
return Response.json({ settings: { ...DEFAULT_SETTINGS.tts, hasKeys: {} }, local });
|
|
49
|
+
}) as unknown as typeof fetch;
|
|
34
50
|
}
|
|
35
51
|
|
|
36
52
|
function mount(onUpdate: (updater: Updater) => void, overrides: Partial<SettingsState['tts']> = {}): HTMLElement {
|
|
@@ -109,4 +125,130 @@ describe('SpeechSettings', () => {
|
|
|
109
125
|
});
|
|
110
126
|
expect(host.textContent).toContain('This omp build has no say command.');
|
|
111
127
|
});
|
|
128
|
+
|
|
129
|
+
test('a hosted engine offers Indonesian and writes it to the tts object', async () => {
|
|
130
|
+
stubServer();
|
|
131
|
+
let patch: Updater | undefined;
|
|
132
|
+
const host = mount((updater) => { patch = updater; }, { engine: 'openai' });
|
|
133
|
+
|
|
134
|
+
const label = [...host.querySelectorAll('label')].find((element) =>
|
|
135
|
+
element.textContent?.includes('Language'),
|
|
136
|
+
);
|
|
137
|
+
const trigger = label?.querySelector('button[role="combobox"]') as HTMLButtonElement | null;
|
|
138
|
+
expect(trigger).not.toBeNull();
|
|
139
|
+
expect(trigger!.getAttribute('aria-label')).toBe('Language');
|
|
140
|
+
|
|
141
|
+
await act(async () => { trigger!.click(); });
|
|
142
|
+
const options = [...document.querySelectorAll('[role="option"]')] as HTMLButtonElement[];
|
|
143
|
+
expect(options.map((option) => option.textContent)).toContain('Indonesian');
|
|
144
|
+
|
|
145
|
+
const indonesian = options.find((option) => option.textContent === 'Indonesian')!;
|
|
146
|
+
await act(async () => { indonesian.click(); });
|
|
147
|
+
expect(patch).toEqual({
|
|
148
|
+
tts: { ...DEFAULT_SETTINGS.tts, engine: 'openai', language: 'id' },
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
test('Gemini states automatic language and hides the fixed speed control', () => {
|
|
153
|
+
stubServer();
|
|
154
|
+
const host = mount(() => {}, { engine: 'gemini' });
|
|
155
|
+
expect(host.textContent).toContain('Google Gemini TTS');
|
|
156
|
+
expect(host.textContent).toContain('Detects the answer’s language automatically');
|
|
157
|
+
expect(host.textContent).not.toContain('1 is normal');
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
test('the ONNX engine lists the installed model, its voices and its languages', async () => {
|
|
161
|
+
stubServer({ available: true }, { models: [SUPERTONIC], catalog: [], jobs: [], runtime: { available: true } });
|
|
162
|
+
const host = mount(() => {}, { engine: 'local' });
|
|
163
|
+
await act(async () => {
|
|
164
|
+
await Bun.sleep(0);
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
expect(host.textContent).toContain('Local models');
|
|
168
|
+
expect(host.textContent).toContain('Supertonic 3');
|
|
169
|
+
expect(host.textContent).toContain('2 languages');
|
|
170
|
+
expect(host.textContent).toContain('speaks Indonesian');
|
|
171
|
+
|
|
172
|
+
// The language picker is the MODEL's list: English and Indonesian, no auto.
|
|
173
|
+
const languageTrigger = [...host.querySelectorAll('label')].find((element) =>
|
|
174
|
+
element.textContent?.includes('Language'),
|
|
175
|
+
)?.querySelector('button[role="combobox"]') as HTMLButtonElement | null;
|
|
176
|
+
await act(async () => { languageTrigger!.click(); });
|
|
177
|
+
const languageOptions = [...document.querySelectorAll('[role="option"]')];
|
|
178
|
+
expect(languageOptions.map((option) => option.textContent)).toEqual([
|
|
179
|
+
'Model default (en)',
|
|
180
|
+
'English',
|
|
181
|
+
'Indonesian',
|
|
182
|
+
]);
|
|
183
|
+
// Close it before the next trigger opens its own panel.
|
|
184
|
+
await act(async () => { languageTrigger!.click(); });
|
|
185
|
+
|
|
186
|
+
// And the voice picker uses the model's named voices, not free text.
|
|
187
|
+
const voiceTrigger = [...host.querySelectorAll('label')].find((element) =>
|
|
188
|
+
element.textContent?.includes('Voice') && !element.textContent?.includes('Voice and rate'),
|
|
189
|
+
)?.querySelector('button[role="combobox"]') as HTMLButtonElement | null;
|
|
190
|
+
await act(async () => { voiceTrigger!.click(); });
|
|
191
|
+
const voiceOptions = [...document.querySelectorAll('[role="option"]')];
|
|
192
|
+
expect(voiceOptions.map((option) => option.textContent)).toEqual(['Female 1', 'Male 1']);
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
test('a model that declares no languages says the code passes through', async () => {
|
|
196
|
+
stubServer({ available: true }, {
|
|
197
|
+
models: [{ ...SUPERTONIC, id: 'pasted', label: 'Pasted bundle', languages: [] }],
|
|
198
|
+
catalog: [],
|
|
199
|
+
jobs: [],
|
|
200
|
+
runtime: { available: true },
|
|
201
|
+
});
|
|
202
|
+
const host = mount(() => {}, { engine: 'local', model: 'pasted' });
|
|
203
|
+
await act(async () => {
|
|
204
|
+
await Bun.sleep(0);
|
|
205
|
+
});
|
|
206
|
+
expect(host.textContent).toContain('declares no languages');
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
test('a model id that no longer exists repairs itself to the installed list', async () => {
|
|
210
|
+
stubServer({ available: true }, { models: [SUPERTONIC], catalog: [], jobs: [], runtime: { available: true } });
|
|
211
|
+
let patch: Updater | undefined;
|
|
212
|
+
mount((updater) => { patch = updater; }, { engine: 'local', model: 'removed-model', voice: '3' });
|
|
213
|
+
await act(async () => {
|
|
214
|
+
await Bun.sleep(0);
|
|
215
|
+
});
|
|
216
|
+
expect(patch).toEqual({
|
|
217
|
+
tts: { ...DEFAULT_SETTINGS.tts, engine: 'local', model: '', voice: '' },
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
test('an empty model setting marks the first installed model as in use', async () => {
|
|
222
|
+
stubServer({ available: true }, { models: [SUPERTONIC], catalog: [], jobs: [], runtime: { available: true } });
|
|
223
|
+
const host = mount(() => {}, { engine: 'local' });
|
|
224
|
+
await act(async () => {
|
|
225
|
+
await Bun.sleep(0);
|
|
226
|
+
});
|
|
227
|
+
expect(host.textContent).toContain('In use');
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
test('an unavailable ONNX runtime states the reason on the card', async () => {
|
|
231
|
+
stubServer({ available: true }, {
|
|
232
|
+
models: [],
|
|
233
|
+
catalog: [],
|
|
234
|
+
jobs: [],
|
|
235
|
+
runtime: { available: false, reason: 'The ONNX speech runtime could not load.' },
|
|
236
|
+
});
|
|
237
|
+
const host = mount(() => {}, { engine: 'local' });
|
|
238
|
+
await act(async () => {
|
|
239
|
+
await Bun.sleep(0);
|
|
240
|
+
});
|
|
241
|
+
expect(host.textContent).toContain('The ONNX speech runtime could not load.');
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
test('an engine with no Indonesian voice names one that has, and Deepgram points at Flux', () => {
|
|
245
|
+
stubServer();
|
|
246
|
+
const omp = mount(() => {}, { engine: 'omp' });
|
|
247
|
+
expect(omp.textContent).toContain('local voices are English');
|
|
248
|
+
render(null, omp);
|
|
249
|
+
omp.remove();
|
|
250
|
+
|
|
251
|
+
const deepgram = mount(() => {}, { engine: 'deepgram' });
|
|
252
|
+
expect(deepgram.textContent).toContain('flux-…-id');
|
|
253
|
+
});
|
|
112
254
|
});
|