@maxmo74/pi-coding-agent 1.5.0-max.8 → 1.6.0-max.16

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 (455) hide show
  1. package/CHANGELOG.md +214 -0
  2. package/README.md +1 -1
  3. package/dist/bundle/chunks/anthropic-messages-WAFIHSF7.js +6 -0
  4. package/dist/bundle/chunks/{azure-openai-responses-FSC6BAW3.js → azure-openai-responses-EB4MRIM4.js} +1 -1
  5. package/dist/bundle/chunks/bedrock-converse-stream.js +3 -3
  6. package/dist/bundle/chunks/chunk-E6LJTZYC.js +82 -0
  7. package/dist/bundle/chunks/chunk-EEBRZED2.js +44 -0
  8. package/dist/bundle/chunks/chunk-EVSO24NP.js +2 -0
  9. package/dist/bundle/chunks/chunk-EXXWEFU5.js +1247 -0
  10. package/dist/bundle/chunks/{chunk-EOO47QGR.js → chunk-F7LEMV2T.js} +1 -1
  11. package/dist/bundle/chunks/chunk-I6HYYNH6.js +8 -0
  12. package/dist/bundle/chunks/chunk-IEBK4HQA.js +2 -0
  13. package/dist/bundle/chunks/{chunk-V6KH5QG4.js → chunk-ILDLA2JW.js} +1 -1
  14. package/dist/bundle/chunks/chunk-INODY4DR.js +2 -0
  15. package/dist/bundle/chunks/{chunk-MSIQUO5T.js → chunk-KREOSXD7.js} +1 -1
  16. package/dist/bundle/chunks/chunk-LWG2CUTI.js +31 -0
  17. package/dist/bundle/chunks/{chunk-3TGLJEWK.js → chunk-NRLRGOCX.js} +1 -1
  18. package/dist/bundle/chunks/chunk-NRY4NBZW.js +4 -0
  19. package/dist/bundle/chunks/chunk-NV3NPOPF.js +20 -0
  20. package/dist/bundle/chunks/{chunk-C2WU32PX.js → chunk-RCNEHRMW.js} +1 -1
  21. package/dist/bundle/chunks/{chunk-4EYXVSA5.js → chunk-X26YOAEH.js} +15 -14
  22. package/dist/bundle/chunks/chunk-X6RQRO3L.js +16 -0
  23. package/dist/bundle/chunks/chunk-XGGZYFNG.js +55 -0
  24. package/dist/bundle/chunks/chunk-XJ2YV77J.js +30 -0
  25. package/dist/bundle/chunks/{chunk-YZKQS34S.js → chunk-Y55SJART.js} +5 -1
  26. package/dist/bundle/chunks/chunk-YOWSKVK7.js +2 -0
  27. package/dist/bundle/chunks/chunk-ZG74NES2.js +2 -0
  28. package/dist/bundle/chunks/{cli-MCOUW5WS.js → cli-QMJEURSM.js} +7 -7
  29. package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-WLAFJSP6.js → cloudflare-workers-ai-system-one-AMCR7QEI.js} +1 -1
  30. package/dist/bundle/chunks/codemode-worker.js +2 -0
  31. package/dist/bundle/chunks/{easter-egg-3d-WMBNSJ4M.js → easter-egg-3d-7CBVPJQ3.js} +1 -1
  32. package/dist/bundle/chunks/{execute-4CEBORGZ.js → execute-XDNPBEMU.js} +5 -3
  33. package/dist/bundle/chunks/github-copilot.js +1 -1
  34. package/dist/bundle/chunks/google-generative-ai-43M4N5LK.js +2 -0
  35. package/dist/bundle/chunks/google-vertex-2B3PASK2.js +2 -0
  36. package/dist/bundle/chunks/{llama-cpp-classify-V5U3QKXI.js → llama-cpp-classify-XXZYF3RR.js} +1 -1
  37. package/dist/bundle/chunks/{mistral-conversations-S4OWXIXQ.js → mistral-conversations-E3D5ZQKB.js} +2 -2
  38. package/dist/bundle/chunks/{openai-codex-responses-QAWLOQSN.js → openai-codex-responses-MSQDSDUR.js} +2 -2
  39. package/dist/bundle/chunks/openai-completions-4IC6AGTR.js +7 -0
  40. package/dist/bundle/chunks/{openai-decisions-IXI34BYG.js → openai-decisions-LZ2RLVRX.js} +1 -1
  41. package/dist/bundle/chunks/openai-responses-MCO3BHCC.js +4 -0
  42. package/dist/bundle/chunks/{openrouter-images-PISKSFMS.js → openrouter-images-SHUJ3VSG.js} +1 -1
  43. package/dist/bundle/chunks/{pi-messages-NORUKF4E.js → pi-messages-NIKOQ4O7.js} +1 -1
  44. package/dist/bundle/chunks/{runtime-FQB7RU7U.js → runtime-F3SXQONS.js} +1 -1
  45. package/dist/bundle/chunks/{typesafe-system-one-CHVC2UUI.js → typesafe-system-one-R2CDUWNO.js} +1 -1
  46. package/dist/bundle/chunks/virtual-modules-2WYTGPJ3.js +2 -0
  47. package/dist/bundle/cli-runtime.js +1 -1
  48. package/dist/bundle/index.js +1 -1
  49. package/dist/bundle/rpc-entry.js +1 -1
  50. package/dist/cli/args.d.ts.map +1 -1
  51. package/dist/cli/args.js +5 -3
  52. package/dist/cli/args.js.map +1 -1
  53. package/dist/cli/auth-command.d.ts.map +1 -1
  54. package/dist/cli/auth-command.js +26 -2
  55. package/dist/cli/auth-command.js.map +1 -1
  56. package/dist/cli/auth-login.d.ts +15 -0
  57. package/dist/cli/auth-login.d.ts.map +1 -0
  58. package/dist/cli/auth-login.js +232 -0
  59. package/dist/cli/auth-login.js.map +1 -0
  60. package/dist/cli/auth-logout.d.ts +14 -0
  61. package/dist/cli/auth-logout.d.ts.map +1 -0
  62. package/dist/cli/auth-logout.js +57 -0
  63. package/dist/cli/auth-logout.js.map +1 -0
  64. package/dist/cli/auth-terminal.d.ts +17 -0
  65. package/dist/cli/auth-terminal.d.ts.map +1 -0
  66. package/dist/cli/auth-terminal.js +63 -0
  67. package/dist/cli/auth-terminal.js.map +1 -0
  68. package/dist/cli/config-selector.d.ts.map +1 -1
  69. package/dist/cli/config-selector.js +12 -7
  70. package/dist/cli/config-selector.js.map +1 -1
  71. package/dist/cli/session-picker.d.ts.map +1 -1
  72. package/dist/cli/session-picker.js +9 -6
  73. package/dist/cli/session-picker.js.map +1 -1
  74. package/dist/cli/startup-ui.d.ts.map +1 -1
  75. package/dist/cli/startup-ui.js +4 -0
  76. package/dist/cli/startup-ui.js.map +1 -1
  77. package/dist/core/agent-session-runtime.d.ts +16 -0
  78. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  79. package/dist/core/agent-session-runtime.js +40 -3
  80. package/dist/core/agent-session-runtime.js.map +1 -1
  81. package/dist/core/agent-session.d.ts +31 -9
  82. package/dist/core/agent-session.d.ts.map +1 -1
  83. package/dist/core/agent-session.js +160 -63
  84. package/dist/core/agent-session.js.map +1 -1
  85. package/dist/core/auth-storage.d.ts.map +1 -1
  86. package/dist/core/auth-storage.js +3 -2
  87. package/dist/core/auth-storage.js.map +1 -1
  88. package/dist/core/bash-executor.d.ts.map +1 -1
  89. package/dist/core/bash-executor.js +3 -1
  90. package/dist/core/bash-executor.js.map +1 -1
  91. package/dist/core/cache-warmer.d.ts +4 -37
  92. package/dist/core/cache-warmer.d.ts.map +1 -1
  93. package/dist/core/cache-warmer.js +11 -89
  94. package/dist/core/cache-warmer.js.map +1 -1
  95. package/dist/core/compaction/utils.d.ts.map +1 -1
  96. package/dist/core/compaction/utils.js +2 -1
  97. package/dist/core/compaction/utils.js.map +1 -1
  98. package/dist/core/exec.d.ts +1 -0
  99. package/dist/core/exec.d.ts.map +1 -1
  100. package/dist/core/exec.js +4 -1
  101. package/dist/core/exec.js.map +1 -1
  102. package/dist/core/export-html/ansi-to-html.d.ts +6 -1
  103. package/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
  104. package/dist/core/export-html/ansi-to-html.js +57 -20
  105. package/dist/core/export-html/ansi-to-html.js.map +1 -1
  106. package/dist/core/export-html/template.js +1 -1
  107. package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
  108. package/dist/core/export-html/tool-renderer.js +2 -3
  109. package/dist/core/export-html/tool-renderer.js.map +1 -1
  110. package/dist/core/extensions/index.d.ts +1 -1
  111. package/dist/core/extensions/index.d.ts.map +1 -1
  112. package/dist/core/extensions/index.js.map +1 -1
  113. package/dist/core/extensions/loader.d.ts.map +1 -1
  114. package/dist/core/extensions/loader.js +28 -6
  115. package/dist/core/extensions/loader.js.map +1 -1
  116. package/dist/core/extensions/runner.d.ts +1 -0
  117. package/dist/core/extensions/runner.d.ts.map +1 -1
  118. package/dist/core/extensions/runner.js +14 -1
  119. package/dist/core/extensions/runner.js.map +1 -1
  120. package/dist/core/extensions/types.d.ts +33 -6
  121. package/dist/core/extensions/types.d.ts.map +1 -1
  122. package/dist/core/extensions/types.js.map +1 -1
  123. package/dist/core/keybindings.d.ts +2 -2
  124. package/dist/core/keybindings.js +1 -1
  125. package/dist/core/keybindings.js.map +1 -1
  126. package/dist/core/mcp-servers.d.ts +12 -37
  127. package/dist/core/mcp-servers.d.ts.map +1 -1
  128. package/dist/core/mcp-servers.js +42 -121
  129. package/dist/core/mcp-servers.js.map +1 -1
  130. package/dist/core/model-config.d.ts +52 -0
  131. package/dist/core/model-config.d.ts.map +1 -1
  132. package/dist/core/model-resolver.d.ts +0 -8
  133. package/dist/core/model-resolver.d.ts.map +1 -1
  134. package/dist/core/model-resolver.js +22 -85
  135. package/dist/core/model-resolver.js.map +1 -1
  136. package/dist/core/model-runtime.d.ts +5 -0
  137. package/dist/core/model-runtime.d.ts.map +1 -1
  138. package/dist/core/model-runtime.js +11 -4
  139. package/dist/core/model-runtime.js.map +1 -1
  140. package/dist/core/package-manager.d.ts +26 -1
  141. package/dist/core/package-manager.d.ts.map +1 -1
  142. package/dist/core/package-manager.js +95 -7
  143. package/dist/core/package-manager.js.map +1 -1
  144. package/dist/core/pi-ai-schemas.d.ts +4 -0
  145. package/dist/core/pi-ai-schemas.d.ts.map +1 -1
  146. package/dist/core/preferred-providers.d.ts +17 -0
  147. package/dist/core/preferred-providers.d.ts.map +1 -0
  148. package/dist/core/preferred-providers.js +24 -0
  149. package/dist/core/preferred-providers.js.map +1 -0
  150. package/dist/core/prompt-templates.d.ts.map +1 -1
  151. package/dist/core/prompt-templates.js +18 -2
  152. package/dist/core/prompt-templates.js.map +1 -1
  153. package/dist/core/provider-composer.d.ts.map +1 -1
  154. package/dist/core/provider-composer.js +3 -1
  155. package/dist/core/provider-composer.js.map +1 -1
  156. package/dist/core/provider-matching.d.ts +6 -0
  157. package/dist/core/provider-matching.d.ts.map +1 -0
  158. package/dist/core/provider-matching.js +8 -0
  159. package/dist/core/provider-matching.js.map +1 -0
  160. package/dist/core/radius-mcp.d.ts +13 -0
  161. package/dist/core/radius-mcp.d.ts.map +1 -0
  162. package/dist/core/radius-mcp.js +29 -0
  163. package/dist/core/radius-mcp.js.map +1 -0
  164. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  165. package/dist/core/remote-catalog-provider.js +9 -0
  166. package/dist/core/remote-catalog-provider.js.map +1 -1
  167. package/dist/core/resource-loader.d.ts +5 -1
  168. package/dist/core/resource-loader.d.ts.map +1 -1
  169. package/dist/core/resource-loader.js +2 -0
  170. package/dist/core/resource-loader.js.map +1 -1
  171. package/dist/core/runtime-credentials.d.ts +8 -0
  172. package/dist/core/runtime-credentials.d.ts.map +1 -1
  173. package/dist/core/runtime-credentials.js +15 -1
  174. package/dist/core/runtime-credentials.js.map +1 -1
  175. package/dist/core/session-cwd.d.ts +7 -0
  176. package/dist/core/session-cwd.d.ts.map +1 -1
  177. package/dist/core/session-cwd.js +9 -1
  178. package/dist/core/session-cwd.js.map +1 -1
  179. package/dist/core/session-manager.d.ts.map +1 -1
  180. package/dist/core/session-manager.js +45 -36
  181. package/dist/core/session-manager.js.map +1 -1
  182. package/dist/core/session-ownership.js +15 -1
  183. package/dist/core/session-ownership.js.map +1 -1
  184. package/dist/core/settings-defaults.d.ts +1 -1
  185. package/dist/core/settings-defaults.d.ts.map +1 -1
  186. package/dist/core/settings-defaults.js +1 -1
  187. package/dist/core/settings-defaults.js.map +1 -1
  188. package/dist/core/tools/bash.d.ts.map +1 -1
  189. package/dist/core/tools/bash.js +35 -5
  190. package/dist/core/tools/bash.js.map +1 -1
  191. package/dist/core/tools/edit-diff.d.ts +23 -14
  192. package/dist/core/tools/edit-diff.d.ts.map +1 -1
  193. package/dist/core/tools/edit-diff.js +182 -41
  194. package/dist/core/tools/edit-diff.js.map +1 -1
  195. package/dist/core/tools/edit.d.ts.map +1 -1
  196. package/dist/core/tools/edit.js +8 -7
  197. package/dist/core/tools/edit.js.map +1 -1
  198. package/dist/core/tools/find.d.ts.map +1 -1
  199. package/dist/core/tools/find.js +96 -39
  200. package/dist/core/tools/find.js.map +1 -1
  201. package/dist/core/tools/grep.d.ts +5 -3
  202. package/dist/core/tools/grep.d.ts.map +1 -1
  203. package/dist/core/tools/grep.js +87 -75
  204. package/dist/core/tools/grep.js.map +1 -1
  205. package/dist/core/tools/ls.d.ts.map +1 -1
  206. package/dist/core/tools/ls.js +2 -1
  207. package/dist/core/tools/ls.js.map +1 -1
  208. package/dist/core/tools/output-accumulator.d.ts.map +1 -1
  209. package/dist/core/tools/output-accumulator.js +4 -1
  210. package/dist/core/tools/output-accumulator.js.map +1 -1
  211. package/dist/core/tools/powershell.d.ts.map +1 -1
  212. package/dist/core/tools/powershell.js +15 -2
  213. package/dist/core/tools/powershell.js.map +1 -1
  214. package/dist/core/tools/read.d.ts +13 -0
  215. package/dist/core/tools/read.d.ts.map +1 -1
  216. package/dist/core/tools/read.js +146 -35
  217. package/dist/core/tools/read.js.map +1 -1
  218. package/dist/core/tools/renderers/read.d.ts.map +1 -1
  219. package/dist/core/tools/renderers/read.js +6 -2
  220. package/dist/core/tools/renderers/read.js.map +1 -1
  221. package/dist/core/tools/truncate.d.ts +4 -14
  222. package/dist/core/tools/truncate.d.ts.map +1 -1
  223. package/dist/core/tools/truncate.js +23 -29
  224. package/dist/core/tools/truncate.js.map +1 -1
  225. package/dist/extensions/codemode/execute.js +4 -4
  226. package/dist/extensions/codemode/execute.js.map +1 -1
  227. package/dist/extensions/codemode/tool.d.ts.map +1 -1
  228. package/dist/extensions/codemode/tool.js +34 -12
  229. package/dist/extensions/codemode/tool.js.map +1 -1
  230. package/dist/extensions/llama/client.d.ts +2 -0
  231. package/dist/extensions/llama/client.d.ts.map +1 -1
  232. package/dist/extensions/llama/client.js +23 -2
  233. package/dist/extensions/llama/client.js.map +1 -1
  234. package/dist/extensions/llama/provider.d.ts +1 -1
  235. package/dist/extensions/llama/provider.d.ts.map +1 -1
  236. package/dist/extensions/llama/provider.js +6 -4
  237. package/dist/extensions/llama/provider.js.map +1 -1
  238. package/dist/extensions/llama/ui.d.ts.map +1 -1
  239. package/dist/extensions/llama/ui.js +15 -3
  240. package/dist/extensions/llama/ui.js.map +1 -1
  241. package/dist/extensions/mcp/cli.d.ts +2 -0
  242. package/dist/extensions/mcp/cli.d.ts.map +1 -1
  243. package/dist/extensions/mcp/cli.js +49 -14
  244. package/dist/extensions/mcp/cli.js.map +1 -1
  245. package/dist/extensions/mcp/config.d.ts.map +1 -1
  246. package/dist/extensions/mcp/config.js +4 -7
  247. package/dist/extensions/mcp/config.js.map +1 -1
  248. package/dist/extensions/mcp/index.d.ts.map +1 -1
  249. package/dist/extensions/mcp/index.js +7 -9
  250. package/dist/extensions/mcp/index.js.map +1 -1
  251. package/dist/extensions/mcp/oauth.d.ts +11 -49
  252. package/dist/extensions/mcp/oauth.d.ts.map +1 -1
  253. package/dist/extensions/mcp/oauth.js +56 -319
  254. package/dist/extensions/mcp/oauth.js.map +1 -1
  255. package/dist/extensions/mcp/resources.d.ts +1 -1
  256. package/dist/extensions/mcp/resources.d.ts.map +1 -1
  257. package/dist/extensions/mcp/resources.js +4 -3
  258. package/dist/extensions/mcp/resources.js.map +1 -1
  259. package/dist/extensions/mcp/runtime.d.ts +4 -3
  260. package/dist/extensions/mcp/runtime.d.ts.map +1 -1
  261. package/dist/extensions/mcp/runtime.js +7 -5
  262. package/dist/extensions/mcp/runtime.js.map +1 -1
  263. package/dist/extensions/mcp/tools.d.ts +2 -23
  264. package/dist/extensions/mcp/tools.d.ts.map +1 -1
  265. package/dist/extensions/mcp/tools.js +6 -58
  266. package/dist/extensions/mcp/tools.js.map +1 -1
  267. package/dist/extensions/tool-search/tool.d.ts.map +1 -1
  268. package/dist/extensions/tool-search/tool.js +18 -6
  269. package/dist/extensions/tool-search/tool.js.map +1 -1
  270. package/dist/index.d.ts +1 -1
  271. package/dist/index.d.ts.map +1 -1
  272. package/dist/index.js.map +1 -1
  273. package/dist/main.d.ts.map +1 -1
  274. package/dist/main.js +98 -27
  275. package/dist/main.js.map +1 -1
  276. package/dist/modes/diagnostics-stderr.d.ts +4 -0
  277. package/dist/modes/diagnostics-stderr.d.ts.map +1 -0
  278. package/dist/modes/diagnostics-stderr.js +11 -0
  279. package/dist/modes/diagnostics-stderr.js.map +1 -0
  280. package/dist/modes/interactive/components/assistant-message.d.ts +2 -1
  281. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  282. package/dist/modes/interactive/components/assistant-message.js +9 -3
  283. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  284. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  285. package/dist/modes/interactive/components/branch-summary-message.d.ts +5 -1
  286. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  287. package/dist/modes/interactive/components/branch-summary-message.js +12 -4
  288. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  289. package/dist/modes/interactive/components/compaction-summary-message.d.ts +5 -1
  290. package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
  291. package/dist/modes/interactive/components/compaction-summary-message.js +12 -4
  292. package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
  293. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
  294. package/dist/modes/interactive/components/config-selector.js +5 -2
  295. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  296. package/dist/modes/interactive/components/custom-message.d.ts +5 -2
  297. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  298. package/dist/modes/interactive/components/custom-message.js +10 -3
  299. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  300. package/dist/modes/interactive/components/diff.d.ts.map +1 -1
  301. package/dist/modes/interactive/components/diff.js +11 -5
  302. package/dist/modes/interactive/components/diff.js.map +1 -1
  303. package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
  304. package/dist/modes/interactive/components/extension-selector.js +9 -1
  305. package/dist/modes/interactive/components/extension-selector.js.map +1 -1
  306. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  307. package/dist/modes/interactive/components/login-dialog.js +1 -18
  308. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  309. package/dist/modes/interactive/components/mermaid.d.ts +2 -1
  310. package/dist/modes/interactive/components/mermaid.d.ts.map +1 -1
  311. package/dist/modes/interactive/components/mermaid.js +25 -20
  312. package/dist/modes/interactive/components/mermaid.js.map +1 -1
  313. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  314. package/dist/modes/interactive/components/model-selector.js +19 -8
  315. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  316. package/dist/modes/interactive/components/oauth-selector.d.ts +10 -3
  317. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  318. package/dist/modes/interactive/components/oauth-selector.js +39 -8
  319. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  320. package/dist/modes/interactive/components/provider-brand.d.ts +14 -0
  321. package/dist/modes/interactive/components/provider-brand.d.ts.map +1 -0
  322. package/dist/modes/interactive/components/provider-brand.js +66 -0
  323. package/dist/modes/interactive/components/provider-brand.js.map +1 -0
  324. package/dist/modes/interactive/components/radius-login-selector.d.ts +1 -2
  325. package/dist/modes/interactive/components/radius-login-selector.d.ts.map +1 -1
  326. package/dist/modes/interactive/components/radius-login-selector.js +8 -38
  327. package/dist/modes/interactive/components/radius-login-selector.js.map +1 -1
  328. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
  329. package/dist/modes/interactive/components/scoped-models-selector.js +9 -1
  330. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  331. package/dist/modes/interactive/components/session-selector.d.ts +8 -1
  332. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  333. package/dist/modes/interactive/components/session-selector.js +41 -9
  334. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  335. package/dist/modes/interactive/components/settings-submenu.d.ts +1 -1
  336. package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -1
  337. package/dist/modes/interactive/components/settings-submenu.js +5 -1
  338. package/dist/modes/interactive/components/settings-submenu.js.map +1 -1
  339. package/dist/modes/interactive/components/skill-invocation-message.d.ts +5 -1
  340. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  341. package/dist/modes/interactive/components/skill-invocation-message.js +12 -4
  342. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  343. package/dist/modes/interactive/components/themed-text.d.ts +1 -1
  344. package/dist/modes/interactive/components/themed-text.d.ts.map +1 -1
  345. package/dist/modes/interactive/components/themed-text.js.map +1 -1
  346. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  347. package/dist/modes/interactive/components/thinking-selector.js +5 -1
  348. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  349. package/dist/modes/interactive/components/tool-execution.d.ts +1 -1
  350. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  351. package/dist/modes/interactive/components/tool-execution.js +3 -1
  352. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  353. package/dist/modes/interactive/components/tree-selector.d.ts +1 -0
  354. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  355. package/dist/modes/interactive/components/tree-selector.js +19 -10
  356. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  357. package/dist/modes/interactive/components/user-message.d.ts +2 -1
  358. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  359. package/dist/modes/interactive/components/user-message.js +9 -3
  360. package/dist/modes/interactive/components/user-message.js.map +1 -1
  361. package/dist/modes/interactive/components/visual-truncate.d.ts +2 -2
  362. package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
  363. package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
  364. package/dist/modes/interactive/interactive-mode.d.ts +14 -2
  365. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  366. package/dist/modes/interactive/interactive-mode.js +232 -127
  367. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  368. package/dist/modes/interactive/session-share.js +2 -0
  369. package/dist/modes/interactive/session-share.js.map +1 -1
  370. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  371. package/dist/modes/interactive/theme/theme.js +5 -0
  372. package/dist/modes/interactive/theme/theme.js.map +1 -1
  373. package/dist/modes/print-mode.d.ts.map +1 -1
  374. package/dist/modes/print-mode.js +35 -23
  375. package/dist/modes/print-mode.js.map +1 -1
  376. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  377. package/dist/modes/rpc/rpc-mode.js +67 -45
  378. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  379. package/dist/package-manager-cli.d.ts.map +1 -1
  380. package/dist/package-manager-cli.js +53 -9
  381. package/dist/package-manager-cli.js.map +1 -1
  382. package/dist/utils/changelog.d.ts +2 -2
  383. package/dist/utils/changelog.d.ts.map +1 -1
  384. package/dist/utils/changelog.js +15 -8
  385. package/dist/utils/changelog.js.map +1 -1
  386. package/dist/utils/flush-stdout.d.ts +8 -0
  387. package/dist/utils/flush-stdout.d.ts.map +1 -0
  388. package/dist/utils/flush-stdout.js +23 -0
  389. package/dist/utils/flush-stdout.js.map +1 -0
  390. package/dist/utils/image-resize.d.ts.map +1 -1
  391. package/dist/utils/image-resize.js +3 -1
  392. package/dist/utils/image-resize.js.map +1 -1
  393. package/dist/utils/terminal-question.d.ts +8 -0
  394. package/dist/utils/terminal-question.d.ts.map +1 -0
  395. package/dist/utils/terminal-question.js +24 -0
  396. package/dist/utils/terminal-question.js.map +1 -0
  397. package/dist/utils/version-check.js +1 -1
  398. package/dist/utils/version-check.js.map +1 -1
  399. package/dist/utils/web-url.d.ts +12 -0
  400. package/dist/utils/web-url.d.ts.map +1 -0
  401. package/dist/utils/web-url.js +20 -0
  402. package/dist/utils/web-url.js.map +1 -0
  403. package/docs/cli.md +14 -1
  404. package/docs/extensions.md +31 -11
  405. package/docs/keybindings.md +1 -1
  406. package/docs/llama-cpp.md +5 -8
  407. package/docs/models-configuration.md +9 -3
  408. package/docs/models.md +2 -1
  409. package/docs/nvidia-rtx-llama-cpp.md +5 -5
  410. package/docs/prompt-templates.md +1 -1
  411. package/docs/providers.md +4 -2
  412. package/docs/rpc-commands.md +1 -1
  413. package/docs/rpc.md +4 -2
  414. package/docs/sessions.md +7 -1
  415. package/docs/settings.md +1 -1
  416. package/docs/tui.md +3 -1
  417. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  418. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  419. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  420. package/examples/extensions/gondolin/index.ts +4 -7
  421. package/examples/extensions/gondolin/package-lock.json +2 -2
  422. package/examples/extensions/gondolin/package.json +1 -1
  423. package/examples/extensions/plan-mode/index.ts +23 -13
  424. package/examples/extensions/plan-mode/utils.ts +42 -16
  425. package/examples/extensions/subagent/README.md +14 -11
  426. package/examples/extensions/subagent/index.ts +392 -171
  427. package/examples/extensions/with-deps/package-lock.json +2 -2
  428. package/examples/extensions/with-deps/package.json +1 -1
  429. package/examples/tsconfig.json +63 -35
  430. package/package.json +11 -11
  431. package/schemas/models.schema.json +30 -1
  432. package/schemas/settings.schema.json +1 -1
  433. package/dist/bundle/chunks/anthropic-messages-BWGCKOF4.js +0 -6
  434. package/dist/bundle/chunks/chunk-62VOPMLK.js +0 -65
  435. package/dist/bundle/chunks/chunk-7O7QKK6A.js +0 -2
  436. package/dist/bundle/chunks/chunk-B46VJEHW.js +0 -44
  437. package/dist/bundle/chunks/chunk-CF5GWZHW.js +0 -31
  438. package/dist/bundle/chunks/chunk-CHWNPHIS.js +0 -82
  439. package/dist/bundle/chunks/chunk-FGCQRPD5.js +0 -1239
  440. package/dist/bundle/chunks/chunk-GN3QYODH.js +0 -16
  441. package/dist/bundle/chunks/chunk-NL4X6LBY.js +0 -4
  442. package/dist/bundle/chunks/chunk-NZY7EIPA.js +0 -4
  443. package/dist/bundle/chunks/chunk-R2EGYMOO.js +0 -7
  444. package/dist/bundle/chunks/chunk-UKVNB6C4.js +0 -2
  445. package/dist/bundle/chunks/chunk-USJZMAIR.js +0 -2
  446. package/dist/bundle/chunks/chunk-VOLAXWGI.js +0 -2
  447. package/dist/bundle/chunks/google-generative-ai-INGKNW72.js +0 -2
  448. package/dist/bundle/chunks/google-vertex-IBTX6MBF.js +0 -2
  449. package/dist/bundle/chunks/openai-completions-EJNYB6IX.js +0 -7
  450. package/dist/bundle/chunks/openai-responses-MD3562FB.js +0 -4
  451. package/dist/bundle/chunks/virtual-modules-CLD44EYP.js +0 -2
  452. package/dist/utils/deprecation.d.ts +0 -4
  453. package/dist/utils/deprecation.d.ts.map +0 -1
  454. package/dist/utils/deprecation.js +0 -13
  455. package/dist/utils/deprecation.js.map +0 -1
