@kabmo-labs/kabmo 0.42.2 → 0.43.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/README.md +1 -1
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +619 -582
- package/dist/client/static/js/{CsvGrid-g6rek8y9.js → CsvGrid-3fr85032.js} +2 -2
- package/dist/client/static/js/{DocxView-41t9ryws.js → DocxView-pqbp2fpd.js} +4 -4
- package/dist/client/static/js/{DrawioView-mfxhfz1h.js → DrawioView-m0vecq1m.js} +2 -2
- package/dist/client/static/js/ImageView-rbejbjwg.js +1 -0
- package/dist/client/static/js/LayoutWrapper-mxfsqh57.js +2 -0
- package/dist/client/static/js/Modal-vnwg4xn3.js +59 -0
- package/dist/client/static/js/{PdfView-bek8k888.js → PdfView-wmg0vk2p.js} +1 -1
- package/dist/client/static/js/SessionsView-90z2t4qe.js +1 -0
- package/dist/client/static/js/{SheetView-vezssf6b.js → SheetView-rg5gkcd7.js} +13 -13
- package/dist/client/static/js/{SvgPreview-f1qaw73k.js → SvgPreview-wpb7b0ez.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-4qn94h52.js → abnfDiagram-O67JEVCF-4pxqt66j.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-7j23x20s.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-tbewzdya.js → architectureDiagram-NJMV4G6O-kwt1va5y.js} +11 -11
- package/dist/client/static/js/{astro-nn7xg0we.js → astro-dpfdhc5e.js} +1 -1
- package/dist/client/static/js/bash-vv2ysp0a.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-njgnwckz.js → blockDiagram-BEXU5L5S-hbj5v7n7.js} +7 -7
- package/dist/client/static/js/c-8jf64j6h.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-f58pcvbk.js → c4Diagram-YGBWAQC7-epfzh8dw.js} +6 -6
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-52g73vyw.js → classDiagram-v2-NBCMYWYE-kbks4qgz.js} +6 -6
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-ptdnshzh.js → cose-bilkent-JH36ORCC-dvdmckrf.js} +1 -1
- package/dist/client/static/js/cpp-vh94zee0.js +1 -0
- package/dist/client/static/js/css-p57h1fme.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-me5xnx6a.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-qabfdkzr.js → cynefinDiagram-VND7K2PF-r084stj5.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-kyf5jetf.js → dagre-6A5THRUB-64qc51n1.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-bxrsjtv9.js → diagram-22UHCM2B-70qtb1rm.js} +16 -16
- package/dist/client/static/js/{diagram-3UASUU5V-0f41s00j.js → diagram-3UASUU5V-dgkvnsme.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-0z1zx9h1.js → diagram-ATOU4E4O-rnpsp26v.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-znrmr6bk.js → diagram-CDSNMT55-26hthh60.js} +5 -5
- package/dist/client/static/js/{diagram-MLGK6HIB-jfe2jhk0.js → diagram-MLGK6HIB-nc1s85r5.js} +2 -2
- package/dist/client/static/js/{diagram-MPIPVDR6-2kaawmwa.js → diagram-MPIPVDR6-e4dckqhv.js} +3 -3
- package/dist/client/static/js/{dockerfile-12exatm9.js → dockerfile-rxtyyhr1.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-s5n37rfp.js → ebnfDiagram-ZINNZB2B-3w9h8qk7.js} +1 -1
- package/dist/client/static/js/{elixir-szk51ehr.js → elixir-5ewfhvfh.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-433rd9fp.js → elk-276RUBZZ-httpkyb1.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-key6ah0b.js → erDiagram-OPXOYQCR-3qhvf7se.js} +8 -8
- package/dist/client/static/js/{erlang-zwy7cqdk.js → erlang-jqqa3ehb.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-5zbvjj84.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-1jat076e.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-4efkhmca.js → ganttDiagram-FUAMR5RP-t53m50e5.js} +6 -6
- package/dist/client/static/js/gitGraph-4MIJSDKK-tjhkv71w.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-ac376y2k.js → gitGraphDiagram-X574FWY7-b5wn9eht.js} +14 -14
- package/dist/client/static/js/graphql-kesh8gk0.js +1 -0
- package/dist/client/static/js/html-sxpfydga.js +1 -0
- package/dist/client/static/js/{index-e1yz59fa.js → index-0c6vpk89.js} +2 -2
- package/dist/client/static/js/{index-p0ez6hqd.js → index-181p91hf.js} +1 -1
- package/dist/client/static/js/{index-s4gv0rpk.js → index-1dwdgp27.js} +1 -1
- package/dist/client/static/js/{index-0e9nkc0g.js → index-2q23dwrs.js} +2 -2
- package/dist/client/static/js/{index-4cncqz8j.js → index-38v0781h.js} +2 -2
- package/dist/client/static/js/{index-zs7sjv6x.js → index-4banz7gr.js} +1 -1
- package/dist/client/static/js/{index-nh29fkk9.js → index-7dp90ad1.js} +2 -2
- package/dist/client/static/js/{index-yjmm73jm.js → index-7z9tz4ze.js} +2 -2
- package/dist/client/static/js/{index-zs73zwjz.js → index-7zc1z9z9.js} +4 -4
- package/dist/client/static/js/{index-z78bzryw.js → index-8y51kgan.js} +3 -3
- package/dist/client/static/js/{index-gp57dx2v.js → index-axszsg7a.js} +1 -1
- package/dist/client/static/js/{index-pxtff3ez.js → index-bvjct7sp.js} +2 -2
- package/dist/client/static/js/{index-8b3t2y77.js → index-cqnpsw2m.js} +2 -2
- package/dist/client/static/js/{index-yzda8j2d.js → index-d8r84zjd.js} +12 -12
- package/dist/client/static/js/{index-02543wk3.js → index-dg3b0mfk.js} +2 -2
- package/dist/client/static/js/index-dkqgmacr.js +4 -0
- package/dist/client/static/js/{index-pkes9492.js → index-e7yf273s.js} +2 -2
- package/dist/client/static/js/{index-8k7vjp8b.js → index-egd0vfey.js} +1 -1
- package/dist/client/static/js/{index-dzmar8jr.js → index-enb6chty.js} +1 -1
- package/dist/client/static/js/{index-v3f7we4n.js → index-f4fqvct6.js} +22 -22
- package/dist/client/static/js/{index-pysqpc5n.js → index-fg965t62.js} +2 -2
- package/dist/client/static/js/{index-raca8tsh.js → index-fgyenbv8.js} +4 -4
- package/dist/client/static/js/{index-qsw5edtk.js → index-fjnkzk12.js} +5 -5
- package/dist/client/static/js/{index-50mdqev0.js → index-g3a9j9hf.js} +1 -1
- package/dist/client/static/js/{index-1t5ybx9v.js → index-g4rsmakg.js} +3 -3
- package/dist/client/static/js/{index-qx6x4z0y.js → index-gmnmnfm0.js} +2 -2
- package/dist/client/static/js/{index-f33c4paw.js → index-gwqb7m8g.js} +1 -1
- package/dist/client/static/js/{index-ykfd2fyj.js → index-j60gtvw8.js} +1 -1
- package/dist/client/static/js/index-jvs2fvqz.js +2 -0
- package/dist/client/static/js/{index-r8cc80w5.js → index-jz93j0at.js} +2 -2
- package/dist/client/static/js/{index-82vk27q1.js → index-k9ws464d.js} +2 -2
- package/dist/client/static/js/{index-0pabfaac.js → index-kc3c2gzb.js} +1 -1
- package/dist/client/static/js/{index-5jnvz9hw.js → index-kccp6tgd.js} +2 -2
- package/dist/client/static/js/{index-1y3rzw6b.js → index-kmzd0adv.js} +1 -1
- package/dist/client/static/js/{index-77t0nvt1.js → index-ksph3kpr.js} +2 -2
- package/dist/client/static/js/{index-dfqmwm7j.js → index-m9s9rg5k.js} +2 -2
- package/dist/client/static/js/{index-gsxebrq9.js → index-n9scbxy5.js} +2 -2
- package/dist/client/static/js/{index-7a2efrbj.js → index-q1gwgmxt.js} +2 -2
- package/dist/client/static/js/{index-b42t14wk.js → index-q81rxwh7.js} +35 -35
- package/dist/client/static/js/{index-ktbrmp29.js → index-qhytrsyb.js} +2 -2
- package/dist/client/static/js/index-qzw4jnnv.js +1 -0
- package/dist/client/static/js/{index-cz50ha6x.js → index-r11bbnek.js} +78 -78
- package/dist/client/static/js/{index-zndbhb9w.js → index-rv4qs3wm.js} +2 -2
- package/dist/client/static/js/{index-hga3e13s.js → index-s78n0dtv.js} +2 -2
- package/dist/client/static/js/{index-03pyvmcz.js → index-sesghshh.js} +2 -2
- package/dist/client/static/js/index-tnv3dryk.js +9 -0
- package/dist/client/static/js/{index-dtj73vs1.js → index-tzbzehqd.js} +1 -1
- package/dist/client/static/js/index-vcrh95gf.css +1 -0
- package/dist/client/static/js/{index-8kbp24xg.js → index-vmgzhp41.js} +1 -1
- package/dist/client/static/js/{index-r9db1gsf.js → index-wmv3crye.js} +2 -2
- package/dist/client/static/js/{index-b0v6gwym.js → index-ycks7gyg.js} +2 -2
- package/dist/client/static/js/{index-hw14rhen.js → index-ynaxep06.js} +2 -2
- package/dist/client/static/js/{index-rab39785.js → index-ys0xpw3q.js} +2 -2
- package/dist/client/static/js/{index-feffxxss.js → index-yvgbr7ek.js} +2 -2
- package/dist/client/static/js/index-zqthmaxq.js +478 -0
- package/dist/client/static/js/info-A6RAGUB7-m6qz24p8.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-4e7ej63f.js → infoDiagram-VRGFBTTK-qv7438m3.js} +1 -1
- package/dist/client/static/js/ini-1x0ad976.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-k3yet1ec.js → ishikawaDiagram-OU5B5YK6-p1w6zg5y.js} +4 -4
- package/dist/client/static/js/java-3944nq02.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-qe352kyd.js → journeyDiagram-ZHPQQLJL-ywk6xqxr.js} +5 -5
- package/dist/client/static/js/json-g5ggnd94.js +1 -0
- package/dist/client/static/js/jsx-f6p72qpc.js +1 -0
- package/dist/client/static/js/{julia-2eekpjq8.js → julia-0h9krgsd.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-58hag75n.js → kanban-definition-PNTS6WVX-gtrmhggc.js} +5 -5
- package/dist/client/static/js/lua-edn2b3wn.js +1 -0
- package/dist/client/static/js/markdown-9dhg1fax.js +1 -0
- package/dist/client/static/js/{mermaid.core-6e89h6vm.js → mermaid.core-5s24b4hh.js} +6 -6
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-ncsam2fm.js → mindmap-definition-NLK3R4M7-3wx7abqn.js} +4 -4
- package/dist/client/static/js/one-dark-pro-3vya9z02.js +1 -0
- package/dist/client/static/js/one-light-1yrwn9my.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-ng6wq5xj.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-b5ckc39d.js → pegDiagram-GJSIUBJH-yvyqnjya.js} +1 -1
- package/dist/client/static/js/{perl-dtn1fccw.js → perl-rptyx23q.js} +1 -1
- package/dist/client/static/js/{php-7av78hch.js → php-sagvq3wz.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-rf6jhxf6.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-s4d47ve8.js → pieDiagram-5QR66LMP-26x6pj38.js} +3 -3
- package/dist/client/static/js/properties-fcmj08pv.js +1 -0
- package/dist/client/static/js/python-532d8ezm.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-zm0ekvjz.js → quadrantDiagram-O4NWA36T-qhe8h0j9.js} +6 -6
- package/dist/client/static/js/r-ptmdxs2a.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-ygp6hxq4.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-rxgnrb2g.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-xkv52a2p.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-bvcktbqh.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-9c3v7jsq.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-52vdqf53.js → railroadDiagram-XR7U4H2S-dwy3k2jx.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-7kf8bmk9.js → requirementDiagram-PLB6GJNP-hcmgfesg.js} +4 -4
- package/dist/client/static/js/{ruby-s2bqr910.js → ruby-9qyx7knh.js} +1 -1
- package/dist/client/static/js/{rust-q98kssv3.js → rust-bmb4ee5w.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-bcb9f54a.js → sankeyDiagram-IPEJSGJF-s6d3k4zs.js} +6 -6
- package/dist/client/static/js/{sass-bm32bb5k.js → sass-07rteya0.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-76ywvj7g.js → sequenceDiagram-PO4LG4MO-0fcmzgdy.js} +19 -19
- package/dist/client/static/js/{sizeCapture-INFHLROL-p9bsf5dc.js → sizeCapture-INFHLROL-t8fcm7rq.js} +1 -1
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-1ecfb3fs.js → stateDiagram-v2-GCMORJYK-jr80hfeg.js} +6 -6
- package/dist/client/static/js/{svelte-ztkaww47.js → svelte-w365cpwa.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-2pyjr946.js → swimlanes-2SLR337P-x1ay6w39.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-xj123xrp.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-4csxwmn2.js → timeline-definition-EJHVYXUP-qz0g6msb.js} +2 -2
- package/dist/client/static/js/treeView-Q6P3EWNA-fb58a7z1.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-ej4qhksx.js +1 -0
- package/dist/client/static/js/typescript-683kkkaw.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-0p1jnbsn.js → usecaseDiagram-POWQR4AR-sxzrv8ht.js} +43 -43
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-y1hgdet4.js → vennDiagram-UO4OBE2U-qsqgnjcv.js} +5 -5
- package/dist/client/static/js/{vue-cbqm4bed.js → vue-d6cesny1.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-mkp0kanv.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-p578yrgm.js → wardleyDiagram-VNRHLVJA-rvwxn458.js} +4 -4
- package/dist/client/static/js/xml-6ct32gys.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-b08b4ah0.js → xychartDiagram-PMCCYNJV-nb4w7rcg.js} +5 -5
- package/dist/client/static/js/yaml-1d5m3bfj.js +1 -0
- package/marketplace/plugins/command-runner/package.json +2 -2
- package/marketplace/plugins/command-runner/src/app.test.tsx +161 -0
- package/marketplace/plugins/command-runner/src/app.tsx +37 -3
- package/marketplace/plugins/command-runner/src/panel/Glyph.tsx +22 -4
- package/marketplace/plugins/git-forge/package.json +2 -2
- package/marketplace/plugins/git-forge/src/panel/Glyph.tsx +22 -3
- package/marketplace/plugins/git-forge/src/panel/index.tsx +21 -3
- package/marketplace/plugins/git-forge/src/panel/refresh.test.tsx +192 -0
- package/marketplace/plugins/git-forge/src/panel/use-forge.ts +4 -2
- package/marketplace/plugins/git-forge/src/panel/write.test.tsx +21 -0
- package/marketplace/plugins/stats/package.json +2 -2
- package/marketplace/plugins/stats/src/RefreshButton.tsx +9 -7
- package/marketplace/plugins/stats/src/app.tsx +15 -1
- package/marketplace/plugins/stats/src/refresh.test.tsx +166 -0
- package/package.json +1 -1
- package/src/client/components/common/anchored-menu/index.tsx +26 -8
- package/src/client/components/common/context-usage-button/McpSection.test.tsx +34 -5
- package/src/client/components/common/context-usage-button/McpSection.tsx +25 -3
- package/src/client/components/common/harness-glyph/brands.ts +3 -0
- package/src/client/components/common/harness-glyph/omo.ts +22 -0
- package/src/client/components/common/server-control/Panel.tsx +24 -86
- package/src/client/components/common/server-control/Row.tsx +98 -0
- package/src/client/components/common/server-control/index.test.tsx +69 -9
- package/src/client/components/layout/VisibilityMenu.tsx +18 -6
- package/src/client/components/layout/new-workspace-host/index.test.tsx +84 -0
- package/src/client/components/layout/new-workspace-host/index.tsx +35 -0
- package/src/client/components/mobile/header-titlebar.test.tsx +38 -3
- package/src/client/components/settings/Sidebar.tsx +2 -1
- package/src/client/components/settings/categories/GitSettings.tsx +31 -0
- package/src/client/components/settings/categories/git-settings/CommitMessageSection.tsx +292 -0
- package/src/client/components/settings/categories/git-settings/IdentitySection.tsx +215 -0
- package/src/client/components/settings/category-content.tsx +3 -0
- package/src/client/components/workspace/chat-timeline/MessageItem.tsx +8 -0
- package/src/client/components/workspace/chat-timeline/MessageList.test.ts +55 -2
- package/src/client/components/workspace/chat-timeline/MessageList.tsx +13 -1
- package/src/client/components/workspace/chat-timeline/PendingChatView.tsx +56 -50
- package/src/client/components/workspace/chat-timeline/ThinkingSection.test.tsx +38 -2
- package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +13 -1
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.test.tsx +50 -0
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +20 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.tsx +2 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Proc.tsx +1 -4
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.tsx +3 -2
- package/src/client/components/workspace/git-panel/CommitBox.test.tsx +98 -0
- package/src/client/components/workspace/git-panel/CommitBox.tsx +68 -3
- package/src/client/components/workspace/git-panel/index.test.ts +12 -0
- package/src/client/components/workspace/git-panel/index.tsx +20 -1
- package/src/client/components/workspace/repo-picker/index.test.tsx +20 -0
- package/src/client/components/workspace/repo-picker/index.tsx +5 -6
- package/src/client/data/settings/omp-schema.json +134 -8
- package/src/client/hooks/chat/context/mcp.ts +19 -1
- package/src/client/hooks/chat/timeline/jump-rail.ts +1 -0
- package/src/client/hooks/chat/timeline/row-window.test.ts +38 -3
- package/src/client/hooks/chat/timeline/row-window.ts +33 -9
- package/src/client/hooks/chat/timeline/scroll-geometry.ts +19 -1
- package/src/client/hooks/chat/timeline/scroll.ts +15 -0
- package/src/client/hooks/chat/timeline/thinking-open.ts +10 -4
- package/src/client/hooks/workspace/commit-box.test.ts +62 -1
- package/src/client/hooks/workspace/commit-box.ts +94 -2
- package/src/client/hooks/workspace/git-panel-data.ts +15 -7
- package/src/client/hooks/workspace/repo-scope/index.test.ts +10 -3
- package/src/client/hooks/workspace/repo-scope/index.ts +21 -9
- package/src/client/lib/plugins/repo-scope-service.ts +7 -25
- package/src/server/lib/chat/session-store.server.ts +22 -1
- package/src/server/lib/fs/git-commit-context.test.ts +111 -0
- package/src/server/lib/fs/git-commit-context.ts +85 -0
- package/src/server/lib/fs/git-commit-message.server.ts +251 -0
- package/src/server/lib/fs/git-commit-message.test.ts +211 -0
- package/src/server/lib/fs/git-commit-prompt.test.ts +69 -0
- package/src/server/lib/fs/git-commit-prompt.ts +57 -0
- package/src/server/lib/fs/git-commit-settings.server.ts +42 -0
- package/src/server/lib/fs/git-identity.server.test.ts +129 -0
- package/src/server/lib/fs/git-identity.server.ts +130 -0
- package/src/server/lib/harness/acp/acp-audit.server.ts +13 -62
- package/src/server/lib/harness/acp/acp-frames.server.test.ts +105 -0
- package/src/server/lib/harness/acp/acp-frames.server.ts +217 -0
- package/src/server/lib/harness/acp/acp-raw-messages.server.test.ts +69 -0
- package/src/server/lib/harness/acp/acp-raw-messages.server.ts +129 -0
- package/src/server/lib/harness/acp/acp-telemetry.server.ts +19 -0
- package/src/server/lib/harness/acp/one-shot.server.ts +141 -0
- package/src/server/lib/harness/acp/raw-listeners.ts +30 -0
- package/src/server/lib/harness/acp/session-handshake.ts +11 -3
- package/src/server/lib/harness/acp/session.test-util.ts +2 -0
- package/src/server/lib/harness/acp/session.ts +8 -0
- package/src/server/lib/harness/capabilities.ts +11 -0
- package/src/server/lib/harness/launch-table.ts +19 -0
- package/src/server/lib/harness/launch.ts +4 -0
- package/src/server/lib/harness/schema.server.ts +23 -0
- package/src/server/lib/harness/spawn.server.ts +18 -2
- package/src/server/lib/mcp/agent-config.server.test.ts +111 -0
- package/src/server/lib/mcp/agent-config.server.ts +205 -0
- package/src/server/lib/mcp/probe.server.ts +7 -1
- package/src/server/lib/mcp/registry.server.ts +4 -3
- package/src/server/lib/mcp/secrets.server.test.ts +85 -0
- package/src/server/lib/mcp/secrets.server.ts +108 -0
- package/src/server/lib/omp/core/print.server.ts +100 -0
- package/src/server/lib/omp/rpc/frame-fold.ts +4 -0
- package/src/server/lib/omp/session/artifacts.server.test.ts +15 -5
- package/src/server/lib/omp/session/artifacts.server.ts +41 -26
- package/src/server/lib/omp/session/delete.server.ts +2 -0
- package/src/server/lib/omp/session/goal-auditor.server.ts +10 -48
- package/src/server/lib/realtime/topics/session-data.server.ts +6 -14
- package/src/server/routes/fs/git-message.test.ts +101 -0
- package/src/server/routes/fs/git-message.ts +60 -0
- package/src/server/routes/fs/index.ts +2 -0
- package/src/server/routes/omp/artifact.ts +4 -3
- package/src/server/routes/sessions/mcp.test.ts +65 -1
- package/src/server/routes/sessions/mcp.ts +77 -5
- package/src/server/routes/settings/git-identity.test.ts +77 -0
- package/src/server/routes/settings/git-identity.ts +47 -0
- package/src/server/routes/settings/index.ts +2 -0
- package/src/server/routes/telemetry/acp-telemetry.test.ts +149 -0
- package/src/server/routes/telemetry/context.ts +31 -0
- package/src/server/routes/telemetry/raw-messages.ts +34 -0
- package/src/shared/lib/chat/tool/artifact.test.ts +4 -2
- package/src/shared/lib/chat/tool/artifact.ts +6 -1
- package/src/shared/lib/chat/tool/proc-facts.ts +2 -1
- package/src/shared/lib/fs/paths.test.ts +2 -0
- package/src/shared/lib/fs/repo-label.test.ts +22 -1
- package/src/shared/lib/fs/repo-label.ts +29 -0
- package/src/shared/lib/git/commit-prompt.test.ts +47 -0
- package/src/shared/lib/git/commit-prompt.ts +72 -0
- package/src/shared/lib/git/identity.test.ts +46 -0
- package/src/shared/lib/git/identity.ts +70 -0
- package/src/shared/lib/harness/brand-color.ts +3 -0
- package/src/shared/lib/harness/catalog.test.ts +14 -0
- package/src/shared/lib/harness/catalog.ts +9 -1
- package/src/shared/lib/harness/mcp-facts.ts +4 -0
- package/src/shared/lib/harness/provider-facts.test.ts +11 -0
- package/src/shared/lib/harness/provider-facts.ts +14 -0
- package/src/shared/lib/harness/providers.ts +2 -2
- package/src/shared/lib/harness/updates.test.ts +8 -0
- package/src/shared/lib/harness/updates.ts +9 -0
- package/src/shared/lib/omp/session/proc-daemon.ts +124 -0
- package/src/shared/lib/omp/session/proc.test.ts +30 -3
- package/src/shared/lib/omp/session/proc.ts +6 -82
- package/src/shared/lib/omp/session/wait-idle.test.ts +15 -4
- package/src/shared/lib/omp/session/wait-idle.ts +11 -4
- package/src/shared/lib/settings/defaults.ts +5 -0
- package/src/shared/lib/workspace/new-workspace.ts +20 -0
- package/src/shared/types/settings/mcp.ts +2 -2
- package/src/shared/types/settings/state.ts +16 -0
- package/src/test-support/preload.ts +1 -0
- package/dist/client/static/js/ImageView-bxqw3t4k.js +0 -1
- package/dist/client/static/js/LayoutWrapper-zt14rv9m.js +0 -2
- package/dist/client/static/js/Modal-cm35g20x.js +0 -38
- package/dist/client/static/js/SessionsView-gn53zyn7.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-cagtcfhk.js +0 -1
- package/dist/client/static/js/bash-fjzhxy10.js +0 -1
- package/dist/client/static/js/c-wqtyezvw.js +0 -1
- package/dist/client/static/js/cpp-y0nzwner.js +0 -1
- package/dist/client/static/js/css-n2waj098.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-6g2ydrss.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-b774qbn2.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-nznq0n36.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-b047d6vk.js +0 -1
- package/dist/client/static/js/graphql-gvb7e2eb.js +0 -1
- package/dist/client/static/js/html-tbz83eke.js +0 -1
- package/dist/client/static/js/index-0gbj4270.js +0 -2
- package/dist/client/static/js/index-38xv8h4t.js +0 -1
- package/dist/client/static/js/index-f4vr1c6e.css +0 -1
- package/dist/client/static/js/index-fb6pw9xb.js +0 -2
- package/dist/client/static/js/index-pzvr1699.js +0 -478
- package/dist/client/static/js/index-rf29f3fq.js +0 -9
- package/dist/client/static/js/index-zw621xez.js +0 -4
- package/dist/client/static/js/info-A6RAGUB7-n495k952.js +0 -1
- package/dist/client/static/js/ini-2gvjwh83.js +0 -1
- package/dist/client/static/js/java-1xwcq79s.js +0 -1
- package/dist/client/static/js/json-4pqjabgq.js +0 -1
- package/dist/client/static/js/jsx-wcsss15s.js +0 -1
- package/dist/client/static/js/lua-h7vjcn0h.js +0 -1
- package/dist/client/static/js/markdown-f30jjjh9.js +0 -1
- package/dist/client/static/js/one-dark-pro-qmyne0tn.js +0 -1
- package/dist/client/static/js/one-light-dj0ecjcj.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-zajj62z6.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-1ve78y5f.js +0 -1
- package/dist/client/static/js/properties-ymexza6q.js +0 -1
- package/dist/client/static/js/python-31ycwa66.js +0 -1
- package/dist/client/static/js/r-t2nne4xp.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-8rqadb58.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-v6ppm8dy.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-9j6bae14.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-56cpyt0g.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-yfdmspf4.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-qr5hdxm4.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-vwpg3wp8.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-htfxwd32.js +0 -1
- package/dist/client/static/js/typescript-p3syh43m.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-hapfjkzq.js +0 -1
- package/dist/client/static/js/xml-4enq788a.js +0 -1
- package/dist/client/static/js/yaml-pjtt3jsc.js +0 -1
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Settings → Git → Commit messages.
|
|
8
|
+
*
|
|
9
|
+
* The Source Control panel is global, so the agent that writes a commit message
|
|
10
|
+
* has to be a setting rather than "whatever chat is open" alone. `auto` is the
|
|
11
|
+
* default because it needs no configuration: it follows the active chat's
|
|
12
|
+
* harness and uses omp when no chat is open. The other modes exist for the two
|
|
13
|
+
* cases `auto` cannot express — pinning a cheap agent, and turning the action
|
|
14
|
+
* off.
|
|
15
|
+
*
|
|
16
|
+
* The prompt is a TEMPLATE, not free text: the server fills its placeholders
|
|
17
|
+
* from the staged change set. `{{diff}}` is required, because a prompt that
|
|
18
|
+
* never sees the diff is the Orca #20112 failure — the model describes the
|
|
19
|
+
* template's own example in every repository. The editor refuses to save one.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import { useEffect, useState } from 'preact/hooks';
|
|
23
|
+
import { Ban, Bot, Check, Cpu, RotateCcw, Save, Sparkles } from 'lucide-preact';
|
|
24
|
+
import type { SettingsState } from '@/shared/types';
|
|
25
|
+
import { useHarnesses } from '@/client/hooks/models/use-harnesses';
|
|
26
|
+
import {
|
|
27
|
+
COMMIT_PROMPT_PLACEHOLDERS,
|
|
28
|
+
DEFAULT_COMMIT_MESSAGE_PROMPT,
|
|
29
|
+
validateCommitPrompt,
|
|
30
|
+
} from '@/shared/lib/git/commit-prompt';
|
|
31
|
+
|
|
32
|
+
interface CommitMessageSectionProps {
|
|
33
|
+
settings: SettingsState;
|
|
34
|
+
onUpdate: (updater: Partial<SettingsState> | ((prev: SettingsState) => SettingsState)) => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const MODES: Array<{
|
|
38
|
+
value: SettingsState['commitMessageMode'];
|
|
39
|
+
label: string;
|
|
40
|
+
badge: string;
|
|
41
|
+
icon: typeof Sparkles;
|
|
42
|
+
description: string;
|
|
43
|
+
note: string;
|
|
44
|
+
}> = [
|
|
45
|
+
{
|
|
46
|
+
value: 'auto',
|
|
47
|
+
label: 'Auto',
|
|
48
|
+
badge: 'Default',
|
|
49
|
+
icon: Sparkles,
|
|
50
|
+
description:
|
|
51
|
+
'The active chat\'s harness writes the message — Claude Code, Codex, opencode, or whichever agent you are talking to. With no chat open it uses omp\'s commit role.',
|
|
52
|
+
note: 'Follows the active chat',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
value: 'omp',
|
|
56
|
+
label: 'omp',
|
|
57
|
+
badge: 'Commit role',
|
|
58
|
+
icon: Cpu,
|
|
59
|
+
description:
|
|
60
|
+
'Always use omp\'s commit role (tiny when unset) through a one-shot `omp -p` call. Fast and cheap, and it never touches the repository: the call runs with no session and no tools.',
|
|
61
|
+
note: 'No session, no tools',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
value: 'harness',
|
|
65
|
+
label: 'Harness',
|
|
66
|
+
badge: 'ACP',
|
|
67
|
+
icon: Bot,
|
|
68
|
+
description:
|
|
69
|
+
'Pin one ACP agent. It runs one disposable session with its own auth and model, and every tool permission is denied — the diff in the prompt is all it gets.',
|
|
70
|
+
note: 'One disposable session',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
value: 'off',
|
|
74
|
+
label: 'Off',
|
|
75
|
+
badge: 'Opt-out',
|
|
76
|
+
icon: Ban,
|
|
77
|
+
description:
|
|
78
|
+
'The Generate button is hidden. Commit messages are typed by hand, exactly as before this feature existed.',
|
|
79
|
+
note: 'No model calls',
|
|
80
|
+
},
|
|
81
|
+
];
|
|
82
|
+
|
|
83
|
+
export function CommitMessageSection({ settings, onUpdate }: CommitMessageSectionProps) {
|
|
84
|
+
const mode = settings.commitMessageMode ?? 'auto';
|
|
85
|
+
const harness = settings.commitMessageHarness ?? '';
|
|
86
|
+
const model = settings.commitMessageModel ?? '';
|
|
87
|
+
const customPrompt = settings.commitMessagePrompt ?? '';
|
|
88
|
+
const { harnesses } = useHarnesses();
|
|
89
|
+
const acpHarnesses = harnesses.filter((entry) => entry.transport === 'acp' && entry.enabled);
|
|
90
|
+
const selectedHarness = acpHarnesses.find((entry) => entry.id === harness);
|
|
91
|
+
const [modelText, setModelText] = useState(model);
|
|
92
|
+
const [promptText, setPromptText] = useState(customPrompt || DEFAULT_COMMIT_MESSAGE_PROMPT);
|
|
93
|
+
|
|
94
|
+
// The stored value can change from another tab; adopt it only while this
|
|
95
|
+
// field is not the one being typed into.
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
setModelText(model);
|
|
98
|
+
}, [model]);
|
|
99
|
+
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
setPromptText(customPrompt || DEFAULT_COMMIT_MESSAGE_PROMPT);
|
|
102
|
+
}, [customPrompt]);
|
|
103
|
+
|
|
104
|
+
const commitModel = () => {
|
|
105
|
+
const next = modelText.trim();
|
|
106
|
+
setModelText(next);
|
|
107
|
+
if (next !== model) onUpdate({ commitMessageModel: next });
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const promptValidation = validateCommitPrompt(promptText);
|
|
111
|
+
const promptDirty = promptText.trim() !== (customPrompt || DEFAULT_COMMIT_MESSAGE_PROMPT).trim();
|
|
112
|
+
|
|
113
|
+
const savePrompt = () => {
|
|
114
|
+
if (!promptValidation.ok) return;
|
|
115
|
+
// Saving the built-in text is the same as having no override; storing it
|
|
116
|
+
// would make the badge say "Custom" for a prompt nobody changed.
|
|
117
|
+
const next = promptText.trim() === DEFAULT_COMMIT_MESSAGE_PROMPT.trim() ? '' : promptText;
|
|
118
|
+
onUpdate({ commitMessagePrompt: next });
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const resetPrompt = () => {
|
|
122
|
+
setPromptText(DEFAULT_COMMIT_MESSAGE_PROMPT);
|
|
123
|
+
// An unsaved edit is discarded by the textarea write above; only a stored
|
|
124
|
+
// override needs the settings write.
|
|
125
|
+
if (customPrompt) onUpdate({ commitMessagePrompt: '' });
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
const willUse = mode === 'off'
|
|
129
|
+
? 'Off'
|
|
130
|
+
: mode === 'auto'
|
|
131
|
+
? 'Active chat harness · omp when no chat is open'
|
|
132
|
+
: mode === 'omp'
|
|
133
|
+
? `omp · ${model || 'commit role'}`
|
|
134
|
+
: selectedHarness
|
|
135
|
+
? `${selectedHarness.label} · ${model || 'default model'}`
|
|
136
|
+
: 'No harness selected';
|
|
137
|
+
|
|
138
|
+
return (
|
|
139
|
+
<section className="space-y-3">
|
|
140
|
+
<div>
|
|
141
|
+
<h4 className="text-sm font-semibold text-ink">Commit Messages</h4>
|
|
142
|
+
<p className="text-[11px] text-ink/60 mt-0.5">
|
|
143
|
+
Which agent writes the message behind the Source Control panel's Generate button. Only staged changes are described.
|
|
144
|
+
</p>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
<div className="grid grid-cols-1 sm:grid-cols-2 gap-3">
|
|
148
|
+
{MODES.map(({ value, label, badge, icon: Icon, description, note }) => {
|
|
149
|
+
const selected = mode === value;
|
|
150
|
+
const select = () => onUpdate({ commitMessageMode: value });
|
|
151
|
+
return (
|
|
152
|
+
<div
|
|
153
|
+
key={value}
|
|
154
|
+
onClick={select}
|
|
155
|
+
role="button"
|
|
156
|
+
tabIndex={0}
|
|
157
|
+
onKeyDown={(e) => e.key === 'Enter' && select()}
|
|
158
|
+
className={`p-3.5 rounded-lg border text-left transition-all cursor-pointer flex flex-col justify-between select-none ${
|
|
159
|
+
selected
|
|
160
|
+
? 'border-ink bg-ink/5 ring-1 ring-ink/20 shadow-xs'
|
|
161
|
+
: 'border-ink/15 bg-paper hover:border-ink/30 hover:bg-ink/[0.02]'
|
|
162
|
+
}`}
|
|
163
|
+
>
|
|
164
|
+
<div>
|
|
165
|
+
<div className="flex items-center justify-between mb-2">
|
|
166
|
+
<div className="flex items-center gap-2">
|
|
167
|
+
<div className={`w-7 h-7 rounded-md flex items-center justify-center ${selected ? 'bg-ink text-paper' : 'bg-ink/5 text-ink/70'}`}>
|
|
168
|
+
<Icon size={15} />
|
|
169
|
+
</div>
|
|
170
|
+
<span className="font-semibold text-xs text-ink">{label}</span>
|
|
171
|
+
</div>
|
|
172
|
+
<span className="text-[10px] font-mono uppercase px-1.5 py-0.5 rounded bg-ink/10 text-ink/70 font-medium">{badge}</span>
|
|
173
|
+
</div>
|
|
174
|
+
<p className="text-[11px] text-ink/65 leading-relaxed">{description}</p>
|
|
175
|
+
</div>
|
|
176
|
+
<div className="mt-3 pt-2.5 border-t border-ink/10 flex items-center justify-between text-[11px]">
|
|
177
|
+
<span className="text-ink/50 text-[10px]">{note}</span>
|
|
178
|
+
<div className={`w-4 h-4 rounded-full border flex items-center justify-center ${selected ? 'border-ink bg-ink text-paper' : 'border-ink/30 bg-transparent'}`}>
|
|
179
|
+
{selected && <Check size={10} strokeWidth={3} />}
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
);
|
|
184
|
+
})}
|
|
185
|
+
</div>
|
|
186
|
+
|
|
187
|
+
{mode !== 'off' && (
|
|
188
|
+
<div className="rounded-lg border border-ink/15 bg-paper p-3.5 space-y-3">
|
|
189
|
+
{mode === 'harness' && (
|
|
190
|
+
<div>
|
|
191
|
+
<label className="mb-1 block text-[10px] font-semibold uppercase tracking-wider text-ink/45">Harness</label>
|
|
192
|
+
<select
|
|
193
|
+
value={harness}
|
|
194
|
+
onChange={(e) => onUpdate({ commitMessageHarness: e.currentTarget.value })}
|
|
195
|
+
className="w-full bg-paper border border-ink/20 rounded-md px-2.5 py-1.5 outline-none focus:border-ink text-[11px] font-medium text-ink cursor-pointer hover:border-ink/40 transition-colors"
|
|
196
|
+
>
|
|
197
|
+
<option value="">Select a harness…</option>
|
|
198
|
+
{acpHarnesses.map((entry) => (
|
|
199
|
+
<option key={entry.id} value={entry.id}>{entry.label}</option>
|
|
200
|
+
))}
|
|
201
|
+
</select>
|
|
202
|
+
{acpHarnesses.length === 0 && (
|
|
203
|
+
<p className="mt-1 text-[10px] text-ink/50">
|
|
204
|
+
No ACP harness is enabled. Add one in Settings → Harnesses.
|
|
205
|
+
</p>
|
|
206
|
+
)}
|
|
207
|
+
</div>
|
|
208
|
+
)}
|
|
209
|
+
|
|
210
|
+
<div>
|
|
211
|
+
<label className="mb-1 block text-[10px] font-semibold uppercase tracking-wider text-ink/45">
|
|
212
|
+
Model override
|
|
213
|
+
</label>
|
|
214
|
+
<input
|
|
215
|
+
type="text"
|
|
216
|
+
value={modelText}
|
|
217
|
+
onChange={(e) => setModelText(e.currentTarget.value)}
|
|
218
|
+
onBlur={commitModel}
|
|
219
|
+
onKeyDown={(e) => {
|
|
220
|
+
if (e.key === 'Enter') {
|
|
221
|
+
e.preventDefault();
|
|
222
|
+
commitModel();
|
|
223
|
+
}
|
|
224
|
+
}}
|
|
225
|
+
placeholder={mode === 'omp' || mode === 'auto' ? 'commit role (default)' : 'harness default'}
|
|
226
|
+
className="w-full bg-paper border border-ink/20 rounded-md px-2.5 py-1.5 text-[11px] text-ink placeholder-ink/40 outline-none focus:border-ink/40 transition-colors font-mono"
|
|
227
|
+
/>
|
|
228
|
+
<p className="mt-1 text-[10px] text-ink/50">
|
|
229
|
+
`provider/model`. Leave empty to use the target's own default.
|
|
230
|
+
</p>
|
|
231
|
+
</div>
|
|
232
|
+
|
|
233
|
+
<div className="pt-2.5 border-t border-ink/10 flex items-center justify-between gap-3 text-[11px]">
|
|
234
|
+
<span className="text-ink/50">Will use</span>
|
|
235
|
+
<span className="text-ink/80 font-medium text-right">{willUse}</span>
|
|
236
|
+
</div>
|
|
237
|
+
</div>
|
|
238
|
+
)}
|
|
239
|
+
|
|
240
|
+
<div className="rounded-lg border border-ink/15 bg-paper p-3.5 space-y-3">
|
|
241
|
+
<div className="flex items-start justify-between gap-3">
|
|
242
|
+
<div>
|
|
243
|
+
<label className="block text-[10px] font-semibold uppercase tracking-wider text-ink/45">Prompt</label>
|
|
244
|
+
<p className="text-[10px] text-ink/50 mt-0.5">
|
|
245
|
+
{customPrompt ? 'Custom prompt' : 'Built-in prompt'}
|
|
246
|
+
{promptDirty ? ' · unsaved changes' : ''}
|
|
247
|
+
{' · '}placeholders are filled from the staged change set.
|
|
248
|
+
</p>
|
|
249
|
+
</div>
|
|
250
|
+
<button
|
|
251
|
+
type="button"
|
|
252
|
+
onClick={resetPrompt}
|
|
253
|
+
disabled={!customPrompt && !promptDirty}
|
|
254
|
+
className="flex items-center gap-1.5 px-2.5 py-1 rounded border border-ink/20 text-[10px] font-medium text-ink/70 hover:bg-ink/5 transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed"
|
|
255
|
+
>
|
|
256
|
+
<RotateCcw size={11} /> Reset to default
|
|
257
|
+
</button>
|
|
258
|
+
</div>
|
|
259
|
+
|
|
260
|
+
<textarea
|
|
261
|
+
value={promptText}
|
|
262
|
+
onChange={(e) => setPromptText(e.currentTarget.value)}
|
|
263
|
+
rows={14}
|
|
264
|
+
spellcheck={false}
|
|
265
|
+
className="w-full resize-y min-h-[220px] max-h-[420px] bg-paper border border-ink/20 rounded-md px-2.5 py-1.5 text-[11px] text-ink font-mono outline-none focus:border-ink/40 transition-colors"
|
|
266
|
+
/>
|
|
267
|
+
|
|
268
|
+
{!promptValidation.ok && (
|
|
269
|
+
<p className="text-[10px] text-error">{promptValidation.error}</p>
|
|
270
|
+
)}
|
|
271
|
+
|
|
272
|
+
<div className="flex flex-wrap items-center justify-between gap-2">
|
|
273
|
+
<p className="text-[10px] text-ink/50">
|
|
274
|
+
Placeholders: {COMMIT_PROMPT_PLACEHOLDERS.map((entry) => `{{${entry.key}}}`).join(', ')}
|
|
275
|
+
</p>
|
|
276
|
+
<button
|
|
277
|
+
type="button"
|
|
278
|
+
onClick={savePrompt}
|
|
279
|
+
disabled={!promptDirty || !promptValidation.ok}
|
|
280
|
+
className="flex items-center gap-1.5 px-2.5 py-1 rounded bg-ink text-canvas text-[10px] font-medium hover:bg-ink/90 transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed"
|
|
281
|
+
>
|
|
282
|
+
<Save size={11} /> Save prompt
|
|
283
|
+
</button>
|
|
284
|
+
</div>
|
|
285
|
+
</div>
|
|
286
|
+
|
|
287
|
+
<p className="text-[10px] text-ink/45 leading-relaxed">
|
|
288
|
+
The staged diff is sent to the selected harness or provider. Kabmo does not store the prompt or the reply; the generated text is only the commit draft.
|
|
289
|
+
</p>
|
|
290
|
+
</section>
|
|
291
|
+
);
|
|
292
|
+
}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Settings → Git → Commit identity.
|
|
8
|
+
*
|
|
9
|
+
* The saved identities are a library; the user's GLOBAL git config is the
|
|
10
|
+
* source of truth. Applying one writes `user.name` / `user.email` with
|
|
11
|
+
* `git config --global`, so every repository without a local override commits
|
|
12
|
+
* as that person. "Global config" restores what was there before Kabmo wrote.
|
|
13
|
+
*
|
|
14
|
+
* The previous values and the applied id live in the same config under
|
|
15
|
+
* `kabmo.identity.*`, so the backup survives a restart and cannot be applied to
|
|
16
|
+
* the wrong scope.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { useEffect, useState } from 'preact/hooks';
|
|
20
|
+
import { Plus, Trash2 } from 'lucide-preact';
|
|
21
|
+
import type { SettingsState } from '@/shared/types';
|
|
22
|
+
import { isGitIdentity, type GitIdentity, type GitIdentityRead } from '@/shared/lib/git/identity';
|
|
23
|
+
import { SearchSelect } from '@/client/components/common/search-select';
|
|
24
|
+
|
|
25
|
+
interface IdentitySectionProps {
|
|
26
|
+
settings: SettingsState;
|
|
27
|
+
onUpdate: (updater: Partial<SettingsState> | ((prev: SettingsState) => SettingsState)) => void;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const INPUT_CLASS = 'w-full bg-paper border border-ink/20 rounded-md px-2.5 py-1.5 text-[11px] text-ink placeholder-ink/40 outline-none focus:border-ink/40 transition-colors';
|
|
31
|
+
|
|
32
|
+
export function IdentitySection({ settings, onUpdate }: IdentitySectionProps) {
|
|
33
|
+
const identities = settings.gitIdentities ?? [];
|
|
34
|
+
const [read, setRead] = useState<GitIdentityRead | null>(null);
|
|
35
|
+
const [loading, setLoading] = useState(true);
|
|
36
|
+
const [busy, setBusy] = useState<string | null>(null);
|
|
37
|
+
const [error, setError] = useState<string | null>(null);
|
|
38
|
+
const [name, setName] = useState('');
|
|
39
|
+
const [email, setEmail] = useState('');
|
|
40
|
+
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
let active = true;
|
|
43
|
+
setLoading(true);
|
|
44
|
+
fetch('/api/settings/git-identity')
|
|
45
|
+
.then(async (response) => {
|
|
46
|
+
const body = await response.json().catch(() => null) as (GitIdentityRead & { error?: string }) | null;
|
|
47
|
+
if (!response.ok || !body) throw new Error(body?.error || `Request failed (HTTP ${response.status})`);
|
|
48
|
+
if (active) setRead({ global: body.global, appliedId: body.appliedId });
|
|
49
|
+
})
|
|
50
|
+
.catch((cause: unknown) => {
|
|
51
|
+
if (active) setError(cause instanceof Error ? cause.message : String(cause));
|
|
52
|
+
})
|
|
53
|
+
.finally(() => {
|
|
54
|
+
if (active) setLoading(false);
|
|
55
|
+
});
|
|
56
|
+
return () => {
|
|
57
|
+
active = false;
|
|
58
|
+
};
|
|
59
|
+
}, []);
|
|
60
|
+
|
|
61
|
+
const apply = async (identityId: string) => {
|
|
62
|
+
setBusy(identityId || 'global');
|
|
63
|
+
setError(null);
|
|
64
|
+
try {
|
|
65
|
+
const response = await fetch('/api/settings/git-identity', {
|
|
66
|
+
method: 'POST',
|
|
67
|
+
headers: { 'Content-Type': 'application/json' },
|
|
68
|
+
body: JSON.stringify({ identityId }),
|
|
69
|
+
});
|
|
70
|
+
const body = await response.json().catch(() => null) as (GitIdentityRead & { error?: string }) | null;
|
|
71
|
+
if (!response.ok || !body) throw new Error(body?.error || `Request failed (HTTP ${response.status})`);
|
|
72
|
+
setRead({ global: body.global, appliedId: body.appliedId });
|
|
73
|
+
} catch (cause) {
|
|
74
|
+
setError(cause instanceof Error ? cause.message : String(cause));
|
|
75
|
+
} finally {
|
|
76
|
+
setBusy(null);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const add = () => {
|
|
81
|
+
const candidate: GitIdentity = {
|
|
82
|
+
id: typeof crypto !== 'undefined' && 'randomUUID' in crypto
|
|
83
|
+
? crypto.randomUUID()
|
|
84
|
+
: `id-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
85
|
+
name: name.trim(),
|
|
86
|
+
email: email.trim(),
|
|
87
|
+
};
|
|
88
|
+
if (!isGitIdentity(candidate)) {
|
|
89
|
+
setError('Enter a name and a valid email address.');
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
onUpdate({ gitIdentities: [...identities, candidate] });
|
|
93
|
+
setName('');
|
|
94
|
+
setEmail('');
|
|
95
|
+
setError(null);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const remove = async (id: string) => {
|
|
99
|
+
if (read?.appliedId === id) await apply('');
|
|
100
|
+
onUpdate({ gitIdentities: identities.filter((entry) => entry.id !== id) });
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const appliedId = read?.appliedId ?? '';
|
|
104
|
+
const global = read?.global ?? null;
|
|
105
|
+
|
|
106
|
+
return (
|
|
107
|
+
<section className="space-y-3">
|
|
108
|
+
<div>
|
|
109
|
+
<h4 className="text-sm font-semibold text-ink">Commit Identity</h4>
|
|
110
|
+
<p className="text-[11px] text-ink/60 mt-0.5">
|
|
111
|
+
The name and email a commit carries. Applying an identity writes it to your global git config.
|
|
112
|
+
</p>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<div className="rounded-lg border border-ink/15 bg-paper p-3.5 space-y-2">
|
|
116
|
+
<label className="block text-[10px] font-semibold uppercase tracking-wider text-ink/45">Commit as</label>
|
|
117
|
+
<SearchSelect
|
|
118
|
+
ariaLabel="Commit identity"
|
|
119
|
+
value={appliedId}
|
|
120
|
+
onChange={(value) => void apply(value)}
|
|
121
|
+
disabled={loading || busy !== null}
|
|
122
|
+
placeholder="Global config"
|
|
123
|
+
searchable={identities.length > 8}
|
|
124
|
+
options={[
|
|
125
|
+
{
|
|
126
|
+
value: '',
|
|
127
|
+
label: 'Global config',
|
|
128
|
+
hint: "git's own user.name / user.email",
|
|
129
|
+
},
|
|
130
|
+
...identities.map((identity) => ({
|
|
131
|
+
value: identity.id,
|
|
132
|
+
label: identity.name,
|
|
133
|
+
hint: identity.email,
|
|
134
|
+
})),
|
|
135
|
+
]}
|
|
136
|
+
/>
|
|
137
|
+
<p className="text-[10px] text-ink/50">
|
|
138
|
+
{loading
|
|
139
|
+
? 'Reading git config…'
|
|
140
|
+
: global
|
|
141
|
+
? `Current: ${global.name} <${global.email}>`
|
|
142
|
+
: 'No identity configured'}
|
|
143
|
+
{busy ? ' · applying…' : ''}
|
|
144
|
+
</p>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
{identities.length > 0 && (
|
|
148
|
+
<details className="rounded-lg border border-ink/15 bg-paper">
|
|
149
|
+
<summary className="px-3.5 py-2.5 text-[10px] font-semibold uppercase tracking-wider text-ink/45 cursor-pointer select-none">
|
|
150
|
+
Manage saved identities ({identities.length})
|
|
151
|
+
</summary>
|
|
152
|
+
<div className="divide-y divide-ink/10 border-t border-ink/10 max-h-48 overflow-y-auto">
|
|
153
|
+
{identities.map((identity) => (
|
|
154
|
+
<div key={identity.id} className="flex items-center gap-3 px-3.5 py-2.5">
|
|
155
|
+
<div className="min-w-0 flex-1">
|
|
156
|
+
<div className="text-xs font-semibold text-ink truncate">{identity.name}</div>
|
|
157
|
+
<div className="text-[10px] text-ink/50 truncate">{identity.email}</div>
|
|
158
|
+
</div>
|
|
159
|
+
<button
|
|
160
|
+
type="button"
|
|
161
|
+
onClick={() => void remove(identity.id)}
|
|
162
|
+
aria-label={`Remove ${identity.name}`}
|
|
163
|
+
className="p-1.5 rounded text-ink/40 hover:text-error hover:bg-ink/5 transition-colors cursor-pointer"
|
|
164
|
+
>
|
|
165
|
+
<Trash2 size={12} />
|
|
166
|
+
</button>
|
|
167
|
+
</div>
|
|
168
|
+
))}
|
|
169
|
+
</div>
|
|
170
|
+
</details>
|
|
171
|
+
)}
|
|
172
|
+
|
|
173
|
+
{error && <p className="text-[10px] text-error">{error}</p>}
|
|
174
|
+
|
|
175
|
+
<div className="rounded-lg border border-ink/15 bg-paper p-3.5 space-y-3">
|
|
176
|
+
<div className="grid grid-cols-1 sm:grid-cols-2 gap-2">
|
|
177
|
+
<input
|
|
178
|
+
type="text"
|
|
179
|
+
value={name}
|
|
180
|
+
onChange={(e) => { setName(e.currentTarget.value); setError(null); }}
|
|
181
|
+
placeholder="User name"
|
|
182
|
+
className={INPUT_CLASS}
|
|
183
|
+
/>
|
|
184
|
+
<input
|
|
185
|
+
type="text"
|
|
186
|
+
value={email}
|
|
187
|
+
onChange={(e) => { setEmail(e.currentTarget.value); setError(null); }}
|
|
188
|
+
onKeyDown={(e) => {
|
|
189
|
+
if (e.key === 'Enter') {
|
|
190
|
+
e.preventDefault();
|
|
191
|
+
add();
|
|
192
|
+
}
|
|
193
|
+
}}
|
|
194
|
+
placeholder="Email address"
|
|
195
|
+
className={INPUT_CLASS}
|
|
196
|
+
/>
|
|
197
|
+
</div>
|
|
198
|
+
<div className="flex flex-wrap items-center justify-between gap-2">
|
|
199
|
+
<p className="text-[10px] text-ink/50">Saved identities are a library; pick one above to apply it globally.</p>
|
|
200
|
+
<button
|
|
201
|
+
type="button"
|
|
202
|
+
onClick={add}
|
|
203
|
+
className="flex items-center gap-1.5 px-2.5 py-1 rounded bg-ink text-canvas text-[10px] font-medium hover:bg-ink/90 transition-colors cursor-pointer"
|
|
204
|
+
>
|
|
205
|
+
<Plus size={11} /> Add identity
|
|
206
|
+
</button>
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
<p className="text-[10px] text-ink/45 leading-relaxed">
|
|
211
|
+
Applying writes `user.name` and `user.email` to your global git config. Global config restores what was there before Kabmo wrote.
|
|
212
|
+
</p>
|
|
213
|
+
</section>
|
|
214
|
+
);
|
|
215
|
+
}
|
|
@@ -21,6 +21,7 @@ import { AppearanceSettings } from '@/client/components/settings/categories/Appe
|
|
|
21
21
|
import { ChatSettings } from '@/client/components/settings/categories/ChatSettings';
|
|
22
22
|
import { KeyboardSettings } from '@/client/components/settings/categories/KeyboardSettings';
|
|
23
23
|
import { ProjectSettings } from '@/client/components/settings/categories/ProjectSettings';
|
|
24
|
+
import { GitSettings } from '@/client/components/settings/categories/GitSettings';
|
|
24
25
|
import { ProviderSettings } from '@/client/components/settings/categories/ProviderSettings';
|
|
25
26
|
import { AgentSettings } from '@/client/components/settings/categories/AgentSettings';
|
|
26
27
|
import { BehaviorSettings } from '@/client/components/settings/categories/BehaviorSettings';
|
|
@@ -68,6 +69,8 @@ export function CategoryContent({
|
|
|
68
69
|
return <KeyboardSettings settings={settings} onUpdate={onUpdate} />;
|
|
69
70
|
case 'projects':
|
|
70
71
|
return <ProjectSettings />;
|
|
72
|
+
case 'git':
|
|
73
|
+
return <GitSettings settings={settings} onUpdate={onUpdate} />;
|
|
71
74
|
case 'providers':
|
|
72
75
|
return <ProviderSettings autoOpenAdd={autoOpenAdd} onAddModalClose={onAddModalClose} />;
|
|
73
76
|
case 'agents':
|
|
@@ -18,6 +18,12 @@ import { useToolRenderMode } from '@/client/hooks/chat/timeline/tool-render-mode
|
|
|
18
18
|
interface ChatMessageItemProps {
|
|
19
19
|
msg: ChatMessageData | any;
|
|
20
20
|
isStreaming?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* This row belongs to the run in flight (it sits after the last user turn).
|
|
23
|
+
* A thinking block in it opens even when its own segment already settled —
|
|
24
|
+
* see `MessageList`'s `lastUserIdx`.
|
|
25
|
+
*/
|
|
26
|
+
isLiveRun?: boolean;
|
|
21
27
|
onUndo?: (msgId: string, content?: string) => void;
|
|
22
28
|
/**
|
|
23
29
|
* Start a new chat seeded with this row. A user row passes its attachments
|
|
@@ -52,6 +58,7 @@ interface ChatMessageItemProps {
|
|
|
52
58
|
export const ChatMessageItem = memo(function ChatMessageItem({
|
|
53
59
|
msg,
|
|
54
60
|
isStreaming = false,
|
|
61
|
+
isLiveRun = false,
|
|
55
62
|
onUndo,
|
|
56
63
|
onNewChat,
|
|
57
64
|
onFork,
|
|
@@ -131,6 +138,7 @@ export const ChatMessageItem = memo(function ChatMessageItem({
|
|
|
131
138
|
thinking={thinkingData}
|
|
132
139
|
messageId={String(msg.id)}
|
|
133
140
|
defaultExpanded={false}
|
|
141
|
+
isRunStreaming={isLiveRun}
|
|
134
142
|
showSeparator={isPrevAssistant}
|
|
135
143
|
isMobile={isMobile}
|
|
136
144
|
/>
|
|
@@ -16,20 +16,33 @@
|
|
|
16
16
|
* two mounts pin both spellings, and that the footer lands once the run ends.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { afterAll, afterEach, beforeAll, describe, expect, test } from 'bun:test';
|
|
19
|
+
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, test } from 'bun:test';
|
|
20
20
|
import { Window } from 'happy-dom';
|
|
21
21
|
import { h, render } from 'preact';
|
|
22
22
|
import { act } from 'preact/test-utils';
|
|
23
23
|
import { MessageList } from '@/client/components/workspace/chat-timeline/MessageList';
|
|
24
|
+
import { SessionStateProvider } from '@/client/components/common/session-state-provider';
|
|
24
25
|
import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
|
|
25
26
|
import type { ChatMessageData } from '@/shared/types';
|
|
26
27
|
|
|
27
28
|
let container: HTMLElement;
|
|
28
29
|
/** Every tree this file mounted; unmounted before the window goes away. */
|
|
29
30
|
const mounted: HTMLElement[] = [];
|
|
31
|
+
/** The runner's own fetch, so a leaked stub cannot be mistaken for it. */
|
|
32
|
+
const nativeFetch = Bun.fetch;
|
|
30
33
|
|
|
31
34
|
beforeAll(() => installDomGlobals(new Window({ url: 'http://localhost' })));
|
|
32
35
|
|
|
36
|
+
beforeEach(() => {
|
|
37
|
+
// `SessionStateProvider` hydrates the session blob on mount; Bun's fetch
|
|
38
|
+
// cannot resolve the relative URL happy-dom would hand it.
|
|
39
|
+
(globalThis as unknown as Record<string, unknown>).fetch = async () =>
|
|
40
|
+
new Response(JSON.stringify({ sessionId: 'message-list-spec', state: {} }), {
|
|
41
|
+
status: 200,
|
|
42
|
+
headers: { 'content-type': 'application/json' },
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
33
46
|
afterEach(() => {
|
|
34
47
|
// UNMOUNT, not detach: `MessageList` draws `AiMessageFooter`, whose plugin
|
|
35
48
|
// strip subscribes to the list-slot store. A tree left mounted re-renders on
|
|
@@ -39,6 +52,7 @@ afterEach(() => {
|
|
|
39
52
|
// Windows shard. A detached container is enough for the assertions, but the
|
|
40
53
|
// subscription outlives it.
|
|
41
54
|
for (const node of mounted.splice(0)) render(null, node);
|
|
55
|
+
(globalThis as unknown as Record<string, unknown>).fetch = nativeFetch;
|
|
42
56
|
});
|
|
43
57
|
|
|
44
58
|
afterAll(() => restoreDomGlobals());
|
|
@@ -53,7 +67,13 @@ async function mount(messages: ChatMessageData[], isGenerating: boolean): Promis
|
|
|
53
67
|
document.body.appendChild(container);
|
|
54
68
|
mounted.push(container);
|
|
55
69
|
await act(async () => {
|
|
56
|
-
render(
|
|
70
|
+
render(
|
|
71
|
+
h(SessionStateProvider, {
|
|
72
|
+
sessionId: 'message-list-spec',
|
|
73
|
+
children: h(MessageList, { messages, isGenerating }),
|
|
74
|
+
}) as never,
|
|
75
|
+
container,
|
|
76
|
+
);
|
|
57
77
|
});
|
|
58
78
|
return container;
|
|
59
79
|
}
|
|
@@ -74,6 +94,39 @@ describe('MessageList run footers', () => {
|
|
|
74
94
|
});
|
|
75
95
|
});
|
|
76
96
|
|
|
97
|
+
/**
|
|
98
|
+
* A thinking block opens for the whole LIVE RUN, not only while its own
|
|
99
|
+
* segment streams. A warm session delivers the first `message_update` and its
|
|
100
|
+
* `message_end` inside one animation frame, so the block mounts already
|
|
101
|
+
* finalized; keying the default on the segment's own flag left it collapsed
|
|
102
|
+
* for the rest of the run (the reported "thinking sometimes does not open").
|
|
103
|
+
*/
|
|
104
|
+
describe('MessageList live-run thinking', () => {
|
|
105
|
+
const thinkingRow = (id: string, isGenerating: boolean): ChatMessageData => ({
|
|
106
|
+
id,
|
|
107
|
+
role: 'ai',
|
|
108
|
+
content: '',
|
|
109
|
+
thinking: { thought: 'hmm', isGenerating },
|
|
110
|
+
});
|
|
111
|
+
const expanded = (el: HTMLElement) =>
|
|
112
|
+
el.querySelector<HTMLButtonElement>('button[aria-expanded]')?.getAttribute('aria-expanded');
|
|
113
|
+
|
|
114
|
+
test('a finalized thinking segment after the last user turn opens', async () => {
|
|
115
|
+
const el = await mount([user('u1'), thinkingRow('a1', false)], true);
|
|
116
|
+
expect(expanded(el)).toBe('true');
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
test('a historical thinking block stays closed while a later run streams', async () => {
|
|
120
|
+
const el = await mount(
|
|
121
|
+
[user('u1'), thinkingRow('a1', false), user('u2'), thinkingRow('a2', false)],
|
|
122
|
+
true,
|
|
123
|
+
);
|
|
124
|
+
const toggles = el.querySelectorAll<HTMLButtonElement>('button[aria-expanded]');
|
|
125
|
+
expect(toggles[0]?.getAttribute('aria-expanded')).toBe('false');
|
|
126
|
+
expect(toggles[1]?.getAttribute('aria-expanded')).toBe('true');
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
|
|
77
130
|
/**
|
|
78
131
|
* The mounted window.
|
|
79
132
|
*
|