@kabmo-labs/kabmo 0.49.0 → 0.50.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 +601 -557
- package/dist/client/static/js/{Body-9h5hd351.js → Body-pd3nt4xa.js} +3 -3
- package/dist/client/static/js/{CsvGrid-s05k1q18.js → CsvGrid-eksmqv8f.js} +2 -2
- package/dist/client/static/js/{DocxView-x6sjw5ht.js → DocxView-xfx1kt8x.js} +3 -3
- package/dist/client/static/js/{DrawioView-jashn8sf.js → DrawioView-2xyqg9bv.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-eygzgtyc.js → HtmlPreview-ps3f0aa5.js} +1 -1
- package/dist/client/static/js/ImageView-7vse3k6x.js +1 -0
- package/dist/client/static/js/{LayoutWrapper-tag0qpts.js → LayoutWrapper-qdp83fps.js} +2 -2
- package/dist/client/static/js/MergeDiffView-hzsccppq.js +1 -0
- package/dist/client/static/js/Modal-zw9x5b6f.js +60 -0
- package/dist/client/static/js/{PdfView-syhjmyqf.js → PdfView-8fp08jym.js} +1 -1
- package/dist/client/static/js/{SessionsView-2r1grxxs.js → SessionsView-qmgg03fv.js} +1 -1
- package/dist/client/static/js/{SheetView-26r0e506.js → SheetView-g7mstjdp.js} +22 -22
- package/dist/client/static/js/{SvgPreview-2fk85jzz.js → SvgPreview-wsv4h6c6.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-fdka7pxr.js → abnfDiagram-O67JEVCF-1kgm1049.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-g7b64973.js +1 -0
- package/dist/client/static/js/architectureDiagram-NJMV4G6O-mtm210rw.js +36 -0
- package/dist/client/static/js/{astro-rn2bvwpm.js → astro-dszrfwwn.js} +1 -1
- package/dist/client/static/js/bash-z5pe89pt.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-vpcmd3vx.js → blockDiagram-BEXU5L5S-s474vn2w.js} +8 -8
- package/dist/client/static/js/c-fy0fysfw.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-1rgpdnbq.js → c4Diagram-YGBWAQC7-s68v6tc8.js} +3 -3
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-fbsejvb9.js → classDiagram-v2-NBCMYWYE-291va3yk.js} +10 -10
- package/dist/client/static/js/cose-bilkent-JH36ORCC-0zg7crdw.js +1 -0
- package/dist/client/static/js/cpp-wam8dze6.js +1 -0
- package/dist/client/static/js/css-ke51m4kc.js +1 -0
- package/dist/client/static/js/css-yryw442h.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-8bscrcct.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-7ta5vbrw.js → cynefinDiagram-VND7K2PF-4gnmn3yc.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-b8gtt32x.js → dagre-6A5THRUB-nxmj6bkg.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-7emepy7h.js → diagram-22UHCM2B-3171dabw.js} +25 -25
- package/dist/client/static/js/{diagram-3UASUU5V-06nptkzc.js → diagram-3UASUU5V-9h1pd6h8.js} +2 -2
- package/dist/client/static/js/{diagram-ATOU4E4O-t113exk3.js → diagram-ATOU4E4O-ywfrbd6m.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-pyj3x97y.js → diagram-CDSNMT55-t87b4wbk.js} +3 -3
- package/dist/client/static/js/{diagram-MLGK6HIB-183sgpjh.js → diagram-MLGK6HIB-bzv52p97.js} +2 -2
- package/dist/client/static/js/{diagram-MPIPVDR6-fmbj4hcx.js → diagram-MPIPVDR6-8f66rp0a.js} +2 -2
- package/dist/client/static/js/{dockerfile-qay672za.js → dockerfile-z3v0km9v.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-eafvfws2.js → ebnfDiagram-ZINNZB2B-3y4w2j6t.js} +1 -1
- package/dist/client/static/js/{elixir-t8bep87c.js → elixir-c701n0qg.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-573f1vfs.js → elk-276RUBZZ-d9d23jch.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-4z1r88ej.js → erDiagram-OPXOYQCR-w4z3501c.js} +12 -12
- package/dist/client/static/js/{erlang-261km7r1.js → erlang-cpw5s1f9.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-pj22bng1.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-9h6g160j.js +1 -0
- package/dist/client/static/js/ganttDiagram-FUAMR5RP-7wcxk4bm.js +292 -0
- package/dist/client/static/js/gitGraph-4MIJSDKK-hgw4jcvk.js +1 -0
- package/dist/client/static/js/gitGraphDiagram-X574FWY7-sdh1hsb1.js +106 -0
- package/dist/client/static/js/graphql-0yv8dc1v.js +1 -0
- package/dist/client/static/js/html-zk3m0az9.js +1 -0
- package/dist/client/static/js/{index-c3whkrwa.js → index-09ap9ncj.js} +30 -30
- package/dist/client/static/js/index-0ff2x5g9.js +1 -0
- package/dist/client/static/js/{index-gg910gpv.js → index-0q39ajgh.js} +2 -2
- package/dist/client/static/js/{index-tb35a328.js → index-144aknp3.js} +2 -2
- package/dist/client/static/js/index-17jy16v3.js +314 -0
- package/dist/client/static/js/{index-j37m7pn9.js → index-1adfks1n.js} +1 -1
- package/dist/client/static/js/{index-4dnc1kys.js → index-1d8v3bvm.js} +2 -2
- package/dist/client/static/js/index-1dx4dqzy.js +4 -0
- package/dist/client/static/js/{index-a4636gt1.js → index-1ec33b1j.js} +2 -2
- package/dist/client/static/js/{index-gr8sqjpz.js → index-1jx4nt2f.js} +1 -1
- package/dist/client/static/js/{index-80fjn77c.js → index-1kjgdyfk.js} +2 -2
- package/dist/client/static/js/{index-h8hjcdj1.js → index-1vfej0gk.js} +2 -2
- package/dist/client/static/js/{index-wbsvg1d9.js → index-2g1ey1c9.js} +2 -2
- package/dist/client/static/js/{index-bmaktvm2.js → index-3rhk4apq.js} +1 -1
- package/dist/client/static/js/{index-2yzt8h3d.js → index-4vaxdt8a.js} +2 -2
- package/dist/client/static/js/{index-fbg5vhhw.js → index-4z3qtazf.js} +2 -2
- package/dist/client/static/js/{index-taev57jw.js → index-56319bht.js} +2 -2
- package/dist/client/static/js/{index-yg083mk0.js → index-5qwgexg6.js} +6 -6
- package/dist/client/static/js/index-779rptb2.js +1 -0
- package/dist/client/static/js/{index-4z5ram7g.js → index-7jdz4jr4.js} +2 -2
- package/dist/client/static/js/{index-2bf0txsp.js → index-7xn7gxgw.js} +2 -2
- package/dist/client/static/js/{index-ykc14gez.js → index-8fk7h2me.js} +5 -5
- package/dist/client/static/js/{index-dh060b7r.js → index-971stdh4.js} +2 -2
- package/dist/client/static/js/{index-t522tpxt.js → index-9jrej3ht.js} +3 -3
- package/dist/client/static/js/index-9ydvkxz1.css +1 -0
- package/dist/client/static/js/{index-473hk8nb.js → index-ajdzvegm.js} +9 -9
- package/dist/client/static/js/{index-nzvte8s5.js → index-ajqmcds5.js} +2 -2
- package/dist/client/static/js/{index-5p8dwr4y.js → index-ap6hv7s7.js} +1 -1
- package/dist/client/static/js/{index-0857zpr0.js → index-aqqj4xxy.js} +2 -2
- package/dist/client/static/js/index-bczhbk01.js +2 -0
- package/dist/client/static/js/{index-z6y8j93w.js → index-bggz63br.js} +7 -7
- package/dist/client/static/js/{index-qwxawph7.js → index-c2mqr5fh.js} +2 -2
- package/dist/client/static/js/{index-4ccs971z.js → index-cm8pa783.js} +2 -2
- package/dist/client/static/js/{index-7rmps91t.js → index-dgkpbrdr.js} +2 -2
- package/dist/client/static/js/{index-epzvftkq.js → index-e471eprg.js} +1 -1
- package/dist/client/static/js/{index-14dgbjsm.js → index-evvmkk2f.js} +1 -1
- package/dist/client/static/js/{index-rz0tz4hg.js → index-frhxbqhg.js} +1 -1
- package/dist/client/static/js/{index-1p880x6e.js → index-gcgsjd3c.js} +2 -2
- package/dist/client/static/js/{index-s5vegk6q.js → index-grkacfv3.js} +2 -2
- package/dist/client/static/js/{index-7ff9scbm.js → index-gws4prmg.js} +2 -2
- package/dist/client/static/js/index-hqhz4eam.js +1 -0
- package/dist/client/static/js/{index-pv4z2mp2.js → index-jr6q69r3.js} +181 -179
- package/dist/client/static/js/{index-dmc82cxb.js → index-jxxewcat.js} +2 -2
- package/dist/client/static/js/{index-gz7kvpnm.js → index-k3vvk28c.js} +1 -1
- package/dist/client/static/js/{index-yyjw1ty9.js → index-k66w6d9b.js} +2 -2
- package/dist/client/static/js/{index-1yq96wpa.js → index-kce86cnw.js} +2 -2
- package/dist/client/static/js/{index-zp40g8ah.js → index-n54jd3aw.js} +12 -12
- package/dist/client/static/js/{index-pygy21w5.js → index-nnqyew8n.js} +2 -2
- package/dist/client/static/js/index-qaxjp73x.js +2 -0
- package/dist/client/static/js/{index-5dn4159w.js → index-qxzyvye9.js} +2 -2
- package/dist/client/static/js/{index-5ztdqm1w.js → index-r2z0a118.js} +2 -2
- package/dist/client/static/js/{index-7dqq7cjp.js → index-r6bm9sth.js} +7 -7
- package/dist/client/static/js/{index-e8mt8rag.js → index-ratbr10x.js} +2 -2
- package/dist/client/static/js/{index-xw1bptp5.js → index-rgneq3zt.js} +2 -2
- package/dist/client/static/js/{index-nbm5r9g1.js → index-svx6rnfs.js} +2 -2
- package/dist/client/static/js/{index-3v8k8ms3.js → index-tew3rd6t.js} +1 -1
- package/dist/client/static/js/index-tfwsch7a.js +4 -0
- package/dist/client/static/js/{index-qs4n116g.js → index-vgwjn4de.js} +2 -2
- package/dist/client/static/js/{index-mbtenbyc.js → index-vn495w82.js} +6 -6
- package/dist/client/static/js/{index-tcfpzqb9.js → index-wbma8kqw.js} +33 -33
- package/dist/client/static/js/{index-gaqjrzdb.js → index-xgbcn89g.js} +2 -2
- package/dist/client/static/js/{index-tc6k8qt7.js → index-xrn2reb5.js} +2 -2
- package/dist/client/static/js/{index-0w4jqzqk.js → index-zhnfq8br.js} +2 -2
- package/dist/client/static/js/index-zsx5vs3j.js +2 -0
- package/dist/client/static/js/info-A6RAGUB7-k0kv05ny.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-xsar9j6v.js → infoDiagram-VRGFBTTK-gtdp0z6p.js} +1 -1
- package/dist/client/static/js/ini-apj95p59.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-g2rvt9jp.js → ishikawaDiagram-OU5B5YK6-c05m0sqq.js} +3 -3
- package/dist/client/static/js/java-khk2v3g4.js +1 -0
- package/dist/client/static/js/javascript-gez6yppm.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-q95v18zc.js → journeyDiagram-ZHPQQLJL-kgk5ygm2.js} +6 -6
- package/dist/client/static/js/json-r78y6e80.js +1 -0
- package/dist/client/static/js/jsx-h7hfj8cz.js +1 -0
- package/dist/client/static/js/{julia-pe5vpc2m.js → julia-w13bz4s1.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-2e7m7ds3.js → kanban-definition-PNTS6WVX-q1w9w68s.js} +6 -6
- package/dist/client/static/js/lua-pat2bzg3.js +1 -0
- package/dist/client/static/js/markdown-545zn05v.js +1 -0
- package/dist/client/static/js/{mermaid.core-dzajkp0g.js → mermaid.core-1rz62j9g.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-banecvf8.js → mindmap-definition-NLK3R4M7-3m3w6bnb.js} +8 -8
- package/dist/client/static/js/one-dark-pro-7c942tnw.js +1 -0
- package/dist/client/static/js/one-light-tp8y6c5g.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-ne66q5h9.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-6erykm1c.js → pegDiagram-GJSIUBJH-svd3ex4e.js} +1 -1
- package/dist/client/static/js/{perl-cc2eqye8.js → perl-hcg3hacf.js} +1 -1
- package/dist/client/static/js/{php-p9bvnpsv.js → php-q6hhp84p.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-ej9aysvz.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-jn1d905q.js → pieDiagram-5QR66LMP-2nrkw034.js} +3 -3
- package/dist/client/static/js/properties-9f76xngb.js +1 -0
- package/dist/client/static/js/python-nwerpkfq.js +1 -0
- package/dist/client/static/js/quadrantDiagram-O4NWA36T-4895d1aq.js +7 -0
- package/dist/client/static/js/r-39k5dr2p.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-375pe46t.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-hdgdfsc1.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-2p5ynn4a.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-2p1fxxen.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-g131pt42.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-ewzhhth2.js → railroadDiagram-XR7U4H2S-zj3g9yne.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-fcs3xd42.js → requirementDiagram-PLB6GJNP-727yjvs8.js} +6 -6
- package/dist/client/static/js/{ruby-65s2ca5d.js → ruby-wzqz8vw6.js} +1 -1
- package/dist/client/static/js/{rust-ec1j2hwy.js → rust-r94pgqvf.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-2r829rjf.js → sankeyDiagram-IPEJSGJF-17c7p2pe.js} +5 -5
- package/dist/client/static/js/{sass-p6cssgq8.js → sass-xb3van7h.js} +1 -1
- package/dist/client/static/js/{scss-qfx8wt3b.js → scss-ddg6t3x4.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-3mnte9tv.js → sequenceDiagram-PO4LG4MO-wcmbpckr.js} +21 -21
- package/dist/client/static/js/{sizeCapture-INFHLROL-r6hf9265.js → sizeCapture-INFHLROL-nkr57cd6.js} +1 -1
- package/dist/client/static/js/sql-4dcrp3sw.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-hm2f0wdb.js → stateDiagram-v2-GCMORJYK-vd7r8s78.js} +6 -6
- package/dist/client/static/js/{svelte-jz3a190v.js → svelte-wzaxz546.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-s58xzqhw.js → swimlanes-2SLR337P-zhxm05ak.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-myzk2rg0.js +8 -0
- package/dist/client/static/js/timeline-definition-EJHVYXUP-n7gbzhzd.js +120 -0
- package/dist/client/static/js/treeView-Q6P3EWNA-gfztfha9.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-kwtrwq1f.js +1 -0
- package/dist/client/static/js/tsx-dk8rpgtw.js +1 -0
- package/dist/client/static/js/typescript-q0493nmw.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-ryvgs5ac.js → usecaseDiagram-POWQR4AR-davsnwkf.js} +82 -82
- package/dist/client/static/js/vennDiagram-UO4OBE2U-gb54bh5k.js +34 -0
- package/dist/client/static/js/{vue-rv4pea8r.js → vue-6zhfw7zx.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-30dnzvww.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-1kt8q8a4.js → wardleyDiagram-VNRHLVJA-sf98cg9t.js} +4 -4
- package/dist/client/static/js/xml-91sb3gt9.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-q39bbgq4.js → xychartDiagram-PMCCYNJV-9nn09k40.js} +4 -4
- package/dist/client/static/js/yaml-ghx4mjw1.js +1 -0
- package/package.json +1 -1
- package/src/client/components/common/header-button/index.tsx +10 -2
- 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/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/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/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 +40 -0
- package/src/client/components/settings/categories/voice-settings/speech/EndpointSection.tsx +8 -2
- package/src/client/components/settings/categories/voice-settings/speech/VoiceSection.tsx +52 -21
- 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/token-usage.ts +53 -10
- 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/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/useTokenUsage.ts +7 -2
- 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/server/lib/antigravity/home.server.ts +27 -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 +1 -1
- 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/one-shot.server.ts +4 -2
- package/src/server/lib/harness/acp/prewarm.server.ts +21 -16
- 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/auto-probe.server.ts +2 -2
- 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/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/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 +33 -0
- 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 +3 -0
- package/src/server/lib/tts/engines/openai.ts +21 -4
- 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/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/speak.test.ts +40 -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/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/settings/defaults.ts +2 -0
- package/src/shared/lib/tts/engines.test.ts +12 -0
- package/src/shared/lib/tts/engines.ts +58 -57
- package/src/shared/lib/tts/settings.ts +1 -1
- package/src/shared/lib/tts/voices.ts +98 -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/harness.ts +5 -0
- package/src/shared/types/settings/state.ts +12 -0
- package/src/shared/types/tokenUsage.ts +21 -0
- package/src/test-support/preload.ts +9 -0
- package/dist/client/static/js/ImageView-g50pk5pt.js +0 -1
- 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/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/eventmodeling-NTZA5JFV-ftz7zrz5.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-ax0qfmp3.js +0 -1
- package/dist/client/static/js/ganttDiagram-FUAMR5RP-49jd7msz.js +0 -292
- 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-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-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-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/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/quadrantDiagram-O4NWA36T-sz4afnp1.js +0 -7
- 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/timeline-definition-EJHVYXUP-ezm1c4pz.js +0 -120
- 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/vennDiagram-UO4OBE2U-rd5prsf1.js +0 -34
- 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
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Saved accounts for one harness, in their OWN section.
|
|
8
|
+
*
|
|
9
|
+
* The launch command and provider panel describe how the agent runs; an account
|
|
10
|
+
* describes which login it runs as. Keeping them apart is deliberate: changing
|
|
11
|
+
* `CODEX_HOME` in the environment box used to change every new chat with no
|
|
12
|
+
* record of whose login it was, and no way back.
|
|
13
|
+
*
|
|
14
|
+
* A new account starts as an empty home. The panel shows the exact sign-in
|
|
15
|
+
* command, and Verify reads the CLI's own token. Kabmo never stores it.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { useState } from 'preact/hooks';
|
|
19
|
+
import { Check, Loader2, ShieldCheck, ShieldOff, Trash2, X } from 'lucide-preact';
|
|
20
|
+
import { CopyButton } from '@/client/components/common/CopyButton';
|
|
21
|
+
import { AccountLoginPanel } from '@/client/components/settings/categories/harness-settings/AccountLoginPanel';
|
|
22
|
+
import { AddAccountForm } from '@/client/components/settings/categories/harness-settings/AddAccountForm';
|
|
23
|
+
import type { AccountMutationResult } from '@/client/hooks/models/harness-accounts';
|
|
24
|
+
import type { HarnessAccountView } from '@/shared/lib/harness/accounts';
|
|
25
|
+
|
|
26
|
+
export interface AccountsPanelProps {
|
|
27
|
+
harness: string;
|
|
28
|
+
accounts: HarnessAccountView[];
|
|
29
|
+
selectedId: string | null;
|
|
30
|
+
onCreate: (label: string) => Promise<AccountMutationResult>;
|
|
31
|
+
onSelect: (accountId: string | null) => Promise<AccountMutationResult>;
|
|
32
|
+
onRename: (accountId: string, label: string) => Promise<AccountMutationResult>;
|
|
33
|
+
onRemove: (accountId: string) => Promise<AccountMutationResult>;
|
|
34
|
+
onVerify: (accountId: string) => Promise<AccountMutationResult>;
|
|
35
|
+
/** Probe the now-active account so its models are ready without a second click. */
|
|
36
|
+
onProbe?: () => Promise<string | null>;
|
|
37
|
+
}
|
|
38
|
+
const BUTTON =
|
|
39
|
+
'cursor-pointer rounded-md border border-ink/15 px-2 py-1 text-[11px] text-ink/65 transition-colors hover:border-ink/35 hover:text-ink disabled:cursor-not-allowed disabled:opacity-40';
|
|
40
|
+
|
|
41
|
+
export function HarnessAccountsPanel({
|
|
42
|
+
harness, accounts, selectedId, onCreate, onSelect, onRename, onRemove, onVerify, onProbe,
|
|
43
|
+
}: AccountsPanelProps) {
|
|
44
|
+
const [label, setLabel] = useState('');
|
|
45
|
+
const [busy, setBusy] = useState<string | null>(null);
|
|
46
|
+
const [problem, setProblem] = useState<string | null>(null);
|
|
47
|
+
const [notice, setNotice] = useState<string | null>(null);
|
|
48
|
+
const [expanded, setExpanded] = useState<string | null>(null);
|
|
49
|
+
const [editing, setEditing] = useState<string | null>(null);
|
|
50
|
+
const [draft, setDraft] = useState('');
|
|
51
|
+
const [confirmRemove, setConfirmRemove] = useState<string | null>(null);
|
|
52
|
+
const [loginId, setLoginId] = useState<string | null>(null);
|
|
53
|
+
|
|
54
|
+
/** One place folds a refusal or a success into the panel's visible state. */
|
|
55
|
+
const run = async (key: string, action: () => Promise<AccountMutationResult>) => {
|
|
56
|
+
setBusy(key);
|
|
57
|
+
setProblem(null);
|
|
58
|
+
setNotice(null);
|
|
59
|
+
try {
|
|
60
|
+
const result = await action();
|
|
61
|
+
setProblem(result.error);
|
|
62
|
+
if (!result.error && result.createdId) setExpanded(result.createdId);
|
|
63
|
+
if (!result.error && result.detail && result.signedIn !== false) setNotice(result.detail);
|
|
64
|
+
return result;
|
|
65
|
+
} finally {
|
|
66
|
+
setBusy(null);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const add = async () => {
|
|
71
|
+
if (busy) return;
|
|
72
|
+
const result = await run('create', () => onCreate(label));
|
|
73
|
+
if (!result.error) setLabel('');
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const verify = async (account: HarnessAccountView) => {
|
|
77
|
+
const result = await run(`verify:${account.id}`, () => onVerify(account.id));
|
|
78
|
+
if (!result.error && result.signedIn === false) setExpanded(account.id);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/** Probe after a switch, so "Use" leaves the account ready to chat. */
|
|
82
|
+
const probeNow = async (key: string): Promise<void> => {
|
|
83
|
+
if (!onProbe) return;
|
|
84
|
+
setBusy(key);
|
|
85
|
+
try {
|
|
86
|
+
const failure = await onProbe();
|
|
87
|
+
if (failure) setProblem(`The account is active, but the agent check failed: ${failure}`);
|
|
88
|
+
} finally {
|
|
89
|
+
setBusy(null);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/** Select the account, and open its sign-in terminal if it has no login yet. */
|
|
94
|
+
const useAccount = async (account: HarnessAccountView) => {
|
|
95
|
+
const result = await run(`select:${account.id}`, () => onSelect(account.id));
|
|
96
|
+
if (result.error) return;
|
|
97
|
+
if (!account.signedIn) {
|
|
98
|
+
setLoginId(account.id);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
await probeNow(`probe:${account.id}`);
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const useSystemDefault = async () => {
|
|
105
|
+
const result = await run('select:default', () => onSelect(null));
|
|
106
|
+
if (!result.error) await probeNow('probe:default');
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/** The PTY exits when the sign-in command returns; Verify reads its result. */
|
|
110
|
+
const finishSignIn = async (account: HarnessAccountView) => {
|
|
111
|
+
setLoginId(null);
|
|
112
|
+
const result = await run(`verify:${account.id}`, () => onVerify(account.id));
|
|
113
|
+
if (!result.error && result.signedIn === false) setExpanded(account.id);
|
|
114
|
+
if (!result.error && result.signedIn) await probeNow(`probe:${account.id}`);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const saveName = async (id: string) => {
|
|
118
|
+
if (busy) return;
|
|
119
|
+
const result = await run(`rename:${id}`, () => onRename(id, draft));
|
|
120
|
+
if (!result.error) setEditing(null);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
return (
|
|
124
|
+
<section className="mt-3 space-y-3 border-t border-ink/10 pt-3" aria-label="Saved accounts">
|
|
125
|
+
<div className="flex flex-wrap items-start justify-between gap-2">
|
|
126
|
+
<div>
|
|
127
|
+
<span className="text-[10px] font-semibold uppercase tracking-wider text-muted">Accounts</span>
|
|
128
|
+
<p className="mt-1 max-w-xl text-[11px] leading-relaxed text-muted">
|
|
129
|
+
Each saved account is its own CLI home. New chats use the selected account; a chat that is already running keeps the one it started on.
|
|
130
|
+
</p>
|
|
131
|
+
</div>
|
|
132
|
+
<span className="font-mono text-[10px] text-muted">{accounts.length} saved</span>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
{problem && (
|
|
136
|
+
<div className="flex items-start justify-between gap-2 rounded-lg border border-error/30 bg-error/5 px-2.5 py-2 text-[11px] text-error" role="alert">
|
|
137
|
+
<span>{problem}</span>
|
|
138
|
+
<button type="button" onClick={() => setProblem(null)} className="cursor-pointer" aria-label="Dismiss">
|
|
139
|
+
<X size={12} />
|
|
140
|
+
</button>
|
|
141
|
+
</div>
|
|
142
|
+
)}
|
|
143
|
+
{notice && !problem && (
|
|
144
|
+
<div className="flex items-start justify-between gap-2 rounded-lg border border-ink/10 bg-ink/[0.02] px-2.5 py-2 text-[11px] text-ink/65" role="status">
|
|
145
|
+
<span className="inline-flex items-center gap-1.5"><Check size={11} className="text-success" /> {notice}</span>
|
|
146
|
+
<button type="button" onClick={() => setNotice(null)} className="cursor-pointer" aria-label="Dismiss">
|
|
147
|
+
<X size={12} />
|
|
148
|
+
</button>
|
|
149
|
+
</div>
|
|
150
|
+
)}
|
|
151
|
+
|
|
152
|
+
<div className="space-y-1.5">
|
|
153
|
+
<div className={`flex items-center justify-between gap-3 rounded-lg border px-3 py-2 ${selectedId === null ? 'border-ink/25 bg-ink/[0.03]' : 'border-ink/10'}`}>
|
|
154
|
+
<div className="min-w-0">
|
|
155
|
+
<div className="text-[11px] font-medium text-ink">System default</div>
|
|
156
|
+
<div className="text-[10px] leading-relaxed text-muted">
|
|
157
|
+
The login this machine already has. No home is injected.
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
<button
|
|
161
|
+
type="button"
|
|
162
|
+
aria-pressed={selectedId === null}
|
|
163
|
+
disabled={selectedId === null || busy !== null}
|
|
164
|
+
onClick={() => void useSystemDefault()}
|
|
165
|
+
className={BUTTON}
|
|
166
|
+
>
|
|
167
|
+
{selectedId === null ? 'In use' : 'Use'}
|
|
168
|
+
</button>
|
|
169
|
+
</div>
|
|
170
|
+
|
|
171
|
+
{accounts.length === 0 && (
|
|
172
|
+
<p className="rounded-lg border border-ink/10 bg-ink/[0.02] px-3 py-2 text-[11px] leading-relaxed text-muted">
|
|
173
|
+
No saved accounts yet. New chats use the system default login above; add an account to keep this harness on its own home.
|
|
174
|
+
</p>
|
|
175
|
+
)}
|
|
176
|
+
|
|
177
|
+
{accounts.map((account) => {
|
|
178
|
+
const selected = account.id === selectedId;
|
|
179
|
+
return (
|
|
180
|
+
<div
|
|
181
|
+
key={account.id}
|
|
182
|
+
className={`rounded-lg border px-3 py-2 ${selected ? 'border-ink/25 bg-ink/[0.03]' : 'border-ink/10'}`}
|
|
183
|
+
>
|
|
184
|
+
<div className="flex flex-wrap items-start justify-between gap-2">
|
|
185
|
+
<div className="min-w-0 flex-1">
|
|
186
|
+
{editing === account.id ? (
|
|
187
|
+
<div className="flex items-center gap-1.5">
|
|
188
|
+
<input
|
|
189
|
+
type="text"
|
|
190
|
+
value={draft}
|
|
191
|
+
autoFocus
|
|
192
|
+
maxLength={80}
|
|
193
|
+
aria-label="Account name"
|
|
194
|
+
onInput={(event) => setDraft(event.currentTarget.value)}
|
|
195
|
+
onKeyDown={(event) => {
|
|
196
|
+
if (event.key === 'Enter') void saveName(account.id);
|
|
197
|
+
if (event.key === 'Escape') setEditing(null);
|
|
198
|
+
}}
|
|
199
|
+
className="min-w-0 flex-1 rounded border border-ink/25 bg-paper px-1.5 py-1 text-[11px] text-ink outline-none focus:border-ink/50"
|
|
200
|
+
/>
|
|
201
|
+
<button type="button" onClick={() => void saveName(account.id)} disabled={busy !== null} className={BUTTON}>
|
|
202
|
+
Save
|
|
203
|
+
</button>
|
|
204
|
+
<button type="button" onClick={() => setEditing(null)} className={BUTTON}>
|
|
205
|
+
Cancel
|
|
206
|
+
</button>
|
|
207
|
+
</div>
|
|
208
|
+
) : (
|
|
209
|
+
<div className="flex flex-wrap items-center gap-1.5">
|
|
210
|
+
<span className="text-[11px] font-medium text-ink">{account.label}</span>
|
|
211
|
+
{selected && (
|
|
212
|
+
<span className="rounded bg-ink/10 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-ink/60">
|
|
213
|
+
In use
|
|
214
|
+
</span>
|
|
215
|
+
)}
|
|
216
|
+
<span className="inline-flex items-center gap-1 text-[10px] text-muted">
|
|
217
|
+
{account.signedIn ? <ShieldCheck size={10} /> : <ShieldOff size={10} />}
|
|
218
|
+
{account.signedIn ? 'Signed in' : 'Not signed in'}
|
|
219
|
+
</span>
|
|
220
|
+
</div>
|
|
221
|
+
)}
|
|
222
|
+
<div className="mt-0.5 text-[10px] text-muted">
|
|
223
|
+
{account.identity.email ?? account.identity.organization ?? account.detail}
|
|
224
|
+
</div>
|
|
225
|
+
<div className="mt-0.5 truncate font-mono text-[10px] text-muted" title={account.homePath}>
|
|
226
|
+
{account.homePath}
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
229
|
+
|
|
230
|
+
<div className="flex shrink-0 flex-wrap items-center gap-1">
|
|
231
|
+
{!selected && (
|
|
232
|
+
<button
|
|
233
|
+
type="button"
|
|
234
|
+
aria-pressed={false}
|
|
235
|
+
disabled={busy !== null}
|
|
236
|
+
onClick={() => void useAccount(account)}
|
|
237
|
+
className={BUTTON}
|
|
238
|
+
>
|
|
239
|
+
{account.signedIn ? 'Use' : 'Use & sign in'}
|
|
240
|
+
</button>
|
|
241
|
+
)}
|
|
242
|
+
{!account.signedIn && selected && loginId !== account.id && (
|
|
243
|
+
<button
|
|
244
|
+
type="button"
|
|
245
|
+
disabled={busy !== null}
|
|
246
|
+
onClick={() => {
|
|
247
|
+
setProblem(null);
|
|
248
|
+
setNotice(null);
|
|
249
|
+
setLoginId(account.id);
|
|
250
|
+
}}
|
|
251
|
+
className={`${BUTTON} border-ink/30 text-ink`}
|
|
252
|
+
title="Run this account's sign-in command in a Kabmo terminal"
|
|
253
|
+
>
|
|
254
|
+
Sign in
|
|
255
|
+
</button>
|
|
256
|
+
)}
|
|
257
|
+
<button
|
|
258
|
+
type="button"
|
|
259
|
+
disabled={busy !== null}
|
|
260
|
+
onClick={() => void verify(account)}
|
|
261
|
+
className={BUTTON}
|
|
262
|
+
title="Read this home's own token and show who is signed in"
|
|
263
|
+
>
|
|
264
|
+
{busy === `verify:${account.id}` ? <Loader2 size={11} className="animate-spin" /> : 'Verify'}
|
|
265
|
+
</button>
|
|
266
|
+
<button
|
|
267
|
+
type="button"
|
|
268
|
+
disabled={busy !== null}
|
|
269
|
+
onClick={() => {
|
|
270
|
+
setEditing(account.id);
|
|
271
|
+
setDraft(account.label);
|
|
272
|
+
}}
|
|
273
|
+
className={BUTTON}
|
|
274
|
+
>
|
|
275
|
+
Rename
|
|
276
|
+
</button>
|
|
277
|
+
{confirmRemove === account.id ? (
|
|
278
|
+
<span className="inline-flex items-center gap-1">
|
|
279
|
+
<button
|
|
280
|
+
type="button"
|
|
281
|
+
disabled={busy !== null}
|
|
282
|
+
onClick={() => void run(`remove:${account.id}`, () => onRemove(account.id))}
|
|
283
|
+
className={`${BUTTON} border-error/40 text-error`}
|
|
284
|
+
>
|
|
285
|
+
Remove home
|
|
286
|
+
</button>
|
|
287
|
+
<button type="button" onClick={() => setConfirmRemove(null)} className={BUTTON}>
|
|
288
|
+
Keep
|
|
289
|
+
</button>
|
|
290
|
+
</span>
|
|
291
|
+
) : (
|
|
292
|
+
<button
|
|
293
|
+
type="button"
|
|
294
|
+
disabled={busy !== null}
|
|
295
|
+
onClick={() => setConfirmRemove(account.id)}
|
|
296
|
+
className={BUTTON}
|
|
297
|
+
aria-label={`Remove ${account.label}`}
|
|
298
|
+
title="Delete this account's Kabmo-owned home"
|
|
299
|
+
>
|
|
300
|
+
<Trash2 size={11} />
|
|
301
|
+
</button>
|
|
302
|
+
)}
|
|
303
|
+
</div>
|
|
304
|
+
</div>
|
|
305
|
+
|
|
306
|
+
{confirmRemove === account.id && (
|
|
307
|
+
<p className="mt-1.5 text-[10px] leading-relaxed text-muted">
|
|
308
|
+
Deletes this home and its login. Chats already running keep their process but cannot refresh the login.
|
|
309
|
+
</p>
|
|
310
|
+
)}
|
|
311
|
+
|
|
312
|
+
{loginId === account.id && (
|
|
313
|
+
<AccountLoginPanel
|
|
314
|
+
accountId={account.id}
|
|
315
|
+
onFinished={() => void finishSignIn(account)}
|
|
316
|
+
onClose={() => setLoginId(null)}
|
|
317
|
+
/>
|
|
318
|
+
)}
|
|
319
|
+
|
|
320
|
+
{loginId !== account.id && (!account.signedIn || expanded === account.id) && (
|
|
321
|
+
<div className="mt-2 rounded-md border border-ink/10 bg-ink/[0.02] p-2">
|
|
322
|
+
<div className="mb-1 flex items-center justify-between gap-2">
|
|
323
|
+
<span className="text-[10px] font-medium text-muted">Sign in this home</span>
|
|
324
|
+
<CopyButton text={account.loginCommand} title="Copy sign-in command" ariaLabel="Copy sign-in command" label="Copy" />
|
|
325
|
+
</div>
|
|
326
|
+
<code className="block break-all font-mono text-[10px] leading-relaxed text-ink/65">
|
|
327
|
+
{account.loginCommand}
|
|
328
|
+
</code>
|
|
329
|
+
{!account.signedIn && (
|
|
330
|
+
<p className="mt-1 text-[10px] leading-relaxed text-muted">
|
|
331
|
+
Run it in a terminal, finish the browser sign-in, then press Verify.
|
|
332
|
+
</p>
|
|
333
|
+
)}
|
|
334
|
+
</div>
|
|
335
|
+
)}
|
|
336
|
+
</div>
|
|
337
|
+
);
|
|
338
|
+
})}
|
|
339
|
+
</div>
|
|
340
|
+
<AddAccountForm
|
|
341
|
+
harness={harness}
|
|
342
|
+
label={label}
|
|
343
|
+
busy={busy !== null}
|
|
344
|
+
onLabel={setLabel}
|
|
345
|
+
onAdd={() => void add()}
|
|
346
|
+
/>
|
|
347
|
+
</section>
|
|
348
|
+
);
|
|
349
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The add-account row: a label, the action, and the one sentence that says
|
|
8
|
+
* where the home and the login live. Split from the account list so the panel
|
|
9
|
+
* stays inside the file ceiling; the label state still belongs to the panel,
|
|
10
|
+
* because a completed add has to clear it.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { Loader2, Plus } from 'lucide-preact';
|
|
14
|
+
|
|
15
|
+
export interface AddAccountFormProps {
|
|
16
|
+
harness: string;
|
|
17
|
+
label: string;
|
|
18
|
+
busy: boolean;
|
|
19
|
+
onLabel: (value: string) => void;
|
|
20
|
+
onAdd: () => void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function AddAccountForm({ harness, label, busy, onLabel, onAdd }: AddAccountFormProps) {
|
|
24
|
+
const inputId = `account-label-${harness}`;
|
|
25
|
+
return (
|
|
26
|
+
<div className="rounded-lg border border-dashed border-ink/15 p-2.5">
|
|
27
|
+
<div className="flex flex-wrap items-end gap-2">
|
|
28
|
+
<label htmlFor={inputId} className="flex min-w-0 flex-1 flex-col gap-1">
|
|
29
|
+
<span className="text-[10px] font-semibold uppercase tracking-wider text-muted">Add account</span>
|
|
30
|
+
<input
|
|
31
|
+
id={inputId}
|
|
32
|
+
type="text"
|
|
33
|
+
value={label}
|
|
34
|
+
maxLength={80}
|
|
35
|
+
placeholder="Work"
|
|
36
|
+
onInput={(event) => onLabel(event.currentTarget.value)}
|
|
37
|
+
onKeyDown={(event) => {
|
|
38
|
+
if (event.key === 'Enter') onAdd();
|
|
39
|
+
}}
|
|
40
|
+
className="w-full rounded-md border border-ink/20 bg-paper px-2 py-1.5 text-[11px] text-ink outline-none transition-colors placeholder:text-muted focus:border-ink/50"
|
|
41
|
+
/>
|
|
42
|
+
</label>
|
|
43
|
+
<button
|
|
44
|
+
type="button"
|
|
45
|
+
disabled={busy}
|
|
46
|
+
onClick={onAdd}
|
|
47
|
+
className="inline-flex cursor-pointer items-center gap-1 rounded-md border border-ink/20 px-2 py-1.5 text-[11px] text-ink/75 transition-colors hover:border-ink/40 hover:text-ink disabled:cursor-not-allowed disabled:opacity-40"
|
|
48
|
+
>
|
|
49
|
+
{busy ? <Loader2 size={11} className="animate-spin" /> : <Plus size={11} />}
|
|
50
|
+
Add account
|
|
51
|
+
</button>
|
|
52
|
+
</div>
|
|
53
|
+
<p className="mt-1.5 text-[10px] leading-relaxed text-muted">
|
|
54
|
+
Creates a private home under Kabmo's data directory. The login itself stays in the agent's own credential store.
|
|
55
|
+
</p>
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -24,6 +24,9 @@ import { harnessStatus, type HarnessState } from '@/shared/lib/harness/status';
|
|
|
24
24
|
import { HarnessConfigForm } from '@/client/components/settings/categories/harness-settings/ConfigForm';
|
|
25
25
|
import { EMPTY_HARNESS_CONFIG, type HarnessConfig } from '@/shared/lib/harness/config';
|
|
26
26
|
import { HarnessProviderPanel } from '@/client/components/settings/categories/harness-settings/ProviderPanel';
|
|
27
|
+
import { HarnessAccountsPanel } from '@/client/components/settings/categories/harness-settings/AccountsPanel';
|
|
28
|
+
import { accountAdapter, type HarnessAccountView } from '@/shared/lib/harness/accounts';
|
|
29
|
+
import type { AccountMutationResult } from '@/client/hooks/models/harness-accounts';
|
|
27
30
|
import type { HarnessImportOutcome, HarnessProviderSupport, HarnessSessionImport, HarnessSummary } from '@/shared/types/harness';
|
|
28
31
|
import { HarnessImportControls } from '@/client/components/settings/categories/harness-settings/HarnessImportControls';
|
|
29
32
|
import type { AddProviderInput } from '@/client/components/settings/categories/harness-settings/AddProviderForm';
|
|
@@ -60,6 +63,15 @@ interface HarnessCardProps {
|
|
|
60
63
|
id: string,
|
|
61
64
|
enabled: boolean,
|
|
62
65
|
) => Promise<{ autoImport: boolean | null; result: HarnessSessionImport | null; error: string | null }>;
|
|
66
|
+
/** Saved CLI homes for this harness, when it supports them. */
|
|
67
|
+
accounts?: HarnessAccountView[];
|
|
68
|
+
/** This harness's selected account; null means the host login. */
|
|
69
|
+
accountSelection?: Record<string, string | null>;
|
|
70
|
+
onCreateAccount?: (id: string, label: string) => Promise<AccountMutationResult>;
|
|
71
|
+
onSelectAccount?: (id: string, accountId: string | null) => Promise<AccountMutationResult>;
|
|
72
|
+
onRenameAccount?: (accountId: string, label: string) => Promise<AccountMutationResult>;
|
|
73
|
+
onRemoveAccount?: (accountId: string) => Promise<AccountMutationResult>;
|
|
74
|
+
onVerifyAccount?: (accountId: string) => Promise<AccountMutationResult>;
|
|
63
75
|
}
|
|
64
76
|
|
|
65
77
|
/** One capability row: a label and a yes/no/never-probed answer. */
|
|
@@ -86,6 +98,8 @@ function Capability({ label, value, detail }: { label: string; value: boolean |
|
|
|
86
98
|
export function HarnessCard({
|
|
87
99
|
summary, onProbe, install, config, onSaveConfig, providerSupport, onImportProvider, onAddProvider,
|
|
88
100
|
onSetEnabled, busy = false, onImportSessions, onSetAutoImport,
|
|
101
|
+
accounts = [], accountSelection = {}, onCreateAccount, onSelectAccount, onRenameAccount,
|
|
102
|
+
onRemoveAccount, onVerifyAccount,
|
|
89
103
|
}: HarnessCardProps) {
|
|
90
104
|
const [probing, setProbing] = useState(false);
|
|
91
105
|
const [problem, setProblem] = useState<string | null>(summary.probe?.capabilities.blocked ?? null);
|
|
@@ -200,6 +214,25 @@ export function HarnessCard({
|
|
|
200
214
|
</div>
|
|
201
215
|
{summary.note && <p className="mb-3 text-[11px] leading-relaxed text-ink/45">{summary.note}</p>}
|
|
202
216
|
|
|
217
|
+
{accountAdapter(summary.id)
|
|
218
|
+
&& onCreateAccount
|
|
219
|
+
&& onSelectAccount
|
|
220
|
+
&& onRenameAccount
|
|
221
|
+
&& onRemoveAccount
|
|
222
|
+
&& onVerifyAccount && (
|
|
223
|
+
<HarnessAccountsPanel
|
|
224
|
+
harness={summary.id}
|
|
225
|
+
accounts={accounts.filter((account) => account.harness === summary.id)}
|
|
226
|
+
selectedId={accountSelection[summary.id] ?? null}
|
|
227
|
+
onCreate={(label) => onCreateAccount(summary.id, label)}
|
|
228
|
+
onSelect={(accountId) => onSelectAccount(summary.id, accountId)}
|
|
229
|
+
onRename={onRenameAccount}
|
|
230
|
+
onRemove={onRemoveAccount}
|
|
231
|
+
onVerify={onVerifyAccount}
|
|
232
|
+
onProbe={() => onProbe(summary.id)}
|
|
233
|
+
/>
|
|
234
|
+
)}
|
|
235
|
+
|
|
203
236
|
<div className="grid gap-x-6 sm:grid-cols-2">
|
|
204
237
|
<div>
|
|
205
238
|
<div className="mb-1 text-[10px] font-semibold uppercase tracking-wider text-ink/40">Session</div>
|
|
@@ -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) => ({
|