@kabmo-labs/kabmo 0.58.1 → 0.59.1
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 +513 -495
- package/dist/client/static/js/{Body-ysmhxbvk.js → Body-5yedtmnk.js} +3 -3
- package/dist/client/static/js/{CsvGrid-w90pxyn2.js → CsvGrid-39m8pp1c.js} +2 -2
- package/dist/client/static/js/{DocxView-evxn6kaq.js → DocxView-vd99cv12.js} +3 -3
- package/dist/client/static/js/{DrawioView-tmdevwf4.js → DrawioView-6nq4412n.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-bpsn2z9p.js → HtmlPreview-cs51gszy.js} +1 -1
- package/dist/client/static/js/ImageView-nc2n0w6s.js +1 -0
- package/dist/client/static/js/LayoutWrapper-j7786frq.js +2 -0
- package/dist/client/static/js/MergeDiffView-0rn5zsy5.js +1 -0
- package/dist/client/static/js/Modal-7ag7a9qq.js +60 -0
- package/dist/client/static/js/{PdfView-txxn6qff.js → PdfView-0zab721q.js} +1 -1
- package/dist/client/static/js/SessionsView-t9rhx472.js +1 -0
- package/dist/client/static/js/{SheetView-52b33e6f.js → SheetView-2wdn5hkd.js} +11 -11
- package/dist/client/static/js/{SvgPreview-hrk4pfm1.js → SvgPreview-fmrfxd7z.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-at77sybc.js → abnfDiagram-O67JEVCF-41scfh9v.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-bwn1drdz.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-raw33jgg.js → architectureDiagram-NJMV4G6O-fp6etjvt.js} +3 -3
- package/dist/client/static/js/{astro-qha7sceh.js → astro-ryr2ajmg.js} +1 -1
- package/dist/client/static/js/bash-zknkkwkw.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-b6e90fbk.js → blockDiagram-BEXU5L5S-pespk9mt.js} +4 -4
- package/dist/client/static/js/c-0w02jkxb.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-msg9y1c6.js → c4Diagram-YGBWAQC7-rt4z91dx.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-jmrd1h8r.js → classDiagram-v2-NBCMYWYE-6bzaq8sd.js} +4 -4
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-na65ebq3.js → cose-bilkent-JH36ORCC-z3fhgcba.js} +1 -1
- package/dist/client/static/js/cpp-p5b4vean.js +1 -0
- package/dist/client/static/js/css-9jzbvdyz.js +1 -0
- package/dist/client/static/js/css-sn00sq6v.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-jbc50ks8.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-9xkkw71m.js → cynefinDiagram-VND7K2PF-8endeh4p.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-p59f19tv.js → dagre-6A5THRUB-2a2f32dv.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-2e2rcvn7.js → diagram-22UHCM2B-wgbyr6b7.js} +9 -9
- package/dist/client/static/js/{diagram-3UASUU5V-r9ds8vgr.js → diagram-3UASUU5V-5122b41x.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-jgwxv7v8.js → diagram-ATOU4E4O-1gt9fr7e.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-20m35eqq.js → diagram-CDSNMT55-v6hs59jb.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-vt3kxt2m.js → diagram-MLGK6HIB-yey2m5nm.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-c47rgxf1.js → diagram-MPIPVDR6-hg4f3q4d.js} +2 -2
- package/dist/client/static/js/{dockerfile-gtcyey0q.js → dockerfile-56tfnp5r.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-aszw3xy3.js → ebnfDiagram-ZINNZB2B-2mhc9aar.js} +1 -1
- package/dist/client/static/js/{elixir-w92v180e.js → elixir-fyxw6d70.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-gbvr3gry.js → elk-276RUBZZ-wedtvz9y.js} +2 -2
- package/dist/client/static/js/{erDiagram-OPXOYQCR-1hqca8qe.js → erDiagram-OPXOYQCR-1kysnby9.js} +6 -6
- package/dist/client/static/js/{erlang-v7344938.js → erlang-97ayje6m.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-b37ey01t.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-vd4z6bvy.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-07v22te5.js → ganttDiagram-FUAMR5RP-j4g65rpm.js} +3 -3
- package/dist/client/static/js/gitGraph-4MIJSDKK-mvqq7tcs.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-y068jtz9.js → gitGraphDiagram-X574FWY7-vcwmj4b3.js} +8 -8
- package/dist/client/static/js/graphql-xzykn0ba.js +1 -0
- package/dist/client/static/js/html-2zc3shky.js +1 -0
- package/dist/client/static/js/{index-r8d4bk86.js → index-10vzyga1.js} +2 -2
- package/dist/client/static/js/index-1mkn5fbf.js +481 -0
- package/dist/client/static/js/{index-medk4f18.js → index-2h7xh93h.js} +2 -2
- package/dist/client/static/js/{index-fhtnvqgf.js → index-3j2he86h.js} +2 -2
- package/dist/client/static/js/{index-zhgh7a31.js → index-3kedv94b.js} +2 -2
- package/dist/client/static/js/{index-374xq5a4.js → index-42k78whj.js} +1 -1
- package/dist/client/static/js/{index-c9aqx3ht.js → index-42q5gg7t.js} +1 -1
- package/dist/client/static/js/index-461ga40v.js +2 -0
- package/dist/client/static/js/{index-9qf2h9jb.js → index-51rbgeh9.js} +12 -12
- package/dist/client/static/js/{index-tdg7hz80.js → index-58z2hatp.js} +2 -2
- package/dist/client/static/js/{index-4tbdws4r.js → index-5e4e18tg.js} +2 -2
- package/dist/client/static/js/{index-th61y26d.js → index-69mnn71v.js} +2 -2
- package/dist/client/static/js/index-6vbra7p9.js +1 -0
- package/dist/client/static/js/{index-007sewcn.js → index-7enfdvh0.js} +2 -2
- package/dist/client/static/js/{index-gaa39w5q.js → index-8tzt0dek.js} +2 -2
- package/dist/client/static/js/{index-ewryzs4g.js → index-92h38pwg.js} +2 -2
- package/dist/client/static/js/{index-vw8b29ek.js → index-9mgpbwfr.js} +1 -1
- package/dist/client/static/js/{index-80kx6dm6.js → index-a3bpmw2r.js} +2 -2
- package/dist/client/static/js/{index-fv7nybnf.js → index-a70sk36c.js} +2 -2
- package/dist/client/static/js/index-c5401dqs.js +4 -0
- package/dist/client/static/js/{index-xmg1x6zv.js → index-csxnqgzw.js} +5 -5
- package/dist/client/static/js/{index-qefssj0m.js → index-d201jvs9.js} +1 -1
- package/dist/client/static/js/{index-y0f3wbc3.js → index-d9sfavx1.js} +2 -2
- package/dist/client/static/js/{index-5hvt233n.js → index-db6s66jr.js} +2 -2
- package/dist/client/static/js/index-dbsy29gn.js +2 -0
- package/dist/client/static/js/{index-j830qk07.js → index-dw9epydj.js} +2 -2
- package/dist/client/static/js/{index-s4dpkds5.js → index-e39m185a.js} +2 -2
- package/dist/client/static/js/{index-dxq1tbwm.js → index-fg0ne74z.js} +2 -2
- package/dist/client/static/js/{index-hb7a7m9m.js → index-fnaq8baz.js} +1 -1
- package/dist/client/static/js/{index-tq3t3qm4.js → index-fsa18ns9.js} +2 -2
- package/dist/client/static/js/{index-wxqcnsrq.js → index-fvphmwkf.js} +2 -2
- package/dist/client/static/js/{index-94d416ee.js → index-gajpd90b.js} +2 -2
- package/dist/client/static/js/{index-rxt8sf9a.js → index-h1xbx74w.js} +2 -2
- package/dist/client/static/js/{index-1e0rt7c6.js → index-hgzf4ask.js} +5 -5
- package/dist/client/static/js/{index-wn28m9h7.js → index-hrez92pw.js} +8 -8
- package/dist/client/static/js/{index-zs7kw0be.js → index-jaf968hx.js} +4 -4
- package/dist/client/static/js/{index-sxag9ptg.js → index-jct0jryd.js} +2 -2
- package/dist/client/static/js/{index-5xxbbzqa.js → index-kt77dwsg.js} +7 -7
- package/dist/client/static/js/{index-8d8ce00v.js → index-m62sf9wn.js} +2 -2
- package/dist/client/static/js/{index-6x0kn8pb.js → index-mhrkjbjq.js} +2 -2
- package/dist/client/static/js/index-mttx9327.css +1 -0
- package/dist/client/static/js/{index-1e710snk.js → index-n7bmqeqz.js} +1 -1
- package/dist/client/static/js/{index-3ymw778n.js → index-ndqtff48.js} +2 -2
- package/dist/client/static/js/{index-cmjyet7w.js → index-nf4hq5tg.js} +27 -27
- package/dist/client/static/js/{index-3p732mvs.js → index-np2rfq06.js} +2 -2
- package/dist/client/static/js/{index-2s17netq.js → index-nwbr15b3.js} +2 -2
- package/dist/client/static/js/{index-nptbz7sv.js → index-pn0ja904.js} +1 -1
- package/dist/client/static/js/{index-azz46nwc.js → index-pr8wsq24.js} +2 -2
- package/dist/client/static/js/{index-7sq6cjt1.js → index-q3k8r0ms.js} +11 -11
- package/dist/client/static/js/{index-an7fq7f6.js → index-qc3de995.js} +1 -1
- package/dist/client/static/js/{index-f61c25vn.js → index-r42f3r1p.js} +3 -3
- package/dist/client/static/js/{index-e4nge3f4.js → index-s7p2wdr1.js} +1 -1
- package/dist/client/static/js/{index-vny4ymjf.js → index-sg65xdey.js} +1 -1
- package/dist/client/static/js/index-skp6991n.js +2 -0
- package/dist/client/static/js/index-spnrx2c0.js +2 -0
- package/dist/client/static/js/{index-fe92hqmb.js → index-sqyvj03y.js} +4 -4
- package/dist/client/static/js/{index-cpp43af3.js → index-tz5ewsza.js} +9 -9
- package/dist/client/static/js/{index-v8xhgfeq.js → index-vs2y8gxr.js} +2 -2
- package/dist/client/static/js/{index-e0kahttb.js → index-vs3g6njv.js} +1 -1
- package/dist/client/static/js/index-wkxsypj1.js +2 -0
- package/dist/client/static/js/{index-gqrt766t.js → index-xqz7bqcn.js} +61 -61
- package/dist/client/static/js/{index-jxsha63v.js → index-y4cx8cqf.js} +2 -2
- package/dist/client/static/js/{index-kzzvrqnv.js → index-y5pkqrga.js} +2 -2
- package/dist/client/static/js/{index-3m1dksmy.js → index-yrwm437g.js} +2 -2
- package/dist/client/static/js/{index-7ynf3s2w.js → index-z82nd2bd.js} +2 -2
- package/dist/client/static/js/info-A6RAGUB7-zkv4crz7.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-1x83h4k4.js → infoDiagram-VRGFBTTK-7craq9x2.js} +2 -2
- package/dist/client/static/js/ini-62r3vxaf.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-et6z3c28.js → ishikawaDiagram-OU5B5YK6-ncjty2re.js} +2 -2
- package/dist/client/static/js/java-kacycary.js +1 -0
- package/dist/client/static/js/javascript-zc1qnyyp.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-sw669e7a.js → journeyDiagram-ZHPQQLJL-yx222bzt.js} +2 -2
- package/dist/client/static/js/json-yrwpn6bd.js +1 -0
- package/dist/client/static/js/jsx-b40ag8q1.js +1 -0
- package/dist/client/static/js/{julia-z14p8jsx.js → julia-agc5kfvg.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-aqxg95kx.js → kanban-definition-PNTS6WVX-a2f84qmn.js} +6 -6
- package/dist/client/static/js/lua-bk961f37.js +1 -0
- package/dist/client/static/js/markdown-b7rgzgd6.js +1 -0
- package/dist/client/static/js/mermaid.core-9vfwthw3.js +12 -0
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-530anpc4.js → mindmap-definition-NLK3R4M7-fsxysg6f.js} +4 -4
- package/dist/client/static/js/one-dark-pro-7v4by00h.js +1 -0
- package/dist/client/static/js/one-light-5rfzh8p4.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-dgpge627.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-5zar6hvy.js → pegDiagram-GJSIUBJH-77wxmp9g.js} +1 -1
- package/dist/client/static/js/{perl-1na2x6yd.js → perl-v5vbtzgf.js} +1 -1
- package/dist/client/static/js/{php-x75tt7w3.js → php-83qwy98t.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-b8pgsqrd.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-3bx8syvw.js → pieDiagram-5QR66LMP-gvgfhez0.js} +3 -3
- package/dist/client/static/js/properties-k8gbzggp.js +1 -0
- package/dist/client/static/js/python-343tspad.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-yaarpr2e.js → quadrantDiagram-O4NWA36T-9zkbt5h8.js} +2 -2
- package/dist/client/static/js/r-ycdwmv8g.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-fmfe5y27.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-b5tks4ce.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-0sf4m0ze.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-pjfy3pt7.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-nr8ngt42.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-ag41q4nt.js → railroadDiagram-XR7U4H2S-w55bsyw6.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-g8sr48h4.js → requirementDiagram-PLB6GJNP-828s1e5g.js} +3 -3
- package/dist/client/static/js/{ruby-3h22qahv.js → ruby-994n5j6e.js} +1 -1
- package/dist/client/static/js/{rust-r27demr5.js → rust-csv5f258.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-t1wbd1hh.js → sankeyDiagram-IPEJSGJF-34f3fyvg.js} +3 -3
- package/dist/client/static/js/{sass-8bq5r2tz.js → sass-p6g7qdv2.js} +1 -1
- package/dist/client/static/js/{scss-c04ezwnn.js → scss-4j4t3r6y.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-407mjqty.js → sequenceDiagram-PO4LG4MO-nnta2hn0.js} +7 -7
- package/dist/client/static/js/{sizeCapture-INFHLROL-w38zb9ky.js → sizeCapture-INFHLROL-gpcramga.js} +1 -1
- package/dist/client/static/js/sql-kwpd5w07.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-4cvgymkc.js → stateDiagram-v2-GCMORJYK-3f2en220.js} +3 -3
- package/dist/client/static/js/{svelte-egg3x4tw.js → svelte-bek3h1sz.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-w7ts2rzw.js → swimlanes-2SLR337P-jgqt12z9.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-xx1z57df.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-nq46nzy9.js → timeline-definition-EJHVYXUP-sgchcs11.js} +3 -3
- package/dist/client/static/js/treeView-Q6P3EWNA-23r9fa68.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-mxxzdrj6.js +1 -0
- package/dist/client/static/js/tsx-gjxfjnbk.js +1 -0
- package/dist/client/static/js/typescript-4dchbnya.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-q144snzb.js → usecaseDiagram-POWQR4AR-znkg9pkq.js} +15 -15
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-2wemak2p.js → vennDiagram-UO4OBE2U-dncg96ej.js} +4 -4
- package/dist/client/static/js/{vue-d7p4wv35.js → vue-y44m889c.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-cbqtax1x.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-bb2qvvgr.js → wardleyDiagram-VNRHLVJA-77xz2d49.js} +4 -4
- package/dist/client/static/js/xml-xs6qz3ya.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-9dr05fdq.js → xychartDiagram-PMCCYNJV-40j1aqyf.js} +4 -4
- package/dist/client/static/js/yaml-174nk5bn.js +1 -0
- package/package.json +7 -7
- package/src/client/borders.css +15 -3
- package/src/client/components/common/ComposerTextarea.test.tsx +13 -1
- package/src/client/components/common/ComposerTextarea.tsx +8 -2
- package/src/client/components/common/MarkdownRenderer.tsx +11 -2
- package/src/client/components/common/harness-glyph/harness-glyph.test.ts +0 -4
- package/src/client/components/common/harness-glyph/index.tsx +4 -5
- package/src/client/components/common/markdown-inline-file.test.tsx +90 -15
- package/src/client/components/common/session-actions-menu/index.test.tsx +45 -0
- package/src/client/components/common/session-actions-menu/index.tsx +6 -1
- package/src/client/components/common/session-row/TrailingSlot.tsx +8 -1
- package/src/client/components/common/session-row/index.tsx +4 -0
- package/src/client/components/common/session-row/session-row.test.tsx +5 -0
- package/src/client/components/layout/desktop-layout/RightColumn.tsx +4 -1
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +28 -35
- package/src/client/components/layout/desktop-layout/index.tsx +5 -3
- package/src/client/components/layout/desktop-layout/resizer/index.tsx +13 -3
- package/src/client/components/layout/desktop-layout/resizer/panel.test.ts +41 -0
- package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +21 -1
- package/src/client/components/layout/session-sidebar/CategoryHeader.worktree.test.tsx +1 -0
- package/src/client/components/layout/session-sidebar/CategoryItem.tsx +8 -2
- package/src/client/components/layout/session-sidebar/ClassicView.tsx +2 -0
- package/src/client/components/layout/session-sidebar/SessionList.tsx +4 -0
- package/src/client/components/layout/session-sidebar/SessionsView.tsx +22 -1
- package/src/client/components/layout/session-sidebar/modern/RevealRow.tsx +36 -5
- package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +45 -28
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +10 -3
- package/src/client/components/layout/session-sidebar/modern/index.tsx +2 -0
- package/src/client/components/layout/session-sidebar/modern/reveal-row.test.tsx +28 -1
- package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +27 -11
- package/src/client/components/layout/session-sidebar/search-results.test.tsx +29 -16
- package/src/client/components/layout/session-sidebar/session-list-states.test.tsx +1 -0
- package/src/client/components/layout/session-sidebar/variant-props.ts +2 -0
- package/src/client/components/mobile/LayoutWrapper.tsx +9 -0
- package/src/client/components/mobile/SessionSidebar.tsx +4 -0
- package/src/client/components/mobile/left-drawer-nav.test.tsx +1 -1
- package/src/client/components/mobile/mobile-session-sidebar/Body.tsx +4 -0
- package/src/client/components/mobile/mobile-session-sidebar/ClassicDrawer.tsx +3 -0
- package/src/client/components/mobile/mobile-session-sidebar/Item.test.tsx +85 -0
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +30 -14
- package/src/client/components/mobile/mobile-session-sidebar/List.tsx +4 -0
- package/src/client/components/settings/apply-side-effects.test.ts +31 -0
- package/src/client/components/settings/apply-side-effects.ts +7 -0
- package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.tsx +3 -2
- package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.test.tsx +95 -0
- package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.tsx +35 -0
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/MessageItem.gutter.test.ts +26 -0
- package/src/client/components/workspace/chat-timeline/MessageItem.tsx +6 -3
- package/src/client/components/workspace/chat-timeline/ThinkingSection.test.tsx +17 -0
- package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +9 -3
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +39 -2
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +19 -4
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +28 -21
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.wait.test.tsx +48 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +44 -21
- package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.test.ts +24 -0
- package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.tsx +44 -18
- package/src/client/components/workspace/chat-timeline/chat-input/GoalSurfaces.tsx +2 -1
- package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.test.ts +35 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.tsx +33 -12
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.test.tsx +24 -0
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +14 -3
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +24 -1
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +78 -135
- package/src/client/components/workspace/chat-timeline/chat-input/VoiceButton.tsx +58 -0
- package/src/client/components/workspace/chat-timeline/chat-input/action-base.ts +42 -0
- package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/chat-input/mode-icons.test.ts +108 -0
- package/src/client/components/workspace/chat-timeline/chat-input/mode-icons.tsx +122 -0
- package/src/client/components/workspace/chat-timeline/chat-input/narrow.test.tsx +78 -20
- package/src/client/components/workspace/chat-timeline/chat-input/styles/index.tsx +11 -5
- package/src/client/components/workspace/chat-timeline/chat-input/styles.test.tsx +19 -0
- package/src/client/components/workspace/chat-timeline/composer-dock-frame.test.tsx +9 -0
- package/src/client/components/workspace/chat-timeline/index.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OptionRow.test.tsx +125 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OptionRow.tsx +84 -27
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Mcp.test.tsx +18 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Mcp.tsx +14 -5
- package/src/client/components/workspace/model-dropdown/CloseButton.tsx +2 -2
- package/src/client/components/workspace/model-dropdown/Fullscreen.tsx +2 -2
- package/src/client/components/workspace/model-dropdown/HarnessTabs.tsx +40 -10
- package/src/client/components/workspace/model-dropdown/Header.tsx +33 -18
- package/src/client/components/workspace/model-dropdown/Panel.tsx +19 -1
- package/src/client/components/workspace/model-dropdown/ThinkingLevels.tsx +51 -0
- package/src/client/components/workspace/model-dropdown/Trigger.tsx +99 -0
- package/src/client/components/workspace/model-dropdown/bands.ts +51 -0
- package/src/client/components/workspace/model-dropdown/harness-tabs.test.tsx +39 -5
- package/src/client/components/workspace/model-dropdown/index.tsx +20 -47
- package/src/client/components/workspace/model-dropdown/picker-close.test.tsx +34 -4
- package/src/client/components/workspace/model-dropdown/thinking-levels.test.tsx +108 -0
- package/src/client/components/workspace/model-dropdown/trigger.test.ts +54 -8
- package/src/client/hooks/chat/composer/attachments.test.ts +12 -0
- package/src/client/hooks/chat/composer/attachments.ts +16 -4
- package/src/client/hooks/chat/composer/pipeline.test.ts +14 -0
- package/src/client/hooks/chat/composer/pipeline.ts +15 -6
- package/src/client/hooks/chat/omp/session-list.activity.test.ts +20 -0
- package/src/client/hooks/chat/omp/session-merges.ts +18 -6
- package/src/client/hooks/chat/omp/session-sidebar-controller.ts +4 -0
- package/src/client/hooks/chat/timeline/scope.test.ts +17 -0
- package/src/client/hooks/chat/timeline/scope.ts +6 -1
- package/src/client/hooks/chat/timeline/send-refusal.test.ts +19 -0
- package/src/client/hooks/chat/timeline/send-steer.test.ts +17 -0
- package/src/client/hooks/chat/timeline/send.ts +17 -0
- package/src/client/hooks/editor/quick-open.ts +41 -0
- package/src/client/hooks/ui/border-style.test.ts +13 -0
- package/src/client/hooks/ui/markdown-render.ts +11 -6
- package/src/client/hooks/ui/open-inline-file.test.ts +16 -0
- package/src/client/hooks/ui/open-inline-file.ts +4 -2
- package/src/client/hooks/ui/show-more.ts +11 -1
- package/src/client/hooks/ui/ui-feedback.test.ts +11 -0
- package/src/client/hooks/ui/verified-inline-files.test.tsx +143 -0
- package/src/client/hooks/ui/verified-inline-files.ts +165 -0
- package/src/client/hooks/workspace/mobile-workspace-panels.test.tsx +116 -0
- package/src/client/hooks/workspace/mobile-workspace-panels.ts +73 -0
- package/src/client/hooks/workspace/panel-resize.test.ts +127 -0
- package/src/client/hooks/workspace/panel-resize.ts +81 -0
- package/src/client/hooks/workspace/session-list-limit.test.ts +80 -0
- package/src/client/hooks/workspace/session-list-limit.ts +69 -0
- package/src/client/hooks/workspace/session-pin.ts +58 -0
- package/src/client/hooks/workspace/workspace-panels-mode.test.tsx +87 -0
- package/src/client/hooks/workspace/workspace-panels-mode.ts +76 -0
- package/src/client/lib/router/branch-params.test.ts +17 -1
- package/src/client/lib/router/branch-params.ts +18 -0
- package/src/client/lib/ui/pressed.ts +15 -0
- package/src/client/tailwind.css +30 -10
- package/src/server/lib/connect/cloudflared.lifecycle.test.ts +25 -9
- package/src/server/lib/db/schema.test.ts +1 -1
- package/src/server/lib/db/schema.ts +17 -0
- package/src/server/lib/harness/activity.server.test.ts +81 -0
- package/src/server/lib/harness/activity.server.ts +55 -0
- package/src/server/lib/harness/spawn.server.ts +9 -0
- package/src/server/lib/omp/session/delete.server.ts +4 -2
- package/src/server/lib/omp/session/sidebar-activity.server.test.ts +24 -2
- package/src/server/lib/omp/session/sidebar-data.canonical.test.ts +14 -0
- package/src/server/lib/sessions/last-opened.server.test.ts +17 -0
- package/src/server/lib/sessions/last-opened.server.ts +18 -1
- package/src/server/routes/sessions/index.ts +3 -2
- package/src/server/routes/sessions/routes.test.ts +29 -46
- package/src/server/routes/sessions/session.ts +40 -62
- package/src/server/routes/sessions/state.test.ts +89 -0
- package/src/server/routes/sessions/state.ts +86 -0
- package/src/shared/lib/chat/attachment-budget.test.ts +74 -0
- package/src/shared/lib/chat/attachment-budget.ts +111 -0
- package/src/shared/lib/chat/attachments.test.ts +0 -17
- package/src/shared/lib/chat/attachments.ts +0 -53
- package/src/shared/lib/chat/timeline/block-chrome.test.ts +35 -0
- package/src/shared/lib/chat/timeline/block-chrome.ts +21 -0
- package/src/shared/lib/markdown/degenerate-emphasis.test.ts +64 -0
- package/src/shared/lib/markdown/degenerate-emphasis.ts +90 -0
- package/src/shared/lib/markdown/inline-file.test.ts +79 -22
- package/src/shared/lib/markdown/inline-file.ts +57 -25
- package/src/shared/lib/markdown/marked.ts +5 -1
- package/src/shared/lib/settings/defaults.ts +2 -0
- package/src/shared/lib/theme/border-style.ts +1 -1
- package/src/shared/lib/workspace/active-project.test.ts +17 -1
- package/src/shared/lib/workspace/active-project.ts +9 -0
- package/src/shared/lib/workspace/project-settings-delete.test.ts +97 -0
- package/src/shared/lib/workspace/project-settings.test.ts +2 -34
- package/src/shared/lib/workspace/project-settings.ts +6 -0
- package/src/shared/lib/workspace/session-list-limit.test.ts +31 -0
- package/src/shared/lib/workspace/session-list-limit.ts +32 -0
- package/src/shared/lib/workspace/sidebar-sort.test.ts +21 -0
- package/src/shared/lib/workspace/workspace-panel-widths.ts +1 -1
- package/src/shared/lib/workspace/workspace-session.test.ts +34 -0
- package/src/shared/lib/workspace/workspace-session.ts +40 -0
- package/src/shared/types/settings/state.ts +10 -0
- package/dist/client/static/js/ImageView-ssazqckj.js +0 -1
- package/dist/client/static/js/LayoutWrapper-qwpfq4dq.js +0 -2
- package/dist/client/static/js/MergeDiffView-en6aazw8.js +0 -1
- package/dist/client/static/js/Modal-zjnhj9nb.js +0 -60
- package/dist/client/static/js/SessionsView-eryjtmb2.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-v05ap4e3.js +0 -1
- package/dist/client/static/js/bash-n5d0esqg.js +0 -1
- package/dist/client/static/js/c-pk766wx0.js +0 -1
- package/dist/client/static/js/cpp-3pt91jvm.js +0 -1
- package/dist/client/static/js/css-q2k6afe3.js +0 -1
- package/dist/client/static/js/css-sp1cgdbr.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-sqv0ze38.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-t4dzf5s7.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-c16xmjyv.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-0jq8y0qd.js +0 -1
- package/dist/client/static/js/graphql-qx4tt6ze.js +0 -1
- package/dist/client/static/js/html-5e0g8664.js +0 -1
- package/dist/client/static/js/index-4ddgpqm0.css +0 -1
- package/dist/client/static/js/index-5g2j626a.js +0 -1
- package/dist/client/static/js/index-cc7qbfvn.js +0 -477
- package/dist/client/static/js/index-f27wvdky.js +0 -4
- package/dist/client/static/js/index-m5n0zsft.js +0 -2
- package/dist/client/static/js/index-rqt8mem9.js +0 -2
- package/dist/client/static/js/index-s9k82stc.js +0 -2
- package/dist/client/static/js/index-skwem10a.js +0 -2
- package/dist/client/static/js/index-tv9rn2nd.js +0 -2
- package/dist/client/static/js/info-A6RAGUB7-szttx3v5.js +0 -1
- package/dist/client/static/js/ini-bdk46a3d.js +0 -1
- package/dist/client/static/js/java-3g3925cf.js +0 -1
- package/dist/client/static/js/javascript-av46zx4c.js +0 -1
- package/dist/client/static/js/json-hdyzmffz.js +0 -1
- package/dist/client/static/js/jsx-y8r9mrdq.js +0 -1
- package/dist/client/static/js/lua-wf5k6p3r.js +0 -1
- package/dist/client/static/js/markdown-9bf16dx7.js +0 -1
- package/dist/client/static/js/mermaid.core-6cgqsgcf.js +0 -12
- package/dist/client/static/js/one-dark-pro-9hnhtkpr.js +0 -1
- package/dist/client/static/js/one-light-2n5y8592.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-401149bv.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-bgfv8tfz.js +0 -1
- package/dist/client/static/js/properties-xk4dn00p.js +0 -1
- package/dist/client/static/js/python-7sgz05n4.js +0 -1
- package/dist/client/static/js/r-w4qxm0pv.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-pw720590.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-n2a30ngs.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-rn5rx9qt.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-t4yryhtd.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-c4ebgvrr.js +0 -1
- package/dist/client/static/js/sql-sd00wgem.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-v82nym6b.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-bxgt5yhm.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-hh3595m0.js +0 -1
- package/dist/client/static/js/tsx-h5yzg80q.js +0 -1
- package/dist/client/static/js/typescript-qy1sbhea.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-6bza7h1b.js +0 -1
- package/dist/client/static/js/xml-mrk4xakv.js +0 -1
- package/dist/client/static/js/yaml-xaza6dra.js +0 -1
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.test.tsx +0 -110
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +0 -86
|
@@ -27,6 +27,16 @@
|
|
|
27
27
|
* `@[420px]` copy beside it is how the labels came on at a width where the row
|
|
28
28
|
* had no room for them.
|
|
29
29
|
*
|
|
30
|
+
* ## Why the fill lives on an inner span
|
|
31
|
+
*
|
|
32
|
+
* `.tap-chip` is a real 44x44 target under `(pointer: coarse)` (see
|
|
33
|
+
* `tailwind.css`). Painting the active state on the BUTTON therefore turned a
|
|
34
|
+
* 12px glyph into a 44x44 ink block: two of them sat side by side in the
|
|
35
|
+
* phone's attachment row with 2px between, and the pressed state read as a
|
|
36
|
+
* slab, not a chip. The hit area must keep the touch floor; the paint must
|
|
37
|
+
* shrink-wrap the content inside it. On a fine pointer the inner span is the
|
|
38
|
+
* button's whole box, so the desktop measurement is unchanged.
|
|
39
|
+
*
|
|
30
40
|
* ## Why Goal opens a modal
|
|
31
41
|
*
|
|
32
42
|
* Plan mode is a boolean: on means "explore before editing". Goal mode is not —
|
|
@@ -35,11 +45,13 @@
|
|
|
35
45
|
* it is off, and offers pause/resume/drop when it is on.
|
|
36
46
|
*/
|
|
37
47
|
|
|
38
|
-
import {
|
|
48
|
+
import { Target } from 'lucide-preact';
|
|
39
49
|
import type { GoalRecord } from '@kabmo-labs/kabmo-omp/mode/types';
|
|
40
50
|
import type { ArmedGoal } from '@kabmo-labs/kabmo-omp/mode/actions';
|
|
41
51
|
import type { SessionModeState } from '@kabmo-labs/kabmo-harness/session-modes';
|
|
42
52
|
import { SessionModeDropdown } from '@/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown';
|
|
53
|
+
import { ComposerModeIcon } from '@/client/components/workspace/chat-timeline/chat-input/mode-icons';
|
|
54
|
+
import { actionBox } from '@/client/components/workspace/chat-timeline/chat-input/action-base';
|
|
43
55
|
|
|
44
56
|
export interface ModeTogglesProps {
|
|
45
57
|
plan: boolean;
|
|
@@ -96,8 +108,13 @@ export function ModeToggles({
|
|
|
96
108
|
// More than one mode: the dropdown can express every value, including plan,
|
|
97
109
|
// so the single-purpose Plan button would be a second control for one item.
|
|
98
110
|
const hasModeMenu = Boolean(mode && mode.values.length > 1 && onSelectMode);
|
|
111
|
+
// On the phone arrangement each chip takes the action cluster's own box, so
|
|
112
|
+
// the Goal chip's glyph lands on the Stop/Send column instead of 2px inside
|
|
113
|
+
// it, and the pair is spaced like the row's other controls. Labels keep
|
|
114
|
+
// their content width on the desktop toolbar.
|
|
115
|
+
const chipBox = iconOnly ? actionBox(true) : '';
|
|
99
116
|
return (
|
|
100
|
-
<div className=
|
|
117
|
+
<div className={`flex items-center ${iconOnly ? 'gap-1.5' : 'gap-0.5'}`}>
|
|
101
118
|
{hasModeMenu && mode && onSelectMode && (
|
|
102
119
|
<SessionModeDropdown mode={mode} pending={pending} onSelect={onSelectMode} iconOnly={iconOnly} />
|
|
103
120
|
)}
|
|
@@ -108,12 +125,14 @@ export function ModeToggles({
|
|
|
108
125
|
aria-pressed={plan}
|
|
109
126
|
aria-label={plan ? 'Leave plan mode' : 'Enter plan mode'}
|
|
110
127
|
title={plan ? 'Plan mode is on — the agent explores before editing' : 'Plan mode: explore and draft before any edit'}
|
|
111
|
-
className={`tap-chip flex items-center
|
|
112
|
-
plan ? 'bg-ink text-canvas' : 'text-muted hover:bg-ink/5'
|
|
113
|
-
} ${pending ? 'opacity-60' : ''}`}
|
|
128
|
+
className={`tap-chip ${chipBox} flex items-center justify-center rounded transition-colors cursor-pointer ${pending ? 'opacity-60' : ''}`}
|
|
114
129
|
>
|
|
115
|
-
<
|
|
116
|
-
|
|
130
|
+
<span className={`flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors ${
|
|
131
|
+
plan ? 'bg-ink text-canvas' : 'text-muted hover:bg-ink/5'
|
|
132
|
+
}`}>
|
|
133
|
+
<ComposerModeIcon kind="plan" size={12} className={plan ? '' : 'text-ink/60'} />
|
|
134
|
+
{!iconOnly && <span className="whitespace-nowrap">Plan</span>}
|
|
135
|
+
</span>
|
|
117
136
|
</button>
|
|
118
137
|
)}
|
|
119
138
|
|
|
@@ -127,12 +146,14 @@ export function ModeToggles({
|
|
|
127
146
|
aria-pressed={goal || Boolean(goalArm)}
|
|
128
147
|
aria-label={goalArm ? 'Edit the armed goal' : goal ? 'Manage the active goal' : 'Set a goal'}
|
|
129
148
|
title={goalArm ? 'Goal armed: it starts with your next message' : goalTitle(goal, goalRecord)}
|
|
130
|
-
className={`tap-chip flex items-center
|
|
131
|
-
goal ? 'bg-ink text-canvas' : goalArm ? 'border border-dashed border-ink/30 text-muted' : 'text-muted hover:bg-ink/5'
|
|
132
|
-
} ${pending ? 'opacity-60' : ''}`}
|
|
149
|
+
className={`tap-chip ${chipBox} flex items-center justify-center rounded transition-colors cursor-pointer ${pending ? 'opacity-60' : ''}`}
|
|
133
150
|
>
|
|
134
|
-
<
|
|
135
|
-
|
|
151
|
+
<span className={`flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors ${
|
|
152
|
+
goal ? 'bg-ink text-canvas' : goalArm ? 'border border-dashed border-ink/30 text-muted' : 'text-muted hover:bg-ink/5'
|
|
153
|
+
}`}>
|
|
154
|
+
<Target size={12} className={goal ? '' : 'text-ink/60'} />
|
|
155
|
+
{!iconOnly && <span className="whitespace-nowrap">Goal</span>}
|
|
156
|
+
</span>
|
|
136
157
|
</button>
|
|
137
158
|
)}
|
|
138
159
|
</div>
|
package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.test.tsx
CHANGED
|
@@ -91,4 +91,28 @@ describe('SessionModeDropdown', () => {
|
|
|
91
91
|
const trigger = el.querySelector('button[aria-haspopup="listbox"]');
|
|
92
92
|
expect(trigger?.getAttribute('aria-label')).toBe('Session mode: Mode');
|
|
93
93
|
});
|
|
94
|
+
|
|
95
|
+
test('Plan and Build name themselves with their own glyphs', async () => {
|
|
96
|
+
const el = await mount(
|
|
97
|
+
{
|
|
98
|
+
currentValue: 'plan',
|
|
99
|
+
values: [
|
|
100
|
+
{ value: 'build', name: 'Build' },
|
|
101
|
+
{ value: 'plan', name: 'Plan' },
|
|
102
|
+
{ value: 'architect', name: 'architect' },
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
() => {},
|
|
106
|
+
);
|
|
107
|
+
const trigger = el.querySelector('button[aria-haspopup="listbox"]') as HTMLButtonElement;
|
|
108
|
+
expect(trigger.querySelector('[data-mode-icon="plan"]')).not.toBeNull();
|
|
109
|
+
|
|
110
|
+
await act(async () => { trigger.click(); });
|
|
111
|
+
const rows = [...document.body.querySelectorAll('[role="option"]')];
|
|
112
|
+
expect(rows.map((row) => row.querySelector('[data-mode-icon]')?.getAttribute('data-mode-icon'))).toEqual([
|
|
113
|
+
'build',
|
|
114
|
+
'plan',
|
|
115
|
+
'workflow',
|
|
116
|
+
]);
|
|
117
|
+
});
|
|
94
118
|
});
|
|
@@ -19,10 +19,11 @@
|
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
import { useCallback, useRef, useState } from 'preact/hooks';
|
|
22
|
-
import { Check, ChevronDown
|
|
22
|
+
import { Check, ChevronDown } from 'lucide-preact';
|
|
23
23
|
import { AnchoredMenu } from '@/client/components/common/anchored-menu';
|
|
24
24
|
import { anchorRectOf, type AnchorRect } from '@/shared/lib/ui/menu-anchor';
|
|
25
25
|
import type { SessionModeState } from '@kabmo-labs/kabmo-harness/session-modes';
|
|
26
|
+
import { ComposerModeIcon, composerModeIconKind } from '@/client/components/workspace/chat-timeline/chat-input/mode-icons';
|
|
26
27
|
|
|
27
28
|
export interface SessionModeDropdownProps {
|
|
28
29
|
mode: SessionModeState | null;
|
|
@@ -48,6 +49,13 @@ export function SessionModeDropdown({ mode, pending, onSelect, iconOnly = false
|
|
|
48
49
|
// the ladder but not always which value is current, and an empty label read as
|
|
49
50
|
// a broken chip beside a working list.
|
|
50
51
|
const label = current?.name ?? (mode.currentValue || 'Mode');
|
|
52
|
+
// Plan and Build rows are permission-shaped even on a workflow ladder; every
|
|
53
|
+
// other value keeps the layers glyph so this chip cannot be mistaken for the
|
|
54
|
+
// Access Control beside it.
|
|
55
|
+
const triggerKind = composerModeIconKind(
|
|
56
|
+
current ? { value: current.value, name: current.name } : { value: mode.currentValue },
|
|
57
|
+
'session',
|
|
58
|
+
);
|
|
51
59
|
|
|
52
60
|
const toggle = () => {
|
|
53
61
|
if (open) {
|
|
@@ -73,7 +81,7 @@ export function SessionModeDropdown({ mode, pending, onSelect, iconOnly = false
|
|
|
73
81
|
title={`Session mode: ${label}`}
|
|
74
82
|
className="tap-chip flex items-center space-x-1 rounded-md px-1.5 py-1 text-xs font-medium text-muted transition-colors hover:bg-ink/5 hover:text-ink disabled:cursor-wait disabled:opacity-60"
|
|
75
83
|
>
|
|
76
|
-
<
|
|
84
|
+
<ComposerModeIcon kind={triggerKind} size={12} />
|
|
77
85
|
{!iconOnly && <span className="max-w-[9rem] truncate">{label}</span>}
|
|
78
86
|
<ChevronDown size={11} className={`flex-shrink-0 text-ink/40 transition-transform ${open ? 'rotate-180' : ''}`} />
|
|
79
87
|
</button>
|
|
@@ -101,7 +109,10 @@ export function SessionModeDropdown({ mode, pending, onSelect, iconOnly = false
|
|
|
101
109
|
choice.value === mode.currentValue ? 'bg-ink/10 font-medium text-ink' : 'text-ink/75'
|
|
102
110
|
}`}
|
|
103
111
|
>
|
|
104
|
-
<span className="
|
|
112
|
+
<span className="flex min-w-0 items-center gap-2">
|
|
113
|
+
<ComposerModeIcon kind={composerModeIconKind(choice, 'session')} size={12} />
|
|
114
|
+
<span className="truncate">{choice.name}</span>
|
|
115
|
+
</span>
|
|
105
116
|
{choice.value === mode.currentValue && <Check size={12} className="text-ink shrink-0" />}
|
|
106
117
|
</button>
|
|
107
118
|
))}
|
|
@@ -59,6 +59,8 @@ interface MountOptions {
|
|
|
59
59
|
withModes?: boolean;
|
|
60
60
|
/** Blocks the send control, as an empty draft does. */
|
|
61
61
|
sendDisabled?: boolean;
|
|
62
|
+
/** Renders the mic, as a browser that can capture audio does. */
|
|
63
|
+
voiceSupported?: boolean;
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
const MODES = {
|
|
@@ -80,7 +82,7 @@ const MODES = {
|
|
|
80
82
|
};
|
|
81
83
|
|
|
82
84
|
/** The selectors are off: this file is about the right-hand action strip. */
|
|
83
|
-
async function mount({ isGenerating, chatRunning, isMobile = false, onStop, withModes = false, sendDisabled = false }: MountOptions): Promise<HTMLElement> {
|
|
85
|
+
async function mount({ isGenerating, chatRunning, isMobile = false, onStop, withModes = false, sendDisabled = false, voiceSupported = false }: MountOptions): Promise<HTMLElement> {
|
|
84
86
|
container = document.createElement('div');
|
|
85
87
|
document.body.appendChild(container);
|
|
86
88
|
await act(async () => {
|
|
@@ -100,6 +102,7 @@ async function mount({ isGenerating, chatRunning, isMobile = false, onStop, with
|
|
|
100
102
|
showModel: false,
|
|
101
103
|
showThinking: false,
|
|
102
104
|
showAccess: withModes,
|
|
105
|
+
voiceSupported,
|
|
103
106
|
modes: withModes ? MODES : undefined,
|
|
104
107
|
onOpenGoal: withModes ? () => {} : undefined,
|
|
105
108
|
}),
|
|
@@ -230,6 +233,26 @@ describe('composer toolbar action pair', () => {
|
|
|
230
233
|
});
|
|
231
234
|
});
|
|
232
235
|
|
|
236
|
+
/** Phone: mic lives in the draft row. Desktop: mic in the action cluster. */
|
|
237
|
+
describe('composer toolbar voice placement', () => {
|
|
238
|
+
const mic = '[title^="Voice input"]';
|
|
239
|
+
const send = '[aria-label="Send message"], [aria-label="Queue follow-up message"]';
|
|
240
|
+
|
|
241
|
+
test('leaves the mic out of the phone toolbar, beside the draft instead', async () => {
|
|
242
|
+
const el = await mount({ isGenerating: false, isMobile: true, voiceSupported: true });
|
|
243
|
+
expect(el.querySelectorAll(mic).length).toBe(0);
|
|
244
|
+
expect(el.querySelectorAll(send).length).toBe(1);
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
test('keeps the mic in the desktop action cluster', async () => {
|
|
248
|
+
const el = await mount({ isGenerating: false, isMobile: false, voiceSupported: true });
|
|
249
|
+
const voice = el.querySelector(mic) as HTMLButtonElement;
|
|
250
|
+
const submit = el.querySelector(send) as HTMLButtonElement;
|
|
251
|
+
expect(voice).not.toBeNull();
|
|
252
|
+
expect(voice.parentElement).toBe(submit.parentElement);
|
|
253
|
+
});
|
|
254
|
+
});
|
|
255
|
+
|
|
233
256
|
/**
|
|
234
257
|
* Where the Plan/Goal group is drawn. The bottom row is a single line whose
|
|
235
258
|
* left cluster already fills it on a 320px phone, so a third group there
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Send, Square } from 'lucide-preact';
|
|
2
2
|
import type { AIModelOption } from '@/shared/types';
|
|
3
3
|
import { ModelDropdown } from '@/client/components/workspace/model-dropdown/index';
|
|
4
|
-
import { ThinkingLevelDropdown } from '@/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown';
|
|
5
4
|
import { AccessDropdown } from '@/client/components/workspace/chat-timeline/chat-input/AccessDropdown';
|
|
6
5
|
import { ModeToggles } from '@/client/components/workspace/chat-timeline/chat-input/ModeToggles';
|
|
7
6
|
import { PluginComposerActions } from '@/client/components/workspace/chat-timeline/chat-input/PluginComposerSlots';
|
|
7
|
+
import { VoiceButton } from '@/client/components/workspace/chat-timeline/chat-input/VoiceButton';
|
|
8
|
+
import { ACTION_BASE, actionBox } from '@/client/components/workspace/chat-timeline/chat-input/action-base';
|
|
8
9
|
import type { ComposerModes } from '@/client/components/workspace/chat-timeline/chat-input/modes-props';
|
|
9
10
|
import { DEFAULT_APPROVAL_MODE, type ApprovalMode } from '@kabmo-labs/kabmo-omp/access-mode';
|
|
10
11
|
import { harnessRaisesApprovals } from '@kabmo-labs/kabmo-harness/catalog';
|
|
@@ -62,34 +63,6 @@ export interface ComposerToolbarProps {
|
|
|
62
63
|
onSelectHarness?: (harness: string) => void;
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
/**
|
|
66
|
-
* The chat's two ACTION controls, one geometry.
|
|
67
|
-
*
|
|
68
|
-
* They used to state their own boxes: `rounded` on send (4px, below DESIGN.md
|
|
69
|
-
* §5's 6-8px control radius) and `rounded-md` on a phone's stop, so the pair
|
|
70
|
-
* disagreed on radius and only agreed on size by coincidence. Both are 28px on
|
|
71
|
-
* a desktop and 32px on a phone, from ONE pair of classes below, so a future
|
|
72
|
-
* size change cannot land on one control and miss the other.
|
|
73
|
-
*
|
|
74
|
-
* `focus-visible` is not decoration: the send and stop controls had no focus
|
|
75
|
-
* treatment at all, so the two controls that start and end a turn were the only
|
|
76
|
-
* interactive elements in the composer a keyboard user could not see. The ring
|
|
77
|
-
* is ink at 50%, not the `/20`-`/30` the timeline cards use: WCAG 1.4.11 wants
|
|
78
|
-
* 3:1 for a focus indicator, and on `paper` the ramp measures `/30` 1.97, `/45`
|
|
79
|
-
* 2.96 and `/50` 3.43. It is offset by 2px of the card's own paper so the ring
|
|
80
|
-
* never touches the glyph it surrounds. The voice control shares this base
|
|
81
|
-
* because it is the third member of the same cluster.
|
|
82
|
-
*
|
|
83
|
-
* The transition is Tailwind's own `transition` (colour, background, border,
|
|
84
|
-
* box-shadow, transform), not a hand-listed property set: those are the five
|
|
85
|
-
* things this button can change, and they are the default for a reason.
|
|
86
|
-
*/
|
|
87
|
-
const ACTION_BASE =
|
|
88
|
-
'tap-target flex items-center justify-center rounded-lg flex-shrink-0 cursor-pointer ' +
|
|
89
|
-
'transition duration-150 ' +
|
|
90
|
-
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink/50 ' +
|
|
91
|
-
'focus-visible:ring-offset-2 focus-visible:ring-offset-paper';
|
|
92
|
-
|
|
93
66
|
/**
|
|
94
67
|
* Bottom config row of the composer: model + thinking + access + plan/goal
|
|
95
68
|
* selectors on the left, Stop/Send on the right.
|
|
@@ -142,13 +115,56 @@ export function ComposerToolbar({
|
|
|
142
115
|
// The pair's box, and its glyph, from the one layout flag: 32px on a phone
|
|
143
116
|
// (the touch floor's real geometry) and 28px on the desktop toolbar the
|
|
144
117
|
// comment above measured.
|
|
145
|
-
const actionSize = isMobile
|
|
118
|
+
const actionSize = actionBox(isMobile);
|
|
146
119
|
const iconSize = isMobile ? 14 : 12;
|
|
147
120
|
// An agent that never sends `session/request_permission` (measured: jcode,
|
|
148
121
|
// pi-acp behind `pi`/`omo`) has nothing for the three tiers to answer, so the
|
|
149
122
|
// chip is not drawn at all — see `harnessRaisesApprovals`.
|
|
150
123
|
const accessAvailable = showAccess && harnessRaisesApprovals(harness);
|
|
151
124
|
|
|
125
|
+
/* Stop and Send are ICON-ONLY: no plate, no fill, no shadow. The colour
|
|
126
|
+
moved onto the glyph, and it has to sit ON THE SVG: the icon mode's paint
|
|
127
|
+
rule is stated on `svg.lucide` at (0,2,1) and beats a single utility, so
|
|
128
|
+
`authorColourRules` keys on `svg[class~="text-error-text"]` to keep the
|
|
129
|
+
token. On the button the glyph would take the mode's hashed hue.
|
|
130
|
+
|
|
131
|
+
`-text` is the palette's signal solved to 4.5:1 against paper and canvas;
|
|
132
|
+
the raw `text-error-text`/`text-info-text` measures 2.73:1 and 1.94:1 on
|
|
133
|
+
the worst palettes, under the 3:1 graphic floor for a 12px glyph.
|
|
134
|
+
Monochrome still paints the pair ink — its pass is (0,5,1) and outranks
|
|
135
|
+
the utility — so the hue survives only in the colour mode, which is the
|
|
136
|
+
mode that asks for chroma.
|
|
137
|
+
|
|
138
|
+
Hover is opacity, never a background: a `hover:bg-*` would put the
|
|
139
|
+
rectangle back on hover and the control would read as a button again.
|
|
140
|
+
`disabled:hover` re-states the resting opacity because `:hover` matches a
|
|
141
|
+
disabled button too — without it, pointing at a barred Send would
|
|
142
|
+
brighten it. */
|
|
143
|
+
const stopButton = showStop ? (
|
|
144
|
+
<button
|
|
145
|
+
type="button"
|
|
146
|
+
onClick={onStop}
|
|
147
|
+
className={`${ACTION_BASE} ${actionSize} hover:opacity-70`}
|
|
148
|
+
title="Stop generation"
|
|
149
|
+
aria-label="Stop generation"
|
|
150
|
+
>
|
|
151
|
+
<Square size={iconSize} className="fill-current text-error-text" />
|
|
152
|
+
</button>
|
|
153
|
+
) : null;
|
|
154
|
+
|
|
155
|
+
const sendButton = (
|
|
156
|
+
<button
|
|
157
|
+
type="button"
|
|
158
|
+
onClick={onSend}
|
|
159
|
+
disabled={sendDisabled}
|
|
160
|
+
className={`${ACTION_BASE} ${actionSize} hover:opacity-70 disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:opacity-40`}
|
|
161
|
+
title={chatInFlight ? 'Queue follow-up message' : 'Send message'}
|
|
162
|
+
aria-label={chatInFlight ? 'Queue follow-up message' : 'Send message'}
|
|
163
|
+
>
|
|
164
|
+
<Send size={iconSize} className="ml-px text-info-text" />
|
|
165
|
+
</button>
|
|
166
|
+
);
|
|
167
|
+
|
|
152
168
|
return (
|
|
153
169
|
<div
|
|
154
170
|
// No separator and no tinted strip: the composer is one card, so its
|
|
@@ -167,6 +183,9 @@ export function ComposerToolbar({
|
|
|
167
183
|
selectedModel={selectedModel ?? undefined}
|
|
168
184
|
onSelectModel={onSelectModel}
|
|
169
185
|
onThinkingLevelChange={onThinkingLevelChange}
|
|
186
|
+
{...(showThinking
|
|
187
|
+
? { thinkingLevels, currentThinking, onSelectThinking }
|
|
188
|
+
: {})}
|
|
170
189
|
harness={harness}
|
|
171
190
|
harnessEditable={harnessEditable}
|
|
172
191
|
onSelectHarness={onSelectHarness}
|
|
@@ -175,19 +194,6 @@ export function ComposerToolbar({
|
|
|
175
194
|
/>
|
|
176
195
|
)}
|
|
177
196
|
|
|
178
|
-
{showModel && showThinking && <div className="w-[1px] h-3 bg-ink/10" />}
|
|
179
|
-
|
|
180
|
-
{showThinking && (
|
|
181
|
-
<ThinkingLevelDropdown
|
|
182
|
-
thinkingLevels={thinkingLevels}
|
|
183
|
-
currentThinking={currentThinking}
|
|
184
|
-
onSelect={onSelectThinking}
|
|
185
|
-
iconOnly={isMobile}
|
|
186
|
-
/>
|
|
187
|
-
)}
|
|
188
|
-
|
|
189
|
-
{(showModel || showThinking) && accessAvailable && <div className="w-[1px] h-3 bg-ink/10" />}
|
|
190
|
-
|
|
191
197
|
{accessAvailable && onSelectAccess && (
|
|
192
198
|
<AccessDropdown
|
|
193
199
|
value={accessMode}
|
|
@@ -204,22 +210,19 @@ export function ComposerToolbar({
|
|
|
204
210
|
the model/thinking/access cluster plus voice+send: a third group here
|
|
205
211
|
pushed voice under the model label. On a wide desktop there is room. */}
|
|
206
212
|
{!isMobile && showAccess && modes && onOpenGoal && (
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
onSelectMode={modes.onSelectSessionMode}
|
|
221
|
-
/>
|
|
222
|
-
</>
|
|
213
|
+
<ModeToggles
|
|
214
|
+
plan={modes.plan}
|
|
215
|
+
goal={modes.goalOpen}
|
|
216
|
+
goalArm={modes.goalArm}
|
|
217
|
+
goalRecord={modes.goalRecord}
|
|
218
|
+
pending={modes.pending}
|
|
219
|
+
onTogglePlan={modes.onTogglePlan}
|
|
220
|
+
onOpenGoal={onOpenGoal}
|
|
221
|
+
planAvailable={modes.planAvailable}
|
|
222
|
+
goalAvailable={modes.goalAvailable}
|
|
223
|
+
mode={modes.sessionMode ?? null}
|
|
224
|
+
onSelectMode={modes.onSelectSessionMode}
|
|
225
|
+
/>
|
|
223
226
|
)}
|
|
224
227
|
</div>
|
|
225
228
|
|
|
@@ -227,82 +230,22 @@ export function ComposerToolbar({
|
|
|
227
230
|
{/* Plugin contributions sit before the built-in controls, in store
|
|
228
231
|
order. An empty slot renders nothing, so this row is unchanged. */}
|
|
229
232
|
<PluginComposerActions text={text} isSubmitting={chatInFlight} />
|
|
230
|
-
{/*
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
: voiceListening
|
|
244
|
-
? 'bg-error-text text-canvas animate-pulse shadow-xs'
|
|
245
|
-
: 'text-ink/50 hover:text-ink hover:bg-ink/10'
|
|
246
|
-
}`}
|
|
247
|
-
title={
|
|
248
|
-
voiceBusy
|
|
249
|
-
? 'Transcribing…'
|
|
250
|
-
: voiceListening
|
|
251
|
-
? 'Stop recording'
|
|
252
|
-
: `Voice input — ${voiceHint ?? 'speech-to-text'}`
|
|
253
|
-
}
|
|
254
|
-
>
|
|
255
|
-
{voiceBusy ? (
|
|
256
|
-
<Loader2 size={iconSize} className="animate-spin" />
|
|
257
|
-
) : voiceListening ? (
|
|
258
|
-
<MicOff size={iconSize} />
|
|
259
|
-
) : (
|
|
260
|
-
<Mic size={iconSize} />
|
|
261
|
-
)}
|
|
262
|
-
</button>
|
|
263
|
-
)}
|
|
264
|
-
|
|
265
|
-
{/* Stop and Send are ICON-ONLY: no plate, no fill, no shadow. The colour
|
|
266
|
-
moved onto the glyph, and it has to sit ON THE SVG: the icon mode's
|
|
267
|
-
paint rule is stated on `svg.lucide` at (0,2,1) and beats a single
|
|
268
|
-
utility, so `authorColourRules` keys on `svg[class~="text-error-text"]`
|
|
269
|
-
to keep the token. On the button the glyph would take the mode's
|
|
270
|
-
hashed hue.
|
|
271
|
-
|
|
272
|
-
`-text` is the palette's signal solved to 4.5:1 against paper and
|
|
273
|
-
canvas; the raw `text-error-text`/`text-info-text` measures 2.73:1 and 1.94:1
|
|
274
|
-
on the worst palettes, under the 3:1 graphic floor for a 12px glyph.
|
|
275
|
-
Monochrome still paints the pair ink — its pass is (0,5,1) and
|
|
276
|
-
outranks the utility — so the hue survives only in the colour mode,
|
|
277
|
-
which is the mode that asks for chroma.
|
|
278
|
-
|
|
279
|
-
Hover is opacity, never a background: a `hover:bg-*` would put the
|
|
280
|
-
rectangle back on hover and the control would read as a button
|
|
281
|
-
again. `disabled:hover` re-states the resting opacity because
|
|
282
|
-
`:hover` matches a disabled button too — without it, pointing at a
|
|
283
|
-
barred Send would brighten it. */}
|
|
284
|
-
{showStop && (
|
|
285
|
-
<button
|
|
286
|
-
type="button"
|
|
287
|
-
onClick={onStop}
|
|
288
|
-
className={`${ACTION_BASE} ${actionSize} hover:opacity-70`}
|
|
289
|
-
title="Stop generation"
|
|
290
|
-
aria-label="Stop generation"
|
|
291
|
-
>
|
|
292
|
-
<Square size={iconSize} className="fill-current text-error-text" />
|
|
293
|
-
</button>
|
|
233
|
+
{/* On a phone the mic lives at the RIGHT OF THE DRAFT (right of the
|
|
234
|
+
textarea, above Send), not in this row: it was a third control
|
|
235
|
+
beside Send in a row whose left cluster already fills the width.
|
|
236
|
+
Desktop keeps it in the action cluster where it has always been. */}
|
|
237
|
+
{!isMobile && (
|
|
238
|
+
<VoiceButton
|
|
239
|
+
supported={voiceSupported}
|
|
240
|
+
listening={voiceListening}
|
|
241
|
+
busy={voiceBusy}
|
|
242
|
+
hint={voiceHint}
|
|
243
|
+
onToggle={onVoiceToggle}
|
|
244
|
+
isMobile={false}
|
|
245
|
+
/>
|
|
294
246
|
)}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
type="button"
|
|
298
|
-
onClick={onSend}
|
|
299
|
-
disabled={sendDisabled}
|
|
300
|
-
className={`${ACTION_BASE} ${actionSize} hover:opacity-70 disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:opacity-40`}
|
|
301
|
-
title={chatInFlight ? 'Queue follow-up message' : 'Send message'}
|
|
302
|
-
aria-label={chatInFlight ? 'Queue follow-up message' : 'Send message'}
|
|
303
|
-
>
|
|
304
|
-
<Send size={iconSize} className="ml-px text-info-text" />
|
|
305
|
-
</button>
|
|
247
|
+
{stopButton}
|
|
248
|
+
{sendButton}
|
|
306
249
|
</div>
|
|
307
250
|
</div>
|
|
308
251
|
);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Loader2, Mic, MicOff } from 'lucide-preact';
|
|
2
|
+
import { ACTION_BASE, actionBox } from '@/client/components/workspace/chat-timeline/chat-input/action-base';
|
|
3
|
+
|
|
4
|
+
export interface VoiceButtonProps {
|
|
5
|
+
/** The browser can capture audio. False renders nothing. */
|
|
6
|
+
supported?: boolean;
|
|
7
|
+
listening?: boolean;
|
|
8
|
+
/** True from release until the transcript lands; the button shows a spinner. */
|
|
9
|
+
busy?: boolean;
|
|
10
|
+
/** Engine + language the next utterance will use, for the tooltip. */
|
|
11
|
+
hint?: string;
|
|
12
|
+
onToggle?: () => void;
|
|
13
|
+
/** 32px on a phone (the touch floor's real geometry), 28px on the desktop. */
|
|
14
|
+
isMobile: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The dictation toggle: idle mic → pulsing red mic-off while recording →
|
|
20
|
+
* spinner while transcribing. It lives beside the phone's textarea (right of
|
|
21
|
+
* the draft, above Send) and in the desktop toolbar; both hosts share the one
|
|
22
|
+
* `ACTION_BASE` geometry so the two copies cannot drift.
|
|
23
|
+
*/
|
|
24
|
+
export function VoiceButton({ supported, listening, busy, hint, onToggle, isMobile, className = '' }: VoiceButtonProps) {
|
|
25
|
+
if (!supported) return null;
|
|
26
|
+
const size = actionBox(isMobile);
|
|
27
|
+
const iconSize = isMobile ? 14 : 12;
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<button
|
|
31
|
+
type="button"
|
|
32
|
+
onClick={onToggle}
|
|
33
|
+
disabled={busy}
|
|
34
|
+
className={`${ACTION_BASE} ${size} ${className} ${
|
|
35
|
+
busy
|
|
36
|
+
? 'text-ink/40 cursor-wait'
|
|
37
|
+
: listening
|
|
38
|
+
? 'bg-error-text text-canvas animate-pulse shadow-xs'
|
|
39
|
+
: 'text-ink/50 hover:text-ink hover:bg-ink/10'
|
|
40
|
+
}`}
|
|
41
|
+
title={
|
|
42
|
+
busy
|
|
43
|
+
? 'Transcribing…'
|
|
44
|
+
: listening
|
|
45
|
+
? 'Stop recording'
|
|
46
|
+
: `Voice input — ${hint ?? 'speech-to-text'}`
|
|
47
|
+
}
|
|
48
|
+
>
|
|
49
|
+
{busy ? (
|
|
50
|
+
<Loader2 size={iconSize} className="animate-spin" />
|
|
51
|
+
) : listening ? (
|
|
52
|
+
<MicOff size={iconSize} />
|
|
53
|
+
) : (
|
|
54
|
+
<Mic size={iconSize} />
|
|
55
|
+
)}
|
|
56
|
+
</button>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The shared geometry of the composer's action controls (Stop, Send and the
|
|
8
|
+
* mic), because they are one visual cluster.
|
|
9
|
+
*
|
|
10
|
+
* They used to state their own boxes: `rounded` on send (4px, below DESIGN.md
|
|
11
|
+
* §5's 6-8px control radius) and `rounded-md` on a phone's stop, so the pair
|
|
12
|
+
* disagreed on radius and only agreed on size by coincidence. Both are 28px on
|
|
13
|
+
* a desktop and 32px on a phone, from ONE pair of classes in the callers, so a
|
|
14
|
+
* future size change cannot land on one control and miss the other.
|
|
15
|
+
*
|
|
16
|
+
* `focus-visible` is not decoration: the send and stop controls had no focus
|
|
17
|
+
* treatment at all, so the two controls that start and end a turn were the only
|
|
18
|
+
* interactive elements in the composer a keyboard user could not see. The ring
|
|
19
|
+
* is ink at 50%, not the `/20`-`/30` the timeline cards use: WCAG 1.4.11 wants
|
|
20
|
+
* 3:1 for a focus indicator, and on `paper` the ramp measures `/30` 1.97, `/45`
|
|
21
|
+
* 2.96 and `/50` 3.43. It is offset by 2px of the card's own paper so the ring
|
|
22
|
+
* never touches the glyph it surrounds.
|
|
23
|
+
*
|
|
24
|
+
* The transition is Tailwind's own `transition` (colour, background, border,
|
|
25
|
+
* box-shadow, transform), not a hand-listed property set: those are the five
|
|
26
|
+
* things these buttons can change, and they are the default for a reason.
|
|
27
|
+
*/
|
|
28
|
+
export const ACTION_BASE =
|
|
29
|
+
'tap-target flex items-center justify-center rounded-lg flex-shrink-0 cursor-pointer ' +
|
|
30
|
+
'transition duration-150 ' +
|
|
31
|
+
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink/50 ' +
|
|
32
|
+
'focus-visible:ring-offset-2 focus-visible:ring-offset-paper';
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The box every control in that cluster occupies: 32px on a phone (the touch
|
|
36
|
+
* floor's real geometry) and 28px on the desktop toolbar. Callers take the
|
|
37
|
+
* pair from here rather than restating a ternary, so the stretch control in
|
|
38
|
+
* the row above cannot drift off the Send/mic column it sits over.
|
|
39
|
+
*/
|
|
40
|
+
export function actionBox(isMobile: boolean): string {
|
|
41
|
+
return isMobile ? 'w-8 h-8' : 'w-7 h-7';
|
|
42
|
+
}
|
|
@@ -244,6 +244,7 @@ export function ChatInput({
|
|
|
244
244
|
className={className}
|
|
245
245
|
cardRef={cardRef}
|
|
246
246
|
expanded={expanded}
|
|
247
|
+
variant={variant}
|
|
247
248
|
// focusin/focusout BUBBLE, unlike focus/blur: the card has to learn that
|
|
248
249
|
// the textarea inside it was focused, and a capture-phase `onFocus` on
|
|
249
250
|
// this element is not the same question (it fires for the card's own
|