@humain/humain-code 0.8.4 → 0.8.7

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 (242) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/bundle/agent-monitor.js +1 -1
  3. package/dist/bundle/chunks/{anthropic-messages-42CGJCSR.js → anthropic-messages-QMSJV4J5.js} +3 -3
  4. package/dist/bundle/chunks/{ask-VH7GNX75.js → ask-VVSJA5VG.js} +2 -2
  5. package/dist/bundle/chunks/{azure-openai-responses-DOKKMBUN.js → azure-openai-responses-P57ZD6XP.js} +3 -3
  6. package/dist/bundle/chunks/chunk-2QVKRSKH.js +4 -0
  7. package/dist/bundle/chunks/{chunk-OTVHRZ67.js → chunk-3BZUQ54Z.js} +1 -1
  8. package/dist/bundle/chunks/{chunk-XGOJCV6Z.js → chunk-4K6ISLTX.js} +1 -1
  9. package/dist/bundle/chunks/{chunk-BNZZJ4LO.js → chunk-4QVJYVS5.js} +1 -1
  10. package/dist/bundle/chunks/{chunk-MXF3KYLZ.js → chunk-4UXFF4IH.js} +1 -1
  11. package/dist/bundle/chunks/{chunk-J5YFXMTM.js → chunk-6PJEPQBW.js} +2 -2
  12. package/dist/bundle/chunks/{chunk-4SL6URR3.js → chunk-7X7QN6MX.js} +5 -3
  13. package/dist/bundle/chunks/{chunk-XGSJX23G.js → chunk-A7AH3VMJ.js} +69 -66
  14. package/dist/bundle/chunks/{chunk-H35P7ROY.js → chunk-B345VDHB.js} +9 -7
  15. package/dist/bundle/chunks/{chunk-A5ZMBTTM.js → chunk-B57IK7TV.js} +2 -2
  16. package/dist/bundle/chunks/{chunk-KJ3QRSSY.js → chunk-BVBEJBVY.js} +1 -1
  17. package/dist/bundle/chunks/{chunk-AER66CNP.js → chunk-BXDTDGHH.js} +1 -1
  18. package/dist/bundle/chunks/chunk-CDLUE6BJ.js +4 -0
  19. package/dist/bundle/chunks/{chunk-FLWO3H5J.js → chunk-DBC6XUKA.js} +1 -1
  20. package/dist/bundle/chunks/{chunk-HWXQCJDP.js → chunk-EB2ZJYOO.js} +295 -254
  21. package/dist/bundle/chunks/{chunk-4BNDLR6C.js → chunk-EK4QE622.js} +147 -37
  22. package/dist/bundle/chunks/{chunk-K5EFEIFP.js → chunk-H6CKS7HC.js} +1 -1
  23. package/dist/bundle/chunks/{chunk-UTRUALFN.js → chunk-HV25WMNO.js} +1 -1
  24. package/dist/bundle/chunks/{chunk-73YX5XGR.js → chunk-IP7R6BIN.js} +1079 -657
  25. package/dist/bundle/chunks/{chunk-HRNYDRL7.js → chunk-J5R2BQJS.js} +1 -1
  26. package/dist/bundle/chunks/{chunk-5C5K4EVJ.js → chunk-JNSFJADB.js} +1 -1
  27. package/dist/bundle/chunks/{chunk-CG43CMFH.js → chunk-KBIPIIKE.js} +1 -1
  28. package/dist/bundle/chunks/{chunk-CIAXW64K.js → chunk-MS3SLC2V.js} +10 -10
  29. package/dist/bundle/chunks/{chunk-WCKS2DPT.js → chunk-NO6T6CDO.js} +1 -1
  30. package/dist/bundle/chunks/{chunk-EVDQRT3I.js → chunk-NSSJ6OJK.js} +141 -225
  31. package/dist/bundle/chunks/{chunk-MZYHSWHX.js → chunk-OR3ORXP3.js} +2 -2
  32. package/dist/bundle/chunks/{chunk-MLOUZAVZ.js → chunk-PU7SKUJ6.js} +2 -2
  33. package/dist/bundle/chunks/{chunk-QZXLTW7V.js → chunk-RRGJHRKF.js} +1 -1
  34. package/dist/bundle/chunks/{chunk-625QJSFJ.js → chunk-SDPK3KZ3.js} +1 -1
  35. package/dist/bundle/chunks/{chunk-ZFFDBTG3.js → chunk-SPLJOIKL.js} +1 -1
  36. package/dist/bundle/chunks/{chunk-O44A4E4K.js → chunk-TNKPCYIM.js} +1 -1
  37. package/dist/bundle/chunks/{chunk-5KUCY54O.js → chunk-UY5TOBH2.js} +1 -1
  38. package/dist/bundle/chunks/{chunk-ARTF7ZMQ.js → chunk-VFPA5KPR.js} +1 -1
  39. package/dist/bundle/chunks/chunk-VP27C46J.js +23 -0
  40. package/dist/bundle/chunks/{chunk-B3FT6L6S.js → chunk-XZJT5U3V.js} +1 -1
  41. package/dist/bundle/chunks/{chunk-UOSJTMCL.js → chunk-YCGPXBJP.js} +1 -1
  42. package/dist/bundle/chunks/{chunk-52642TYH.js → chunk-YRSNKHEF.js} +389 -783
  43. package/dist/bundle/chunks/{chunk-MQYR4Q6X.js → chunk-YSRWNEZW.js} +1 -1
  44. package/dist/bundle/chunks/{chunk-SOE25WIS.js → chunk-ZAO4KC6J.js} +1054 -1069
  45. package/dist/bundle/chunks/{chunk-V2HTCZRF.js → chunk-ZXOTVZUX.js} +1 -1
  46. package/dist/bundle/chunks/{chunk-T5WECB2D.js → chunk-ZZNGVD5Q.js} +1 -1
  47. package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-ZAZW4M4B.js → cloudflare-workers-ai-system-one-4BO66KHO.js} +1 -1
  48. package/dist/bundle/chunks/{compat-7UJJAO4E.js → compat-EOHVO2W3.js} +4 -4
  49. package/dist/bundle/chunks/{curator-server-MW645JI3.js → curator-server-72V7LMHQ.js} +1 -1
  50. package/dist/bundle/chunks/{dist-7PCCEUQF.js → dist-FW7ELRQH.js} +1 -1
  51. package/dist/bundle/chunks/{dist-I53JI67E.js → dist-YEVRRTWL.js} +8 -8
  52. package/dist/bundle/chunks/{dist-VXQT3DQY.js → dist-ZRUKAVTU.js} +3 -3
  53. package/dist/bundle/chunks/{doctor-KJVAYG3F.js → doctor-HJKC434Y.js} +29 -28
  54. package/dist/bundle/chunks/{easter-egg-3d-Z24JLXD4.js → easter-egg-3d-M37PJBL5.js} +1 -1
  55. package/dist/bundle/chunks/entry-M5TRX7N4.js +2 -0
  56. package/dist/bundle/chunks/{execute-C4BZQRPQ.js → execute-MIXK3CFW.js} +2 -2
  57. package/dist/bundle/chunks/{extract-XVQCIS7D.js → extract-WB6Y6ISY.js} +2 -2
  58. package/dist/bundle/chunks/{flow-implementer-GE2ARQKR.js → flow-implementer-ZNK5KVOG.js} +5 -5
  59. package/dist/bundle/chunks/github-copilot.js +1 -1
  60. package/dist/bundle/chunks/{google-generative-ai-P2P45MYP.js → google-generative-ai-B2BT7X4W.js} +3 -3
  61. package/dist/bundle/chunks/{google-vertex-SHY4IS5F.js → google-vertex-PCFDFRHY.js} +3 -3
  62. package/dist/bundle/chunks/{host-YESS2VAB.js → host-RF6R6GLZ.js} +1 -1
  63. package/dist/bundle/chunks/{inprocess-MGMVI6HN.js → inprocess-6MLIANGV.js} +6 -6
  64. package/dist/bundle/chunks/interactive-mode-QKREO5BH.js +6 -0
  65. package/dist/bundle/chunks/{llama-cpp-classify-RSRH4KV2.js → llama-cpp-classify-DMJSUUAD.js} +1 -1
  66. package/dist/bundle/chunks/{mistral-conversations-YTMJKHHI.js → mistral-conversations-OXWTIYWX.js} +2 -2
  67. package/dist/bundle/chunks/{openai-codex-responses-NUCJOJSZ.js → openai-codex-responses-YGXOZKWL.js} +3 -3
  68. package/dist/bundle/chunks/{openai-completions-E5NRJUHA.js → openai-completions-WDVOHMN6.js} +4 -4
  69. package/dist/bundle/chunks/{openai-decisions-342J5ZYG.js → openai-decisions-45LGQAD5.js} +1 -1
  70. package/dist/bundle/chunks/{openai-responses-BN5Z4HFI.js → openai-responses-OZDPUN4M.js} +3 -3
  71. package/dist/bundle/chunks/{openrouter-images-7RNG3JVF.js → openrouter-images-2IKRVRTZ.js} +2 -2
  72. package/dist/bundle/chunks/{pi-messages-2L7FV5OK.js → pi-messages-VZOJLMWW.js} +2 -2
  73. package/dist/bundle/chunks/{questionnaire-session-XEVAK7JS.js → questionnaire-session-RSZE5I3P.js} +2 -2
  74. package/dist/bundle/chunks/{session-picker-666KJIVM.js → session-picker-EUPZJEFF.js} +2 -2
  75. package/dist/bundle/chunks/{startup-ui-INEVSNGK.js → startup-ui-RTSTUGUC.js} +2 -2
  76. package/dist/bundle/chunks/{typesafe-system-one-UJUNSZG4.js → typesafe-system-one-IVWD24CQ.js} +1 -1
  77. package/dist/bundle/chunks/{virtual-modules-UXSSFNV5.js → virtual-modules-LS3DOCYU.js} +8 -8
  78. package/dist/bundle/cli-runtime.js +5 -5
  79. package/dist/bundle/flow/package.json +1 -1
  80. package/dist/bundle/index.js +11 -11
  81. package/dist/bundle/rpc-entry.js +5 -5
  82. package/dist/coordination/adapter/delivery.d.ts +6 -0
  83. package/dist/coordination/adapter/delivery.d.ts.map +1 -1
  84. package/dist/coordination/adapter/delivery.js +39 -4
  85. package/dist/coordination/adapter/delivery.js.map +1 -1
  86. package/dist/coordination/adapter/index.d.ts +2 -0
  87. package/dist/coordination/adapter/index.d.ts.map +1 -1
  88. package/dist/coordination/adapter/index.js +26 -0
  89. package/dist/coordination/adapter/index.js.map +1 -1
  90. package/dist/coordination/adapter/tool.js +3 -3
  91. package/dist/coordination/adapter/tool.js.map +1 -1
  92. package/dist/core/bug-report.d.ts +24 -1
  93. package/dist/core/bug-report.d.ts.map +1 -1
  94. package/dist/core/bug-report.js +216 -19
  95. package/dist/core/bug-report.js.map +1 -1
  96. package/dist/core/extensions/containment.d.ts +26 -0
  97. package/dist/core/extensions/containment.d.ts.map +1 -0
  98. package/dist/core/extensions/containment.js +66 -0
  99. package/dist/core/extensions/containment.js.map +1 -0
  100. package/dist/core/extensions/loader.d.ts.map +1 -1
  101. package/dist/core/extensions/loader.js +65 -7
  102. package/dist/core/extensions/loader.js.map +1 -1
  103. package/dist/core/extensions/runner.d.ts +2 -1
  104. package/dist/core/extensions/runner.d.ts.map +1 -1
  105. package/dist/core/extensions/runner.js +55 -10
  106. package/dist/core/extensions/runner.js.map +1 -1
  107. package/dist/core/extensions/types.d.ts +5 -2
  108. package/dist/core/extensions/types.d.ts.map +1 -1
  109. package/dist/core/extensions/types.js.map +1 -1
  110. package/dist/core/extensions/wrapper.d.ts.map +1 -1
  111. package/dist/core/extensions/wrapper.js +4 -1
  112. package/dist/core/extensions/wrapper.js.map +1 -1
  113. package/dist/core/footer-data-provider.d.ts +2 -0
  114. package/dist/core/footer-data-provider.d.ts.map +1 -1
  115. package/dist/core/footer-data-provider.js +4 -0
  116. package/dist/core/footer-data-provider.js.map +1 -1
  117. package/dist/core/keybindings.d.ts +16 -0
  118. package/dist/core/keybindings.d.ts.map +1 -1
  119. package/dist/core/keybindings.js +2 -0
  120. package/dist/core/keybindings.js.map +1 -1
  121. package/dist/core/settings-defaults.d.ts +5 -0
  122. package/dist/core/settings-defaults.d.ts.map +1 -1
  123. package/dist/core/settings-defaults.js +2 -0
  124. package/dist/core/settings-defaults.js.map +1 -1
  125. package/dist/core/settings-manager.d.ts +10 -0
  126. package/dist/core/settings-manager.d.ts.map +1 -1
  127. package/dist/core/settings-manager.js +31 -0
  128. package/dist/core/settings-manager.js.map +1 -1
  129. package/dist/core/settings-schema.d.ts +5 -0
  130. package/dist/core/settings-schema.d.ts.map +1 -1
  131. package/dist/core/settings-schema.js +8 -0
  132. package/dist/core/settings-schema.js.map +1 -1
  133. package/dist/core/slash-commands.d.ts.map +1 -1
  134. package/dist/core/slash-commands.js +1 -0
  135. package/dist/core/slash-commands.js.map +1 -1
  136. package/dist/forge-build-token.d.ts +3 -0
  137. package/dist/forge-build-token.d.ts.map +1 -0
  138. package/dist/forge-build-token.js +17 -0
  139. package/dist/forge-build-token.js.map +1 -0
  140. package/dist/humain/checklist/vendor/commands.d.ts +7 -0
  141. package/dist/humain/checklist/vendor/commands.d.ts.map +1 -1
  142. package/dist/humain/checklist/vendor/commands.js +85 -21
  143. package/dist/humain/checklist/vendor/commands.js.map +1 -1
  144. package/dist/humain/checklist/vendor/index.d.ts.map +1 -1
  145. package/dist/humain/checklist/vendor/index.js +4 -3
  146. package/dist/humain/checklist/vendor/index.js.map +1 -1
  147. package/dist/humain/flow-loader.d.ts.map +1 -1
  148. package/dist/humain/flow-loader.js +31 -5
  149. package/dist/humain/flow-loader.js.map +1 -1
  150. package/dist/humain/hcode/build-token.d.ts +35 -0
  151. package/dist/humain/hcode/build-token.d.ts.map +1 -0
  152. package/dist/humain/hcode/build-token.js +406 -0
  153. package/dist/humain/hcode/build-token.js.map +1 -0
  154. package/dist/humain/hcode/contracts.d.ts +3 -1
  155. package/dist/humain/hcode/contracts.d.ts.map +1 -1
  156. package/dist/humain/hcode/contracts.js +7 -4
  157. package/dist/humain/hcode/contracts.js.map +1 -1
  158. package/dist/humain/hcode/notices.d.ts +5 -0
  159. package/dist/humain/hcode/notices.d.ts.map +1 -1
  160. package/dist/humain/hcode/notices.js +5 -0
  161. package/dist/humain/hcode/notices.js.map +1 -1
  162. package/dist/humain/hcode/provider.d.ts.map +1 -1
  163. package/dist/humain/hcode/provider.js +1 -1
  164. package/dist/humain/hcode/provider.js.map +1 -1
  165. package/dist/humain/hcode/run-credential.d.ts +3 -1
  166. package/dist/humain/hcode/run-credential.d.ts.map +1 -1
  167. package/dist/humain/hcode/run-credential.js +123 -19
  168. package/dist/humain/hcode/run-credential.js.map +1 -1
  169. package/dist/humain/hcode/sandbox.d.ts.map +1 -1
  170. package/dist/humain/hcode/sandbox.js +10 -4
  171. package/dist/humain/hcode/sandbox.js.map +1 -1
  172. package/dist/humain/web-access/vendor/index.d.ts.map +1 -1
  173. package/dist/humain/web-access/vendor/index.js +11 -1
  174. package/dist/humain/web-access/vendor/index.js.map +1 -1
  175. package/dist/modes/interactive/bug-report.d.ts.map +1 -1
  176. package/dist/modes/interactive/bug-report.js +48 -12
  177. package/dist/modes/interactive/bug-report.js.map +1 -1
  178. package/dist/modes/interactive/chat-viewport.d.ts +4 -0
  179. package/dist/modes/interactive/chat-viewport.d.ts.map +1 -1
  180. package/dist/modes/interactive/chat-viewport.js +29 -5
  181. package/dist/modes/interactive/chat-viewport.js.map +1 -1
  182. package/dist/modes/interactive/components/footer.d.ts +2 -0
  183. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  184. package/dist/modes/interactive/components/footer.js +29 -12
  185. package/dist/modes/interactive/components/footer.js.map +1 -1
  186. package/dist/modes/interactive/components/settings-selector.d.ts +6 -0
  187. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  188. package/dist/modes/interactive/components/settings-selector.js +20 -0
  189. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  190. package/dist/modes/interactive/components/status-line.js +2 -2
  191. package/dist/modes/interactive/components/status-line.js.map +1 -1
  192. package/dist/modes/interactive/components/tool-execution.d.ts +18 -1
  193. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  194. package/dist/modes/interactive/components/tool-execution.js +91 -3
  195. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  196. package/dist/modes/interactive/components/tool-group.d.ts +22 -0
  197. package/dist/modes/interactive/components/tool-group.d.ts.map +1 -0
  198. package/dist/modes/interactive/components/tool-group.js +117 -0
  199. package/dist/modes/interactive/components/tool-group.js.map +1 -0
  200. package/dist/modes/interactive/interactive-mode.d.ts +15 -3
  201. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  202. package/dist/modes/interactive/interactive-mode.js +183 -52
  203. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  204. package/dist/modes/interactive/sidebar/git-work.d.ts +18 -0
  205. package/dist/modes/interactive/sidebar/git-work.d.ts.map +1 -0
  206. package/dist/modes/interactive/sidebar/git-work.js +56 -0
  207. package/dist/modes/interactive/sidebar/git-work.js.map +1 -0
  208. package/dist/modes/interactive/sidebar/sidebar-component.d.ts +13 -0
  209. package/dist/modes/interactive/sidebar/sidebar-component.d.ts.map +1 -0
  210. package/dist/modes/interactive/sidebar/sidebar-component.js +61 -0
  211. package/dist/modes/interactive/sidebar/sidebar-component.js.map +1 -0
  212. package/dist/modes/interactive/sidebar/sidebar-model.d.ts +69 -0
  213. package/dist/modes/interactive/sidebar/sidebar-model.d.ts.map +1 -0
  214. package/dist/modes/interactive/sidebar/sidebar-model.js +217 -0
  215. package/dist/modes/interactive/sidebar/sidebar-model.js.map +1 -0
  216. package/dist/modes/interactive/tool-grouping.d.ts +11 -0
  217. package/dist/modes/interactive/tool-grouping.d.ts.map +1 -0
  218. package/dist/modes/interactive/tool-grouping.js +32 -0
  219. package/dist/modes/interactive/tool-grouping.js.map +1 -0
  220. package/docs/coordination.md +7 -3
  221. package/docs/environment-variables.md +14 -0
  222. package/docs/extensions.md +2 -0
  223. package/docs/flow.md +2 -0
  224. package/docs/forge-run-bootstrap.md +77 -42
  225. package/docs/humain-code.md +1 -1
  226. package/docs/keybindings.md +2 -0
  227. package/docs/providers.md +14 -0
  228. package/docs/settings.md +16 -1
  229. package/docs/slash-commands.md +3 -0
  230. package/examples/sdk/12-full-control.ts +1 -1
  231. package/npm-shrinkwrap.json +7 -6
  232. package/package.json +3 -2
  233. package/schemas/keybindings.schema.json +8 -0
  234. package/schemas/settings.schema.json +29 -0
  235. package/src/humain/caveman/UPSTREAM.md +15 -3
  236. package/src/humain/caveman/upstream.json +2 -2
  237. package/src/humain/web-access/UPSTREAM.md +8 -0
  238. package/dist/bundle/chunks/chunk-HWFAAGYK.js +0 -23
  239. package/dist/bundle/chunks/chunk-RP6MWUAP.js +0 -4
  240. package/dist/bundle/chunks/entry-3EL6GOWK.js +0 -2
  241. package/dist/bundle/chunks/interactive-mode-HHWOE4FD.js +0 -5
  242. /package/dist/bundle/chunks/{chunk-T7F2TEIS.js → chunk-3IX4NEXK.js} +0 -0