@@ -25,8 +25,11 @@ import { createCompactionSummaryMessage, createCustomMessage } from "../../core/
25
25
  import { defaultModelPerProvider, findExactModelReferenceMatch, resolveModelScopeFromModels, } from "../../core/model-resolver.js";
26
26
  import { CredentialSynchronizationError } from "../../core/model-runtime.js";
27
27
  import { DefaultPackageManager } from "../../core/package-manager.js";
28
- import { RADIUS_MCP_URL, RADIUS_PROVIDER_ID } from "../../core/radius.js";
29
- import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../core/session-cwd.js";
28
+ import { compareProviders } from "../../core/preferred-providers.js";
29
+ import { findMatchingProviders } from "../../core/provider-matching.js";
30
+ import { RADIUS_PROVIDER_ID } from "../../core/radius.js";
31
+ import { planRadiusMcpServer } from "../../core/radius-mcp.js";
32
+ import { formatMissingSessionCwdPrompt, getMissingSessionCwdOptions, MissingSessionCwdError, } from "../../core/session-cwd.js";
30
33
  import { SessionManager, sessionEntryToContextMessages, } from "../../core/session-manager.js";
31
34
  import { getSessionOpenRefusal } from "../../core/session-ownership.js";
32
35
  import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
@@ -35,10 +38,11 @@ import { isInstallTelemetryEnabled } from "../../core/telemetry.js";
35
38
  import { withBuiltInRenderers } from "../../core/tools/renderers/index.js";
