@draht/coding-agent 2026.10.31 → 2026.11.5-1

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 (512) hide show
  1. package/CHANGELOG.md +131 -0
  2. package/dist/bundle/chunks/anthropic-messages-UJZ4SGHU.js +6 -0
  3. package/dist/bundle/chunks/azure-openai-responses-NCMJPZVJ.js +2 -0
  4. package/dist/bundle/chunks/bedrock-converse-stream.js +27 -24
  5. package/dist/bundle/chunks/chunk-2JZLKNZ4.js +3 -0
  6. package/dist/bundle/chunks/chunk-3BJ462DN.js +132 -0
  7. package/dist/bundle/chunks/chunk-5OXIAQP5.js +2 -0
  8. package/dist/bundle/chunks/chunk-6M3D4XVD.js +2 -0
  9. package/dist/bundle/chunks/{chunk-KVH4HR57.js → chunk-6WESOD4H.js} +1 -1
  10. package/dist/bundle/chunks/chunk-AOCWORXE.js +2 -0
  11. package/dist/bundle/chunks/chunk-BK5LXGIH.js +2 -0
  12. package/dist/bundle/chunks/chunk-CA23BDNK.js +2 -0
  13. package/dist/bundle/chunks/chunk-DWOGGNWY.js +18 -0
  14. package/dist/bundle/chunks/{chunk-RMLEJL4F.js → chunk-EOXOMUKR.js} +1 -1
  15. package/dist/bundle/chunks/chunk-F5TDVH26.js +159 -0
  16. package/dist/bundle/chunks/chunk-GBFVS2SF.js +12 -0
  17. package/dist/bundle/chunks/{chunk-ITP6IDBA.js → chunk-GQXRTK54.js} +2 -2
  18. package/dist/bundle/chunks/chunk-HJ3PS7QP.js +4 -0
  19. package/dist/bundle/chunks/chunk-ITKDPD4D.js +12 -0
  20. package/dist/bundle/chunks/chunk-KFREX3FS.js +10 -0
  21. package/dist/bundle/chunks/chunk-LO6CVU2L.js +6 -0
  22. package/dist/bundle/chunks/{chunk-AACPRSR2.js → chunk-P7O36UDU.js} +2 -2
  23. package/dist/bundle/chunks/chunk-PMINB7UH.js +1401 -0
  24. package/dist/bundle/chunks/chunk-PZKD35UB.js +2 -0
  25. package/dist/bundle/chunks/{chunk-JQF3BGRS.js → chunk-Q2QKCYPU.js} +1 -1
  26. package/dist/bundle/chunks/chunk-QBUTRTYN.js +2 -0
  27. package/dist/bundle/chunks/chunk-SUVMF4W5.js +2 -0
  28. package/dist/bundle/chunks/chunk-UFACUBF2.js +16 -0
  29. package/dist/bundle/chunks/chunk-VXO6B72D.js +9 -0
  30. package/dist/bundle/chunks/{chunk-NUUJKLOX.js → chunk-WXASQQBZ.js} +9 -9
  31. package/dist/bundle/chunks/chunk-Y3NLUJYO.js +2 -0
  32. package/dist/bundle/chunks/chunk-Y7QE2R34.js +2 -0
  33. package/dist/bundle/chunks/chunk-YD5VPPI4.js +30 -0
  34. package/dist/bundle/chunks/chunk-YWRWN7ZB.js +82 -0
  35. package/dist/bundle/chunks/{cli-LGOE6EXL.js → cli-4SUT6MJ6.js} +10 -10
  36. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-BJVMNETD.js +2 -0
  37. package/dist/bundle/chunks/{execute-ZVQ7ITER.js → execute-ZI7T2SUH.js} +1 -1
  38. package/dist/bundle/chunks/github-copilot.js +1 -1
  39. package/dist/bundle/chunks/{google-generative-ai-IHELIMAC.js → google-generative-ai-N5IPPKQY.js} +1 -1
  40. package/dist/bundle/chunks/{google-vertex-3QCFWSNG.js → google-vertex-A4BKUE4H.js} +1 -1
  41. package/dist/bundle/chunks/https-proxy-agent-WQIRL24U.js +13 -0
  42. package/dist/bundle/chunks/image-resize-worker.js +1 -1
  43. package/dist/bundle/chunks/kimi-coding.js +1 -1
  44. package/dist/bundle/chunks/lib-ULKZYRGD.js +9 -0
  45. package/dist/bundle/chunks/{llama-cpp-classify-6J5XKC7Q.js → llama-cpp-classify-L4URPZ4F.js} +1 -1
  46. package/dist/bundle/chunks/meta.js +1 -1
  47. package/dist/bundle/chunks/mistral-conversations-CK2BS74V.js +5 -0
  48. package/dist/bundle/chunks/{multipart-parser-AZP5BX2W.js → multipart-parser-HMCXZ4BD.js} +1 -1
  49. package/dist/bundle/chunks/{node-BZAVEWJ3.js → node-DXZFQBEO.js} +1 -1
  50. package/dist/bundle/chunks/{node-C2JGH2OB.js → node-LBZLUIBE.js} +1 -1
  51. package/dist/bundle/chunks/openai-codex-responses-XGVNKP4D.js +10 -0
  52. package/dist/bundle/chunks/openai-completions-72XZO4Q3.js +7 -0
  53. package/dist/bundle/chunks/{openai-decisions-NDYRKL2E.js → openai-decisions-P5OCXLLD.js} +1 -1
  54. package/dist/bundle/chunks/openai-responses-RGLZ4E3Q.js +4 -0
  55. package/dist/bundle/chunks/{openrouter-images-ZIDF5HXA.js → openrouter-images-LSBWMZDK.js} +1 -1
  56. package/dist/bundle/chunks/pi-messages-CL4MEVNS.js +8 -0
  57. package/dist/bundle/chunks/radius.js +1 -1
  58. package/dist/bundle/chunks/{runtime-MZVF4MP6.js → runtime-F4362CZF.js} +1 -1
  59. package/dist/bundle/chunks/{runtime-7BIFTREJ.js → runtime-FJYRBK3O.js} +1 -1
  60. package/dist/bundle/chunks/settings-manager-T6G6KKY3.js +2 -0
  61. package/dist/bundle/chunks/src-KDGO7EGF.js +4 -0
  62. package/dist/bundle/chunks/typesafe-system-one-BFYS6AEA.js +2 -0
  63. package/dist/bundle/chunks/virtual-modules-BPZIVXNK.js +2 -0
  64. package/dist/bundle/cli-runtime.js +1 -1
  65. package/dist/bundle/index.js +1 -1
  66. package/dist/bundle/rpc-entry.js +1 -1
  67. package/dist/cli/args.d.ts.map +1 -1
  68. package/dist/cli/args.js +8 -7
  69. package/dist/cli/args.js.map +1 -1
  70. package/dist/cli/config-selector.d.ts.map +1 -1
  71. package/dist/cli/config-selector.js +3 -1
  72. package/dist/cli/config-selector.js.map +1 -1
  73. package/dist/config.d.ts +10 -0
  74. package/dist/config.d.ts.map +1 -1
  75. package/dist/config.js +24 -5
  76. package/dist/config.js.map +1 -1
  77. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  78. package/dist/core/agent-session-runtime.js +4 -3
  79. package/dist/core/agent-session-runtime.js.map +1 -1
  80. package/dist/core/agent-session.d.ts +16 -1
  81. package/dist/core/agent-session.d.ts.map +1 -1
  82. package/dist/core/agent-session.js +104 -30
  83. package/dist/core/agent-session.js.map +1 -1
  84. package/dist/core/ai-schemas.d.ts +166 -0
  85. package/dist/core/ai-schemas.d.ts.map +1 -0
  86. package/dist/core/ai-schemas.js +21 -0
  87. package/dist/core/ai-schemas.js.map +1 -0
  88. package/dist/core/auth-storage.d.ts.map +1 -1
  89. package/dist/core/auth-storage.js +3 -2
  90. package/dist/core/auth-storage.js.map +1 -1
  91. package/dist/core/bash-executor.d.ts.map +1 -1
  92. package/dist/core/bash-executor.js +3 -1
  93. package/dist/core/bash-executor.js.map +1 -1
  94. package/dist/core/bug-report.d.ts +4 -4
  95. package/dist/core/cache-warmer.d.ts.map +1 -1
  96. package/dist/core/cache-warmer.js +2 -0
  97. package/dist/core/cache-warmer.js.map +1 -1
  98. package/dist/core/compaction/branch-summarization.d.ts +4 -2
  99. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  100. package/dist/core/compaction/branch-summarization.js +16 -4
  101. package/dist/core/compaction/branch-summarization.js.map +1 -1
  102. package/dist/core/exec.d.ts +9 -1
  103. package/dist/core/exec.d.ts.map +1 -1
  104. package/dist/core/exec.js +104 -60
  105. package/dist/core/exec.js.map +1 -1
  106. package/dist/core/export-html/template.css +9 -0
  107. package/dist/core/export-html/template.js +165 -45
  108. package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
  109. package/dist/core/export-html/tool-renderer.js +3 -0
  110. package/dist/core/export-html/tool-renderer.js.map +1 -1
  111. package/dist/core/extensions/ai-extension-view.d.ts +19 -0
  112. package/dist/core/extensions/ai-extension-view.d.ts.map +1 -0
  113. package/dist/core/extensions/ai-extension-view.js +22 -0
  114. package/dist/core/extensions/ai-extension-view.js.map +1 -0
  115. package/dist/core/extensions/index.d.ts +1 -1
  116. package/dist/core/extensions/index.d.ts.map +1 -1
  117. package/dist/core/extensions/index.js.map +1 -1
  118. package/dist/core/extensions/loader.d.ts.map +1 -1
  119. package/dist/core/extensions/loader.js +15 -9
  120. package/dist/core/extensions/loader.js.map +1 -1
  121. package/dist/core/extensions/runner.d.ts +1 -0
  122. package/dist/core/extensions/runner.d.ts.map +1 -1
  123. package/dist/core/extensions/runner.js +9 -1
  124. package/dist/core/extensions/runner.js.map +1 -1
  125. package/dist/core/extensions/types.d.ts +55 -11
  126. package/dist/core/extensions/types.d.ts.map +1 -1
  127. package/dist/core/extensions/types.js.map +1 -1
  128. package/dist/core/extensions/virtual-modules.d.ts.map +1 -1
  129. package/dist/core/extensions/virtual-modules.js +6 -5
  130. package/dist/core/extensions/virtual-modules.js.map +1 -1
  131. package/dist/core/keybindings.d.ts +2 -2
  132. package/dist/core/keybindings.js +1 -1
  133. package/dist/core/keybindings.js.map +1 -1
  134. package/dist/core/mcp-servers.d.ts +21 -38
  135. package/dist/core/mcp-servers.d.ts.map +1 -1
  136. package/dist/core/mcp-servers.js +58 -134
  137. package/dist/core/mcp-servers.js.map +1 -1
  138. package/dist/core/model-config.d.ts +1717 -1990
  139. package/dist/core/model-config.d.ts.map +1 -1
  140. package/dist/core/model-config.js +2 -3
  141. package/dist/core/model-config.js.map +1 -1
  142. package/dist/core/model-resolver.d.ts.map +1 -1
  143. package/dist/core/model-resolver.js +16 -9
  144. package/dist/core/model-resolver.js.map +1 -1
  145. package/dist/core/model-runtime.d.ts.map +1 -1
  146. package/dist/core/model-runtime.js +4 -4
  147. package/dist/core/model-runtime.js.map +1 -1
  148. package/dist/core/package-manager.d.ts +24 -1
  149. package/dist/core/package-manager.d.ts.map +1 -1
  150. package/dist/core/package-manager.js +215 -52
  151. package/dist/core/package-manager.js.map +1 -1
  152. package/dist/core/pi-manifest.d.ts +1 -0
  153. package/dist/core/pi-manifest.d.ts.map +1 -1
  154. package/dist/core/pi-manifest.js +3 -0
  155. package/dist/core/pi-manifest.js.map +1 -1
  156. package/dist/core/project-trust.js +1 -1
  157. package/dist/core/project-trust.js.map +1 -1
  158. package/dist/core/provider-composer.d.ts +2 -1
  159. package/dist/core/provider-composer.d.ts.map +1 -1
  160. package/dist/core/provider-composer.js +8 -4
  161. package/dist/core/provider-composer.js.map +1 -1
  162. package/dist/core/resource-loader.d.ts +4 -1
  163. package/dist/core/resource-loader.d.ts.map +1 -1
  164. package/dist/core/resource-loader.js +38 -23
  165. package/dist/core/resource-loader.js.map +1 -1
  166. package/dist/core/sdk.d.ts.map +1 -1
  167. package/dist/core/sdk.js +3 -1
  168. package/dist/core/sdk.js.map +1 -1
  169. package/dist/core/session-manager.d.ts +7 -0
  170. package/dist/core/session-manager.d.ts.map +1 -1
  171. package/dist/core/session-manager.js +32 -13
  172. package/dist/core/session-manager.js.map +1 -1
  173. package/dist/core/settings-manager.d.ts +2 -0
  174. package/dist/core/settings-manager.d.ts.map +1 -1
  175. package/dist/core/settings-manager.js +11 -0
  176. package/dist/core/settings-manager.js.map +1 -1
  177. package/dist/core/settings-schema.d.ts +4 -2
  178. package/dist/core/settings-schema.d.ts.map +1 -1
  179. package/dist/core/settings-schema.js +8 -1
  180. package/dist/core/settings-schema.js.map +1 -1
  181. package/dist/core/skills.d.ts.map +1 -1
  182. package/dist/core/skills.js +6 -15
  183. package/dist/core/skills.js.map +1 -1
  184. package/dist/core/slash-commands.js +2 -2
  185. package/dist/core/slash-commands.js.map +1 -1
  186. package/dist/core/source-info.d.ts +9 -0
  187. package/dist/core/source-info.d.ts.map +1 -1
  188. package/dist/core/source-info.js +14 -0
  189. package/dist/core/source-info.js.map +1 -1
  190. package/dist/core/system-prompt.d.ts.map +1 -1
  191. package/dist/core/system-prompt.js +5 -6
  192. package/dist/core/system-prompt.js.map +1 -1
  193. package/dist/core/tools/bash.d.ts +2 -2
  194. package/dist/core/tools/bash.d.ts.map +1 -1
  195. package/dist/core/tools/bash.js.map +1 -1
  196. package/dist/core/tools/edit.d.ts +3 -3
  197. package/dist/core/tools/edit.d.ts.map +1 -1
  198. package/dist/core/tools/edit.js +2 -4
  199. package/dist/core/tools/edit.js.map +1 -1
  200. package/dist/core/tools/find.d.ts +2 -2
  201. package/dist/core/tools/find.d.ts.map +1 -1
  202. package/dist/core/tools/find.js +41 -25
  203. package/dist/core/tools/find.js.map +1 -1
  204. package/dist/core/tools/grep.d.ts +4 -5
  205. package/dist/core/tools/grep.d.ts.map +1 -1
  206. package/dist/core/tools/grep.js +73 -70
  207. package/dist/core/tools/grep.js.map +1 -1
  208. package/dist/core/tools/ls.d.ts +2 -2
  209. package/dist/core/tools/ls.d.ts.map +1 -1
  210. package/dist/core/tools/ls.js +2 -1
  211. package/dist/core/tools/ls.js.map +1 -1
  212. package/dist/core/tools/read.d.ts +2 -2
  213. package/dist/core/tools/read.d.ts.map +1 -1
  214. package/dist/core/tools/read.js.map +1 -1
  215. package/dist/core/tools/render-utils.d.ts.map +1 -1
  216. package/dist/core/tools/render-utils.js +2 -7
  217. package/dist/core/tools/render-utils.js.map +1 -1
  218. package/dist/core/tools/renderers/write.d.ts.map +1 -1
  219. package/dist/core/tools/renderers/write.js +19 -19
  220. package/dist/core/tools/renderers/write.js.map +1 -1
  221. package/dist/core/tools/tool-definition-wrapper.d.ts +11 -1
  222. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
  223. package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
  224. package/dist/core/tools/truncate.d.ts +0 -14
  225. package/dist/core/tools/truncate.d.ts.map +1 -1
  226. package/dist/core/tools/truncate.js +0 -29
  227. package/dist/core/tools/truncate.js.map +1 -1
  228. package/dist/core/tools/write.d.ts +2 -2
  229. package/dist/core/tools/write.d.ts.map +1 -1
  230. package/dist/core/tools/write.js.map +1 -1
  231. package/dist/core/trust-manager.d.ts.map +1 -1
  232. package/dist/core/trust-manager.js +15 -8
  233. package/dist/core/trust-manager.js.map +1 -1
  234. package/dist/core/usage-totals.d.ts.map +1 -1
  235. package/dist/core/usage-totals.js +2 -0
  236. package/dist/core/usage-totals.js.map +1 -1
  237. package/dist/extensions/codemode/renderer.d.ts.map +1 -1
  238. package/dist/extensions/codemode/renderer.js +6 -2
  239. package/dist/extensions/codemode/renderer.js.map +1 -1
  240. package/dist/extensions/codemode/tool.d.ts +2 -1
  241. package/dist/extensions/codemode/tool.d.ts.map +1 -1
  242. package/dist/extensions/codemode/tool.js +33 -8
  243. package/dist/extensions/codemode/tool.js.map +1 -1
  244. package/dist/extensions/llama/client.d.ts +2 -0
  245. package/dist/extensions/llama/client.d.ts.map +1 -1
  246. package/dist/extensions/llama/client.js +23 -2
  247. package/dist/extensions/llama/client.js.map +1 -1
  248. package/dist/extensions/llama/ui.d.ts.map +1 -1
  249. package/dist/extensions/llama/ui.js +16 -4
  250. package/dist/extensions/llama/ui.js.map +1 -1
  251. package/dist/extensions/mcp/cli.d.ts +2 -0
  252. package/dist/extensions/mcp/cli.d.ts.map +1 -1
  253. package/dist/extensions/mcp/cli.js +72 -15
  254. package/dist/extensions/mcp/cli.js.map +1 -1
  255. package/dist/extensions/mcp/config.d.ts.map +1 -1
  256. package/dist/extensions/mcp/config.js +4 -7
  257. package/dist/extensions/mcp/config.js.map +1 -1
  258. package/dist/extensions/mcp/index.d.ts.map +1 -1
  259. package/dist/extensions/mcp/index.js +2 -2
  260. package/dist/extensions/mcp/index.js.map +1 -1
  261. package/dist/extensions/mcp/oauth.d.ts +13 -50
  262. package/dist/extensions/mcp/oauth.d.ts.map +1 -1
  263. package/dist/extensions/mcp/oauth.js +53 -319
  264. package/dist/extensions/mcp/oauth.js.map +1 -1
  265. package/dist/extensions/mcp/resources.d.ts +1 -1
  266. package/dist/extensions/mcp/resources.d.ts.map +1 -1
  267. package/dist/extensions/mcp/resources.js +4 -3
  268. package/dist/extensions/mcp/resources.js.map +1 -1
  269. package/dist/extensions/mcp/runtime.d.ts +4 -3
  270. package/dist/extensions/mcp/runtime.d.ts.map +1 -1
  271. package/dist/extensions/mcp/runtime.js +4 -3
  272. package/dist/extensions/mcp/runtime.js.map +1 -1
  273. package/dist/extensions/mcp/tools.d.ts +2 -23
  274. package/dist/extensions/mcp/tools.d.ts.map +1 -1
  275. package/dist/extensions/mcp/tools.js +6 -58
  276. package/dist/extensions/mcp/tools.js.map +1 -1
  277. package/dist/extensions/mcp/ui.d.ts +1 -0
  278. package/dist/extensions/mcp/ui.d.ts.map +1 -1
  279. package/dist/extensions/mcp/ui.js +33 -24
  280. package/dist/extensions/mcp/ui.js.map +1 -1
  281. package/dist/extensions/tool-search/tool.d.ts +21 -6
  282. package/dist/extensions/tool-search/tool.d.ts.map +1 -1
  283. package/dist/extensions/tool-search/tool.js +104 -36
  284. package/dist/extensions/tool-search/tool.js.map +1 -1
  285. package/dist/index.d.ts +2 -2
  286. package/dist/index.d.ts.map +1 -1
  287. package/dist/index.js.map +1 -1
  288. package/dist/main.d.ts.map +1 -1
  289. package/dist/main.js +16 -8
  290. package/dist/main.js.map +1 -1
  291. package/dist/modes/interactive/components/assistant-message.d.ts +4 -1
  292. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  293. package/dist/modes/interactive/components/assistant-message.js +44 -20
  294. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  295. package/dist/modes/interactive/components/branch-summary-message.d.ts +5 -1
  296. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  297. package/dist/modes/interactive/components/branch-summary-message.js +12 -4
  298. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  299. package/dist/modes/interactive/components/compaction-summary-message.d.ts +5 -1
  300. package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
  301. package/dist/modes/interactive/components/compaction-summary-message.js +12 -4
  302. package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
  303. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
  304. package/dist/modes/interactive/components/config-selector.js +4 -18
  305. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  306. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  307. package/dist/modes/interactive/components/custom-editor.js +7 -0
  308. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  309. package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
  310. package/dist/modes/interactive/components/custom-entry.js +2 -1
  311. package/dist/modes/interactive/components/custom-entry.js.map +1 -1
  312. package/dist/modes/interactive/components/custom-message.d.ts +5 -2
  313. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  314. package/dist/modes/interactive/components/custom-message.js +12 -4
  315. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  316. package/dist/modes/interactive/components/diff.d.ts.map +1 -1
  317. package/dist/modes/interactive/components/diff.js +11 -5
  318. package/dist/modes/interactive/components/diff.js.map +1 -1
  319. package/dist/modes/interactive/components/extension-editor.d.ts +2 -0
  320. package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
  321. package/dist/modes/interactive/components/extension-editor.js +4 -0
  322. package/dist/modes/interactive/components/extension-editor.js.map +1 -1
  323. package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
  324. package/dist/modes/interactive/components/extension-selector.js +9 -1
  325. package/dist/modes/interactive/components/extension-selector.js.map +1 -1
  326. package/dist/modes/interactive/components/login-dialog.d.ts +5 -0
  327. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  328. package/dist/modes/interactive/components/login-dialog.js +104 -10
  329. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  330. package/dist/modes/interactive/components/markdown-transform.d.ts +2 -1
  331. package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -1
  332. package/dist/modes/interactive/components/markdown-transform.js +3 -2
  333. package/dist/modes/interactive/components/markdown-transform.js.map +1 -1
  334. package/dist/modes/interactive/components/mermaid.d.ts +2 -1
  335. package/dist/modes/interactive/components/mermaid.d.ts.map +1 -1
  336. package/dist/modes/interactive/components/mermaid.js +25 -20
  337. package/dist/modes/interactive/components/mermaid.js.map +1 -1
  338. package/dist/modes/interactive/components/model-selector.d.ts +1 -0
  339. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  340. package/dist/modes/interactive/components/model-selector.js +17 -6
  341. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  342. package/dist/modes/interactive/components/oauth-selector.d.ts +1 -0
  343. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  344. package/dist/modes/interactive/components/oauth-selector.js +13 -4
  345. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  346. package/dist/modes/interactive/components/scoped-models-selector.d.ts +1 -0
  347. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
  348. package/dist/modes/interactive/components/scoped-models-selector.js +14 -3
  349. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  350. package/dist/modes/interactive/components/session-selector-search.d.ts +4 -0
  351. package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
  352. package/dist/modes/interactive/components/session-selector-search.js +86 -22
  353. package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
  354. package/dist/modes/interactive/components/session-selector.d.ts +2 -1
  355. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  356. package/dist/modes/interactive/components/session-selector.js +20 -27
  357. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  358. package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -1
  359. package/dist/modes/interactive/components/settings-submenu.js +2 -0
  360. package/dist/modes/interactive/components/settings-submenu.js.map +1 -1
  361. package/dist/modes/interactive/components/skill-invocation-message.d.ts +5 -1
  362. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  363. package/dist/modes/interactive/components/skill-invocation-message.js +12 -4
  364. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  365. package/dist/modes/interactive/components/tool-execution.d.ts +6 -0
  366. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  367. package/dist/modes/interactive/components/tool-execution.js +14 -2
  368. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  369. package/dist/modes/interactive/components/tree-selector.d.ts +2 -0
  370. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  371. package/dist/modes/interactive/components/tree-selector.js +24 -16
  372. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  373. package/dist/modes/interactive/components/user-message-selector.d.ts +1 -0
  374. package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
  375. package/dist/modes/interactive/components/user-message-selector.js +9 -1
  376. package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
  377. package/dist/modes/interactive/components/user-message.d.ts +3 -1
  378. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  379. package/dist/modes/interactive/components/user-message.js +6 -2
  380. package/dist/modes/interactive/components/user-message.js.map +1 -1
  381. package/dist/modes/interactive/external-editor.d.ts +1 -0
  382. package/dist/modes/interactive/external-editor.d.ts.map +1 -1
  383. package/dist/modes/interactive/external-editor.js +16 -4
  384. package/dist/modes/interactive/external-editor.js.map +1 -1
  385. package/dist/modes/interactive/interactive-mode.d.ts +7 -0
  386. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  387. package/dist/modes/interactive/interactive-mode.js +179 -53
  388. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  389. package/dist/modes/interactive/model-search.d.ts +10 -0
  390. package/dist/modes/interactive/model-search.d.ts.map +1 -1
  391. package/dist/modes/interactive/model-search.js +21 -0
  392. package/dist/modes/interactive/model-search.js.map +1 -1
  393. package/dist/modes/interactive/theme/theme.d.ts +10 -0
  394. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  395. package/dist/modes/interactive/theme/theme.js +35 -23
  396. package/dist/modes/interactive/theme/theme.js.map +1 -1
  397. package/dist/modes/print-mode.d.ts.map +1 -1
  398. package/dist/modes/print-mode.js +19 -10
  399. package/dist/modes/print-mode.js.map +1 -1
  400. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  401. package/dist/modes/rpc/rpc-mode.js +53 -23
  402. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  403. package/dist/package-manager-cli.d.ts.map +1 -1
  404. package/dist/package-manager-cli.js +78 -9
  405. package/dist/package-manager-cli.js.map +1 -1
  406. package/dist/utils/ansi.d.ts.map +1 -1
  407. package/dist/utils/ansi.js +5 -2
  408. package/dist/utils/ansi.js.map +1 -1
  409. package/dist/utils/changelog.d.ts +2 -2
  410. package/dist/utils/changelog.d.ts.map +1 -1
  411. package/dist/utils/changelog.js +15 -2
  412. package/dist/utils/changelog.js.map +1 -1
  413. package/dist/utils/clipboard-command.d.ts.map +1 -1
  414. package/dist/utils/clipboard-command.js +4 -0
  415. package/dist/utils/clipboard-command.js.map +1 -1
  416. package/dist/utils/git.d.ts +1 -1
  417. package/dist/utils/git.d.ts.map +1 -1
  418. package/dist/utils/git.js.map +1 -1
  419. package/dist/utils/image-resize-core.d.ts.map +1 -1
  420. package/dist/utils/image-resize-core.js +5 -3
  421. package/dist/utils/image-resize-core.js.map +1 -1
  422. package/dist/utils/open-browser.d.ts.map +1 -1
  423. package/dist/utils/open-browser.js +4 -1
  424. package/dist/utils/open-browser.js.map +1 -1
  425. package/dist/utils/paths.d.ts +17 -0
  426. package/dist/utils/paths.d.ts.map +1 -1
  427. package/dist/utils/paths.js +42 -1
  428. package/dist/utils/paths.js.map +1 -1
  429. package/dist/utils/shell.d.ts.map +1 -1
  430. package/dist/utils/shell.js +14 -0
  431. package/dist/utils/shell.js.map +1 -1
  432. package/dist/utils/syntax-highlight.d.ts +5 -0
  433. package/dist/utils/syntax-highlight.d.ts.map +1 -1
  434. package/dist/utils/syntax-highlight.js +7 -0
  435. package/dist/utils/syntax-highlight.js.map +1 -1
  436. package/dist/utils/tools-manager.d.ts.map +1 -1
  437. package/dist/utils/tools-manager.js +30 -35
  438. package/dist/utils/tools-manager.js.map +1 -1
  439. package/docs/cli.md +22 -10
  440. package/docs/custom-provider.md +2 -0
  441. package/docs/environment-variables.md +2 -0
  442. package/docs/extensions.md +3201 -233
  443. package/docs/keybindings.md +2 -2
  444. package/docs/llama-cpp.md +23 -15
  445. package/docs/message-types.md +1 -1
  446. package/docs/models-configuration.md +17 -4
  447. package/docs/models.md +9 -4
  448. package/docs/packages.md +24 -0
  449. package/docs/providers.md +1 -1
  450. package/docs/rpc.md +3 -1
  451. package/docs/sessions.md +11 -3
  452. package/docs/settings.md +5 -4
  453. package/docs/slash-commands.md +3 -2
  454. package/docs/terminal-setup.md +3 -1
  455. package/docs/tmux.md +6 -0
  456. package/docs/tui.md +2 -0
  457. package/docs/windows.md +27 -0
  458. package/eval/drahtbank/isolated-tools.ts +0 -1
  459. package/examples/extensions/antigravity-image-gen.ts +1 -1
  460. package/examples/extensions/custom-provider-anthropic/index.ts +27 -31
  461. package/examples/extensions/debug-provider.ts +2 -2
  462. package/examples/extensions/gondolin/package.json +1 -1
  463. package/examples/extensions/plan-mode/index.ts +23 -13
  464. package/examples/extensions/plan-mode/utils.ts +42 -16
  465. package/examples/extensions/preset.ts +2 -0
  466. package/examples/extensions/reload-runtime.ts +17 -5
  467. package/examples/extensions/sandbox/package-lock.json +15 -41
  468. package/examples/extensions/sandbox/package.json +1 -1
  469. package/examples/extensions/subagent/index.ts +388 -171
  470. package/examples/extensions/todo.ts +7 -0
  471. package/examples/extensions/tools.ts +2 -0
  472. package/examples/tsconfig.json +188 -0
  473. package/package.json +15 -16
  474. package/schemas/models.schema.json +85 -39
  475. package/schemas/settings.schema.json +17 -0
  476. package/dist/bundle/chunks/anthropic-messages-OR5LCIS6.js +0 -6
  477. package/dist/bundle/chunks/azure-openai-responses-D6DVM232.js +0 -2
  478. package/dist/bundle/chunks/chunk-2MJ6J5N2.js +0 -6
  479. package/dist/bundle/chunks/chunk-2RI4GIFP.js +0 -166
  480. package/dist/bundle/chunks/chunk-57PET6SW.js +0 -82
  481. package/dist/bundle/chunks/chunk-6MSE6LZ3.js +0 -6
  482. package/dist/bundle/chunks/chunk-736QBNUZ.js +0 -12
  483. package/dist/bundle/chunks/chunk-76YNMQ57.js +0 -2
  484. package/dist/bundle/chunks/chunk-7JJWQ53O.js +0 -1428
  485. package/dist/bundle/chunks/chunk-AEG546ID.js +0 -16
  486. package/dist/bundle/chunks/chunk-CKPJSVRD.js +0 -2
  487. package/dist/bundle/chunks/chunk-CMKX4CSI.js +0 -6
  488. package/dist/bundle/chunks/chunk-DLEJ4D4T.js +0 -2
  489. package/dist/bundle/chunks/chunk-FXCTQRNN.js +0 -2
  490. package/dist/bundle/chunks/chunk-KINQOWAP.js +0 -4
  491. package/dist/bundle/chunks/chunk-LK54N67E.js +0 -7
  492. package/dist/bundle/chunks/chunk-QJADVGUY.js +0 -2
  493. package/dist/bundle/chunks/chunk-QMN7OD6G.js +0 -2
  494. package/dist/bundle/chunks/chunk-SYRVFGYE.js +0 -2
  495. package/dist/bundle/chunks/chunk-TIA2T6EO.js +0 -3
  496. package/dist/bundle/chunks/chunk-X4UBYFTC.js +0 -11
  497. package/dist/bundle/chunks/chunk-XB4F3WGD.js +0 -132
  498. package/dist/bundle/chunks/chunk-XOGEYN4Q.js +0 -2
  499. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-YVG4FYXV.js +0 -2
  500. package/dist/bundle/chunks/https-proxy-agent-O2PVUIOI.js +0 -13
  501. package/dist/bundle/chunks/lib-XOG5PI3Y.js +0 -9
  502. package/dist/bundle/chunks/mistral-conversations-D3JRG6BL.js +0 -5
  503. package/dist/bundle/chunks/openai-codex-responses-CBOPSGUQ.js +0 -10
  504. package/dist/bundle/chunks/openai-completions-LDMDMEF2.js +0 -7
  505. package/dist/bundle/chunks/openai-responses-EZWJOXWT.js +0 -4
  506. package/dist/bundle/chunks/pi-messages-R75QWB4G.js +0 -8
  507. package/dist/bundle/chunks/settings-manager-QF6DRH5C.js +0 -2
  508. package/dist/bundle/chunks/src-TIBHS42X.js +0 -4
  509. package/dist/bundle/chunks/typesafe-system-one-YUNLPYVG.js +0 -2
  510. package/dist/bundle/chunks/virtual-modules-4DJB4LTP.js +0 -2
  511. /package/dist/bundle/chunks/{chunk-UQSONZLL.js → chunk-DN7SM3LX.js} +0 -0
  512. /package/dist/bundle/chunks/{chunk-ZZD35WKM.js → chunk-MOOADNVS.js} +0 -0