@@ -14,6 +14,7 @@ import chalk from "chalk";
14
14
  import { spawn } from "child_process";
15
15
  import { trackUserWait } from "../../agent-monitor/user-wait.js";
16
16
  import { APP_COMMAND, APP_TITLE, CONFIG_DIR_NAME, detectInstallChange, ENV_OFFLINE, getAgentDir, getAuthPath, getChangelogUrl, getDebugLogPath, getDocsPath, usesDefaultAgentDir, VERSION, } from "../../config.js";
17
+ import { getLiveSessionCount } from "../../coordination/adapter/index.js";
17
18
  import { formatAccountUsageReport } from "../../core/account-reporting.js";
18
19
  import { parseSkillBlock } from "../../core/agent-session.js";
19
20
  import { SessionImportFileNotFoundError } from "../../core/agent-session-runtime.js";
@@ -24,6 +25,7 @@ import { formatCacheWarmingStatus, formatCacheWarmingUsage } from "../../core/ca
24
25
  import { CODEX_USAGE_PROVIDER_ID, getCodexAvailability } from "../../core/codex-usage.js";
25
26
  import { findExtensionStackMatches, recordCrash, takeUnnotifiedCrash } from "../../core/crash-log.js";
26
27
  import { DEFAULT_THINKING_LEVEL, THINKING_LEVEL_OPTIONS } from "../../core/defaults.js";
