@kabmo-labs/kabmo 0.58.0 → 0.59.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 +520 -489
- package/dist/client/static/js/{Body-karkrzkc.js → Body-jqq4654r.js} +3 -3
- package/dist/client/static/js/{CsvGrid-j03knmbe.js → CsvGrid-avw0taqb.js} +2 -2
- package/dist/client/static/js/{DocxView-e8408vzs.js → DocxView-d221vr6g.js} +3 -3
- package/dist/client/static/js/{DrawioView-fj4mfzch.js → DrawioView-gjsy7p01.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-9g8xwzgw.js → HtmlPreview-949393v1.js} +1 -1
- package/dist/client/static/js/ImageView-pan9pqtm.js +1 -0
- package/dist/client/static/js/LayoutWrapper-p0qmghgt.js +2 -0
- package/dist/client/static/js/MergeDiffView-swt467g7.js +1 -0
- package/dist/client/static/js/Modal-4spmcn44.js +60 -0
- package/dist/client/static/js/{PdfView-8jtdx5hd.js → PdfView-dzj2s6rj.js} +1 -1
- package/dist/client/static/js/SessionsView-b6szjdg5.js +1 -0
- package/dist/client/static/js/{SheetView-hwx8s864.js → SheetView-jpc178g5.js} +11 -11
- package/dist/client/static/js/{SvgPreview-ete36nzv.js → SvgPreview-94fap32p.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-7nsqzz6z.js → abnfDiagram-O67JEVCF-a6eyfzrj.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-bwn1drdz.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-xvpkfq2f.js → architectureDiagram-NJMV4G6O-pgmyfncy.js} +3 -3
- package/dist/client/static/js/{astro-rsrqgjjx.js → astro-ryr2ajmg.js} +1 -1
- package/dist/client/static/js/bash-zknkkwkw.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-0saahcs6.js → blockDiagram-BEXU5L5S-rf51jyb2.js} +6 -6
- package/dist/client/static/js/c-0w02jkxb.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-ktpqnb4a.js → c4Diagram-YGBWAQC7-0faj48jp.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-x67cz3ms.js → classDiagram-v2-NBCMYWYE-bvzsws8x.js} +6 -6
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-9wzmhkz8.js → cose-bilkent-JH36ORCC-j1amnd3m.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-dmmgmv99.js → cynefinDiagram-VND7K2PF-f73w6zzz.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-ygkkms1t.js → dagre-6A5THRUB-a5vgvjsg.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-qxj0pqb4.js → diagram-22UHCM2B-6y9efamp.js} +12 -12
- package/dist/client/static/js/{diagram-3UASUU5V-77k8w5dt.js → diagram-3UASUU5V-2mycy7xm.js} +2 -2
- package/dist/client/static/js/{diagram-ATOU4E4O-m0h86vf4.js → diagram-ATOU4E4O-10zgjb66.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-5v28kaeg.js → diagram-CDSNMT55-bewa52yf.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-zgcg9gaz.js → diagram-MLGK6HIB-mh3b7gd3.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-10c9s6e6.js → diagram-MPIPVDR6-gvdrbdm5.js} +2 -2
- package/dist/client/static/js/{dockerfile-dr9sdsqp.js → dockerfile-6bn19kg0.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-mz4022dz.js → ebnfDiagram-ZINNZB2B-2prre93c.js} +1 -1
- package/dist/client/static/js/{elixir-3dy25ex8.js → elixir-fyxw6d70.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-ccerbsag.js → elk-276RUBZZ-9t6t9kc6.js} +2 -2
- package/dist/client/static/js/{erDiagram-OPXOYQCR-a8vjyrrw.js → erDiagram-OPXOYQCR-etcggr5n.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-7c2ncsw7.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-sz1g29fp.js → ganttDiagram-FUAMR5RP-cdc4mwhs.js} +3 -3
- package/dist/client/static/js/gitGraph-4MIJSDKK-mvqq7tcs.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-efqk42q0.js → gitGraphDiagram-X574FWY7-55d0fa7x.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-mpyd7qxj.js → index-10vzyga1.js} +2 -2
- package/dist/client/static/js/{index-2f6psebk.js → index-27gwghmp.js} +2 -2
- package/dist/client/static/js/{index-t71k3b28.js → index-2f6afhze.js} +2 -2
- package/dist/client/static/js/{index-tnxp90ac.js → index-3akjcs82.js} +1 -1
- package/dist/client/static/js/{index-fhtnvqgf.js → index-3j2he86h.js} +2 -2
- 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-zh550byg.js → index-537m8a3x.js} +2 -2
- 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-xfyxmaj1.js → index-60cxxnpk.js} +62 -62
- package/dist/client/static/js/{index-th61y26d.js → index-69mnn71v.js} +2 -2
- package/dist/client/static/js/{index-8aqjj2x2.js → index-6bsez5n6.js} +1 -1
- package/dist/client/static/js/{index-gaa39w5q.js → index-8tzt0dek.js} +2 -2
- package/dist/client/static/js/{index-vb5a3g01.js → index-8z9aqgf3.js} +4 -4
- package/dist/client/static/js/{index-ewryzs4g.js → index-92h38pwg.js} +2 -2
- package/dist/client/static/js/{index-7ma44af3.js → index-9rvjegmy.js} +3 -3
- package/dist/client/static/js/{index-q0k1am0g.js → index-a3bpmw2r.js} +2 -2
- package/dist/client/static/js/{index-j863hg0d.js → index-a5ecn5yx.js} +6 -6
- package/dist/client/static/js/{index-6ey6y9em.js → index-ax8gaayq.js} +2 -2
- package/dist/client/static/js/{index-e42ys2q3.js → index-c253x7vt.js} +7 -7
- package/dist/client/static/js/{index-y0f3wbc3.js → index-d9sfavx1.js} +2 -2
- package/dist/client/static/js/{index-5tp3emtg.js → index-db6s66jr.js} +2 -2
- package/dist/client/static/js/index-eggbcdwx.js +481 -0
- package/dist/client/static/js/{index-ts8rhd06.js → index-f13ern5e.js} +1 -1
- package/dist/client/static/js/{index-ver116ed.js → index-f6t91mpp.js} +1 -1
- package/dist/client/static/js/{index-tc07gd33.js → index-fr91ghwb.js} +2 -2
- package/dist/client/static/js/{index-tq3t3qm4.js → index-fsa18ns9.js} +2 -2
- package/dist/client/static/js/{index-k56patms.js → index-fyt8m8ah.js} +2 -2
- package/dist/client/static/js/{index-gw4c5n3a.js → index-gcad7b6g.js} +2 -2
- package/dist/client/static/js/{index-rxt8sf9a.js → index-h1xbx74w.js} +2 -2
- package/dist/client/static/js/{index-q5q8a3qn.js → index-j1ksa4x2.js} +2 -2
- package/dist/client/static/js/{index-sxag9ptg.js → index-jct0jryd.js} +2 -2
- package/dist/client/static/js/{index-r1wrke3j.js → index-jpvng27a.js} +1 -1
- package/dist/client/static/js/{index-w5j1wgcz.js → index-me0b6wkw.js} +1 -1
- package/dist/client/static/js/{index-6x0kn8pb.js → index-mhrkjbjq.js} +2 -2
- package/dist/client/static/js/{index-nzq51nbb.js → index-mngpcca7.js} +5 -5
- package/dist/client/static/js/index-mttx9327.css +1 -0
- package/dist/client/static/js/{index-ssepzdaz.js → index-mx5y9vt9.js} +7 -7
- package/dist/client/static/js/{index-3ymw778n.js → index-ndqtff48.js} +2 -2
- package/dist/client/static/js/{index-wnk9k57k.js → index-nf4hq5tg.js} +55 -55
- package/dist/client/static/js/{index-f31c6jg8.js → index-njhrm5qa.js} +10 -10
- package/dist/client/static/js/index-nnwcbp2d.js +2 -0
- package/dist/client/static/js/{index-3p732mvs.js → index-np2rfq06.js} +2 -2
- package/dist/client/static/js/{index-kc5yt2cd.js → index-nwbr15b3.js} +2 -2
- package/dist/client/static/js/{index-2a0b9ya2.js → index-pa70qj4p.js} +1 -1
- package/dist/client/static/js/index-pe5f2gmn.js +1 -0
- package/dist/client/static/js/{index-qbqm3c91.js → index-pgy7ree5.js} +5 -5
- package/dist/client/static/js/index-pzwf6hwe.js +4 -0
- package/dist/client/static/js/{index-jnxmvxb8.js → index-q3k8r0ms.js} +11 -11
- package/dist/client/static/js/{index-qkcmspxq.js → index-rw84kefb.js} +2 -2
- package/dist/client/static/js/{index-gqsnyh8k.js → index-s9ts6qbj.js} +2 -2
- package/dist/client/static/js/{index-dqf0srrp.js → index-sg65xdey.js} +2 -2
- package/dist/client/static/js/{index-mkp3gwag.js → index-skvfxcd8.js} +1 -1
- package/dist/client/static/js/{index-6qqsy78z.js → index-sx2yz2wx.js} +1 -1
- package/dist/client/static/js/{index-6ac860yz.js → index-trq7bdvk.js} +2 -2
- package/dist/client/static/js/{index-v8xhgfeq.js → index-vs2y8gxr.js} +2 -2
- package/dist/client/static/js/index-wwyjzhgs.js +2 -0
- package/dist/client/static/js/{index-7s4dge1z.js → index-xe447cw3.js} +1 -1
- package/dist/client/static/js/index-y09de44h.js +2 -0
- package/dist/client/static/js/{index-jxsha63v.js → index-y4cx8cqf.js} +2 -2
- package/dist/client/static/js/{index-bkwax812.js → index-yg38s8t3.js} +1 -1
- package/dist/client/static/js/{index-dz18nn65.js → index-yh7gngsh.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-rykcacj5.js → infoDiagram-VRGFBTTK-9xph6cr5.js} +2 -2
- package/dist/client/static/js/ini-62r3vxaf.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-rj752kd8.js → ishikawaDiagram-OU5B5YK6-3gshs3v8.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-mtetwn6f.js → journeyDiagram-ZHPQQLJL-fa8x56mf.js} +3 -3
- 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-mxe3pnz3.js → julia-agc5kfvg.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-4h5pw5mm.js → kanban-definition-PNTS6WVX-fybp2hh4.js} +5 -5
- 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-jjh5ggp0.js +12 -0
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-67s4xy7h.js → mindmap-definition-NLK3R4M7-gtfbg619.js} +5 -5
- package/dist/client/static/js/one-dark-pro-vht9rv39.js +1 -0
- package/dist/client/static/js/one-light-arxc5whh.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-dgpge627.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-qykb6ssk.js → pegDiagram-GJSIUBJH-1a51sbqv.js} +1 -1
- package/dist/client/static/js/{perl-a8eeaqkn.js → perl-v5vbtzgf.js} +1 -1
- package/dist/client/static/js/{php-6gq92zt8.js → php-83qwy98t.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-b8pgsqrd.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-mymrrvck.js → pieDiagram-5QR66LMP-zd9svyyn.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-6f8ahd40.js → quadrantDiagram-O4NWA36T-5gtw2m6s.js} +3 -3
- 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-c3habpvw.js → railroadDiagram-XR7U4H2S-3ccwpfzz.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-nysqy6te.js → requirementDiagram-PLB6GJNP-sasndrrp.js} +4 -4
- package/dist/client/static/js/{ruby-mc826p2e.js → ruby-994n5j6e.js} +1 -1
- package/dist/client/static/js/{rust-m4f4vpvn.js → rust-n9z2c9m3.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-s5dtfp3z.js → sankeyDiagram-IPEJSGJF-2ahb4sda.js} +3 -3
- package/dist/client/static/js/{sass-8bq5r2tz.js → sass-p6g7qdv2.js} +1 -1
- package/dist/client/static/js/{scss-9wz47c6t.js → scss-4j4t3r6y.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-bb3yp049.js → sequenceDiagram-PO4LG4MO-bfj90kz1.js} +7 -7
- package/dist/client/static/js/{sizeCapture-INFHLROL-0m2msee7.js → sizeCapture-INFHLROL-5tygxmtc.js} +1 -1
- package/dist/client/static/js/sql-kwpd5w07.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-cd0qgj6t.js → stateDiagram-v2-GCMORJYK-533xw76e.js} +3 -3
- package/dist/client/static/js/{svelte-5vrwkc13.js → svelte-bek3h1sz.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-rpb01f7p.js → swimlanes-2SLR337P-gd3d04pk.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-xxmvdyg4.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-tqw2e6y1.js → timeline-definition-EJHVYXUP-fvqvgqvg.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-dhf4d5xg.js → usecaseDiagram-POWQR4AR-tm1f0m4x.js} +25 -25
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-ztkk79dv.js → vennDiagram-UO4OBE2U-2vdvv1hd.js} +4 -4
- package/dist/client/static/js/{vue-gmjnxjm3.js → vue-y44m889c.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-cbqtax1x.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-ahre5tmv.js → wardleyDiagram-VNRHLVJA-7avcjznx.js} +4 -4
- package/dist/client/static/js/xml-xs6qz3ya.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-vak2c50n.js → xychartDiagram-PMCCYNJV-g39y526n.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/anchored-menu/index.tsx +11 -4
- 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 +6 -2
- package/src/client/components/common/session-row/index.tsx +32 -16
- package/src/client/components/common/session-row/session-row.test.tsx +56 -18
- 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/WorkspaceHeader.tsx +46 -8
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +9 -3
- package/src/client/components/layout/session-sidebar/modern/index.tsx +2 -0
- package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +36 -0
- 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/ChatOverlays.tsx +1 -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/NewChatModal.tsx +5 -0
- package/src/client/components/workspace/chat-timeline/OrchestrationNotice.tsx +81 -162
- package/src/client/components/workspace/chat-timeline/SystemNotice.tsx +7 -3
- package/src/client/components/workspace/chat-timeline/ThinkingSection.test.tsx +17 -0
- package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +21 -7
- package/src/client/components/workspace/chat-timeline/ToolCallingSection.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/UserTurn.test.tsx +24 -6
- package/src/client/components/workspace/chat-timeline/UserTurn.tsx +17 -4
- package/src/client/components/workspace/chat-timeline/block-chrome.test.tsx +16 -0
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +104 -11
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +120 -43
- 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 +47 -22
- 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 +26 -2
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +67 -37
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +86 -1
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +90 -135
- package/src/client/components/workspace/chat-timeline/chat-input/VoiceButton.tsx +58 -0
- package/src/client/components/workspace/chat-timeline/chat-input/access-capability.test.tsx +151 -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/modes-props.ts +5 -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/fork-preview.test.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/index.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/target-picker/ParentSessionPicker.test.tsx +21 -5
- package/src/client/components/workspace/chat-timeline/target-picker/ParentSessionPicker.tsx +100 -71
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.test.tsx +9 -9
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +83 -66
- package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.test.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.tsx +36 -15
- 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/chat-timeline/tool-renderers/shared/ArtifactChip.tsx +7 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolRowActions.tsx +10 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Card.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Compact.tsx +11 -6
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Minimal.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Trace.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.test.tsx +5 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.tsx +19 -12
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/parity.test.tsx +50 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/props.ts +2 -0
- package/src/client/components/workspace/model-dropdown/HarnessTabs.tsx +31 -10
- package/src/client/components/workspace/model-dropdown/Header.tsx +13 -5
- package/src/client/components/workspace/model-dropdown/Panel.tsx +18 -0
- 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 +21 -5
- package/src/client/components/workspace/model-dropdown/index.tsx +20 -47
- 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/access-ladder-wiring.test.ts +111 -0
- package/src/client/hooks/chat/timeline/access-ladder.test.ts +66 -0
- package/src/client/hooks/chat/timeline/access-ladder.ts +72 -0
- package/src/client/hooks/chat/timeline/access-mode.ts +11 -1
- package/src/client/hooks/chat/timeline/index.ts +4 -5
- package/src/client/hooks/chat/timeline/modes-contract.ts +10 -1
- package/src/client/hooks/chat/timeline/modes.ts +10 -2
- 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/realtime/topics/session-data.server.ts +6 -5
- package/src/server/lib/realtime/topics/session-data.test.ts +35 -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/orchestration/outcome-markdown.test.ts +57 -0
- package/src/shared/lib/chat/orchestration/outcome-markdown.ts +74 -0
- 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-sz4fzz9k.js +0 -1
- package/dist/client/static/js/LayoutWrapper-q6q4h04a.js +0 -2
- package/dist/client/static/js/MergeDiffView-b8f013ws.js +0 -1
- package/dist/client/static/js/Modal-ahecatp5.js +0 -60
- package/dist/client/static/js/SessionsView-jwp8xvw5.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-dc7zys46.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-9gak6bze.js +0 -1
- package/dist/client/static/js/css-sp1cgdbr.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-9fx59e89.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-61d2ee91.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-104ywb7w.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-zkb30q0t.js +0 -1
- package/dist/client/static/js/graphql-2ntm7jyh.js +0 -1
- package/dist/client/static/js/html-mt2yb43b.js +0 -1
- package/dist/client/static/js/index-6h46r2de.js +0 -1
- package/dist/client/static/js/index-f44k9k8d.css +0 -1
- package/dist/client/static/js/index-k1576e2m.js +0 -2
- package/dist/client/static/js/index-k4qshngy.js +0 -4
- package/dist/client/static/js/index-rr79n77k.js +0 -470
- package/dist/client/static/js/index-vf01q99d.js +0 -2
- package/dist/client/static/js/index-x7h04xzf.js +0 -2
- package/dist/client/static/js/index-xygk0v3e.js +0 -2
- package/dist/client/static/js/info-A6RAGUB7-xxvyt8p8.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-0mqgcvps.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-bs542jma.js +0 -12
- package/dist/client/static/js/one-dark-pro-541ed4b7.js +0 -1
- package/dist/client/static/js/one-light-nr79mykt.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-cm8jeesg.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-8b9xgcxv.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-fxr2x2mf.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-5qd45xk1.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-6fa00vpk.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-pcbtg7tj.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-r0fdhdtp.js +0 -1
- package/dist/client/static/js/sql-sd00wgem.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-zx36y2c8.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-9sn2h4ea.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-9fzms0pq.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-vy6rp5gp.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.tsx +0 -67
|
@@ -16,6 +16,16 @@
|
|
|
16
16
|
* Modelled on a queued-message row (`QueueList`): status word, the objective,
|
|
17
17
|
* its figures, and only the actions that apply right now.
|
|
18
18
|
*
|
|
19
|
+
* ## The status word is the LIVE phase, not omp's durable status
|
|
20
|
+
*
|
|
21
|
+
* omp reports `active` for the whole life of an open goal — the minutes it
|
|
22
|
+
* spends waiting for a turn to finish included — so repeating the record's
|
|
23
|
+
* status made the row say "active" forever, streaming or idle. The goal's own
|
|
24
|
+
* process is the loop between turns (Kabmo's audit, `evaluating`); a streaming
|
|
25
|
+
* turn is the AGENT working, and the goal is waiting for it. The row therefore
|
|
26
|
+
* reads `waiting` unless the loop is deciding, and only a non-`active` durable
|
|
27
|
+
* status (paused, budget-limited) or a stop verdict keeps its own word.
|
|
28
|
+
*
|
|
19
29
|
* ## What the turn counter is, exactly
|
|
20
30
|
*
|
|
21
31
|
* `continuation` comes from the child's own `KABMO_GOAL_CONTINUATION` frame,
|
|
@@ -33,7 +43,7 @@
|
|
|
33
43
|
* business being a stray click beside Pause.
|
|
34
44
|
*/
|
|
35
45
|
|
|
36
|
-
import { AlertTriangle, CheckCircle2,
|
|
46
|
+
import { AlertTriangle, CheckCircle2, Loader2, Pause, Play, SlidersHorizontal, Target } from 'lucide-preact';
|
|
37
47
|
import type { GoalContinuation, GoalContinuationStop, GoalRecord } from '@kabmo-labs/kabmo-omp/mode/types';
|
|
38
48
|
import { formatGoalDuration, formatGoalTokens } from '@kabmo-labs/kabmo-omp/mode/format';
|
|
39
49
|
import { isGoalOpen } from '@kabmo-labs/kabmo-omp/mode/status';
|
|
@@ -88,14 +98,15 @@ export interface GoalBannerProps {
|
|
|
88
98
|
record: GoalRecord;
|
|
89
99
|
/**
|
|
90
100
|
* The CHAT's run state — the timeline's `timelineRunning`, not the composer's
|
|
91
|
-
* local one.
|
|
92
|
-
*
|
|
101
|
+
* local one. It never makes the goal "active" (that is the loop's window);
|
|
102
|
+
* it only says which wait the row is in, for the tooltip.
|
|
93
103
|
*/
|
|
94
104
|
running: boolean;
|
|
95
105
|
/** The child's last automatic turn, or null when it has not reported one. */
|
|
96
106
|
continuation: GoalContinuation | null;
|
|
97
107
|
/** The loop is deciding whether to open another turn (it emits nothing else
|
|
98
|
-
* for that window, so the spinner covers it).
|
|
108
|
+
* for that window, so the spinner covers it). This is the ONLY window in
|
|
109
|
+
* which the goal itself is running. */
|
|
99
110
|
evaluating: boolean;
|
|
100
111
|
/** A mode command is in flight; the row reads as pending rather than absent. */
|
|
101
112
|
pending: boolean;
|
|
@@ -119,10 +130,20 @@ export function GoalBanner({ record, running, continuation, evaluating, pending,
|
|
|
119
130
|
const stopReason = continuation?.stopped;
|
|
120
131
|
const stop = stopReason && STOP_UI[stopReason] ? stopReason : null;
|
|
121
132
|
const stopped = !paused && stop !== null;
|
|
122
|
-
//
|
|
123
|
-
//
|
|
124
|
-
|
|
125
|
-
const
|
|
133
|
+
// omp's record is durable, not live: `active` covers the minutes between
|
|
134
|
+
// turns. Only the loop's own window is "active"; a streaming turn and an idle
|
|
135
|
+
// gap are both the goal waiting (see the module comment).
|
|
136
|
+
const loopActive = evaluating;
|
|
137
|
+
const phase = paused
|
|
138
|
+
? 'paused'
|
|
139
|
+
: stop
|
|
140
|
+
? STOP_UI[stop].badge
|
|
141
|
+
: record.status === 'active'
|
|
142
|
+
? loopActive
|
|
143
|
+
? 'active'
|
|
144
|
+
: 'waiting'
|
|
145
|
+
: record.status;
|
|
146
|
+
const tone = loopActive ? 'text-ink/45' : stopped ? STOP_UI[stop].tone : paused ? 'text-warning-text' : 'text-ink/45';
|
|
126
147
|
const badge = paused
|
|
127
148
|
? 'bg-warning/10 text-warning-text'
|
|
128
149
|
: stop === 'complete'
|
|
@@ -130,6 +151,15 @@ export function GoalBanner({ record, running, continuation, evaluating, pending,
|
|
|
130
151
|
: stop
|
|
131
152
|
? 'bg-warning/10 text-warning-text'
|
|
132
153
|
: 'bg-ink/8 text-ink/60';
|
|
154
|
+
const phaseTitle = stop
|
|
155
|
+
? STOP_UI[stop].title
|
|
156
|
+
: paused
|
|
157
|
+
? 'Goal is paused'
|
|
158
|
+
: loopActive
|
|
159
|
+
? 'The goal loop is deciding whether to continue'
|
|
160
|
+
: running
|
|
161
|
+
? 'Goal is waiting for the current turn to finish'
|
|
162
|
+
: 'Goal is waiting for its next turn';
|
|
133
163
|
|
|
134
164
|
const tokens =
|
|
135
165
|
record.tokenBudget !== undefined
|
|
@@ -145,13 +175,11 @@ export function GoalBanner({ record, running, continuation, evaluating, pending,
|
|
|
145
175
|
// the background was only ever separation.
|
|
146
176
|
className="flex items-center gap-2 px-3 py-1.5 text-[11px]"
|
|
147
177
|
data-goal-banner={record.status}
|
|
178
|
+
data-goal-phase={phase}
|
|
148
179
|
data-goal-stop={stop ?? undefined}
|
|
149
180
|
>
|
|
150
|
-
<span
|
|
151
|
-
|
|
152
|
-
title={stop ? STOP_UI[stop].title : `Goal is ${record.status}`}
|
|
153
|
-
>
|
|
154
|
-
{busy ? (
|
|
181
|
+
<span className={`shrink-0 ${tone}`} title={phaseTitle}>
|
|
182
|
+
{loopActive ? (
|
|
155
183
|
<Loader2 size={12} className="animate-spin" />
|
|
156
184
|
) : stop === 'complete' ? (
|
|
157
185
|
<CheckCircle2 size={12} />
|
|
@@ -163,7 +191,7 @@ export function GoalBanner({ record, running, continuation, evaluating, pending,
|
|
|
163
191
|
</span>
|
|
164
192
|
|
|
165
193
|
<span className={`shrink-0 rounded-full px-1.5 py-px font-mono text-[10px] uppercase tracking-wider ${badge}`}>
|
|
166
|
-
{
|
|
194
|
+
{phase}
|
|
167
195
|
</span>
|
|
168
196
|
|
|
169
197
|
<span className="min-w-0 flex-1 truncate text-ink/75" title={record.objective}>
|
|
@@ -180,14 +208,12 @@ export function GoalBanner({ record, running, continuation, evaluating, pending,
|
|
|
180
208
|
<span aria-live="polite" className={`shrink-0 font-mono text-[10px] ${stopped ? tone : 'text-ink/45'}`}>
|
|
181
209
|
{stop && continuation ? (
|
|
182
210
|
<span title={STOP_UI[stop].title}>{stopChip(stop, continuation)}</span>
|
|
211
|
+
) : loopActive ? (
|
|
212
|
+
<span title="The auditor is checking the turn that just ended">evaluating</span>
|
|
183
213
|
) : continuation ? (
|
|
184
214
|
<span title="Automatic goal turns taken this session">
|
|
185
215
|
turn {continuation.turn}/{continuation.maxTurns}
|
|
186
216
|
</span>
|
|
187
|
-
) : evaluating ? (
|
|
188
|
-
<span title="The auditor is checking the turn that just ended">evaluating</span>
|
|
189
|
-
) : running ? (
|
|
190
|
-
<CircleDot size={11} className="animate-pulse" />
|
|
191
217
|
) : null}
|
|
192
218
|
</span>
|
|
193
219
|
|
|
@@ -24,7 +24,8 @@ import type { ComposerModes } from '@/client/components/workspace/chat-timeline/
|
|
|
24
24
|
|
|
25
25
|
export interface GoalSurfacesProps {
|
|
26
26
|
modes?: ComposerModes;
|
|
27
|
-
/** The chat-level run flag (`chatRunning`)
|
|
27
|
+
/** The chat-level run flag (`chatRunning`): the strip waits while it is true,
|
|
28
|
+
* and only the goal loop's own window (`goalEvaluating`) reads as active. */
|
|
28
29
|
running: boolean;
|
|
29
30
|
/** Whether the modal is open, owned by the composer. */
|
|
30
31
|
open: boolean;
|
|
@@ -87,6 +87,27 @@ describe('ModeToggles', () => {
|
|
|
87
87
|
expect(el.querySelector('[aria-label="Set a goal"]')?.getAttribute('aria-pressed')).toBe('false');
|
|
88
88
|
});
|
|
89
89
|
|
|
90
|
+
test('the phone arrangement boxes the chips like the action cluster', () => {
|
|
91
|
+
const el = paint({ iconOnly: true });
|
|
92
|
+
for (const label of ['Enter plan mode', 'Set a goal']) {
|
|
93
|
+
const chip = el.querySelector(`[aria-label="${label}"]`) as HTMLElement | null;
|
|
94
|
+
expect(chip).not.toBeNull();
|
|
95
|
+
// The Goal chip's box has to match Stop/Send's `actionBox`, or its glyph
|
|
96
|
+
// sits 2px inside the column they share on a fine-pointer phone shell.
|
|
97
|
+
expect(chip?.classList.contains('w-8')).toBe(true);
|
|
98
|
+
expect(chip?.classList.contains('h-8')).toBe(true);
|
|
99
|
+
}
|
|
100
|
+
// The pair is spaced like the row's other controls, not 2px apart.
|
|
101
|
+
expect((el.firstElementChild as HTMLElement).className).toContain('gap-1.5');
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
test('a labelled desktop chip keeps its content width', () => {
|
|
105
|
+
const el = paint();
|
|
106
|
+
const plan = el.querySelector('[aria-label="Enter plan mode"]') as HTMLElement | null;
|
|
107
|
+
expect(plan?.classList.contains('w-8')).toBe(false);
|
|
108
|
+
expect((el.firstElementChild as HTMLElement).className).toContain('gap-0.5');
|
|
109
|
+
});
|
|
110
|
+
|
|
90
111
|
test('Plan is hidden while Goal is on, because omp refuses both at once', () => {
|
|
91
112
|
const el = paint({ planAvailable: false, goal: true });
|
|
92
113
|
expect(el.querySelector('[aria-label="Enter plan mode"]')).toBeNull();
|
|
@@ -94,6 +115,20 @@ describe('ModeToggles', () => {
|
|
|
94
115
|
expect(el.querySelector('[aria-label="Manage the active goal"]')).not.toBeNull();
|
|
95
116
|
});
|
|
96
117
|
|
|
118
|
+
test('the active fill shrink-wraps the glyph, not the 44px touch target', () => {
|
|
119
|
+
// `.tap-chip` is 44x44 under `(pointer: coarse)`. Painting `bg-ink` on that
|
|
120
|
+
// button turned two 12px glyphs into two ink slabs in the phone's attachment
|
|
121
|
+
// row (measured at 390x844); the paint belongs on the inner pill so the hit
|
|
122
|
+
// area can keep the floor without becoming the visual.
|
|
123
|
+
const el = paint({ plan: true, goal: true });
|
|
124
|
+
for (const label of ['Leave plan mode', 'Manage the active goal']) {
|
|
125
|
+
const button = el.querySelector(`[aria-label="${label}"]`) as HTMLButtonElement | null;
|
|
126
|
+
expect(button).not.toBeNull();
|
|
127
|
+
expect(button?.className).not.toContain('bg-ink');
|
|
128
|
+
expect((button?.firstElementChild as HTMLElement | null)?.className).toContain('bg-ink');
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
97
132
|
test('Goal is not offered where the harness cannot express one', () => {
|
|
98
133
|
// A non-omp ACP agent has no `/kabmo-mode` extension and no selector that
|
|
99
134
|
// can carry an objective, so the button's only outcome is a refusal — the
|
|
@@ -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
|
@@ -72,7 +72,7 @@ describe('SessionModeDropdown', () => {
|
|
|
72
72
|
await act(async () => {
|
|
73
73
|
(trigger as HTMLButtonElement).click();
|
|
74
74
|
});
|
|
75
|
-
const options =
|
|
75
|
+
const options = document.body.querySelectorAll('[role="option"]');
|
|
76
76
|
expect(options).toHaveLength(2);
|
|
77
77
|
expect(options[0]?.getAttribute('aria-selected')).toBe('true');
|
|
78
78
|
|
|
@@ -80,7 +80,7 @@ describe('SessionModeDropdown', () => {
|
|
|
80
80
|
(options[1] as HTMLButtonElement).click();
|
|
81
81
|
});
|
|
82
82
|
expect(picks).toEqual(['code']);
|
|
83
|
-
expect(
|
|
83
|
+
expect(document.body.querySelector('[role="listbox"]')).toBeNull();
|
|
84
84
|
});
|
|
85
85
|
|
|
86
86
|
test('a chat that has not spawned says "Mode", not an empty chip', async () => {
|
|
@@ -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
|
});
|
|
@@ -13,13 +13,17 @@
|
|
|
13
13
|
* or a one-value ladder — and `ModeToggles` then keeps the Plan button.
|
|
14
14
|
*
|
|
15
15
|
* The popover mirrors `AccessDropdown`: a chip, a list, a check on the current
|
|
16
|
-
* value, and dismissal on outside press.
|
|
16
|
+
* value, and dismissal on outside press. It is PORTALLED for the same reason:
|
|
17
|
+
* the chip lives in the composer's attachment row, and an `absolute left-0`
|
|
18
|
+
* panel ran past a phone's right edge (measured at 320px: 346px).
|
|
17
19
|
*/
|
|
18
20
|
|
|
19
|
-
import { useRef, useState } from 'preact/hooks';
|
|
20
|
-
import { Check, ChevronDown
|
|
21
|
-
import {
|
|
21
|
+
import { useCallback, useRef, useState } from 'preact/hooks';
|
|
22
|
+
import { Check, ChevronDown } from 'lucide-preact';
|
|
23
|
+
import { AnchoredMenu } from '@/client/components/common/anchored-menu';
|
|
24
|
+
import { anchorRectOf, type AnchorRect } from '@/shared/lib/ui/menu-anchor';
|
|
22
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';
|
|
23
27
|
|
|
24
28
|
export interface SessionModeDropdownProps {
|
|
25
29
|
mode: SessionModeState | null;
|
|
@@ -32,8 +36,12 @@ export interface SessionModeDropdownProps {
|
|
|
32
36
|
|
|
33
37
|
export function SessionModeDropdown({ mode, pending, onSelect, iconOnly = false }: SessionModeDropdownProps) {
|
|
34
38
|
const [open, setOpen] = useState(false);
|
|
35
|
-
const
|
|
36
|
-
|
|
39
|
+
const [anchor, setAnchor] = useState<AnchorRect | null>(null);
|
|
40
|
+
const triggerRef = useRef<HTMLButtonElement>(null);
|
|
41
|
+
const close = useCallback(() => {
|
|
42
|
+
setOpen(false);
|
|
43
|
+
setAnchor(null);
|
|
44
|
+
}, []);
|
|
37
45
|
|
|
38
46
|
if (!mode || mode.values.length < 2) return null;
|
|
39
47
|
const current = mode.values.find((choice) => choice.value === mode.currentValue);
|
|
@@ -41,12 +49,31 @@ export function SessionModeDropdown({ mode, pending, onSelect, iconOnly = false
|
|
|
41
49
|
// the ladder but not always which value is current, and an empty label read as
|
|
42
50
|
// a broken chip beside a working list.
|
|
43
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
|
+
);
|
|
59
|
+
|
|
60
|
+
const toggle = () => {
|
|
61
|
+
if (open) {
|
|
62
|
+
close();
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const trigger = triggerRef.current;
|
|
66
|
+
if (!trigger) return;
|
|
67
|
+
setAnchor(anchorRectOf(trigger));
|
|
68
|
+
setOpen(true);
|
|
69
|
+
};
|
|
44
70
|
|
|
45
71
|
return (
|
|
46
|
-
<div
|
|
72
|
+
<div>
|
|
47
73
|
<button
|
|
74
|
+
ref={triggerRef}
|
|
48
75
|
type="button"
|
|
49
|
-
onClick={
|
|
76
|
+
onClick={toggle}
|
|
50
77
|
disabled={pending}
|
|
51
78
|
aria-haspopup="listbox"
|
|
52
79
|
aria-expanded={open}
|
|
@@ -54,39 +81,42 @@ export function SessionModeDropdown({ mode, pending, onSelect, iconOnly = false
|
|
|
54
81
|
title={`Session mode: ${label}`}
|
|
55
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"
|
|
56
83
|
>
|
|
57
|
-
<
|
|
84
|
+
<ComposerModeIcon kind={triggerKind} size={12} />
|
|
58
85
|
{!iconOnly && <span className="max-w-[9rem] truncate">{label}</span>}
|
|
59
86
|
<ChevronDown size={11} className={`flex-shrink-0 text-ink/40 transition-transform ${open ? 'rotate-180' : ''}`} />
|
|
60
87
|
</button>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
{mode.values.map((choice) => (
|
|
71
|
-
<button
|
|
72
|
-
key={choice.value}
|
|
73
|
-
type="button"
|
|
74
|
-
role="option"
|
|
75
|
-
aria-selected={choice.value === mode.currentValue}
|
|
76
|
-
onClick={() => {
|
|
77
|
-
setOpen(false);
|
|
78
|
-
onSelect(choice.value);
|
|
79
|
-
}}
|
|
80
|
-
className={`w-full text-left px-3 py-1.5 flex items-center justify-between gap-2 transition-colors hover:bg-ink/5 ${
|
|
81
|
-
choice.value === mode.currentValue ? 'bg-ink/10 font-medium text-ink' : 'text-ink/75'
|
|
82
|
-
}`}
|
|
83
|
-
>
|
|
84
|
-
<span className="truncate">{choice.name}</span>
|
|
85
|
-
{choice.value === mode.currentValue && <Check size={12} className="text-ink shrink-0" />}
|
|
86
|
-
</button>
|
|
87
|
-
))}
|
|
88
|
+
<AnchoredMenu
|
|
89
|
+
anchor={open ? anchor : null}
|
|
90
|
+
role="listbox"
|
|
91
|
+
ariaLabel="Session mode"
|
|
92
|
+
className="w-44 max-w-[calc(100vw-1rem)] bg-paper border border-ink/20 rounded-md shadow-lg py-1 text-xs"
|
|
93
|
+
onClose={close}
|
|
94
|
+
>
|
|
95
|
+
<div className="px-3 py-1.5 text-[10px] uppercase tracking-wider text-ink/40 font-semibold border-b border-ink/5 mb-1">
|
|
96
|
+
Session Mode
|
|
88
97
|
</div>
|
|
89
|
-
|
|
98
|
+
{mode.values.map((choice) => (
|
|
99
|
+
<button
|
|
100
|
+
key={choice.value}
|
|
101
|
+
type="button"
|
|
102
|
+
role="option"
|
|
103
|
+
aria-selected={choice.value === mode.currentValue}
|
|
104
|
+
onClick={() => {
|
|
105
|
+
close();
|
|
106
|
+
onSelect(choice.value);
|
|
107
|
+
}}
|
|
108
|
+
className={`w-full text-left px-3 py-1.5 flex items-center justify-between gap-2 transition-colors hover:bg-ink/5 ${
|
|
109
|
+
choice.value === mode.currentValue ? 'bg-ink/10 font-medium text-ink' : 'text-ink/75'
|
|
110
|
+
}`}
|
|
111
|
+
>
|
|
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>
|
|
116
|
+
{choice.value === mode.currentValue && <Check size={12} className="text-ink shrink-0" />}
|
|
117
|
+
</button>
|
|
118
|
+
))}
|
|
119
|
+
</AnchoredMenu>
|
|
90
120
|
</div>
|
|
91
121
|
);
|
|
92
122
|
}
|
|
@@ -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
|
|
@@ -257,3 +280,65 @@ describe('composer toolbar Plan/Goal host', () => {
|
|
|
257
280
|
expect(el.querySelectorAll(plan).length).toBe(0);
|
|
258
281
|
});
|
|
259
282
|
});
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Access Control exists only where the agent can ASK.
|
|
286
|
+
*
|
|
287
|
+
* The three tiers answer `session/request_permission`; an agent that never
|
|
288
|
+
* sends one (measured: `jcode`, and `pi-acp` behind `pi`/`omo`) leaves every
|
|
289
|
+
* position of the chip inert, so the chip is not drawn — and with it the
|
|
290
|
+
* Plan/Goal cluster that shares the same `showAccess` gate.
|
|
291
|
+
*/
|
|
292
|
+
describe('composer toolbar Access Control capability gate', () => {
|
|
293
|
+
const access = '[aria-label^="Access control:"]';
|
|
294
|
+
const plan = '[aria-label="Enter plan mode"]';
|
|
295
|
+
|
|
296
|
+
async function mountFor(harness: string): Promise<HTMLElement> {
|
|
297
|
+
container = document.createElement('div');
|
|
298
|
+
document.body.appendChild(container);
|
|
299
|
+
await act(async () => {
|
|
300
|
+
render(
|
|
301
|
+
h(ComposerToolbar, {
|
|
302
|
+
isMobile: false,
|
|
303
|
+
selectedModel: null,
|
|
304
|
+
onSelectModel: () => {},
|
|
305
|
+
thinkingLevels: [],
|
|
306
|
+
currentThinking: 'auto',
|
|
307
|
+
onSelectThinking: () => {},
|
|
308
|
+
isGenerating: false,
|
|
309
|
+
onSend: () => {},
|
|
310
|
+
sendDisabled: false,
|
|
311
|
+
showModel: false,
|
|
312
|
+
showThinking: false,
|
|
313
|
+
showAccess: true,
|
|
314
|
+
accessMode: 'always-ask',
|
|
315
|
+
onSelectAccess: () => {},
|
|
316
|
+
modes: MODES,
|
|
317
|
+
onOpenGoal: () => {},
|
|
318
|
+
harness,
|
|
319
|
+
}),
|
|
320
|
+
container,
|
|
321
|
+
);
|
|
322
|
+
});
|
|
323
|
+
return container;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
test('draws the chip for a harness that raises approvals', async () => {
|
|
327
|
+
const el = await mountFor('claude');
|
|
328
|
+
expect(el.querySelectorAll(access).length).toBe(1);
|
|
329
|
+
expect(el.querySelectorAll(plan).length).toBe(1);
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
test('omits it for a harness that never asks', async () => {
|
|
333
|
+
const el = await mountFor('jcode');
|
|
334
|
+
expect(el.querySelectorAll(access).length).toBe(0);
|
|
335
|
+
expect(el.textContent).not.toContain('Always ask');
|
|
336
|
+
// Goal is Kabmo-owned and still runs on this agent, so the mode cluster
|
|
337
|
+
// stays: the approval capability gates the chip alone.
|
|
338
|
+
expect(el.querySelectorAll(plan).length).toBe(1);
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
test('omp keeps it: its own transports gate tools themselves', async () => {
|
|
342
|
+
expect((await mountFor('omp-rpc')).querySelectorAll(access).length).toBe(1);
|
|
343
|
+
});
|
|
344
|
+
});
|