@kabmo-labs/kabmo 0.32.1 → 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.
Files changed (266) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +542 -535
  3. package/dist/client/static/js/{CsvGrid-4gx0jevc.js → CsvGrid-fncjbg6j.js} +2 -2
  4. package/dist/client/static/js/{DocxView-0667nr8h.js → DocxView-c9v2vr3r.js} +2 -2
  5. package/dist/client/static/js/{DrawioView-522v0d0r.js → DrawioView-vxjksm12.js} +2 -2
  6. package/dist/client/static/js/{ImageView-t8xp60hm.js → ImageView-a3g5k226.js} +1 -1
  7. package/dist/client/static/js/LayoutWrapper-hnjfwsjh.js +2 -0
  8. package/dist/client/static/js/Modal-qtftcp2t.js +38 -0
  9. package/dist/client/static/js/{PdfView-3fx172xh.js → PdfView-ksaes53y.js} +1 -1
  10. package/dist/client/static/js/{SessionsView-n3agmf5t.js → SessionsView-30vcr95v.js} +1 -1
  11. package/dist/client/static/js/{SheetView-nmrdb1b8.js → SheetView-vc484scg.js} +6 -6
  12. package/dist/client/static/js/{SvgPreview-0xsc6xam.js → SvgPreview-tph89jet.js} +1 -1
  13. package/dist/client/static/js/{abnfDiagram-O67JEVCF-jj31rs62.js → abnfDiagram-O67JEVCF-xbar278c.js} +1 -1
  14. package/dist/client/static/js/architecture-7GRP2DOG-tavtgb8a.js +1 -0
  15. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-ay3yr7pf.js → architectureDiagram-NJMV4G6O-s171n2z6.js} +3 -3
  16. package/dist/client/static/js/{astro-qgx1r159.js → astro-80bs6hvg.js} +1 -1
  17. package/dist/client/static/js/bash-b3rwyg5p.js +1 -0
  18. package/dist/client/static/js/{blockDiagram-BEXU5L5S-4x33e16k.js → blockDiagram-BEXU5L5S-gzx6rv9n.js} +2 -2
  19. package/dist/client/static/js/{c4Diagram-YGBWAQC7-dtb81cgz.js → c4Diagram-YGBWAQC7-7f00skch.js} +2 -2
  20. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-vk5a2n9w.js → classDiagram-v2-NBCMYWYE-j79v95nc.js} +4 -4
  21. package/dist/client/static/js/{cose-bilkent-JH36ORCC-6rbjbe19.js → cose-bilkent-JH36ORCC-5fkn7ee5.js} +1 -1
  22. package/dist/client/static/js/css-6vj0d308.js +1 -0
  23. package/dist/client/static/js/cynefin-OW5HDTMX-cdh3n2z2.js +1 -0
  24. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-vyjksedr.js → cynefinDiagram-VND7K2PF-cfs1yvrd.js} +2 -2
  25. package/dist/client/static/js/{dagre-6A5THRUB-7hey38z5.js → dagre-6A5THRUB-44bgc48p.js} +2 -2
  26. package/dist/client/static/js/{diagram-22UHCM2B-aes06jde.js → diagram-22UHCM2B-a4g4x83k.js} +14 -14
  27. package/dist/client/static/js/{diagram-3UASUU5V-3cfkgm3x.js → diagram-3UASUU5V-gm4rg5na.js} +1 -1
  28. package/dist/client/static/js/{diagram-ATOU4E4O-z8mfhwpy.js → diagram-ATOU4E4O-a95y41vk.js} +3 -3
  29. package/dist/client/static/js/{diagram-CDSNMT55-t4821ctz.js → diagram-CDSNMT55-t3j93mmc.js} +5 -5
  30. package/dist/client/static/js/{diagram-MLGK6HIB-23yxbfrx.js → diagram-MLGK6HIB-c2wdez02.js} +1 -1
  31. package/dist/client/static/js/{diagram-MPIPVDR6-chhtf7v0.js → diagram-MPIPVDR6-gya9jhs5.js} +2 -2
  32. package/dist/client/static/js/{dockerfile-5b87ghm7.js → dockerfile-a7q6174s.js} +1 -1
  33. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-9jejcvfr.js → ebnfDiagram-ZINNZB2B-jjhkza6t.js} +1 -1
  34. package/dist/client/static/js/{elk-276RUBZZ-xhhtkf58.js → elk-276RUBZZ-f7re45mw.js} +1 -1
  35. package/dist/client/static/js/{erDiagram-OPXOYQCR-mt2apjjb.js → erDiagram-OPXOYQCR-tpm9g5te.js} +6 -6
  36. package/dist/client/static/js/{erlang-6m6tpt72.js → erlang-qt876zrq.js} +1 -1
  37. package/dist/client/static/js/eventmodeling-NTZA5JFV-as97tpyp.js +1 -0
  38. package/dist/client/static/js/flowDiagram-KWPJA3E3-ggm06d12.js +1 -0
  39. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-8cm7a29w.js → ganttDiagram-FUAMR5RP-fz43n12d.js} +3 -3
  40. package/dist/client/static/js/gitGraph-4MIJSDKK-eqz7p9ng.js +1 -0
  41. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-5s0gbnx2.js → gitGraphDiagram-X574FWY7-f61hgbn6.js} +9 -9
  42. package/dist/client/static/js/graphql-n43pd5fs.js +1 -0
  43. package/dist/client/static/js/{index-z5s27s26.js → index-03h3bkcf.js} +1 -1
  44. package/dist/client/static/js/{index-360d7j0d.js → index-0e40xskg.js} +1 -1
  45. package/dist/client/static/js/{index-z4v1xmh1.js → index-0n5wwe60.js} +2 -2
  46. package/dist/client/static/js/{index-pf7syd7t.js → index-0tf0arsp.js} +3 -3
  47. package/dist/client/static/js/{index-fdbfzshx.js → index-14vndmcr.js} +2 -2
  48. package/dist/client/static/js/{index-7n68yx6m.js → index-1a0zkj8h.js} +2 -2
  49. package/dist/client/static/js/{index-p7btwjvj.js → index-1xqs14fr.js} +3 -3
  50. package/dist/client/static/js/{index-brj8qwa6.js → index-1y9r4frb.js} +2 -2
  51. package/dist/client/static/js/{index-6q80csr0.js → index-2svnq5gg.js} +1 -1
  52. package/dist/client/static/js/{index-9sd0vjmh.js → index-2x5f66t6.js} +2 -2
  53. package/dist/client/static/js/{index-dt7e1328.js → index-354mqqra.js} +2 -2
  54. package/dist/client/static/js/{index-5x95n3hx.js → index-3rcjx70v.js} +1 -1
  55. package/dist/client/static/js/{index-532btjmp.js → index-3zc1b0dv.js} +2 -2
  56. package/dist/client/static/js/{index-wzma5n54.js → index-5tgq7aqx.js} +1 -1
  57. package/dist/client/static/js/{index-xya34x4v.js → index-76zb4m0n.js} +2 -2
  58. package/dist/client/static/js/{index-2xj14800.js → index-7y6rpsrp.js} +2 -2
  59. package/dist/client/static/js/{index-h06bcfds.js → index-8239j2v1.js} +1 -1
  60. package/dist/client/static/js/{index-dq1kdt03.js → index-9fjt5anh.js} +1 -1
  61. package/dist/client/static/js/{index-ehcpzk5b.js → index-9y3gjdj7.js} +1 -1
  62. package/dist/client/static/js/{index-sa9cp6km.js → index-ahv9y42z.js} +2 -2
  63. package/dist/client/static/js/{index-vd0e25p0.js → index-ajs3jj6j.js} +1 -1
  64. package/dist/client/static/js/{index-qnwqaczk.js → index-apvkd37e.js} +3 -3
  65. package/dist/client/static/js/index-at6bhjyf.js +1 -0
  66. package/dist/client/static/js/index-bkye8mz4.js +2 -0
  67. package/dist/client/static/js/{index-dnp07j57.js → index-d495kfm0.js} +1 -1
  68. package/dist/client/static/js/{index-gbfg0anm.js → index-dbe6afkf.js} +2 -2
  69. package/dist/client/static/js/{index-g33knza2.js → index-djmg1d7h.js} +1 -1
  70. package/dist/client/static/js/{index-629kfbcb.js → index-e4p4cd3r.js} +2 -2
  71. package/dist/client/static/js/{index-5y7c62sm.js → index-eyzeya95.js} +5 -5
  72. package/dist/client/static/js/{index-3vhznzgr.js → index-gcs49f3p.js} +1 -1
  73. package/dist/client/static/js/{index-59jb53v3.js → index-gs6f0qwa.js} +2 -2
  74. package/dist/client/static/js/{index-7fdp9c7m.js → index-hf52f59k.js} +2 -2
  75. package/dist/client/static/js/{index-qkscve6n.js → index-j0r5hj0j.js} +2 -2
  76. package/dist/client/static/js/{index-ay34b398.js → index-js7t1vb1.js} +17 -17
  77. package/dist/client/static/js/{index-a0bdavdr.js → index-km2zb6wk.js} +2 -2
  78. package/dist/client/static/js/{index-ye3sr7db.js → index-m73za75e.js} +2 -2
  79. package/dist/client/static/js/{index-kpspnztv.js → index-pbe4yed4.js} +2 -2
  80. package/dist/client/static/js/{index-a6k2hqke.js → index-pxv2nw9w.js} +1 -1
  81. package/dist/client/static/js/{index-jz9fpznk.js → index-q2w6s8n7.js} +5 -5
  82. package/dist/client/static/js/{index-h7pn9qw6.js → index-qckv9nte.js} +2 -2
  83. package/dist/client/static/js/{index-a733k69t.js → index-qsm2z36d.js} +2 -2
  84. package/dist/client/static/js/{index-pf5sbesf.js → index-rytaa8ca.js} +2 -2
  85. package/dist/client/static/js/{index-c0x6s6f7.js → index-sdtye3jy.js} +2 -2
  86. package/dist/client/static/js/index-sffjtm5w.js +12 -0
  87. package/dist/client/static/js/{index-ejgd8w3s.js → index-trm9x02n.js} +28 -28
  88. package/dist/client/static/js/{index-c93sp4yh.js → index-vw4brsdx.js} +1 -1
  89. package/dist/client/static/js/{index-hc2jmzpx.js → index-vw5k8csz.js} +46 -46
  90. package/dist/client/static/js/{index-2gfc25tq.js → index-w0fwb80e.js} +1 -1
  91. package/dist/client/static/js/{index-bbggh3f8.js → index-ypx3qmhq.js} +2 -2
  92. package/dist/client/static/js/{index-4s8ttfxj.js → index-zt75xpq0.js} +193 -193
  93. package/dist/client/static/js/{index-jppt5mgc.js → index-zvfvqvn9.js} +2 -2
  94. package/dist/client/static/js/info-A6RAGUB7-4pkzh1qx.js +1 -0
  95. package/dist/client/static/js/{infoDiagram-VRGFBTTK-3w1yz32c.js → infoDiagram-VRGFBTTK-1qj804sn.js} +1 -1
  96. package/dist/client/static/js/ini-j5dyq6gm.js +1 -0
  97. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-ckt471dy.js → ishikawaDiagram-OU5B5YK6-4j4qsnzw.js} +3 -3
  98. package/dist/client/static/js/java-g4dgwbfd.js +1 -0
  99. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-kfvn4w7e.js → journeyDiagram-ZHPQQLJL-j0brnfft.js} +4 -4
  100. package/dist/client/static/js/jsx-7t5ecz9s.js +1 -0
  101. package/dist/client/static/js/{julia-0j0gsjvc.js → julia-4ghmfy3e.js} +1 -1
  102. package/dist/client/static/js/{kanban-definition-PNTS6WVX-0q36cm83.js → kanban-definition-PNTS6WVX-qqc22br0.js} +2 -2
  103. package/dist/client/static/js/lua-1g6w30de.js +1 -0
  104. package/dist/client/static/js/markdown-afx21x8c.js +1 -0
  105. package/dist/client/static/js/{mermaid.core-b1ssa824.js → mermaid.core-vv3wbe65.js} +6 -6
  106. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-e2ym5en8.js → mindmap-definition-NLK3R4M7-y5b2z8zp.js} +2 -2
  107. package/dist/client/static/js/one-dark-pro-hm3f56n1.js +1 -0
  108. package/dist/client/static/js/one-light-xrz49rct.js +1 -0
  109. package/dist/client/static/js/packet-AYTQ26CC-yg71sp88.js +1 -0
  110. package/dist/client/static/js/{pegDiagram-GJSIUBJH-t8bbdyhe.js → pegDiagram-GJSIUBJH-0be07mqs.js} +1 -1
  111. package/dist/client/static/js/{perl-7n7e9ncg.js → perl-sd00t4b4.js} +1 -1
  112. package/dist/client/static/js/{php-32vy69vd.js → php-2zfyqa61.js} +1 -1
  113. package/dist/client/static/js/pie-WAS4IAKB-89wd6np0.js +1 -0
  114. package/dist/client/static/js/{pieDiagram-5QR66LMP-envv4brj.js → pieDiagram-5QR66LMP-544w86jk.js} +2 -2
  115. package/dist/client/static/js/properties-thd83wey.js +1 -0
  116. package/dist/client/static/js/python-264ns4xw.js +1 -0
  117. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-72rk137a.js → quadrantDiagram-O4NWA36T-p09e7z5s.js} +4 -4
  118. package/dist/client/static/js/r-qw82kkv9.js +1 -0
  119. package/dist/client/static/js/radar-RG4KPBEZ-avn0b8r9.js +1 -0
  120. package/dist/client/static/js/railroad-74A4TZTK-de27xv5w.js +1 -0
  121. package/dist/client/static/js/railroad-abnf-HS5TGJTU-rg4zzj7x.js +1 -0
  122. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-d84fhj8v.js +1 -0
  123. package/dist/client/static/js/railroad-peg-WCYAUIDC-dvf8xrmc.js +1 -0
  124. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-1ej0f5hr.js → railroadDiagram-XR7U4H2S-de830ed2.js} +1 -1
  125. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-rvdaknpd.js → requirementDiagram-PLB6GJNP-b47d74p1.js} +4 -4
  126. package/dist/client/static/js/{ruby-5ty7fys7.js → ruby-v9qaqhby.js} +1 -1
  127. package/dist/client/static/js/{rust-2geezrcs.js → rust-fkt0qyrs.js} +1 -1
  128. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-nxvhtdaw.js → sankeyDiagram-IPEJSGJF-6ezc2fpj.js} +5 -5
  129. package/dist/client/static/js/{sass-mey5150f.js → sass-9bxped7y.js} +1 -1
  130. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-n5cn5qrt.js → sequenceDiagram-PO4LG4MO-by5zqj6w.js} +18 -18
  131. package/dist/client/static/js/{sizeCapture-INFHLROL-r074kj7s.js → sizeCapture-INFHLROL-q85r06j6.js} +1 -1
  132. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-vxghxdb0.js → stateDiagram-v2-GCMORJYK-ep5pyexs.js} +3 -3
  133. package/dist/client/static/js/{svelte-3ewx0hzx.js → svelte-mwtx07d9.js} +1 -1
  134. package/dist/client/static/js/{swimlanes-2SLR337P-qkkv894p.js → swimlanes-2SLR337P-95fcqkh8.js} +1 -1
  135. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-xs2en5dv.js +8 -0
  136. package/dist/client/static/js/{timeline-definition-EJHVYXUP-5tbq4ex2.js → timeline-definition-EJHVYXUP-461e615g.js} +2 -2
  137. package/dist/client/static/js/treeView-Q6P3EWNA-mham0bh6.js +1 -0
  138. package/dist/client/static/js/treemap-WGGIJYW6-mxrxax86.js +1 -0
  139. package/dist/client/static/js/tsx-nm94hed6.js +1 -0
  140. package/dist/client/static/js/typescript-0s2t05jj.js +1 -0
  141. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-6p8hf0b7.js → usecaseDiagram-POWQR4AR-ftqfnvhg.js} +37 -37
  142. package/dist/client/static/js/{vennDiagram-UO4OBE2U-7k5jsxf9.js → vennDiagram-UO4OBE2U-7t96h6ez.js} +7 -7
  143. package/dist/client/static/js/{vue-06rdf4wh.js → vue-j8vb9d7r.js} +1 -1
  144. package/dist/client/static/js/wardley-WFR3VGLG-8vrvh9p3.js +1 -0
  145. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-km2x4er8.js → wardleyDiagram-VNRHLVJA-0de8w8c6.js} +4 -4
  146. package/dist/client/static/js/xml-dz51p1m3.js +1 -0
  147. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-kr3sgr4m.js → xychartDiagram-PMCCYNJV-dez9phkf.js} +5 -5
  148. package/dist/client/static/js/yaml-2cfkd30t.js +1 -0
  149. package/package.json +1 -1
  150. package/src/client/components/common/context-usage-button/McpSection.test.tsx +98 -0
  151. package/src/client/components/common/context-usage-button/McpSection.tsx +12 -5
  152. package/src/client/components/common/context-usage-button/SessionStats.tsx +80 -0
  153. package/src/client/components/common/context-usage-button/index.test.tsx +26 -0
  154. package/src/client/components/common/context-usage-button/index.tsx +36 -28
  155. package/src/client/components/common/harness-glyph/brands.ts +8 -0
  156. package/src/client/components/mobile/LayoutWrapper.tsx +12 -3
  157. package/src/client/components/mobile/mobile-right-sidebar/FullDiff.tsx +9 -2
  158. package/src/client/components/settings/apply-side-effects.test.ts +11 -0
  159. package/src/client/components/settings/apply-side-effects.ts +7 -0
  160. package/src/client/components/settings/categories/ChatSettings.test.tsx +1 -1
  161. package/src/client/components/settings/categories/ChatSettings.tsx +2 -0
  162. package/src/client/components/settings/categories/NotificationSettings.tsx +1 -1
  163. package/src/client/components/settings/categories/chat-settings/ChangedFilesSection.tsx +79 -0
  164. package/src/client/components/settings/categories/chat-settings/groups.ts +4 -3
  165. package/src/client/components/workspace/chat-timeline/ChangedFilesSummary.tsx +101 -0
  166. package/src/client/components/workspace/chat-timeline/MessageList.tsx +33 -1
  167. package/src/client/components/workspace/chat-timeline/RunFooter.tsx +21 -1
  168. package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +13 -0
  169. package/src/client/components/workspace/chat-timeline/index.tsx +1 -1
  170. package/src/client/components/workspace/diff-panel/Toolbar.tsx +17 -51
  171. package/src/client/components/workspace/diff-panel/index.tsx +23 -4
  172. package/src/client/components/workspace/diff-panel/toolbar-git-actions.tsx +94 -0
  173. package/src/client/components/workspace/editor/Body.tsx +2 -0
  174. package/src/client/data/settings/omp-schema.json +73 -3
  175. package/src/client/hooks/chat/timeline/changed-files-setting.test.ts +31 -0
  176. package/src/client/hooks/chat/timeline/changed-files-setting.ts +60 -0
  177. package/src/client/hooks/chat/timeline/session-changes.ts +51 -0
  178. package/src/client/hooks/ui/notification-events.test.ts +3 -0
  179. package/src/client/hooks/ui/notification-events.ts +3 -1
  180. package/src/client/hooks/ui/notification-sound.ts +13 -6
  181. package/src/client/hooks/ui/ui-sounds.test.ts +15 -0
  182. package/src/client/hooks/workspace/diff-file.ts +11 -4
  183. package/src/client/hooks/workspace/file-tabs.ts +13 -4
  184. package/src/client/hooks/workspace/journal-diff.ts +97 -0
  185. package/src/client/lib/notifications/native-banner-sound.test.ts +93 -0
  186. package/src/client/lib/notifications/native-banner-sound.ts +46 -0
  187. package/src/client/lib/notifications/os.test.ts +14 -5
  188. package/src/client/lib/notifications/os.ts +8 -0
  189. package/src/server/lib/harness/launch-table.ts +10 -0
  190. package/src/server/lib/omp/session/changes.test.ts +138 -0
  191. package/src/server/lib/omp/session/changes.ts +220 -0
  192. package/src/server/lib/omp/session/session-discovery.test.ts +4 -4
  193. package/src/server/lib/omp/session/sidebar-activity.server.test.ts +6 -2
  194. package/src/server/lib/omp/session/subagent-presence-scan.ts +54 -0
  195. package/src/server/lib/omp/session/subagent-presence-store.test.ts +1 -1
  196. package/src/server/lib/omp/session/subagent-presence.test.ts +115 -0
  197. package/src/server/lib/omp/session/subagent-presence.ts +12 -3
  198. package/src/server/lib/omp/session/telemetry/compute.ts +68 -0
  199. package/src/server/lib/omp/session/telemetry.test.ts +81 -0
  200. package/src/server/routes/sessions/changes.test.ts +90 -0
  201. package/src/server/routes/sessions/changes.ts +55 -0
  202. package/src/server/routes/sessions/index.ts +6 -0
  203. package/src/shared/lib/chat/duration.ts +34 -0
  204. package/src/shared/lib/chat/timeline/changed-files.test.ts +121 -0
  205. package/src/shared/lib/chat/timeline/changed-files.ts +71 -0
  206. package/src/shared/lib/chat/timeline/fork-anchor.test.ts +3 -0
  207. package/src/shared/lib/format/duration.test.ts +31 -0
  208. package/src/shared/lib/format/duration.ts +27 -0
  209. package/src/shared/lib/fs/unified-diff.test.ts +53 -0
  210. package/src/shared/lib/fs/unified-diff.ts +127 -0
  211. package/src/shared/lib/harness/brand-color.ts +3 -0
  212. package/src/shared/lib/harness/catalog.test.ts +13 -0
  213. package/src/shared/lib/harness/catalog.ts +8 -1
  214. package/src/shared/lib/harness/fork.ts +4 -2
  215. package/src/shared/lib/harness/mcp-facts.ts +3 -0
  216. package/src/shared/lib/harness/provider-facts.ts +14 -0
  217. package/src/shared/lib/harness/updates.ts +5 -0
  218. package/src/shared/lib/icons/tint-hues.generated.ts +27 -27
  219. package/src/shared/lib/omp/config/schema.test.ts +4 -2
  220. package/src/shared/lib/settings/defaults.ts +1 -0
  221. package/src/shared/lib/workspace/file-tab-id.ts +9 -0
  222. package/src/shared/types/context.ts +18 -0
  223. package/src/shared/types/fs.ts +21 -0
  224. package/src/shared/types/index.ts +1 -0
  225. package/src/shared/types/omp/session.ts +6 -0
  226. package/src/shared/types/session-changes.ts +58 -0
  227. package/src/shared/types/settings/state.ts +8 -0
  228. package/dist/client/static/js/LayoutWrapper-xjnveecv.js +0 -2
  229. package/dist/client/static/js/Modal-k2jr9hc4.js +0 -38
  230. package/dist/client/static/js/architecture-7GRP2DOG-1y9zvsyt.js +0 -1
  231. package/dist/client/static/js/bash-m0qjsyy0.js +0 -1
  232. package/dist/client/static/js/css-t4ngafan.js +0 -1
  233. package/dist/client/static/js/cynefin-OW5HDTMX-k2188qcq.js +0 -1
  234. package/dist/client/static/js/eventmodeling-NTZA5JFV-pdr0qn0n.js +0 -1
  235. package/dist/client/static/js/flowDiagram-KWPJA3E3-zvz0mxne.js +0 -1
  236. package/dist/client/static/js/gitGraph-4MIJSDKK-wmqf046s.js +0 -1
  237. package/dist/client/static/js/graphql-692h0n2x.js +0 -1
  238. package/dist/client/static/js/index-61tm0v57.js +0 -1
  239. package/dist/client/static/js/index-kg86e3sy.js +0 -12
  240. package/dist/client/static/js/index-nmmxb4va.js +0 -2
  241. package/dist/client/static/js/info-A6RAGUB7-zg3twte6.js +0 -1
  242. package/dist/client/static/js/ini-cg0a5wm3.js +0 -1
  243. package/dist/client/static/js/java-vcck089n.js +0 -1
  244. package/dist/client/static/js/jsx-ht9zyzwa.js +0 -1
  245. package/dist/client/static/js/lua-ke895s2q.js +0 -1
  246. package/dist/client/static/js/markdown-gwmsh53r.js +0 -1
  247. package/dist/client/static/js/one-dark-pro-4geyzhjj.js +0 -1
  248. package/dist/client/static/js/one-light-tqssjm9t.js +0 -1
  249. package/dist/client/static/js/packet-AYTQ26CC-3pav51g0.js +0 -1
  250. package/dist/client/static/js/pie-WAS4IAKB-wqfh7zdk.js +0 -1
  251. package/dist/client/static/js/properties-mzvvbqg5.js +0 -1
  252. package/dist/client/static/js/python-3w64wsyd.js +0 -1
  253. package/dist/client/static/js/r-32re2zwb.js +0 -1
  254. package/dist/client/static/js/radar-RG4KPBEZ-w7qjdr2g.js +0 -1
  255. package/dist/client/static/js/railroad-74A4TZTK-rhr99kkj.js +0 -1
  256. package/dist/client/static/js/railroad-abnf-HS5TGJTU-c4jeea3m.js +0 -1
  257. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-x2ee66ex.js +0 -1
  258. package/dist/client/static/js/railroad-peg-WCYAUIDC-yw8wjfwg.js +0 -1
  259. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-y81h9n27.js +0 -8
  260. package/dist/client/static/js/treeView-Q6P3EWNA-ekz05ccs.js +0 -1
  261. package/dist/client/static/js/treemap-WGGIJYW6-aq6qymjr.js +0 -1
  262. package/dist/client/static/js/tsx-0p183w2f.js +0 -1
  263. package/dist/client/static/js/typescript-t9a5jyvv.js +0 -1
  264. package/dist/client/static/js/wardley-WFR3VGLG-z34tj4y3.js +0 -1
  265. package/dist/client/static/js/xml-81hxjjt4.js +0 -1
  266. package/dist/client/static/js/yaml-yssayv8a.js +0 -1