28
+ import { containStaleExtension, setExtensionErrorReporter } from "../../core/extensions/containment.js";
27
29
  import { FooterDataProvider } from "../../core/footer-data-provider.js";
28
30
  import { configureHttpDispatcher, formatHttpIdleTimeoutMs } from "../../core/http-dispatcher.js";
29
31
  import { KeybindingsManager } from "../../core/keybindings.js";
@@ -50,6 +52,8 @@ import { readClaudeUsage } from "../../extensions/usage/overview.js";
50
52
  import { resolveAdhdSessionMode } from "../../humain/adhd/index.js";
51
53
  import { renderHumainCodeIcon, renderHumainCodeIconInline } from "../../humain/brand-logo.js";
52
54
  import { CAVEMAN_LEVELS, getCavemanDefaultMode, resolveCavemanSessionMode } from "../../humain/caveman/index.js";
55
+ import { getChecklistProvider } from "../../humain/checklist/index.js";
56
+ import { setSidebarTaskSurfaceVisible } from "../../humain/checklist/vendor/commands.js";
53
57
  import { bindFlowAccountsHost, createFlowAccountReporter, FLOW_ACCOUNT_PERSISTENCE_NOTICE, flowUsageTargets, formatFlowAccountAdvanced, listFlowAccountMetadata, nodeLabelContainsStoredKey, readFlowNodeFallbackState, refreshFlowCatalog, updateFlowNodeFallback, } from "../../humain/flow-accounts-host.js";
