@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,8 @@ import { Window } from 'happy-dom';
|
|
|
16
16
|
import { h, render } from 'preact';
|
|
17
17
|
import { act } from 'preact/test-utils';
|
|
18
18
|
import { AccessDropdown } from '@/client/components/workspace/chat-timeline/chat-input/AccessDropdown';
|
|
19
|
+
import type { SessionModeState } from '@kabmo-labs/kabmo-harness/session-modes';
|
|
20
|
+
import type { ApprovalMode } from '@kabmo-labs/kabmo-omp/access-mode';
|
|
19
21
|
import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
|
|
20
22
|
|
|
21
23
|
let container: HTMLElement | undefined;
|
|
@@ -33,16 +35,22 @@ afterEach(() => {
|
|
|
33
35
|
|
|
34
36
|
afterAll(() => restoreDomGlobals());
|
|
35
37
|
|
|
36
|
-
async function open(
|
|
38
|
+
async function open(
|
|
39
|
+
harness?: string,
|
|
40
|
+
iconOnly?: boolean,
|
|
41
|
+
extra: { ladder?: SessionModeState; value?: ApprovalMode; onSelect?: () => void; onSelectLadder?: (value: string) => void } = {},
|
|
42
|
+
): Promise<HTMLElement> {
|
|
37
43
|
container = document.createElement('div');
|
|
38
44
|
document.body.appendChild(container);
|
|
39
45
|
await act(async () => {
|
|
40
46
|
render(
|
|
41
47
|
h(AccessDropdown, {
|
|
42
|
-
value: 'always-ask',
|
|
43
|
-
onSelect: () => {},
|
|
48
|
+
value: extra.value ?? 'always-ask',
|
|
49
|
+
onSelect: extra.onSelect ?? (() => {}),
|
|
44
50
|
...(harness ? { harness } : {}),
|
|
45
51
|
...(iconOnly ? { iconOnly } : {}),
|
|
52
|
+
...(extra.ladder ? { ladder: extra.ladder } : {}),
|
|
53
|
+
...(extra.onSelectLadder ? { onSelectLadder: extra.onSelectLadder } : {}),
|
|
46
54
|
}),
|
|
47
55
|
container!,
|
|
48
56
|
);
|
|
@@ -83,18 +91,103 @@ describe('AccessDropdown label', () => {
|
|
|
83
91
|
|
|
84
92
|
describe('AccessDropdown copy', () => {
|
|
85
93
|
test('omp keeps the restricted-folder promise', async () => {
|
|
86
|
-
|
|
87
|
-
const yolo =
|
|
94
|
+
await open('omp-rpc');
|
|
95
|
+
const yolo = document.body.querySelector('[title*="restricted folder"]');
|
|
88
96
|
expect(yolo).not.toBeNull();
|
|
89
97
|
// omp's tier is the gate, so there is nothing to disclaim.
|
|
90
|
-
expect(
|
|
98
|
+
expect(document.body.textContent).not.toContain('decides which calls it asks about');
|
|
91
99
|
});
|
|
92
100
|
|
|
93
|
-
test('
|
|
94
|
-
|
|
95
|
-
expect(
|
|
101
|
+
test('an ACP agent without an access ladder gets the answer-policy wording', async () => {
|
|
102
|
+
await open('opencode');
|
|
103
|
+
expect(document.body.textContent).toContain('decides which calls it asks about');
|
|
96
104
|
// The omp-only rule must not be promised on a transport that has no such gate.
|
|
97
|
-
expect(
|
|
98
|
-
expect(
|
|
105
|
+
expect(document.body.querySelector('[title*="restricted folder"]')).toBeNull();
|
|
106
|
+
expect(document.body.querySelector('[title*="Every approval the agent asks for"]')).not.toBeNull();
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
const CLAUDE_LADDER: SessionModeState = {
|
|
111
|
+
currentValue: 'default',
|
|
112
|
+
values: [
|
|
113
|
+
{ value: 'default', name: 'Manual' },
|
|
114
|
+
{ value: 'acceptEdits', name: 'Accept edits' },
|
|
115
|
+
{ value: 'plan', name: 'Plan' },
|
|
116
|
+
{ value: 'auto', name: 'Auto' },
|
|
117
|
+
{ value: 'bypassPermissions', name: 'Bypass permissions' },
|
|
118
|
+
],
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
describe('AccessDropdown with the agent’s own access ladder', () => {
|
|
122
|
+
test('names the agent’s current mode and never shows Kabmo’s tiers', async () => {
|
|
123
|
+
await open('claude', false, { ladder: CLAUDE_LADDER, onSelectLadder: () => {} });
|
|
124
|
+
const trigger = container!.querySelector('button') as HTMLButtonElement;
|
|
125
|
+
expect(trigger.getAttribute('aria-label')).toBe('Access control: Manual');
|
|
126
|
+
expect(trigger.textContent).toContain('Manual');
|
|
127
|
+
|
|
128
|
+
const rows = [...document.body.querySelectorAll('[role="option"]')];
|
|
129
|
+
expect(rows.map((row) => row.textContent)).toEqual([
|
|
130
|
+
'Manual',
|
|
131
|
+
'Accept edits',
|
|
132
|
+
'Plan',
|
|
133
|
+
'Auto',
|
|
134
|
+
'Bypass permissions',
|
|
135
|
+
]);
|
|
136
|
+
// The two controls that contradicted each other are never on screen together.
|
|
137
|
+
expect(document.body.textContent).not.toContain('Always ask');
|
|
138
|
+
expect(document.body.textContent).not.toContain('Full bypass');
|
|
139
|
+
expect(document.body.textContent).toContain('This agent’s own access modes');
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
test('a pick moves the agent mode, not Kabmo’s tier', async () => {
|
|
143
|
+
const picks: string[] = [];
|
|
144
|
+
let tiers = 0;
|
|
145
|
+
await open('claude', false, {
|
|
146
|
+
ladder: CLAUDE_LADDER,
|
|
147
|
+
onSelect: () => { tiers += 1; },
|
|
148
|
+
onSelectLadder: (value) => picks.push(value),
|
|
149
|
+
});
|
|
150
|
+
const bypass = [...document.body.querySelectorAll('[role="option"]')]
|
|
151
|
+
.find((row) => row.textContent === 'Bypass permissions') as HTMLButtonElement;
|
|
152
|
+
await act(async () => { bypass.click(); });
|
|
153
|
+
expect(picks).toEqual(['bypassPermissions']);
|
|
154
|
+
expect(tiers).toBe(0);
|
|
155
|
+
expect(document.body.querySelector('[role="listbox"]')).toBeNull();
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
test('each ladder row carries the glyph for its access tier', async () => {
|
|
159
|
+
await open('claude', false, { ladder: CLAUDE_LADDER, onSelectLadder: () => {} });
|
|
160
|
+
const rows = [...document.body.querySelectorAll('[role="option"]')];
|
|
161
|
+
expect(rows.map((row) => row.querySelector('[data-mode-icon]')?.getAttribute('data-mode-icon'))).toEqual([
|
|
162
|
+
'ask',
|
|
163
|
+
'edit',
|
|
164
|
+
'plan',
|
|
165
|
+
'auto',
|
|
166
|
+
'bypass',
|
|
167
|
+
]);
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
describe('AccessDropdown glyph on a narrow composer', () => {
|
|
172
|
+
test('the icon-only chip shows the current agent mode, not a static lock', async () => {
|
|
173
|
+
await open('claude', true, {
|
|
174
|
+
ladder: { ...CLAUDE_LADDER, currentValue: 'bypassPermissions' },
|
|
175
|
+
onSelectLadder: () => {},
|
|
176
|
+
});
|
|
177
|
+
const trigger = container!.querySelector('button') as HTMLButtonElement;
|
|
178
|
+
expect(trigger.querySelector('[data-mode-icon="bypass"]')).not.toBeNull();
|
|
179
|
+
expect(trigger.textContent).not.toContain('Bypass permissions');
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
test('the Kabmo tiers swap glyph with the tier', async () => {
|
|
183
|
+
await open('omp-rpc', true, { value: 'write' });
|
|
184
|
+
const trigger = container!.querySelector('button') as HTMLButtonElement;
|
|
185
|
+
expect(trigger.querySelector('[data-mode-icon="edit"]')).not.toBeNull();
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
test('the full-bypass tier reads as the bypass glyph', async () => {
|
|
189
|
+
await open('omp-rpc', true, { value: 'yolo' });
|
|
190
|
+
const trigger = container!.querySelector('button') as HTMLButtonElement;
|
|
191
|
+
expect(trigger.querySelector('[data-mode-icon="bypass"]')).not.toBeNull();
|
|
99
192
|
});
|
|
100
193
|
});
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { useRef, useState } from 'preact/hooks';
|
|
2
|
-
import { Check, ChevronDown
|
|
3
|
-
import {
|
|
1
|
+
import { useCallback, useRef, useState } from 'preact/hooks';
|
|
2
|
+
import { Check, ChevronDown } from 'lucide-preact';
|
|
3
|
+
import { AnchoredMenu } from '@/client/components/common/anchored-menu';
|
|
4
|
+
import { anchorRectOf, type AnchorRect } from '@/shared/lib/ui/menu-anchor';
|
|
4
5
|
import type { ApprovalMode } from '@kabmo-labs/kabmo-omp/access-mode';
|
|
5
6
|
import { APPROVAL_MODES } from '@kabmo-labs/kabmo-omp/access-mode';
|
|
7
|
+
import type { SessionModeState } from '@kabmo-labs/kabmo-harness/session-modes';
|
|
6
8
|
import { accessLevelCopy } from '@/client/components/workspace/chat-timeline/chat-input/access-levels';
|
|
9
|
+
import { ComposerModeIcon, composerModeIconKind } from '@/client/components/workspace/chat-timeline/chat-input/mode-icons';
|
|
7
10
|
|
|
8
11
|
export interface AccessDropdownProps {
|
|
9
12
|
value: ApprovalMode;
|
|
@@ -21,71 +24,145 @@ export interface AccessDropdownProps {
|
|
|
21
24
|
* second mechanism for one fact is how the chip and its neighbour disagreed.
|
|
22
25
|
*/
|
|
23
26
|
iconOnly?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The agent's own permission ladder, when it has one (`claude`'s Manual /
|
|
29
|
+
* Accept edits / Bypass permissions, codex's sandbox modes, …). Those values
|
|
30
|
+
* ARE access policies, so this control owns them: the composer must not draw
|
|
31
|
+
* Kabmo's three tiers beside them, and must not draw a second Session Mode
|
|
32
|
+
* chip for the same list. Selecting a row sends `set_mode` to the agent.
|
|
33
|
+
*/
|
|
34
|
+
ladder?: SessionModeState | null;
|
|
35
|
+
onSelectLadder?: (value: string) => void;
|
|
24
36
|
}
|
|
25
37
|
|
|
26
|
-
export function AccessDropdown({ value, onSelect, harness, iconOnly = false }: AccessDropdownProps) {
|
|
38
|
+
export function AccessDropdown({ value, onSelect, harness, iconOnly = false, ladder, onSelectLadder }: AccessDropdownProps) {
|
|
27
39
|
const [showAccess, setShowAccess] = useState(false);
|
|
28
|
-
const
|
|
40
|
+
const [anchor, setAnchor] = useState<AnchorRect | null>(null);
|
|
41
|
+
const triggerRef = useRef<HTMLButtonElement>(null);
|
|
29
42
|
const listboxId = useRef(`access-listbox-${Math.random().toString(36).slice(2, 9)}`).current;
|
|
30
|
-
|
|
43
|
+
const close = useCallback(() => {
|
|
44
|
+
setShowAccess(false);
|
|
45
|
+
setAnchor(null);
|
|
46
|
+
}, []);
|
|
47
|
+
// The chip is the RIGHT-most of the toolbar cluster on a phone, so a panel
|
|
48
|
+
// hung from its `left-0` ran past the window edge and was clipped by the app
|
|
49
|
+
// shell (measured at 320px: panel right 346). `AnchoredMenu` places it from
|
|
50
|
+
// the trigger's rect and clamps it inside the viewport, so the panel is
|
|
51
|
+
// readable at every width and contributes nothing to the row's layout.
|
|
52
|
+
const toggle = () => {
|
|
53
|
+
if (showAccess) {
|
|
54
|
+
close();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const trigger = triggerRef.current;
|
|
58
|
+
if (!trigger) return;
|
|
59
|
+
setAnchor(anchorRectOf(trigger));
|
|
60
|
+
setShowAccess(true);
|
|
61
|
+
};
|
|
31
62
|
const copy = accessLevelCopy(harness);
|
|
63
|
+
// A ladder with no values (or no handler) is not a control: fall back to the
|
|
64
|
+
// tiers rather than draw an empty list.
|
|
65
|
+
const activeLadder = ladder && onSelectLadder && ladder.values.length > 0 ? ladder : null;
|
|
66
|
+
const currentLadder = activeLadder?.values.find((choice) => choice.value === activeLadder.currentValue);
|
|
67
|
+
const label = activeLadder
|
|
68
|
+
? currentLadder?.name ?? (activeLadder.currentValue || 'Access')
|
|
69
|
+
: copy.labels[value];
|
|
70
|
+
// The narrow chip shows this glyph ALONE, so it follows the CURRENT row —
|
|
71
|
+
// a static lock made every access level look identical once the label was
|
|
72
|
+
// dropped (see `useComposerNarrow`).
|
|
73
|
+
const triggerKind = composerModeIconKind(
|
|
74
|
+
activeLadder
|
|
75
|
+
? { value: activeLadder.currentValue, ...(currentLadder?.name ? { name: currentLadder.name } : {}) }
|
|
76
|
+
: { value, name: copy.labels[value] },
|
|
77
|
+
);
|
|
32
78
|
|
|
33
79
|
// Selection is owned by ChatInput; this dropdown only reports user choices.
|
|
34
80
|
const handleSelect = (mode: ApprovalMode) => {
|
|
35
81
|
onSelect(mode);
|
|
36
|
-
|
|
82
|
+
close();
|
|
37
83
|
};
|
|
38
84
|
|
|
39
85
|
return (
|
|
40
|
-
<div
|
|
86
|
+
<div>
|
|
41
87
|
<button
|
|
88
|
+
ref={triggerRef}
|
|
42
89
|
type="button"
|
|
43
|
-
onClick={
|
|
44
|
-
aria-label={`Access control: ${
|
|
90
|
+
onClick={toggle}
|
|
91
|
+
aria-label={`Access control: ${label}`}
|
|
45
92
|
aria-haspopup="listbox"
|
|
46
93
|
aria-expanded={showAccess}
|
|
47
94
|
aria-controls={showAccess ? listboxId : undefined}
|
|
48
95
|
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"
|
|
49
96
|
>
|
|
50
|
-
<
|
|
97
|
+
<ComposerModeIcon kind={triggerKind} size={12} />
|
|
51
98
|
{/* The label is dropped whole below the composer's label width — never
|
|
52
99
|
clipped to a letter and never allowed to wrap: `whitespace-nowrap`
|
|
53
100
|
is what kept `Always ask` off two lines, and the flag is what keeps
|
|
54
101
|
the row from being squeezed into overlap. */}
|
|
55
|
-
{!iconOnly && <span className="whitespace-nowrap">{
|
|
102
|
+
{!iconOnly && <span className="whitespace-nowrap">{label}</span>}
|
|
56
103
|
<ChevronDown size={11} className={`flex-shrink-0 text-ink/40 transition-transform ${showAccess ? 'rotate-180' : ''}`} />
|
|
57
104
|
</button>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
105
|
+
<AnchoredMenu
|
|
106
|
+
anchor={showAccess ? anchor : null}
|
|
107
|
+
id={listboxId}
|
|
108
|
+
role="listbox"
|
|
109
|
+
ariaLabel="Access control"
|
|
110
|
+
className={`${copy.note || activeLadder ? 'w-56' : 'w-40'} max-w-[calc(100vw-1rem)] bg-paper border border-ink/20 rounded-md shadow-lg py-1 text-xs`}
|
|
111
|
+
onClose={close}
|
|
112
|
+
>
|
|
113
|
+
<div className="px-3 py-1.5 text-[10px] uppercase tracking-wider text-ink/40 font-semibold border-b border-ink/5 mb-1">Access Control</div>
|
|
114
|
+
{activeLadder
|
|
115
|
+
? activeLadder.values.map((choice) => (
|
|
116
|
+
<button
|
|
117
|
+
key={choice.value}
|
|
118
|
+
type="button"
|
|
119
|
+
role="option"
|
|
120
|
+
aria-selected={choice.value === activeLadder.currentValue}
|
|
121
|
+
onClick={() => {
|
|
122
|
+
onSelectLadder?.(choice.value);
|
|
123
|
+
close();
|
|
124
|
+
}}
|
|
125
|
+
title={choice.name}
|
|
126
|
+
className={`w-full text-left px-3 py-1.5 flex items-center justify-between transition-colors hover:bg-ink/5 ${
|
|
127
|
+
choice.value === activeLadder.currentValue ? 'bg-ink/10 font-medium text-ink' : 'text-ink/75'
|
|
128
|
+
}`}
|
|
129
|
+
>
|
|
130
|
+
<span className="flex min-w-0 items-center gap-2">
|
|
131
|
+
<ComposerModeIcon kind={composerModeIconKind(choice)} size={12} />
|
|
132
|
+
<span className="truncate">{choice.name}</span>
|
|
133
|
+
</span>
|
|
134
|
+
{choice.value === activeLadder.currentValue && <Check size={12} className="text-ink shrink-0" />}
|
|
135
|
+
</button>
|
|
136
|
+
))
|
|
137
|
+
: APPROVAL_MODES.map((mode) => (
|
|
138
|
+
<button
|
|
139
|
+
key={mode}
|
|
140
|
+
type="button"
|
|
141
|
+
role="option"
|
|
142
|
+
aria-selected={value === mode}
|
|
143
|
+
onClick={() => handleSelect(mode)}
|
|
144
|
+
title={copy.descriptions[mode]}
|
|
145
|
+
className={`w-full text-left px-3 py-1.5 flex items-center justify-between transition-colors hover:bg-ink/5 ${
|
|
146
|
+
value === mode ? 'bg-ink/10 font-medium text-ink' : 'text-ink/75'
|
|
147
|
+
}`}
|
|
148
|
+
>
|
|
149
|
+
<span className="flex min-w-0 items-center gap-2">
|
|
150
|
+
<ComposerModeIcon kind={composerModeIconKind({ value: mode, name: copy.labels[mode] })} size={12} />
|
|
151
|
+
<span className="truncate">{copy.labels[mode]}</span>
|
|
152
|
+
</span>
|
|
153
|
+
{value === mode && <Check size={12} className="text-ink shrink-0" />}
|
|
154
|
+
</button>
|
|
155
|
+
))}
|
|
156
|
+
{activeLadder ? (
|
|
157
|
+
<p className="px-3 pt-1.5 pb-1 text-[10px] leading-snug text-ink/45 border-t border-ink/10 mt-1">
|
|
158
|
+
This agent’s own access modes; the pick applies to the session.
|
|
159
|
+
</p>
|
|
160
|
+
) : copy.note && (
|
|
161
|
+
<p className="px-3 pt-1.5 pb-1 text-[10px] leading-snug text-ink/45 border-t border-ink/10 mt-1">
|
|
162
|
+
{copy.note}
|
|
163
|
+
</p>
|
|
164
|
+
)}
|
|
165
|
+
</AnchoredMenu>
|
|
89
166
|
</div>
|
|
90
167
|
);
|
|
91
168
|
}
|
|
@@ -4,6 +4,7 @@ import { File as FileIcon, Maximize2, Minimize2, Paperclip, X } from 'lucide-pre
|
|
|
4
4
|
import type { Attachment } from '@/shared/types';
|
|
5
5
|
import { attachmentName } from '@/shared/lib/chat/attachments';
|
|
6
6
|
import { ModeToggles } from '@/client/components/workspace/chat-timeline/chat-input/ModeToggles';
|
|
7
|
+
import { actionBox } from '@/client/components/workspace/chat-timeline/chat-input/action-base';
|
|
7
8
|
import { WaitingDependencyPicker, type WaitingCandidate } from '@/client/components/workspace/chat-timeline/chat-input/WaitingDependencyPicker';
|
|
8
9
|
import type { ComposerModes } from '@/client/components/workspace/chat-timeline/chat-input/modes-props';
|
|
9
10
|
|
|
@@ -134,13 +135,33 @@ export function AttachmentToolbar({ attachments, onFilesSelected, onRemove, mode
|
|
|
134
135
|
</div>
|
|
135
136
|
))}
|
|
136
137
|
|
|
138
|
+
{/* The NEXT prompt's wait pick. On a phone it leads the trailing group,
|
|
139
|
+
to the LEFT of Plan/Goal: the mode pair is the column the user reads
|
|
140
|
+
against Stop/Send, and a wait pick between them and the stretch
|
|
141
|
+
control pushed the pair off that column. On a desktop the modes live
|
|
142
|
+
in the bottom toolbar, so this is the last control before the
|
|
143
|
+
stretch button. Its panel is portalled and placed from the trigger's
|
|
144
|
+
rectangle, so it flips and scrolls instead of running off the window
|
|
145
|
+
— the header sits at the bottom of a desktop viewport and at the top
|
|
146
|
+
of a stretched phone one. */}
|
|
147
|
+
{showWaiting && waiting && (
|
|
148
|
+
<div className="ml-auto flex-shrink-0">
|
|
149
|
+
<WaitingDependencyPicker
|
|
150
|
+
candidates={waiting.candidates}
|
|
151
|
+
value={waiting.value}
|
|
152
|
+
onChange={waiting.onChange}
|
|
153
|
+
iconOnly={iconOnly}
|
|
154
|
+
/>
|
|
155
|
+
</div>
|
|
156
|
+
)}
|
|
157
|
+
|
|
137
158
|
{/* Plan/Goal sit HERE on a phone, not in the bottom row: that row is a
|
|
138
159
|
single line whose left cluster (model, thinking, access) already
|
|
139
160
|
fills it, so a third group pushed the voice button under the model
|
|
140
|
-
label. `ml-auto` keeps
|
|
141
|
-
|
|
161
|
+
label. `ml-auto` keeps the group on the row's trailing edge when no
|
|
162
|
+
wait pick precedes it; with a pick, that control already took it. */}
|
|
142
163
|
{modes && onOpenGoal && (
|
|
143
|
-
<div className=
|
|
164
|
+
<div className={`${showWaiting ? '' : 'ml-auto '}flex-shrink-0`}>
|
|
144
165
|
<ModeToggles
|
|
145
166
|
plan={modes.plan}
|
|
146
167
|
goal={modes.goalOpen}
|
|
@@ -158,25 +179,11 @@ export function AttachmentToolbar({ attachments, onFilesSelected, onRemove, mode
|
|
|
158
179
|
</div>
|
|
159
180
|
)}
|
|
160
181
|
|
|
161
|
-
{/* The NEXT prompt's wait pick, immediately before the stretch control
|
|
162
|
-
on BOTH layouts. Its panel is portalled and placed from the
|
|
163
|
-
trigger's rectangle, so it flips and scrolls instead of running off
|
|
164
|
-
the window — the header sits at the bottom of a desktop viewport and
|
|
165
|
-
at the top of a stretched phone one. */}
|
|
166
|
-
{showWaiting && waiting && (
|
|
167
|
-
<div className={`${modesTrailing ? '' : 'ml-auto '}flex-shrink-0`}>
|
|
168
|
-
<WaitingDependencyPicker
|
|
169
|
-
candidates={waiting.candidates}
|
|
170
|
-
value={waiting.value}
|
|
171
|
-
onChange={waiting.onChange}
|
|
172
|
-
iconOnly={iconOnly}
|
|
173
|
-
/>
|
|
174
|
-
</div>
|
|
175
|
-
)}
|
|
176
|
-
|
|
177
182
|
{/* The stretch control, always last on the row. `ml-auto` unless a
|
|
178
183
|
trailing group already took it, so the groups stay apart from the
|
|
179
|
-
paperclip and the attachment chips.
|
|
184
|
+
paperclip and the attachment chips. Its box comes from the action
|
|
185
|
+
cluster's own pair, so its glyph sits on the Send/mic column below
|
|
186
|
+
even where the row's `px-3` matches but the old `p-1` box did not. */}
|
|
180
187
|
{onToggleExpand && (
|
|
181
188
|
<button
|
|
182
189
|
type="button"
|
|
@@ -188,7 +195,7 @@ export function AttachmentToolbar({ attachments, onFilesSelected, onRemove, mode
|
|
|
188
195
|
// as a tool card whose title is "composer".
|
|
189
196
|
aria-label={expanded ? 'Restore composer' : 'Maximize composer'}
|
|
190
197
|
title={expanded ? 'Restore composer' : 'Maximize composer'}
|
|
191
|
-
className={`tap-target ${modesTrailing || showWaiting ? '' : 'ml-auto '}flex items-center justify-center
|
|
198
|
+
className={`tap-target ${modesTrailing || showWaiting ? '' : 'ml-auto '}${actionBox(iconOnly)} flex items-center justify-center rounded transition-colors shrink-0 ${
|
|
192
199
|
expanded ? 'bg-ink/10 text-ink' : 'text-ink/60 hover:bg-ink/5 hover:text-ink'
|
|
193
200
|
}`}
|
|
194
201
|
>
|
package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.wait.test.tsx
CHANGED
|
@@ -16,9 +16,29 @@ import { h, render } from 'preact';
|
|
|
16
16
|
import { act } from 'preact/test-utils';
|
|
17
17
|
import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
|
|
18
18
|
import { AttachmentToolbar } from '@/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar';
|
|
19
|
+
import type { ComposerModes } from '@/client/components/workspace/chat-timeline/chat-input/modes-props';
|
|
19
20
|
|
|
20
21
|
const candidates = [{ id: 'sess-a', title: 'Refactor parser', folderName: 'alpha' }];
|
|
21
22
|
|
|
23
|
+
/** The mode slice the phone composer hands the attachment row. */
|
|
24
|
+
const MODES: ComposerModes = {
|
|
25
|
+
plan: false,
|
|
26
|
+
goal: false,
|
|
27
|
+
goalOpen: false,
|
|
28
|
+
goalRecord: null,
|
|
29
|
+
goalContinuation: null,
|
|
30
|
+
goalEvaluating: false,
|
|
31
|
+
goalArm: null,
|
|
32
|
+
disarmGoal: () => {},
|
|
33
|
+
pending: false,
|
|
34
|
+
planAvailable: true,
|
|
35
|
+
goalAvailable: true,
|
|
36
|
+
error: null,
|
|
37
|
+
clearError: () => {},
|
|
38
|
+
onTogglePlan: () => {},
|
|
39
|
+
onGoalAction: async () => ({ ok: true }),
|
|
40
|
+
};
|
|
41
|
+
|
|
22
42
|
const mounted: HTMLElement[] = [];
|
|
23
43
|
|
|
24
44
|
beforeAll(() => {
|
|
@@ -67,6 +87,34 @@ describe('AttachmentToolbar wait pick', () => {
|
|
|
67
87
|
expect(picker!.compareDocumentPosition(expand!) & 4).toBe(4);
|
|
68
88
|
});
|
|
69
89
|
|
|
90
|
+
test('on a phone the pick leads the mode pair, left of Plan/Goal', async () => {
|
|
91
|
+
const host = await mount(
|
|
92
|
+
h(AttachmentToolbar, {
|
|
93
|
+
attachments: [],
|
|
94
|
+
onFilesSelected: () => {},
|
|
95
|
+
onRemove: () => {},
|
|
96
|
+
onToggleExpand: () => {},
|
|
97
|
+
iconOnly: true,
|
|
98
|
+
modes: MODES,
|
|
99
|
+
onOpenGoal: () => {},
|
|
100
|
+
waiting: { value: null, candidates, onChange: () => {} },
|
|
101
|
+
}),
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
const picker = host.querySelector('[data-testid="wait-picker"]') as HTMLElement | null;
|
|
105
|
+
const plan = host.querySelector('[aria-label="Enter plan mode"]') as HTMLElement | null;
|
|
106
|
+
const expand = host.querySelector('[aria-label="Maximize composer"]') as HTMLElement | null;
|
|
107
|
+
expect(picker).not.toBeNull();
|
|
108
|
+
expect(plan).not.toBeNull();
|
|
109
|
+
expect(expand).not.toBeNull();
|
|
110
|
+
// Wait pick → Plan/Goal → stretch. The pick carries `ml-auto` so the whole
|
|
111
|
+
// group stays on the trailing edge; the mode wrapper follows it.
|
|
112
|
+
expect(picker!.compareDocumentPosition(plan!) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
|
|
113
|
+
expect(plan!.compareDocumentPosition(expand!) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
|
|
114
|
+
expect(picker!.parentElement?.parentElement?.className).toContain('ml-auto');
|
|
115
|
+
expect(plan!.parentElement?.parentElement?.className).not.toContain('ml-auto');
|
|
116
|
+
});
|
|
117
|
+
|
|
70
118
|
test('the panel is portalled, fixed, and clamped inside the viewport', async () => {
|
|
71
119
|
const host = await mount(
|
|
72
120
|
h(AttachmentToolbar, {
|
|
@@ -27,6 +27,7 @@ import { AttachmentToolbar } from '@/client/components/workspace/chat-timeline/c
|
|
|
27
27
|
import { ComposerNotice } from '@/client/components/workspace/chat-timeline/chat-input/ComposerNotice';
|
|
28
28
|
import { ComposerTextarea } from '@/client/components/common/ComposerTextarea';
|
|
29
29
|
import { ComposerToolbar } from '@/client/components/workspace/chat-timeline/chat-input/Toolbar';
|
|
30
|
+
import { VoiceButton } from '@/client/components/workspace/chat-timeline/chat-input/VoiceButton';
|
|
30
31
|
import { VoiceNotice } from '@/client/components/workspace/chat-timeline/chat-input/VoiceNotice';
|
|
31
32
|
|
|
32
33
|
export interface ComposerRowsInput {
|
|
@@ -106,6 +107,30 @@ export function composerRows({
|
|
|
106
107
|
pickerPlacement,
|
|
107
108
|
...input
|
|
108
109
|
}: ComposerRowsInput): Record<ComposerRow, ComponentChildren> {
|
|
110
|
+
const draft = (
|
|
111
|
+
<ComposerTextarea
|
|
112
|
+
value={input.value}
|
|
113
|
+
onChange={input.onChange}
|
|
114
|
+
onSend={input.submit}
|
|
115
|
+
disabled={input.disabled}
|
|
116
|
+
appSettings={input.appSettings}
|
|
117
|
+
rootPath={input.rootPath}
|
|
118
|
+
sessionId={input.sessionId ?? null}
|
|
119
|
+
{...(input.harness ? { harness: input.harness } : {})}
|
|
120
|
+
enablePicker={input.enablePicker}
|
|
121
|
+
placement={pickerPlacement}
|
|
122
|
+
// On a phone the textarea shares its row with the mic, so it is the
|
|
123
|
+
// member that gives up width; the mic itself never shrinks.
|
|
124
|
+
wrapperClassName={`${wrapperClass}${input.isMobile ? ' flex-1 min-w-0' : ''}`}
|
|
125
|
+
placeholder={input.placeholder}
|
|
126
|
+
className={`composer-draft w-full bg-transparent border-none focus:outline-none resize-none text-ink placeholder-ink/40 disabled:opacity-50 disabled:cursor-not-allowed ${textareaClass}`}
|
|
127
|
+
onPaste={input.onPaste}
|
|
128
|
+
variant={input.variant}
|
|
129
|
+
textareaRef={input.textareaRef}
|
|
130
|
+
onReady={input.onTextareaReady}
|
|
131
|
+
/>
|
|
132
|
+
);
|
|
133
|
+
|
|
109
134
|
return {
|
|
110
135
|
attachments: (
|
|
111
136
|
<AttachmentToolbar
|
|
@@ -113,7 +138,9 @@ export function composerRows({
|
|
|
113
138
|
onFilesSelected={input.onFilesSelected}
|
|
114
139
|
onRemove={input.onRemoveAttachment}
|
|
115
140
|
// The phone hosts the mode toggles here; the desktop keeps them in the
|
|
116
|
-
// bottom toolbar, which has room. `showAccess` gates both hosts
|
|
141
|
+
// bottom toolbar, which has room. `showAccess` gates both hosts — the
|
|
142
|
+
// APPROVAL capability does not, because Goal is Kabmo-owned and runs on
|
|
143
|
+
// an agent that never asks for permission.
|
|
117
144
|
modes={input.isMobile && input.showAccess ? input.modes : undefined}
|
|
118
145
|
onOpenGoal={input.onOpenGoal}
|
|
119
146
|
// Only the chat's own composer stretches; a caller that owns its size
|
|
@@ -142,27 +169,25 @@ export function composerRows({
|
|
|
142
169
|
// height back by removing the box, not by shrinking it, and the attachment
|
|
143
170
|
// row then carries the "Type here" target that brings it back. A `h-0` box
|
|
144
171
|
// would keep a focusable element with no pixels.
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
/>
|
|
165
|
-
),
|
|
172
|
+
//
|
|
173
|
+
// The phone's mic lives HERE, at the right of the textarea and above Send,
|
|
174
|
+
// so it never competes with the model/access cluster in the toolbar row.
|
|
175
|
+
draft: input.compact ? null : input.isMobile ? (
|
|
176
|
+
<div className="flex flex-1 min-h-0 items-end">
|
|
177
|
+
{draft}
|
|
178
|
+
<VoiceButton
|
|
179
|
+
supported={input.voiceSupported}
|
|
180
|
+
listening={input.voiceListening}
|
|
181
|
+
busy={input.voiceBusy}
|
|
182
|
+
hint={input.voiceHint}
|
|
183
|
+
onToggle={input.onVoiceToggle}
|
|
184
|
+
isMobile
|
|
185
|
+
// `mr-3` is the toolbar's own `px-3`: the mic's right edge then sits
|
|
186
|
+
// on Send's, one column down, instead of 4px past it.
|
|
187
|
+
className="mb-2 mr-3"
|
|
188
|
+
/>
|
|
189
|
+
</div>
|
|
190
|
+
) : draft,
|
|
166
191
|
|
|
167
192
|
// Dictation progress / failure, beside the toolbar that owns the mic.
|
|
168
193
|
voice: <VoiceNotice status={input.voiceStatus} error={input.voiceError} />,
|
|
@@ -109,6 +109,30 @@ describe('GoalBanner', () => {
|
|
|
109
109
|
expect(el.querySelector('[title*="Success criteria"]')).not.toBeNull();
|
|
110
110
|
});
|
|
111
111
|
|
|
112
|
+
test('a streaming turn is the goal WAITING, not active', () => {
|
|
113
|
+
// omp reports `status: "active"` for the whole life of an open goal, the
|
|
114
|
+
// time it spends waiting for a turn included. Repeating that word made the
|
|
115
|
+
// row claim the goal was working whenever the chat streamed; the goal's own
|
|
116
|
+
// process is the loop's audit, so a streaming turn must read waiting.
|
|
117
|
+
const el = paint({ running: true, continuation: { turn: 3, maxTurns: 25 } });
|
|
118
|
+
const banner = el.querySelector('[data-goal-banner]');
|
|
119
|
+
expect(banner?.getAttribute('data-goal-phase')).toBe('waiting');
|
|
120
|
+
expect(el.textContent).toContain('waiting');
|
|
121
|
+
expect(el.querySelector('.animate-spin')).toBeNull();
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
test('an idle open goal waits for its next turn', () => {
|
|
125
|
+
const el = paint();
|
|
126
|
+
expect(el.querySelector('[data-goal-banner]')?.getAttribute('data-goal-phase')).toBe('waiting');
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
test('the loop deciding is the only "active" phase', () => {
|
|
130
|
+
const el = paint({ evaluating: true });
|
|
131
|
+
expect(el.querySelector('[data-goal-banner]')?.getAttribute('data-goal-phase')).toBe('active');
|
|
132
|
+
expect(el.textContent).toContain('active');
|
|
133
|
+
expect(el.querySelector('.animate-spin')).not.toBeNull();
|
|
134
|
+
});
|
|
135
|
+
|
|
112
136
|
test('a paused goal offers Resume, not Pause', () => {
|
|
113
137
|
const actions: GoalAction[] = [];
|
|
114
138
|
const el = paint({ record: { ...record, status: 'paused' }, continuation: { turn: 4, maxTurns: 25 } }, actions);
|