@@ -5,6 +5,8 @@ import { MinimapShortcuts } from '@/client/components/workspace/chat-timeline/Mi
5
5
  import { MobileTurnJump } from '@/client/components/workspace/chat-timeline/MobileTurnJump';
6
6
  import { LoadingOlderIndicator } from '@/client/components/workspace/chat-timeline/SessionSkeleton';
7
7
  import { OrphanAsks } from '@/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OrphanAsks';
8
+ import { useSessionChanges } from '@/client/hooks/chat/timeline/session-changes';
9
+ import { useShowChangedFiles } from '@/client/hooks/chat/timeline/changed-files-setting';
8
10
  import type { Attachment, ChatMessageData, UserTurnRef } from '@/shared/types';
9
11
  import type { ForkAnchorRole } from '@/shared/lib/chat/timeline/fork-anchor';
10
12
 
@@ -41,6 +43,8 @@ interface TimelineBodyProps {
41
43
  jumpToBottom: (behavior?: ScrollBehavior) => void;
42
44
  /** Which rows of `messages` are mounted (see `useTimelineRowWindow`). */
43
45
  rowWindow: TimelineRowWindow;
46
+ /** Session id the journal diff tabs read from. */
47
+ sessionId?: string;
44
48
  }
45
49
 
46
50
  /**
@@ -76,7 +80,14 @@ export function TimelineBody({
76
80
  showScrollBottom,
77
81
  jumpToBottom,
78
82
  rowWindow,
83
+ sessionId,
79
84
  }: TimelineBodyProps) {
85
+ // The agent's own change journal, for the per-run file list above each
86
+ // footer. Read once a run settles; a session with no journal (older omp)
87
+ // answers an empty list and the summary simply does not render. The setting
88
+ // gates the read too, so turning the list off costs no request.
89
+ const showChangedFiles = useShowChangedFiles();
90
+ const records = useSessionChanges(sessionId ?? null, isGenerating, showChangedFiles);
80
91
  return (
81
92
  <>
82
93
  {/* Jump to a user turn. The rail is desktop's form — one 1px line per
@@ -129,6 +140,8 @@ export function TimelineBody({
129
140
  onFork={onFork}
130
141
  isMobile={isMobile}
131
142
  rowWindow={rowWindow}
143
+ sessionId={sessionId}
144
+ changeRecords={records}
132
145
  />
133
146
  {/* An ask whose tool card this client cannot see (a subagent's, an
134
147
  extension's own dialog, a call outside the loaded window) still
@@ -268,7 +268,7 @@ export function ChatTimeline({ className = '', appSettings = {}, onSessionTitle,
268
268
  onFork={fork}
269
269
  showScrollBottom={showScrollBottom}
270
270
  jumpToBottom={jumpToBottom}
271
- rowWindow={rowWindow}
271
+ rowWindow={rowWindow} sessionId={sessionId}
272
272
  />
273
273
  )}
274
274
  </div>
@@ -1,10 +1,11 @@
1
- import { AlignJustify, Check, ChevronDown, ChevronUp, Code2, Columns, Copy, Diff, FileCode, Minus, Plus, RefreshCw, Space, Undo2, WrapText } from 'lucide-preact';
1
+ import { AlignJustify, Check, ChevronDown, ChevronUp, Code2, Columns, Copy, Diff, FileCode, RefreshCw, Space, WrapText } from 'lucide-preact';
2
2
  import { FileIcon } from '@/client/components/common/file-icon';
3
3
  import { EditorViewButtons, useEditorViewActions } from '@/client/components/common/editor-view-buttons';
4
4
  import { getGitStatusInfo } from '@/shared/lib/fs/git-status';
5
5
  import { ToolbarRow, type ToolbarCluster } from '@/client/components/common/toolbar-row';
6
6
  import { DiffContentModeSegments, DiffViewModeSegments } from '@/client/components/workspace/diff-panel/ToolbarSegments';
7
7
  import { HunkStepper } from '@/client/components/workspace/diff-panel/HunkStepper';
8
+ import { ACTION_CLASS, gitActionClusters } from '@/client/components/workspace/diff-panel/toolbar-git-actions';
8
9
 
9
10
  export type DiffViewMode = 'unified' | 'split';
10
11
 
@@ -41,6 +42,12 @@ interface DiffToolbarProps {
41
42
  * chat column or sidebar beside it for a mode to widen into.
42
43
  */