54
58
  import { HUMAIN_FUSE_PROVIDER } from "../../humain/fuse-provider.js";
55
59
  import { HUMAIN_GATEWAY_PROVIDER } from "../../humain/gateway/constants.js";
@@ -113,6 +117,7 @@ import { StatusLineContainer } from "./components/status-line.js";
113
117
  import { ThemedText } from "./components/themed-text.js";
114
118
  import { ThinkingSelectorComponent } from "./components/thinking-selector.js";
115
119
  import { ToolExecutionComponent } from "./components/tool-execution.js";
120
+ import { ToolGroupComponent } from "./components/tool-group.js";
116
121
  import { TranscriptContainer } from "./components/transcript-container.js";
117
122
  import { TreeSelectorComponent } from "./components/tree-selector.js";
118
123
  import { TrustSelectorComponent } from "./components/trust-selector.js";
@@ -125,8 +130,11 @@ import { getModelSearchText } from "./model-search.js";
125
130
  import { formatOAuthAccountOption, formatOAuthAccountResetTime, formatOAuthAccountUsage, subscriptionAccountUsage, } from "./oauth-account-format.js";
126
131
  import { dialogBlockedStatus, ProgramStatusReporter } from "./program-status-reporter.js";
127
132
  import { shareSession } from "./session-share.js";
133
+ import { SidebarComponent } from "./sidebar/sidebar-component.js";
134
+ import { SidebarModel } from "./sidebar/sidebar-model.js";
128
135
  import { DEFAULT_THEME_NAME, getAvailableThemes, getAvailableThemesWithPaths, getEditorTheme, getMarkdownTheme, getSelectListTheme, getThemeByName, onThemeChange, setRegisteredThemes, stopThemeWatcher, Theme, theme, } from "./theme/theme.js";