36
39
  import { hasTrustRequiringProjectResources, ProjectTrustStore } from "../../core/trust-manager.js";
37
40
  import { getUsageCostBreakdown } from "../../core/usage-totals.js";
38
- import { addMcpServerConfig, loadMcpConfig } from "../../extensions/mcp/config.js";
41
+ import { addMcpServerConfig } from "../../extensions/mcp/config.js";
39
42
  import { getChangelogPath, getNewEntries, normalizeChangelogLinks, parseChangelog } from "../../utils/changelog.js";
40
43
  import { copyToClipboard, readClipboardFilePaths, readClipboardText } from "../../utils/clipboard.js";
41
44
  import { extensionForImageMimeType, readClipboardImage } from "../../utils/clipboard-image.js";
45
+ import { flushStdout } from "../../utils/flush-stdout.js";
42
46
  import { parseGitUrl } from "../../utils/git.js";
43
47
  import { ensurePngTranscoder } from "../../utils/image-convert.js";
44
48
  import { getCwdRelativePath, shortenHomePath } from "../../utils/paths.js";
@@ -67,6 +71,7 @@ import { ExtensionSelectorComponent } from "./components/extension-selector.js";
67
71
  import { FooterComponent, formatTokens } from "./components/footer.js";
68
72
  import { formatKeyText, keyDisplayText, keyHint, keyText, rawKeyHint } from "./components/keybinding-hints.js";