@@ -33,6 +33,7 @@ import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../cor
33
33
  import { SessionManager, sessionEntryToContextMessages, } from "../../core/session-manager.js";
34
34
  import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
35
35
  import { boundedSafeText } from "../../core/socket-server/safe-text.js";
36
+ import { getSourcePackageKey } from "../../core/source-info.js";
36
37
  import { withBuiltInRenderers } from "../../core/tools/renderers/index.js";
37
38
  import { hasTrustRequiringProjectResources, ProjectTrustStore } from "../../core/trust-manager.js";
38
39
  import { getUsageCostBreakdown } from "../../core/usage-totals.js";
@@ -43,9 +44,10 @@ import { extensionForImageMimeType, readClipboardImage } from "../../utils/clipb
43
44
  import { parseGitUrl } from "../../utils/git.js";
44
45
  import { ensurePngTranscoder } from "../../utils/image-convert.js";
45
46
  import { sendTerminalNotification } from "../../utils/notify.js";
46
- import { getCwdRelativePath } from "../../utils/paths.js";
47
+ import { getCwdRelativePath, shortenHomePath } from "../../utils/paths.js";
47
48
  import { killTrackedDetachedChildren } from "../../utils/shell.js";
48
49
  import { loadAllHighlightLanguages } from "../../utils/syntax-highlight.js";