129
136
  import { InteractiveThemeController } from "./theme/theme-controller.js";
137
+ import { isReadOnlyTool } from "./tool-grouping.js";
130
138
  import { createInteractiveTui, createInteractiveTuiReference } from "./tui-renderer.js";
131
139
  export { createInteractiveTui, createInteractiveTuiReference } from "./tui-renderer.js";
132
140
  function isEmbeddedStatus(editor) {
@@ -345,6 +353,11 @@ export class InteractiveMode {
345
353
  documentContainer;
346
354
  transcriptScrollView;
347
355
  fullscreenLayoutRoot;
356
+ chatViewport;
357
+ sidebarContainer;
358
+ sidebarModel;
359
+ sidebarNarrowNoticeShown = false;
360
+ sidebarRegularNoticeShown = false;
348
361
  pendingMessagesContainer;
349
362
  statusContainer;
350
363
  statusDetailsVisible = false;
@@ -406,6 +419,26 @@ export class InteractiveMode {
406
419
  streamingMessage = undefined;
407
420
  // Tool execution tracking: toolCallId -> component
408
421
  pendingTools = new Map();
422
+ activeToolGroup;
423
+ addToolDisplayRow(row, toolName) {
424
+ if (this.settingsManager.getToolDisplay() !== "grouped") {
425
+ this.activeToolGroup = undefined;
426
+ this.chatContainer.addChild(row);
427
+ return;
428
+ }
429
+ if (this.activeToolGroup !== this.chatContainer.children.at(-1))
430
+ this.activeToolGroup = undefined;
431
+ const readOnly = isReadOnlyTool(toolName);
432
+ let group = readOnly ? this.activeToolGroup : undefined;
433
+ if (!group) {
434
+ group = new ToolGroupComponent();
435
+ group.setOutputPad(this.outputPad);
436
+ group.setExpanded(this.toolOutputExpanded);
437
+ this.chatContainer.addChild(group);
438
+ }
439
+ group.add(row);
440
+ this.activeToolGroup = readOnly ? group : undefined;
441
+ }
409
442
  // Tool output expansion state
410
443
  toolOutputExpanded = false;
411
444
  // Thinking block visibility state
@@ -834,6 +867,8 @@ export class InteractiveMode {
834
867
  }
835
868
  this.renderer = nextUi;
836
869
  this.options.tuiMode = mode;
870
+ if (this.chatViewport)
871
+ this.updateSidebarVisibility(terminal.columns);
837
872
  this.mountInteractiveTui(nextUi, components);
838
873
  nextUi.invalidate();
839
874
  nextUi.setFocus(focus);
@@ -878,7 +913,9 @@ export class InteractiveMode {
878
913
  scrollbarThumbStyle: (text) => theme.fg("scrollbarThumb", text),
879
914
  });
880
915
  this.transcriptScrollView = viewport.transcript;
916
+ this.chatViewport = viewport;
881
917
  this.fullscreenLayoutRoot = viewport.root;
918
+ this.configureSidebar();
882
919
  this.mountInteractiveTui(this.renderer, [
883
920
  this.documentContainer,
884
921
  this.pendingMessagesContainer,
@@ -1885,9 +1922,7 @@ export class InteractiveMode {
1885
1922
  void this.shutdown();
1886
1923
  }
1887
1924
  },
1888
- onError: (error) => {
1889
- this.showExtensionError(error.extensionPath, error.error, error.stack);
1890
- },
1925
+ onError: (error) => this.handleExtensionError(error),
1891
1926
  });
1892
1927
  this.bindFlowAccountsHostToSession();
1893
1928
  setRegisteredThemes(this.session.resourceLoader.getThemes().themes);
@@ -1923,6 +1958,9 @@ export class InteractiveMode {
1923
1958
  this.session.setAutoEffortInteractive(true);
1924
1959
  this.footer.setSession(this.session);
1925
1960
  this.footerDataProvider.setCwd(this.sessionManager.getCwd());
1961
+ this.sidebarModel?.dispose();
1962
+ this.sidebarModel = undefined;
1963
+ this.configureSidebar();
1926
1964
  this.hideThinkingBlock = this.settingsManager.getHideThinkingBlock();
1927
1965
  this.outputPad = this.settingsManager.getOutputPad();
1928
1966
  this.ui.setShowHardwareCursor(this.settingsManager.getShowHardwareCursor());
@@ -2067,6 +2105,7 @@ export class InteractiveMode {
2067
2105
  * the session.
2068
2106
  */
2069
2107
  clearPendingTools() {
2108
+ this.activeToolGroup = undefined;
2070
2109
  for (const component of this.pendingTools.values())
2071
2110
  component.dispose();
2072
2111
  this.pendingTools.clear();
@@ -2102,51 +2141,25 @@ export class InteractiveMode {
2102
2141
  const shortcuts = extensionRunner.getShortcuts(this.keybindings.getEffectiveConfig());
2103
2142
  if (shortcuts.size === 0)
2104
2143
  return;
2105
- // Create a context for shortcut handlers
2106
- const createContext = () => ({
2107
- ui: this.createExtensionUIContext(),
2108
- mode: "tui",
2109
- hasUI: true,
2110
- cwd: this.sessionManager.getCwd(),
2111
- sessionManager: this.sessionManager,
2112
- modelRegistry: extensionRunner.getModelRegistry(),
2113
- model: this.session.model,
2114
- scopedModels: this.session.scopedModels,
2115
- thinkingLevel: this.session.thinkingLevel,
2116
- isIdle: () => this.session.isIdle,
2117
- isProjectTrusted: () => this.settingsManager.isProjectTrusted(),
2118
- signal: this.session.agent.signal,
2119
- abort: () => {
2120
- this.restoreQueuedMessagesToEditor({ abort: true });
2121
- },
2122
- hasPendingMessages: () => this.session.pendingMessageCount > 0,
2123
- shutdown: () => {
2124
- this.shutdownRequested = true;
2125
- },
2126
- getContextUsage: () => this.session.getContextUsage(),
2127
- compact: (options) => {
2128
- void (async () => {
2129
- try {
2130
- const result = await this.session.compact(options?.customInstructions);
2131
- options?.onComplete?.(result);
2132
- }
2133
- catch (error) {
2134
- const err = error instanceof Error ? error : new Error(String(error));
2135
- options?.onError?.(err);
2136
- }
2137
- })();
2138
- },
2139
- getSystemPrompt: () => this.session.systemPrompt,
2140
- });
2141
2144
  // Set up the extension shortcut handler on the default editor
2142
2145
  this.defaultEditor.onExtensionShortcut = (data) => {
2143
2146
  for (const [shortcutStr, shortcut] of shortcuts) {
2144
2147
  // Cast to KeyId - extension shortcuts use the same format
2145
2148
  if (matchesKey(data, shortcutStr)) {
2146
- // Run handler async, don't block input
2147
- Promise.resolve(shortcut.handler(createContext())).catch((err) => {
2148
- this.showError(`Shortcut handler error: ${err instanceof Error ? err.message : String(err)}`);
2149
- });
2149
+ // Catch synchronous throws as well as rejections without blocking input.
2150
+ void (async () => {
2151
+ try {
2152
+ await shortcut.handler(extensionRunner.createContext());
2153
+ }
2154
+ catch (error) {
2155
+ this.handleExtensionError({
2156
+ extensionPath: shortcut.extensionPath,
2157
+ event: `shortcut:${shortcutStr}`,
2158
+ error: error instanceof Error ? error.message : String(error),
2159
+ stack: error instanceof Error ? error.stack : undefined,
2160
+ });
2161
+ }
2162
+ })();
2150
2163
  return true;
2151
2164
  }
2152
2165
  }
@@ -2897,9 +2910,15 @@ export class InteractiveMode {
2897
2910
  });
2898
2911
  });
2899
2912
  }
2900
- /**
2901
- * Show an extension error in the UI.
2902
- */
2913
+ /** Record contained failures for /bug without interrupting the current operation. */
2914
+ handleExtensionError(failure) {
2915
+ const error = new Error(`Extension "${failure.extensionPath}" (${failure.event}): ${failure.error}`);
2916
+ if (failure.stack)
2917
+ error.stack = `${error.message}\n${failure.stack}`;
2918
+ this.recordCrash("uncaught_exception", error);
2919
+ this.showExtensionError(failure.extensionPath, failure.error, failure.stack);
2920
+ }
2921
+ /** Show an extension error in the UI. */
2903
2922
  showExtensionError(extensionPath, error, stack) {
2904
2923
  const errorMsg = `Extension "${extensionPath}" error: ${error}`;
2905
2924
  const errorText = new ThemedText(() => theme.fg("error", errorMsg), 1, 0);
@@ -2963,8 +2982,13 @@ export class InteractiveMode {
2963
2982
  this.ui.onDebug = () => this.handleDebugCommand();
2964
2983
  this.defaultEditor.onAction("app.model.select", () => this.showModelSelector());
2965
2984
  this.defaultEditor.onAction("app.tools.expand", () => this.toggleToolOutputExpansion());
2985
+ this.defaultEditor.onAction("app.sidebar.toggle", () => this.setSidebarVisible(!this.settingsManager.getSidebarSettings().enabled));
2986
+ this.defaultEditor.onAction("app.tasks.toggle", () => {
2987
+ if (!this.footer.sidebarVisible && this.isExtensionCommand("/checklist toggle"))
2988
+ void this.session.prompt("/checklist toggle").catch((error) => this.showError(String(error)));
2989
+ });
2966
2990
  this.defaultEditor.onAction("app.checklist.sidebar", () => {
2967
- if (this.isExtensionCommand("/checklist sidebar"))
2991
+ if (!this.footer.sidebarVisible && this.isExtensionCommand("/checklist sidebar"))
2968
2992
  void this.session.prompt("/checklist sidebar").catch((error) => this.showError(String(error)));
2969
2993
  });
2970
2994
  this.defaultEditor.onAction("app.thinking.toggle", () => this.toggleThinkingBlockVisibility());
@@ -3082,6 +3106,17 @@ export class InteractiveMode {
3082
3106
  this.ui.requestRender();
3083
3107
  return;
3084
3108
  }
3109
+ if (/^\/sidebar(?:\s|$)/.test(text)) {
3110
+ const argument = text.slice("/sidebar".length).trim();
3111
+ if (argument === "on" || argument === "off") {
3112
+ this.setSidebarVisible(argument === "on");
3113
+ }
3114
+ else {
3115
+ this.showError("Usage: /sidebar on|off");
3116
+ }
3117
+ this.editor.setText("");
3118
+ return;
3119
+ }
3085
3120
  if (text === "/settings") {
3086
3121
  this.showSettingsSelector();
3087
3122
  this.editor.setText("");
@@ -3331,6 +3366,7 @@ export class InteractiveMode {
3331
3366
  }
3332
3367
  break;
3333
3368
  case "turn_start":
3369
+ this.activeToolGroup = undefined;
3334
3370
  if (this.settingsManager.getShowTerminalProgress()) {
3335
3371
  this.ui.terminal.setProgress(true);
3336
3372
  }
@@ -3417,6 +3453,7 @@ export class InteractiveMode {
3417
3453
  this.ui.requestRender();
3418
3454
  }
3419
3455
  else if (event.message.role === "assistant") {
3456
+ this.activeToolGroup = undefined;
3420
3457
  this.streamingComponent = new AssistantMessageComponent(undefined, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.getMarkdownTransformers(), () => this.ui.requestRender());
3421
3458
  this.streamingMessage = event.message;
3422
3459
  this.chatContainer.addChild(this.streamingComponent);
@@ -3425,6 +3462,8 @@ export class InteractiveMode {
3425
3462
  }
3426
3463
  break;
3427
3464
  case "message_update":
3465
+ if (event.assistantMessageEvent.type === "text_delta" && event.assistantMessageEvent.delta.length > 0)
3466
+ this.activeToolGroup = undefined;
3428
3467
  if (this.workingMessage === undefined &&
3429
3468
  this.activeStatusIndicator?.kind === "working" &&
3430
3469
  this.activeStatusIndicator instanceof WorkingStatusIndicator) {
@@ -3438,16 +3477,22 @@ export class InteractiveMode {
3438
3477
  this.streamingComponent.updateContent(this.streamingMessage, true);
3439
3478
  // Throttled argument parsing reuses the same object between parses; those deltas draw nothing new.
3440
3479
  let changed = event.assistantMessageEvent.type !== "toolcall_delta";
3480
+ let afterAssistantText = false;
3441
3481
  for (const content of this.streamingMessage.content) {
3482
+ if (content.type === "text" && content.text.length > 0)
3483
+ afterAssistantText = true;
3442
3484
  if (content.type === "toolCall") {
3443
3485
  if (!this.pendingTools.has(content.id)) {
3486
+ if (afterAssistantText)
3487
+ this.activeToolGroup = undefined;
3444
3488
  const component = new ToolExecutionComponent(content.name, content.id, content.arguments, {
3489
+ grouped: this.settingsManager.getToolDisplay() === "grouped",
3445
3490
  showImages: this.settingsManager.getShowImages(),
3446
3491
  imageWidthCells: this.settingsManager.getImageWidthCells(),
3447
3492
  outputPad: this.outputPad,
3448
3493
  }, this.getRegisteredToolDefinition(content.name), this.ui, this.sessionManager.getCwd());
3449
3494
  component.setExpanded(this.toolOutputExpanded);
3450
- this.chatContainer.addChild(component);
3495
+ this.addToolDisplayRow(component, content.name);
3451
3496
  this.pendingTools.set(content.id, component);
3452
3497
  changed = true;
3453
3498
  }
@@ -3456,6 +3501,7 @@ export class InteractiveMode {
3456
3501
  // Existing rows request their own render when arguments change.
3457
3502
  component?.updateArgs(content.arguments);
3458
3503
  }
3504
+ afterAssistantText = false;
3459
3505
  }
3460
3506
  }
3461
3507
  if (changed)
@@ -3531,12 +3577,13 @@ export class InteractiveMode {
3531
3577
  let component = this.pendingTools.get(event.toolCallId);
3532
3578
  if (!component) {
3533
3579
  component = new ToolExecutionComponent(event.toolName, event.toolCallId, event.args, {
3580
+ grouped: this.settingsManager.getToolDisplay() === "grouped",
3534
3581
  showImages: this.settingsManager.getShowImages(),
3535
3582
  imageWidthCells: this.settingsManager.getImageWidthCells(),
3536
3583
  outputPad: this.outputPad,
3537
3584
  }, this.getRegisteredToolDefinition(event.toolName), this.ui, this.sessionManager.getCwd());
3538
3585
  component.setExpanded(this.toolOutputExpanded);
3539
- this.chatContainer.addChild(component);
3586
+ this.addToolDisplayRow(component, event.toolName);
3540
3587
  this.pendingTools.set(event.toolCallId, component);
3541
3588
  }
3542
3589
  component.markExecutionStarted();
@@ -3552,6 +3599,8 @@ export class InteractiveMode {
3552
3599
  break;
3553
3600
  }
3554
3601
  case "tool_execution_end": {
3602
+ if (event.isError && !event.parentToolCallId)
3603
+ this.activeToolGroup = undefined;
3555
3604
  if (event.isError)
3556
3605
  this.maybeShowInstallChangeWarning();
3557
3606
  const component = this.pendingTools.get(event.toolCallId);
@@ -3911,6 +3960,7 @@ export class InteractiveMode {
3911
3960
  const message = item;
3912
3961
  // Assistant messages need special handling for tool calls
3913
3962
  if (message.role === "assistant") {
3963
+ this.activeToolGroup = undefined;
3914
3964
  const meta = messageMeta?.get(message);
3915
3965
  this.addMessageToChat(message, {
3916
3966
  messageId: meta?.id,
@@ -3918,14 +3968,17 @@ export class InteractiveMode {
3918
3968
  });
3919
3969
  // Render tool call components
3920
3970
  for (const content of message.content) {
3971
+ if (content.type === "text" && content.text.length > 0)
3972
+ this.activeToolGroup = undefined;
3921
3973
  if (content.type === "toolCall") {
3922
3974
  const component = new ToolExecutionComponent(content.name, content.id, content.arguments, {
3975
+ grouped: this.settingsManager.getToolDisplay() === "grouped",
3923
3976
  showImages: this.settingsManager.getShowImages(),
3924
3977
  imageWidthCells: this.settingsManager.getImageWidthCells(),
3925
3978
  outputPad: this.outputPad,
3926
3979
  }, this.getRegisteredToolDefinition(content.name), this.ui, this.sessionManager.getCwd());
3927
3980
  component.setExpanded(this.toolOutputExpanded);
3928
- this.chatContainer.addChild(component);
3981
+ this.addToolDisplayRow(component, content.name);
3929
3982
  if (message.stopReason === "aborted" || message.stopReason === "error") {
3930
3983
  let errorMessage;
3931
3984
  if (message.stopReason === "aborted") {
@@ -3956,10 +4009,13 @@ export class InteractiveMode {
3956
4009
  const component = renderedPendingTools.get(message.toolCallId);
3957
4010
  if (component) {
3958
4011
  component.updateResult(message);
4012
+ if (message.isError)
4013
+ this.activeToolGroup = undefined;
3959
4014
  renderedPendingTools.delete(message.toolCallId);
3960
4015
  }
3961
4016
  }
3962
4017
  else {
4018
+ this.activeToolGroup = undefined;
3963
4019
  // All other messages use standard rendering
3964
4020
  const meta = messageMeta?.get(message);
3965
4021
  this.addMessageToChat(message, {
@@ -4224,6 +4280,8 @@ export class InteractiveMode {
4224
4280
  * paste / Kitty / modifyOtherKeys sequences.
4225
4281
  */
4226
4282
  uncaughtCrash(error) {
4283
+ if (containStaleExtension(error, (failure) => this.handleExtensionError(failure)))
4284
+ return;
4227
4285
  // A dead terminal is not a pi crash. Do not try to restore it or record it.
4228
4286
  if (isDeadTerminalError(error)) {
4229
4287
  this.emergencyTerminalExit();
@@ -4266,6 +4324,7 @@ export class InteractiveMode {
4266
4324
  }
4267
4325
  registerSignalHandlers() {
4268
4326
  this.unregisterSignalHandlers();
4327
+ this.signalCleanupHandlers.push(setExtensionErrorReporter((error) => this.handleExtensionError(error)));
4269
4328
  const signals = ["SIGTERM", "SIGHUP"];
4270
4329
  // Without a listener, a console Ctrl+Break ends the process without running any JavaScript,
4271
4330
  // leaving the alternate screen, mouse reporting and keyboard modes on (#12133). Raw mode does
@@ -4872,6 +4931,7 @@ export class InteractiveMode {
4872
4931
  quietStartup: this.settingsManager.getQuietStartup(),
4873
4932
  clearOnShrink: this.settingsManager.getClearOnShrink(),
4874
4933
  showTerminalProgress: this.settingsManager.getShowTerminalProgress(),
4934
+ sidebar: this.settingsManager.getSidebarSettings(),
4875
4935
  tuiMode: this.ui.mode,
4876
4936
  fullscreenExitOutput: this.settingsManager.getFullscreenExitOutput(),
4877
4937
  fullscreenScrollbar: this.settingsManager.getFullscreenScrollbar(),
@@ -4916,7 +4976,7 @@ export class InteractiveMode {
4916
4976
  onShowImagesChange: (enabled) => {
4917
4977
  this.settingsManager.setShowImages(enabled);
4918
4978
  for (const child of this.chatContainer.children) {
4919
- if (child instanceof ToolExecutionComponent) {
4979
+ if (child instanceof ToolExecutionComponent || child instanceof ToolGroupComponent) {
4920
4980
  child.setShowImages(enabled);
4921
4981
  }
4922
4982
  }
@@ -4924,7 +4984,7 @@ export class InteractiveMode {
4924
4984
  onImageWidthCellsChange: (width) => {
4925
4985
  this.settingsManager.setImageWidthCells(width);
4926
4986
  for (const child of this.chatContainer.children) {
4927
- if (child instanceof ToolExecutionComponent) {
4987
+ if (child instanceof ToolExecutionComponent || child instanceof ToolGroupComponent) {
4928
4988
  child.setImageWidthCells(width);
4929
4989
  }
4930
4990
  }
@@ -5063,6 +5123,11 @@ export class InteractiveMode {
5063
5123
  onShowTerminalProgressChange: (enabled) => {
5064
5124
  this.settingsManager.setShowTerminalProgress(enabled);
5065
5125
  },
5126
+ onSidebarEnabledChange: (enabled) => this.setSidebarVisible(enabled),
5127
+ onSidebarWidthChange: (width) => {
5128
+ this.settingsManager.setSidebarSettings({ width });
5129
+ this.configureSidebar();
5130
+ },
5066
5131
  onTuiModeChange: (mode) => {
5067
5132
  if (!this.switchTuiMode(mode)) {
5068
5133
  selector?.getSettingsList().updateValue("tui-mode", this.ui.mode);
@@ -5119,6 +5184,69 @@ export class InteractiveMode {
5119
5184
  };
5120
5185
  });
5121
5186
  }
5187
+ /** Persist the opt-in setting and update the existing viewport without replacing its scroll state. */
5188
+ setSidebarVisible(enabled) {
5189
+ this.settingsManager.setSidebarSettings({ enabled });
5190
+ this.configureSidebar();
5191
+ if (enabled && this.ui.mode === "regular")
5192
+ this.showSidebarRegularNotice();
5193
+ }
5194
+ showSidebarRegularNotice() {
5195
+ if (this.sidebarRegularNoticeShown)
5196
+ return;
5197
+ this.sidebarRegularNoticeShown = true;
5198
+ this.showStatus("The sidebar needs fullscreen mode (tuiMode: fullscreen).");
5199
+ }
5200
+ configureSidebar() {
5201
+ if (!this.chatViewport)
5202
+ return;
5203
+ const { enabled, width } = this.settingsManager.getSidebarSettings();
5204
+ if (enabled)
5205
+ this.sidebarContainer ??= new Container();
5206
+ this.chatViewport.setSidebar(enabled ? this.sidebarContainer : undefined, width, (columns) => this.updateSidebarVisibility(columns));
5207
+ this.updateSidebarVisibility(this.ui.terminal.columns);
5208
+ this.fullscreenLayoutRoot = this.chatViewport.root;
5209
+ if (TuiLayouts.isViewportTUI(this.renderer))
5210
+ this.renderer.setLayoutRoot(this.fullscreenLayoutRoot);
5211
+ this.ui.requestRender();
5212
+ }
5213
+ updateSidebarVisibility(columns) {
5214
+ const requested = this.settingsManager.getSidebarSettings().enabled;
5215
+ if (!requested || this.ui.mode === "fullscreen")
5216
+ this.sidebarRegularNoticeShown = false;
5217
+ else
5218
+ this.showSidebarRegularNotice();
5219
+ const enabled = requested && this.ui.mode === "fullscreen";
5220
+ const visible = enabled && columns >= 100;
5221
+ this.footer.sidebarVisible = visible;
5222
+ setSidebarTaskSurfaceVisible(visible);
5223
+ if (!visible) {
5224
+ this.sidebarModel?.dispose();
5225
+ this.sidebarModel = undefined;
5226
+ this.sidebarContainer?.clear();
5227
+ if (enabled && !this.sidebarNarrowNoticeShown) {
5228
+ this.sidebarNarrowNoticeShown = true;
5229
+ this.showStatus("Sidebar hidden: the terminal is narrower than 100 columns.");
5230
+ }
5231
+ return false;
5232
+ }
5233
+ if (!this.sidebarModel) {
5234
+ const session = this.session;
5235
+ this.sidebarModel = new SidebarModel({
5236
+ cwd: this.sessionManager.getCwd(),
5237
+ getContextUsage: () => session.getContextUsage(),
5238
+ getSessionEntries: () => this.sessionManager.getEntries(),
5239
+ subscribe: (listener) => session.subscribe(listener),
5240
+ footer: this.footerDataProvider,
5241
+ checklist: getChecklistProvider(),
5242
+ getLiveSessionCount,
5243
+ });
5244
+ this.sidebarContainer?.clear();
5245
+ this.sidebarContainer?.addChild(new SidebarComponent(this.sidebarModel, theme, () => this.ui.terminal.rows));
5246
+ this.sidebarModel.onChange(() => this.ui.requestRender());
5247
+ }
5248
+ return true;
5249
+ }
5122
5250
  handleThinkingCommand(searchTerm) {
5123
5251
  const availableLevels = this.session.getAvailableThinkingLevels();
5124
5252
  if (!searchTerm) {
@@ -8006,6 +8134,9 @@ export class InteractiveMode {
8006
8134
  this.clearStatusIndicator();
8007
8135
  this.themeController.disableAutoSync();
8008
8136
  this.clearExtensionTerminalInputListeners();
8137
+ this.sidebarModel?.dispose();
8138
+ this.sidebarModel = undefined;
8139
+ setSidebarTaskSurfaceVisible(false);
8009
8140
  this.footer.dispose();
8010
8141
  this.footerDataProvider.dispose();
8011
8142
  this.unsubscribeCapabilityChanges?.();