69
73
  import { LoginDialogComponent } from "./components/login-dialog.js";
74
+ import { createMarkdownTransform } from "./components/markdown-transform.js";
70
75
  import { createMermaidMarkdownTransformer } from "./components/mermaid.js";
71
76
  import { ModelSelectorComponent } from "./components/model-selector.js";
72
77
  import { formatAuthSelectorProviderStatus, formatAuthSelectorProviderType, OAuthSelectorComponent, } from "./components/oauth-selector.js";
@@ -221,7 +226,7 @@ function getLoginProviderCompletionOptions(providerOptions) {
221
226
  subscription: provider.subscription,
222
227
  });
223
228
  }
224
- return Array.from(byId.values()).sort((a, b) => a.name.localeCompare(b.name));
229
+ return Array.from(byId.values()).sort(compareProviders);
225
230
  }
226
231
  function getLoginProviderSearchText(provider) {
227
232
  const authTypes = provider.authTypes
@@ -235,6 +240,41 @@ function formatLoginProviderCompletionDescription(provider) {
235
240
  .join("/");
236
241
  return provider.name === provider.id ? authTypes : `${provider.name} · ${authTypes}`;
237
242
  }
243
+ /** Assistant diagnostics that list reasoning a provider withheld from the model, by diagnostic type. */
244
+ const REASONING_DROP_DIAGNOSTICS = new Map([
245
+ [
246
+ "anthropic_input_transformations",
247
+ { provider: "Anthropic", droppedType: "thinking_dropped", noun: ["thinking block", "thinking blocks"] },
248
+ ],
249
+ [
250
+ "openai_input_transformations",
251
+ { provider: "OpenAI", droppedType: "reasoning", noun: ["reasoning item", "reasoning items"] },
252
+ ],
253
+ ]);
254
+ /** Count the reasoning blocks a provider reported as withheld from the request that produced `message`. */
255
+ function getDroppedReasoning(message) {
256
+ for (const diagnostic of message.diagnostics ?? []) {
257
+ const kind = REASONING_DROP_DIAGNOSTICS.get(diagnostic.type);
258
+ if (!kind)
259
+ continue;
260
+ // Session data: diagnostics details are untyped JSON.
261
+ const transformations = diagnostic.details?.transformations;
262
+ if (!Array.isArray(transformations))
263
+ continue;
264
+ const dropped = transformations.filter((transformation) => typeof transformation === "object" &&
265
+ transformation !== null &&
266
+ transformation.type === kind.droppedType);
267
+ if (dropped.length === 0)
268
+ continue;
269
+ const reasons = new Set();
270
+ for (const transformation of dropped) {
271
+ if (typeof transformation.reason === "string")
272
+ reasons.add(transformation.reason);
273
+ }
274
+ return { diagnostic: kind, count: dropped.length, reasons: [...reasons] };
275
+ }
276
+ return undefined;
277
+ }
238
278
  export class InteractiveMode {
239
279
  runtimeHost;
240
280
  renderer;
@@ -279,6 +319,8 @@ export class InteractiveMode {
279
319
  changelogMarkdown = undefined;
280
320
  extensionChangelogUpdates = [];
281
321
  startupNoticesShown = false;
322
+ /** Last cache-warming notice, extended in place while it is the last chat line. */
323
+ cacheWarmingNotice;
282
324
  anthropicSubscriptionWarningShown = false;
283
325
  // Status line tracking (for mutating immediately-sequential status updates)
284
326
  lastStatusSpacer = undefined;
@@ -328,6 +370,13 @@ export class InteractiveMode {
328
370
  // Extension dialogs shown in the editor slot (select, confirm, input, editor, inline custom).
329
371
  // The last entry is visible; see pushExtensionDialog().
330
372
  extensionDialogs = [];
373
+ /** Numbers the program status sources of blocking overlays, so closing one keeps the others. */
374
+ nextBlockingOverlayId = 0;
375
+ /**
376
+ * Open extension overlays (custom with overlay: true) and the function that removes each, in opening
377
+ * order. Reset removes only these, not pi's own overlays.
378
+ */
379
+ extensionOverlays = new Map();
331
380
  extensionTerminalInputSubscriptions = new Set();
332
381
  // Extension widgets (components rendered above/below the editor)
333
382
  extensionWidgetsAbove = new Map();
@@ -373,6 +422,7 @@ export class InteractiveMode {
373
422
  this.runtimeHost.setRebindSession(async () => {
374
423
  await this.rebindCurrentSession({ renderBeforeBind: true });
375
424
  this.themeController.applyFromSettings();
425
+ this.showRuntimeDiagnostics(this.runtimeHost.takeUnreportedDiagnostics());
376
426
  });
377
427
  this.version = VERSION;
378
428
  this.renderer = createInteractiveTui({
@@ -584,7 +634,7 @@ export class InteractiveMode {
584
634
  else {
585
635
  this.chatContainer.addChild(new ThemedText(() => theme.bold(theme.fg("accent", "What's New")), 1, 0));
586
636
  this.chatContainer.addChild(new Spacer(1));
587
- this.chatContainer.addChild(new Markdown(this.changelogMarkdown.trim(), 1, 0, this.getMarkdownThemeWithSettings()));
637
+ this.chatContainer.addChild(this.createChangelogMarkdown(this.changelogMarkdown.trim(), 1, 0));
588
638
  this.chatContainer.addChild(new Spacer(1));
589
639
  }
590
640
  }
@@ -602,7 +652,7 @@ export class InteractiveMode {
602
652
  this.chatContainer.addChild(new ThemedText(() => theme.bold(theme.fg("accent", "Extension Updates")), 1, 0));
603
653
  this.chatContainer.addChild(new Spacer(1));
604
654
  const markdown = this.extensionChangelogUpdates.map((update) => update.markdown).join("\n\n");
605
- this.chatContainer.addChild(new Markdown(markdown, 1, 0, this.getMarkdownThemeWithSettings()));
655
+ this.chatContainer.addChild(this.createChangelogMarkdown(markdown, 1, 0));
606
656
  this.chatContainer.addChild(new Spacer(1));
607
657
  }
608
658
  }
@@ -657,6 +707,7 @@ export class InteractiveMode {
657
707
  });
658
708
  nextUi.setClearOnShrink(clearOnShrink);
659
709
  nextUi.onDebug = onDebug;
710
+ nextUi.setSuspendSignalHandler(() => this.handleCtrlZ());
660
711
  if (nextUi instanceof TuiMainScreen && this.mainScreenRenderState) {
661
712
  nextUi.restoreRenderState(this.mainScreenRenderState);
662
713
  }
@@ -721,6 +772,8 @@ export class InteractiveMode {
721
772
  this.defaultEditor.onCtrlD = () => this.handleCtrlD();
722
773
  this.defaultEditor.onSubmit = (text) => this.handleStartupSubmit(text);
723
774
  this.ui.setFocus(this.editor);
775
+ // An external SIGTSTP (kill -TSTP) restores the terminal like Ctrl+Z (#12272).
776
+ this.ui.setSuspendSignalHandler(() => this.handleCtrlZ());
724
777
  // Start the UI before initializing extensions so session_start handlers can use interactive dialogs
725
778
  this.ui.start();
726
779
  this.isInitialized = true;
@@ -887,17 +940,7 @@ export class InteractiveMode {
887
940
  });
888
941
  // Show startup warnings
889
942
  const { migratedProviders, startupDiagnostics, modelFallbackMessage, initialMessage, initialImages, initialMessages, } = this.options;
890
- for (const diagnostic of startupDiagnostics ?? []) {
891
- if (diagnostic.type === "error") {
892
- this.showError(diagnostic.message);
893
- }
894
- else if (diagnostic.type === "warning") {
895
- this.showWarning(diagnostic.message);
896
- }
897
- else {
898
- this.showStatus(diagnostic.message);
899
- }
900
- }
943
+ this.showRuntimeDiagnostics(startupDiagnostics ?? []);
901
944
  if (migratedProviders && migratedProviders.length > 0) {
902
945
  this.showWarning(`Migrated credentials to auth.json: ${migratedProviders.join(", ")}`);
903
946
  }
@@ -1024,6 +1067,11 @@ export class InteractiveMode {
1024
1067
  return undefined;
1025
1068
  }
1026
1069
  const newEntries = getNewEntries(entries, lastVersion);
1070
+ if (!newEntries) {
1071
+ // Unreadable saved version: show nothing and record the current one so later updates compare again
1072
+ this.settingsManager.setLastChangelogVersion(VERSION);
1073
+ return undefined;
1074
+ }
1027
1075
  if (newEntries.length > 0) {
1028
1076
  this.settingsManager.setLastChangelogVersion(VERSION);
1029
1077
  this.reportInstallTelemetry(VERSION);
@@ -1058,6 +1106,11 @@ export class InteractiveMode {
1058
1106
  continue;
1059
1107
  }
1060
1108
  const newEntries = getNewEntries(parseChangelog(sourceInfo.changelogPath), lastVersion);
1109
+ if (!newEntries) {
1110
+ // Unreadable saved version: show nothing and record the current one so later updates compare again
1111
+ this.settingsManager.setExtensionChangelogVersion(key, pkg.version);
1112
+ continue;
1113
+ }
1061
1114
  if (newEntries.length > 0) {
1062
1115
  this.settingsManager.setExtensionChangelogVersion(key, pkg.version);
1063
1116
  const name = pkg.name || sourceInfo.source;
@@ -1676,6 +1729,19 @@ export class InteractiveMode {
1676
1729
  this.editor.setAutocompleteMaxVisible?.(autocompleteMaxVisible);
1677
1730
  }
1678
1731
  }
1732
+ showRuntimeDiagnostics(diagnostics) {
1733
+ for (const diagnostic of diagnostics) {
1734
+ if (diagnostic.type === "error") {
1735
+ this.showError(diagnostic.message);
1736
+ }
1737
+ else if (diagnostic.type === "warning") {
1738
+ this.showWarning(diagnostic.message);
1739
+ }
1740
+ else {
1741
+ this.showStatus(diagnostic.message);
1742
+ }
1743
+ }
1744
+ }
1679
1745
  async rebindCurrentSession(options = {}) {
1680
1746
  const session = this.session;
1681
1747
  this.unsubscribe?.();
@@ -1710,6 +1776,7 @@ export class InteractiveMode {
1710
1776
  }
1711
1777
  stopThemeWatcher();
1712
1778
  this.stop("transcript");
1779
+ await flushStdout();
1713
1780
  process.exit(1);
1714
1781
  }
1715
1782
  getCrashExtensionHint(error) {
@@ -1780,6 +1847,7 @@ export class InteractiveMode {
1780
1847
  this.loadedResourcesContainer.clear();
1781
1848
  this.chatContainer.clear();
1782
1849
  this.pendingMessagesContainer.clear();
1850
+ this.pendingBashComponents = [];
1783
1851
  this.compactionQueuedMessages = [];
1784
1852
  this.streamingComponent = undefined;
1785
1853
  this.streamingMessage = undefined;
@@ -1799,6 +1867,12 @@ export class InteractiveMode {
1799
1867
  getMarkdownTransformers() {
1800
1868
  return [this.mermaidMarkdownTransformer, ...this.session.extensionRunner.getMarkdownTransformers()];
1801
1869
  }
1870
+ /** Markdown of a changelog or release note that runs the Markdown transformers of the `changelog` type. */
1871
+ createChangelogMarkdown(markdown, paddingX, paddingY, defaultTextStyle) {
1872
+ return new Markdown(markdown, paddingX, paddingY, this.getMarkdownThemeWithSettings(), defaultTextStyle, {
1873
+ transform: createMarkdownTransform("changelog", () => false, this.getMarkdownTransformers()),
1874
+ });
1875
+ }
1802
1876
  /**
1803
1877
  * Set up keyboard shortcuts registered by extensions.
1804
1878
  */
@@ -1994,7 +2068,10 @@ export class InteractiveMode {
1994
2068
  this.extensionDialogs = [];
1995
2069
  this.showTopExtensionDialog();
1996
2070
  }
1997
- this.ui.hideOverlay();
2071
+ // Reload and session switches replace every extension without calling done(): remove their overlays,
2072
+ // newest first, the same way done() does, but leave the promises pending as for inline dialogs.
2073
+ for (const removeOverlay of [...this.extensionOverlays.values()].reverse())
2074
+ removeOverlay();
1998
2075
  this.clearExtensionTerminalInputListeners();
1999
2076
  this.setExtensionFooter(undefined);
2000
2077
  this.setExtensionHeader(undefined);
@@ -2253,8 +2330,9 @@ export class InteractiveMode {
2253
2330
  return result === "Yes";
2254
2331
  }
2255
2332
  async promptForMissingSessionCwd(error) {
2256
- const confirmed = await this.showExtensionConfirm("Session cwd not found", formatMissingSessionCwdPrompt(error.issue));
2257
- return confirmed ? error.issue.fallbackCwd : undefined;
2333
+ const options = getMissingSessionCwdOptions(error.issue);
2334
+ const label = await this.showExtensionSelector(formatMissingSessionCwdPrompt(error.issue), options.map((option) => option.label));
2335
+ return options.find((option) => option.label === label)?.value;
2258
2336
  }
2259
2337
  /**
2260
2338
  * Show a text input for extensions.
@@ -2297,7 +2375,7 @@ export class InteractiveMode {
2297
2375
  setCustomEditorComponent(factory) {
2298
2376
  this.editorComponentFactory = factory;
2299
2377
  // Save text from current editor before switching
2300
- const currentText = this.editor.getText();
2378
+ const currentText = this.editor.getExpandedText?.() ?? this.editor.getText();
2301
2379
  // An open extension dialog keeps the editor slot; the new editor is shown when the last dialog closes.
2302
2380
  const dialogOpen = this.extensionDialogs.length > 0;
2303
2381
  if (!dialogOpen) {
@@ -2383,11 +2461,13 @@ export class InteractiveMode {
2383
2461
  }
2384
2462
  /** Show a custom component with keyboard focus. Overlay mode renders on top of existing content. */
2385
2463
  async showExtensionCustom(factory, options) {
2386
- const savedText = this.editor.getText();
2464
+ const savedText = this.editor.getExpandedText?.() ?? this.editor.getText();
2387
2465
  const isOverlay = options?.overlay ?? false;
2388
2466
  return new Promise((resolve, reject) => {
2389
2467
  let component;
2390
2468
  let overlayHandle;
2469
+ // An overlay stays blocked until its interaction ends, also while setHidden() hides it.
2470
+ const overlayStatusSource = isOverlay && options?.blocked ? `extension-overlay:${this.nextBlockingOverlayId++}` : undefined;
2391
2471
  let closed = false;
2392
2472
  const restoreEditor = () => {
2393
2473
  if (component)
@@ -2395,17 +2475,7 @@ export class InteractiveMode {
2395
2475
  this.editor.setText(savedText);
2396
2476
  this.ui.requestRender();
2397
2477
  };
2398
- const close = (result) => {
2399
- if (closed)
2400
- return;
2401
- closed = true;
2402
- // Remove this overlay, not the topmost one: another overlay may have opened above it.
2403
- if (isOverlay)
2404
- overlayHandle?.hide();
2405
- else
2406
- restoreEditor();
2407
- // Note: both branches above already call requestRender
2408
- resolve(result);
2478
+ const disposeComponent = () => {
2409
2479
  try {
2410
2480
  component?.dispose?.();
2411
2481
  }
@@ -2413,6 +2483,30 @@ export class InteractiveMode {
2413
2483
  /* ignore dispose errors */
2414
2484
  }
2415
2485
  };
2486
+ // Shared by done() and resetExtensionUI(). Removing the map entry first makes a second call a no-op.
2487
+ const removeOverlay = () => {
2488
+ if (!overlayHandle || !this.extensionOverlays.delete(overlayHandle))
2489
+ return;
2490
+ // Remove this overlay, not the topmost one: another overlay may have opened above it.
2491
+ overlayHandle.hide();
2492
+ if (overlayStatusSource)
2493
+ this.programStatus.setBlocked(overlayStatusSource, undefined);
2494
+ disposeComponent();
2495
+ };
2496
+ const close = (result) => {
2497
+ if (closed)
2498
+ return;
2499
+ closed = true;
2500
+ if (isOverlay) {
2501
+ removeOverlay();
2502
+ resolve(result);
2503
+ }
2504
+ else {
2505
+ restoreEditor();
2506
+ resolve(result);
2507
+ disposeComponent();
2508
+ }
2509
+ };
2416
2510
  Promise.resolve(factory(this.ui, theme, this.keybindings, close))
2417
2511
  .then((c) => {
2418
2512
  if (closed)
@@ -2432,6 +2526,9 @@ export class InteractiveMode {
2432
2526
  return w ? { width: w } : undefined;
2433
2527
  };
2434
2528
  overlayHandle = this.ui.showOverlay(c, resolveOptions());
2529
+ this.extensionOverlays.set(overlayHandle, removeOverlay);
2530
+ if (overlayStatusSource)
2531
+ this.programStatus.setBlocked(overlayStatusSource, options?.blocked);
2435
2532
  // Expose handle to caller for visibility control
2436
2533
  options?.onHandle?.(overlayHandle);
2437
2534
  }
@@ -3022,6 +3119,9 @@ export class InteractiveMode {
3022
3119
  this.ui.requestRender();
3023
3120
  break;
3024
3121
  case "agent_settled":
3122
+ // The session records deferred user bash results when the run settles; show them there too.
3123
+ this.flushPendingBashComponents();
3124
+ this.ui.requestRender();
3025
3125
  await this.checkShutdownRequested();
3026
3126
  break;
3027
3127
  case "compaction_start": {
@@ -3220,7 +3320,7 @@ export class InteractiveMode {
3220
3320
  case "custom": {
3221
3321
  if (message.display) {
3222
3322
  const renderer = this.session.extensionRunner.getMessageRenderer(message.customType);
3223
- const component = new CustomMessageComponent(message, renderer, this.getMarkdownThemeWithSettings(), this.outputPad);
3323
+ const component = new CustomMessageComponent(message, renderer, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
3224
3324
  component.setExpanded(this.toolOutputExpanded);
3225
3325
  this.chatContainer.addChild(component);
3226
3326
  }
@@ -3228,14 +3328,14 @@ export class InteractiveMode {
3228
3328
  }
3229
3329
  case "compactionSummary": {
3230
3330
  this.chatContainer.addChild(new Spacer(1));
3231
- const component = new CompactionSummaryMessageComponent(message, this.getMarkdownThemeWithSettings(), this.outputPad);
3331
+ const component = new CompactionSummaryMessageComponent(message, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
3232
3332
  component.setExpanded(this.toolOutputExpanded);
3233
3333
  this.chatContainer.addChild(component);
3234
3334
  break;
3235
3335
  }
3236
3336
  case "branchSummary": {
3237
3337
  this.chatContainer.addChild(new Spacer(1));
3238
- const component = new BranchSummaryMessageComponent(message, this.getMarkdownThemeWithSettings(), this.outputPad);
3338
+ const component = new BranchSummaryMessageComponent(message, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
3239
3339
  component.setExpanded(this.toolOutputExpanded);
3240
3340
  this.chatContainer.addChild(component);
3241
3341
  break;
@@ -3251,7 +3351,7 @@ export class InteractiveMode {
3251
3351
  const skillBlock = parseSkillBlock(textContent);
3252
3352
  if (skillBlock) {
3253
3353
  // Render skill block (collapsible)
3254
- const component = new SkillInvocationMessageComponent(skillBlock, this.getMarkdownThemeWithSettings(), this.outputPad);
3354
+ const component = new SkillInvocationMessageComponent(skillBlock, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
3255
3355
  component.setExpanded(this.toolOutputExpanded);
3256
3356
  this.chatContainer.addChild(component);
3257
3357
  // Render user message separately if present
@@ -3405,9 +3505,18 @@ export class InteractiveMode {
3405
3505
  addCacheWarmingUsage(entry) {
3406
3506
  if (!this.settingsManager.getShowCacheMissNotices())
3407
3507
  return;
3508
+ // Back-to-back warms collapse into one line with the cumulative cost.
3509
+ const previous = this.cacheWarmingNotice;
3510
+ if (previous && this.chatContainer.children.at(-1) === previous.component && previous.note === entry.note) {
3511
+ previous.total.cost += entry.usage.cost.total;
3512
+ previous.component.invalidate();
3513
+ return;
3514
+ }
3515
+ const total = { cost: entry.usage.cost.total };
3516
+ const component = new ThemedText(() => theme.fg("dim", formatCacheWarmingUsage(total.cost, entry.note)), 1, 0);
3517
+ this.cacheWarmingNotice = { component, total, note: entry.note };
3408
3518
  this.chatContainer.addChild(new Spacer(1));
3409
- const usage = formatCacheWarmingUsage(entry);
3410
- this.chatContainer.addChild(new ThemedText(() => theme.fg("dim", usage), 1, 0));
3519
+ this.chatContainer.addChild(component);
3411
3520
  }
3412
3521
  /**
3413
3522
  * Render billing usage for a compaction or branch summary. The notice is derived
@@ -3423,42 +3532,30 @@ export class InteractiveMode {
3423
3532
  this.chatContainer.addChild(new Spacer(1));
3424
3533
  this.chatContainer.addChild(new ThemedText(() => theme.fg("warning", `${label}: ${formatTokens(tokens)} tokens billed${cost}`), 1, 0));
3425
3534
  }
3426
- static countDroppedThinkingBlocks(message) {
3427
- let count = 0;
3428
- for (const diagnostic of message.diagnostics ?? []) {
3429
- if (diagnostic.type !== "anthropic_input_transformations")
3430
- continue;
3431
- const transformations = diagnostic.details?.transformations;
3432
- if (!Array.isArray(transformations))
3433
- continue;
3434
- count += transformations.filter((transformation) => typeof transformation === "object" &&
3435
- transformation !== null &&
3436
- transformation.type === "thinking_dropped").length;
3437
- }
3438
- return count;
3439
- }
3440
3535
  maybeShowThinkingDropNotice(message) {
3441
3536
  if (!this.settingsManager.getShowCacheMissNotices())
3442
3537
  return;
3443
- const droppedCount = InteractiveMode.countDroppedThinkingBlocks(message);
3444
- if (droppedCount === 0)
3538
+ const dropped = getDroppedReasoning(message);
3539
+ if (!dropped)
3445
3540
  return;
3446
- let previousDroppedCount = 0;
3447
- // message_end reaches the UI before the current message is persisted,
3448
- // so the branch's last assistant message is the previous response.
3541
+ // Providers report a withheld block again on every later request that replays it, so only
3542
+ // a count above the previous response's means new losses. message_end reaches the UI before
3543
+ // the current message is persisted, so the branch's last assistant message is the previous response.
3449
3544
  const branch = this.sessionManager.getBranch();
3450
3545
  for (let i = branch.length - 1; i >= 0; i--) {
3451
3546
  const entry = branch[i];
3452
3547
  if (entry.type === "message" && entry.message.role === "assistant") {
3453
- previousDroppedCount = InteractiveMode.countDroppedThinkingBlocks(entry.message);
3548
+ const previous = getDroppedReasoning(entry.message);
3549
+ if (previous?.diagnostic === dropped.diagnostic && dropped.count <= previous.count)
3550
+ return;
3454
3551
  break;
3455
3552
  }
3456
3553
  }
3457
- if (droppedCount <= previousDroppedCount)
3458
- return;
3459
- const noun = droppedCount === 1 ? "thinking block" : "thinking blocks";
3554
+ const { provider, noun: nouns } = dropped.diagnostic;
3555
+ const noun = nouns[dropped.count === 1 ? 0 : 1];
3556
+ const reasons = dropped.reasons.length > 0 ? `: ${dropped.reasons.join(", ")}` : "";
3460
3557
  this.chatContainer.addChild(new Spacer(1));
3461
- this.chatContainer.addChild(new ThemedText(() => theme.fg("warning", `Anthropic dropped ${droppedCount} ${noun} (details in session)`), 1, 0));
3558
+ this.chatContainer.addChild(new ThemedText(() => theme.fg("warning", `${provider} dropped ${dropped.count} ${noun}${reasons} (details in session)`), 1, 0));
3462
3559
  }
3463
3560
  /**
3464
3561
  * Show a transcript notice when a completed assistant message paid for a
@@ -3570,6 +3667,7 @@ export class InteractiveMode {
3570
3667
  this.themeController.disableAutoSync();
3571
3668
  await this.ui.terminal.drainInput(1000);
3572
3669
  this.stop();
3670
+ await flushStdout();
3573
3671
  process.exit(0);
3574
3672
  }
3575
3673
  // Interactive quit (Ctrl+D, Ctrl+C, /quit, extension shutdown()). Stop the
@@ -3583,8 +3681,10 @@ export class InteractiveMode {
3583
3681
  await this.runtimeHost.dispose();
3584
3682
  const resumeCommand = formatResumeCommand(this.sessionManager);
3585
3683
  if (resumeCommand) {
3586
- process.stdout.write(`${chalk.dim("To resume this session:")} ${resumeCommand}\n`);
3684
+ // Own line so the command can be selected with a triple-click (#12237).
3685
+ process.stdout.write(`${chalk.dim("To resume this session:")}\n${resumeCommand}\n`);
3587
3686
  }
3687
+ await flushStdout();
3588
3688
  process.exit(0);
3589
3689
  }
3590
3690
  emergencyTerminalExit() {
@@ -3813,7 +3913,7 @@ export class InteractiveMode {
3813
3913
  if (isExpandable(activeHeader)) {
3814
3914
  activeHeader.setExpanded(expanded);
3815
3915
  }
3816
- for (const container of [this.loadedResourcesContainer, this.chatContainer]) {
3916
+ for (const container of [this.loadedResourcesContainer, this.chatContainer, this.pendingMessagesContainer]) {
3817
3917
  for (const child of container.children) {
3818
3918
  if (isExpandable(child)) {
3819
3919
  child.setExpanded(expanded);
@@ -3891,9 +3991,7 @@ export class InteractiveMode {
3891
3991
  this.chatContainer.addChild(new ThemedText(() => `${theme.bold(theme.fg("warning", "Update Available"))}\n${updateInstruction()}`, 1, 0));
3892
3992
  if (note) {
3893
3993
  this.chatContainer.addChild(new Spacer(1));
3894
- this.chatContainer.addChild(new Markdown(note, 1, 0, this.getMarkdownThemeWithSettings(), {
3895
- color: (text) => theme.fg("muted", text),
3896
- }));
3994
+ this.chatContainer.addChild(this.createChangelogMarkdown(note, 1, 0, { color: (text) => theme.fg("muted", text) }));
3897
3995
  this.chatContainer.addChild(new Spacer(1));
3898
3996
  }
3899
3997
  this.chatContainer.addChild(new ThemedText(changelogLine, 1, 0));
@@ -3955,6 +4053,10 @@ export class InteractiveMode {
3955
4053
  }
3956
4054
  updatePendingMessagesDisplay() {
3957
4055
  this.pendingMessagesContainer.clear();
4056
+ // User bash output shown while the agent works lives here until it moves to the chat.
4057
+ for (const component of this.pendingBashComponents) {
4058
+ this.pendingMessagesContainer.addChild(component);
4059
+ }
3958
4060
  const { steering: steeringMessages, followUp: followUpMessages } = this.getAllQueuedMessages();
3959
4061
  if (steeringMessages.length > 0 || followUpMessages.length > 0) {
3960
4062
  this.pendingMessagesContainer.addChild(new Spacer(1));
@@ -3982,7 +4084,7 @@ export class InteractiveMode {
3982
4084
  return 0;
3983
4085
  }
3984
4086
  const queuedText = allQueued.join("\n\n");
3985
- const currentText = options?.currentText ?? this.editor.getText();
4087
+ const currentText = options?.currentText ?? this.editor.getExpandedText?.() ?? this.editor.getText();
3986
4088
  const combinedText = [queuedText, currentText].filter((t) => t.trim()).join("\n\n");
3987
4089
  this.editor.setText(combinedText);
3988
4090
  this.updatePendingMessagesDisplay();
@@ -4898,25 +5000,43 @@ export class InteractiveMode {
4898
5000
  }
4899
5001
  catch (error) {
4900
5002
  if (error instanceof MissingSessionCwdError) {
4901
- const selectedCwd = await this.promptForMissingSessionCwd(error);
4902
- if (!selectedCwd) {
4903
- this.showStatus("Resume cancelled");
4904
- return { cancelled: true };
4905
- }
4906
- const result = await this.runtimeHost.switchSession(sessionPath, {
4907
- cwdOverride: selectedCwd,
4908
- withSession: options?.withSession,
4909
- projectTrustContextFactory: (cwd) => this.createProjectTrustContext(cwd),
4910
- });
4911
- if (result.cancelled) {
4912
- return result;
5003
+ switch (await this.promptForMissingSessionCwd(error)) {
5004
+ case "continue": {
5005
+ const result = await this.runtimeHost.switchSession(sessionPath, {
5006
+ cwdOverride: error.issue.fallbackCwd,
5007
+ withSession: options?.withSession,
5008
+ projectTrustContextFactory: (cwd) => this.createProjectTrustContext(cwd),
5009
+ });
5010
+ if (!result.cancelled)
5011
+ this.showStatus(`Resumed session in ${error.issue.fallbackCwd}`);
5012
+ return result;
5013
+ }
5014
+ case "fork":
5015
+ return this.switchToForkedSession(sessionPath, error.issue.fallbackCwd, options);
5016
+ case undefined:
5017
+ this.showStatus("Resume cancelled");
5018
+ return { cancelled: true };
4913
5019
  }
4914
- this.showStatus("Resumed session in current cwd");
4915
- return result;
4916
5020
  }
4917
5021
  return this.handleFatalRuntimeError("Failed to resume session", error);
4918
5022
  }
4919
5023
  }
5024
+ /** Fork a session whose stored cwd is gone into `cwd` and switch to the fork, like `--session <id>` from another project (#11060). */
5025
+ async switchToForkedSession(sourcePath, cwd, options) {
5026
+ const fork = SessionManager.forkFrom(sourcePath, cwd, this.sessionManager.getSessionDir());
5027
+ const forkPath = fork.getSessionFile();
5028
+ const result = await this.runtimeHost.switchSession(forkPath, {
5029
+ withSession: options?.withSession,
5030
+ projectTrustContextFactory: (cwd) => this.createProjectTrustContext(cwd),
5031
+ });
5032
+ if (result.cancelled) {
5033
+ // An extension vetoed the switch; drop the fork so cancelling leaves no copy behind.
5034
+ fs.rmSync(forkPath, { force: true });
5035
+ return result;
5036
+ }
5037
+ this.showStatus(`Forked into new session ${fork.getSessionId()} in ${cwd}`);
5038
+ return result;
5039
+ }
4920
5040
  getLoginProviderOptions(authType) {
4921
5041
  const options = [];
4922
5042
  for (const provider of this.session.modelRuntime.getProviders()) {
@@ -4949,7 +5069,8 @@ export class InteractiveMode {
4949
5069
  });
4950
5070
  }
4951
5071
  }
4952
- return options.sort((a, b) => a.name.localeCompare(b.name));
5072
+ // The sort is stable, so a provider's account option stays above its API key option.
5073
+ return options.sort(compareProviders);
4953
5074
  }
4954
5075
  async getLogoutProviderOptions() {
4955
5076
  return (await this.session.modelRuntime.listCredentials({ signal: AbortSignal.timeout(15_000) }))
@@ -4963,22 +5084,14 @@ export class InteractiveMode {
4963
5084
  subscription: provider?.auth.oauth?.isSubscription === true,
4964
5085
  };
4965
5086
  })
4966
- .sort((a, b) => a.name.localeCompare(b.name));
4967
- }
4968
- findLoginProviderOptions(providerRef) {
4969
- const normalizedProviderRef = providerRef.trim().toLowerCase();
4970
- if (!normalizedProviderRef) {
4971
- return [];
4972
- }
4973
- return this.getLoginProviderOptions().filter((provider) => provider.id.toLowerCase() === normalizedProviderRef ||
4974
- provider.name.toLowerCase() === normalizedProviderRef);
5087
+ .sort(compareProviders);
4975
5088
  }
4976
5089
  async handleLoginCommand(providerRef) {
4977
5090
  if (!providerRef) {
4978
5091
  this.showLoginAuthTypeSelector();
4979
5092
  return;
4980
5093
  }
4981
- const providerOptions = this.findLoginProviderOptions(providerRef);
5094
+ const providerOptions = findMatchingProviders(this.getLoginProviderOptions(), providerRef);
4982
5095
  if (providerOptions.length === 1) {
4983
5096
  await this.startProviderLogin(providerOptions[0]);
4984
5097
  return;
@@ -5095,8 +5208,8 @@ export class InteractiveMode {
5095
5208
  else {
5096
5209
  this.ui.requestRender();
5097
5210
  }
5098
- }, initialSearchInput);
5099
- return { component: selector, focus: selector };
5211
+ }, initialSearchInput, this.ui);
5212
+ return { component: selector, focus: selector, dispose: () => selector.dispose() };
5100
5213
  });
5101
5214
  }
5102
5215
  async showOAuthSelector(mode) {
@@ -5142,8 +5255,8 @@ export class InteractiveMode {
5142
5255
  }, () => {
5143
5256
  done();
5144
5257
  this.ui.requestRender();
5145
- });
5146
- return { component: selector, focus: selector };
5258
+ }, undefined, this.ui);
5259
+ return { component: selector, focus: selector, dispose: () => selector.dispose() };
5147
5260
  });
5148
5261
  }
5149
5262
  async completeProviderAuthentication(providerId, providerName, authType, previousModel) {
@@ -5419,24 +5532,10 @@ export class InteractiveMode {
5419
5532
  * when missing. Nothing is asked when a global server already uses this login.
5420
5533
  */
5421
5534
  offerRadiusMcpServer(providerId, providerName) {
5422
- const mcpPath = path.join(getAgentDir(), "mcp.json");
5423
- const normalizeUrl = (url) => url.replace(/\/+$/u, "");
5424
- const { servers } = loadMcpConfig({
5425
- agentDir: getAgentDir(),
5426
- cwd: this.sessionManager.getCwd(),
5427
- projectTrusted: false,
5428
- });
5429
- const existing = servers.find((server) => "url" in server.config && normalizeUrl(server.config.url) === normalizeUrl(RADIUS_MCP_URL));
5430
- if (existing && "url" in existing.config && existing.config.auth?.provider === providerId)
5535
+ const plan = planRadiusMcpServer(providerId, getAgentDir(), this.sessionManager.getCwd());
5536
+ if (!plan)
5431
5537
  return;
5432
- let name = existing?.name ?? "radius";
5433
- if (!existing && servers.some((server) => server.name === name))
5434
- name = "radius-mcp";
5435
- const config = existing && "url" in existing.config
5436
- ? { ...existing.config, auth: { provider: providerId } }
5437
- : { url: RADIUS_MCP_URL, auth: { provider: providerId } };
5438
- // `auth` replaces the MCP OAuth sign-in.
5439
- delete config.oauth;
5538
+ const { mcpPath, name, config } = plan;
5440
5539
  this.showSelector((done) => {
5441
5540
  const selector = new ExtensionSelectorComponent(`Configure ${providerName} MCP in ${mcpPath}?`, ["Yes", "No"], (option) => {
5442
5541
  done();
@@ -5602,18 +5701,22 @@ export class InteractiveMode {
5602
5701
  }
5603
5702
  catch (error) {
5604
5703
  if (error instanceof MissingSessionCwdError) {
5605
- const selectedCwd = await this.promptForMissingSessionCwd(error);
5606
- if (!selectedCwd) {
5607
- this.showStatus("Import cancelled");
5608
- return;
5609
- }
5610
- const result = await this.runtimeHost.importFromJsonl(inputPath, selectedCwd);
5611
- if (result.cancelled) {
5612
- this.showStatus("Import cancelled");
5613
- return;
5704
+ switch (await this.promptForMissingSessionCwd(error)) {
5705
+ case "continue": {
5706
+ const result = await this.runtimeHost.importFromJsonl(inputPath, error.issue.fallbackCwd);
5707
+ this.showStatus(result.cancelled ? "Import cancelled" : `Session imported from: ${inputPath}`);
5708
+ return;
5709
+ }
5710
+ case "fork": {
5711
+ const result = await this.switchToForkedSession(inputPath, error.issue.fallbackCwd);
5712
+ if (result.cancelled)
5713
+ this.showStatus("Import cancelled");
5714
+ return;
5715
+ }
5716
+ case undefined:
5717
+ this.showStatus("Import cancelled");
5718
+ return;
5614
5719
  }
5615
- this.showStatus(`Session imported from: ${inputPath}`);
5616
- return;
5617
5720
  }
5618
5721
  if (error instanceof SessionImportFileNotFoundError) {
5619
5722
  this.showError(`Failed to import session: ${error.message}`);
@@ -5780,7 +5883,7 @@ export class InteractiveMode {
5780
5883
  this.chatContainer.addChild(new DynamicBorder());
5781
5884
  this.chatContainer.addChild(new ThemedText(() => theme.bold(theme.fg("accent", "What's New")), 1, 0));
5782
5885
  this.chatContainer.addChild(new Spacer(1));
5783
- this.chatContainer.addChild(new Markdown(changelogMarkdown, 1, 1, this.getMarkdownThemeWithSettings()));
5886
+ this.chatContainer.addChild(this.createChangelogMarkdown(changelogMarkdown, 1, 1));
5784
5887
  this.chatContainer.addChild(new DynamicBorder());
5785
5888
  this.ui.requestRender();
5786
5889
  }
@@ -5982,6 +6085,7 @@ export class InteractiveMode {
5982
6085
  const result = eventResult.result;
5983
6086
  // Create UI component for display
5984
6087
  this.bashComponent = new BashExecutionComponent(command, this.ui, excludeFromContext, this.outputPad);
6088
+ this.bashComponent.setExpanded(this.toolOutputExpanded);
5985
6089
  if (this.session.isStreaming) {
5986
6090
  this.pendingMessagesContainer.addChild(this.bashComponent);
5987
6091
  this.pendingBashComponents.push(this.bashComponent);
@@ -6003,6 +6107,7 @@ export class InteractiveMode {
6003
6107
  // Normal execution path (possibly with custom operations)
6004
6108
  const isDeferred = this.session.isStreaming;
6005
6109
  this.bashComponent = new BashExecutionComponent(command, this.ui, excludeFromContext, this.outputPad);
6110
+ this.bashComponent.setExpanded(this.toolOutputExpanded);
6006
6111
  if (isDeferred) {
6007
6112
  // Show in pending area when agent is streaming
6008
6113
  this.pendingMessagesContainer.addChild(this.bashComponent);