50
+ import { stripBom } from "../../utils/text.js";
49
51
  import { ensureTool } from "../../utils/tools-manager.js";
50
52
  import { checkForNewPiVersion } from "../../utils/version-check.js";
51
53
  import { reportBug } from "./bug-report.js";
@@ -67,6 +69,7 @@ import { boundDialogText, ExtensionSelectorComponent, MAX_DETAIL_ROWS } from "./
67
69
  import { FooterComponent, formatTokens } from "./components/footer.js";
68
70
  import { formatKeyText, keyDisplayText, keyHint, keyText, rawKeyHint } from "./components/keybinding-hints.js";
69
71
  import { LoginDialogComponent } from "./components/login-dialog.js";
72
+ import { createMarkdownTransform } from "./components/markdown-transform.js";
70
73
  import { createMermaidMarkdownTransformer } from "./components/mermaid.js";
71
74
  import { ModelSelectorComponent } from "./components/model-selector.js";
72
75
  import { formatAuthSelectorProviderStatus, formatAuthSelectorProviderType, OAuthSelectorComponent, } from "./components/oauth-selector.js";
@@ -266,6 +269,7 @@ export class InteractiveMode {
266
269
  lastSigintTime = 0;
267
270
  lastEscapeTime = 0;
268
271
  changelogMarkdown = undefined;
272
+ extensionChangelogUpdates = [];
269
273
  startupNoticesShown = false;
270
274
  anthropicSubscriptionWarningShown = false;
271
275
  // Status line tracking (for mutating immediately-sequential status updates)
@@ -567,24 +571,44 @@ export class InteractiveMode {
567
571
  return;
568
572
  }
569
573
  this.startupNoticesShown = true;
570
- if (!this.changelogMarkdown) {
574
+ if (!this.changelogMarkdown && this.extensionChangelogUpdates.length === 0) {
571
575
  return;
572
576
  }
573
577
  if (this.chatContainer.children.length > 0) {
574
578
  this.chatContainer.addChild(new Spacer(1));
575
579
  }
576
580
  this.chatContainer.addChild(new DynamicBorder());
577
- if (this.settingsManager.getCollapseChangelog()) {
578
- const versionMatch = this.changelogMarkdown.match(/##\s+\[?(\d+\.\d+\.\d+)\]?/);
579
- const latestVersion = versionMatch ? versionMatch[1] : this.version;
580
- const condensedText = `Updated to v${latestVersion}. Use ${theme.bold("/changelog")} to view full changelog.`;
581
- this.chatContainer.addChild(new Text(condensedText, 1, 0));
581
+ if (this.changelogMarkdown) {
582
+ if (this.settingsManager.getCollapseChangelog()) {
583
+ const versionMatch = this.changelogMarkdown.match(/##\s+\[?(\d+\.\d+\.\d+)\]?/);
584
+ const latestVersion = versionMatch ? versionMatch[1] : this.version;
585
+ const condensedText = `Updated to v${latestVersion}. Use ${theme.bold("/changelog")} to view full changelog.`;
586
+ this.chatContainer.addChild(new Text(condensedText, 1, 0));
587
+ }
588
+ else {
589
+ this.chatContainer.addChild(new ThemedText(() => theme.bold(theme.fg("accent", "What's New")), 1, 0));
590
+ this.chatContainer.addChild(new Spacer(1));
591
+ this.chatContainer.addChild(this.createChangelogMarkdown(this.changelogMarkdown.trim(), 1, 0));
592
+ this.chatContainer.addChild(new Spacer(1));
593
+ }
582
594
  }
583
- else {
584
- this.chatContainer.addChild(new ThemedText(() => theme.bold(theme.fg("accent", "What's New")), 1, 0));
585
- this.chatContainer.addChild(new Spacer(1));
586
- this.chatContainer.addChild(new Markdown(this.changelogMarkdown.trim(), 1, 0, this.getMarkdownThemeWithSettings()));
587
- this.chatContainer.addChild(new Spacer(1));
595
+ if (this.extensionChangelogUpdates.length > 0) {
596
+ if (this.changelogMarkdown) {
597
+ this.chatContainer.addChild(new Spacer(1));
598
+ }
599
+ if (this.settingsManager.getCollapseChangelog()) {
600
+ const condensedText = this.extensionChangelogUpdates
601
+ .map((update) => `Updated ${update.name} to v${update.version}.`)
602
+ .join("\n");
603
+ this.chatContainer.addChild(new Text(condensedText, 1, 0));
604
+ }
605
+ else {
606
+ this.chatContainer.addChild(new ThemedText(() => theme.bold(theme.fg("accent", "Extension Updates")), 1, 0));
607
+ this.chatContainer.addChild(new Spacer(1));
608
+ const markdown = this.extensionChangelogUpdates.map((update) => update.markdown).join("\n\n");
609
+ this.chatContainer.addChild(this.createChangelogMarkdown(markdown, 1, 0));
610
+ this.chatContainer.addChild(new Spacer(1));
611
+ }
588
612
  }
589
613
  this.chatContainer.addChild(new DynamicBorder());
590
614
  }
@@ -661,20 +685,15 @@ export class InteractiveMode {
661
685
  if (this.isInitialized)
662
686
  return;
663
687
  this.registerSignalHandlers();
664
- // Load changelog (only show new entries, skip for resumed sessions)
688
+ // Load changelogs (only show new entries, skip for resumed sessions)
665
689
  this.changelogMarkdown = this.getChangelogForDisplay();
666
- if (this.session.scopedModels.length > 0 && this.shouldShowStartupDetails()) {
667
- const modelList = this.session.scopedModels
668
- .map((sm) => {
669
- const thinkingStr = sm.thinkingLevel ? `:${sm.thinkingLevel}` : "";
670
- return `${sm.model.id}${thinkingStr}`;
671
- })
672
- .join(", ");
673
- const cycleKeys = this.keybindings.getKeys("app.model.cycleForward");
674
- const cycleHint = cycleKeys.length > 0
675
- ? theme.fg("muted", ` (${formatKeyText(cycleKeys.join("/"), { capitalize: true })} to cycle)`)
676
- : "";
677
- console.log(theme.fg("dim", `Model scope: ${modelList}${cycleHint}`));
690
+ this.extensionChangelogUpdates = this.getExtensionChangelogUpdates();
691
+ // Fullscreen renders on the alternate screen, so text printed to stdout here would stay in the shell
692
+ // after exit. Fullscreen shows the notice in the header instead (#11508).
693
+ if (this.renderer.mode !== "fullscreen") {
694
+ const modelScopeNotice = this.getModelScopeNotice();
695
+ if (modelScopeNotice)
696
+ console.log(modelScopeNotice);
678
697
  }
679
698
  // Keep one component tree and remount it when changing renderers.
680
699
  this.renderWidgets(); // Initialize with default spacer
@@ -781,6 +800,8 @@ export class InteractiveMode {
781
800
  this.builtInHeader = new Text("", 0, 0);
782
801
  this.headerContainer.addChild(this.builtInHeader);
783
802
  }
803
+ if (this.renderer.mode === "fullscreen")
804
+ this.showFullscreenModelScopeNotice();
784
805
  this.ui.requestRender();
785
806
  // Ensure fd and rg are available after mounting the TUI (downloads if missing, adds to PATH via getBinDir)
786
807
  // so slow downloads do not make startup appear frozen.
@@ -1010,12 +1031,74 @@ export class InteractiveMode {
1010
1031
  return undefined;
1011
1032
  }
1012
1033
  const newEntries = getNewEntries(entries, lastVersion);
1034
+ if (!newEntries) {
1035
+ // Unreadable saved version: show nothing and record the current one so later updates compare again
1036
+ this.settingsManager.setLastChangelogVersion(VERSION);
1037
+ return undefined;
1038
+ }
1013
1039
  if (newEntries.length > 0) {
1014
1040
  this.settingsManager.setLastChangelogVersion(VERSION);
1015
1041
  return newEntries.map((e) => normalizeChangelogLinks(e.content, e)).join("\n\n");
1016
1042
  }
1017
1043
  return undefined;
1018
1044
  }
1045
+ getExtensionChangelogUpdates() {
1046
+ // Skip changelog for resumed/continued sessions (already have messages)
1047
+ if (this.session.state.messages.length > 0) {
1048
+ return [];
1049
+ }
1050
+ const seenKeys = new Set();
1051
+ const updates = [];
1052
+ for (const { sourceInfo } of this.session.resourceLoader.getExtensions().extensions) {
1053
+ if (sourceInfo.origin !== "package" || !sourceInfo.baseDir || !sourceInfo.changelogPath) {
1054
+ continue;
1055
+ }
1056
+ const key = getSourcePackageKey(sourceInfo);
1057
+ if (seenKeys.has(key)) {
1058
+ continue;
1059
+ }
1060
+ seenKeys.add(key);
1061
+ const pkg = this.readPackageJson(sourceInfo.baseDir);
1062
+ if (!pkg?.version) {
1063
+ continue;
1064
+ }
1065
+ const lastVersion = this.settingsManager.getExtensionChangelogVersion(key);
1066
+ if (!lastVersion) {
1067
+ // Fresh install - record the version, don't show changelog
1068
+ this.settingsManager.setExtensionChangelogVersion(key, pkg.version);
1069
+ continue;
1070
+ }
1071
+ const newEntries = getNewEntries(parseChangelog(sourceInfo.changelogPath), lastVersion);
1072
+ if (!newEntries) {
1073
+ // Unreadable saved version: show nothing and record the current one so later updates compare again
1074
+ this.settingsManager.setExtensionChangelogVersion(key, pkg.version);
1075
+ continue;
1076
+ }
1077
+ if (newEntries.length > 0) {
1078
+ this.settingsManager.setExtensionChangelogVersion(key, pkg.version);
1079
+ const name = pkg.name || sourceInfo.source;
1080
+ // Prefix each "## [x.y.z]" heading with the package name so entries render like draht's own.
1081
+ const markdown = newEntries
1082
+ .map((entry) => entry.content.replace(/^##\s+/, `## ${name} `))
1083
+ .join("\n\n")
1084
+ .trim();
1085
+ updates.push({ name, version: pkg.version, markdown });
1086
+ }
1087
+ }
1088
+ return updates;
1089
+ }
1090
+ readPackageJson(packageRoot) {
1091
+ try {
1092
+ const pkg = JSON.parse(stripBom(fs.readFileSync(path.join(packageRoot, "package.json"), "utf-8")));
1093
+ return {
1094
+ name: typeof pkg.name === "string" ? pkg.name : undefined,
1095
+ version: typeof pkg.version === "string" ? pkg.version : undefined,
1096
+ };
1097
+ }
1098
+ catch {
1099
+ return undefined;
1100
+ }
1101
+ }
1019
1102
  getMarkdownThemeWithSettings() {
1020
1103
  return {
1021
1104
  ...getMarkdownTheme(),
@@ -1026,13 +1109,7 @@ export class InteractiveMode {
1026
1109
  // Extension System
1027
1110
  // =========================================================================
1028
1111
  formatDisplayPath(p) {
1029
- const home = os.homedir();
1030
- let result = p;
1031
- // Replace home directory with ~
1032
- if (result.startsWith(home)) {
1033
- result = `~${result.slice(home.length)}`;
1034
- }
1035
- return result;
1112
+ return shortenHomePath(p);
1036
1113
  }
1037
1114
  formatExtensionDisplayPath(path) {
1038
1115
  let result = this.formatDisplayPath(path);
@@ -1056,6 +1133,27 @@ export class InteractiveMode {
1056
1133
  return this.options.verbose === true || this.settingsManager.getQuietStartup() !== true;
1057
1134
  }
1058
1135
  /** Startup details (model scope, loaded resources). Hidden by quietStartup: true or "header". */
1136
+ getModelScopeNotice() {
1137
+ if (this.session.scopedModels.length === 0 || !this.shouldShowStartupDetails())
1138
+ return undefined;
1139
+ const modelList = this.session.scopedModels
1140
+ .map((sm) => {
1141
+ const thinkingStr = sm.thinkingLevel ? `:${sm.thinkingLevel}` : "";
1142
+ return `${sm.model.id}${thinkingStr}`;
1143
+ })
1144
+ .join(", ");
1145
+ const cycleKeys = this.keybindings.getKeys("app.model.cycleForward");
1146
+ const cycleHint = cycleKeys.length > 0
1147
+ ? theme.fg("muted", ` (${formatKeyText(cycleKeys.join("/"), { capitalize: true })} to cycle)`)
1148
+ : "";
1149
+ return theme.fg("dim", `Model scope: ${modelList}${cycleHint}`);
1150
+ }
1151
+ showFullscreenModelScopeNotice() {
1152
+ if (!this.getModelScopeNotice())
1153
+ return;
1154
+ this.headerContainer.addChild(new ThemedText(() => this.getModelScopeNotice() ?? "", 1, 0));
1155
+ this.headerContainer.addChild(new Spacer(1));
1156
+ }
1059
1157
  shouldShowStartupDetails() {
1060
1158
  return this.options.verbose === true || this.settingsManager.getQuietStartup() === false;
1061
1159
  }
@@ -1426,7 +1524,7 @@ export class InteractiveMode {
1426
1524
  const skillDiagnostics = skillsResult.diagnostics;
1427
1525
  if (skillDiagnostics.length > 0) {
1428
1526
  const warningLines = () => this.formatDiagnostics(skillDiagnostics, sourceInfos);
1429
- this.loadedResourcesContainer.addChild(new ThemedText(() => `${theme.fg("warning", "[Skill conflicts]")}\n${warningLines()}`, 0, 0));
1527
+ this.loadedResourcesContainer.addChild(new ThemedText(() => `${theme.fg("warning", "[Skill warnings]")}\n${warningLines()}`, 0, 0));
1430
1528
  this.loadedResourcesContainer.addChild(new Spacer(1));
1431
1529
  }
1432
1530
  const promptDiagnostics = promptsResult.diagnostics;
@@ -1703,6 +1801,12 @@ export class InteractiveMode {
1703
1801
  getMarkdownTransformers() {
1704
1802
  return [this.mermaidMarkdownTransformer, ...this.session.extensionRunner.getMarkdownTransformers()];
1705
1803
  }
1804
+ /** Markdown of a changelog or release note that runs the Markdown transformers of the `changelog` type. */
1805
+ createChangelogMarkdown(markdown, paddingX, paddingY, defaultTextStyle) {
1806
+ return new Markdown(markdown, paddingX, paddingY, this.getMarkdownThemeWithSettings(), defaultTextStyle, {
1807
+ transform: createMarkdownTransform("changelog", () => false, this.getMarkdownTransformers()),
1808
+ });
1809
+ }
1706
1810
  /**
1707
1811
  * Set up keyboard shortcuts registered by extensions.
1708
1812
  */
@@ -2352,9 +2456,13 @@ export class InteractiveMode {
2352
2456
  setCustomEditorComponent(factory) {
2353
2457
  this.editorComponentFactory = factory;
2354
2458
  // Save text from current editor before switching
2355
- const currentText = this.editor.getText();
2356
- this.disposeActiveSelector();
2357
- this.editorContainer.clear();
2459
+ const currentText = this.editor.getExpandedText?.() ?? this.editor.getText();
2460
+ // An open extension dialog keeps the editor slot; the new editor is shown when the last dialog closes.
2461
+ const dialogOpen = this.extensionDialogs.length > 0;
2462
+ if (!dialogOpen) {
2463
+ this.disposeActiveSelector();
2464
+ this.editorContainer.clear();
2465
+ }
2358
2466
  if (factory) {
2359
2467
  // Create the custom editor with tui, theme, and keybindings
2360
2468
  const newEditor = factory(this.ui, getEditorTheme(), this.keybindings);
@@ -2405,7 +2513,8 @@ export class InteractiveMode {
2405
2513
  this.defaultEditor.setText(currentText);
2406
2514
  this.editor = this.defaultEditor;
2407
2515
  }
2408
- this.editorContainer.addChild(this.editor);
2516
+ if (!dialogOpen)
2517
+ this.editorContainer.addChild(this.editor);
2409
2518
  if (this.activeStatusIndicator) {
2410
2519
  this.statusContainer.clear();
2411
2520
  this.activeWorkingIndicatorEmbedded = this.setEditorWorkingStatusIndicator(this.activeStatusIndicator);
@@ -2413,7 +2522,8 @@ export class InteractiveMode {
2413
2522
  this.statusContainer.addChild(this.activeStatusIndicator);
2414
2523
  }
2415
2524
  }
2416
- this.ui.setFocus(this.editor);
2525
+ if (!dialogOpen)
2526
+ this.ui.setFocus(this.editor);
2417
2527
  this.ui.requestRender();
2418
2528
  }
2419
2529
  /**
@@ -2432,7 +2542,7 @@ export class InteractiveMode {
2432
2542
  }
2433
2543
  /** Show a custom component with keyboard focus. Overlay mode renders on top of existing content. */
2434
2544
  async showExtensionCustom(factory, options) {
2435
- const savedText = this.editor.getText();
2545
+ const savedText = this.editor.getExpandedText?.() ?? this.editor.getText();
2436
2546
  const isOverlay = options?.overlay ?? false;
2437
2547
  return new Promise((resolve, reject) => {
2438
2548
  let component;
@@ -2488,7 +2598,7 @@ export class InteractiveMode {
2488
2598
  this.pushExtensionDialog({
2489
2599
  component: c,
2490
2600
  kind: "custom",
2491
- blocked: undefined,
2601
+ blocked: options?.blocked,
2492
2602
  // A custom component has no neutral answer, so a reset rejects rather than strand the caller.
2493
2603
  failClosed: () => {
2494
2604
  if (closed)
@@ -3307,7 +3417,7 @@ export class InteractiveMode {
3307
3417
  case "custom": {
3308
3418
  if (message.display) {
3309
3419
  const renderer = this.session.extensionRunner.getMessageRenderer(message.customType);
3310
- const component = new CustomMessageComponent(message, renderer, this.getMarkdownThemeWithSettings(), this.outputPad);
3420
+ const component = new CustomMessageComponent(message, renderer, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
3311
3421
  component.setExpanded(this.toolOutputExpanded);
3312
3422
  this.chatContainer.addChild(component);
3313
3423
  }
@@ -3315,14 +3425,14 @@ export class InteractiveMode {
3315
3425
  }
3316
3426
  case "compactionSummary": {
3317
3427
  this.chatContainer.addChild(new Spacer(1));
3318
- const component = new CompactionSummaryMessageComponent(message, this.getMarkdownThemeWithSettings(), this.outputPad);
3428
+ const component = new CompactionSummaryMessageComponent(message, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
3319
3429
  component.setExpanded(this.toolOutputExpanded);
3320
3430
  this.chatContainer.addChild(component);
3321
3431
  break;
3322
3432
  }
3323
3433
  case "branchSummary": {
3324
3434
  this.chatContainer.addChild(new Spacer(1));
3325
- const component = new BranchSummaryMessageComponent(message, this.getMarkdownThemeWithSettings(), this.outputPad);
3435
+ const component = new BranchSummaryMessageComponent(message, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
3326
3436
  component.setExpanded(this.toolOutputExpanded);
3327
3437
  this.chatContainer.addChild(component);
3328
3438
  break;
@@ -3338,18 +3448,18 @@ export class InteractiveMode {
3338
3448
  const skillBlock = parseSkillBlock(textContent);
3339
3449
  if (skillBlock) {
3340
3450
  // Render skill block (collapsible)
3341
- const component = new SkillInvocationMessageComponent(skillBlock, this.getMarkdownThemeWithSettings(), this.outputPad);
3451
+ const component = new SkillInvocationMessageComponent(skillBlock, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
3342
3452
  component.setExpanded(this.toolOutputExpanded);
3343
3453
  this.chatContainer.addChild(component);
3344
3454
  // Render user message separately if present
3345
3455
  if (skillBlock.userMessage) {
3346
3456
  this.chatContainer.addChild(new Spacer(1));
3347
- const userComponent = new UserMessageComponent(skillBlock.userMessage, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers());
3457
+ const userComponent = new UserMessageComponent(skillBlock.userMessage, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
3348
3458
  this.chatContainer.addChild(userComponent);
3349
3459
  }
3350
3460
  }
3351
3461
  else {
3352
- const userComponent = new UserMessageComponent(textContent, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers());
3462
+ const userComponent = new UserMessageComponent(textContent, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
3353
3463
  this.chatContainer.addChild(userComponent);
3354
3464
  }
3355
3465
  if (options?.populateHistory) {
@@ -3359,7 +3469,7 @@ export class InteractiveMode {
3359
3469
  break;
3360
3470
  }
3361
3471
  case "assistant": {
3362
- const assistantComponent = new AssistantMessageComponent(message, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.getMarkdownTransformers());
3472
+ const assistantComponent = new AssistantMessageComponent(message, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
3363
3473
  this.chatContainer.addChild(assistantComponent);
3364
3474
  break;
3365
3475
  }
@@ -3372,7 +3482,7 @@ export class InteractiveMode {
3372
3482
  }
3373
3483
  }
3374
3484
  }
3375
- renderSessionItems(items, options = {}) {
3485
+ renderSessionItems(items, messageMeta, options = {}) {
3376
3486
  this.pendingTools.clear();
3377
3487
  const renderedPendingTools = new Map();
3378
3488
  // Cache misses are not persisted, unlike successful cache-warming usage.
@@ -3400,7 +3510,11 @@ export class InteractiveMode {
3400
3510
  const message = item;
3401
3511
  // Assistant messages need special handling for tool calls
3402
3512
  if (message.role === "assistant") {
3403
- this.addMessageToChat(message);
3513
+ const meta = messageMeta?.get(message);
3514
+ this.addMessageToChat(message, {
3515
+ messageId: meta?.id,
3516
+ timestamp: meta?.timestamp,
3517
+ });
3404
3518
  // Render tool call components
3405
3519
  for (const content of message.content) {
3406
3520
  if (content.type === "toolCall") {
@@ -3446,7 +3560,12 @@ export class InteractiveMode {
3446
3560
  }
3447
3561
  else {
3448
3562
  // All other messages use standard rendering
3449
- this.addMessageToChat(message, options);
3563
+ const meta = messageMeta?.get(message);
3564
+ this.addMessageToChat(message, {
3565
+ ...options,
3566
+ messageId: meta?.id,
3567
+ timestamp: meta?.timestamp,
3568
+ });
3450
3569
  }
3451
3570
  }
3452
3571
  for (const [toolCallId, component] of renderedPendingTools) {
@@ -3464,17 +3583,21 @@ export class InteractiveMode {
3464
3583
  // Selection coordinates point into the transcript being replaced (#9311).
3465
3584
  if (this.renderer instanceof TuiAltScreen)
3466
3585
  this.renderer.resetTextSelection();
3586
+ const messageMeta = new Map();
3467
3587
  const items = entries.flatMap((entry) => {
3468
3588
  if (entry.type === "custom" || (entry.type === "usage" && entry.kind === "cache_warm")) {
3469
3589
  return [entry];
3470
3590
  }
3471
3591
  const messages = sessionEntryToContextMessages(entry);
3592
+ for (const msg of messages) {
3593
+ messageMeta.set(msg, { id: entry.id, timestamp: entry.timestamp });
3594
+ }
3472
3595
  if ((entry.type === "compaction" || entry.type === "branch_summary") && entry.usage && messages.length > 0) {
3473
3596
  return [...messages, { type: "compaction_cost", kind: entry.type, usage: entry.usage }];
3474
3597
  }
3475
3598
  return messages;
3476
3599
  });
3477
- this.renderSessionItems(items, options);
3600
+ this.renderSessionItems(items, messageMeta, options);
3478
3601
  }
3479
3602
  addCacheWarmingUsage(entry) {
3480
3603
  if (!this.settingsManager.getShowCacheMissNotices())
@@ -3973,6 +4096,9 @@ export class InteractiveMode {
3973
4096
  if (result.status === "complete") {
3974
4097
  this.editor.setText(result.content);
3975
4098
  }
4099
+ else {
4100
+ this.showStatus(result.message);
4101
+ }
3976
4102
  }
3977
4103
  finally {
3978
4104
  this.ui.start();
@@ -4086,7 +4212,7 @@ export class InteractiveMode {
4086
4212
  return 0;
4087
4213
  }
4088
4214
  const queuedText = allQueued.join("\n\n");
4089
- const currentText = options?.currentText ?? this.editor.getText();
4215
+ const currentText = options?.currentText ?? this.editor.getExpandedText?.() ?? this.editor.getText();
4090
4216
  const combinedText = [queuedText, currentText].filter((t) => t.trim()).join("\n\n");
4091
4217
  this.editor.setText(combinedText);
4092
4218
  this.updatePendingMessagesDisplay();
@@ -6000,7 +6126,7 @@ export class InteractiveMode {
6000
6126
  this.chatContainer.addChild(new DynamicBorder());
6001
6127
  this.chatContainer.addChild(new ThemedText(() => theme.bold(theme.fg("accent", "What's New")), 1, 0));
6002
6128
  this.chatContainer.addChild(new Spacer(1));
6003
- this.chatContainer.addChild(new Markdown(changelogMarkdown, 1, 1, this.getMarkdownThemeWithSettings()));
6129
+ this.chatContainer.addChild(this.createChangelogMarkdown(changelogMarkdown, 1, 1));
6004
6130
  this.chatContainer.addChild(new DynamicBorder());
6005
6131
  this.ui.requestRender();
6006
6132
  }