@kabmo-labs/kabmo 0.32.0 → 0.33.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 +537 -530
- package/dist/client/static/js/{CsvGrid-amafmq3z.js → CsvGrid-fncjbg6j.js} +2 -2
- package/dist/client/static/js/{DocxView-851ps9t0.js → DocxView-c9v2vr3r.js} +5 -5
- package/dist/client/static/js/{DrawioView-kw1vy3r2.js → DrawioView-vxjksm12.js} +2 -2
- package/dist/client/static/js/ImageView-a3g5k226.js +1 -0
- package/dist/client/static/js/LayoutWrapper-hnjfwsjh.js +2 -0
- package/dist/client/static/js/Modal-qtftcp2t.js +38 -0
- package/dist/client/static/js/{PdfView-f5jkm0rs.js → PdfView-ksaes53y.js} +1 -1
- package/dist/client/static/js/SessionsView-30vcr95v.js +1 -0
- package/dist/client/static/js/{SheetView-23zxy30b.js → SheetView-vc484scg.js} +23 -23
- package/dist/client/static/js/{SvgPreview-c341y50e.js → SvgPreview-tph89jet.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-2dc3mpk6.js → abnfDiagram-O67JEVCF-xbar278c.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-tavtgb8a.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-7jmrr5ja.js → architectureDiagram-NJMV4G6O-s171n2z6.js} +3 -3
- package/dist/client/static/js/{astro-sjtf954j.js → astro-80bs6hvg.js} +1 -1
- package/dist/client/static/js/bash-b3rwyg5p.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-jrk2m0ea.js → blockDiagram-BEXU5L5S-gzx6rv9n.js} +3 -3
- package/dist/client/static/js/c-wkgxb1t1.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-48cyncjd.js → c4Diagram-YGBWAQC7-7f00skch.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-gm7jt1cd.js → classDiagram-v2-NBCMYWYE-j79v95nc.js} +4 -4
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-g0g3z0xp.js → cose-bilkent-JH36ORCC-5fkn7ee5.js} +1 -1
- package/dist/client/static/js/cpp-y0t6mynx.js +1 -0
- package/dist/client/static/js/css-6vj0d308.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-cdh3n2z2.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-6vjde6am.js → cynefinDiagram-VND7K2PF-cfs1yvrd.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-q6k8bx1j.js → dagre-6A5THRUB-44bgc48p.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-87cmze2n.js → diagram-22UHCM2B-a4g4x83k.js} +19 -19
- package/dist/client/static/js/{diagram-3UASUU5V-1ejbr2p4.js → diagram-3UASUU5V-gm4rg5na.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-vaw1r6k2.js → diagram-ATOU4E4O-a95y41vk.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-gxm9zv7d.js → diagram-CDSNMT55-t3j93mmc.js} +5 -5
- package/dist/client/static/js/{diagram-MLGK6HIB-x010xswm.js → diagram-MLGK6HIB-c2wdez02.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-qtcq7e6c.js → diagram-MPIPVDR6-gya9jhs5.js} +2 -2
- package/dist/client/static/js/{dockerfile-k5xbramm.js → dockerfile-a7q6174s.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-nwwbasfh.js → ebnfDiagram-ZINNZB2B-jjhkza6t.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-xcp7thax.js → elk-276RUBZZ-f7re45mw.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-xj1tp716.js → erDiagram-OPXOYQCR-tpm9g5te.js} +6 -6
- package/dist/client/static/js/{erlang-rz1g9mxy.js → erlang-qt876zrq.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-as97tpyp.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-ggm06d12.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-f7q96bea.js → ganttDiagram-FUAMR5RP-fz43n12d.js} +4 -4
- package/dist/client/static/js/gitGraph-4MIJSDKK-eqz7p9ng.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-1rydkyq9.js → gitGraphDiagram-X574FWY7-f61hgbn6.js} +9 -9
- package/dist/client/static/js/graphql-n43pd5fs.js +1 -0
- package/dist/client/static/js/{index-0g25yrc0.js → index-03h3bkcf.js} +1 -1
- package/dist/client/static/js/{index-8m3q2zpb.js → index-0e40xskg.js} +1 -1
- package/dist/client/static/js/{index-w5131mtt.js → index-0n5wwe60.js} +2 -2
- package/dist/client/static/js/{index-ynqnbvn2.js → index-0tf0arsp.js} +3 -3
- package/dist/client/static/js/{index-0a1ekhqf.js → index-14vndmcr.js} +2 -2
- package/dist/client/static/js/index-1a0zkj8h.js +2 -0
- package/dist/client/static/js/{index-zca66d5d.js → index-1xqs14fr.js} +3 -3
- package/dist/client/static/js/{index-73xfkyea.js → index-1y9r4frb.js} +2 -2
- package/dist/client/static/js/{index-0n9c85ke.js → index-2svnq5gg.js} +2 -2
- package/dist/client/static/js/{index-pe9j88d4.js → index-2x5f66t6.js} +2 -2
- package/dist/client/static/js/{index-ggaqh9rt.js → index-354mqqra.js} +2 -2
- package/dist/client/static/js/{index-2t2tnc3x.js → index-3rcjx70v.js} +1 -1
- package/dist/client/static/js/{index-9nbxb421.js → index-3zc1b0dv.js} +2 -2
- package/dist/client/static/js/{index-14wppnkx.js → index-5tgq7aqx.js} +2 -2
- package/dist/client/static/js/{index-vrbcj11n.js → index-76zb4m0n.js} +2 -2
- package/dist/client/static/js/{index-x64kqgen.js → index-7y6rpsrp.js} +2 -2
- package/dist/client/static/js/{index-2n5wy1sh.js → index-8239j2v1.js} +1 -1
- package/dist/client/static/js/{index-pkyrkkbt.js → index-9fjt5anh.js} +2 -2
- package/dist/client/static/js/{index-m6wwc5h6.js → index-9t82sx0w.js} +2 -2
- package/dist/client/static/js/{index-hkq0y3pn.js → index-9y3gjdj7.js} +2 -2
- package/dist/client/static/js/{index-hyry1n8x.js → index-ahv9y42z.js} +2 -2
- package/dist/client/static/js/{index-f519m6s3.js → index-ajs3jj6j.js} +1 -1
- package/dist/client/static/js/index-apvkd37e.js +4 -0
- package/dist/client/static/js/index-at6bhjyf.js +1 -0
- package/dist/client/static/js/index-bkye8mz4.js +2 -0
- package/dist/client/static/js/{index-e7a3fkvv.js → index-d495kfm0.js} +1 -1
- package/dist/client/static/js/{index-hhm62nfj.js → index-dbe6afkf.js} +2 -2
- package/dist/client/static/js/{index-c20a46ww.js → index-djmg1d7h.js} +2 -2
- package/dist/client/static/js/{index-fc2j6bq2.js → index-e4p4cd3r.js} +2 -2
- package/dist/client/static/js/{index-f63y3mjj.js → index-eyzeya95.js} +5 -5
- package/dist/client/static/js/{index-123e8tqq.js → index-gcs49f3p.js} +1 -1
- package/dist/client/static/js/{index-c8jzx6b0.js → index-gs6f0qwa.js} +2 -2
- package/dist/client/static/js/{index-6sdctwv2.js → index-hf52f59k.js} +2 -2
- package/dist/client/static/js/{index-3anc30zh.js → index-j0r5hj0j.js} +2 -2
- package/dist/client/static/js/{index-31jrebvn.js → index-js7t1vb1.js} +18 -18
- package/dist/client/static/js/{index-xa7nrnda.js → index-km2zb6wk.js} +2 -2
- package/dist/client/static/js/{index-yvcpdk5f.js → index-m73za75e.js} +1 -1
- package/dist/client/static/js/{index-e6rar25v.js → index-pbe4yed4.js} +2 -2
- package/dist/client/static/js/{index-xpf2ra60.js → index-pxv2nw9w.js} +1 -1
- package/dist/client/static/js/{index-deex10rz.js → index-q2w6s8n7.js} +5 -5
- package/dist/client/static/js/{index-22jaxtz1.js → index-qckv9nte.js} +2 -2
- package/dist/client/static/js/{index-e26rd868.js → index-qsm2z36d.js} +2 -2
- package/dist/client/static/js/{index-5zd1jx9r.js → index-rg8jpbsw.js} +2 -2
- package/dist/client/static/js/{index-gvwqjpcr.js → index-rytaa8ca.js} +2 -2
- package/dist/client/static/js/{index-fmxn1rzs.js → index-sdtye3jy.js} +2 -2
- package/dist/client/static/js/index-sffjtm5w.js +12 -0
- package/dist/client/static/js/{index-tr8754r0.js → index-trm9x02n.js} +45 -45
- package/dist/client/static/js/{index-cwaz6geq.js → index-vtbbfwx0.js} +2 -2
- package/dist/client/static/js/{index-vmvcse63.js → index-vw4brsdx.js} +1 -1
- package/dist/client/static/js/{index-qmh0h87h.js → index-vw5k8csz.js} +55 -55
- package/dist/client/static/js/{index-52bgxh6f.js → index-w0fwb80e.js} +1 -1
- package/dist/client/static/js/{index-s9vp6p70.js → index-x07kp3jz.js} +2 -2
- package/dist/client/static/js/{index-8a3tmm1h.js → index-xj9649ac.js} +7 -7
- package/dist/client/static/js/{index-w4re5r8w.js → index-ypx3qmhq.js} +2 -2
- package/dist/client/static/js/{index-y139vc12.js → index-zt75xpq0.js} +193 -193
- package/dist/client/static/js/{index-nsrnyqcm.js → index-zvfvqvn9.js} +2 -2
- package/dist/client/static/js/info-A6RAGUB7-4pkzh1qx.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-ptg07tp2.js → infoDiagram-VRGFBTTK-1qj804sn.js} +1 -1
- package/dist/client/static/js/ini-j5dyq6gm.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-bdk2dkf5.js → ishikawaDiagram-OU5B5YK6-4j4qsnzw.js} +3 -3
- package/dist/client/static/js/java-g4dgwbfd.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-kez0ha4c.js → journeyDiagram-ZHPQQLJL-j0brnfft.js} +4 -4
- package/dist/client/static/js/json-j5q8nt57.js +1 -0
- package/dist/client/static/js/jsx-7t5ecz9s.js +1 -0
- package/dist/client/static/js/{julia-nmr85k8z.js → julia-4ghmfy3e.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-dhzp3qg5.js → kanban-definition-PNTS6WVX-qqc22br0.js} +3 -3
- package/dist/client/static/js/lua-1g6w30de.js +1 -0
- package/dist/client/static/js/markdown-afx21x8c.js +1 -0
- package/dist/client/static/js/{mermaid.core-h7wttbss.js → mermaid.core-vv3wbe65.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-tq5dd1em.js → mindmap-definition-NLK3R4M7-y5b2z8zp.js} +4 -4
- package/dist/client/static/js/one-dark-pro-hm3f56n1.js +1 -0
- package/dist/client/static/js/one-light-xrz49rct.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-yg71sp88.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-e5hrdfzv.js → pegDiagram-GJSIUBJH-0be07mqs.js} +1 -1
- package/dist/client/static/js/{perl-prxcva8r.js → perl-sd00t4b4.js} +1 -1
- package/dist/client/static/js/{php-m9kcctzs.js → php-2zfyqa61.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-89wd6np0.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-axvbvnz8.js → pieDiagram-5QR66LMP-544w86jk.js} +2 -2
- package/dist/client/static/js/properties-thd83wey.js +1 -0
- package/dist/client/static/js/python-264ns4xw.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-wtn28cfm.js → quadrantDiagram-O4NWA36T-p09e7z5s.js} +4 -4
- package/dist/client/static/js/r-qw82kkv9.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-avn0b8r9.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-de27xv5w.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-rg4zzj7x.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-d84fhj8v.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-dvf8xrmc.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-avjkq945.js → railroadDiagram-XR7U4H2S-de830ed2.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-bntx7r6q.js → requirementDiagram-PLB6GJNP-b47d74p1.js} +4 -4
- package/dist/client/static/js/{ruby-t06c0e7g.js → ruby-v9qaqhby.js} +1 -1
- package/dist/client/static/js/{rust-6gqjxyf0.js → rust-fkt0qyrs.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-ps8nkdm2.js → sankeyDiagram-IPEJSGJF-6ezc2fpj.js} +5 -5
- package/dist/client/static/js/{sass-gsbyn3wh.js → sass-9bxped7y.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-3ckf1q6z.js → sequenceDiagram-PO4LG4MO-by5zqj6w.js} +18 -18
- package/dist/client/static/js/{sizeCapture-INFHLROL-akvcr1x7.js → sizeCapture-INFHLROL-q85r06j6.js} +1 -1
- package/dist/client/static/js/sql-g8wcshpc.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-c82914fz.js → stateDiagram-v2-GCMORJYK-ep5pyexs.js} +3 -3
- package/dist/client/static/js/{svelte-j54gfrvq.js → svelte-mwtx07d9.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-scgdefh4.js → swimlanes-2SLR337P-95fcqkh8.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-xs2en5dv.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-z2ha1rhq.js → timeline-definition-EJHVYXUP-461e615g.js} +2 -2
- package/dist/client/static/js/treeView-Q6P3EWNA-mham0bh6.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-mxrxax86.js +1 -0
- package/dist/client/static/js/tsx-nm94hed6.js +1 -0
- package/dist/client/static/js/typescript-0s2t05jj.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-3wdmrfmk.js → usecaseDiagram-POWQR4AR-ftqfnvhg.js} +38 -38
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-7m5tatzv.js → vennDiagram-UO4OBE2U-7t96h6ez.js} +7 -7
- package/dist/client/static/js/{vue-y8bb5f3h.js → vue-j8vb9d7r.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-8vrvh9p3.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-55ps9s4z.js → wardleyDiagram-VNRHLVJA-0de8w8c6.js} +4 -4
- package/dist/client/static/js/xml-dz51p1m3.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-8bsjtm4t.js → xychartDiagram-PMCCYNJV-dez9phkf.js} +5 -5
- package/dist/client/static/js/yaml-2cfkd30t.js +1 -0
- package/package.json +1 -1
- package/src/client/components/common/context-usage-button/McpSection.test.tsx +98 -0
- package/src/client/components/common/context-usage-button/McpSection.tsx +12 -5
- package/src/client/components/common/context-usage-button/SessionStats.tsx +80 -0
- package/src/client/components/common/context-usage-button/index.test.tsx +26 -0
- package/src/client/components/common/context-usage-button/index.tsx +36 -28
- package/src/client/components/common/harness-glyph/brands.ts +8 -0
- package/src/client/components/common/session-actions-menu/index.tsx +6 -1
- package/src/client/components/layout/session-sidebar/SessionsView.tsx +20 -33
- package/src/client/components/mobile/LayoutWrapper.tsx +28 -29
- package/src/client/components/mobile/mobile-right-sidebar/FullDiff.tsx +9 -2
- package/src/client/components/mobile/worktree-session.ts +4 -1
- package/src/client/components/settings/apply-side-effects.test.ts +11 -0
- package/src/client/components/settings/apply-side-effects.ts +7 -0
- package/src/client/components/settings/categories/ChatSettings.test.tsx +1 -1
- package/src/client/components/settings/categories/ChatSettings.tsx +2 -0
- package/src/client/components/settings/categories/NotificationSettings.tsx +1 -1
- package/src/client/components/settings/categories/chat-settings/ChangedFilesSection.tsx +79 -0
- package/src/client/components/settings/categories/chat-settings/groups.ts +4 -3
- package/src/client/components/workspace/chat-timeline/ChangedFilesSummary.tsx +101 -0
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +16 -15
- package/src/client/components/workspace/chat-timeline/MessageList.tsx +33 -1
- package/src/client/components/workspace/chat-timeline/RunFooter.tsx +21 -1
- package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +13 -0
- package/src/client/components/workspace/chat-timeline/fork-preview.test.tsx +11 -0
- package/src/client/components/workspace/chat-timeline/index.tsx +1 -1
- package/src/client/components/workspace/diff-panel/Toolbar.tsx +17 -51
- package/src/client/components/workspace/diff-panel/index.tsx +23 -4
- package/src/client/components/workspace/diff-panel/toolbar-git-actions.tsx +94 -0
- package/src/client/components/workspace/editor/Body.tsx +2 -0
- package/src/client/data/settings/omp-schema.json +73 -3
- package/src/client/hooks/chat/btw/mode.ts +5 -1
- package/src/client/hooks/chat/omp/session-sidebar-controller.ts +9 -3
- package/src/client/hooks/chat/timeline/changed-files-setting.test.ts +31 -0
- package/src/client/hooks/chat/timeline/changed-files-setting.ts +60 -0
- package/src/client/hooks/chat/timeline/new-chat.ts +4 -1
- package/src/client/hooks/chat/timeline/pending-dispatch.ts +6 -10
- package/src/client/hooks/chat/timeline/session-changes.ts +51 -0
- package/src/client/hooks/chat/waiting/dispatch.ts +4 -1
- package/src/client/hooks/ui/notification-events.test.ts +3 -0
- package/src/client/hooks/ui/notification-events.ts +3 -1
- package/src/client/hooks/ui/notification-sound.ts +13 -6
- package/src/client/hooks/ui/ui-sounds.test.ts +15 -0
- package/src/client/hooks/workspace/batch-delete-run.ts +5 -1
- package/src/client/hooks/workspace/diff-file.ts +11 -4
- package/src/client/hooks/workspace/file-tabs.ts +13 -4
- package/src/client/hooks/workspace/journal-diff.ts +97 -0
- package/src/client/hooks/workspace/session-delete.ts +5 -1
- package/src/client/lib/notifications/native-banner-sound.test.ts +93 -0
- package/src/client/lib/notifications/native-banner-sound.ts +46 -0
- package/src/client/lib/notifications/os.test.ts +14 -5
- package/src/client/lib/notifications/os.ts +8 -0
- package/src/client/lib/router/branch-params.test.ts +62 -0
- package/src/client/lib/router/branch-params.ts +48 -0
- package/src/server/lib/assets/shell-settings.server.test.ts +35 -0
- package/src/server/lib/assets/shell-settings.server.ts +33 -0
- package/src/server/lib/harness/launch-table.ts +10 -0
- package/src/server/lib/omp/session/changes.test.ts +138 -0
- package/src/server/lib/omp/session/changes.ts +220 -0
- package/src/server/lib/omp/session/session-discovery.test.ts +4 -4
- package/src/server/lib/omp/session/sidebar-activity.server.test.ts +6 -2
- package/src/server/lib/omp/session/subagent-presence-scan.ts +54 -0
- package/src/server/lib/omp/session/subagent-presence-store.test.ts +1 -1
- package/src/server/lib/omp/session/subagent-presence.test.ts +115 -0
- package/src/server/lib/omp/session/subagent-presence.ts +12 -3
- package/src/server/lib/omp/session/telemetry/compute.ts +68 -0
- package/src/server/lib/omp/session/telemetry.test.ts +81 -0
- package/src/server/lib/realtime/topics/peer-relay.server.test.ts +1 -11
- package/src/server/plugins/ssr.ts +20 -8
- package/src/server/routes/sessions/changes.test.ts +90 -0
- package/src/server/routes/sessions/changes.ts +55 -0
- package/src/server/routes/sessions/index.ts +6 -0
- package/src/shared/lib/chat/duration.ts +34 -0
- package/src/shared/lib/chat/timeline/changed-files.test.ts +121 -0
- package/src/shared/lib/chat/timeline/changed-files.ts +71 -0
- package/src/shared/lib/chat/timeline/fork-anchor.test.ts +3 -0
- package/src/shared/lib/format/duration.test.ts +31 -0
- package/src/shared/lib/format/duration.ts +27 -0
- package/src/shared/lib/fs/unified-diff.test.ts +53 -0
- package/src/shared/lib/fs/unified-diff.ts +127 -0
- package/src/shared/lib/harness/brand-color.ts +3 -0
- package/src/shared/lib/harness/catalog.test.ts +13 -0
- package/src/shared/lib/harness/catalog.ts +8 -1
- package/src/shared/lib/harness/fork.ts +4 -2
- package/src/shared/lib/harness/mcp-facts.ts +3 -0
- package/src/shared/lib/harness/provider-facts.ts +14 -0
- package/src/shared/lib/harness/updates.ts +5 -0
- package/src/shared/lib/icons/tint-hues.generated.ts +27 -27
- package/src/shared/lib/omp/config/schema.test.ts +4 -2
- package/src/shared/lib/settings/defaults.ts +1 -0
- package/src/shared/lib/workspace/file-tab-id.ts +9 -0
- package/src/shared/types/context.ts +18 -0
- package/src/shared/types/fs.ts +21 -0
- package/src/shared/types/index.ts +1 -0
- package/src/shared/types/omp/session.ts +6 -0
- package/src/shared/types/session-changes.ts +58 -0
- package/src/shared/types/settings/state.ts +8 -0
- package/src/test-support/peer-harness.ts +13 -5
- package/dist/client/static/js/ImageView-ksx9bbct.js +0 -1
- package/dist/client/static/js/LayoutWrapper-9ftz050x.js +0 -2
- package/dist/client/static/js/Modal-f8x3j3be.js +0 -38
- package/dist/client/static/js/SessionsView-wzdf1cp6.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-4wsd6vk0.js +0 -1
- package/dist/client/static/js/bash-h6pkqvth.js +0 -1
- package/dist/client/static/js/c-thbdzmwv.js +0 -1
- package/dist/client/static/js/cpp-r1za1kke.js +0 -1
- package/dist/client/static/js/css-qsv4vvke.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-eycwde8c.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-srqbnmey.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-yj98317w.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-5jcrvn94.js +0 -1
- package/dist/client/static/js/graphql-275pg7ya.js +0 -1
- package/dist/client/static/js/index-b08zd4eq.js +0 -1
- package/dist/client/static/js/index-g0pkzanm.js +0 -2
- package/dist/client/static/js/index-ga2xdef3.js +0 -2
- package/dist/client/static/js/index-r416e9dt.js +0 -12
- package/dist/client/static/js/index-xzfsaqyz.js +0 -4
- package/dist/client/static/js/info-A6RAGUB7-mbt0ryx5.js +0 -1
- package/dist/client/static/js/ini-jqdrx98c.js +0 -1
- package/dist/client/static/js/java-70zqqrkr.js +0 -1
- package/dist/client/static/js/json-kxk8gfet.js +0 -1
- package/dist/client/static/js/jsx-h1035eqk.js +0 -1
- package/dist/client/static/js/lua-j2356waf.js +0 -1
- package/dist/client/static/js/markdown-ffw6rgk6.js +0 -1
- package/dist/client/static/js/one-dark-pro-8acf6cn2.js +0 -1
- package/dist/client/static/js/one-light-ysc1knem.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-a5yw789s.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-x0y4v4r2.js +0 -1
- package/dist/client/static/js/properties-55mrarxr.js +0 -1
- package/dist/client/static/js/python-dhypc3j4.js +0 -1
- package/dist/client/static/js/r-6b8dt1wp.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-trrc3ta1.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-dxgvx21w.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-rbgkd8sk.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-exgw7j47.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-28tpamzk.js +0 -1
- package/dist/client/static/js/sql-9dq913c8.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-0x2ashav.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-1a00b6kc.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-2q4f2f7m.js +0 -1
- package/dist/client/static/js/tsx-wh5xgm7f.js +0 -1
- package/dist/client/static/js/typescript-ge85req5.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-x9v91the.js +0 -1
- package/dist/client/static/js/xml-7bgz40qa.js +0 -1
- package/dist/client/static/js/yaml-4ht9416k.js +0 -1
- package/src/client/components/layout/session-sidebar/new-session-context.test.ts +0 -55
|
@@ -59,6 +59,7 @@ function telemetryAt(percent: number): SessionContextTelemetry {
|
|
|
59
59
|
assistantCount: 3,
|
|
60
60
|
totalCost: 0.02,
|
|
61
61
|
costFormatted: '$0.02',
|
|
62
|
+
timing: { llmMs: 5000, toolMs: 1500, ttftAvgMs: 750, lastTps: 50, avgTps: 48.2 },
|
|
62
63
|
cacheHitAverage: 91.5,
|
|
63
64
|
lastMessage: { input: 10, output: 4, reasoning: 0, cacheRead: 2, cacheWrite: 0, cacheHitPercent: 16.6 },
|
|
64
65
|
distribution: { userTokens: 1, userPercent: 25, assistantTokens: 1, assistantPercent: 25, toolTokens: 1, toolPercent: 25, otherTokens: 1, otherPercent: 25 },
|
|
@@ -204,6 +205,16 @@ describe('ContextUsageButton', () => {
|
|
|
204
205
|
expect(panel?.textContent).toContain('DeepSeek V4-1-Flash');
|
|
205
206
|
expect(panel?.textContent).toContain('42%');
|
|
206
207
|
expect(panel?.textContent).toContain('$0.02');
|
|
208
|
+
expect(panel?.textContent).toContain('Turns / steps:');
|
|
209
|
+
expect(panel?.textContent).toContain('1 / 3');
|
|
210
|
+
expect(panel?.textContent).toContain('LLM time:');
|
|
211
|
+
expect(panel?.textContent).toContain('5.0s');
|
|
212
|
+
expect(panel?.textContent).toContain('Tool time:');
|
|
213
|
+
expect(panel?.textContent).toContain('1.5s');
|
|
214
|
+
expect(panel?.textContent).toContain('TTFT avg:');
|
|
215
|
+
expect(panel?.textContent).toContain('0.8s');
|
|
216
|
+
expect(panel?.textContent).toContain('Tok/s:');
|
|
217
|
+
expect(panel?.textContent).toContain('50.0 / 48.2');
|
|
207
218
|
|
|
208
219
|
await act(async () => {
|
|
209
220
|
document.dispatchEvent(new window.KeyboardEvent('keydown', { key: 'Escape' }));
|
|
@@ -211,6 +222,21 @@ describe('ContextUsageButton', () => {
|
|
|
211
222
|
expect(dialog()).toBeNull();
|
|
212
223
|
});
|
|
213
224
|
|
|
225
|
+
test('omits timing rows the source never measured', async () => {
|
|
226
|
+
// An ACP chat reports no per-call timing; printing "0s" would state a
|
|
227
|
+
// measurement the source never made.
|
|
228
|
+
await mount({ ...telemetryAt(42), timing: undefined });
|
|
229
|
+
await act(async () => {
|
|
230
|
+
trigger().click();
|
|
231
|
+
});
|
|
232
|
+
const panel = dialog();
|
|
233
|
+
expect(panel?.textContent).toContain('Turns / steps:');
|
|
234
|
+
expect(panel?.textContent).not.toContain('LLM time:');
|
|
235
|
+
expect(panel?.textContent).not.toContain('Tool time:');
|
|
236
|
+
expect(panel?.textContent).not.toContain('TTFT avg:');
|
|
237
|
+
expect(panel?.textContent).not.toContain('Tok/s:');
|
|
238
|
+
});
|
|
239
|
+
|
|
214
240
|
test('a session with no turn says so instead of printing zeros', async () => {
|
|
215
241
|
await mount({ ...telemetryAt(0), messagesCount: 0 });
|
|
216
242
|
expect(trigger().getAttribute('title')).toBe('Context usage: session not started');
|
|
@@ -42,6 +42,7 @@ import { formatCompactTokens } from '@/shared/lib/format/number';
|
|
|
42
42
|
import { CONTEXT_BAND_TONES, contextUsageBand } from '@/shared/lib/chat/context/usage';
|
|
43
43
|
import { ContextRing } from '@/client/components/common/context-usage-button/Ring';
|
|
44
44
|
import { McpSection } from '@/client/components/common/context-usage-button/McpSection';
|
|
45
|
+
import { SessionStats } from '@/client/components/common/context-usage-button/SessionStats';
|
|
45
46
|
import { CONTROL_BOX } from '@/client/lib/ui/control-plate';
|
|
46
47
|
|
|
47
48
|
interface ContextUsageButtonProps {
|
|
@@ -127,36 +128,43 @@ export function ContextUsageButton({ sessionId, layout = 'desktop' }: ContextUsa
|
|
|
127
128
|
{!started || !telemetry ? (
|
|
128
129
|
<div className="pt-2 text-[11px] text-ink/50 italic font-sans">Session not started</div>
|
|
129
130
|
) : (
|
|
130
|
-
|
|
131
|
-
<div className="
|
|
132
|
-
<
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
<
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
<
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
<span className="text-ink/50">Messages:</span>
|
|
147
|
-
<span>{telemetry.messagesCount}</span>
|
|
148
|
-
</div>
|
|
149
|
-
<div className="flex justify-between">
|
|
150
|
-
<span className="text-ink/50">Cost:</span>
|
|
151
|
-
<span>{telemetry.costFormatted}</span>
|
|
152
|
-
</div>
|
|
153
|
-
{typeof telemetry.cacheHitAverage === 'number' && (
|
|
131
|
+
<>
|
|
132
|
+
<div className="pt-2 space-y-1.5 text-[11px] text-ink/80">
|
|
133
|
+
<div className="flex justify-between gap-2">
|
|
134
|
+
<span className="text-ink/50 flex-shrink-0">Provider:</span>
|
|
135
|
+
<span className="truncate text-right">{providerName || '–'}</span>
|
|
136
|
+
</div>
|
|
137
|
+
<div className="flex justify-between gap-2">
|
|
138
|
+
<span className="text-ink/50 flex-shrink-0">Model:</span>
|
|
139
|
+
<span className="truncate text-right">{modelName || '–'}</span>
|
|
140
|
+
</div>
|
|
141
|
+
<div className="flex justify-between">
|
|
142
|
+
<span className="text-ink/50">Context:</span>
|
|
143
|
+
<span>
|
|
144
|
+
{formatCompactTokens(telemetry.contextUsed) ?? '0'} / {formatCompactTokens(telemetry.contextLimit) ?? '0'} ({percent}%)
|
|
145
|
+
</span>
|
|
146
|
+
</div>
|
|
154
147
|
<div className="flex justify-between">
|
|
155
|
-
<span className="text-ink/50">
|
|
156
|
-
<span>{telemetry.
|
|
148
|
+
<span className="text-ink/50">Messages:</span>
|
|
149
|
+
<span>{telemetry.messagesCount}</span>
|
|
157
150
|
</div>
|
|
158
|
-
|
|
159
|
-
|
|
151
|
+
<div className="flex justify-between">
|
|
152
|
+
<span className="text-ink/50">Cost:</span>
|
|
153
|
+
<span>{telemetry.costFormatted}</span>
|
|
154
|
+
</div>
|
|
155
|
+
{typeof telemetry.cacheHitAverage === 'number' && (
|
|
156
|
+
<div className="flex justify-between">
|
|
157
|
+
<span className="text-ink/50">Cache hit:</span>
|
|
158
|
+
<span>{telemetry.cacheHitAverage.toFixed(1)}%</span>
|
|
159
|
+
</div>
|
|
160
|
+
)}
|
|
161
|
+
</div>
|
|
162
|
+
<SessionStats
|
|
163
|
+
turns={telemetry.userCount}
|
|
164
|
+
steps={telemetry.assistantCount}
|
|
165
|
+
timing={telemetry.timing}
|
|
166
|
+
/>
|
|
167
|
+
</>
|
|
160
168
|
)}
|
|
161
169
|
{/* The session's MCP servers, below the context numbers: one popover
|
|
162
170
|
for "what this chat is running with", and the switch is per
|
|
@@ -68,4 +68,12 @@ zcode: { ink: [0, 2, 24, 20], body: "<path d=\"M12.105 2L9.927 4.953H.653L2.83 2
|
|
|
68
68
|
jcode: { ink: [52, 52, 408, 408], body: "<path fill-rule=\"evenodd\" d=\"M256 52a204 204 0 1 0 0 408a204 204 0 1 0 0-408zM256 156a100 100 0 1 0 0 200a100 100 0 1 0 0-200z\"></path>" },
|
|
69
69
|
// Grok's own mark from @lobehub/icons-static-svg (monochrome variant).
|
|
70
70
|
grok: { ink: [0, 0, 24, 24], body: "<path d=\"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815\"></path>" },
|
|
71
|
+
// Hermes Agent's own mark: Nous Research's "nous girl" portrait, from
|
|
72
|
+
// `assets/nous-girl-black.svg` in NousResearch/hermes-agent. The vendor ships no
|
|
73
|
+
// compact monochrome logo — the source is one 115 KB path of 59 contours — so it
|
|
74
|
+
// was flattened and simplified (Douglas–Peucker, 20/5159 units) to the same
|
|
75
|
+
// 24-unit box every other mark uses, and drawn even-odd because the face is a
|
|
76
|
+
// HOLE in the hair contour. Trademark of Nous Research, not covered by this
|
|
77
|
+
// project's licence.
|
|
78
|
+
hermes: { ink: [0, 0, 22.26, 24], body: "<path fill-rule=\"evenodd\" d=\"M11.42 0.00L10.00 0.14L8.30 0.52L5.77 1.54L3.39 3.12L2.54 3.98L1.99 4.78L1.14 6.85L0.98 8.79L1.33 9.89L1.96 10.68L2.64 11.11L3.30 11.31L2.81 10.82L2.45 9.93L2.88 10.57L3.57 11.15L3.08 15.96L2.79 17.48L2.32 18.32L2.01 18.47L1.50 18.47L0.88 18.00L0.66 16.98L0.93 16.03L0.27 16.99L0.18 18.26L0.40 18.90L0.76 19.37L1.30 19.70L1.89 19.79L2.42 19.69L3.08 19.33L4.04 18.16L3.84 18.90L3.38 19.61L2.79 20.08L2.07 20.23L1.34 20.05L0.63 19.57L0.23 18.99L0.01 18.09L0.18 19.54L0.91 20.55L2.34 21.24L2.58 21.98L3.21 22.50L3.85 22.61L4.50 22.50L5.06 22.10L5.52 21.47L5.05 22.97L4.23 24.00L6.99 24.00L7.66 23.66L7.46 24.00L7.98 23.67L7.88 24.00L8.28 24.00L9.29 22.81L8.39 24.00L9.05 24.00L10.30 22.70L10.22 23.07L13.47 21.21L10.99 24.00L11.58 24.00L12.27 22.66L12.96 21.91L13.93 21.33L15.32 20.92L14.40 21.30L13.35 22.14L12.77 22.88L12.27 24.00L12.83 24.00L13.40 22.88L14.57 21.83L15.51 21.36L16.28 21.26L17.59 21.46L18.42 21.88L19.28 22.82L19.67 24.00L19.95 24.00L19.66 22.95L19.00 21.99L18.06 21.31L16.62 20.90L18.01 21.06L18.92 21.58L19.75 22.61L20.14 24.00L20.36 24.00L20.45 23.32L21.47 22.39L21.89 21.65L22.19 20.48L22.24 19.01L21.81 16.37L19.30 6.11L18.08 3.45L17.30 2.46L16.37 1.62L15.35 0.97L14.15 0.47L12.57 0.08L11.42 0.00ZM9.44 0.47L10.37 0.55L11.37 0.91L12.20 1.45L12.99 2.22L13.83 3.41L14.48 4.81L14.94 6.50L14.65 6.97L15.65 7.67L14.60 7.11L14.50 6.74L14.78 6.54L14.77 6.32L14.69 6.14L14.50 6.12L13.60 6.36L13.61 6.68L13.91 6.78L13.90 7.17L13.32 7.90L13.81 7.06L13.44 6.74L12.82 4.52L11.99 3.05L10.73 1.83L9.79 1.27L8.95 1.01L8.01 0.95L6.84 1.12L8.33 0.60L9.44 0.47ZM6.80 1.12L6.80 1.12ZM17.19 2.53L18.04 3.54L18.60 4.57L19.19 6.07L19.60 7.71L18.66 4.87L17.69 3.25L17.84 3.56L17.87 4.40L17.63 4.17L18.27 5.61L17.53 4.33L17.62 4.75L17.42 4.50L17.40 4.67L17.99 6.33L17.39 5.10L16.94 4.54L17.74 6.53L16.78 4.56L16.44 4.83L15.48 4.47L16.64 7.12L18.21 12.16L18.63 14.04L18.85 15.92L18.20 12.56L16.37 6.66L15.50 4.90L15.61 5.35L15.08 4.77L14.55 4.68L14.43 4.40L15.08 4.44L14.95 3.60L15.37 4.25L16.21 4.41L16.49 4.11L16.05 3.40L16.51 3.91L16.56 3.72L16.95 3.75L16.38 2.85L17.29 3.75L16.83 2.99L17.44 3.79L17.45 3.08L17.19 2.53ZM11.26 2.93L11.84 3.54L12.27 4.32L12.58 4.27L12.83 4.86L12.44 4.68L12.40 4.82L11.63 3.62L11.51 4.00L11.69 4.54L11.43 4.30L11.62 4.96L11.32 4.51L11.27 4.64L11.05 4.58L11.06 4.93L10.86 4.62L10.34 4.60L10.10 4.19L10.42 3.77L10.17 3.29L10.41 3.58L10.74 3.51L10.61 3.00L11.02 3.46L11.41 3.19L11.26 2.93ZM9.27 3.31L9.94 4.13L10.47 5.22L10.59 5.61L10.27 5.30L10.35 6.18L10.01 5.26L9.98 5.97L9.55 5.29L9.65 6.10L9.42 5.48L9.13 5.61L9.15 5.92L8.97 5.64L8.29 5.38L8.20 4.96L8.77 4.69L8.77 4.44L8.93 4.81L9.24 4.53L9.11 3.94L9.51 4.59L9.27 3.31ZM16.04 3.36L16.04 3.36ZM3.60 3.43L3.60 3.43ZM5.51 3.50L4.45 6.18L4.38 5.44L4.00 5.61L3.86 5.89L3.51 5.88L4.45 4.19L3.91 5.35L4.18 5.26L5.51 3.50ZM3.53 3.50L3.53 3.50ZM3.50 3.53L2.46 4.94L1.53 6.97L1.93 5.70L1.77 5.82L1.84 5.55L1.74 5.59L2.03 4.94L3.50 3.53ZM6.68 3.93L6.76 5.81L6.54 5.37L6.54 5.74L6.35 5.39L5.80 5.56L5.72 5.81L5.69 5.55L5.03 5.62L4.84 5.38L5.07 4.70L5.75 4.99L6.04 4.05L5.85 5.05L6.32 4.92L6.68 3.93ZM6.06 3.96L6.06 3.96ZM3.55 4.03L3.09 4.78L3.30 4.83L3.90 4.05L3.28 5.12L3.70 5.07L3.86 4.90L3.20 6.46L3.24 5.96L3.00 6.19L2.89 5.55L2.26 7.13L2.64 5.76L2.13 5.81L2.26 5.43L2.66 4.72L2.99 4.73L3.55 4.03ZM7.87 4.28L8.22 5.76L7.98 5.41L7.09 5.28L7.06 5.54L6.85 4.95L6.82 4.49L7.82 4.61L7.87 4.28ZM3.92 4.74L3.92 4.74ZM3.89 4.79L3.89 4.79ZM12.43 4.84L12.43 4.84ZM11.65 4.97L11.65 4.97ZM18.28 5.64L18.28 5.64ZM18.31 5.72L18.31 5.72ZM6.94 5.94L6.94 5.94ZM6.96 6.02L7.44 7.36L8.15 8.75L7.81 8.78L7.48 8.13L6.96 6.02ZM18.00 6.36L18.00 6.36ZM17.75 6.56L17.75 6.56ZM19.62 7.75L19.63 7.85L19.62 7.75ZM19.65 7.92L19.65 7.92ZM4.69 8.00L4.69 8.00ZM4.71 8.04L5.82 9.27L6.82 9.08L6.44 9.70L8.22 8.87L8.57 9.24L10.35 9.22L10.42 8.64L10.61 9.23L11.53 9.43L11.51 11.61L10.65 16.98L10.73 18.54L10.14 19.08L9.41 17.99L8.80 17.44L6.64 17.62L5.82 17.43L4.61 15.42L4.04 13.77L4.10 12.44L4.26 12.83L4.80 13.46L4.63 14.15L5.12 15.43L5.40 15.63L5.31 15.47L5.76 15.29L5.13 15.30L5.03 15.05L5.19 14.89L6.23 14.89L6.32 14.95L6.06 15.10L6.67 14.90L6.61 14.72L6.32 14.71L5.55 14.31L5.02 14.30L4.79 14.00L4.91 13.47L4.23 12.56L4.24 12.27L4.81 11.75L5.17 10.99L5.11 10.50L4.72 10.06L4.29 9.92L4.96 10.40L4.45 10.26L4.07 10.37L4.97 10.44L5.11 10.81L4.52 10.42L3.97 10.50L3.74 10.01L4.09 9.82L4.60 9.84L4.34 9.59L5.29 9.33L4.71 8.04ZM7.99 9.40L7.13 9.61L6.87 9.98L7.35 9.78L7.02 10.09L7.14 10.09L6.94 10.24L7.14 10.17L6.98 10.44L7.15 10.35L7.16 10.56L7.69 9.98L7.58 10.39L7.75 10.59L7.66 10.68L8.11 11.10L8.39 11.08L8.68 10.85L8.81 10.25L9.30 10.53L9.28 10.64L8.99 11.00L8.43 11.22L7.11 11.09L7.40 11.21L7.39 11.35L8.05 11.36L8.14 11.47L8.22 11.36L8.99 11.34L8.91 11.21L9.25 11.22L9.11 11.08L9.39 11.02L9.24 10.94L9.65 10.81L9.43 10.74L9.78 10.62L9.60 10.57L10.08 10.35L9.72 10.31L9.93 10.18L9.46 10.21L9.47 10.10L8.61 9.67L7.82 9.50L8.35 9.50L9.12 9.79L7.99 9.40ZM7.21 9.60L7.21 9.60ZM7.39 9.63L7.39 9.63ZM7.17 9.64L7.17 9.64ZM7.32 9.66L7.32 9.66ZM7.24 9.69L6.96 9.92L7.24 9.69ZM9.17 9.80L9.17 9.80ZM14.89 10.12L15.37 10.26L15.66 10.56L13.94 10.48L14.33 10.19L14.89 10.12ZM7.16 10.71L7.18 10.84L7.16 10.71ZM4.34 10.75L4.71 11.67L4.55 11.78L4.38 11.79L4.23 11.47L4.20 10.89L4.34 10.75ZM4.20 11.90L4.43 11.96L4.15 12.21L4.20 11.90ZM4.97 12.83L5.39 13.18L5.29 12.94L4.97 12.83ZM17.31 13.98L17.39 15.20L17.28 16.17L17.31 13.98ZM4.77 14.10L4.95 14.40L4.77 14.10ZM5.26 14.29L5.66 14.46L5.19 14.46L5.09 14.37L5.26 14.29ZM5.20 14.53L5.20 14.53ZM5.37 14.60L5.25 14.71L5.37 14.60ZM13.33 14.68L13.48 16.54L12.48 17.18L13.33 14.68ZM19.82 14.70L20.30 17.62L20.06 19.91L20.20 17.88L19.82 14.70ZM5.36 14.93L5.31 15.21L5.36 14.93ZM17.26 16.22L17.26 16.22ZM16.60 16.33L16.60 16.33ZM16.58 16.45L16.34 17.30L16.58 16.45ZM13.57 17.24L13.74 18.19L13.14 18.67L12.64 18.65L12.36 18.03L13.57 17.24ZM16.32 17.32L16.32 17.32ZM16.29 17.41L16.29 17.41ZM5.05 19.04L4.80 20.37L4.23 21.35L3.60 21.71L3.07 21.70L2.74 21.49L2.60 21.27L3.58 21.18L4.21 20.77L4.69 20.04L5.05 19.04ZM10.93 19.12L11.48 20.01L12.81 20.92L11.68 21.67L9.94 22.47L8.83 20.47L9.72 20.25L10.93 19.12ZM20.05 19.98L20.03 20.07L20.05 19.98ZM20.02 20.15L20.02 20.15Z\"></path>" },
|
|
71
79
|
};
|
|
@@ -31,6 +31,7 @@ import { createPortal } from 'preact/compat';
|
|
|
31
31
|
import { placeMenu, type MenuPlacement } from '@/shared/lib/ui/menu-anchor';
|
|
32
32
|
import { Archive, ArchiveRestore, GitBranch, GitFork, Hourglass, Pencil, Trash2, WandSparkles } from 'lucide-preact';
|
|
33
33
|
import { useSearchParams } from '@/client/lib/router/search-params';
|
|
34
|
+
import { clearBranchParams } from '@/client/lib/router/branch-params';
|
|
34
35
|
import { startPendingSession } from '@/client/hooks/chat/omp/pending-sessions';
|
|
35
36
|
import { expandSessionBranch } from '@/client/hooks/workspace/expanded-sessions';
|
|
36
37
|
import { setHarnessPick } from '@/client/hooks/chat/timeline/session-harness';
|
|
@@ -163,7 +164,11 @@ export function SessionActionsMenu({
|
|
|
163
164
|
if (harness) setHarnessPick(pendingId, harness);
|
|
164
165
|
expandSessionBranch(parentId);
|
|
165
166
|
setSearchParams((prev) => {
|
|
166
|
-
|
|
167
|
+
// A fork the user backed out of leaves `forkFrom`/`forkAt` in the URL, and
|
|
168
|
+
// this chat would otherwise be read as that fork (the fork check runs
|
|
169
|
+
// before the child one). Start from a branchless query and set only the
|
|
170
|
+
// parent this child really has.
|
|
171
|
+
const next = clearBranchParams(prev);
|
|
167
172
|
next.set('sessionId', pendingId);
|
|
168
173
|
next.set('parentSessionId', parentId);
|
|
169
174
|
if (folderId !== undefined) next.set('folderId', String(folderId));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useState } from 'preact/hooks';
|
|
2
2
|
import { useSearchParams } from '@/client/lib/router/search-params';
|
|
3
|
+
import { newSessionParams } from '@/client/lib/router/branch-params';
|
|
3
4
|
import { NewWorkspaceModal } from '@/client/components/layout/session-sidebar/Modals';
|
|
4
5
|
import { SchedulerModal } from '@/client/components/layout/session-sidebar/scheduler-modal';
|
|
5
6
|
import { ClassicSidebarView } from '@/client/components/layout/session-sidebar/ClassicView';
|
|
@@ -118,28 +119,21 @@ export function SessionsView({
|
|
|
118
119
|
if (cwd) triggerSessionPrewarm(cwd);
|
|
119
120
|
};
|
|
120
121
|
|
|
122
|
+
/**
|
|
123
|
+
* The sidebar's primary action opens the EMPTY WORKSPACE — the landing, with
|
|
124
|
+
* no query at all.
|
|
125
|
+
*
|
|
126
|
+
* It used to mint a pending `new-…` chat, which made the button inherit the
|
|
127
|
+
* open session's folder and put `?sessionId=new-…&folderId=…` in the URL.
|
|
128
|
+
* That is not empty: the sidebar grew a draft row the user never asked for,
|
|
129
|
+
* and the URL named a chat that did not exist. A landing is the one screen
|
|
130
|
+
* whose contract is "nothing has been chosen yet" — the workspace picker is
|
|
131
|
+
* right there, and the first send spawns the real session from whatever the
|
|
132
|
+
* user picks. Per-folder `+` and New child are different actions and keep
|
|
133
|
+
* their own pending session, because those DO choose a context up front.
|
|
134
|
+
*/
|
|
121
135
|
const handleNewSession = () => {
|
|
122
|
-
|
|
123
|
-
setSearchParams(prev => {
|
|
124
|
-
const currentSessionId = prev.get('sessionId');
|
|
125
|
-
const next = new URLSearchParams(prev);
|
|
126
|
-
// The row this chat will show in the sidebar while omp has not written
|
|
127
|
-
// its transcript yet. The store mints the id (and keeps the row), so the
|
|
128
|
-
// URL carries what the sidebar reads rather than a second source.
|
|
129
|
-
const currentFolder = currentSessionId
|
|
130
|
-
? folders.find(f => f.sessions?.some((s) => String(s.id) === String(currentSessionId)))
|
|
131
|
-
: undefined;
|
|
132
|
-
// The folder the chat will run in: the active session's, else the one the
|
|
133
|
-
// URL already names. Dropping the URL's own `folderId` (the previous
|
|
134
|
-
// `else next.delete`) left a chat opened with `?folderId=` with NO context
|
|
135
|
-
// — its composer then stayed disabled ("Please select a workspace above")
|
|
136
|
-
// and the first send never happened.
|
|
137
|
-
const contextFolderId = currentFolder?.id ?? (prev.get('folderId') ? Number(prev.get('folderId')) : null);
|
|
138
|
-
next.set('sessionId', startPendingSession(contextFolderId));
|
|
139
|
-
if (contextFolderId != null) next.set('folderId', String(contextFolderId));
|
|
140
|
-
else next.delete('folderId');
|
|
141
|
-
return next;
|
|
142
|
-
}, { replace: true });
|
|
136
|
+
setSearchParams(new URLSearchParams(), { replace: true });
|
|
143
137
|
};
|
|
144
138
|
|
|
145
139
|
/**
|
|
@@ -156,22 +150,15 @@ export function SessionsView({
|
|
|
156
150
|
prewarmForNewSession(folderId);
|
|
157
151
|
const pendingId = startPendingSession(folderId);
|
|
158
152
|
setSessionKey(pendingId, 'chat.spawnTarget', { folderId, worktreePath });
|
|
159
|
-
setSearchParams(prev => {
|
|
160
|
-
const next = new URLSearchParams(prev);
|
|
161
|
-
next.set('sessionId', pendingId);
|
|
162
|
-
next.set('folderId', folderId.toString());
|
|
163
|
-
return next;
|
|
164
|
-
}, { replace: true });
|
|
153
|
+
setSearchParams(prev => newSessionParams(prev, pendingId, folderId), { replace: true });
|
|
165
154
|
};
|
|
166
155
|
|
|
167
156
|
const handleNewSessionForFolder = (folderId: number) => {
|
|
168
157
|
prewarmForNewSession(folderId);
|
|
169
|
-
setSearchParams(
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
return next;
|
|
174
|
-
}, { replace: true });
|
|
158
|
+
setSearchParams(
|
|
159
|
+
prev => newSessionParams(prev, startPendingSession(folderId), folderId),
|
|
160
|
+
{ replace: true },
|
|
161
|
+
);
|
|
175
162
|
};
|
|
176
163
|
|
|
177
164
|
const variantProps: SessionSidebarVariantProps = {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { useCallback, useState } from 'preact/hooks';
|
|
2
2
|
import { useSearchParams } from '@/client/lib/router/search-params';
|
|
3
|
+
import { clearBranchParams, newSessionParams } from '@/client/lib/router/branch-params';
|
|
3
4
|
import { useKabmoEvent } from '@/client/hooks/ui/window-event';
|
|
4
5
|
import { useMobileBackStack } from '@/client/hooks/workspace/mobile-back';
|
|
5
|
-
import type { SettingsCategoryId } from '@/shared/types';
|
|
6
|
+
import type { JournalDiffRef, SettingsCategoryId } from '@/shared/types';
|
|
6
7
|
import { MobileMainView } from '@/client/components/mobile/MainView';
|
|
7
8
|
import { WindowAura } from '@/client/components/layout/WindowAura';
|
|
8
9
|
import { ShellNotice } from '@/client/components/layout/ShellNotice';
|
|
@@ -49,7 +50,7 @@ export function MobileLayoutWrapper({ onDesktopToggle, appSettings = {} }: Mobil
|
|
|
49
50
|
|
|
50
51
|
const [currentScreen, setCurrentScreen] = useState<MobileScreen>('main');
|
|
51
52
|
const [mobileEditorFile, setMobileEditorFile] = useState<MobileEditorFile | null>(null);
|
|
52
|
-
const [mobileDiff, setMobileDiff] = useState<{ path: string; status?: string; staged?: boolean; repo?: string; root?: string } | null>(null);
|
|
53
|
+
const [mobileDiff, setMobileDiff] = useState<{ path: string; status?: string; staged?: boolean; repo?: string; root?: string; journal?: JournalDiffRef } | null>(null);
|
|
53
54
|
// Bumped whenever a write lands so the workspace panels (explorer, git,
|
|
54
55
|
// context) re-read from disk — the same signal the desktop layout passes down.
|
|
55
56
|
const [refreshKey, setRefreshKey] = useState(0);
|
|
@@ -120,7 +121,15 @@ export function MobileLayoutWrapper({ onDesktopToggle, appSettings = {} }: Mobil
|
|
|
120
121
|
// phone the same event opens the full-screen diff; without a listener here
|
|
121
122
|
// the tap was silently dropped.
|
|
122
123
|
useKabmoEvent('omp:open-diff', (e) => {
|
|
123
|
-
const detail = (e as CustomEvent<{
|
|
124
|
+
const detail = (e as CustomEvent<{
|
|
125
|
+
file?: string;
|
|
126
|
+
status?: string;
|
|
127
|
+
staged?: boolean;
|
|
128
|
+
repo?: string;
|
|
129
|
+
root?: string;
|
|
130
|
+
source?: 'journal';
|
|
131
|
+
journal?: JournalDiffRef;
|
|
132
|
+
}>).detail;
|
|
124
133
|
if (!detail?.file) return;
|
|
125
134
|
setMobileDiff({
|
|
126
135
|
path: detail.file.replace(/^\/+/, ''),
|
|
@@ -128,6 +137,7 @@ export function MobileLayoutWrapper({ onDesktopToggle, appSettings = {} }: Mobil
|
|
|
128
137
|
staged: detail.staged,
|
|
129
138
|
repo: detail.repo,
|
|
130
139
|
root: detail.root ?? activeProjectPath ?? undefined,
|
|
140
|
+
...(detail.source === 'journal' && detail.journal ? { journal: detail.journal } : {}),
|
|
131
141
|
});
|
|
132
142
|
});
|
|
133
143
|
|
|
@@ -170,32 +180,23 @@ export function MobileLayoutWrapper({ onDesktopToggle, appSettings = {} }: Mobil
|
|
|
170
180
|
|
|
171
181
|
const handleSelectSession = (id: number | string) => {
|
|
172
182
|
setSearchParams(prev => {
|
|
173
|
-
|
|
183
|
+
// The branch hints describe a pending draft. A real session selected here
|
|
184
|
+
// is not that draft, and the next New Session must not inherit them.
|
|
185
|
+
const next = clearBranchParams(prev);
|
|
186
|
+
next.set('sessionId', id.toString());
|
|
174
187
|
// Navigating away from a session must also exit its transcript view.
|
|
175
|
-
if (
|
|
176
|
-
return
|
|
188
|
+
if (next.has('subagent')) next.delete('subagent');
|
|
189
|
+
return next;
|
|
177
190
|
}, { replace: true });
|
|
178
191
|
setCurrentScreen('main');
|
|
179
192
|
};
|
|
180
193
|
|
|
181
|
-
//
|
|
182
|
-
//
|
|
183
|
-
//
|
|
194
|
+
// The drawer's primary action mirrors the desktop's: open the EMPTY
|
|
195
|
+
// WORKSPACE — the landing, with a clean URL. A pending `new-…` chat would
|
|
196
|
+
// name a session in the URL and grow a sidebar row before anything was
|
|
197
|
+
// chosen; the landing's own workspace picker is where the choice belongs.
|
|
184
198
|
const handleNewSession = () => {
|
|
185
|
-
|
|
186
|
-
// URL folderId) so the prewarmed cwd matches the eventual spawn cwd.
|
|
187
|
-
const cwd = spawnCwdForNewSession(folders, sessionParam, folderId ?? undefined);
|
|
188
|
-
if (cwd) triggerSessionPrewarm(cwd);
|
|
189
|
-
setSearchParams(prev => {
|
|
190
|
-
const currentSessionId = prev.get('sessionId');
|
|
191
|
-
const next = new URLSearchParams(prev);
|
|
192
|
-
const currentFolder = currentSessionId
|
|
193
|
-
? folders.find(f => f.sessions?.some((s) => String(s.id) === String(currentSessionId)))
|
|
194
|
-
: undefined;
|
|
195
|
-
next.set('sessionId', startPendingSession(currentFolder?.id ?? folderId ?? null));
|
|
196
|
-
if (currentFolder) next.set('folderId', currentFolder.id.toString());
|
|
197
|
-
return next;
|
|
198
|
-
}, { replace: true });
|
|
199
|
+
setSearchParams(new URLSearchParams(), { replace: true });
|
|
199
200
|
setCurrentScreen('main');
|
|
200
201
|
};
|
|
201
202
|
|
|
@@ -205,12 +206,10 @@ export function MobileLayoutWrapper({ onDesktopToggle, appSettings = {} }: Mobil
|
|
|
205
206
|
const handleNewSessionForFolder = (targetFolderId: number) => {
|
|
206
207
|
const cwd = spawnCwdForNewSession(folders, sessionParam, targetFolderId);
|
|
207
208
|
if (cwd) triggerSessionPrewarm(cwd);
|
|
208
|
-
setSearchParams(
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
return next;
|
|
213
|
-
}, { replace: true });
|
|
209
|
+
setSearchParams(
|
|
210
|
+
prev => newSessionParams(prev, startPendingSession(targetFolderId), targetFolderId),
|
|
211
|
+
{ replace: true },
|
|
212
|
+
);
|
|
214
213
|
setCurrentScreen('main');
|
|
215
214
|
};
|
|
216
215
|
|
|
@@ -2,8 +2,9 @@ import { ArrowLeft } from 'lucide-preact';
|
|
|
2
2
|
import { FileIcon } from '@/client/components/common/file-icon';
|
|
3
3
|
import { DiffPanel } from '@/client/components/workspace/diff-panel';
|
|
4
4
|
import { getGitStatusInfo } from '@/shared/lib/fs/git-status';
|
|
5
|
-
import { diffTabId } from '@/shared/lib/workspace/file-tab-id';
|
|
5
|
+
import { diffTabId, journalDiffTabId } from '@/shared/lib/workspace/file-tab-id';
|
|
6
6
|
import { titlebarPaddingLeft, titlebarPaddingRight } from '@/shared/lib/ui/titlebar';
|
|
7
|
+
import type { JournalDiffRef } from '@/shared/types/fs';
|
|
7
8
|
|
|
8
9
|
interface MobileFullDiffProps {
|
|
9
10
|
diff: {
|
|
@@ -12,6 +13,8 @@ interface MobileFullDiffProps {
|
|
|
12
13
|
staged?: boolean;
|
|
13
14
|
repo?: string;
|
|
14
15
|
root?: string;
|
|
16
|
+
/** Present when the two sides come from the agent change journal. */
|
|
17
|
+
journal?: JournalDiffRef;
|
|
15
18
|
};
|
|
16
19
|
onClose: () => void;
|
|
17
20
|
onFileSaved?: () => void;
|
|
@@ -77,10 +80,14 @@ export function MobileFullDiff({ diff, onClose, onFileSaved }: MobileFullDiffPro
|
|
|
77
80
|
isStaged={isStaged}
|
|
78
81
|
root={diff.root}
|
|
79
82
|
repo={diff.repo || '.'}
|
|
83
|
+
journalDiff={diff.journal}
|
|
84
|
+
readOnly={Boolean(diff.journal)}
|
|
80
85
|
onFileSaved={onFileSaved}
|
|
81
86
|
// The same id a desktop diff tab uses for this path+staged pair, so a
|
|
82
87
|
// diff read on the phone and one read on the desktop share an offset.
|
|
83
|
-
tabKey={
|
|
88
|
+
tabKey={diff.journal
|
|
89
|
+
? journalDiffTabId(diff.journal.path, diff.journal.from, diff.journal.to)
|
|
90
|
+
: diffTabId(diff.path, isStaged)}
|
|
84
91
|
/>
|
|
85
92
|
</div>
|
|
86
93
|
</div>
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import { startPendingSession } from '@/client/hooks/chat/omp/pending-sessions';
|
|
21
|
+
import { clearBranchParams } from '@/client/lib/router/branch-params';
|
|
21
22
|
import { triggerSessionPrewarm } from '@/shared/lib/omp/session/prewarm';
|
|
22
23
|
import { setSessionKey } from '@/shared/lib/workspace/session-state/store';
|
|
23
24
|
import { SPAWN_TARGET_KEY } from '@/client/hooks/chat/timeline/spawn-target';
|
|
@@ -41,7 +42,9 @@ export function startWorktreeSession(
|
|
|
41
42
|
const pendingId = startPendingSession(folderId);
|
|
42
43
|
setSessionKey(pendingId, SPAWN_TARGET_KEY, { folderId, worktreePath });
|
|
43
44
|
deps.setSearchParams((prev) => {
|
|
44
|
-
|
|
45
|
+
// A worktree chat is top-level; a fork the user backed out of left its
|
|
46
|
+
// source hints in the URL, and this chat would be drawn as that fork.
|
|
47
|
+
const next = clearBranchParams(prev);
|
|
45
48
|
next.set('sessionId', pendingId);
|
|
46
49
|
next.set('folderId', folderId.toString());
|
|
47
50
|
return next;
|
|
@@ -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 { CHANGED_FILES_CHANGED_EVENT } from '@/client/hooks/chat/timeline/changed-files-setting';
|
|
26
27
|
import { EDITOR_FONT_CHANGED_EVENT } from '@/client/hooks/editor/font';
|
|
27
28
|
import type { SettingsState } from '@/shared/types';
|
|
28
29
|
|
|
@@ -76,6 +77,16 @@ describe('applySettingsSideEffects', () => {
|
|
|
76
77
|
expect(seen).toEqual([]);
|
|
77
78
|
});
|
|
78
79
|
|
|
80
|
+
test('announces the changed-files toggle so the open timeline redraws', () => {
|
|
81
|
+
const win = installDom();
|
|
82
|
+
const seen: unknown[] = [];
|
|
83
|
+
win.addEventListener(CHANGED_FILES_CHANGED_EVENT, (event) => seen.push((event as unknown as CustomEvent).detail));
|
|
84
|
+
|
|
85
|
+
applySettingsSideEffects(state(), state({ showChangedFiles: false }));
|
|
86
|
+
|
|
87
|
+
expect(seen).toEqual([false]);
|
|
88
|
+
});
|
|
89
|
+
|
|
79
90
|
test('an unrelated edit announces nothing at all', () => {
|
|
80
91
|
const win = installDom();
|
|
81
92
|
const events: string[] = [];
|
|
@@ -31,6 +31,7 @@ import type { SettingsState } from '@/shared/types';
|
|
|
31
31
|
import { applyDocumentTheme } from '@/client/hooks/ui/theme';
|
|
32
32
|
import { applyChatWidthMode } from '@/client/hooks/chat/timeline/width-mode';
|
|
33
33
|
import { applyToolRenderMode } from '@/client/hooks/chat/timeline/tool-render-mode';
|
|
34
|
+
import { applyShowChangedFiles } from '@/client/hooks/chat/timeline/changed-files-setting';
|
|
34
35
|
import { applySidebarStyle } from '@/client/hooks/workspace/sidebar-style';
|
|
35
36
|
import { applyComposerStyle } from '@/client/hooks/chat/composer/style';
|
|
36
37
|
import { applySurfaceStyle } from '@/client/hooks/ui/surface-style';
|
|
@@ -75,6 +76,12 @@ export function applySettingsSideEffects(previous: SettingsState, next: Settings
|
|
|
75
76
|
applyToolRenderMode(next.toolRenderStyle);
|
|
76
77
|
}
|
|
77
78
|
|
|
79
|
+
// The changed-files list is a Preact subtree above each run footer, so the
|
|
80
|
+
// open timeline has to hear about the change now.
|
|
81
|
+
if (next.showChangedFiles !== previous.showChangedFiles) {
|
|
82
|
+
applyShowChangedFiles(next.showChangedFiles);
|
|
83
|
+
}
|
|
84
|
+
|
|
78
85
|
// The sidebar style picks a Preact tree for the whole left column, and the
|
|
79
86
|
// sidebar is visible BEHIND this modal — so this is the one setting whose
|
|
80
87
|
// effect the user watches happen.
|
|
@@ -94,7 +94,7 @@ describe('ChatSettings master/detail', () => {
|
|
|
94
94
|
|
|
95
95
|
act(() => groupRow('Transcript').click());
|
|
96
96
|
|
|
97
|
-
expect(headings()).toEqual(['Tool Calls', 'Follow-up Dispatch']);
|
|
97
|
+
expect(headings()).toEqual(['Tool Calls', 'Changed Files', 'Follow-up Dispatch']);
|
|
98
98
|
expect(groupRow('Transcript').getAttribute('aria-current')).toBe('true');
|
|
99
99
|
expect(updates).toBe(0);
|
|
100
100
|
});
|
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
import { ChatLayoutSection } from '@/client/components/settings/categories/chat-settings/LayoutSection';
|
|
34
34
|
import { ComposerStyleSection } from '@/client/components/settings/categories/chat-settings/ComposerStyleSection';
|
|
35
35
|
import { ChatToolRenderSection } from '@/client/components/settings/categories/chat-settings/ToolRenderSection';
|
|
36
|
+
import { ChatChangedFilesSection } from '@/client/components/settings/categories/chat-settings/ChangedFilesSection';
|
|
36
37
|
import { ChatFollowUpSection } from '@/client/components/settings/categories/chat-settings/FollowUpSection';
|
|
37
38
|
import { ChatTitleSection } from '@/client/components/settings/categories/chat-settings/TitleSection';
|
|
38
39
|
import { ChatGoalSection } from '@/client/components/settings/categories/chat-settings/GoalSection';
|
|
@@ -49,6 +50,7 @@ const SECTIONS: Record<ChatSectionId, (props: SectionProps) => ComponentChildren
|
|
|
49
50
|
width: ChatLayoutSection,
|
|
50
51
|
composer: ComposerStyleSection,
|
|
51
52
|
'tool-calls': ChatToolRenderSection,
|
|
53
|
+
'changed-files': ChatChangedFilesSection,
|
|
52
54
|
'follow-up': ChatFollowUpSection,
|
|
53
55
|
titles: ChatTitleSection,
|
|
54
56
|
goal: ChatGoalSection,
|
|
@@ -209,7 +209,7 @@ export function NotificationSettings({ settings, onUpdate }: NotificationSetting
|
|
|
209
209
|
<div className="pt-3 border-t border-ink/10 flex items-center justify-between">
|
|
210
210
|
<span className="text-[11px] text-ink/60 flex items-center gap-1.5">
|
|
211
211
|
<Sparkles size={13} className="text-ink/60" />
|
|
212
|
-
Warm
|
|
212
|
+
Warm two-tone chime — the app's system notification plays it; a browser plays it here
|
|
213
213
|
</span>
|
|
214
214
|
|
|
215
215
|
<button
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Settings → Chats → Transcript → Changed files.
|
|
8
|
+
*
|
|
9
|
+
* One switch over the collapsed "N files changed" list above each run footer.
|
|
10
|
+
* The list is read from the session's agent change journal, so turning it off
|
|
11
|
+
* also stops the read — a reader who does not want the summary pays neither the
|
|
12
|
+
* request nor the space.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { FileDiff } from 'lucide-preact';
|
|
16
|
+
import type { SettingsState } from '@/shared/types';
|
|
17
|
+
|
|
18
|
+
interface ChatChangedFilesSectionProps {
|
|
19
|
+
settings: SettingsState;
|
|
20
|
+
onUpdate: (updater: Partial<SettingsState> | ((prev: SettingsState) => SettingsState)) => void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function Switch({ label, enabled, onToggle }: { label: string; enabled: boolean; onToggle: () => void }) {
|
|
24
|
+
return (
|
|
25
|
+
<button
|
|
26
|
+
type="button"
|
|
27
|
+
role="switch"
|
|
28
|
+
aria-checked={enabled}
|
|
29
|
+
aria-label={`${enabled ? 'Disable' : 'Enable'} ${label}`}
|
|
30
|
+
onClick={onToggle}
|
|
31
|
+
className={`relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none ${
|
|
32
|
+
enabled ? 'bg-ink' : 'bg-ink/20'
|
|
33
|
+
}`}
|
|
34
|
+
>
|
|
35
|
+
<span
|
|
36
|
+
aria-hidden="true"
|
|
37
|
+
className={`pointer-events-none inline-block h-5 w-5 transform rounded-full bg-paper shadow ring-0 transition duration-200 ease-in-out ${
|
|
38
|
+
enabled ? 'translate-x-5' : 'translate-x-0'
|
|
39
|
+
}`}
|
|
40
|
+
/>
|
|
41
|
+
</button>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function ChatChangedFilesSection({ settings, onUpdate }: ChatChangedFilesSectionProps) {
|
|
46
|
+
const enabled = settings.showChangedFiles;
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<section className="space-y-3">
|
|
50
|
+
<div>
|
|
51
|
+
<h4 className="text-sm font-semibold text-ink">Changed Files</h4>
|
|
52
|
+
<p className="text-[11px] text-ink/60 mt-0.5">
|
|
53
|
+
A collapsed list of the files a run changed, above its footer. Clicking a file opens the
|
|
54
|
+
agent's own diff — the content it wrote, not the current worktree.
|
|
55
|
+
</p>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<div className="flex items-start justify-between gap-4 py-3">
|
|
59
|
+
<div className="flex items-start gap-3">
|
|
60
|
+
<div className="w-8 h-8 rounded-md bg-ink/5 border border-ink/10 flex items-center justify-center flex-shrink-0 mt-0.5">
|
|
61
|
+
<FileDiff size={16} className={enabled ? 'text-ink' : 'text-ink/40'} />
|
|
62
|
+
</div>
|
|
63
|
+
<div>
|
|
64
|
+
<div className="text-sm font-semibold text-ink">Show changed files</div>
|
|
65
|
+
<p className="text-ink/65 text-[11px] mt-1 leading-relaxed">
|
|
66
|
+
Read from the session's change journal. Sessions recorded before omp 18.20.1 have
|
|
67
|
+
no journal, so the list stays empty there.
|
|
68
|
+
</p>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<Switch
|
|
72
|
+
label="Show changed files"
|
|
73
|
+
enabled={enabled}
|
|
74
|
+
onToggle={() => onUpdate({ showChangedFiles: !enabled })}
|
|
75
|
+
/>
|
|
76
|
+
</div>
|
|
77
|
+
</section>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
@@ -23,6 +23,7 @@ export const CHAT_SECTION_IDS = [
|
|
|
23
23
|
'width',
|
|
24
24
|
'composer',
|
|
25
25
|
'tool-calls',
|
|
26
|
+
'changed-files',
|
|
26
27
|
'follow-up',
|
|
27
28
|
'titles',
|
|
28
29
|
'goal',
|
|
@@ -55,11 +56,11 @@ export const CHAT_SETTING_GROUPS: readonly ChatSettingGroup[] = [
|
|
|
55
56
|
{
|
|
56
57
|
id: 'transcript',
|
|
57
58
|
label: 'Transcript',
|
|
58
|
-
hint: 'Tool calls and follow-up dispatch',
|
|
59
|
+
hint: 'Tool calls, changed files and follow-up dispatch',
|
|
59
60
|
description:
|
|
60
|
-
'How a tool call is drawn, and what happens to a prompt sent while the agent is still running.',
|
|
61
|
+
'How a tool call is drawn, whether a run lists the files it changed, and what happens to a prompt sent while the agent is still running.',
|
|
61
62
|
icon: ListOrdered,
|
|
62
|
-
sections: ['tool-calls', 'follow-up'],
|
|
63
|
+
sections: ['tool-calls', 'changed-files', 'follow-up'],
|
|
63
64
|
},
|
|
64
65
|
{
|
|
65
66
|
id: 'sessions',
|