@kabmo-labs/kabmo 0.58.1 → 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 +513 -495
- package/dist/client/static/js/{Body-ysmhxbvk.js → Body-jqq4654r.js} +3 -3
- package/dist/client/static/js/{CsvGrid-w90pxyn2.js → CsvGrid-avw0taqb.js} +2 -2
- package/dist/client/static/js/{DocxView-evxn6kaq.js → DocxView-d221vr6g.js} +3 -3
- package/dist/client/static/js/{DrawioView-tmdevwf4.js → DrawioView-gjsy7p01.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-bpsn2z9p.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-txxn6qff.js → PdfView-dzj2s6rj.js} +1 -1
- package/dist/client/static/js/SessionsView-b6szjdg5.js +1 -0
- package/dist/client/static/js/{SheetView-52b33e6f.js → SheetView-jpc178g5.js} +11 -11
- package/dist/client/static/js/{SvgPreview-hrk4pfm1.js → SvgPreview-94fap32p.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-at77sybc.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-raw33jgg.js → architectureDiagram-NJMV4G6O-pgmyfncy.js} +3 -3
- package/dist/client/static/js/{astro-qha7sceh.js → astro-ryr2ajmg.js} +1 -1
- package/dist/client/static/js/bash-zknkkwkw.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-b6e90fbk.js → blockDiagram-BEXU5L5S-rf51jyb2.js} +4 -4
- package/dist/client/static/js/c-0w02jkxb.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-msg9y1c6.js → c4Diagram-YGBWAQC7-0faj48jp.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-jmrd1h8r.js → classDiagram-v2-NBCMYWYE-bvzsws8x.js} +4 -4
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-na65ebq3.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-9xkkw71m.js → cynefinDiagram-VND7K2PF-f73w6zzz.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-p59f19tv.js → dagre-6A5THRUB-a5vgvjsg.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-2e2rcvn7.js → diagram-22UHCM2B-6y9efamp.js} +9 -9
- package/dist/client/static/js/{diagram-3UASUU5V-r9ds8vgr.js → diagram-3UASUU5V-2mycy7xm.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-jgwxv7v8.js → diagram-ATOU4E4O-10zgjb66.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-20m35eqq.js → diagram-CDSNMT55-bewa52yf.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-vt3kxt2m.js → diagram-MLGK6HIB-mh3b7gd3.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-c47rgxf1.js → diagram-MPIPVDR6-gvdrbdm5.js} +2 -2
- package/dist/client/static/js/{dockerfile-gtcyey0q.js → dockerfile-6bn19kg0.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-aszw3xy3.js → ebnfDiagram-ZINNZB2B-2prre93c.js} +1 -1
- package/dist/client/static/js/{elixir-w92v180e.js → elixir-fyxw6d70.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-gbvr3gry.js → elk-276RUBZZ-9t6t9kc6.js} +2 -2
- package/dist/client/static/js/{erDiagram-OPXOYQCR-1hqca8qe.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-07v22te5.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-y068jtz9.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-r8d4bk86.js → index-10vzyga1.js} +2 -2
- package/dist/client/static/js/{index-8d8ce00v.js → index-27gwghmp.js} +2 -2
- package/dist/client/static/js/{index-zhgh7a31.js → index-2f6afhze.js} +2 -2
- package/dist/client/static/js/{index-nptbz7sv.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-s4dpkds5.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-gqrt766t.js → index-60cxxnpk.js} +61 -61
- package/dist/client/static/js/{index-th61y26d.js → index-69mnn71v.js} +2 -2
- package/dist/client/static/js/{index-e0kahttb.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-zs7kw0be.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-f61c25vn.js → index-9rvjegmy.js} +3 -3
- package/dist/client/static/js/{index-80kx6dm6.js → index-a3bpmw2r.js} +2 -2
- package/dist/client/static/js/{index-xmg1x6zv.js → index-a5ecn5yx.js} +5 -5
- package/dist/client/static/js/{index-azz46nwc.js → index-ax8gaayq.js} +2 -2
- package/dist/client/static/js/{index-wn28m9h7.js → index-c253x7vt.js} +8 -8
- package/dist/client/static/js/{index-y0f3wbc3.js → index-d9sfavx1.js} +2 -2
- package/dist/client/static/js/{index-5hvt233n.js → index-db6s66jr.js} +2 -2
- package/dist/client/static/js/index-eggbcdwx.js +481 -0
- package/dist/client/static/js/{index-e4nge3f4.js → index-f13ern5e.js} +1 -1
- package/dist/client/static/js/index-f6t91mpp.js +2 -0
- package/dist/client/static/js/{index-wxqcnsrq.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-fv7nybnf.js → index-fyt8m8ah.js} +2 -2
- package/dist/client/static/js/{index-007sewcn.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-medk4f18.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-qefssj0m.js → index-jpvng27a.js} +1 -1
- package/dist/client/static/js/{index-vw8b29ek.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-fe92hqmb.js → index-mngpcca7.js} +4 -4
- package/dist/client/static/js/index-mttx9327.css +1 -0
- package/dist/client/static/js/{index-5xxbbzqa.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-cmjyet7w.js → index-nf4hq5tg.js} +27 -27
- package/dist/client/static/js/{index-cpp43af3.js → index-njhrm5qa.js} +9 -9
- 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-2s17netq.js → index-nwbr15b3.js} +2 -2
- package/dist/client/static/js/{index-an7fq7f6.js → index-pa70qj4p.js} +1 -1
- package/dist/client/static/js/index-pe5f2gmn.js +1 -0
- package/dist/client/static/js/{index-1e0rt7c6.js → index-pgy7ree5.js} +5 -5
- package/dist/client/static/js/index-pzwf6hwe.js +4 -0
- package/dist/client/static/js/{index-7sq6cjt1.js → index-q3k8r0ms.js} +11 -11
- package/dist/client/static/js/{index-j830qk07.js → index-rw84kefb.js} +2 -2
- package/dist/client/static/js/{index-94d416ee.js → index-s9ts6qbj.js} +2 -2
- package/dist/client/static/js/{index-vny4ymjf.js → index-sg65xdey.js} +1 -1
- package/dist/client/static/js/{index-hb7a7m9m.js → index-skvfxcd8.js} +1 -1
- package/dist/client/static/js/{index-1e710snk.js → index-sx2yz2wx.js} +1 -1
- package/dist/client/static/js/{index-kzzvrqnv.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-374xq5a4.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-c9aqx3ht.js → index-yg38s8t3.js} +1 -1
- package/dist/client/static/js/{index-dxq1tbwm.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-1x83h4k4.js → infoDiagram-VRGFBTTK-9xph6cr5.js} +2 -2
- package/dist/client/static/js/ini-62r3vxaf.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-et6z3c28.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-sw669e7a.js → journeyDiagram-ZHPQQLJL-fa8x56mf.js} +2 -2
- package/dist/client/static/js/json-yrwpn6bd.js +1 -0
- package/dist/client/static/js/jsx-b40ag8q1.js +1 -0
- package/dist/client/static/js/{julia-z14p8jsx.js → julia-agc5kfvg.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-aqxg95kx.js → kanban-definition-PNTS6WVX-fybp2hh4.js} +6 -6
- package/dist/client/static/js/lua-bk961f37.js +1 -0
- package/dist/client/static/js/markdown-b7rgzgd6.js +1 -0
- package/dist/client/static/js/mermaid.core-jjh5ggp0.js +12 -0
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-530anpc4.js → mindmap-definition-NLK3R4M7-gtfbg619.js} +4 -4
- 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-5zar6hvy.js → pegDiagram-GJSIUBJH-1a51sbqv.js} +1 -1
- package/dist/client/static/js/{perl-1na2x6yd.js → perl-v5vbtzgf.js} +1 -1
- package/dist/client/static/js/{php-x75tt7w3.js → php-83qwy98t.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-b8pgsqrd.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-3bx8syvw.js → pieDiagram-5QR66LMP-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-yaarpr2e.js → quadrantDiagram-O4NWA36T-5gtw2m6s.js} +2 -2
- package/dist/client/static/js/r-ycdwmv8g.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-fmfe5y27.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-b5tks4ce.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-0sf4m0ze.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-pjfy3pt7.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-nr8ngt42.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-ag41q4nt.js → railroadDiagram-XR7U4H2S-3ccwpfzz.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-g8sr48h4.js → requirementDiagram-PLB6GJNP-sasndrrp.js} +3 -3
- package/dist/client/static/js/{ruby-3h22qahv.js → ruby-994n5j6e.js} +1 -1
- package/dist/client/static/js/{rust-r27demr5.js → rust-n9z2c9m3.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-t1wbd1hh.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-c04ezwnn.js → scss-4j4t3r6y.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-407mjqty.js → sequenceDiagram-PO4LG4MO-bfj90kz1.js} +7 -7
- package/dist/client/static/js/{sizeCapture-INFHLROL-w38zb9ky.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-4cvgymkc.js → stateDiagram-v2-GCMORJYK-533xw76e.js} +3 -3
- package/dist/client/static/js/{svelte-egg3x4tw.js → svelte-bek3h1sz.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-w7ts2rzw.js → swimlanes-2SLR337P-gd3d04pk.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-xxmvdyg4.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-nq46nzy9.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-q144snzb.js → usecaseDiagram-POWQR4AR-tm1f0m4x.js} +15 -15
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-2wemak2p.js → vennDiagram-UO4OBE2U-2vdvv1hd.js} +4 -4
- package/dist/client/static/js/{vue-d7p4wv35.js → vue-y44m889c.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-cbqtax1x.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-bb2qvvgr.js → wardleyDiagram-VNRHLVJA-7avcjznx.js} +4 -4
- package/dist/client/static/js/xml-xs6qz3ya.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-9dr05fdq.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/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/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 +45 -28
- 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 +27 -11
- package/src/client/components/layout/session-sidebar/search-results.test.tsx +29 -16
- package/src/client/components/layout/session-sidebar/session-list-states.test.tsx +1 -0
- package/src/client/components/layout/session-sidebar/variant-props.ts +2 -0
- package/src/client/components/mobile/LayoutWrapper.tsx +9 -0
- package/src/client/components/mobile/SessionSidebar.tsx +4 -0
- package/src/client/components/mobile/left-drawer-nav.test.tsx +1 -1
- package/src/client/components/mobile/mobile-session-sidebar/Body.tsx +4 -0
- package/src/client/components/mobile/mobile-session-sidebar/ClassicDrawer.tsx +3 -0
- package/src/client/components/mobile/mobile-session-sidebar/Item.test.tsx +85 -0
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +30 -14
- package/src/client/components/mobile/mobile-session-sidebar/List.tsx +4 -0
- package/src/client/components/settings/apply-side-effects.test.ts +31 -0
- package/src/client/components/settings/apply-side-effects.ts +7 -0
- package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.tsx +3 -2
- package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.test.tsx +95 -0
- package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.tsx +35 -0
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/MessageItem.gutter.test.ts +26 -0
- package/src/client/components/workspace/chat-timeline/MessageItem.tsx +6 -3
- package/src/client/components/workspace/chat-timeline/ThinkingSection.test.tsx +17 -0
- package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +9 -3
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +39 -2
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +19 -4
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +28 -21
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.wait.test.tsx +48 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +44 -21
- package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.test.ts +24 -0
- package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.tsx +44 -18
- package/src/client/components/workspace/chat-timeline/chat-input/GoalSurfaces.tsx +2 -1
- package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.test.ts +35 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.tsx +33 -12
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.test.tsx +24 -0
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +14 -3
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +24 -1
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +78 -135
- package/src/client/components/workspace/chat-timeline/chat-input/VoiceButton.tsx +58 -0
- package/src/client/components/workspace/chat-timeline/chat-input/action-base.ts +42 -0
- package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/chat-input/mode-icons.test.ts +108 -0
- package/src/client/components/workspace/chat-timeline/chat-input/mode-icons.tsx +122 -0
- package/src/client/components/workspace/chat-timeline/chat-input/narrow.test.tsx +78 -20
- package/src/client/components/workspace/chat-timeline/chat-input/styles/index.tsx +11 -5
- package/src/client/components/workspace/chat-timeline/chat-input/styles.test.tsx +19 -0
- package/src/client/components/workspace/chat-timeline/composer-dock-frame.test.tsx +9 -0
- package/src/client/components/workspace/chat-timeline/index.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OptionRow.test.tsx +125 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OptionRow.tsx +84 -27
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Mcp.test.tsx +18 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Mcp.tsx +14 -5
- package/src/client/components/workspace/model-dropdown/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/scope.test.ts +17 -0
- package/src/client/hooks/chat/timeline/scope.ts +6 -1
- package/src/client/hooks/chat/timeline/send-refusal.test.ts +19 -0
- package/src/client/hooks/chat/timeline/send-steer.test.ts +17 -0
- package/src/client/hooks/chat/timeline/send.ts +17 -0
- package/src/client/hooks/editor/quick-open.ts +41 -0
- package/src/client/hooks/ui/border-style.test.ts +13 -0
- package/src/client/hooks/ui/markdown-render.ts +11 -6
- package/src/client/hooks/ui/open-inline-file.test.ts +16 -0
- package/src/client/hooks/ui/open-inline-file.ts +4 -2
- package/src/client/hooks/ui/show-more.ts +11 -1
- package/src/client/hooks/ui/ui-feedback.test.ts +11 -0
- package/src/client/hooks/ui/verified-inline-files.test.tsx +143 -0
- package/src/client/hooks/ui/verified-inline-files.ts +165 -0
- package/src/client/hooks/workspace/mobile-workspace-panels.test.tsx +116 -0
- package/src/client/hooks/workspace/mobile-workspace-panels.ts +73 -0
- package/src/client/hooks/workspace/panel-resize.test.ts +127 -0
- package/src/client/hooks/workspace/panel-resize.ts +81 -0
- package/src/client/hooks/workspace/session-list-limit.test.ts +80 -0
- package/src/client/hooks/workspace/session-list-limit.ts +69 -0
- package/src/client/hooks/workspace/session-pin.ts +58 -0
- package/src/client/hooks/workspace/workspace-panels-mode.test.tsx +87 -0
- package/src/client/hooks/workspace/workspace-panels-mode.ts +76 -0
- package/src/client/lib/router/branch-params.test.ts +17 -1
- package/src/client/lib/router/branch-params.ts +18 -0
- package/src/client/lib/ui/pressed.ts +15 -0
- package/src/client/tailwind.css +30 -10
- package/src/server/lib/connect/cloudflared.lifecycle.test.ts +25 -9
- package/src/server/lib/db/schema.test.ts +1 -1
- package/src/server/lib/db/schema.ts +17 -0
- package/src/server/lib/harness/activity.server.test.ts +81 -0
- package/src/server/lib/harness/activity.server.ts +55 -0
- package/src/server/lib/harness/spawn.server.ts +9 -0
- package/src/server/lib/omp/session/delete.server.ts +4 -2
- package/src/server/lib/omp/session/sidebar-activity.server.test.ts +24 -2
- package/src/server/lib/omp/session/sidebar-data.canonical.test.ts +14 -0
- package/src/server/lib/sessions/last-opened.server.test.ts +17 -0
- package/src/server/lib/sessions/last-opened.server.ts +18 -1
- package/src/server/routes/sessions/index.ts +3 -2
- package/src/server/routes/sessions/routes.test.ts +29 -46
- package/src/server/routes/sessions/session.ts +40 -62
- package/src/server/routes/sessions/state.test.ts +89 -0
- package/src/server/routes/sessions/state.ts +86 -0
- package/src/shared/lib/chat/attachment-budget.test.ts +74 -0
- package/src/shared/lib/chat/attachment-budget.ts +111 -0
- package/src/shared/lib/chat/attachments.test.ts +0 -17
- package/src/shared/lib/chat/attachments.ts +0 -53
- package/src/shared/lib/chat/timeline/block-chrome.test.ts +35 -0
- package/src/shared/lib/chat/timeline/block-chrome.ts +21 -0
- package/src/shared/lib/markdown/degenerate-emphasis.test.ts +64 -0
- package/src/shared/lib/markdown/degenerate-emphasis.ts +90 -0
- package/src/shared/lib/markdown/inline-file.test.ts +79 -22
- package/src/shared/lib/markdown/inline-file.ts +57 -25
- package/src/shared/lib/markdown/marked.ts +5 -1
- package/src/shared/lib/settings/defaults.ts +2 -0
- package/src/shared/lib/theme/border-style.ts +1 -1
- package/src/shared/lib/workspace/active-project.test.ts +17 -1
- package/src/shared/lib/workspace/active-project.ts +9 -0
- package/src/shared/lib/workspace/project-settings-delete.test.ts +97 -0
- package/src/shared/lib/workspace/project-settings.test.ts +2 -34
- package/src/shared/lib/workspace/project-settings.ts +6 -0
- package/src/shared/lib/workspace/session-list-limit.test.ts +31 -0
- package/src/shared/lib/workspace/session-list-limit.ts +32 -0
- package/src/shared/lib/workspace/sidebar-sort.test.ts +21 -0
- package/src/shared/lib/workspace/workspace-panel-widths.ts +1 -1
- package/src/shared/lib/workspace/workspace-session.test.ts +34 -0
- package/src/shared/lib/workspace/workspace-session.ts +40 -0
- package/src/shared/types/settings/state.ts +10 -0
- package/dist/client/static/js/ImageView-ssazqckj.js +0 -1
- package/dist/client/static/js/LayoutWrapper-qwpfq4dq.js +0 -2
- package/dist/client/static/js/MergeDiffView-en6aazw8.js +0 -1
- package/dist/client/static/js/Modal-zjnhj9nb.js +0 -60
- package/dist/client/static/js/SessionsView-eryjtmb2.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-v05ap4e3.js +0 -1
- package/dist/client/static/js/bash-n5d0esqg.js +0 -1
- package/dist/client/static/js/c-pk766wx0.js +0 -1
- package/dist/client/static/js/cpp-3pt91jvm.js +0 -1
- package/dist/client/static/js/css-q2k6afe3.js +0 -1
- package/dist/client/static/js/css-sp1cgdbr.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-sqv0ze38.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-t4dzf5s7.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-c16xmjyv.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-0jq8y0qd.js +0 -1
- package/dist/client/static/js/graphql-qx4tt6ze.js +0 -1
- package/dist/client/static/js/html-5e0g8664.js +0 -1
- package/dist/client/static/js/index-4ddgpqm0.css +0 -1
- package/dist/client/static/js/index-5g2j626a.js +0 -1
- package/dist/client/static/js/index-cc7qbfvn.js +0 -477
- package/dist/client/static/js/index-f27wvdky.js +0 -4
- package/dist/client/static/js/index-m5n0zsft.js +0 -2
- package/dist/client/static/js/index-rqt8mem9.js +0 -2
- package/dist/client/static/js/index-s9k82stc.js +0 -2
- package/dist/client/static/js/index-skwem10a.js +0 -2
- package/dist/client/static/js/index-tv9rn2nd.js +0 -2
- package/dist/client/static/js/info-A6RAGUB7-szttx3v5.js +0 -1
- package/dist/client/static/js/ini-bdk46a3d.js +0 -1
- package/dist/client/static/js/java-3g3925cf.js +0 -1
- package/dist/client/static/js/javascript-av46zx4c.js +0 -1
- package/dist/client/static/js/json-hdyzmffz.js +0 -1
- package/dist/client/static/js/jsx-y8r9mrdq.js +0 -1
- package/dist/client/static/js/lua-wf5k6p3r.js +0 -1
- package/dist/client/static/js/markdown-9bf16dx7.js +0 -1
- package/dist/client/static/js/mermaid.core-6cgqsgcf.js +0 -12
- package/dist/client/static/js/one-dark-pro-9hnhtkpr.js +0 -1
- package/dist/client/static/js/one-light-2n5y8592.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-401149bv.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-bgfv8tfz.js +0 -1
- package/dist/client/static/js/properties-xk4dn00p.js +0 -1
- package/dist/client/static/js/python-7sgz05n4.js +0 -1
- package/dist/client/static/js/r-w4qxm0pv.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-pw720590.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-n2a30ngs.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-rn5rx9qt.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-t4yryhtd.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-c4ebgvrr.js +0 -1
- package/dist/client/static/js/sql-sd00wgem.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-v82nym6b.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-bxgt5yhm.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-hh3595m0.js +0 -1
- package/dist/client/static/js/tsx-h5yzg80q.js +0 -1
- package/dist/client/static/js/typescript-qy1sbhea.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-6bza7h1b.js +0 -1
- package/dist/client/static/js/xml-mrk4xakv.js +0 -1
- package/dist/client/static/js/yaml-xaza6dra.js +0 -1
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.test.tsx +0 -110
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +0 -86
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The phone's classic folder row states the same action order as the modern
|
|
8
|
+
* header: disclosure, workspace panels, new chat, options. A folder button on
|
|
9
|
+
* the wrong side of the chevron is the regression this pins.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { afterAll, afterEach, beforeAll, describe, expect, test } from 'bun:test';
|
|
13
|
+
import { Window } from 'happy-dom';
|
|
14
|
+
import { h, render } from 'preact';
|
|
15
|
+
|
|
16
|
+
import { MobileSessionCategory } from '@/client/components/mobile/mobile-session-sidebar/Item';
|
|
17
|
+
import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
|
|
18
|
+
import type { WorkspaceFolderData } from '@/shared/types';
|
|
19
|
+
|
|
20
|
+
let container: HTMLElement | undefined;
|
|
21
|
+
|
|
22
|
+
beforeAll(() => {
|
|
23
|
+
installDomGlobals(new Window({ url: 'http://localhost' }));
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
afterAll(() => {
|
|
27
|
+
restoreDomGlobals();
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
function mount(activeSessionId: string | null = null) {
|
|
31
|
+
container = document.body.appendChild(document.createElement('div'));
|
|
32
|
+
const folder = {
|
|
33
|
+
id: 7,
|
|
34
|
+
name: 'kabmo',
|
|
35
|
+
isExpanded: true,
|
|
36
|
+
sessions: [],
|
|
37
|
+
hasMore: false,
|
|
38
|
+
totalSessions: 0,
|
|
39
|
+
} as unknown as WorkspaceFolderData;
|
|
40
|
+
render(
|
|
41
|
+
h(MobileSessionCategory, {
|
|
42
|
+
folder,
|
|
43
|
+
activeSessionId,
|
|
44
|
+
onSelectSession: () => {},
|
|
45
|
+
onNewSessionForFolder: () => {},
|
|
46
|
+
onOpenWorkspacePanels: () => {},
|
|
47
|
+
isExpanded: true,
|
|
48
|
+
onToggleExpand: () => {},
|
|
49
|
+
}),
|
|
50
|
+
container,
|
|
51
|
+
);
|
|
52
|
+
return container;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
afterEach(() => {
|
|
56
|
+
if (container) render(null, container);
|
|
57
|
+
container?.remove();
|
|
58
|
+
container = undefined;
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
describe('phone classic folder row', () => {
|
|
62
|
+
test('the action cluster is chevron · folder · + · options', () => {
|
|
63
|
+
const host = mount();
|
|
64
|
+
const header = host.querySelector('[data-testid="session-folder"] > div') as HTMLElement;
|
|
65
|
+
const actions = header.lastElementChild as HTMLElement;
|
|
66
|
+
const [count, disclosure, workspace, newChat, options] = Array.from(actions.children) as HTMLElement[];
|
|
67
|
+
|
|
68
|
+
expect(count.textContent?.trim()).toBe('0');
|
|
69
|
+
expect(disclosure.querySelector('svg')).not.toBeNull();
|
|
70
|
+
expect(workspace.getAttribute('aria-label')).toBe('Open workspace panels for kabmo');
|
|
71
|
+
expect(newChat.getAttribute('aria-label')).toBe('New session in kabmo');
|
|
72
|
+
expect(options.querySelector('[aria-label="Options for kabmo"]')).not.toBeNull();
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
test('the folder button looks pressed while this workspace is open', () => {
|
|
76
|
+
const host = mount('workspace-7');
|
|
77
|
+
const header = host.querySelector('[data-testid="session-folder"] > div') as HTMLElement;
|
|
78
|
+
const actions = header.lastElementChild as HTMLElement;
|
|
79
|
+
const workspace = actions.children[2] as HTMLElement;
|
|
80
|
+
|
|
81
|
+
expect(workspace.getAttribute('aria-pressed')).toBe('true');
|
|
82
|
+
expect(workspace.className).toContain('bg-ink/15');
|
|
83
|
+
expect(workspace.className).toContain('shadow-inner');
|
|
84
|
+
});
|
|
85
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChevronDown, ChevronRight, GitBranch, MessageSquare, Plus } from 'lucide-preact';
|
|
1
|
+
import { ChevronDown, ChevronRight, FolderOpen, GitBranch, MessageSquare, Plus } from 'lucide-preact';
|
|
2
2
|
import { FolderItemMenu } from '@/client/components/mobile/mobile-session-sidebar/ItemMenu';
|
|
3
3
|
import { useSearchParams } from '@/client/lib/router/search-params';
|
|
4
4
|
import { MobileSessionRow, MOBILE_BRANCH_STYLE } from '@/client/components/mobile/mobile-session-sidebar/SessionRow';
|
|
@@ -7,7 +7,7 @@ import type { BranchControl } from '@/client/components/common/session-branch';
|
|
|
7
7
|
import type { ToastTone } from '@/shared/lib/ui/toast-duration';
|
|
8
8
|
import { buildSessionTree } from '@/shared/lib/workspace/session-tree';
|
|
9
9
|
import { useWorktreeDialog } from '@/client/components/mobile/mobile-session-sidebar/WorktreeDialog';
|
|
10
|
-
import {
|
|
10
|
+
import { useSessionListShowMore } from '@/client/hooks/workspace/session-list-limit';
|
|
11
11
|
import { useExpandedSessions } from '@/client/hooks/workspace/expanded-sessions';
|
|
12
12
|
import { useWorkspaceFolderActions } from '@/client/hooks/workspace/workspace-folder-actions';
|
|
13
13
|
import { useSessionDelete } from '@/client/hooks/workspace/session-delete';
|
|
@@ -15,6 +15,7 @@ import { SessionDeleteModal } from '@/client/components/common/session-delete-mo
|
|
|
15
15
|
import { getProjectIcon } from '@/shared/lib/workspace/project-icon';
|
|
16
16
|
import { formatFullDate, relativeTimeAgo } from '@/shared/lib/workspace/relative-time';
|
|
17
17
|
import { isPendingSessionId } from '@kabmo-labs/kabmo-omp/session-core/default-title';
|
|
18
|
+
import { workspaceSessionId } from '@/shared/lib/workspace/workspace-session';
|
|
18
19
|
import { useSidebarData } from '@/client/hooks/chat/omp/session-list';
|
|
19
20
|
import type { SessionItemData, WorkspaceFolderData } from '@/shared/types';
|
|
20
21
|
import type { BatchBinding } from '@/client/components/common/batch-selection/types';
|
|
@@ -22,12 +23,15 @@ import { folderBatchState } from '@/client/components/common/batch-selection/fol
|
|
|
22
23
|
import { SelectionCheckbox } from '@/client/components/common/batch-selection/SelectionCheckbox';
|
|
23
24
|
import { SessionRevealRow } from '@/client/components/mobile/mobile-session-sidebar/RevealRow';
|
|
24
25
|
import { folderGroupGap } from '@/client/components/mobile/mobile-session-sidebar/folder-gap';
|
|
26
|
+
import { PRESSED_TOGGLE_CLASS } from '@/client/lib/ui/pressed';
|
|
25
27
|
|
|
26
28
|
interface MobileSessionCategoryProps {
|
|
27
29
|
folder: WorkspaceFolderData;
|
|
28
30
|
activeSessionId: number | string | null;
|
|
29
31
|
onSelectSession: (id: number | string) => void;
|
|
30
32
|
onNewSessionForFolder: (folderId: number) => void;
|
|
33
|
+
/** Open this folder's panels under its per-folder workspace session. */
|
|
34
|
+
onOpenWorkspacePanels: (folderId: number) => void;
|
|
31
35
|
/** Start a chat in a worktree made from this folder. */
|
|
32
36
|
onNewWorktreeSession?: (folderId: number, worktreePath: string) => void;
|
|
33
37
|
isExpanded: boolean;
|
|
@@ -48,6 +52,7 @@ export function MobileSessionCategory({
|
|
|
48
52
|
activeSessionId,
|
|
49
53
|
onSelectSession,
|
|
50
54
|
onNewSessionForFolder,
|
|
55
|
+
onOpenWorkspacePanels,
|
|
51
56
|
onNewWorktreeSession,
|
|
52
57
|
isExpanded,
|
|
53
58
|
onToggleExpand,
|
|
@@ -58,7 +63,7 @@ export function MobileSessionCategory({
|
|
|
58
63
|
onStartSessionSelection,
|
|
59
64
|
onCancelWait,
|
|
60
65
|
}: MobileSessionCategoryProps) {
|
|
61
|
-
const { visibleCount, showMore, showLess, canShowLess } =
|
|
66
|
+
const { visibleCount, showMore, showLess, canShowLess } = useSessionListShowMore();
|
|
62
67
|
// The phone's folder row opens the same dialog the desktop one does. Its state
|
|
63
68
|
// lives in a hook so this row stays under the size ceiling.
|
|
64
69
|
const worktreeDialog = useWorktreeDialog(folder, (worktreePath) =>
|
|
@@ -228,6 +233,28 @@ export function MobileSessionCategory({
|
|
|
228
233
|
|
|
229
234
|
{!batch && (
|
|
230
235
|
<>
|
|
236
|
+
<span className="flex items-center justify-center">
|
|
237
|
+
{isExpanded ? <ChevronDown size={14} /> : <ChevronRight size={14} />}
|
|
238
|
+
</span>
|
|
239
|
+
|
|
240
|
+
<button
|
|
241
|
+
type="button"
|
|
242
|
+
onClick={(event) => {
|
|
243
|
+
event.stopPropagation();
|
|
244
|
+
onOpenWorkspacePanels(folder.id);
|
|
245
|
+
}}
|
|
246
|
+
className={`p-1.5 rounded-lg transition-colors ${
|
|
247
|
+
String(activeSessionId) === workspaceSessionId(folder.id)
|
|
248
|
+
? PRESSED_TOGGLE_CLASS
|
|
249
|
+
: 'hover:bg-ink/10 active:bg-ink/15 text-ink/60 hover:text-ink'
|
|
250
|
+
}`}
|
|
251
|
+
title="Workspace panels"
|
|
252
|
+
aria-label={`Open workspace panels for ${folder.name}`}
|
|
253
|
+
aria-pressed={String(activeSessionId) === workspaceSessionId(folder.id)}
|
|
254
|
+
>
|
|
255
|
+
<FolderOpen size={15} />
|
|
256
|
+
</button>
|
|
257
|
+
|
|
231
258
|
<button
|
|
232
259
|
type="button"
|
|
233
260
|
onClick={(event) => {
|
|
@@ -255,17 +282,6 @@ export function MobileSessionCategory({
|
|
|
255
282
|
onRequestDelete={requestDelete}
|
|
256
283
|
onCancelDelete={cancelDelete}
|
|
257
284
|
/>
|
|
258
|
-
|
|
259
|
-
{/* The disclosure glyph's BOX ends on the list's content edge — the
|
|
260
|
-
same x the toolbar row's last control ends on above it — and its
|
|
261
|
-
ink sits 4px inside it (`pr-1`), which is the inset a session
|
|
262
|
-
row's `⋯` / roster chevron uses. So the drawer's right column is
|
|
263
|
-
one line of INK, not just one line of boxes: measured before, the
|
|
264
|
-
folder chevron's ink ran 6px further right than every row glyph
|
|
265
|
-
beneath it. */}
|
|
266
|
-
<span className="flex items-center justify-center pr-1">
|
|
267
|
-
{isExpanded ? <ChevronDown size={14} /> : <ChevronRight size={14} />}
|
|
268
|
-
</span>
|
|
269
285
|
</>
|
|
270
286
|
)}
|
|
271
287
|
</div>
|
|
@@ -11,6 +11,8 @@ interface MobileSessionListProps {
|
|
|
11
11
|
sessionStatus: Record<string, 'stream' | 'finish' | 'abort'>;
|
|
12
12
|
onSelectSession: (id: number | string) => void;
|
|
13
13
|
onNewSessionForFolder: (folderId: number) => void;
|
|
14
|
+
/** Open this folder's panels under its per-folder workspace session. */
|
|
15
|
+
onOpenWorkspacePanels: (folderId: number) => void;
|
|
14
16
|
/** Start a chat in a worktree made from this folder. */
|
|
15
17
|
onNewWorktreeSession?: (folderId: number, worktreePath: string) => void;
|
|
16
18
|
onToggleFolder: (folderId: number) => void;
|
|
@@ -31,6 +33,7 @@ export function MobileSessionList({
|
|
|
31
33
|
sessionStatus,
|
|
32
34
|
onSelectSession,
|
|
33
35
|
onNewSessionForFolder,
|
|
36
|
+
onOpenWorkspacePanels,
|
|
34
37
|
onNewWorktreeSession,
|
|
35
38
|
onToggleFolder,
|
|
36
39
|
onToast,
|
|
@@ -59,6 +62,7 @@ export function MobileSessionList({
|
|
|
59
62
|
activeSessionId={activeSessionId}
|
|
60
63
|
onSelectSession={onSelectSession}
|
|
61
64
|
onNewSessionForFolder={onNewSessionForFolder}
|
|
65
|
+
onOpenWorkspacePanels={onOpenWorkspacePanels}
|
|
62
66
|
onNewWorktreeSession={onNewWorktreeSession}
|
|
63
67
|
isExpanded={expandedFolders[folder.id] ?? true}
|
|
64
68
|
onToggleExpand={() => onToggleFolder(folder.id)}
|
|
@@ -23,6 +23,7 @@ import { Window } from 'happy-dom';
|
|
|
23
23
|
import { applySettingsSideEffects } from '@/client/components/settings/apply-side-effects';
|
|
24
24
|
import { DEFAULT_SETTINGS } from '@/shared/lib/settings/defaults';
|
|
25
25
|
import { SIDEBAR_STYLE_CHANGED_EVENT } from '@/client/hooks/workspace/sidebar-style';
|
|
26
|
+
import { SESSION_LIST_LIMIT_CHANGED_EVENT } from '@/client/hooks/workspace/session-list-limit';
|
|
26
27
|
import { CHANGED_FILES_CHANGED_EVENT } from '@/client/hooks/chat/timeline/changed-files-setting';
|
|
27
28
|
import { EDITOR_FONT_CHANGED_EVENT } from '@/client/hooks/editor/font';
|
|
28
29
|
import { RIGHT_SIDE_HIDDEN_SCOPE_CHANGED_EVENT } from '@/client/hooks/workspace/right-side';
|
|
@@ -81,6 +82,36 @@ describe('applySettingsSideEffects', () => {
|
|
|
81
82
|
expect(seen).toEqual([]);
|
|
82
83
|
});
|
|
83
84
|
|
|
85
|
+
test('announces the session list page size so the open list repaginates', () => {
|
|
86
|
+
const win = installDom();
|
|
87
|
+
const seen: unknown[] = [];
|
|
88
|
+
win.addEventListener(SESSION_LIST_LIMIT_CHANGED_EVENT, (event) =>
|
|
89
|
+
seen.push((event as unknown as CustomEvent).detail),
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
applySettingsSideEffects(
|
|
93
|
+
state({ sidebarSessionLimit: 5 }),
|
|
94
|
+
state({ sidebarSessionLimit: 25 }),
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
expect(seen).toEqual([25]);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
test('does not announce a page size that did not move', () => {
|
|
101
|
+
const win = installDom();
|
|
102
|
+
const seen: unknown[] = [];
|
|
103
|
+
win.addEventListener(SESSION_LIST_LIMIT_CHANGED_EVENT, (event) =>
|
|
104
|
+
seen.push((event as unknown as CustomEvent).detail),
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
applySettingsSideEffects(
|
|
108
|
+
state({ sidebarSessionLimit: 10 }),
|
|
109
|
+
state({ sidebarSessionLimit: 10 }),
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
expect(seen).toEqual([]);
|
|
113
|
+
});
|
|
114
|
+
|
|
84
115
|
test('announces the changed-files toggle so the open timeline redraws', () => {
|
|
85
116
|
const win = installDom();
|
|
86
117
|
const seen: unknown[] = [];
|
|
@@ -35,6 +35,7 @@ import { applyChatWidthMode } from '@/client/hooks/chat/timeline/width-mode';
|
|
|
35
35
|
import { applyToolRenderMode } from '@/client/hooks/chat/timeline/tool-render-mode';
|
|
36
36
|
import { applyShowChangedFiles } from '@/client/hooks/chat/timeline/changed-files-setting';
|
|
37
37
|
import { applySidebarStyle } from '@/client/hooks/workspace/sidebar-style';
|
|
38
|
+
import { applySessionListLimit } from '@/client/hooks/workspace/session-list-limit';
|
|
38
39
|
import { applyPanelNav } from '@/client/hooks/workspace/panel-nav';
|
|
39
40
|
import { applyMobilePanelNav } from '@/client/hooks/workspace/mobile-panel-nav';
|
|
40
41
|
import { applyRightSideHiddenScope } from '@/client/hooks/workspace/right-side';
|
|
@@ -106,6 +107,12 @@ export function applySettingsSideEffects(previous: SettingsState, next: Settings
|
|
|
106
107
|
applySidebarStyle(next.sidebarStyle);
|
|
107
108
|
}
|
|
108
109
|
|
|
110
|
+
// The page size is a count the open list is currently drawing, so a saved
|
|
111
|
+
// value has to reach the sidebars without a reload.
|
|
112
|
+
if (next.sidebarSessionLimit !== previous.sidebarSessionLimit) {
|
|
113
|
+
applySessionListLimit(next.sidebarSessionLimit);
|
|
114
|
+
}
|
|
115
|
+
|
|
109
116
|
// A panel column's navigation picks a Preact tree over one column, and both
|
|
110
117
|
// columns are visible behind this modal — so a change repaints on the click.
|
|
111
118
|
// Each side is announced separately: one value must not re-mount the other
|
package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.tsx
CHANGED
|
@@ -89,8 +89,9 @@ export function BorderStyleSection({ settings, onUpdate }: BorderStyleSectionPro
|
|
|
89
89
|
<div>
|
|
90
90
|
<h4 className="text-sm font-semibold text-ink">Rules</h4>
|
|
91
91
|
<p className="mt-0.5 text-[11px] text-ink/60">
|
|
92
|
-
Whether the 1px rules between panels, columns and rows are painted.
|
|
93
|
-
edge either way, and so do validation colours,
|
|
92
|
+
Whether the 1px rules between panels, columns and rows are painted. The chat transcript
|
|
93
|
+
keeps its own rules, controls keep their edge either way, and so do validation colours,
|
|
94
|
+
drop zones and the focus ring.
|
|
94
95
|
</p>
|
|
95
96
|
</div>
|
|
96
97
|
|
package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.test.tsx
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The Session sidebar section carries a COUNT as well as the two style cards.
|
|
8
|
+
* The count must survive as a number — a cleared field must not write `0`
|
|
9
|
+
* (which would draw an empty workspace) — and must be clamped to the range the
|
|
10
|
+
* sidebar can actually draw.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { afterAll, afterEach, beforeAll, describe, expect, test } from 'bun:test';
|
|
14
|
+
import { Window } from 'happy-dom';
|
|
15
|
+
import { h, render } from 'preact';
|
|
16
|
+
import { act } from 'preact/test-utils';
|
|
17
|
+
|
|
18
|
+
import { SidebarStyleSection } from '@/client/components/settings/categories/appearance-settings/SidebarStyleSection';
|
|
19
|
+
import { DEFAULT_SETTINGS } from '@/shared/lib/settings/defaults';
|
|
20
|
+
import type { SettingsState } from '@/shared/types';
|
|
21
|
+
import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
|
|
22
|
+
|
|
23
|
+
let container: HTMLElement | null = null;
|
|
24
|
+
let lastUpdate: Partial<SettingsState> | null = null;
|
|
25
|
+
|
|
26
|
+
beforeAll(() => {
|
|
27
|
+
installDomGlobals(new Window({ url: 'http://localhost' }));
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
afterEach(() => {
|
|
31
|
+
if (container) render(null, container);
|
|
32
|
+
container?.remove();
|
|
33
|
+
container = null;
|
|
34
|
+
lastUpdate = null;
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
afterAll(() => {
|
|
38
|
+
restoreDomGlobals();
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
function mount(limit = 10): HTMLInputElement {
|
|
42
|
+
container = document.body.appendChild(document.createElement('div'));
|
|
43
|
+
const onUpdate = (patch: Partial<SettingsState>) => {
|
|
44
|
+
lastUpdate = patch;
|
|
45
|
+
};
|
|
46
|
+
act(() => {
|
|
47
|
+
render(
|
|
48
|
+
h(SidebarStyleSection, {
|
|
49
|
+
settings: { ...DEFAULT_SETTINGS, sidebarSessionLimit: limit },
|
|
50
|
+
onUpdate: onUpdate as (
|
|
51
|
+
updater: Partial<SettingsState> | ((previous: SettingsState) => SettingsState),
|
|
52
|
+
) => void,
|
|
53
|
+
}),
|
|
54
|
+
container as HTMLElement,
|
|
55
|
+
);
|
|
56
|
+
});
|
|
57
|
+
const input = container.querySelector('input[type="number"]');
|
|
58
|
+
if (!input) throw new Error('session count input missing');
|
|
59
|
+
return input as HTMLInputElement;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function type(input: HTMLInputElement, value: string) {
|
|
63
|
+
input.value = value;
|
|
64
|
+
act(() => {
|
|
65
|
+
input.dispatchEvent(new Event('input', { bubbles: true }));
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
describe('sidebar session count', () => {
|
|
70
|
+
test('renders the stored count and writes a valid number', () => {
|
|
71
|
+
const input = mount(10);
|
|
72
|
+
expect(input.value).toBe('10');
|
|
73
|
+
|
|
74
|
+
type(input, '25');
|
|
75
|
+
expect(lastUpdate).toEqual({ sidebarSessionLimit: 25 });
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
test('clamps a count below the floor and above the ceiling', () => {
|
|
79
|
+
const input = mount(10);
|
|
80
|
+
|
|
81
|
+
type(input, '0');
|
|
82
|
+
expect(lastUpdate).toEqual({ sidebarSessionLimit: 1 });
|
|
83
|
+
|
|
84
|
+
type(input, '999');
|
|
85
|
+
expect(lastUpdate).toEqual({ sidebarSessionLimit: 100 });
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
test('an empty field writes nothing', () => {
|
|
89
|
+
const input = mount(10);
|
|
90
|
+
|
|
91
|
+
type(input, '');
|
|
92
|
+
|
|
93
|
+
expect(lastUpdate).toBeNull();
|
|
94
|
+
});
|
|
95
|
+
});
|
package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.tsx
CHANGED
|
@@ -27,6 +27,11 @@ import {
|
|
|
27
27
|
resolveSidebarStyle,
|
|
28
28
|
type SidebarStyle,
|
|
29
29
|
} from '@/shared/lib/workspace/sidebar-style';
|
|
30
|
+
import {
|
|
31
|
+
MAX_SESSION_LIST_LIMIT,
|
|
32
|
+
MIN_SESSION_LIST_LIMIT,
|
|
33
|
+
resolveSessionListLimit,
|
|
34
|
+
} from '@/shared/lib/workspace/session-list-limit';
|
|
30
35
|
|
|
31
36
|
interface SidebarStyleSectionProps {
|
|
32
37
|
settings: SettingsState;
|
|
@@ -105,6 +110,15 @@ const MINIATURES: Record<SidebarStyle, ComponentType> = {
|
|
|
105
110
|
|
|
106
111
|
export function SidebarStyleSection({ settings, onUpdate }: SidebarStyleSectionProps) {
|
|
107
112
|
const selected = resolveSidebarStyle(settings.sidebarStyle);
|
|
113
|
+
const sessionLimit = resolveSessionListLimit(settings.sidebarSessionLimit);
|
|
114
|
+
|
|
115
|
+
const changeSessionLimit = (raw: string) => {
|
|
116
|
+
if (raw.trim() === '') return;
|
|
117
|
+
const parsed = Number(raw);
|
|
118
|
+
if (!Number.isFinite(parsed)) return;
|
|
119
|
+
const next = resolveSessionListLimit(parsed);
|
|
120
|
+
if (next !== sessionLimit) onUpdate({ sidebarSessionLimit: next });
|
|
121
|
+
};
|
|
108
122
|
|
|
109
123
|
return (
|
|
110
124
|
<section className="space-y-3">
|
|
@@ -152,6 +166,27 @@ export function SidebarStyleSection({ settings, onUpdate }: SidebarStyleSectionP
|
|
|
152
166
|
);
|
|
153
167
|
})}
|
|
154
168
|
</div>
|
|
169
|
+
|
|
170
|
+
<label className="flex items-center justify-between gap-3 rounded-xl border border-ink/15 bg-paper p-2.5">
|
|
171
|
+
<span className="min-w-0">
|
|
172
|
+
<span className="block text-xs font-semibold text-ink">Sessions per workspace</span>
|
|
173
|
+
<span className="mt-0.5 block text-[11px] leading-relaxed text-ink/60">
|
|
174
|
+
How many sessions each workspace lists first; the current sort decides which ones.
|
|
175
|
+
“Show more” reveals another {sessionLimit}. {MIN_SESSION_LIST_LIMIT}–
|
|
176
|
+
{MAX_SESSION_LIST_LIMIT}.
|
|
177
|
+
</span>
|
|
178
|
+
</span>
|
|
179
|
+
<input
|
|
180
|
+
type="number"
|
|
181
|
+
min={MIN_SESSION_LIST_LIMIT}
|
|
182
|
+
max={MAX_SESSION_LIST_LIMIT}
|
|
183
|
+
step={1}
|
|
184
|
+
value={sessionLimit}
|
|
185
|
+
onInput={(event) => changeSessionLimit(event.currentTarget.value)}
|
|
186
|
+
aria-label="Sessions shown per workspace"
|
|
187
|
+
className="h-8 w-16 shrink-0 rounded-md border border-ink/20 bg-paper px-2 text-right font-mono text-xs text-ink focus:border-ink/40 focus:outline-none"
|
|
188
|
+
/>
|
|
189
|
+
</label>
|
|
155
190
|
</section>
|
|
156
191
|
);
|
|
157
192
|
}
|
|
@@ -245,6 +245,7 @@ export function EmptyWorkspacePrompt({
|
|
|
245
245
|
|
|
246
246
|
return (
|
|
247
247
|
<div
|
|
248
|
+
data-chat-timeline=""
|
|
248
249
|
className={`relative flex flex-col h-full bg-canvas ${docked ? '' : isMobile ? 'px-3 py-4' : 'p-8'} ${className}`}
|
|
249
250
|
style={!docked && isMobile ? { paddingBottom: 'max(1rem, env(safe-area-inset-bottom, 0px))' } : undefined}
|
|
250
251
|
>
|
|
@@ -22,6 +22,7 @@ import { h, render } from 'preact';
|
|
|
22
22
|
import { act } from 'preact/test-utils';
|
|
23
23
|
import { ChatMessageItem } from '@/client/components/workspace/chat-timeline/MessageItem';
|
|
24
24
|
import { SessionStateProvider } from '@/client/components/common/session-state-provider';
|
|
25
|
+
import { primeKabmoSettings } from '@/shared/lib/settings/client';
|
|
25
26
|
import type { ChatMessageData } from '@/shared/types';
|
|
26
27
|
|
|
27
28
|
const DOM_GLOBALS = ['window', 'document', 'navigator', 'Node', 'Element', 'HTMLElement', 'HTMLInputElement', 'Event', 'MouseEvent', 'KeyboardEvent'] as const;
|
|
@@ -53,6 +54,8 @@ beforeEach(() => {
|
|
|
53
54
|
if (container) render(null, container);
|
|
54
55
|
container?.remove();
|
|
55
56
|
container = null;
|
|
57
|
+
// A suite that primes `tui` must not leave the next file drawing that style.
|
|
58
|
+
primeKabmoSettings({});
|
|
56
59
|
});
|
|
57
60
|
|
|
58
61
|
/** A user row, and an AI row carrying one tool call — the two framed blocks. */
|
|
@@ -119,4 +122,27 @@ describe('transcript block gutter', () => {
|
|
|
119
122
|
const desktopSection = desktop.querySelector('[data-tool-section]') as HTMLElement;
|
|
120
123
|
expect(desktopSection.className).toContain('mx-3');
|
|
121
124
|
});
|
|
125
|
+
|
|
126
|
+
test('in tui the answer shares the tool row’s edge, on the phone and on desktop', async () => {
|
|
127
|
+
primeKabmoSettings({ kabmo_settings: { toolRenderStyle: 'tui' } });
|
|
128
|
+
|
|
129
|
+
const phone = await mount(toolRow, true);
|
|
130
|
+
const phoneAnswer = phone.querySelector('div.bg-transparent') as HTMLElement;
|
|
131
|
+
// The section adds no gutter on a phone; the TUI row itself starts at
|
|
132
|
+
// `px-1`, so the answer must carry exactly that.
|
|
133
|
+
expect(phone.querySelector('[data-tool-section]')?.className).not.toContain('mx-3');
|
|
134
|
+
expect(phoneAnswer.className).toContain('px-1');
|
|
135
|
+
expect(phoneAnswer.className).not.toContain('px-3');
|
|
136
|
+
render(null, phone);
|
|
137
|
+
phone.remove();
|
|
138
|
+
|
|
139
|
+
const desktop = await mount(toolRow, false);
|
|
140
|
+
const desktopAnswer = desktop.querySelector('div.bg-transparent') as HTMLElement;
|
|
141
|
+
// Desktop insets the section by `mx-3`, so the answer takes the same inset
|
|
142
|
+
// plus the row's `px-1` — the row's visible left edge, not the prose column.
|
|
143
|
+
expect(desktop.querySelector('[data-tool-section]')?.className).toContain('mx-3');
|
|
144
|
+
expect(desktopAnswer.className).toContain('mx-3');
|
|
145
|
+
expect(desktopAnswer.className).toContain('px-1');
|
|
146
|
+
expect(desktopAnswer.className).not.toContain('px-3');
|
|
147
|
+
});
|
|
122
148
|
});
|
|
@@ -12,7 +12,7 @@ import { UserTurn } from '@/client/components/workspace/chat-timeline/UserTurn';
|
|
|
12
12
|
import { capitalizeFirstLetter } from '@/shared/lib/chat/capitalize';
|
|
13
13
|
import { isNoticeRow, messageAnswerText } from '@kabmo-labs/kabmo-chat/notices/notice-row';
|
|
14
14
|
import { transcriptGutter } from '@/shared/lib/chat/timeline/gutter';
|
|
15
|
-
import { traceInset } from '@/shared/lib/chat/timeline/block-chrome';
|
|
15
|
+
import { proseInset, traceInset } from '@/shared/lib/chat/timeline/block-chrome';
|
|
16
16
|
import { useToolRenderMode } from '@/client/hooks/chat/timeline/tool-render-mode';
|
|
17
17
|
|
|
18
18
|
interface ChatMessageItemProps {
|
|
@@ -120,6 +120,9 @@ export const ChatMessageItem = memo(function ChatMessageItem({
|
|
|
120
120
|
const mode = useToolRenderMode();
|
|
121
121
|
const textInset = traceInset(mode, isMobile);
|
|
122
122
|
const boxInset = traceInset(mode, isMobile, true);
|
|
123
|
+
// The answer shares the tool row's left edge in `tui`; every framed style
|
|
124
|
+
// keeps its own `px-3` column — see `proseInset`.
|
|
125
|
+
const answerPad = proseInset(mode, isMobile);
|
|
123
126
|
|
|
124
127
|
return (
|
|
125
128
|
<div
|
|
@@ -182,14 +185,14 @@ export const ChatMessageItem = memo(function ChatMessageItem({
|
|
|
182
185
|
|
|
183
186
|
{/* Main AI Response Content (Rich Markdown with code blocks, tables, lists) rendered before tool calls */}
|
|
184
187
|
{hasRenderableContent && (
|
|
185
|
-
<div className={`text-[13px] text-ink leading-relaxed font-sans bg-transparent
|
|
188
|
+
<div className={`text-[13px] text-ink leading-relaxed font-sans bg-transparent ${answerPad} py-1 select-text ${textInset}`}>
|
|
186
189
|
<MarkdownRenderer content={assistantContent} sessionId={sessionId} />
|
|
187
190
|
</div>
|
|
188
191
|
)}
|
|
189
192
|
|
|
190
193
|
{/* Tool Call Intent (rendered standalone only when there are no tool calls to absorb it as title) */}
|
|
191
194
|
{cleanIntent && !hasToolCalls && (!hasRenderableContent || !msg.content.toLowerCase().includes(msg.intent.toLowerCase().trim())) && (
|
|
192
|
-
<div className={`leading-relaxed font-sans
|
|
195
|
+
<div className={`leading-relaxed font-sans ${answerPad} select-text ${textInset} ${
|
|
193
196
|
hasRenderableContent
|
|
194
197
|
? 'text-[12px] text-ink/70 py-0.5'
|
|
195
198
|
: 'text-[13px] text-ink py-1'
|
|
@@ -150,4 +150,21 @@ describe('thinking open state', () => {
|
|
|
150
150
|
expect(toggle().getAttribute('aria-expanded')).toBe('true');
|
|
151
151
|
}
|
|
152
152
|
});
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* The reported "double star on every word": the model wrote
|
|
156
|
+
* `**It **is **a **public`, which CommonMark cannot pair, and the literal
|
|
157
|
+
* asterisks reached the reader. Mounted through the real renderer so the
|
|
158
|
+
* assertion is about what the block shows, not about a helper's string.
|
|
159
|
+
*/
|
|
160
|
+
test('a per-word decorated thought renders without literal asterisks', async () => {
|
|
161
|
+
await mount('m-stars', {
|
|
162
|
+
thought: '**It **is **a **public **competitor **entry; **we **must **not **copy.',
|
|
163
|
+
duration: '1.2s',
|
|
164
|
+
});
|
|
165
|
+
await click();
|
|
166
|
+
const shown = container.textContent ?? '';
|
|
167
|
+
expect(shown).toContain('It is a public competitor entry; we must not copy.');
|
|
168
|
+
expect(shown).not.toContain('**');
|
|
169
|
+
});
|
|
153
170
|
});
|
|
@@ -28,6 +28,7 @@ import { BrainCircuit, ChevronDown, Sparkles } from 'lucide-preact';
|
|
|
28
28
|
import type { ThinkingData } from '@/shared/types';
|
|
29
29
|
import { MarkdownRenderer } from '@/client/components/common/MarkdownRenderer';
|
|
30
30
|
import { CopyButton } from '@/client/components/common/CopyButton';
|
|
31
|
+
import { healDegenerateEmphasis } from '@/shared/lib/markdown/degenerate-emphasis';
|
|
31
32
|
import { transcriptGutter } from '@/shared/lib/chat/timeline/gutter';
|
|
32
33
|
import { blockChrome, traceInset } from '@/shared/lib/chat/timeline/block-chrome';
|
|
33
34
|
import { useToolRenderMode } from '@/client/hooks/chat/timeline/tool-render-mode';
|
|
@@ -81,9 +82,14 @@ export function ThinkingSection({
|
|
|
81
82
|
const noticeText = noticeMatch?.[1]?.trim() ?? '';
|
|
82
83
|
const cleanThought = thoughtText.replace(/<system-notice[^>]*>[\s\S]*?<\/system-notice>/g, '').trim();
|
|
83
84
|
const duration = typeof thinking === 'object' ? thinking.duration : undefined;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
// The collapsed row shows the thought as TEXT, so the per-word `**` a model
|
|
86
|
+
// decorates its reasoning with would leak here even though the body heals it
|
|
87
|
+
// (see `healDegenerateEmphasis`).
|
|
88
|
+
const providedSummary = typeof thinking === 'object' ? thinking.summary : undefined;
|
|
89
|
+
const summaryText = healDegenerateEmphasis(providedSummary || cleanThought);
|
|
90
|
+
const summary = providedSummary
|
|
91
|
+
? summaryText
|
|
92
|
+
: summaryText.slice(0, 100) + (summaryText.length > 100 ? '...' : '');
|
|
87
93
|
|
|
88
94
|
useEffect(() => {
|
|
89
95
|
if (!isOpen || !isGenerating) return;
|
|
@@ -17,6 +17,7 @@ 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
19
|
import type { SessionModeState } from '@kabmo-labs/kabmo-harness/session-modes';
|
|
20
|
+
import type { ApprovalMode } from '@kabmo-labs/kabmo-omp/access-mode';
|
|
20
21
|
import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
|
|
21
22
|
|
|
22
23
|
let container: HTMLElement | undefined;
|
|
@@ -37,14 +38,14 @@ afterAll(() => restoreDomGlobals());
|
|
|
37
38
|
async function open(
|
|
38
39
|
harness?: string,
|
|
39
40
|
iconOnly?: boolean,
|
|
40
|
-
extra: { ladder?: SessionModeState; onSelect?: () => void; onSelectLadder?: (value: string) => void } = {},
|
|
41
|
+
extra: { ladder?: SessionModeState; value?: ApprovalMode; onSelect?: () => void; onSelectLadder?: (value: string) => void } = {},
|
|
41
42
|
): Promise<HTMLElement> {
|
|
42
43
|
container = document.createElement('div');
|
|
43
44
|
document.body.appendChild(container);
|
|
44
45
|
await act(async () => {
|
|
45
46
|
render(
|
|
46
47
|
h(AccessDropdown, {
|
|
47
|
-
value: 'always-ask',
|
|
48
|
+
value: extra.value ?? 'always-ask',
|
|
48
49
|
onSelect: extra.onSelect ?? (() => {}),
|
|
49
50
|
...(harness ? { harness } : {}),
|
|
50
51
|
...(iconOnly ? { iconOnly } : {}),
|
|
@@ -153,4 +154,40 @@ describe('AccessDropdown with the agent’s own access ladder', () => {
|
|
|
153
154
|
expect(tiers).toBe(0);
|
|
154
155
|
expect(document.body.querySelector('[role="listbox"]')).toBeNull();
|
|
155
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();
|
|
192
|
+
});
|
|
156
193
|
});
|