43
44
  viewModeButtons?: boolean;
45
+ /**
46
+ * Hide the git writes. A journal diff shows the agent's own snapshots, which
47
+ * are not the worktree: staging or discarding from it would write a state the
48
+ * reader never saw.
49
+ */
50
+ readOnly?: boolean;
44
51
  onSetViewMode: (mode: DiffViewMode) => void;
45
52
  onSetContentMode: (mode: DiffContentMode) => void;
46
53
  onToggleWordWrap: () => void;
@@ -52,9 +59,6 @@ interface DiffToolbarProps {
52
59
  onCopyDiff: () => void;
53
60
  }
54
61
 
55
- const ACTION_CLASS =
56
- 'flex items-center justify-center p-1.5 rounded transition-colors cursor-pointer disabled:cursor-default disabled:opacity-40 disabled:hover:bg-transparent disabled:hover:text-ink/50';
57
-
58
62
  export function DiffToolbar({
59
63
  filePath,
60
64
  status,
@@ -72,6 +76,7 @@ export function DiffToolbar({
72
76
  isCopied,
73
77
  isBusy = false,
74
78
  viewModeButtons = true,
79
+ readOnly = false,
75
80
  onSetViewMode,
76
81
  onSetContentMode,
77
82
  onToggleWordWrap,
@@ -249,53 +254,14 @@ export function DiffToolbar({
249
254
  ),
250
255
  });
251
256
 
252
- if (!isStaged) {
253
- clusters.push({
254
- id: 'discard',
255
- actions: [{ label: 'Discard changes in this file', icon: Undo2, onSelect: onDiscard, disabled: locked }],
256
- children: (
257
- <button
258
- type="button"
259
- onClick={onDiscard}
260
- className={`${ACTION_CLASS} text-ink/50 hover:text-error hover:bg-error/10`}
261
- title="Discard changes in this file"
262
- aria-label="Discard changes in this file"
263
- disabled={locked}
264
- >
265
- <Undo2 size={13} />
266
- </button>
267
- ),
268
- });
269
- }
270
-
271
- clusters.push({
272
- id: 'stage',
273
- // The panel's primary write: a menu row must not be the only way to stage.
274
- pinned: true,
275
- actions: [{ label: stageLabel, icon: isStaged ? Minus : Plus, onSelect: onStageUnstage, disabled: locked }],
276
- children: (
277
- <button
278
- type="button"
279
- onClick={onStageUnstage}
280
- className="px-2 py-1 text-[11px] font-medium rounded border border-ink/15 hover:bg-ink/5 flex items-center space-x-1 transition-colors text-ink cursor-pointer disabled:cursor-default disabled:opacity-40 disabled:hover:bg-transparent"
281
- title={stageLabel}
282
- aria-label={stageLabel}
283
- disabled={locked}
284
- >
285
- {isStaged ? (
286
- <>
287
- <Minus size={12} />
288
- <span className="hidden @[360px]:inline">Unstage</span>
289
- </>
290
- ) : (
291
- <>
292
- <Plus size={12} />
293
- <span className="hidden @[360px]:inline">Stage</span>
294
- </>
295
- )}
296
- </button>
297
- ),
298
- });
257
+ clusters.push(...gitActionClusters({
258
+ isStaged,
259
+ locked,
260
+ readOnly,
261
+ stageLabel,
262
+ onStageUnstage,
263
+ onDiscard,
264
+ }));
299
265
 
300
266
  if (onOpenInEditor) {
301
267
  clusters.push({
@@ -2,8 +2,10 @@ import { useCallback, useRef, useState } from 'preact/hooks';
2
2
  import { useSessionUiState } from '@/client/hooks/workspace/session-state';
3
3
  import { isUnmergedCode } from '@/shared/lib/fs/git-unmerged';
4
4
  import { useFileDiff } from '@/client/hooks/workspace/diff-file';
5
+ import { useJournalDiff } from '@/client/hooks/workspace/journal-diff';
5
6
  import { useDiffGitActions } from '@/client/hooks/workspace/diff-git-actions';
6
7
  import { getLanguageFromPath } from '@/shared/lib/code/language';
8
+ import type { JournalDiffRef } from '@/shared/types/fs';
7
9
  import { DiffToolbar, type DiffContentMode, type DiffViewMode } from '@/client/components/workspace/diff-panel/Toolbar';
8
10
  import { ConflictBanner } from '@/client/components/workspace/diff-panel/ConflictBanner';
9
11
  import { ThemedMergeDiffView } from '@/client/components/workspace/diff-panel/ThemedMergeDiffView';
@@ -33,6 +35,14 @@ interface DiffPanelProps {
33
35
  * already covers the chat and the sidebar.
34
36
  */
35
37
  viewModeButtons?: boolean;
38
+ /**
39
+ * Read the two sides from the session's agent change journal instead of the
40
+ * worktree. The panel then shows what the agent wrote, even after someone
41
+ * else edited the file, and its git writes are hidden.
42
+ */
43
+ journalDiff?: JournalDiffRef;
44
+ /** Hide the git writes (stage / discard). Implied by `journalDiff`. */
45
+ readOnly?: boolean;
36
46
  }
37
47
 
38
48
  export function DiffPanel({
@@ -46,6 +56,8 @@ export function DiffPanel({
46
56
  className = '',
47
57
  tabKey = null,
48
58
  viewModeButtons = true,
59
+ journalDiff,
60
+ readOnly = false,
49
61
  }: DiffPanelProps) {
50
62
  // Read and persist view mode & whitespace preference in session_ui_state
51
63
  const [viewMode, setViewMode] = useSessionUiState<DiffViewMode>('diff.viewMode', 'unified');
@@ -75,6 +87,11 @@ export function DiffPanel({
75
87
  }, []);
76
88
  const editorFontFamily = useEditorFontStack();
77
89
 
90
+ // Both hooks run unconditionally (hooks cannot be conditional); the journal
91
+ // one is inert without a ref, and the git one is told not to read when the
92
+ // journal owns the panel.
93
+ const gitDiff = useFileDiff({ filePath, status, isStaged, repo, root, enabled: !journalDiff });
94
+ const journalDiffState = useJournalDiff(journalDiff);
78
95
  const {
79
96
  rawDiff,
80
97
  oldContent,
@@ -85,8 +102,9 @@ export function DiffPanel({
85
102
  errorMessage,
86
103
  fetchDiff,
87
104
  adoptState,
88
- } = useFileDiff({ filePath, status, isStaged, repo, root });
89
- const conflicted = isUnmergedCode(currentStatus);
105
+ } = journalDiff ? journalDiffState : gitDiff;
106
+ const conflicted = !journalDiff && isUnmergedCode(currentStatus);
107
+ const isReadOnly = readOnly || Boolean(journalDiff);
90
108
 
91
109
  const language = getLanguageFromPath(filePath);
92
110
  // A contributed renderer replaces the built-in views below, never the toolbar.
@@ -168,12 +186,13 @@ export function DiffPanel({
168
186
  isCopied={isCopied}
169
187
  isBusy={isBusy}
170
188
  viewModeButtons={viewModeButtons}
189
+ readOnly={isReadOnly}
171
190
  onSetViewMode={handleSetViewMode}
172
191
  onSetContentMode={handleSetContentMode}
173
192
  onToggleWordWrap={handleToggleWordWrap}
174
193
  onToggleWhitespace={handleToggleWhitespace}
175
- onStageUnstage={() => void gitActions.stageUnstage()}
176
- onDiscard={() => setShowDiscardConfirm(true)}
194
+ onStageUnstage={() => { if (!isReadOnly) void gitActions.stageUnstage(); }}
195
+ onDiscard={() => { if (!isReadOnly) setShowDiscardConfirm(true); }}
177
196
  onOpenInEditor={onOpenInEditor}
178
197
  onRefresh={() => void fetchDiff()}
179
198
  onCopyDiff={handleCopyDiff}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The diff toolbar's two git writes, as clusters.
8
+ *
9
+ * Split out of `Toolbar.tsx` when the journal diff added a `readOnly` mode: the
10
+ * file was already at the repo's line ceiling, and these are the only clusters
11
+ * that write to git. A journal diff shows the agent's own snapshots, which are
12
+ * not the worktree, so it renders neither.
13
+ */
14
+
15
+ import { Minus, Plus, Undo2 } from 'lucide-preact';
16
+ import type { ToolbarCluster } from '@/client/components/common/toolbar-row';
17
+
18
+ /** Shared class for the toolbar's icon buttons. */
19
+ export const ACTION_CLASS =
20
+ 'flex items-center justify-center p-1.5 rounded transition-colors cursor-pointer disabled:cursor-default disabled:opacity-40 disabled:hover:bg-transparent disabled:hover:text-ink/50';
21
+
22
+ interface GitActionClustersArgs {
23
+ isStaged: boolean;
24
+ /** A write is in flight; the actions lock. */
25
+ locked: boolean;
26
+ /** A journal diff: no git writes at all. */
27
+ readOnly: boolean;
28
+ stageLabel: string;
29
+ onStageUnstage: () => void;
30
+ onDiscard: () => void;
31
+ }
32
+
33
+ /** Discard (unstaged only) and Stage/Unstage, in the toolbar's visual order. */
34
+ export function gitActionClusters({
35
+ isStaged,
36
+ locked,
37
+ readOnly,
38
+ stageLabel,
39
+ onStageUnstage,
40
+ onDiscard,
41
+ }: GitActionClustersArgs): ToolbarCluster[] {
42
+ if (readOnly) return [];
43
+ const clusters: ToolbarCluster[] = [];
44
+
45
+ if (!isStaged) {
46
+ clusters.push({
47
+ id: 'discard',
48
+ actions: [{ label: 'Discard changes in this file', icon: Undo2, onSelect: onDiscard, disabled: locked }],
49
+ children: (
50
+ <button
51
+ type="button"
52
+ onClick={onDiscard}
53
+ className={`${ACTION_CLASS} text-ink/50 hover:text-error hover:bg-error/10`}
54
+ title="Discard changes in this file"
55
+ aria-label="Discard changes in this file"
56
+ disabled={locked}
57
+ >
58
+ <Undo2 size={13} />
59
+ </button>
60
+ ),
61
+ });
62
+ }
63
+
64
+ clusters.push({
65
+ id: 'stage',
66
+ // The panel's primary write: a menu row must not be the only way to stage.
67
+ pinned: true,
68
+ actions: [{ label: stageLabel, icon: isStaged ? Minus : Plus, onSelect: onStageUnstage, disabled: locked }],
69
+ children: (
70
+ <button
71
+ type="button"
72
+ onClick={onStageUnstage}
73
+ className="px-2 py-1 text-[11px] font-medium rounded border border-ink/15 hover:bg-ink/5 flex items-center space-x-1 transition-colors text-ink cursor-pointer disabled:cursor-default disabled:opacity-40 disabled:hover:bg-transparent"
74
+ title={stageLabel}
75
+ aria-label={stageLabel}
76
+ disabled={locked}
77
+ >
78
+ {isStaged ? (
79
+ <>
80
+ <Minus size={12} />
81
+ <span className="hidden @[360px]:inline">Unstage</span>
82
+ </>
83
+ ) : (
84
+ <>
85
+ <Plus size={12} />
86
+ <span className="hidden @[360px]:inline">Stage</span>
87
+ </>
88
+ )}
89
+ </button>
90
+ ),
91
+ });
92
+
93
+ return clusters;
94
+ }
@@ -98,6 +98,8 @@ export function EditorBody({
98
98
  isStaged={Boolean(activeFile.diffStaged)}
99
99
  root={activeFile.root}
100
100
  repo={activeFile.repo || '.'}
101
+ journalDiff={activeFile.journalDiff}
102
+ readOnly={activeFile.diffSource === 'journal'}
101
103
  onOpenInEditor={() => onConvertDiffToEditor(activeFile.id)}
102
104
  onFileSaved={onFileSaved}
103
105
  className="flex-1"
@@ -1,5 +1,5 @@
1
1
  {
2
- "source": "@oh-my-pi/pi-coding-agent 10 tabs / 615 settings",
2
+ "source": "@oh-my-pi/pi-coding-agent 10 tabs / 622 settings",
3
3
  "tabs": [
4
4
  {
5
5
  "id": "appearance",
@@ -124,6 +124,24 @@
124
124
  }
125
125
  ],
126
126
  "entries": {
127
+ "auth.unpausedProviders": {
128
+ "type": "array",
129
+ "default": [],
130
+ "ui": {
131
+ "tab": "providers",
132
+ "group": "Services",
133
+ "label": "Unpaused Providers",
134
+ "description": "Turn providers we paused back on: login, token refresh and stored credentials work again. Each pause names the account risk you accept. Project settings cannot set this",
135
+ "options": [
136
+ {
137
+ "value": "google-antigravity",
138
+ "label": "Google Antigravity (Gemini, Claude, GPT-OSS)",
139
+ "description": "Google Antigravity is paused: Google's terms do not allow third-party sign-in and Google has suspended accounts that used it (see #18341). Use GEMINI_API_KEY (AI Studio) or google-vertex instead."
140
+ }
141
+ ],
142
+ "condition": "unpausedProvidersNotProject"
143
+ }
144
+ },
127
145
  "modelRoleStorage": {
128
146
  "type": "enum",
129
147
  "default": "global",
@@ -6336,6 +6354,38 @@
6336
6354
  ]
6337
6355
  }
6338
6356
  },
6357
+ "todo.midRunNudges": {
6358
+ "type": "enum",
6359
+ "default": "capped",
6360
+ "values": [
6361
+ "off",
6362
+ "capped",
6363
+ "backoff"
6364
+ ],
6365
+ "ui": {
6366
+ "tab": "tools",
6367
+ "group": "Todos",
6368
+ "label": "Mid-Run Todo Nudges",
6369
+ "description": "How often a long turn is reminded to update its todo list while it keeps changing things",
6370
+ "options": [
6371
+ {
6372
+ "value": "off",
6373
+ "label": "Off",
6374
+ "description": "Never nudge mid-run"
6375
+ },
6376
+ {
6377
+ "value": "capped",
6378
+ "label": "Capped",
6379
+ "description": "Nudge after 12 edits or commands, at most twice until the todo list changes or you send a message"
6380
+ },
6381
+ {
6382
+ "value": "backoff",
6383
+ "label": "Backoff",
6384
+ "description": "Keep nudging with a doubling gap: after 12, 24, 48, 96, then every 192 edits or commands"
6385
+ }
6386
+ ]
6387
+ }
6388
+ },
6339
6389
  "todo.eager": {
6340
6390
  "type": "enum",
6341
6391
  "default": "default",
@@ -6431,7 +6481,7 @@
6431
6481
  },
6432
6482
  "grep.contextBefore": {
6433
6483
  "type": "number",
6434
- "default": 1,
6484
+ "default": 0,
6435
6485
  "ui": {
6436
6486
  "tab": "tools",
6437
6487
  "group": "Grep & Browser",
@@ -6463,7 +6513,7 @@
6463
6513
  },
6464
6514
  "grep.contextAfter": {
6465
6515
  "type": "number",
6466
- "default": 3,
6516
+ "default": 0,
6467
6517
  "ui": {
6468
6518
  "tab": "tools",
6469
6519
  "group": "Grep & Browser",
@@ -6628,6 +6678,16 @@
6628
6678
  "description": "Enable the read-only archive eval prelude: prompt history, recent projects, past sessions and recaps"
6629
6679
  }
6630
6680
  },
6681
+ "commit.enabled": {
6682
+ "type": "boolean",
6683
+ "default": true,
6684
+ "ui": {
6685
+ "tab": "tools",
6686
+ "group": "Available Tools",
6687
+ "label": "Selective commit",
6688
+ "description": "Enable the commit eval prelude and /commit: commit only the lines this agent and its subagents wrote"
6689
+ }
6690
+ },
6631
6691
  "computer.display": {
6632
6692
  "type": "string",
6633
6693
  "default": "active",
@@ -7189,6 +7249,16 @@
7189
7249
  "description": "Ordered bash command approval rules. Each item has match and approval fields; only '*' wildcards are supported."
7190
7250
  }
7191
7251
  },
7252
+ "bash.allowedEnvVars": {
7253
+ "type": "array",
7254
+ "default": [],
7255
+ "ui": {
7256
+ "tab": "shell",
7257
+ "group": "Bash",
7258
+ "label": "Bash Allowed Environment Variables",
7259
+ "description": "Exact environment variable names allowed as leading KEY=VALUE prefixes when matching bash.patterns allow rules (no wildcards). Any value is accepted, so list only benign build/test variables; execution-altering variables (PATH, LD_PRELOAD, BASH_ENV, *_RUNNER, *_WRAPPER) allow arbitrary command execution."
7260
+ }
7261
+ },
7192
7262
  "bashInterceptor.enabled": {
7193
7263
  "type": "boolean",
7194
7264
  "default": false,
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The changed-files setting's read rule: on unless the stored value is the
8
+ * literal `false`. A missing key (an install that predates the setting) and a
9
+ * malformed value both keep the list, because the list is the only place the
10
+ * transcript says which files a run touched.
11
+ */
12
+
13
+ import { describe, expect, test } from 'bun:test';
14
+ import { primeKabmoSettings } from '@/shared/lib/settings/client';
15
+ import { currentShowChangedFiles } from '@/client/hooks/chat/timeline/changed-files-setting';
16
+
17
+ describe('currentShowChangedFiles', () => {
18
+ test('defaults on, and only the literal false turns it off', () => {
19
+ primeKabmoSettings({});
20
+ expect(currentShowChangedFiles()).toBe(true);
21
+
22
+ primeKabmoSettings({ showChangedFiles: false });
23
+ expect(currentShowChangedFiles()).toBe(false);
24
+
25
+ primeKabmoSettings({ showChangedFiles: true });
26
+ expect(currentShowChangedFiles()).toBe(true);
27
+
28
+ primeKabmoSettings({ showChangedFiles: 'no' });
29
+ expect(currentShowChangedFiles()).toBe(true);
30
+ });
31
+ });
@@ -0,0 +1,60 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The one reader/writer of the transcript's "N files changed" list.
8
+ *
9
+ * The list is a Preact subtree, so something in JavaScript must re-render when
10
+ * the setting moves. The settings modal calls {@link applyShowChangedFiles},
11
+ * which announces {@link CHANGED_FILES_CHANGED_EVENT}; {@link useShowChangedFiles}
12
+ * is the single subscriber, and the timeline is the only consumer.
13
+ *
14
+ * The initial value comes from the primed settings snapshot
15
+ * (`primeKabmoSettings` in `main.tsx`), so a mounted timeline draws the stored
16
+ * choice on its first render — no flash of the default.
17
+ */
18
+
19
+ import { useState } from 'preact/hooks';
20
+ import { readKabmoSetting } from '@/shared/lib/settings/client';
21
+ import { useKabmoEvent } from '@/client/hooks/ui/window-event';
22
+ import type { SettingsState } from '@/shared/types';
23
+
24
+ /**
25
+ * `app_settings` key holding the choice (in the `kabmo_settings` blob).
26
+ *
27
+ * `satisfies keyof SettingsState` because the key and the field name must be
28
+ * the same string for persistence to work at all — renaming the field without
29
+ * this line would leave the setting silently unsaved.
30
+ */
31
+ export const CHANGED_FILES_SETTING_KEY = 'showChangedFiles' satisfies keyof SettingsState;
32
+
33
+ /** Window event carrying the resolved boolean as `detail`. */
34
+ export const CHANGED_FILES_CHANGED_EVENT = 'omp:changed-files-changed';
35
+
36
+ /** The stored choice; only the literal `false` turns the list off. */
37
+ export function currentShowChangedFiles(appSettings?: Record<string, any>): boolean {
38
+ return readKabmoSetting<unknown>(CHANGED_FILES_SETTING_KEY, appSettings) !== false;
39
+ }
40
+
41
+ /**
42
+ * Announce a new choice. Called by the settings modal when the value changes —
43
+ * the persisted copy is written by the modal's own `writeKabmoSettings`, so
44
+ * this function only has to make the open timeline re-render.
45
+ */
46
+ export function applyShowChangedFiles(value: unknown): void {
47
+ if (typeof window === 'undefined') return;
48
+ window.dispatchEvent(
49
+ new CustomEvent(CHANGED_FILES_CHANGED_EVENT, { detail: value !== false }),
50
+ );
51
+ }
52
+
53
+ /** Whether the transcript should draw the list, kept live across settings edits. */
54
+ export function useShowChangedFiles(): boolean {
55
+ const [show, setShow] = useState<boolean>(() => currentShowChangedFiles());
56
+ useKabmoEvent(CHANGED_FILES_CHANGED_EVENT, (event) => {
57
+ setShow((event as CustomEvent<unknown>).detail !== false);
58
+ });
59
+ return show;
60
+ }
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The session's agent change journal, for the chat's per-run file list.
8
+ *
9
+ * Read once per settled run: the journal is written while the agent works, so
10
+ * asking mid-run would show a partial list that then changes under the reader.
11
+ * A failed read keeps the previous list — a transient 500 is not a reason to
12
+ * blank a summary the reader is looking at.
13
+ */
14
+
15
+ import { useEffect, useState } from 'preact/hooks';
16
+ import type { SessionChangeRecord } from '@/shared/types';
17
+
18
+ export function useSessionChanges(
19
+ sessionId: string | null,
20
+ isGenerating: boolean,
21
+ enabled = true,
22
+ ): SessionChangeRecord[] {
23
+ const [records, setRecords] = useState<SessionChangeRecord[]>([]);
24
+
25
+ useEffect(() => {
26
+ if (!enabled) {
27
+ setRecords([]);
28
+ return;
29
+ }
30
+ if (!sessionId) {
31
+ setRecords([]);
32
+ return;
33
+ }
34
+ if (isGenerating) return;
35
+ let cancelled = false;
36
+ void (async () => {
37
+ try {
38
+ const res = await fetch(`/api/sessions/${encodeURIComponent(sessionId)}/changes`);
39
+ const data = (await res.json().catch(() => null)) as { records?: SessionChangeRecord[] } | null;
40
+ if (!cancelled && Array.isArray(data?.records)) setRecords(data.records);
41
+ } catch {
42
+ // Keep the previous list.
43
+ }
44
+ })();
45
+ return () => {
46
+ cancelled = true;
47
+ };
48
+ }, [sessionId, isGenerating, enabled]);
49
+
50
+ return records;
51
+ }
@@ -115,6 +115,9 @@ describe('useNotificationEvents', () => {
115
115
  params: {
116
116
  title: 'Fix the build',
117
117
  body: 'The run ended with error',
118
+ // The shell picks its chime from this: `ask` is the attention cue, the
119
+ // others the completion chime.
120
+ kind: 'error',
118
121
  tag: 'error:s-1',
119
122
  sessionId: 's-1',
120
123
  // The event's own moment travels with it: a banner delivered later must
@@ -44,12 +44,14 @@ export function useNotificationEvents(): void {
44
44
  const event = asNotificationEvent(frame.payload);
45
45
  if (!event) return;
46
46
  // The chime is its own preference and plays for an ask regardless of
47
- // whether this device is allowed a system banner.
47
+ // whether this device is allowed a system banner; inside a shell the
48
+ // banner plays it instead (see `native-banner-sound`).
48
49
  if (event.kind === 'ask') triggerInputRequiredSound();
49
50
  if (!isNotificationPlatformEnabled(notificationPlatformForClient())) return;
50
51
  void showOsNotification({
51
52
  title: event.title,
52
53
  body: event.body,
54
+ kind: event.kind,
53
55
  tag: notificationTag(event),
54
56
  sessionId: event.sessionId,
55
57
  at: event.at,
@@ -1,5 +1,6 @@
1
1
  import { useCallback } from 'preact/hooks';
2
2
  import { readKabmoSetting } from '@/shared/lib/settings/client';
3
+ import { nativeBannerPlaysSound } from '@/client/lib/notifications/native-banner-sound';
3
4
 
4
5
  interface WebkitWindow extends Window {
5
6
  webkitAudioContext?: typeof AudioContext;
@@ -138,22 +139,28 @@ export function isChatSoundEnabled(appSettings?: Record<string, any>): boolean {
138
139
 
139
140
  /**
140
141
  * Triggers the completion notification sound if the user setting is enabled.
142
+ *
143
+ * Silent inside a shell: its banner plays the same chime, and playing both is
144
+ * the double sound this design removes.
141
145
  */
142
146
  export function triggerChatCompletionSound(appSettings?: Record<string, any>) {
143
- if (isChatSoundEnabled(appSettings)) {
144
- playNotificationSound();
145
- }
147
+ if (!isChatSoundEnabled(appSettings)) return;
148
+ if (nativeBannerPlaysSound('finish', appSettings)) return;
149
+ playNotificationSound();
146
150
  }
147
151
 
148
152
  /**
149
153
  * Triggers the input-required cue, gated by the same notification preference as
150
154
  * the completion chime. Reads settings from the primed snapshot: the alert fires
151
155
  * from the app-wide session list, which has no settings props to thread.
156
+ *
157
+ * Silent inside a shell, like the completion chime — the shell's banner plays
158
+ * the attention cue instead.
152
159
  */
153
160
  export function triggerInputRequiredSound() {
154
- if (isChatSoundEnabled()) {
155
- playInputRequiredSound();
156
- }
161
+ if (!isChatSoundEnabled()) return;
162
+ if (nativeBannerPlaysSound('ask')) return;
163
+ playInputRequiredSound();
157
164
  }
158
165
 
159
166
  export function useNotificationSound() {