@bastani/atomic 0.10.5 → 0.10.6

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 (315) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/dist/THIRD_PARTY_NOTICES.md +1 -1
  3. package/dist/_shared/APEv2Parser-APXNTTFS.js.map +1 -1
  4. package/dist/_shared/AsfParser-AP272OWG.js +1 -1
  5. package/dist/_shared/DsfParser-FTOZZCZP.js +2 -2
  6. package/dist/_shared/FlacParser-WJATCQT6.js +2 -2
  7. package/dist/_shared/FlacParser-WJATCQT6.js.map +1 -1
  8. package/dist/_shared/ID3v1Parser-XVX6XPGB.js +1 -1
  9. package/dist/_shared/ID3v2Parser-DB2T4Z6M.js +2 -2
  10. package/dist/_shared/MP4Parser-2TZWZV4K.js +3 -3
  11. package/dist/_shared/MP4Parser-2TZWZV4K.js.map +1 -1
  12. package/dist/_shared/MatroskaParser-V22CGP72.js.map +1 -1
  13. package/dist/_shared/MusepackParser-XEUVYWNQ.js +2 -2
  14. package/dist/_shared/MusepackParser-XEUVYWNQ.js.map +1 -1
  15. package/dist/_shared/OggParser-Y7FSZNTO.js +1 -1
  16. package/dist/_shared/OggParser-Y7FSZNTO.js.map +1 -1
  17. package/dist/_shared/ParseError-VXOGXIIE.js +2 -2
  18. package/dist/_shared/ParseError-VXOGXIIE.js.map +1 -1
  19. package/dist/_shared/WavPackParser-ZYK4CLSW.js +1 -1
  20. package/dist/_shared/WaveParser-VA3P7P3H.js +2 -2
  21. package/dist/_shared/dist-KOELCESV.js +55 -63
  22. package/dist/_shared/dist-KOELCESV.js.map +1 -1
  23. package/dist/_shared/fork-row-index-UAUAQRD5.js +3 -3
  24. package/dist/_shared/full.umd-CBF7UGXV.js +7 -6
  25. package/dist/_shared/full.umd-CBF7UGXV.js.map +1 -1
  26. package/dist/_shared/http-YFAPTIZD.js +2 -2
  27. package/dist/_shared/http-YFAPTIZD.js.map +1 -1
  28. package/dist/_shared/http-undici-FVPTZA4G.js +19 -20
  29. package/dist/_shared/http-undici-FVPTZA4G.js.map +1 -1
  30. package/dist/_shared/lib-4PES5P4V.js +8 -8
  31. package/dist/_shared/lib-4PES5P4V.js.map +1 -1
  32. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +5 -4
  33. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
  34. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +20 -20
  35. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
  36. package/dist/_shared/mode-shared-2QJSCUM6.js +441 -341
  37. package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
  38. package/dist/_shared/p0-cli-BB45ZQY6.js +8 -12
  39. package/dist/_shared/p0-cli-BB45ZQY6.js.map +1 -1
  40. package/dist/_shared/p1a-prewarm-UQY3X2UK.js +8 -8
  41. package/dist/_shared/p1b-elig-ENCUPKKJ.js +17 -17
  42. package/dist/_shared/p1b-elig-ENCUPKKJ.js.map +1 -1
  43. package/dist/_shared/p2-shell-TJBYQMCJ.js +27 -28
  44. package/dist/_shared/p2-shell-TJBYQMCJ.js.map +1 -1
  45. package/dist/_shared/p2-shell-main-B2WIALFD.js +44 -47
  46. package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
  47. package/dist/_shared/rolldown-runtime-BGM3D5V3.js +4 -4
  48. package/dist/_shared/runtime-O4KCSG4C.js +7 -7
  49. package/dist/_shared/runtime-O4KCSG4C.js.map +1 -1
  50. package/dist/_shared/sdk-WQIOHVKO.js +24 -24
  51. package/dist/_shared/sdk-WQIOHVKO.js.map +1 -1
  52. package/dist/_shared/session-data-AHTU7IS6.js +4 -4
  53. package/dist/_shared/session-manager-list-2BLEEZVG.js +3 -3
  54. package/dist/_shared/{settings-startup-65YEWRV2.js → settings-startup-4QCVCI53.js} +2 -32
  55. package/dist/_shared/settings-startup-4QCVCI53.js.map +1 -0
  56. package/dist/_shared/settings-startup-8-DNZ2RIHM.js +35 -0
  57. package/dist/_shared/settings-startup-8-DNZ2RIHM.js.map +1 -0
  58. package/dist/_shared/sql-session-store-5FD3WBMZ.js +12 -12
  59. package/dist/_shared/startup-0-0-TYUFUOJZ.js +143 -115
  60. package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +1 -1
  61. package/dist/_shared/{startup-0-1-D4LGGINF.js → startup-0-1-W2G2UY7R.js} +365 -27
  62. package/dist/_shared/startup-0-1-W2G2UY7R.js.map +1 -0
  63. package/dist/_shared/startup-0-2-SZGQIWHI.js +19 -24
  64. package/dist/_shared/startup-0-2-SZGQIWHI.js.map +1 -1
  65. package/dist/_shared/startup-0-3-T4DVFYWX.js +7 -7
  66. package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
  67. package/dist/_shared/startup-0-4-HN5EB4K7.js +7 -7
  68. package/dist/_shared/startup-0-4-HN5EB4K7.js.map +1 -1
  69. package/dist/_shared/startup-0-5-OHJNE6JH.js +157 -92
  70. package/dist/_shared/startup-0-5-OHJNE6JH.js.map +1 -1
  71. package/dist/_shared/startup-10-0-TDQNBDDL.js +4 -4
  72. package/dist/_shared/startup-10-0-TDQNBDDL.js.map +1 -1
  73. package/dist/_shared/startup-14-0-MLX36RBG.js +19 -19
  74. package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
  75. package/dist/_shared/startup-15-0-YUKGAC63.js +17 -16
  76. package/dist/_shared/startup-15-0-YUKGAC63.js.map +1 -1
  77. package/dist/_shared/startup-15-1-4S7FLMNG.js +5 -5
  78. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  79. package/dist/_shared/startup-8-0-34CBHPZH.js +23 -23
  80. package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
  81. package/dist/_shared/startup-8-1-SJW2GMAM.js +113 -114
  82. package/dist/_shared/startup-8-1-SJW2GMAM.js.map +1 -1
  83. package/dist/_shared/storage-command-7MGXLJGZ.js +15 -14
  84. package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
  85. package/dist/_shared/task-reference-stream-JWMUZSJX.js +7 -7
  86. package/dist/_shared/task-reference-stream-JWMUZSJX.js.map +1 -1
  87. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  88. package/dist/_shared/tree-outline-MUEPK5B7.js +4 -4
  89. package/dist/_shared/turndown.cjs-7Z43JOED.js +7 -10
  90. package/dist/_shared/turndown.cjs-7Z43JOED.js.map +1 -1
  91. package/dist/builtin/intercom/CHANGELOG.md +12 -0
  92. package/dist/builtin/intercom/index.bundle.mjs +2 -2
  93. package/dist/builtin/intercom/package.json +1 -1
  94. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  95. package/dist/builtin/mcp/package.json +1 -1
  96. package/dist/builtin/subagents/CHANGELOG.md +12 -0
  97. package/dist/builtin/subagents/package.json +1 -1
  98. package/dist/builtin/subagents/src/extension/index.bundle.mjs +15 -12
  99. package/dist/builtin/web-access/index.bundle.mjs +1 -1
  100. package/dist/builtin/web-access/package.json +1 -1
  101. package/dist/cli/args.js +1 -1
  102. package/dist/cli/auth-cli.code.js +10 -13
  103. package/dist/cli/auth-cli.code.js.map +1 -1
  104. package/dist/cli/auth-cli.impl.js +3 -3
  105. package/dist/cli/auth-cli.js +3 -3
  106. package/dist/cli/blueprint-command.code.js +8 -8
  107. package/dist/cli/blueprint-command.impl.js +3 -3
  108. package/dist/cli/blueprint-command.js +3 -3
  109. package/dist/cli/intercom-command.code.js +2 -2
  110. package/dist/cli/intercom-command.impl.js +3 -3
  111. package/dist/cli/intercom-command.js +3 -3
  112. package/dist/cli/list-models.code.js +3 -3
  113. package/dist/cli/list-models.impl.js +3 -3
  114. package/dist/cli/list-models.js +3 -3
  115. package/dist/cli/session-picker.code.js +3 -3
  116. package/dist/cli/session-picker.impl.js +3 -3
  117. package/dist/cli/session-picker.js +3 -3
  118. package/dist/cli/settings-startup.js +1 -1
  119. package/dist/cli/startup-ui.impl.js +3 -3
  120. package/dist/cli/startup-ui.js +3 -3
  121. package/dist/cli/storage-command.impl.js +3 -3
  122. package/dist/cli/storage-command.js +3 -3
  123. package/dist/cli/storage-search-session.code.js +4 -4
  124. package/dist/cli/storage-search-session.impl.js +3 -3
  125. package/dist/cli/storage-search-session.js +3 -3
  126. package/dist/cli/team-command.code.js +3 -3
  127. package/dist/cli/team-command.impl.js +3 -3
  128. package/dist/cli/team-command.js +3 -3
  129. package/dist/cli.js +2 -2
  130. package/dist/cli.js.map +1 -1
  131. package/dist/core/debug.impl.js +3 -3
  132. package/dist/core/debug.js +3 -3
  133. package/dist/core/export-html/card-projection.code.js +2 -2
  134. package/dist/core/export-html/card-projection.code.js.map +1 -1
  135. package/dist/core/export-html/card-projection.impl.js +3 -3
  136. package/dist/core/export-html/card-projection.js +3 -3
  137. package/dist/core/export-html/index.code.js +9 -9
  138. package/dist/core/export-html/index.code.js.map +1 -1
  139. package/dist/core/export-html/index.impl.js +3 -3
  140. package/dist/core/export-html/index.js +3 -3
  141. package/dist/core/export-html/json-spans.impl.js +3 -3
  142. package/dist/core/export-html/json-spans.js +3 -3
  143. package/dist/core/export-html/oversized-render-inputs.code.js +1 -1
  144. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  145. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  146. package/dist/core/export-html/tool-renderer.code.js +1 -1
  147. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  148. package/dist/core/export-html/tool-renderer.js +3 -3
  149. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  150. package/dist/core/extensions/jiti-loader.js +3 -3
  151. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  152. package/dist/core/extensions/jiti-static-loader.js +3 -3
  153. package/dist/core/extensions/loader-host-modules.code.js +1 -1
  154. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  155. package/dist/core/extensions/loader-host-modules.js +3 -3
  156. package/dist/core/extensions/loader-virtual-modules.js +1 -1
  157. package/dist/core/extensions/runner-context.js +5 -5
  158. package/dist/core/extensions/runner-context.js.map +1 -1
  159. package/dist/core/http-dispatcher.js +2 -0
  160. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  161. package/dist/core/intercom-broker-control-host.js +3 -3
  162. package/dist/core/intercom-broker-control.code.js +3 -3
  163. package/dist/core/intercom-broker-control.impl.js +3 -3
  164. package/dist/core/intercom-broker-control.js +3 -3
  165. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  166. package/dist/core/package-manager-storage-adapters.js +3 -3
  167. package/dist/core/sdk.code.js +1 -1
  168. package/dist/core/sdk.impl.js +3 -3
  169. package/dist/core/sdk.js +3 -3
  170. package/dist/core/session-manager-core.js +15 -15
  171. package/dist/core/session-manager-core.js.map +1 -1
  172. package/dist/core/session-manager-list.impl.js +3 -3
  173. package/dist/core/session-manager-list.js +3 -3
  174. package/dist/core/session-manager.code.js +1 -1
  175. package/dist/core/session-manager.impl.js +3 -3
  176. package/dist/core/session-manager.js +3 -3
  177. package/dist/core/session-storage.impl.js +3 -3
  178. package/dist/core/session-storage.js +3 -3
  179. package/dist/core/storage/index.js +2 -2
  180. package/dist/core/storage/node-sqlite-thread.js +2 -2
  181. package/dist/core/storage/node-sqlite.js +2 -2
  182. package/dist/core/storage/offline-snapshot-file.code.js +1 -1
  183. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  184. package/dist/core/storage/offline-snapshot-file.js +3 -3
  185. package/dist/core/storage/provider.js +2 -2
  186. package/dist/core/storage/selection.js +2 -2
  187. package/dist/core/storage/session/branch-fork-source.code.js +3 -3
  188. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  189. package/dist/core/storage/session/branch-fork-source.js +3 -3
  190. package/dist/core/storage/session/card-view.impl.js +3 -3
  191. package/dist/core/storage/session/card-view.js +3 -3
  192. package/dist/core/storage/session/child-reader.code.js +5 -4
  193. package/dist/core/storage/session/child-reader.code.js.map +1 -1
  194. package/dist/core/storage/session/child-reader.impl.js +3 -3
  195. package/dist/core/storage/session/child-reader.js +3 -3
  196. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  197. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  198. package/dist/core/storage/session/errors.js +1 -0
  199. package/dist/core/storage/session/errors.js.map +1 -1
  200. package/dist/core/storage/session/expanded-child-details.code.js +4 -4
  201. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  202. package/dist/core/storage/session/expanded-child-details.js +3 -3
  203. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  204. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  205. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  206. package/dist/core/storage/session/fork-row-index.js +3 -3
  207. package/dist/core/storage/session/fork-staging.code.js +5 -4
  208. package/dist/core/storage/session/fork-staging.code.js.map +1 -1
  209. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  210. package/dist/core/storage/session/fork-staging.js +3 -3
  211. package/dist/core/storage/session/fork-window.code.js +3 -3
  212. package/dist/core/storage/session/fork-window.impl.js +3 -3
  213. package/dist/core/storage/session/fork-window.js +3 -3
  214. package/dist/core/storage/session/history-pages.impl.js +3 -3
  215. package/dist/core/storage/session/history-pages.js +3 -3
  216. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  217. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  218. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  219. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  220. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  221. package/dist/core/storage/session/memory-session-store.js +3 -3
  222. package/dist/core/storage/session/pinned-branch-resume.code.js +2 -2
  223. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  224. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  225. package/dist/core/storage/session/released-history-files.code.js +12 -12
  226. package/dist/core/storage/session/released-history-files.code.js.map +1 -1
  227. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  228. package/dist/core/storage/session/released-history-files.js +3 -3
  229. package/dist/core/storage/session/resident-fork-rows.code.js +1 -1
  230. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  231. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  232. package/dist/core/storage/session/session-resume.impl.js +3 -3
  233. package/dist/core/storage/session/session-resume.js +3 -3
  234. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  235. package/dist/core/storage/session/snapshot-cut.js +3 -3
  236. package/dist/core/storage/session/snapshot-history.code.js +3 -3
  237. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  238. package/dist/core/storage/session/snapshot-history.js +3 -3
  239. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  240. package/dist/core/storage/session/sql-session-store.js +3 -3
  241. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  242. package/dist/core/storage/session/tree-outline.js +3 -3
  243. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  244. package/dist/core/storage/session/tree-presentation.js +3 -3
  245. package/dist/core/storage/storage-status.impl.js +3 -3
  246. package/dist/core/storage/storage-status.js +3 -3
  247. package/dist/core/storage/team.impl.js +3 -3
  248. package/dist/core/storage/team.js +3 -3
  249. package/dist/core/structured-output/index.impl.js +3 -3
  250. package/dist/core/structured-output/index.js +3 -3
  251. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  252. package/dist/core/tasks/task-completion-entry.js +3 -3
  253. package/dist/core/tasks/task-file-history.code.js +5 -5
  254. package/dist/core/tasks/task-file-history.code.js.map +1 -1
  255. package/dist/core/tasks/task-file-history.impl.js +3 -3
  256. package/dist/core/tasks/task-file-history.js +3 -3
  257. package/dist/core/tasks/task-reference-archive.code.js +11 -11
  258. package/dist/core/tasks/task-reference-archive.code.js.map +1 -1
  259. package/dist/core/tasks/task-reference-archive.js +3 -3
  260. package/dist/core/tasks/task-reference-identity.code.js +2 -2
  261. package/dist/core/tasks/task-reference-identity.js +3 -3
  262. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  263. package/dist/core/tasks/task-reference-stream.js +3 -3
  264. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  265. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  266. package/dist/core/tasks/task-view-source.impl.js +3 -3
  267. package/dist/core/tasks/task-view-source.js +3 -3
  268. package/dist/core/tools/read-url.code.js +9 -9
  269. package/dist/core/tools/read-url.impl.js +3 -3
  270. package/dist/core/tools/read-url.js +3 -3
  271. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  272. package/dist/core/worktree-snapshot/errors.code.js +1 -1
  273. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  274. package/dist/core/worktree-snapshot/errors.js +3 -3
  275. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  276. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  277. package/dist/extensions/codemode/execute.code.js +3 -3
  278. package/dist/extensions/codemode/execute.impl.js +3 -3
  279. package/dist/extensions/codemode/execute.js +3 -3
  280. package/dist/extensions/codemode/renderer.code.js +1 -1
  281. package/dist/extensions/codemode/renderer.impl.js +3 -3
  282. package/dist/extensions/codemode/renderer.js +3 -3
  283. package/dist/extensions/mcp/cli.code.js +7 -7
  284. package/dist/extensions/mcp/cli.impl.js +3 -3
  285. package/dist/extensions/mcp/cli.js +3 -3
  286. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  287. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  288. package/dist/extensions/mcp/cli.lazy.js +3 -3
  289. package/dist/extensions/mcp/runtime.impl.js +3 -3
  290. package/dist/extensions/mcp/runtime.js +3 -3
  291. package/dist/index.js +2 -2
  292. package/dist/main-first-time-setup.impl.js +3 -3
  293. package/dist/main-first-time-setup.js +3 -3
  294. package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
  295. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  296. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  297. package/dist/modes/interactive/components/task-inspector.d.ts +10 -2
  298. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  299. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  300. package/dist/package-manager-cli.code.js +14 -14
  301. package/dist/package-manager-cli.impl.js +3 -3
  302. package/dist/package-manager-cli.js +3 -3
  303. package/dist/rpc-entry.js +3 -3
  304. package/dist/startup-files.json +1 -1
  305. package/dist/startup-stages/7.js +1 -1
  306. package/dist/utils/startup-database-spare.code.js +5 -5
  307. package/dist/utils/startup-database-spare.impl.js +3 -3
  308. package/dist/utils/startup-database-spare.js +3 -3
  309. package/dist/utils/tools-manager.code.js +1 -1
  310. package/dist/utils/tools-manager.impl.js +3 -3
  311. package/dist/utils/tools-manager.js +3 -3
  312. package/docs/background-tasks.md +2 -2
  313. package/package.json +9 -9
  314. package/dist/_shared/settings-startup-65YEWRV2.js.map +0 -1
  315. package/dist/_shared/startup-0-1-D4LGGINF.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import { __name } from "./rolldown-runtime-BGM3D5V3.js";
2
2
  import { APP_NAME, DebugError, ENV_OFFLINE, ENV_SKIP_VERSION_CHECK, PACKAGE_NAME, canonicalizePathAsync, createChildProcessEnvironment, createModuleRequire, getAgentDir, getBundledInteractiveAssetPathAsync, getEnvValue, getPathComparisonKey, helperLaunchAsync, missingHelperOptions, serializeDebugError, shortenHomePath, stripBom } from "./p0-cli-BB45ZQY6.js";
3
3
  import { BUILTIN_SLASH_COMMANDS, CountdownTimer, DEFAULT_MAX_BYTES, DynamicBorder, FramedSelector, HOST_NOTICE_TYPE, INTERACTIVE_MODEL_REFRESH_TIMEOUT_MS, Selector, TASK_MARKS, TaskMessageError, VERBATIM_COMPACTION_STRATEGY, addHistoryUsageToTotals, addUsageToTotals, allToolNames, areExperimentalFeaturesEnabled, backgroundTaskScope, bindSavedTaskRowKey, carryRowSource, chatReceipt, chatReceiptWrite, createUsageTotals, defaultModelPerProvider, fetchWithRetry, formatReadLineRange, formatTokenCount, getEngineSessionStats, getTextOutput, getToolExecutionStartedAt, hostNoticeForEvent, isMissingSessionCwdError, isTaskMessageError, keptTaskId, noteRowSource, noteSavedSeq, parseSlashCommand, queueUpdateDeliveries, queuedReceiptsUnderWay, queuedTextsUnderWay, raceWithAbortSignal, replaceTabs, rowSource, savedReadLines, savedRowKey, savedRowSpan, savedSeqOf, savedTaskRowKey, savedTaskRows, serializeMissingSessionCwdError, sessionWaitsToRetry, sqliteSessionResumeArgs, taskMark, taskOutcomeStatus } from "./startup-0-0-TYUFUOJZ.js";
4
- import { ExtensionInputComponent, ExtensionSelectorComponent, SUMMARY_COMPACTION_PREFIX, TaskElapsedClocks, assertSessionNotOpenElsewhere, bindTaskClock, createVerbatimCompactionMessage, ensurePngTranscoder, getToolPath, heldPrompts, isVerbatimCompactionMessage, reopenedCompletionName, repairOrphanToolResults, shownSpanMs, stripVerbatimCompactionPrefix, taskClockOf, taskClockRunning, taskClocksFor, taskElapsedMs, thinkingLevelForModelSwitch } from "./startup-0-1-D4LGGINF.js";
4
+ import { ExtensionInputComponent, ExtensionSelectorComponent, SUMMARY_COMPACTION_PREFIX, TaskElapsedClocks, assertSessionNotOpenElsewhere, bindTaskClock, createVerbatimCompactionMessage, ensurePngTranscoder, getToolPath, heldPrompts, isVerbatimCompactionMessage, reopenedCompletionName, repairOrphanToolResults, shownSpanMs, stripVerbatimCompactionPrefix, taskClockOf, taskClockRunning, taskClocksFor, taskElapsedMs, thinkingLevelForModelSwitch } from "./startup-0-1-W2G2UY7R.js";
5
5
  import { CodeHighlighter, KeybindingsManager as KeybindingsManager$1, NAV_CONFIRM_WINDOW_MS, SYSTEM_THEME_NAME, TwoPressConfirm, clickableKeyTextHint, colorEnvironment, formatKeyText, getCurrentThemeName, getEditorTheme, getGlobalTheme, getMarkdownTheme, getTerminalTheme, initTheme, isLightTheme, isNavHelpKey, keyDisplayText, keyHint, keyHintIfBound, keyText, keyTextHint, keybindingIdentity, markTerminalColorsPending, navActionText, navFirstKeyText, navKeyText, parenthesizedKeyHint, parseAutoThemeSetting, renderNavHintLine, renderNavKeyOverlay, resolveThemeSetting, sanitizeTerminalText, setTerminalColorScheme, setTerminalColors, setTheme, setThemeInstance, singleLineDisplayText, slashCommandHint, terminalDisplayText, theme } from "./p2-shell-main-B2WIALFD.js";
6
6
  import { isDebugEnabled, projectTrustOptionsFor } from "./p1b-elig-ENCUPKKJ.js";
7
7
  import { AgentTokenMeter, WorkingRunMeter, agentTokenTotal, compactionMeta, formatWorkingElapsed, loadTaskOwnTranscriptHistory, normalizeWorkingRunSnapshot, observedTaskChatWrite, runInProgress, taskChatPage, taskOwnTranscriptEntries, taskTranscriptSource, withTaskChatRows } from "./startup-0-2-SZGQIWHI.js";
8
8
  import { AtomicWorkedStatusComponent, AtomicWorkingStatusComponent, DEFAULT_WORKING_MESSAGE, OwnerTaskStore, atomicWorkingFrame, atomicWorkingGlyph, getOwnerTaskSession, getOwnerTaskStore, isTaskTurnInterrupted, parseGitUrl, setTaskTurnInterrupted, watchAtomicWorkingClock, watchOwnerTaskStoreBinding, workingMessageColumns } from "./startup-0-3-T4DVFYWX.js";
9
- import { isRpcRequestAcceptedFailure } from "./settings-startup-65YEWRV2.js";
9
+ import { isRpcRequestAcceptedFailure } from "./settings-startup-4QCVCI53.js";
10
10
  import { lastAssistantAnswer } from "./startup-8-0-34CBHPZH.js";
11
11
  import { CredentialSynchronizationError, QuestionnaireSession, buildItemsForQuestion, childOfAttempt, completionTitleDescription, completionTitleText, firstSubagentAttempt, formatTaskHeartbeatDuration, formatTaskHeartbeatStatus, getSkillCatalog, isResumableStop, latestSubagentAttempt, latestSubagentAttempts, releasedWaitingOn, require_semver, settledTaskResumeId, supersededSettledAttempts, taskHeartbeatKindLabel, taskNoticeLine, waitingReleasedShells, waitingReleasedTools } from "./startup-0-5-OHJNE6JH.js";
12
12
  import { DETAIL_FIRST_PREFIX, DETAIL_PREFIX, NoticeLine, STATUS_MARKERS, TOOL_BLOCK_LIMITS, ToolBlock, ToolBlockMarkdown, ToolBlockRecords, collapseToolBlockLines, componentNeedsWorkingClock, formatModelLabel, isToolBlock, markdownPreviewRows } from "./startup-0-4-HN5EB4K7.js";
@@ -17,21 +17,21 @@ import { SessionManager } from "./startup-10-0-TDQNBDDL.js";
17
17
  import { SESSION_RECOVERY_NOTICE_TYPE, SESSION_RECOVERY_REPLAY_TYPE, parseSkillBlock, startsQueuedMessage } from "./startup-15-1-4S7FLMNG.js";
18
18
  import { DEFAULT_HTTP_IDLE_TIMEOUT_MS, HTTP_IDLE_TIMEOUT_CHOICES, formatHttpIdleTimeoutMs } from "./http-YFAPTIZD.js";
19
19
  import { CustomEditor, NewMessageCounter, TranscriptFollowIndicator, UserMessageComponent, applyAttachedComposer, cacheKey, copyToClipboard, createMarkdownTransform, errorMessage, exactTextOnlyUserPrompt, extensionForImageMimeType, extractMessageText, firstRawUserExactText, hasExtensionMarkdownTransform, isChatMessageEntry as isChatMessageEntry$1, isMessageLike, isPhysicalCtrlC, isPhysicalEscape, isUserMessageLike, isUserPromptRow, matchesKey as matchesKey$2, openBrowser, parseBashInput, pinnedPromptLine, readClipboardFilePaths, readClipboardImage, readClipboardText, stripAnsi, stripTerminalControls, syncFirstUserEntry, tailStreamingText, userMessageSignature } from "./p2-shell-TJBYQMCJ.js";
20
- import * as fs$2 from "node:fs/promises";
20
+ import * as fs$1 from "node:fs/promises";
21
21
  import { mkdtemp, readFile, rm, unlink, writeFile } from "node:fs/promises";
22
22
  import "fs";
23
23
  import * as os from "node:os";
24
24
  import { tmpdir } from "node:os";
25
- import * as path$1 from "node:path";
26
- import path, { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
27
- import { execFile, spawn } from "node:child_process";
28
- import { spawn as spawn$2 } from "child_process";
29
- import * as fs$1 from "node:fs";
25
+ import * as path from "node:path";
26
+ import path$1, { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
27
+ import { execFile, spawn as spawn$1 } from "node:child_process";
28
+ import { spawn } from "child_process";
29
+ import * as fs from "node:fs";
30
30
  import { isModelType } from "@bastani/atomic-ai";
31
- import { Box, CURSOR_MARKER, CancellableLoader, CombinedAutocompleteProvider, CombinedAutocompleteProvider as CombinedAutocompleteProvider$1, Container, Container as Container$1, Editor, Image, Input, Loader, Loader as Loader$1, Markdown, Markdown as Markdown$1, Spacer, Spacer as Spacer$1, Text, Text as Text$1, TruncatedText, TuiMainScreen, WindowedContainer, clickableKeysHint, foregroundAnsi, fuzzyFilter as fuzzyFilter$1, fuzzyMatch, getCapabilities, getCapabilities as getCapabilities$1, getKeybindings, hasHintMarkers, hyperlink, hyperlink as hyperlink$1, isAppleTerminalSession, isHintActivation, isKeyRelease, keyInputData, matchesKey, matchesKey as matchesKey$1, mixColors, parseColor, replaceControlCharacters, setKeybindings as setKeybindings$1, sliceByColumn, stripTerminalSequences, truncateToWidth, visibleWidth, visibleWidth as visibleWidth$1, withoutKeyHints, wrapTextWithAnsi } from "@bastani/atomic-tui";
32
- import chalk$1 from "chalk";
31
+ import { Box, CURSOR_MARKER, CancellableLoader, CombinedAutocompleteProvider, CombinedAutocompleteProvider as CombinedAutocompleteProvider$1, Container, Container as Container$1, Editor, Image, Input, Loader, Loader as Loader$1, Markdown, Markdown as Markdown$1, Spacer, Spacer as Spacer$1, Text, Text as Text$1, TruncatedText as TruncatedText$1, TuiMainScreen as TuiMainScreen$1, WindowedContainer, clickableKeysHint, foregroundAnsi, fuzzyFilter, fuzzyMatch, getCapabilities, getCapabilities as getCapabilities$1, getKeybindings, hasHintMarkers, hyperlink, hyperlink as hyperlink$1, isAppleTerminalSession, isHintActivation, isKeyRelease, keyInputData, matchesKey, matchesKey as matchesKey$1, mixColors, parseColor, replaceControlCharacters, setKeybindings, sliceByColumn, stripTerminalSequences, truncateToWidth, visibleWidth, visibleWidth as visibleWidth$1, withoutKeyHints, wrapTextWithAnsi } from "@bastani/atomic-tui";
32
+ import chalk from "chalk";
33
33
  import { readFile as readFile$1 } from "fs/promises";
34
- import * as crypto$1 from "node:crypto";
34
+ import * as crypto from "node:crypto";
35
35
  import { createHash, randomUUID } from "node:crypto";
36
36
  import { stripVTControlCharacters } from "node:util";
37
37
  import { clampThinkingLevel, getSupportedThinkingLevels, modelsAreEqual } from "@bastani/atomic-ai/compat";
@@ -152,14 +152,14 @@ var HeartbeatBlock = class {
152
152
  if (this.spec.records.length > 0) records[records.length - 1]?.push(hint);
153
153
  const pad = Math.max(0, Math.min(Math.floor(this.spec.outputPad ?? 1), Math.floor(width) - 1));
154
154
  const subject = this.spec.subject;
155
- const subjectWidth = subject === void 0 ? 0 : 3 + visibleWidth(subject);
156
- const room = Math.floor(width) - pad - 2 - visibleWidth(this.spec.title);
155
+ const subjectWidth = subject === void 0 ? 0 : 3 + visibleWidth$1(subject);
156
+ const room = Math.floor(width) - pad - 2 - visibleWidth$1(this.spec.title);
157
157
  const meta = [...this.spec.meta ?? []];
158
- while (meta.length > 0 && subjectWidth + meta.reduce((sum, part) => sum + 3 + visibleWidth(part), 0) > room) meta.pop();
158
+ while (meta.length > 0 && subjectWidth + meta.reduce((sum, part) => sum + 3 + visibleWidth$1(part), 0) > room) meta.pop();
159
159
  const shown = subject === void 0 ? "" : room - 3 >= 2 ? ` · ${truncateToWidth(subject, room - 3, "…")}` : "";
160
160
  return new ToolBlock({
161
161
  status: "heartbeat",
162
- title: new Text(`${this.spec.title}${shown}`, 0, 0),
162
+ title: new Text$1(`${this.spec.title}${shown}`, 0, 0),
163
163
  meta,
164
164
  details: new ToolBlockRecords(records.map((rows) => new HeartbeatRecord(rows))),
165
165
  outputPad: this.spec.outputPad
@@ -942,7 +942,7 @@ function panelText(text) {
942
942
  return taskDisplayText(text).toWellFormed().replace(/\p{Default_Ignorable_Code_Point}/gu, "").replace(/(?:^|(?<=\s))\p{M}+/gu, "");
943
943
  }
944
944
  function cellWidth(text) {
945
- return NON_SINGLE_CELL.test(text) ? visibleWidth(text) : text.length;
945
+ return NON_SINGLE_CELL.test(text) ? visibleWidth$1(text) : text.length;
946
946
  }
947
947
  /**
948
948
  * A row's model column: the model its agent runs on now as `provider/id`, then its reasoning level, as the main footer
@@ -990,8 +990,8 @@ function clampLine(line, maxWidth) {
990
990
  }
991
991
  }
992
992
  let clamped = line;
993
- for (let limit = maxWidth; visibleWidth(clamped) > maxWidth && limit > 0; limit--) clamped = truncateToWidth(line, limit);
994
- return visibleWidth(clamped) <= maxWidth ? clamped : "";
993
+ for (let limit = maxWidth; visibleWidth$1(clamped) > maxWidth && limit > 0; limit--) clamped = truncateToWidth(line, limit);
994
+ return visibleWidth$1(clamped) <= maxWidth ? clamped : "";
995
995
  }
996
996
  function formatPanelElapsed(ms) {
997
997
  const seconds = Math.max(0, Math.floor(ms / 1e3));
@@ -1898,7 +1898,7 @@ function formatToolActionSummary(action, cwd = process.cwd()) {
1898
1898
  return singleLineDisplayText(`${presentation?.title ?? family.title}(${presentation?.args ?? "…"})`).trim();
1899
1899
  }
1900
1900
  // dist/modes/interactive/components/auth-url.js
1901
- var AuthUrlComponent = class extends Container {
1901
+ var AuthUrlComponent = class extends Container$1 {
1902
1902
  url;
1903
1903
  tui;
1904
1904
  hint;
@@ -1906,14 +1906,14 @@ var AuthUrlComponent = class extends Container {
1906
1906
  super();
1907
1907
  this.tui = tui;
1908
1908
  this.url = url;
1909
- this.addChild(new Text(theme.fg("accent", hyperlink(url, url)), 1, 0));
1910
- this.hint = new Text("", 1, 0);
1909
+ this.addChild(new Text$1(theme.fg("accent", hyperlink$1(url, url)), 1, 0));
1910
+ this.hint = new Text$1("", 1, 0);
1911
1911
  this.addChild(this.hint);
1912
1912
  this.setHint(keyHint("app.auth.copyUrl", "to copy"));
1913
1913
  }
1914
1914
  setHint(suffix) {
1915
1915
  const clickHint = process.platform === "darwin" ? "Cmd+click to open" : "Ctrl+click to open";
1916
- this.hint.setText(`${theme.fg("dim", hyperlink(clickHint, this.url))} ${theme.fg("dim", "•")} ${suffix}`);
1916
+ this.hint.setText(`${theme.fg("dim", hyperlink$1(clickHint, this.url))} ${theme.fg("dim", "•")} ${suffix}`);
1917
1917
  this.tui.requestRender();
1918
1918
  }
1919
1919
  async copy() {
@@ -3195,7 +3195,7 @@ function scopedAssistantCard(repeats) {
3195
3195
  noticeRules.set(TaskAssistantCard.prototype, repeats);
3196
3196
  return TaskAssistantCard;
3197
3197
  }
3198
- var AssistantMessageComponent = class extends Container {
3198
+ var AssistantMessageComponent = class extends Container$1 {
3199
3199
  get selectionTextMayChangeOnReplay() {
3200
3200
  return hasExtensionMarkdownTransform(this.markdownTransformers);
3201
3201
  }
@@ -3224,7 +3224,7 @@ var AssistantMessageComponent = class extends Container {
3224
3224
  this.messageId = messageId;
3225
3225
  this.timestamp = timestamp;
3226
3226
  this.interruptedActivity = interruptedActivity;
3227
- this.contentContainer = new Container();
3227
+ this.contentContainer = new Container$1();
3228
3228
  this.addChild(this.contentContainer);
3229
3229
  if (message) this.updateContent(message, isStreaming, interruptedActivity);
3230
3230
  }
@@ -3272,7 +3272,7 @@ var AssistantMessageComponent = class extends Container {
3272
3272
  let needsSpacer = true;
3273
3273
  const addVisibleChild = (child) => {
3274
3274
  if (needsSpacer) {
3275
- this.contentContainer.addChild(new Spacer(1));
3275
+ this.contentContainer.addChild(new Spacer$1(1));
3276
3276
  needsSpacer = false;
3277
3277
  }
3278
3278
  this.contentContainer.addChild(child);
@@ -3280,7 +3280,7 @@ var AssistantMessageComponent = class extends Container {
3280
3280
  for (let i = 0; i < message.content.length; i++) {
3281
3281
  const content = message.content[i];
3282
3282
  const text = content.type === "text" ? stripTerminalControls(content.text).trim() : "";
3283
- if (content.type === "text" && text) addVisibleChild(markdownBlock("text", text, () => new Markdown(text, this.outputPad, 0, this.markdownTheme, void 0, {
3283
+ if (content.type === "text" && text) addVisibleChild(markdownBlock("text", text, () => new Markdown$1(text, this.outputPad, 0, this.markdownTheme, void 0, {
3284
3284
  transform: createMarkdownTransform("assistant", () => this.isStreaming, this.markdownTransformers, this.messageId, this.timestamp),
3285
3285
  renderLatex: this.renderLatex
3286
3286
  })));
@@ -3296,8 +3296,8 @@ var AssistantMessageComponent = class extends Container {
3296
3296
  if (thinkingBlocks.length === 0) continue;
3297
3297
  if (this.hideThinkingBlock) {
3298
3298
  if (!this.hiddenThinkingLabel.trim()) continue;
3299
- addVisibleChild(new Text(theme.italic(theme.fg("muted", this.hiddenThinkingLabel)), this.outputPad, 0));
3300
- } else addVisibleChild(markdownBlock("thinking", thinkingBlocks.join("\n\n"), () => new Markdown(thinkingBlocks.join("\n\n"), this.outputPad, 0, this.markdownTheme, {
3299
+ addVisibleChild(new Text$1(theme.italic(theme.fg("muted", this.hiddenThinkingLabel)), this.outputPad, 0));
3300
+ } else addVisibleChild(markdownBlock("thinking", thinkingBlocks.join("\n\n"), () => new Markdown$1(thinkingBlocks.join("\n\n"), this.outputPad, 0, this.markdownTheme, {
3301
3301
  color: (text) => theme.fg("muted", text),
3302
3302
  italic: true
3303
3303
  }, {
@@ -3310,8 +3310,8 @@ var AssistantMessageComponent = class extends Container {
3310
3310
  const hasToolCalls = message.content.some((c) => c.type === "toolCall");
3311
3311
  this.hasToolCalls = hasToolCalls;
3312
3312
  if (message.stopReason === "length") {
3313
- this.contentContainer.addChild(new Spacer(1));
3314
- this.contentContainer.addChild(new Text(theme.fg("error", "Response was truncated before completion."), this.outputPad, 0));
3313
+ this.contentContainer.addChild(new Spacer$1(1));
3314
+ this.contentContainer.addChild(new Text$1(theme.fg("error", "Response was truncated before completion."), this.outputPad, 0));
3315
3315
  } else if (message.stopReason === "aborted") {
3316
3316
  const notice = interruptedNotice(message.errorMessage);
3317
3317
  const reason = terminalDisplayText(notice).split("\n")[0].trim();
@@ -3321,7 +3321,7 @@ var AssistantMessageComponent = class extends Container {
3321
3321
  const meta = [...new Set(activity)];
3322
3322
  if (reason !== "Interrupted by user" && reason && !/^(?:\w*Error\b|at\s|Caused by:)/u.test(reason)) meta.push(reason);
3323
3323
  if (meta.length === 0) meta.push("response");
3324
- this.contentContainer.addChild(new Spacer(1));
3324
+ this.contentContainer.addChild(new Spacer$1(1));
3325
3325
  this.contentContainer.addChild(new ToolBlock({
3326
3326
  status: "stopped",
3327
3327
  title: "Interrupted",
@@ -3331,8 +3331,8 @@ var AssistantMessageComponent = class extends Container {
3331
3331
  } else if (!hasToolCalls && message.stopReason === "error") {
3332
3332
  if (!isProxy(this) && noticeRules.get(Object.getPrototypeOf(this))?.(message)) return;
3333
3333
  const errorMsg = message.errorMessage || "Unknown error";
3334
- this.contentContainer.addChild(new Spacer(1));
3335
- this.contentContainer.addChild(new Text(theme.fg("error", `Error: ${errorMsg}`), this.outputPad, 0));
3334
+ this.contentContainer.addChild(new Spacer$1(1));
3335
+ this.contentContainer.addChild(new Text$1(theme.fg("error", `Error: ${errorMsg}`), this.outputPad, 0));
3336
3336
  }
3337
3337
  }
3338
3338
  };
@@ -3414,7 +3414,7 @@ function wrapLogicalLine(line, detailWidth, tailRows) {
3414
3414
  function themeRenderStamp() {
3415
3415
  return `${theme.getStyleLevel()}:${theme.getFgAnsi("bashMode")}:${theme.getBgAnsi("userMessageBg")}`;
3416
3416
  }
3417
- var BashExecutionComponent = class extends Container {
3417
+ var BashExecutionComponent = class extends Container$1 {
3418
3418
  expandsOnClick = true;
3419
3419
  command;
3420
3420
  outputLines = [];
@@ -3444,7 +3444,7 @@ var BashExecutionComponent = class extends Container {
3444
3444
  this.excludeFromContext = excludeFromContext;
3445
3445
  this.colorKey = excludeFromContext ? "dim" : "bashMode";
3446
3446
  this.outputPad = outputPad;
3447
- this.addChild(new Spacer(1));
3447
+ this.addChild(new Spacer$1(1));
3448
3448
  this.addChild({
3449
3449
  render: (width) => this.renderBlock(width),
3450
3450
  invalidate: () => {
@@ -3822,20 +3822,20 @@ var BranchSummaryMessageComponent = class extends Box {
3822
3822
  }
3823
3823
  updateDisplay() {
3824
3824
  this.clear();
3825
- const content = new Container();
3825
+ const content = new Container$1();
3826
3826
  const label = theme.fg("customMessageLabel", `\x1b[1m[branch]\x1b[22m`);
3827
- content.addChild(new Text(label, 0, 0));
3828
- content.addChild(new Spacer(1));
3827
+ content.addChild(new Text$1(label, 0, 0));
3828
+ content.addChild(new Spacer$1(1));
3829
3829
  if (this.expanded) {
3830
3830
  const header = "**Branch Summary**\n\n";
3831
3831
  const transform = createMarkdownTransform("summary", () => false, this.markdownTransformers, this.messageId, this.timestamp);
3832
- content.addChild(new Markdown(this.message.summary, 0, 0, this.markdownTheme, { color: (text) => theme.fg("customMessageText", text) }, {
3832
+ content.addChild(new Markdown$1(this.message.summary, 0, 0, this.markdownTheme, { color: (text) => theme.fg("customMessageText", text) }, {
3833
3833
  transform: (markdown, width) => header + transform(markdown, width),
3834
3834
  renderLatex: this.renderLatex
3835
3835
  }));
3836
3836
  } else {
3837
3837
  const hint = parenthesizedKeyHint("app.tools.expand", "Expand");
3838
- content.addChild(new Text(theme.fg("customMessageText", "Branch summary") + (hint ? ` ${hint}` : ""), 0, 0));
3838
+ content.addChild(new Text$1(theme.fg("customMessageText", "Branch summary") + (hint ? ` ${hint}` : ""), 0, 0));
3839
3839
  }
3840
3840
  this.addChild(content);
3841
3841
  }
@@ -3905,7 +3905,7 @@ var CompactionBoundaryMessageComponent = class extends Box {
3905
3905
  }
3906
3906
  updateDisplay() {
3907
3907
  this.clear();
3908
- const content = new Container();
3908
+ const content = new Container$1();
3909
3909
  const [head = "", ...rest] = compactionBoundaryTitle(this.view).split(" · ");
3910
3910
  const hint = this.expanded ? "" : keyHintIfBound("app.tools.expand", "to expand");
3911
3911
  const label = [
@@ -3913,15 +3913,15 @@ var CompactionBoundaryMessageComponent = class extends Box {
3913
3913
  ...rest.map((part) => theme.fg("customMessageText", part)),
3914
3914
  ...hint ? [hint] : []
3915
3915
  ].join(theme.fg("dim", " · "));
3916
- content.addChild(new Text(`⚛ ${label}`, 0, 0));
3917
- if (this.view.fallbackReason) content.addChild(new Text(theme.fg("warning", compactionFallbackNotice(this.view.fallbackReason)), 0, 0));
3916
+ content.addChild(new Text$1(`⚛ ${label}`, 0, 0));
3917
+ if (this.view.fallbackReason) content.addChild(new Text$1(theme.fg("warning", compactionFallbackNotice(this.view.fallbackReason)), 0, 0));
3918
3918
  if (this.expanded) {
3919
3919
  const tokensBefore = (this.view.tokensBefore ?? this.view.stats.tokensBefore).toLocaleString();
3920
- content.addChild(new Spacer(1));
3921
- content.addChild(new Text(theme.bold(theme.fg("customMessageText", `Context before compaction: ${tokensBefore} tokens`)), 0, 0));
3922
- content.addChild(new Spacer(1));
3920
+ content.addChild(new Spacer$1(1));
3921
+ content.addChild(new Text$1(theme.bold(theme.fg("customMessageText", `Context before compaction: ${tokensBefore} tokens`)), 0, 0));
3922
+ content.addChild(new Spacer$1(1));
3923
3923
  const rendered = this.view.text.split("\n").map((line) => /^\(filtered \d+ lines\)$/.test(line) ? theme.fg("dim", line) : theme.fg("customMessageText", line)).join("\n");
3924
- content.addChild(new Text(rendered, 0, 0));
3924
+ content.addChild(new Text$1(rendered, 0, 0));
3925
3925
  }
3926
3926
  this.addChild(content);
3927
3927
  }
@@ -3961,8 +3961,8 @@ function formatByteSize(bytes) {
3961
3961
  const safe = Math.max(0, Math.floor(bytes));
3962
3962
  if (safe < 1024) return `${safe} B`;
3963
3963
  if (safe < 1048576) return `${(safe / 1024).toFixed(1)} KB`;
3964
- if (safe < 1073741824) return `${(safe / 1048576).toFixed(1)} MB`;
3965
- return `${(safe / 1073741824).toFixed(1)} GB`;
3964
+ if (safe < 0x40000000) return `${(safe / 1048576).toFixed(1)} MB`;
3965
+ return `${(safe / 0x40000000).toFixed(1)} GB`;
3966
3966
  }
3967
3967
  /** Wraps multi-line text to the available width without truncating any content. */
3968
3968
  function wrappedRecord(text, style) {
@@ -3985,10 +3985,10 @@ function titleWithTruncatedMeta(titleStyled, metaText, theme) {
3985
3985
  invalidate() {},
3986
3986
  render(width) {
3987
3987
  if (width < 1) return [];
3988
- const titleW = visibleWidth(titleStyled);
3988
+ const titleW = visibleWidth$1(titleStyled);
3989
3989
  if (!metaText || titleW + 4 >= width) return [truncateToWidth(titleStyled, width, "…")];
3990
3990
  const room = width - titleW - 3;
3991
- const shown = visibleWidth(metaText) <= room ? metaText : truncateToWidth(metaText, room, "…");
3991
+ const shown = visibleWidth$1(metaText) <= room ? metaText : truncateToWidth(metaText, room, "…");
3992
3992
  return [`${titleStyled}${theme.fg("dim", ` · ${shown}`)}`];
3993
3993
  }
3994
3994
  };
@@ -4056,7 +4056,7 @@ function renderEventReport(message, options, theme) {
4056
4056
  const subscriptionId = typeof details?.subscriptionId === "string" ? cleanOneLine(details.subscriptionId) : "";
4057
4057
  const bodyText = prefixMatch ? rawContent.slice(prefixMatch[0].length) : rawContent;
4058
4058
  const markdown = new ToolBlockMarkdown(bodyText.trim());
4059
- const shortEventId = visibleWidth(eventId) > 20 ? truncateToWidth(eventId, 20, "…") : eventId;
4059
+ const shortEventId = visibleWidth$1(eventId) > 20 ? truncateToWidth(eventId, 20, "…") : eventId;
4060
4060
  const title = `${theme.fg("muted", "Event report from")} ${theme.fg("accent", theme.bold(child))}`;
4061
4061
  const meta = shortEventId ? [`event ${shortEventId}`] : [];
4062
4062
  const bodyComponent = bodyText.trim() ? {
@@ -4075,7 +4075,7 @@ function renderEventReport(message, options, theme) {
4075
4075
  }
4076
4076
  return new ReplayableToolBlock(new ToolBlock({
4077
4077
  status: "info",
4078
- title: new Text(title, 0, 0),
4078
+ title: new Text$1(title, 0, 0),
4079
4079
  meta,
4080
4080
  body: bodyComponent,
4081
4081
  details: records.length > 0 ? new ToolBlockRecords(records) : void 0,
@@ -4800,7 +4800,7 @@ function renderInnerNoticeToolCall(input) {
4800
4800
  if (toolDef.renderCall && !canonicalCall) try {
4801
4801
  callComp = toolDef.renderCall(args, theme, innerContext);
4802
4802
  } catch {
4803
- callComp = new Text(theme.fg("toolTitle", theme.bold(name)), 0, 0);
4803
+ callComp = new Text$1(theme.fg("toolTitle", theme.bold(name)), 0, 0);
4804
4804
  }
4805
4805
  let resultComp;
4806
4806
  if (matched && toolDef.renderResult && !canonicalResult) try {
@@ -4813,12 +4813,12 @@ function renderInnerNoticeToolCall(input) {
4813
4813
  }, theme, innerContext);
4814
4814
  } catch {
4815
4815
  const firstResult = matched.text.split("\n").find((line) => line.trim())?.trim();
4816
- if (firstResult) resultComp = new Text(theme.fg(isError ? "error" : "toolOutput", cleanPreview(firstResult)), 0, 0);
4816
+ if (firstResult) resultComp = new Text$1(theme.fg(isError ? "error" : "toolOutput", cleanPreview(firstResult)), 0, 0);
4817
4817
  }
4818
4818
  else if (canonicalResult && presentation) resultComp = presentation.details;
4819
4819
  else if (matched?.text) {
4820
4820
  const firstResult = matched.text.split("\n").find((line) => line.trim())?.trim();
4821
- if (firstResult) resultComp = new Text(theme.fg(isError ? "error" : "toolOutput", cleanPreview(firstResult)), 0, 0);
4821
+ if (firstResult) resultComp = new Text$1(theme.fg(isError ? "error" : "toolOutput", cleanPreview(firstResult)), 0, 0);
4822
4822
  }
4823
4823
  if (resultComp && isToolBlock(resultComp)) return new UnpaddedBlockComponent(resultComp);
4824
4824
  if (callComp && isToolBlock(callComp)) return new UnpaddedBlockComponent(callComp);
@@ -4837,7 +4837,7 @@ function renderInnerNoticeToolCall(input) {
4837
4837
  title: toolDisplayName(name),
4838
4838
  args: summarizeToolArgs(name, args),
4839
4839
  meta: durationMeta,
4840
- details: firstResult ? new Text(theme.fg(matched?.isError ? "error" : "toolOutput", cleanPreview(firstResult)), 0, 0) : void 0,
4840
+ details: firstResult ? new Text$1(theme.fg(matched?.isError ? "error" : "toolOutput", cleanPreview(firstResult)), 0, 0) : void 0,
4841
4841
  outputPad: 0
4842
4842
  });
4843
4843
  }
@@ -5016,9 +5016,9 @@ var TaskCompletionMessage = class TaskCompletionMessage {
5016
5016
  const transcript = this.ensureTranscriptLoaded(notice, spec.status);
5017
5017
  if (transcript) {
5018
5018
  const records = new ToolBlockRecords([
5019
- new SectionRecord(theme.bold("Prompt"), transcript.prompt ? new ToolBlockMarkdown(transcript.prompt) : new Text(theme.fg("dim", "(none)"), 0, 0)),
5020
- new SectionRecord(theme.bold("Tool calls"), transcript.toolBlocks.length > 0 ? new ComponentList(transcript.toolBlocks) : new Text(theme.fg("dim", transcript.unavailable ?? "(none)"), 0, 0)),
5021
- new SectionRecord(theme.bold("Result"), preview ? new ToolBlockMarkdown(preview) : new Text(theme.fg("dim", "(no output)"), 0, 0))
5019
+ new SectionRecord(theme.bold("Prompt"), transcript.prompt ? new ToolBlockMarkdown(transcript.prompt) : new Text$1(theme.fg("dim", "(none)"), 0, 0)),
5020
+ new SectionRecord(theme.bold("Tool calls"), transcript.toolBlocks.length > 0 ? new ComponentList(transcript.toolBlocks) : new Text$1(theme.fg("dim", transcript.unavailable ?? "(none)"), 0, 0)),
5021
+ new SectionRecord(theme.bold("Result"), preview ? new ToolBlockMarkdown(preview) : new Text$1(theme.fg("dim", "(no output)"), 0, 0))
5022
5022
  ]);
5023
5023
  const detailWidth = Math.max(1, width - 1);
5024
5024
  return [...head, ...records.render(detailWidth).map((row) => previewRow(truncateToWidth(` ${row}`, width, "…")))];
@@ -5039,7 +5039,7 @@ var TaskCompletionMessage = class TaskCompletionMessage {
5039
5039
  this.previewRows.set(notice, rows);
5040
5040
  }
5041
5041
  const firstRow = rows[0] ?? "";
5042
- const hint = canLoadTranscript || rows.length > 1 || visibleWidth(firstRow) > contentWidth ? keyHintIfBound("app.tools.expand", canLoadTranscript ? "for prompt, tool calls and full result" : "for the full result") : "";
5042
+ const hint = canLoadTranscript || rows.length > 1 || visibleWidth$1(firstRow) > contentWidth ? keyHintIfBound("app.tools.expand", canLoadTranscript ? "for prompt, tool calls and full result" : "for the full result") : "";
5043
5043
  return [
5044
5044
  ...line === void 0 ? [] : [line],
5045
5045
  ...firstRow ? [previewRow(truncateToWidth(`${theme.fg("muted", " ⎿ ")}${firstRow}`, width, "…"))] : [],
@@ -5128,7 +5128,7 @@ function isRenderableComponent(value) {
5128
5128
  * Component that renders a custom message entry from extensions.
5129
5129
  * Uses distinct styling to differentiate from user messages.
5130
5130
  */
5131
- var CustomMessageComponent = class extends Container {
5131
+ var CustomMessageComponent = class extends Container$1 {
5132
5132
  ownsLeadingSpacer = true;
5133
5133
  get historyReplayable() {
5134
5134
  return !this.selectionTextMayChangeOnReplay || declaresHistoryReplayable(this.customComponent);
@@ -5247,7 +5247,7 @@ var CustomMessageComponent = class extends Container {
5247
5247
  if (this.message.customType === "task-completion") {
5248
5248
  const card = TaskCompletionMessage.fromMessage(this.message, this._expanded, this.completionOptions, TaskCompletionMessage.isCard(previous) ? previous : void 0);
5249
5249
  if (card) {
5250
- this.spacer = new Spacer(1);
5250
+ this.spacer = new Spacer$1(1);
5251
5251
  this.customComponent = card;
5252
5252
  this.addChild(this.spacer);
5253
5253
  this.addChild(this.customComponent);
@@ -5257,7 +5257,7 @@ var CustomMessageComponent = class extends Container {
5257
5257
  if (this.message.customType === "task-heartbeat") {
5258
5258
  const details = heartbeatDetailsFrom(this.message.details);
5259
5259
  if (details) {
5260
- this.spacer = new Spacer(1);
5260
+ this.spacer = new Spacer$1(1);
5261
5261
  this.customComponent = new TaskHeartbeatMessage(details, this._expanded, this.outputPad);
5262
5262
  this.addChild(this.spacer);
5263
5263
  this.addChild(this.customComponent);
@@ -5274,7 +5274,7 @@ var CustomMessageComponent = class extends Container {
5274
5274
  }, theme);
5275
5275
  if (component === null) return;
5276
5276
  if (isRenderableComponent(component)) {
5277
- this.spacer = new Spacer(1);
5277
+ this.spacer = new Spacer$1(1);
5278
5278
  this.addChild(this.spacer);
5279
5279
  this.customComponent = component;
5280
5280
  this.addChild(component);
@@ -5286,7 +5286,7 @@ var CustomMessageComponent = class extends Container {
5286
5286
  return;
5287
5287
  }
5288
5288
  } catch {
5289
- this.spacer = new Spacer(1);
5289
+ this.spacer = new Spacer$1(1);
5290
5290
  this.customComponent = new ToolBlock({
5291
5291
  status: "failure",
5292
5292
  title: "Message renderer failed",
@@ -5304,24 +5304,24 @@ var CustomMessageComponent = class extends Container {
5304
5304
  keyHint
5305
5305
  }, theme);
5306
5306
  if (coreComponent) {
5307
- this.spacer = new Spacer(1);
5307
+ this.spacer = new Spacer$1(1);
5308
5308
  this.addChild(this.spacer);
5309
5309
  this.customComponent = coreComponent;
5310
5310
  this.addChild(coreComponent);
5311
5311
  return;
5312
5312
  }
5313
- this.spacer = new Spacer(1);
5313
+ this.spacer = new Spacer$1(1);
5314
5314
  this.addChild(this.spacer);
5315
5315
  this.addChild(this.box);
5316
5316
  this.box.clear();
5317
5317
  this.box.setPaddingX(this.outputPad);
5318
5318
  const label = theme.fg("customMessageLabel", `\x1b[1m[${this.message.customType}]\x1b[22m`);
5319
- this.box.addChild(new Text(label, 0, 0));
5320
- this.box.addChild(new Spacer(1));
5319
+ this.box.addChild(new Text$1(label, 0, 0));
5320
+ this.box.addChild(new Spacer$1(1));
5321
5321
  let text;
5322
5322
  if (typeof this.message.content === "string") text = this.message.content;
5323
5323
  else text = this.message.content.filter((c) => c.type === "text").map((c) => c.text).join("\n");
5324
- this.box.addChild(new Markdown(stripTerminalControls(text), 0, 0, this.markdownTheme, { color: (text) => theme.fg("customMessageText", text) }, {
5324
+ this.box.addChild(new Markdown$1(stripTerminalControls(text), 0, 0, this.markdownTheme, { color: (text) => theme.fg("customMessageText", text) }, {
5325
5325
  transform: createMarkdownTransform("custom", () => false, this.markdownTransformers, this.messageId, this.timestamp),
5326
5326
  renderLatex: this.renderLatex
5327
5327
  }));
@@ -5380,20 +5380,20 @@ var SkillInvocationMessageComponent = class extends Box {
5380
5380
  }
5381
5381
  updateDisplay() {
5382
5382
  this.clear();
5383
- const content = new Container();
5383
+ const content = new Container$1();
5384
5384
  if (this.expanded) {
5385
5385
  const label = theme.fg("customMessageLabel", `\x1b[1m[skill]\x1b[22m`);
5386
- content.addChild(new Text(label, 0, 0));
5386
+ content.addChild(new Text$1(label, 0, 0));
5387
5387
  const header = `**${this.skillBlock.name}**\n\n`;
5388
5388
  const transform = createMarkdownTransform("custom", () => false, this.markdownTransformers, this.messageId, this.timestamp);
5389
- content.addChild(new Markdown(this.skillBlock.content, 0, 0, this.markdownTheme, { color: (text) => theme.fg("customMessageText", text) }, {
5389
+ content.addChild(new Markdown$1(this.skillBlock.content, 0, 0, this.markdownTheme, { color: (text) => theme.fg("customMessageText", text) }, {
5390
5390
  transform: (markdown, width) => header + transform(markdown, width),
5391
5391
  renderLatex: this.renderLatex
5392
5392
  }));
5393
5393
  } else {
5394
5394
  const hint = parenthesizedKeyHint("app.tools.expand", "Expand");
5395
5395
  const line = theme.fg("customMessageLabel", `\x1b[1m[skill]\x1b[22m `) + theme.fg("customMessageText", this.skillBlock.name) + (hint ? ` ${hint}` : "");
5396
- content.addChild(new Text(line, 0, 0));
5396
+ content.addChild(new Text$1(line, 0, 0));
5397
5397
  }
5398
5398
  this.addChild(content);
5399
5399
  }
@@ -5648,7 +5648,7 @@ function blockStatusMarkPrefix() {
5648
5648
  }
5649
5649
  return statusMarkPrefix;
5650
5650
  }
5651
- var ToolExecutionComponent = class extends Container {
5651
+ var ToolExecutionComponent = class extends Container$1 {
5652
5652
  get historyReplayable() {
5653
5653
  if (!this.toolDefinition) return true;
5654
5654
  return (!this.toolDefinition.renderCall || declaresHistoryReplayable(this.callRendererComponent)) && (!this.toolDefinition.renderResult || declaresHistoryReplayable(this.resultRendererComponent));
@@ -5709,8 +5709,8 @@ var ToolExecutionComponent = class extends Container {
5709
5709
  this.toolRendererReader = options.getToolDefinition;
5710
5710
  this.ui = ui;
5711
5711
  this.cwd = cwd;
5712
- this.addChild(new Spacer(1));
5713
- this.contentContainer = new Container();
5712
+ this.addChild(new Spacer$1(1));
5713
+ this.contentContainer = new Container$1();
5714
5714
  this.addChild(this.contentContainer);
5715
5715
  if (toolDefinition) setRendererClickTarget(this, {
5716
5716
  container: this.contentContainer,
@@ -5771,14 +5771,14 @@ var ToolExecutionComponent = class extends Container {
5771
5771
  const text = terminalDisplayText(raw).replace(/[\r\n\t]/g, " ");
5772
5772
  return `${terminalDisplayText(key)}=${truncateToWidth(text, 64, "…")}`;
5773
5773
  }).join(" · ") : String(this.args ?? "");
5774
- return new Text(`${theme.fg("toolTitle", theme.bold(label))}${theme.fg("text", `(${terminalDisplayText(args).replace(/[\r\n\t]/g, " ")})`)}`, 0, 0);
5774
+ return new Text$1(`${theme.fg("toolTitle", theme.bold(label))}${theme.fg("text", `(${terminalDisplayText(args).replace(/[\r\n\t]/g, " ")})`)}`, 0, 0);
5775
5775
  }
5776
5776
  createResultFallback() {
5777
5777
  const output = this.getTextOutput();
5778
5778
  if (!output) return;
5779
5779
  const lines = terminalDisplayText(output).split("\n");
5780
5780
  const displayLines = collapseToolBlockLines(lines, FALLBACK_PREVIEW_LINES, this.expanded);
5781
- return new Text(displayLines.map((line) => theme.fg(this.result?.isError ? "error" : "toolOutput", line)).join("\n"), 0, 0);
5781
+ return new Text$1(displayLines.map((line) => theme.fg(this.result?.isError ? "error" : "toolOutput", line)).join("\n"), 0, 0);
5782
5782
  }
5783
5783
  /**
5784
5784
  * Show new partial arguments. Applied at the next render, so a call streaming many argument deltas between two
@@ -5949,8 +5949,8 @@ var ToolExecutionComponent = class extends Container {
5949
5949
  if (available < 1) return [];
5950
5950
  const full = keys ? theme.fg("dim", ` (${clickableKeyTextHint(keys, " to expand")})`) : "";
5951
5951
  const compact = keys ? theme.fg("dim", ` (${clickableKeyTextHint(keys, "")})`) : "";
5952
- const suffix = visibleWidth(full) < available ? full : visibleWidth(compact) < available ? compact : "";
5953
- return [`${truncateToWidth(summary, available - visibleWidth(suffix), "…")}${suffix}`];
5952
+ const suffix = visibleWidth$1(full) < available ? full : visibleWidth$1(compact) < available ? compact : "";
5953
+ return [`${truncateToWidth(summary, available - visibleWidth$1(suffix), "…")}${suffix}`];
5954
5954
  }
5955
5955
  },
5956
5956
  outputPad: this.outputPad
@@ -5997,7 +5997,7 @@ var ToolExecutionComponent = class extends Container {
5997
5997
  const line = call.render(width).find((row) => stripTerminalSequences(row).trim().length > 0);
5998
5998
  if (line === void 0) return [terminalDisplayText(this.toolDefinition?.label ?? this.toolName)];
5999
5999
  const prefix = blockStatusMarkPrefix().exec(stripTerminalSequences(line))?.[0];
6000
- return prefix ? [sliceByColumn(line, visibleWidth(prefix), width)] : [terminalDisplayText(this.toolDefinition?.label ?? this.toolName)];
6000
+ return prefix ? [sliceByColumn(line, visibleWidth$1(prefix), width)] : [terminalDisplayText(this.toolDefinition?.label ?? this.toolName)];
6001
6001
  }
6002
6002
  };
6003
6003
  }
@@ -6027,14 +6027,14 @@ var ToolExecutionComponent = class extends Container {
6027
6027
  const canonicalResult = presentation !== void 0 && (!resultRenderer || isBuiltinToolResultRenderer(resultRenderer));
6028
6028
  let call;
6029
6029
  if (canonicalCall && presentation) {
6030
- call = new Text(presentation.title, 0, 0);
6030
+ call = new Text$1(presentation.title, 0, 0);
6031
6031
  this.callRendererComponent = void 0;
6032
6032
  } else if (callRenderer) try {
6033
6033
  call = callRenderer(this.args, theme, this.getRenderContext(this.callRendererComponent));
6034
6034
  this.callRendererComponent = call;
6035
6035
  } catch {
6036
6036
  this.callRendererComponent = void 0;
6037
- call = new Text(theme.fg("toolTitle", theme.bold(this.toolName)), 0, 0);
6037
+ call = new Text$1(theme.fg("toolTitle", theme.bold(this.toolName)), 0, 0);
6038
6038
  }
6039
6039
  else call = this.createCallFallback();
6040
6040
  let details;
@@ -6054,13 +6054,13 @@ var ToolExecutionComponent = class extends Container {
6054
6054
  this.resultRendererComponent = details;
6055
6055
  } catch {
6056
6056
  this.resultRendererComponent = void 0;
6057
- details = new Text(theme.fg("warning", "Result renderer failed"), 0, 0);
6057
+ details = new Text$1(theme.fg("warning", "Result renderer failed"), 0, 0);
6058
6058
  }
6059
6059
  else details = this.createResultFallback();
6060
6060
  }
6061
6061
  if (this.expanded && !callRenderer && typeof this.args === "object" && this.args !== null && Object.keys(this.args).length > 0) {
6062
6062
  const argumentLines = Object.entries(this.args).map(([key, value]) => `${key}: ${typeof value === "string" ? value : JSON.stringify(value, null, 2) ?? ""}`).join("\n");
6063
- const argumentsComponent = new Text(terminalDisplayText(argumentLines), 0, 0);
6063
+ const argumentsComponent = new Text$1(terminalDisplayText(argumentLines), 0, 0);
6064
6064
  details = new ToolBlockRecords([argumentsComponent, ...details ? [details] : []]);
6065
6065
  }
6066
6066
  const selfRendered = this.hasRendererDefinition() && this.getRenderShell() === "self" && !(canonicalCall && canonicalResult);
@@ -6109,7 +6109,7 @@ var ToolExecutionComponent = class extends Container {
6109
6109
  this.syncWorkingClock();
6110
6110
  }
6111
6111
  syncImageComponents() {
6112
- const capabilities = getCapabilities();
6112
+ const capabilities = getCapabilities$1();
6113
6113
  const nextSpecs = [];
6114
6114
  if (this.result && this.showImages && capabilities.images) {
6115
6115
  const imageBlocks = this.result.content.filter((c) => c.type === "image");
@@ -6138,7 +6138,7 @@ var ToolExecutionComponent = class extends Container {
6138
6138
  this.imageSpacers = [];
6139
6139
  this.renderedImageSpecs = nextSpecs;
6140
6140
  for (const spec of nextSpecs) {
6141
- const spacer = new Spacer(1);
6141
+ const spacer = new Spacer$1(1);
6142
6142
  this.addChild(spacer);
6143
6143
  this.imageSpacers.push(spacer);
6144
6144
  const image = new Image(spec.data, spec.mimeType, { fallbackColor: (s) => theme.fg("toolOutput", s) }, { maxWidthCells: spec.widthCells });
@@ -7026,7 +7026,7 @@ function renderHostedChatEntry(entry, options, AssistantCard = AssistantMessageC
7026
7026
  case "user": return userMessageComponent(messageEntry.text, markdownTheme, options.toolOutputExpanded ?? false, options.outputPad ?? 1, options.markdownTransformers, options.renderLatex, messageEntry.messageId, messageEntry.timestamp);
7027
7027
  case "custom": {
7028
7028
  const diagnostic = displayLines.get(messageEntry.message);
7029
- if (diagnostic) return new Text(theme.fg(diagnostic.level, stripTerminalControls(diagnostic.text)), options.outputPad ?? 1, 0);
7029
+ if (diagnostic) return new Text$1(theme.fg(diagnostic.level, stripTerminalControls(diagnostic.text)), options.outputPad ?? 1, 0);
7030
7030
  if (isVerbatimCompactionMessage(messageEntry.message)) return compactionBoundaryFromMessage(messageEntry.message, options.toolOutputExpanded ?? false, options.outputPad);
7031
7031
  if (options.createCustomMessageComponent) {
7032
7032
  let seeding = true;
@@ -7051,11 +7051,11 @@ function renderHostedChatEntry(entry, options, AssistantCard = AssistantMessageC
7051
7051
  component.setExpanded(options.toolOutputExpanded ?? false);
7052
7052
  return component;
7053
7053
  }
7054
- case "system": return new Text(theme.fg("dim", messageEntry.text), options.outputPad ?? 1, 0);
7054
+ case "system": return new Text$1(theme.fg("dim", messageEntry.text), options.outputPad ?? 1, 0);
7055
7055
  }
7056
7056
  }
7057
7057
  /** A skill block and the message typed with it: a click on the skill block's rows expands or collapses it. */
7058
- var SkillMessageContainer = class extends Container {
7058
+ var SkillMessageContainer = class extends Container$1 {
7059
7059
  expandsOnClick = true;
7060
7060
  skill;
7061
7061
  constructor(skill) {
@@ -7171,7 +7171,7 @@ async function editInExternalEditor(request) {
7171
7171
  const useShell = process.platform === "win32";
7172
7172
  const spawnArgs = [...editorArgs, filePath];
7173
7173
  const exit = await new Promise((resolve) => {
7174
- const child = spawn(useShell ? quoteWindowsShellArgument(editor) : editor, useShell ? spawnArgs.map(quoteWindowsShellArgument) : spawnArgs, {
7174
+ const child = spawn$1(useShell ? quoteWindowsShellArgument(editor) : editor, useShell ? spawnArgs.map(quoteWindowsShellArgument) : spawnArgs, {
7175
7175
  stdio: "inherit",
7176
7176
  shell: useShell,
7177
7177
  env: createChildProcessEnvironment()
@@ -7206,23 +7206,23 @@ function appTempPrefix(kind) {
7206
7206
  }
7207
7207
  function scheduleTempFileCleanup(filePath, delayMs) {
7208
7208
  setTimeout(() => {
7209
- fs$2.unlink(filePath).catch(() => {});
7209
+ fs$1.unlink(filePath).catch(() => {});
7210
7210
  }, delayMs).unref?.();
7211
7211
  }
7212
7212
  async function cleanupStaleClipboardFiles(now = Date.now()) {
7213
7213
  const prefix = appTempPrefix("clipboard");
7214
7214
  let entries;
7215
7215
  try {
7216
- entries = await fs$2.readdir(os.tmpdir());
7216
+ entries = await fs$1.readdir(os.tmpdir());
7217
7217
  } catch {
7218
7218
  return;
7219
7219
  }
7220
7220
  for (const entry of entries) {
7221
7221
  if (!entry.startsWith(prefix)) continue;
7222
- const filePath = path$1.join(os.tmpdir(), entry);
7222
+ const filePath = path.join(os.tmpdir(), entry);
7223
7223
  try {
7224
- const stat = await fs$2.stat(filePath);
7225
- if (stat.isFile() && now - stat.mtimeMs >= CLIPBOARD_STALE_AGE_MS) await fs$2.unlink(filePath);
7224
+ const stat = await fs$1.stat(filePath);
7225
+ if (stat.isFile() && now - stat.mtimeMs >= CLIPBOARD_STALE_AGE_MS) await fs$1.unlink(filePath);
7226
7226
  } catch {}
7227
7227
  }
7228
7228
  }
@@ -7278,9 +7278,9 @@ async function pasteClipboardImageToEditor(editor, requestRender, options = {})
7278
7278
  return insertIntoEditor(editor, text, requestRender);
7279
7279
  }
7280
7280
  const ext = extensionForImageMimeType(image.mimeType) ?? "png";
7281
- const fileName = `${appTempPrefix("clipboard")}${crypto$1.randomUUID()}.${ext}`;
7282
- const filePath = path$1.join(os.tmpdir(), fileName);
7283
- await fs$2.writeFile(filePath, Buffer.from(image.bytes), {
7281
+ const fileName = `${appTempPrefix("clipboard")}${crypto.randomUUID()}.${ext}`;
7282
+ const filePath = path.join(os.tmpdir(), fileName);
7283
+ await fs$1.writeFile(filePath, Buffer.from(image.bytes), {
7284
7284
  flag: "wx",
7285
7285
  mode: 384
7286
7286
  });
@@ -7389,7 +7389,7 @@ var AtMentionFallbackAutocompleteProvider = class {
7389
7389
  * Without `fdPath`, an `@` mention completes the paths under `cwd` the way Tab does instead of searching for them.
7390
7390
  */
7391
7391
  function createChatAutocompleteProvider(commands, cwd, fdPath) {
7392
- return new AtMentionFallbackAutocompleteProvider(new CombinedAutocompleteProvider([...commands], cwd, fdPath ?? null), new CombinedAutocompleteProvider([...commands], cwd, null));
7392
+ return new AtMentionFallbackAutocompleteProvider(new CombinedAutocompleteProvider$1([...commands], cwd, fdPath ?? null), new CombinedAutocompleteProvider$1([...commands], cwd, null));
7393
7393
  }
7394
7394
  // dist/modes/interactive/skill-command-autocomplete.js
7395
7395
  function getAutocompleteSourceTag(sourceInfo) {
@@ -7442,7 +7442,7 @@ function sharedFdPath() {
7442
7442
  * pending catalog while that session is still starting.
7443
7443
  */
7444
7444
  function createSessionSkillAutocompleteProvider(resolveSession, onUnavailable) {
7445
- const completion = new CombinedAutocompleteProvider([], "", null);
7445
+ const completion = new CombinedAutocompleteProvider$1([], "", null);
7446
7446
  return {
7447
7447
  async getSuggestions(lines, cursorLine, cursorCol, options) {
7448
7448
  if (options.signal.aborted) return null;
@@ -7541,7 +7541,7 @@ const EMPTY_COMPONENT = {
7541
7541
  invalidate: () => {}
7542
7542
  };
7543
7543
  function addChatTranscriptEntry(container, component, role) {
7544
- if (needsLeadingSpacer(role) && container.children.length > 0 && !ownsLeadingSpacer(component)) container.addChild(new Spacer(1));
7544
+ if (needsLeadingSpacer(role) && container.children.length > 0 && !ownsLeadingSpacer(component)) container.addChild(new Spacer$1(1));
7545
7545
  container.addChild(component);
7546
7546
  }
7547
7547
  function ownsLeadingSpacer(component) {
@@ -8131,11 +8131,11 @@ var ScrollableComponentViewport = class {
8131
8131
  return true;
8132
8132
  }
8133
8133
  if (isMouseSequence(data)) return true;
8134
- if (matchesKey(data, "pageUp")) {
8134
+ if (matchesKey$1(data, "pageUp")) {
8135
8135
  this.scrollBy(-this.pageSize());
8136
8136
  return true;
8137
8137
  }
8138
- if (matchesKey(data, "pageDown")) {
8138
+ if (matchesKey$1(data, "pageDown")) {
8139
8139
  this.scrollBy(this.pageSize());
8140
8140
  return true;
8141
8141
  }
@@ -8367,7 +8367,7 @@ var ScrollableComponentViewport = class {
8367
8367
  const cellWidth = width - 1;
8368
8368
  return rows.map((row, index) => {
8369
8369
  const cell = truncateToWidth(row, cellWidth, "");
8370
- const padding = " ".repeat(Math.max(0, cellWidth - visibleWidth(cell)));
8370
+ const padding = " ".repeat(Math.max(0, cellWidth - visibleWidth$1(cell)));
8371
8371
  const thumb = index >= thumbTop && index < thumbTop + thumbHeight;
8372
8372
  return `${cell}${padding}${SCROLLBAR_CELL_RESET}${thumb ? thumbStyle(SCROLLBAR_THUMB) : trackStyle(SCROLLBAR_TRACK)}`;
8373
8373
  });
@@ -8600,8 +8600,8 @@ var RemoteFrameWidthClamp = class {
8600
8600
  if (this.clamped !== void 0 && this.source === lines && this.width === width) return this.clamped;
8601
8601
  let result = lines;
8602
8602
  if (width > 0) {
8603
- for (const line of lines) if (visibleWidth(line) > width) {
8604
- result = lines.map((frameLine) => visibleWidth(frameLine) > width ? truncateToWidth(frameLine, width, "") : frameLine);
8603
+ for (const line of lines) if (visibleWidth$1(line) > width) {
8604
+ result = lines.map((frameLine) => visibleWidth$1(frameLine) > width ? truncateToWidth(frameLine, width, "") : frameLine);
8605
8605
  break;
8606
8606
  }
8607
8607
  }
@@ -11023,12 +11023,12 @@ function queuedMessagesHint(dequeueKey) {
11023
11023
  var QueuedMessagesView = class {
11024
11024
  lines;
11025
11025
  constructor(rows, dequeueKey, dim) {
11026
- this.lines = rows.length === 0 ? [] : [...rows.map((row) => new TruncatedText(dim(`${queuedMessageLabel(row.lane)}: ${row.text}`), 1, 0)), ...rows.some((row) => row.delivering !== true) ? [new TruncatedText(dim(queuedMessagesHint(dequeueKey)), 1, 0)] : []];
11026
+ this.lines = rows.length === 0 ? [] : [...rows.map((row) => new TruncatedText$1(dim(`${queuedMessageLabel(row.lane)}: ${row.text}`), 1, 0)), ...rows.some((row) => row.delivering !== true) ? [new TruncatedText$1(dim(queuedMessagesHint(dequeueKey)), 1, 0)] : []];
11027
11027
  }
11028
11028
  invalidate() {}
11029
11029
  render(width) {
11030
11030
  if (this.lines.length === 0) return [];
11031
- return [...new Spacer(1).render(width), ...this.lines.flatMap((line) => line.render(width))];
11031
+ return [...new Spacer$1(1).render(width), ...this.lines.flatMap((line) => line.render(width))];
11032
11032
  }
11033
11033
  };
11034
11034
  // dist/modes/interactive/components/chat-session-host-steering.js
@@ -11114,7 +11114,7 @@ const USAGE_DROP_ORDER = {
11114
11114
  output: 5
11115
11115
  };
11116
11116
  function rightAlign(line, width) {
11117
- const lineWidth = visibleWidth(line);
11117
+ const lineWidth = visibleWidth$1(line);
11118
11118
  if (lineWidth >= width) return truncateToWidth(line, width, theme.fg("dim", "..."));
11119
11119
  return `${" ".repeat(width - lineWidth)}${line}`;
11120
11120
  }
@@ -11216,7 +11216,7 @@ function getUsageLine(session, autoCompactEnabled, width) {
11216
11216
  else if (contextPercentValue > 70) usageParts.push(context(theme.fg("warning", contextPercentDisplay)));
11217
11217
  else usageParts.push(context(theme.fg("muted", contextPercentDisplay)));
11218
11218
  const separator = theme.fg("dim", " • ");
11219
- const meterWidth = () => visibleWidth(usageParts.map((part) => part.text).join(separator));
11219
+ const meterWidth = () => visibleWidth$1(usageParts.map((part) => part.text).join(separator));
11220
11220
  while (meterWidth() > width) {
11221
11221
  const dropped = usageParts.reduce((lowest, part) => part.drop < lowest.drop ? part : lowest);
11222
11222
  if (dropped.drop === Number.POSITIVE_INFINITY) break;
@@ -11345,18 +11345,18 @@ var FooterComponent = class {
11345
11345
  const optionalIndex = "segments" in hints ? hints.optionalIndex : void 0;
11346
11346
  const kept = segments.filter((_, index) => index !== optionalIndex);
11347
11347
  const leadPair = "segments" in hints && hints.leadPair === true && optionalIndex === void 0 && kept.length >= 2;
11348
- const pairFits = leadPair && visibleWidth(kept[0] + hintSeparator + kept[1]) <= width;
11348
+ const pairFits = leadPair && visibleWidth$1(kept[0] + hintSeparator + kept[1]) <= width;
11349
11349
  if (leadPair && !pairFits) kept.splice(1, 1);
11350
11350
  const lead = pairFits ? 2 : 1;
11351
11351
  if (statusText && kept.length > 0) {
11352
- const required = working ? visibleWidth(statusText) : MIN_STATUS_WIDTH;
11353
- const room = () => width - visibleWidth(hintSeparator + kept.join(hintSeparator));
11352
+ const required = working ? visibleWidth$1(statusText) : MIN_STATUS_WIDTH;
11353
+ const room = () => width - visibleWidth$1(hintSeparator + kept.join(hintSeparator));
11354
11354
  while (kept.length > 2 && room() < required) kept.splice(lead, 1);
11355
11355
  const available = room();
11356
11356
  if (available < required) statusText = "";
11357
11357
  else if (!working) statusText = truncateToWidth(statusText, available, this.renderStyle.dim("..."));
11358
11358
  }
11359
- if (!statusText) while (kept.length > 1 && visibleWidth(kept.join(hintSeparator)) > width) kept.splice(kept.length > 2 ? lead : leadPair ? 1 : 0, 1);
11359
+ if (!statusText) while (kept.length > 1 && visibleWidth$1(kept.join(hintSeparator)) > width) kept.splice(kept.length > 2 ? lead : leadPair ? 1 : 0, 1);
11360
11360
  const parts = statusText ? [statusText, ...kept] : kept;
11361
11361
  const next = optionalIndex === void 0 ? -1 : parts.findIndex((part) => segments.indexOf(part) > optionalIndex);
11362
11362
  if (parts.length === 1) parts[0] = truncateToWidth(parts[0], width, this.renderStyle.dim("..."));
@@ -11364,7 +11364,7 @@ var FooterComponent = class {
11364
11364
  if (optionalIndex !== void 0) {
11365
11365
  const extra = segments[optionalIndex];
11366
11366
  const candidate = parts.toSpliced(next < 0 ? parts.length : next, 0, extra).join(hintSeparator);
11367
- if (visibleWidth(candidate) <= width) line = candidate;
11367
+ if (visibleWidth$1(candidate) <= width) line = candidate;
11368
11368
  }
11369
11369
  if (line || parts.length > 0) lines.push(line);
11370
11370
  }
@@ -11392,7 +11392,7 @@ const RETRY_REASONS = [
11392
11392
  [/\bETIMEDOUT\b|connect(?:ion)? timed? ?out/i, "connection timed out"],
11393
11393
  [/stream deadline|timed? ?out|timeout/i, "response timed out"],
11394
11394
  [/\bECONNREFUSED\b|connection.?refused/i, "connection refused"],
11395
- [/\bECONNRESET\b|\bECONNABORTED\b|\bEPIPE\b|connection.?(?:reset|closed|lost)|socket hang up|other side closed|socket connection was closed|reset before headers|websocket.?closed/i, "connection reset"],
11395
+ [/\bECONNRESET\b|\bECONNABORTED\b|\bEPIPE\b|\bUND_ERR_SOCKET\b|connection.?(?:reset|closed|lost)|socket hang up|other side closed|socket connection was closed|reset before headers|websocket.?closed/i, "connection reset"],
11396
11396
  [/getaddrinfo|\bENOTFOUND\b|\bEAI_AGAIN\b|fetch failed|network.?error|connection.?error|upstream.?connect|websocket.?error/i, "network error"],
11397
11397
  [/stream was interrupted|stream ended|ended without|stream disconnected|cut short|http\/?2 stream failed|did not get a response|pending stream has been canceled|upstream_stream_read_error|\bterminated\b/i, "stream interrupted"],
11398
11398
  [/zlib|incorrect header check|decompress/i, "unreadable response"],
@@ -11470,9 +11470,9 @@ function retryWaitMessage(wait, secondsLeft, cancelHint, columns = Number.POSITI
11470
11470
  if (secondsLeft !== void 0 && secondsLeft <= 0) return DEFAULT_WORKING_MESSAGE;
11471
11471
  const { head, reason, progress, compactProgress } = retryLineParts(wait, secondsLeft);
11472
11472
  const full = retryLine(head, reason, progress, cancelHint);
11473
- if (visibleWidth(full) <= columns) return full;
11473
+ if (visibleWidth$1(full) <= columns) return full;
11474
11474
  if (reason !== void 0) {
11475
- const room = columns - visibleWidth(retryLine(head, "", progress, cancelHint));
11475
+ const room = columns - visibleWidth$1(retryLine(head, "", progress, cancelHint));
11476
11476
  if (room >= REASON_MIN_WIDTH) return retryLine(head, stripTerminalSequences(truncateToWidth(reason, room, "…")).replace(/\s+…$/, "…"), progress, cancelHint);
11477
11477
  }
11478
11478
  const shorter = [
@@ -11480,7 +11480,7 @@ function retryWaitMessage(wait, secondsLeft, cancelHint, columns = Number.POSITI
11480
11480
  retryLine(head, void 0, progress),
11481
11481
  retryLine(head, void 0, compactProgress)
11482
11482
  ];
11483
- return shorter.find((line) => visibleWidth(line) <= columns) ?? stripTerminalSequences(truncateToWidth(shorter[2], columns, "…"));
11483
+ return shorter.find((line) => visibleWidth$1(line) <= columns) ?? stripTerminalSequences(truncateToWidth(shorter[2], columns, "…"));
11484
11484
  }
11485
11485
  /** `esc cancel` for the main chat, whose editor takes Esc for a retry even when `app.interrupt` has no key of its own. */
11486
11486
  function retryCancelHint() {
@@ -11498,7 +11498,7 @@ var WorkingStatusComponent = class {
11498
11498
  const messageColor = this.options.messageColor ?? ((text) => theme.fg("muted", text));
11499
11499
  if (this.options.spinner !== void 0) {
11500
11500
  const indicator = this.options.spinner ? `${spinnerColor(this.options.spinner)} ` : "";
11501
- return ["", ...new Text(`${indicator}${messageColor(message)}`, 1, 0).render(width)];
11501
+ return ["", ...new Text$1(`${indicator}${messageColor(message)}`, 1, 0).render(width)];
11502
11502
  }
11503
11503
  return new AtomicWorkingStatusComponent({
11504
11504
  frame: this.options.frame ?? atomicWorkingFrame(),
@@ -11528,16 +11528,16 @@ function renderChatSessionBody(state, width, budget) {
11528
11528
  if (state.transcript.length > 0) components.push(state.transcriptComponent);
11529
11529
  const endBlock = state.transcriptEndBlock?.();
11530
11530
  if (endBlock !== void 0) {
11531
- components.push(new Spacer(1));
11531
+ components.push(new Spacer$1(1));
11532
11532
  components.push(endBlock);
11533
11533
  }
11534
11534
  if (state.statusMessage && !state.compacting && !isChatSessionBusyStatus(state.statusMessage)) {
11535
- components.push(new Spacer(1));
11536
- components.push(new Text(state.style.dim(state.statusMessage), 2, 0));
11535
+ components.push(new Spacer$1(1));
11536
+ components.push(new Text$1(state.style.dim(state.statusMessage), 2, 0));
11537
11537
  }
11538
11538
  if (state.noticeMessage) {
11539
- components.push(new Spacer(1));
11540
- components.push(new Text(state.style.dim(state.noticeMessage), 2, 0));
11539
+ components.push(new Spacer$1(1));
11540
+ components.push(new Text$1(state.style.dim(state.noticeMessage), 2, 0));
11541
11541
  }
11542
11542
  state.bodyViewport.setVisibleRows(budget);
11543
11543
  state.bodyViewport.setComponents(components);
@@ -11571,7 +11571,7 @@ function renderChatSessionPendingMessages(state, width) {
11571
11571
  for (const message of state.compactionQueuedMessages) lines.push(...pendingMessageLine(state, width, "Queued", message.text));
11572
11572
  if (state.pendingSteeringMessages.length === 0 && state.pendingFollowUpMessages.length === 0 && state.unconfirmedQueuedMessages.length === 0 && state.compactionQueuedMessages.length === 0) return lines;
11573
11573
  const hint = state.getActionKeyDisplay?.("app.message.dequeue") ?? "alt+up";
11574
- lines.push(...new Text(state.style.dim(`↳ ${hint} to edit all queued messages`), 1, 0).render(width));
11574
+ lines.push(...new Text$1(state.style.dim(`↳ ${hint} to edit all queued messages`), 1, 0).render(width));
11575
11575
  return lines;
11576
11576
  }
11577
11577
  const transcriptTokenCaches = /* @__PURE__ */ new WeakMap();
@@ -11797,7 +11797,7 @@ function renderChatSessionEditor(state, width, focused) {
11797
11797
  const available = Math.max(1, width - 3);
11798
11798
  const value = state.inputBuffer ? state.style.text(truncateToWidth(state.inputBuffer, available)) + state.style.cursor() : disabled ? "" : state.style.cursor();
11799
11799
  const left = `${state.style.accentBold("❯")} ${value}`;
11800
- const gap = Math.max(0, width - visibleWidth(stripAnsi(left)));
11800
+ const gap = Math.max(0, width - visibleWidth$1(stripAnsi(left)));
11801
11801
  return [
11802
11802
  rule,
11803
11803
  left + " ".repeat(gap),
@@ -11832,7 +11832,7 @@ function fitsSingleLineHeaderEcho(prompt, width) {
11832
11832
  if (/[\r\n\u2028\u2029]/u.test(prompt)) return false;
11833
11833
  const displayed = taskDisplayText(prompt);
11834
11834
  if (displayed.length === 0) return false;
11835
- return HEADER_PROMPT_ECHO_PREFIX_CELLS + visibleWidth(displayed) <= width;
11835
+ return HEADER_PROMPT_ECHO_PREFIX_CELLS + visibleWidth$1(displayed) <= width;
11836
11836
  }
11837
11837
  var EchoedInitialPromptComponent = class {
11838
11838
  inner;
@@ -11902,7 +11902,7 @@ function setExpandedOverride(state, entry, expanded) {
11902
11902
  * setting; it defaults to the one the chat keeps for the entry.
11903
11903
  */
11904
11904
  function renderChatSessionEntry(state, entry, expanded = expandedOverride(state, entry)) {
11905
- if (state.extraEntries.includes(entry)) return state.renderExtraEntry?.(entry, expanded) ?? new Text("", 0, 0);
11905
+ if (state.extraEntries.includes(entry)) return state.renderExtraEntry?.(entry, expanded) ?? new Text$1("", 0, 0);
11906
11906
  if (isChatMessageEntry$1(entry)) {
11907
11907
  const isStreaming = isChatSessionStreaming(state) && state.liveChat.isStreamingAssistantEntry(entry);
11908
11908
  const options = expanded === void 0 ? chatMessageRenderOptions(state, isStreaming) : {
@@ -11918,7 +11918,7 @@ function renderChatSessionEntry(state, entry, expanded = expandedOverride(state,
11918
11918
  if (entry.kind === "user" && state.firstUserEntry === entry && echoed !== void 0 && state.firstUserEntryExactText === echoed) return new EchoedInitialPromptComponent(component, echoed);
11919
11919
  return component;
11920
11920
  }
11921
- if (!state.renderExtraEntry) return new Text("", 0, 0);
11921
+ if (!state.renderExtraEntry) return new Text$1("", 0, 0);
11922
11922
  return state.renderExtraEntry(entry, expanded);
11923
11923
  }
11924
11924
  /**
@@ -12089,7 +12089,7 @@ function renderIdentityKey(state, value) {
12089
12089
  }
12090
12090
  function pendingMessageLine(state, width, label, message) {
12091
12091
  const text = `${label}: ${message}`;
12092
- return new Text(state.style.dim(truncateToWidth(text, Math.max(1, width - 2))), 1, 0).render(width);
12092
+ return new Text$1(state.style.dim(truncateToWidth(text, Math.max(1, width - 2))), 1, 0).render(width);
12093
12093
  }
12094
12094
  /** Whether `entry` draws other rows at `width` expanded than collapsed: whether it has anything to expand. */
12095
12095
  function entryExpands(state, entry, width) {
@@ -13088,12 +13088,12 @@ const MAX_NOTE_ROWS = 6;
13088
13088
  function wrapNotes(notes, width, maxRows = MAX_NOTE_ROWS) {
13089
13089
  if (!notes) return [];
13090
13090
  const room = Math.max(1, width);
13091
- if (visibleWidth(notes) <= room) return [notes];
13091
+ if (visibleWidth$1(notes) <= room) return [notes];
13092
13092
  const rows = [];
13093
13093
  let row = "";
13094
13094
  for (const part of notes.split(" · ")) {
13095
13095
  const joined = row ? `${row} · ${part}` : part;
13096
- if (visibleWidth(joined) <= room) {
13096
+ if (visibleWidth$1(joined) <= room) {
13097
13097
  row = joined;
13098
13098
  continue;
13099
13099
  }
@@ -13267,7 +13267,7 @@ function rowModel(row, owner) {
13267
13267
  }) : "";
13268
13268
  return text.length === 0 ? NO_MODEL : {
13269
13269
  text,
13270
- width: visibleWidth(text)
13270
+ width: visibleWidth$1(text)
13271
13271
  };
13272
13272
  }
13273
13273
  /**
@@ -13292,7 +13292,7 @@ function boardModelFits(rows, width) {
13292
13292
  if (width < 100) return false;
13293
13293
  const fixed = 4 + nameColumnFor(width) + column + 2;
13294
13294
  for (const row of rows) {
13295
- const meta = visibleWidth(rowMeta(row));
13295
+ const meta = visibleWidth$1(rowMeta(row));
13296
13296
  const right = meta > 0 ? 2 + meta : 0;
13297
13297
  if (fixed + right > width || rowTask(row).length > 0 && width - fixed - right < MIN_TASK_WIDTH) return false;
13298
13298
  }
@@ -13303,13 +13303,13 @@ function boardModelFits(rows, width) {
13303
13303
  function renderBoardRow(row, selected, width, model) {
13304
13304
  const state = rowState(row);
13305
13305
  const { glyph, color } = stateGlyph(state, row.kind === "task" ? row.task.kind : row.item.kind);
13306
- const marker = selected ? theme.fg("accent", "❯ ") : " ";
13306
+ const marker = selected ? theme.fg("accent", theme.bold("∀ ")) : " ";
13307
13307
  const nameColumn = nameColumnFor(width);
13308
13308
  const modelColumn = model === void 0 ? 0 : model.column;
13309
13309
  const modelCell = model === void 0 || modelColumn === 0 ? "" : `${model.cell.text}${" ".repeat(Math.max(0, modelColumn - model.cell.width) + 2)}`;
13310
13310
  const nameWidth = nameColumn + (modelColumn > 0 ? modelColumn + 2 : 0);
13311
13311
  const name = truncateToWidth(rowName(row), nameColumn - 1);
13312
- const namePadded = name + " ".repeat(Math.max(1, nameColumn - visibleWidth(name)));
13312
+ const namePadded = name + " ".repeat(Math.max(1, nameColumn - visibleWidth$1(name)));
13313
13313
  const progress = row.kind === "item" && row.item.progress && validMetric(row.item.progress.done) && validMetric(row.item.progress.total) && row.item.progress.done <= row.item.progress.total && state !== "input" ? `${row.item.progress.done}/${row.item.progress.total}` : "";
13314
13314
  const reason = row.kind === "item" && state === "failed" && row.item.reason ? taskDisplayText(row.item.reason) : "";
13315
13315
  const title = rowTask(row);
@@ -13319,10 +13319,10 @@ function renderBoardRow(row, selected, width, model) {
13319
13319
  reason === title ? "" : reason
13320
13320
  ].filter(Boolean).join(" · ");
13321
13321
  const fullMeta = rowMeta(row);
13322
- const meta = 4 + nameWidth + 2 + visibleWidth(fullMeta) <= width ? fullMeta : "";
13323
- const fixed = 4 + nameWidth + (meta ? 2 + visibleWidth(meta) : 0);
13322
+ const meta = 4 + nameWidth + 2 + visibleWidth$1(fullMeta) <= width ? fullMeta : "";
13323
+ const fixed = 4 + nameWidth + (meta ? 2 + visibleWidth$1(meta) : 0);
13324
13324
  const taskText = truncateToWidth(task, Math.max(0, width - fixed));
13325
- const gap = Math.max(meta ? 1 : 0, width - 2 - 2 - nameWidth - visibleWidth(taskText) - visibleWidth(meta));
13325
+ const gap = Math.max(meta ? 1 : 0, width - 2 - 2 - nameWidth - visibleWidth$1(taskText) - visibleWidth$1(meta));
13326
13326
  const finished = stateGroup(state) === "done";
13327
13327
  const nameText = selected ? theme.bold(namePadded) : finished ? theme.fg("muted", namePadded) : namePadded;
13328
13328
  const modelText = modelCell ? theme.fg("dim", modelCell) : "";
@@ -13334,10 +13334,10 @@ function renderPeekCard(title, content, replyLines, width, maxLines = 8) {
13334
13334
  const inner = Math.max(1, width - 4);
13335
13335
  const border = (text) => theme.fg("borderMuted", text);
13336
13336
  const heading = ` ${truncateToWidth(title, Math.max(1, width - 8))} `;
13337
- const top = `${border("╭─")}${theme.bold(heading)}${border(`${"─".repeat(Math.max(0, width - visibleWidth(heading) - 3))}╮`)}`;
13337
+ const top = `${border("╭─")}${theme.bold(heading)}${border(`${"─".repeat(Math.max(0, width - visibleWidth$1(heading) - 3))}╮`)}`;
13338
13338
  const frame = (line) => {
13339
13339
  const text = truncateToWidth(line, inner);
13340
- return `${border("│ ")}${text}${" ".repeat(Math.max(0, inner - visibleWidth(text)))}${border(" │")}`;
13340
+ return `${border("│ ")}${text}${" ".repeat(Math.max(0, inner - visibleWidth$1(text)))}${border(" │")}`;
13341
13341
  };
13342
13342
  const body = [];
13343
13343
  if (content.question !== void 0) {
@@ -13404,7 +13404,7 @@ var TaskDetail = class {
13404
13404
  const hint = action === "cancel" || action === "input" ? keyHintIfBound(action === "cancel" ? "app.list.stop" : "app.tasks.input", taskDetailLabels[action]) : "";
13405
13405
  lines.push(hint || taskDetailLabels[action]);
13406
13406
  }
13407
- return new Text(lines.join("\n"), 0, 0).render(width);
13407
+ return new Text$1(lines.join("\n"), 0, 0).render(width);
13408
13408
  }
13409
13409
  /** Body only: viewport owners pin identity, status and actions outside scrolling content. */
13410
13410
  renderContent(width) {
@@ -13443,7 +13443,7 @@ var TaskDetail = class {
13443
13443
  }
13444
13444
  const resumeId = settledTaskResumeId(task, this.content.tasks);
13445
13445
  lines.push("", theme.fg("dim", `Owner ${taskDisplayText(task.ref.ownerId)} · Task ${taskDisplayText(task.ref.taskId)}${resumeId === void 0 ? "" : ` · Resume id ${taskDisplayText(resumeId)}`}`));
13446
- return new Text(lines.join("\n"), 0, 0).render(width);
13446
+ return new Text$1(lines.join("\n"), 0, 0).render(width);
13447
13447
  }
13448
13448
  };
13449
13449
  // dist/modes/interactive/components/task-navigation.js
@@ -13622,7 +13622,7 @@ var TaskNavigation = class {
13622
13622
  }
13623
13623
  handleInput(data, inputOwner) {
13624
13624
  if (inputOwner !== "tasks" || this.focus.kind === "composer") return false;
13625
- if (matchesKey(data, "escape")) {
13625
+ if (matchesKey$1(data, "escape")) {
13626
13626
  this.focus = this.focus.kind === "stdin" || this.focus.kind === "detail" ? { kind: "tasks" } : { kind: "composer" };
13627
13627
  return true;
13628
13628
  }
@@ -13645,12 +13645,12 @@ var TaskNavigation = class {
13645
13645
  return true;
13646
13646
  }
13647
13647
  let next = this.entries.findIndex((entry) => entry.id === this.selectedTaskId);
13648
- if (matchesKey(data, "up")) next--;
13649
- else if (matchesKey(data, "down")) next++;
13650
- else if (matchesKey(data, "home")) next = 0;
13651
- else if (matchesKey(data, "end")) next = this.entries.length - 1;
13652
- else if (matchesKey(data, "pageUp")) next -= 10;
13653
- else if (matchesKey(data, "pageDown")) next += 10;
13648
+ if (matchesKey$1(data, "up")) next--;
13649
+ else if (matchesKey$1(data, "down")) next++;
13650
+ else if (matchesKey$1(data, "home")) next = 0;
13651
+ else if (matchesKey$1(data, "end")) next = this.entries.length - 1;
13652
+ else if (matchesKey$1(data, "pageUp")) next -= 10;
13653
+ else if (matchesKey$1(data, "pageDown")) next += 10;
13654
13654
  else return false;
13655
13655
  const target = this.entries[Math.max(0, Math.min(this.entries.length - 1, next))];
13656
13656
  this.selectedTaskId = target?.id;
@@ -13951,7 +13951,7 @@ function viewedAgentCommand(text, mainCommandOrigin) {
13951
13951
  * Multi-line editor component for extensions.
13952
13952
  * Supports Ctrl+G for external editor.
13953
13953
  */
13954
- var ExtensionEditorComponent = class extends Container {
13954
+ var ExtensionEditorComponent = class extends Container$1 {
13955
13955
  editor;
13956
13956
  onSubmitCallback;
13957
13957
  onCancelCallback;
@@ -13960,7 +13960,7 @@ var ExtensionEditorComponent = class extends Container {
13960
13960
  externalEditorCommand;
13961
13961
  titleText;
13962
13962
  /** Shows external editor failures; renders nothing while empty. */
13963
- externalEditorStatus = new Text("", 1, 0);
13963
+ externalEditorStatus = new Text$1("", 1, 0);
13964
13964
  _focused = false;
13965
13965
  get focused() {
13966
13966
  return this._focused;
@@ -13983,10 +13983,10 @@ var ExtensionEditorComponent = class extends Container {
13983
13983
  this.onSubmitCallback = onSubmit;
13984
13984
  this.onCancelCallback = onCancel;
13985
13985
  this.addChild(new DynamicBorder());
13986
- this.addChild(new Spacer(1));
13987
- this.titleText = new Text(theme.fg("accent", title), 1, 0);
13986
+ this.addChild(new Spacer$1(1));
13987
+ this.titleText = new Text$1(theme.fg("accent", title), 1, 0);
13988
13988
  this.addChild(this.titleText);
13989
- this.addChild(new Spacer(1));
13989
+ this.addChild(new Spacer$1(1));
13990
13990
  this.editor = new Editor(tui, getEditorTheme(), options);
13991
13991
  if (prefill) this.editor.setText(prefill);
13992
13992
  this.editor.onSubmit = (text) => {
@@ -13994,10 +13994,10 @@ var ExtensionEditorComponent = class extends Container {
13994
13994
  };
13995
13995
  this.addChild(this.editor);
13996
13996
  this.addChild(this.externalEditorStatus);
13997
- this.addChild(new Spacer(1));
13997
+ this.addChild(new Spacer$1(1));
13998
13998
  const hint = keyHint("tui.select.confirm", "submit") + " " + keyHint("tui.input.newLine", "newline") + " " + keyHint("tui.select.cancel", "cancel") + ` ${keyHint("app.editor.external", "external editor")}`;
13999
- this.addChild(new Text(hint, 1, 0));
14000
- this.addChild(new Spacer(1));
13999
+ this.addChild(new Text$1(hint, 1, 0));
14000
+ this.addChild(new Spacer$1(1));
14001
14001
  this.addChild(new DynamicBorder());
14002
14002
  }
14003
14003
  handleInput(keyData) {
@@ -14047,7 +14047,7 @@ const fallbackTerminal = {
14047
14047
  setProgress: () => {},
14048
14048
  setProgramStatus: () => {}
14049
14049
  };
14050
- var HeldPromptTui = class extends TuiMainScreen {
14050
+ var HeldPromptTui = class extends TuiMainScreen$1 {
14051
14051
  getEnv;
14052
14052
  constructor(getEnv) {
14053
14053
  super({
@@ -14288,14 +14288,14 @@ function unavailableToolRenderer(name) {
14288
14288
  status: "warning",
14289
14289
  title: name,
14290
14290
  args: "…",
14291
- details: new Text("Tool renderer unavailable", 0, 0),
14291
+ details: new Text$1("Tool renderer unavailable", 0, 0),
14292
14292
  outputPad: context.outputPad
14293
14293
  }),
14294
14294
  renderResult: (_result, _options, _theme, context) => new ToolBlock({
14295
14295
  status: "warning",
14296
14296
  title: name,
14297
14297
  args: "…",
14298
- details: new Text("Tool renderer unavailable", 0, 0),
14298
+ details: new Text$1("Tool renderer unavailable", 0, 0),
14299
14299
  outputPad: context.outputPad
14300
14300
  })
14301
14301
  };
@@ -14465,7 +14465,7 @@ const VIEW_KEY_ACTIONS = [
14465
14465
  ];
14466
14466
  /** Printable text, Enter, Backspace or Delete: keys that type into or send the prompt. */
14467
14467
  function isTyping(data) {
14468
- if (matchesKey(data, "enter") || matchesKey(data, "backspace") || matchesKey(data, "delete")) return true;
14468
+ if (matchesKey$1(data, "enter") || matchesKey$1(data, "backspace") || matchesKey$1(data, "delete")) return true;
14469
14469
  return [...data].every((ch) => ch >= " " && ch !== "");
14470
14470
  }
14471
14471
  const finishAdjacent = Symbol();
@@ -14830,7 +14830,7 @@ var TaskAgentTranscriptPage = class {
14830
14830
  const line = keybindings.matches(data, "tui.altScreen.lineUp") ? -1 : keybindings.matches(data, "tui.altScreen.lineDown") ? 1 : 0;
14831
14831
  if (keybindings.matches(data, "tui.altScreen.pageUp")) data = PAGE_UP;
14832
14832
  else if (keybindings.matches(data, "tui.altScreen.pageDown")) data = PAGE_DOWN;
14833
- if (data !== "atomic-ui://transcript/jump-to-end" && line === 0 && !parseWheelReport(data) && !matchesKey(data, "pageUp") && !matchesKey(data, "pageDown") && !VIEW_KEY_ACTIONS.some((action) => keybindings.matches(data, action))) return false;
14833
+ if (data !== "atomic-ui://transcript/jump-to-end" && line === 0 && !parseWheelReport(data) && !matchesKey$1(data, "pageUp") && !matchesKey$1(data, "pageDown") && !VIEW_KEY_ACTIONS.some((action) => keybindings.matches(data, action))) return false;
14834
14834
  if (line !== 0) {
14835
14835
  this.failedCursor = void 0;
14836
14836
  if (line < 0) {
@@ -14853,14 +14853,14 @@ var TaskAgentTranscriptPage = class {
14853
14853
  return true;
14854
14854
  }
14855
14855
  const keybindings = keybindingsOf(this.env.keybindings);
14856
- if (this.failedCursor && (parseWheelReport(data) || matchesKey(data, "pageUp") || matchesKey(data, "pageDown") || keybindings.matches(data, "tui.altScreen.top") || keybindings.matches(data, "tui.altScreen.bottom"))) this.failedCursor = void 0;
14856
+ if (this.failedCursor && (parseWheelReport(data) || matchesKey$1(data, "pageUp") || matchesKey$1(data, "pageDown") || keybindings.matches(data, "tui.altScreen.top") || keybindings.matches(data, "tui.altScreen.bottom"))) this.failedCursor = void 0;
14857
14857
  if (!this.chat.hasTaskInspector && this.chat.hasTransientModal) {
14858
14858
  const handled = this.chat.handleInput(data);
14859
14859
  this.requestRender();
14860
14860
  return handled;
14861
14861
  }
14862
14862
  if (!this.chat.hasTaskInspector && keybindings.matches(data, "app.agents.focus") && (!this.hasDraft() || isHintActivation())) return this.hasTasks() ? this.chat.openTasks() : true;
14863
- if (matchesKey(data, "ctrl+t") && keybindings.matches(data, "app.thinking.toggle")) return false;
14863
+ if (matchesKey$1(data, "ctrl+t") && keybindings.matches(data, "app.thinking.toggle")) return false;
14864
14864
  if (keybindings.matches(data, "app.tools.expand")) {
14865
14865
  if (this.env.setToolsExpanded === void 0) return false;
14866
14866
  this.env.setToolsExpanded(this.env.getToolsExpanded?.() !== true);
@@ -14870,7 +14870,7 @@ var TaskAgentTranscriptPage = class {
14870
14870
  }
14871
14871
  const form = this.chat.hasTaskInspector ? void 0 : this.heldForm();
14872
14872
  if (form !== void 0) {
14873
- if (!(this.capturesPageScroll() && (matchesKey(data, "pageUp") || matchesKey(data, "pageDown"))) && this.chat.handleScrollInput(data)) {
14873
+ if (!(this.capturesPageScroll() && (matchesKey$1(data, "pageUp") || matchesKey$1(data, "pageDown"))) && this.chat.handleScrollInput(data)) {
14874
14874
  this.requestRender();
14875
14875
  return true;
14876
14876
  }
@@ -14880,12 +14880,12 @@ var TaskAgentTranscriptPage = class {
14880
14880
  }
14881
14881
  if (!this.chat.hasTaskInspector) {
14882
14882
  if (keybindings.matches(data, "tui.altScreen.top")) this.goToFirst = true;
14883
- else if (parseWheelReport(data) || matchesKey(data, "pageUp") || matchesKey(data, "pageDown") || keybindings.matches(data, "tui.altScreen.halfPageUp") || keybindings.matches(data, "tui.altScreen.halfPageDown") || keybindings.matches(data, "tui.altScreen.previousPrompt") || keybindings.matches(data, "tui.altScreen.nextPrompt")) this.goToFirst = false;
14883
+ else if (parseWheelReport(data) || matchesKey$1(data, "pageUp") || matchesKey$1(data, "pageDown") || keybindings.matches(data, "tui.altScreen.halfPageUp") || keybindings.matches(data, "tui.altScreen.halfPageDown") || keybindings.matches(data, "tui.altScreen.previousPrompt") || keybindings.matches(data, "tui.altScreen.nextPrompt")) this.goToFirst = false;
14884
14884
  }
14885
- if (!this.chat.hasTaskInspector && (keybindings.matches(data, "tui.altScreen.top") || keybindings.matches(data, "tui.altScreen.halfPageUp") || keybindings.matches(data, "tui.altScreen.previousPrompt") || matchesKey(data, "pageUp") || parseWheelReport(data)?.direction === -1)) {
14885
+ if (!this.chat.hasTaskInspector && (keybindings.matches(data, "tui.altScreen.top") || keybindings.matches(data, "tui.altScreen.halfPageUp") || keybindings.matches(data, "tui.altScreen.previousPrompt") || matchesKey$1(data, "pageUp") || parseWheelReport(data)?.direction === -1)) {
14886
14886
  this.olderIntent = true;
14887
14887
  this.travel = "older";
14888
- } else if (!this.chat.hasTaskInspector && (keybindings.matches(data, "tui.altScreen.halfPageDown") || keybindings.matches(data, "tui.altScreen.nextPrompt") || matchesKey(data, "pageDown") || parseWheelReport(data)?.direction === 1)) this.travel = "newer";
14888
+ } else if (!this.chat.hasTaskInspector && (keybindings.matches(data, "tui.altScreen.halfPageDown") || keybindings.matches(data, "tui.altScreen.nextPrompt") || matchesKey$1(data, "pageDown") || parseWheelReport(data)?.direction === 1)) this.travel = "newer";
14889
14889
  if (!this.chat.hasTaskInspector && (this.newerCursor !== void 0 || this.savedPages.length > 0 || this.loadingEarlier) && keybindings.matches(data, "tui.altScreen.bottom")) {
14890
14890
  this.goToLatestSavedPage();
14891
14891
  return true;
@@ -15563,7 +15563,7 @@ var TaskCommandOutputPage = class TaskCommandOutputPage {
15563
15563
  requestRender;
15564
15564
  scrollbarMode;
15565
15565
  viewport;
15566
- output = new Text("", 0, 0);
15566
+ output = new Text$1("", 0, 0);
15567
15567
  loadState = "loading";
15568
15568
  loading = false;
15569
15569
  reloadPending = false;
@@ -15615,7 +15615,7 @@ var TaskCommandOutputPage = class TaskCommandOutputPage {
15615
15615
  const text = page.ok ? page.value.text : page.error.message;
15616
15616
  const sanitized = (text.endsWith("\n") && text.length > 1 ? text.replace(/\r?\n$/, "") : text).split("\n").map(taskDisplayText).join("\n");
15617
15617
  this.loadState = page.ok ? sanitized === "" ? "empty" : "output" : "error";
15618
- this.output = new Text(sanitized || "No output available", 0, 0);
15618
+ this.output = new Text$1(sanitized || "No output available", 0, 0);
15619
15619
  this.viewport.setComponents([this.output]);
15620
15620
  this.status = count > tail ? "Earlier output omitted · showing retained 8 KiB tail" : "Retained shell output";
15621
15621
  } catch (error) {
@@ -15672,6 +15672,9 @@ var TaskCommandOutputPage = class TaskCommandOutputPage {
15672
15672
  };
15673
15673
  // dist/modes/interactive/components/task-inspector.js
15674
15674
  const DETAIL_WHEEL_ROWS = 4;
15675
+ function isNonWheelMouseReport(data) {
15676
+ return parseWheelReport(data) === void 0 && (/^\x1b\[<\d+;\d+;\d+[mM]$/.test(data) || data.startsWith("\x1B[M"));
15677
+ }
15675
15678
  function samePromptChoices(a, b) {
15676
15679
  if (a === b) return true;
15677
15680
  if (a === void 0 || b === void 0 || a.length !== b.length) return false;
@@ -15879,7 +15882,7 @@ function formatShellMetaRows(label, value, maxLines, contentWidth, lead, styleVa
15879
15882
  }
15880
15883
  /** The host owns thinking display; only its default physical key, as a remap may reuse an editor key. */
15881
15884
  function isHostThinkingToggle(data) {
15882
- return matchesKey(data, "ctrl+t") && getKeybindings().matches(data, "app.thinking.toggle");
15885
+ return matchesKey$1(data, "ctrl+t") && getKeybindings().matches(data, "app.thinking.toggle");
15883
15886
  }
15884
15887
  /** Focused view only. The task source and original session remain the authorities. */
15885
15888
  var TaskInspector = class {
@@ -15914,6 +15917,8 @@ var TaskInspector = class {
15914
15917
  transcript;
15915
15918
  /** The frame row the open transcript started on in the last `renderViewport`, while one was drawn. */
15916
15919
  transcriptTop;
15920
+ /** What the last board frame drew on each rendered row, for single-click opening and stale-click guards. */
15921
+ paintedBoard;
15917
15922
  status = "";
15918
15923
  /** A failure shown once on the task pages, until the next key. */
15919
15924
  failureNotice = "";
@@ -16395,6 +16400,7 @@ var TaskInspector = class {
16395
16400
  }
16396
16401
  dispose() {
16397
16402
  this.disposed = true;
16403
+ this.paintedBoard = void 0;
16398
16404
  this.detailRead?.abort();
16399
16405
  this.detailRead = void 0;
16400
16406
  this.releaseBoardSource?.();
@@ -16600,11 +16606,16 @@ var TaskInspector = class {
16600
16606
  }
16601
16607
  if (current()) this.requestRender();
16602
16608
  }
16603
- /** A click on any row of a block in an open transcript expands or collapses that block. */
16609
+ /**
16610
+ * A single click on a `/tasks` board row opens it (matching `Enter`); on an open transcript, it expands or
16611
+ * collapses the clicked block.
16612
+ */
16604
16613
  handleMouse(event) {
16614
+ if (this.disposed || this.helpOpen) return void 0;
16615
+ if (this.navigation.focus.kind === "tasks") return this.handleBoardClick(event);
16605
16616
  const transcript = this.transcript;
16606
16617
  const top = this.transcriptTop;
16607
- if (transcript?.handleMouse === void 0 || top === void 0 || this.helpOpen) return void 0;
16618
+ if (transcript?.handleMouse === void 0 || top === void 0) return void 0;
16608
16619
  if (this.navigation.focus.kind !== "detail") return void 0;
16609
16620
  const result = transcript.handleMouse({
16610
16621
  ...event,
@@ -16614,20 +16625,93 @@ var TaskInspector = class {
16614
16625
  this.requestRender();
16615
16626
  return repaintAfterSingleClick(result, () => this.requestRender());
16616
16627
  }
16628
+ handleBoardClick(event) {
16629
+ if (!isSingleLeftClick(event) || this.sending || this.paintedBoard === void 0) return void 0;
16630
+ const index = Math.floor(event.y);
16631
+ if (index < 0 || index >= this.paintedBoard.rowsByLine.length) return void 0;
16632
+ const paintedId = this.paintedBoard.rowsByLine[index];
16633
+ if (paintedId === void 0) return void 0;
16634
+ const paintedRow = this.paintedBoard.rowsById.get(paintedId);
16635
+ if (paintedRow === void 0) return void 0;
16636
+ if (this.boardStale) this.refreshOrder();
16637
+ let target = this.rowsById.get(paintedId);
16638
+ if (target === void 0 && paintedRow.kind === "task") {
16639
+ const stableKey = taskStableKey(paintedRow.task);
16640
+ const entry = this.navigationEntries.find((candidate) => candidate.key === stableKey);
16641
+ if (entry !== void 0) target = this.rowsById.get(entry.id);
16642
+ }
16643
+ if (target === void 0) {
16644
+ this.requestRender();
16645
+ return { handled: true };
16646
+ }
16647
+ this.failureNotice = "";
16648
+ this.status = "";
16649
+ this.navigation.stopConfirm.reset();
16650
+ this.navigation.finishedWhileArmed = void 0;
16651
+ this.itemFinishedWhileArmed = void 0;
16652
+ this.itemFinishedAcknowledged = false;
16653
+ if (this.filtering) this.filtering = false;
16654
+ if (this.peekId !== void 0) this.closePeek();
16655
+ this.selectionChosen = true;
16656
+ this.navigation.select(target.id);
16657
+ if (target.kind === "item") {
16658
+ if (!this.openBoardItem(target)) this.requestRender();
16659
+ } else this.openBoardTask(target.task);
16660
+ return { handled: true };
16661
+ }
16662
+ openBoardTask(task) {
16663
+ this.navigation.focus = { kind: "detail" };
16664
+ if (this.showAgent(task)) return;
16665
+ this.enterAwayView(task);
16666
+ this.chatFrom = "list";
16667
+ this.detailGeneration++;
16668
+ this.openTranscript();
16669
+ if (this.transcript === void 0) {
16670
+ this.loadDetail();
16671
+ this.requestRender();
16672
+ }
16673
+ }
16674
+ openBoardItem(row) {
16675
+ if (this.boardSource?.open) {
16676
+ const reopen = this.reopen;
16677
+ const anchor = this.captureListAnchor(row.id);
16678
+ try {
16679
+ if (this.boardSource.open(row.id, reopen ? { onReturn: () => reopen(row.id, anchor) } : void 0) === false) this.failureNotice = `Could not open ${rowName(row)}.`;
16680
+ else {
16681
+ this.returnAnchor = anchor;
16682
+ this.closeReason = "navigated-item";
16683
+ this.close();
16684
+ return true;
16685
+ }
16686
+ } catch (error) {
16687
+ const reason = taskDisplayText(error instanceof Error ? error.message : String(error));
16688
+ this.failureNotice = reason ? `Could not open ${rowName(row)}: ${reason}` : `Could not open ${rowName(row)}.`;
16689
+ }
16690
+ } else this.status = "This item can't be opened from here.";
16691
+ return false;
16692
+ }
16617
16693
  /** Ctrl+O was pressed: the open transcript's blocks follow the tool-output setting again. */
16618
16694
  toolOutputToggled() {
16619
16695
  this.transcript?.toolOutputToggled?.();
16620
16696
  }
16621
- /** What the last frame drew on `row` of the open transcript, named by the transcript; undefined elsewhere. */
16697
+ /** What the last frame drew on `row`: a `/tasks` board row id or the open transcript's row key; undefined elsewhere. */
16622
16698
  paintedRowKey(row) {
16699
+ if (this.disposed || this.helpOpen) return void 0;
16700
+ if (this.navigation.focus.kind === "tasks") {
16701
+ if (this.sending || this.paintedBoard === void 0) return void 0;
16702
+ const index = Math.floor(row);
16703
+ const rowId = index >= 0 ? this.paintedBoard.rowsByLine[index] : void 0;
16704
+ return rowId === void 0 ? void 0 : `board:${rowId}`;
16705
+ }
16623
16706
  const transcript = this.transcript;
16624
16707
  const top = this.transcriptTop;
16625
- if (transcript?.paintedRowKey === void 0 || top === void 0 || this.helpOpen) return void 0;
16708
+ if (transcript?.paintedRowKey === void 0 || top === void 0) return void 0;
16626
16709
  if (this.navigation.focus.kind !== "detail") return void 0;
16627
16710
  return transcript.paintedRowKey(row - top);
16628
16711
  }
16629
16712
  /** Every key belongs to the inspector except the host's thinking toggle when it leaves that alone. */
16630
16713
  handleInput(data) {
16714
+ if (isNonWheelMouseReport(data)) return true;
16631
16715
  const keys = getKeybindings();
16632
16716
  const stopKey = keys.matches(data, "app.list.stop");
16633
16717
  const selectionAction = stopKey || keys.matches(data, "app.list.open") || keys.matches(data, "app.list.peek") || keys.matches(data, "app.tasks.input") || keys.matches(data, "app.tasks.openWaited");
@@ -16635,7 +16719,7 @@ var TaskInspector = class {
16635
16719
  const selectedBeforeRefresh = this.navigation.selectedId;
16636
16720
  const peekRow = this.peekId === void 0 ? void 0 : this.selectedRow();
16637
16721
  const replyingInPeek = this.navigation.focus.kind === "tasks" && peekRow !== void 0 && peekRow.id === this.peekId && this.peekReplies(peekRow);
16638
- if (this.boardStale && this.navigation.focus.kind === "tasks" && (this.peekId === void 0 || !replyingInPeek && stopKey || matchesKey(data, "up") || matchesKey(data, "down") || parseWheelReport(data) !== void 0)) this.refreshOrder();
16722
+ if (this.boardStale && this.navigation.focus.kind === "tasks" && (this.peekId === void 0 || !replyingInPeek && stopKey || matchesKey$1(data, "up") || matchesKey$1(data, "down") || parseWheelReport(data) !== void 0)) this.refreshOrder();
16639
16723
  this.selectionChosen = true;
16640
16724
  if (selectionAction && this.navigation.focus.kind === "tasks" && !this.filtering && !replyingInPeek && (this.navigation.selectedId !== selectedBeforeRefresh || armedBeforeRefresh !== void 0 && this.navigation.selectedId !== armedBeforeRefresh)) {
16641
16725
  this.navigation.stopConfirm.reset();
@@ -16646,7 +16730,7 @@ var TaskInspector = class {
16646
16730
  }
16647
16731
  route(data) {
16648
16732
  if (this.sending && this.navigation.focus.kind === "tasks") {
16649
- if (matchesKey(data, "escape") || getKeybindings().matches(data, "app.nav.back")) {
16733
+ if (matchesKey$1(data, "escape") || getKeybindings().matches(data, "app.nav.back")) {
16650
16734
  this.navigation.focus = { kind: "composer" };
16651
16735
  this.close();
16652
16736
  }
@@ -16659,7 +16743,7 @@ var TaskInspector = class {
16659
16743
  this.itemFinishedAcknowledged = false;
16660
16744
  }
16661
16745
  if (this.helpOpen) {
16662
- if (matchesKey(data, "escape") || isNavHelpKey(getKeybindings(), data)) this.helpOpen = false;
16746
+ if (matchesKey$1(data, "escape") || isNavHelpKey(getKeybindings(), data)) this.helpOpen = false;
16663
16747
  this.requestRender();
16664
16748
  return true;
16665
16749
  }
@@ -16684,7 +16768,7 @@ var TaskInspector = class {
16684
16768
  if (/^\x1b\[<\d+;\d+;\d+[mM]$/.test(data) || data.startsWith("\x1B[M")) return true;
16685
16769
  const focus = this.navigation.focus;
16686
16770
  if (focus.kind === "stdin") {
16687
- if (matchesKey(data, "escape")) return true;
16771
+ if (matchesKey$1(data, "escape")) return true;
16688
16772
  if (getKeybindings().matches(data, "app.nav.back") && (this.input.getCursor() === 0 || isHintActivation())) {
16689
16773
  this.returnToList();
16690
16774
  this.status = "";
@@ -16701,7 +16785,7 @@ var TaskInspector = class {
16701
16785
  this.requestRender();
16702
16786
  return true;
16703
16787
  }
16704
- if (matchesKey(data, "escape") || getKeybindings().matches(data, "app.nav.back") && !this.configuredTaskKey(data)) {
16788
+ if (matchesKey$1(data, "escape") || getKeybindings().matches(data, "app.nav.back") && !this.configuredTaskKey(data)) {
16705
16789
  if (focus.kind === "detail") this.returnToList();
16706
16790
  else {
16707
16791
  this.navigation.handleInput("\x1B", "tasks");
@@ -16730,21 +16814,21 @@ var TaskInspector = class {
16730
16814
  this.requestRender();
16731
16815
  return true;
16732
16816
  }
16733
- if (matchesKey(data, "pageUp") || matchesKey(data, "pageDown")) {
16734
- this.scroll = Math.max(0, this.scroll + (matchesKey(data, "pageUp") ? -5 : 5));
16817
+ if (matchesKey$1(data, "pageUp") || matchesKey$1(data, "pageDown")) {
16818
+ this.scroll = Math.max(0, this.scroll + (matchesKey$1(data, "pageUp") ? -5 : 5));
16735
16819
  this.requestRender();
16736
16820
  return true;
16737
16821
  }
16738
- if (matchesKey(data, "up")) this.actionIndex = Math.max(0, this.actionIndex - 1);
16739
- else if (matchesKey(data, "down")) this.actionIndex = Math.min(actions.length - 1, this.actionIndex + 1);
16822
+ if (matchesKey$1(data, "up")) this.actionIndex = Math.max(0, this.actionIndex - 1);
16823
+ else if (matchesKey$1(data, "down")) this.actionIndex = Math.min(actions.length - 1, this.actionIndex + 1);
16740
16824
  else if (getKeybindings().matches(data, "app.list.open")) this.navigation.activate(actions[Math.min(this.actionIndex, actions.length - 1)]);
16741
16825
  else {
16742
- if (this.boardStale && (matchesKey(data, "home") || matchesKey(data, "end"))) this.refreshOrder();
16826
+ if (this.boardStale && (matchesKey$1(data, "home") || matchesKey$1(data, "end"))) this.refreshOrder();
16743
16827
  if (!this.navigation.handleInput(data, "tasks")) return false;
16744
16828
  syncAwayAnchor();
16745
16829
  }
16746
16830
  } else {
16747
- if (this.boardStale && (matchesKey(data, "home") || matchesKey(data, "end"))) this.refreshOrder();
16831
+ if (this.boardStale && (matchesKey$1(data, "home") || matchesKey$1(data, "end"))) this.refreshOrder();
16748
16832
  if (!this.navigation.handleInput(data, "tasks")) return false;
16749
16833
  syncAwayAnchor();
16750
16834
  }
@@ -16809,14 +16893,14 @@ var TaskInspector = class {
16809
16893
  this.itemFinishedWhileArmed = void 0;
16810
16894
  this.itemFinishedAcknowledged = false;
16811
16895
  }
16812
- if (matchesKey(data, "escape")) {
16896
+ if (matchesKey$1(data, "escape")) {
16813
16897
  if (transcript.takesEscape?.() === true) return transcript.handleInput(data);
16814
16898
  if (transcript.interruptible()) this.interruptTranscript(transcript);
16815
16899
  this.requestRender();
16816
16900
  return true;
16817
16901
  }
16818
16902
  if (keys.matches(data, "app.tasks.openWaited") && this.waitedShell === void 0 && this.openWaitedShell()) return true;
16819
- if (!matchesKey(data, "escape") && keys.matches(data, "app.nav.back") && (transcript.cursorAtStart() || isHintActivation())) {
16903
+ if (!matchesKey$1(data, "escape") && keys.matches(data, "app.nav.back") && (transcript.cursorAtStart() || isHintActivation())) {
16820
16904
  this.navigation.stopConfirm.reset();
16821
16905
  if (this.waitedShell !== void 0) {
16822
16906
  this.leaveWaitedShell();
@@ -16849,14 +16933,14 @@ var TaskInspector = class {
16849
16933
  if (this.sending) return true;
16850
16934
  if (this.filtering) {
16851
16935
  const previousFilter = this.filter;
16852
- if (matchesKey(data, "escape")) {
16936
+ if (matchesKey$1(data, "escape")) {
16853
16937
  this.filtering = false;
16854
16938
  this.filter = "";
16855
16939
  this.filterInput.setValue("");
16856
- } else if (matchesKey(data, "enter") || matchesKey(data, "down") || matchesKey(data, "up")) {
16940
+ } else if (matchesKey$1(data, "enter") || matchesKey$1(data, "down") || matchesKey$1(data, "up")) {
16857
16941
  this.filtering = false;
16858
- if (matchesKey(data, "up") || matchesKey(data, "down")) this.navigation.handleInput(data, "tasks");
16859
- } else if (matchesKey(data, "backspace") && this.filterInput.getValue() === "") this.filtering = false;
16942
+ if (matchesKey$1(data, "up") || matchesKey$1(data, "down")) this.navigation.handleInput(data, "tasks");
16943
+ } else if (matchesKey$1(data, "backspace") && this.filterInput.getValue() === "") this.filtering = false;
16860
16944
  else {
16861
16945
  this.filterInput.handleInput(data);
16862
16946
  this.filter = this.filterInput.getValue();
@@ -16864,11 +16948,11 @@ var TaskInspector = class {
16864
16948
  if (this.filter !== previousFilter || this.boardStale) this.refreshOrder();
16865
16949
  return true;
16866
16950
  }
16867
- if (matchesKey(data, "enter") && Date.now() - this.sentAt < 300) return true;
16951
+ if (matchesKey$1(data, "enter") && Date.now() - this.sentAt < 300) return true;
16868
16952
  const row = this.selectedRow();
16869
16953
  if (this.peekId !== void 0 && row?.id === this.peekId) {
16870
16954
  const replying = this.peekReplies(row);
16871
- if (matchesKey(data, "escape") || !replying && keys.matches(data, "app.nav.back") && !this.configuredTaskKey(data)) {
16955
+ if (matchesKey$1(data, "escape") || !replying && keys.matches(data, "app.nav.back") && !this.configuredTaskKey(data)) {
16872
16956
  this.closePeek();
16873
16957
  return true;
16874
16958
  }
@@ -16881,12 +16965,12 @@ var TaskInspector = class {
16881
16965
  this.closePeek();
16882
16966
  return true;
16883
16967
  }
16884
- if (row.kind === "task" && this.reply.getValue().trim() === "" && (matchesKey(data, "enter") || keys.matches(data, "app.list.open"))) {
16968
+ if (row.kind === "task" && this.reply.getValue().trim() === "" && (matchesKey$1(data, "enter") || keys.matches(data, "app.list.open"))) {
16885
16969
  this.closePeek();
16886
16970
  this.openTaskDetail();
16887
16971
  return true;
16888
16972
  }
16889
- if (matchesKey(data, "enter")) {
16973
+ if (matchesKey$1(data, "enter")) {
16890
16974
  if (!this.sending) this.sendReply(row);
16891
16975
  return true;
16892
16976
  }
@@ -16905,13 +16989,13 @@ var TaskInspector = class {
16905
16989
  return true;
16906
16990
  }
16907
16991
  }
16908
- if (!matchesKey(data, "up") && !matchesKey(data, "down")) {
16992
+ if (!matchesKey$1(data, "up") && !matchesKey$1(data, "down")) {
16909
16993
  this.handleReplyInput(row.id, data);
16910
16994
  return true;
16911
16995
  }
16912
16996
  }
16913
- if (matchesKey(data, "up") || matchesKey(data, "down")) this.closePeek();
16914
- else if (row.kind === "task" && (matchesKey(data, "enter") || keys.matches(data, "app.list.open"))) {
16997
+ if (matchesKey$1(data, "up") || matchesKey$1(data, "down")) this.closePeek();
16998
+ else if (row.kind === "task" && (matchesKey$1(data, "enter") || keys.matches(data, "app.list.open"))) {
16915
16999
  this.closePeek();
16916
17000
  if (row.task.attention.kind === "input-needed") return false;
16917
17001
  this.openTaskDetail();
@@ -16939,21 +17023,7 @@ var TaskInspector = class {
16939
17023
  }
16940
17024
  if (row?.kind !== "item") return false;
16941
17025
  if (keys.matches(data, "app.list.open")) {
16942
- if (this.boardSource?.open) {
16943
- const reopen = this.reopen;
16944
- const anchor = this.captureListAnchor(row.id);
16945
- try {
16946
- if (this.boardSource.open(row.id, reopen ? { onReturn: () => reopen(row.id, anchor) } : void 0) === false) this.failureNotice = `Could not open ${rowName(row)}.`;
16947
- else {
16948
- this.returnAnchor = anchor;
16949
- this.closeReason = "navigated-item";
16950
- this.close();
16951
- }
16952
- } catch (error) {
16953
- const reason = taskDisplayText(error instanceof Error ? error.message : String(error));
16954
- this.failureNotice = reason ? `Could not open ${rowName(row)}: ${reason}` : `Could not open ${rowName(row)}.`;
16955
- }
16956
- } else this.status = "This item can't be opened from here.";
17026
+ this.openBoardItem(row);
16957
17027
  return true;
16958
17028
  }
16959
17029
  if (keys.matches(data, "app.list.stop")) {
@@ -17369,7 +17439,7 @@ var TaskInspector = class {
17369
17439
  const bottom = `${lead}${border(`╰${"─".repeat(Math.max(0, boxWidth - 2))}╯`)}`;
17370
17440
  const framedRows = bodyLines.map((line) => {
17371
17441
  const clipped = truncateToWidth(line, innerWidth, "");
17372
- const padRight = " ".repeat(Math.max(0, innerWidth - visibleWidth(clipped)));
17442
+ const padRight = " ".repeat(Math.max(0, innerWidth - visibleWidth$1(clipped)));
17373
17443
  return fitWidth(`${lead}${border("│ ")}${clipped}${padRight}${border(" │")}`);
17374
17444
  });
17375
17445
  return [
@@ -17412,12 +17482,12 @@ var TaskInspector = class {
17412
17482
  const task = selected?.kind === "agent" ? latestSubagentAttempt(this.store.tasks, selected.ref.taskId) ?? selected : selected;
17413
17483
  const style = themedNavKeyStyle();
17414
17484
  const baseKeys = getKeybindings();
17415
- const backKeys = baseKeys.getKeys("app.nav.back").filter((key) => !matchesKey("\x1B", key)).map(navKeyText).join("/");
17485
+ const backKeys = baseKeys.getKeys("app.nav.back").filter((key) => !matchesKey$1("\x1B", key)).map(navKeyText).join("/");
17416
17486
  const chatKeybindings = {
17417
17487
  matches: (data, action) => baseKeys.matches(data, action),
17418
17488
  getKeys: (action) => {
17419
17489
  const resolved = baseKeys.getKeys(action);
17420
- return action === "app.interrupt" ? resolved : resolved.filter((key) => key !== "esc" && key !== "escape" && !matchesKey("\x1B", key));
17490
+ return action === "app.interrupt" ? resolved : resolved.filter((key) => key !== "esc" && key !== "escape" && !matchesKey$1("\x1B", key));
17421
17491
  }
17422
17492
  };
17423
17493
  const waitingAgent = waitedShell === void 0 ? void 0 : this.selected();
@@ -17481,15 +17551,23 @@ var TaskInspector = class {
17481
17551
  ].slice(0, Math.max(1, budget));
17482
17552
  }
17483
17553
  renderViewport(width, budget) {
17484
- if (this.transcript && this.navigation.focus.kind === "detail") return this.renderTranscriptPage(width, budget, this.transcript);
17554
+ if (this.transcript && this.navigation.focus.kind === "detail") {
17555
+ this.paintedBoard = void 0;
17556
+ return this.renderTranscriptPage(width, budget, this.transcript);
17557
+ }
17485
17558
  this.transcriptTop = void 0;
17486
17559
  const style = themedNavKeyStyle();
17487
17560
  if (this.helpOpen) {
17561
+ this.paintedBoard = void 0;
17488
17562
  const detailOpen = this.navigation.focus.kind === "detail";
17489
17563
  return renderNavKeyOverlay(detailOpen ? "keys · task" : "keys · tasks", detailOpen ? detailKeys() : listKeys(), width, style, getKeybindings()).slice(-Math.max(1, budget));
17490
17564
  }
17491
- if (this.navigation.focus.kind === "stdin") return this.renderInputSheet(width, budget);
17565
+ if (this.navigation.focus.kind === "stdin") {
17566
+ this.paintedBoard = void 0;
17567
+ return this.renderInputSheet(width, budget);
17568
+ }
17492
17569
  if (this.navigation.focus.kind !== "detail") return this.renderBoard(width, budget);
17570
+ this.paintedBoard = void 0;
17493
17571
  const framed = width >= 20 && budget >= 7;
17494
17572
  const inner = Math.max(1, width - (framed ? 4 : 0));
17495
17573
  const current = this.selected();
@@ -17526,10 +17604,10 @@ var TaskInspector = class {
17526
17604
  const border = (text) => theme.fg("borderMuted", text);
17527
17605
  const frameRow = (line) => {
17528
17606
  const text = truncateToWidth(line, inner);
17529
- return border("│ ") + text + " ".repeat(Math.max(0, inner - visibleWidth(text))) + border(" │");
17607
+ return border("│ ") + text + " ".repeat(Math.max(0, inner - visibleWidth$1(text))) + border(" │");
17530
17608
  };
17531
17609
  return [
17532
- border("╭─") + theme.bold(heading) + border(`${"─".repeat(Math.max(0, width - visibleWidth(heading) - 3))}╮`),
17610
+ border("╭─") + theme.bold(heading) + border(`${"─".repeat(Math.max(0, width - visibleWidth$1(heading) - 3))}╮`),
17533
17611
  frameRow(current ? taskDetailSummary(current) : ""),
17534
17612
  ...view.map(frameRow),
17535
17613
  ...actionRow.map(frameRow),
@@ -17759,11 +17837,25 @@ var TaskInspector = class {
17759
17837
  } else if (selected.kind === "task" && previousSelectedPrompt !== void 0 && this.peekReplies(selected)) this.paintedPrompts.set(selected.id, previousSelectedPrompt);
17760
17838
  }
17761
17839
  this.navigation.paint(drawnTasks);
17840
+ const windowRowIds = painted.map((line) => typeof line === "string" ? void 0 : line.id);
17762
17841
  const renderedWindow = painted.map((line) => clip(typeof line === "string" ? line : ` ${renderBoardRow(line, line.id === selected?.id, width - 1, modelOf(line))}`));
17842
+ const paintedRowsById = new Map(paintedRows.map((row) => [row.id, row]));
17763
17843
  if (shortViewport) {
17764
17844
  const shortHint = lineBudget >= 2 ? footer.slice(-1) : [];
17845
+ this.paintedBoard = {
17846
+ rowsByLine: [...windowRowIds, ...shortHint.map(() => void 0)].slice(0, lineBudget),
17847
+ rowsById: paintedRowsById
17848
+ };
17765
17849
  return [...renderedWindow, ...shortHint].slice(0, lineBudget);
17766
17850
  }
17851
+ this.paintedBoard = {
17852
+ rowsByLine: [
17853
+ ...head.map(() => void 0),
17854
+ ...windowRowIds,
17855
+ ...footer.map(() => void 0)
17856
+ ],
17857
+ rowsById: paintedRowsById
17858
+ };
17767
17859
  return [
17768
17860
  ...head,
17769
17861
  ...renderedWindow,
@@ -18279,13 +18371,16 @@ var ChatSessionHost = class ChatSessionHost {
18279
18371
  const picker = this.taskInspector.renderPicker(width, budget);
18280
18372
  const remaining = Math.max(0, budget - picker.length);
18281
18373
  const body = remaining ? renderChatSessionBody(this.state, width, remaining) : [];
18374
+ const gap = Math.max(0, remaining - body.length);
18282
18375
  this.bodyLayout = {
18283
18376
  taskView: false,
18284
- transcriptRows: body.length
18377
+ transcriptRows: body.length,
18378
+ pickerTop: body.length + gap,
18379
+ pickerRows: picker.length
18285
18380
  };
18286
18381
  return [
18287
18382
  ...body,
18288
- ...Array.from({ length: Math.max(0, remaining - body.length) }, () => ""),
18383
+ ...Array.from({ length: gap }, () => ""),
18289
18384
  ...picker
18290
18385
  ];
18291
18386
  }
@@ -18412,6 +18507,10 @@ var ChatSessionHost = class ChatSessionHost {
18412
18507
  if (!isSingleLeftClick(event)) return void 0;
18413
18508
  const layout = this.bodyLayout;
18414
18509
  if (layout.taskView) return this.taskInspector?.handleMouse(event);
18510
+ if (this.taskInspector !== void 0 && layout.pickerTop !== void 0 && layout.pickerRows !== void 0 && event.y >= layout.pickerTop && event.y < layout.pickerTop + layout.pickerRows) return this.taskInspector.handleMouse({
18511
+ ...event,
18512
+ y: event.y - layout.pickerTop
18513
+ });
18415
18514
  if (event.y >= layout.transcriptRows || hasChatSessionTransientModal(this.state)) return void 0;
18416
18515
  const state = this.state;
18417
18516
  const hit = state.bodyViewport.componentAtRow(event.y);
@@ -18458,6 +18557,7 @@ var ChatSessionHost = class ChatSessionHost {
18458
18557
  bodyRowKey(row) {
18459
18558
  const layout = this.bodyLayout;
18460
18559
  if (layout.taskView) return this.taskInspector?.paintedRowKey(row);
18560
+ if (this.taskInspector !== void 0 && layout.pickerTop !== void 0 && layout.pickerRows !== void 0 && row >= layout.pickerTop && row < layout.pickerTop + layout.pickerRows) return this.taskInspector.paintedRowKey(row - layout.pickerTop);
18461
18561
  if (row < 0 || row >= layout.transcriptRows) return void 0;
18462
18562
  const state = this.state;
18463
18563
  const hit = state.bodyViewport.componentAtRow(row);
@@ -19006,11 +19106,11 @@ async function showTaskInspector(ui, store, taskId, options = {}) {
19006
19106
  const lines = inspector.renderViewport(width, height);
19007
19107
  return Array.from({ length: height }, (_, row) => {
19008
19108
  const line = truncateToWidth(lines[row] ?? "", width);
19009
- return line + " ".repeat(Math.max(0, width - visibleWidth(line)));
19109
+ return line + " ".repeat(Math.max(0, width - visibleWidth$1(line)));
19010
19110
  });
19011
19111
  },
19012
- handleMouse: (event) => mountFullscreen && inspector.fullscreen ? inspector.handleMouse(event) : void 0,
19013
- paintedRowKey: (row) => mountFullscreen && inspector.fullscreen ? inspector.paintedRowKey(row) : void 0,
19112
+ handleMouse: (event) => !closed && mountFullscreen === inspector.fullscreen ? inspector.handleMouse(event) : void 0,
19113
+ paintedRowKey: (row) => !closed && mountFullscreen === inspector.fullscreen ? inspector.paintedRowKey(row) : void 0,
19014
19114
  handleInput: (data) => {
19015
19115
  if (!isPhysicalCtrlC(data)) return inspector.handleInput(data);
19016
19116
  closed = true;
@@ -20029,7 +20129,7 @@ async function showAgentPanel(session, ui, selectId, returnAnchor) {
20029
20129
  finish();
20030
20130
  return true;
20031
20131
  }
20032
- focus.handleInput(data, (input, key) => matchesKey(input, key));
20132
+ focus.handleInput(data, (input, key) => matchesKey$1(input, key));
20033
20133
  syncTick();
20034
20134
  } catch (error) {
20035
20135
  report(error);
@@ -20199,7 +20299,7 @@ async function deleteSessionFile(sessionPath) {
20199
20299
  }
20200
20300
  // dist/modes/interactive/components/session-selector-header.js
20201
20301
  function fitHeaderText(text, room) {
20202
- return visibleWidth(text) <= room ? text : truncateToWidth(text, room, "…");
20302
+ return visibleWidth$1(text) <= room ? text : truncateToWidth(text, room, "…");
20203
20303
  }
20204
20304
  var SessionSelectorHeader = class {
20205
20305
  scope;
@@ -20291,7 +20391,7 @@ var SessionSelectorHeader = class {
20291
20391
  const lines = [` ${theme.bold(theme.fg("text", fitHeaderText(title, inner)))}`];
20292
20392
  if (facts.length > 0) lines.push(` ${theme.fg("muted", fitHeaderText(facts.join(" · "), inner))}`);
20293
20393
  lines.push(` ${theme.fg("dim", fitHeaderText("re:<pattern> for a regex · \"phrase\" for an exact match", inner))}`);
20294
- return lines.map((line) => visibleWidth(line) > width ? truncateToWidth(line, width) : line);
20394
+ return lines.map((line) => visibleWidth$1(line) > width ? truncateToWidth(line, width) : line);
20295
20395
  }
20296
20396
  };
20297
20397
  // dist/modes/interactive/components/session-selector-search.js
@@ -20517,7 +20617,7 @@ function shortenPath(path) {
20517
20617
  return shortenHomePath(path);
20518
20618
  }
20519
20619
  function truncatePathStart(path, maxWidth) {
20520
- const pathWidth = visibleWidth(path);
20620
+ const pathWidth = visibleWidth$1(path);
20521
20621
  if (pathWidth <= maxWidth) return path;
20522
20622
  if (maxWidth <= 0) return "";
20523
20623
  const tailWidth = maxWidth - 1;
@@ -20670,7 +20770,7 @@ function fitText(text, room) {
20670
20770
  const key = `${room}\u0000${text}`;
20671
20771
  const cached = fittedTextCache.get(key);
20672
20772
  if (cached !== void 0) return cached;
20673
- const fitted = visibleWidth(text) <= room ? text : truncateToWidth(text, room, "…");
20773
+ const fitted = visibleWidth$1(text) <= room ? text : truncateToWidth(text, room, "…");
20674
20774
  if (fittedTextCache.size >= FITTED_TEXT_CACHE_SIZE) fittedTextCache.clear();
20675
20775
  fittedTextCache.set(key, fitted);
20676
20776
  return fitted;
@@ -20703,10 +20803,10 @@ const RESUME_HINT_DROP_ORDER = [
20703
20803
  ];
20704
20804
  function entryWidth(entry, keybindings) {
20705
20805
  const keys = entry.action !== void 0 ? navActionText(keybindings, entry.action) : entry.keys ?? "";
20706
- return keys ? visibleWidth(`${keys} ${entry.label}`) : 0;
20806
+ return keys ? visibleWidth$1(`${keys} ${entry.label}`) : 0;
20707
20807
  }
20708
20808
  function fitResumeHint(entries, room, keybindings) {
20709
- const separator = visibleWidth(" · ");
20809
+ const separator = visibleWidth$1(" · ");
20710
20810
  const widths = entries.map((entry) => entryWidth(entry, keybindings));
20711
20811
  const kept = entries.map((_, index) => index);
20712
20812
  let total = widths.reduce((sum, width) => sum + width, 0) + separator * Math.max(0, entries.length - 1);
@@ -21006,7 +21106,7 @@ var SessionList = class {
21006
21106
  matches: (data, action) => kb.matches(data, action),
21007
21107
  getKeys: (action) => action === "app.keys.help" ? helpKeys : kb.getKeys?.(action) ?? []
21008
21108
  } : kb;
21009
- return renderNavKeyOverlay("keys · resume", this.helpEntries(), width, HINT_STYLE, overlayKb, "tui.select.cancel").map((line) => visibleWidth(line) > width ? truncateToWidth(line, width) : line);
21109
+ return renderNavKeyOverlay("keys · resume", this.helpEntries(), width, HINT_STYLE, overlayKb, "tui.select.cancel").map((line) => visibleWidth$1(line) > width ? truncateToWidth(line, width) : line);
21010
21110
  }
21011
21111
  this.paintedSelection = this.filteredSessions[this.selectedIndex]?.session ?? null;
21012
21112
  this.selectionUnpainted = false;
@@ -21026,7 +21126,7 @@ var SessionList = class {
21026
21126
  }
21027
21127
  lines.push("");
21028
21128
  lines.push(this.renderHint(width));
21029
- return lines.map((line) => visibleWidth(line) > width ? truncateToWidth(line, width) : line);
21129
+ return lines.map((line) => visibleWidth$1(line) > width ? truncateToWidth(line, width) : line);
21030
21130
  }
21031
21131
  emptyText() {
21032
21132
  if (this.searchInput.getValue().trim()) return `No matches for "${this.searchInput.getValue().trim()}"`;
@@ -21040,7 +21140,7 @@ var SessionList = class {
21040
21140
  const boxWidth = Math.max(8, width - 2);
21041
21141
  const field = Math.max(1, boxWidth - 4);
21042
21142
  const content = this.searchInput.render(field)[0] ?? "";
21043
- const pad = " ".repeat(Math.max(0, field - visibleWidth(content)));
21143
+ const pad = " ".repeat(Math.max(0, field - visibleWidth$1(content)));
21044
21144
  const color = this.searchInput.getValue() ? "muted" : "borderMuted";
21045
21145
  const border = (text) => theme.fg(color, text);
21046
21146
  return [
@@ -21071,9 +21171,9 @@ var SessionList = class {
21071
21171
  const isDeleting = this.isDeleting(session);
21072
21172
  const prefix = this.buildTreePrefix(node);
21073
21173
  const continuation = this.buildTreeContinuation(node);
21074
- const lead = ` ${isSelected ? theme.fg("accent", theme.bold("❯ ")) : " "}`;
21075
- const indent = visibleWidth(lead);
21076
- const titleRoom = Math.max(1, width - indent - visibleWidth(prefix) - 1);
21174
+ const lead = ` ${isSelected ? theme.fg("accent", theme.bold("∀ ")) : " "}`;
21175
+ const indent = visibleWidth$1(lead);
21176
+ const titleRoom = Math.max(1, width - indent - visibleWidth$1(prefix) - 1);
21077
21177
  const title = fitText(sessionRowTitle(session), titleRoom);
21078
21178
  let color = null;
21079
21179
  if (isConfirmingDelete) color = "error";
@@ -21084,7 +21184,7 @@ var SessionList = class {
21084
21184
  let styledTitle = color ? theme.fg(color, title) : theme.fg("text", title);
21085
21185
  if (isSelected) styledTitle = theme.bold(color ? styledTitle : theme.fg("accent", title));
21086
21186
  lines.push(lead + theme.fg("dim", prefix) + styledTitle);
21087
- const detailRoom = Math.max(1, width - indent - visibleWidth(continuation) - 1);
21187
+ const detailRoom = Math.max(1, width - indent - visibleWidth$1(continuation) - 1);
21088
21188
  const detail = isDeleting ? "Deleting…" : this.rowDetail(session, detailRoom);
21089
21189
  lines.push(" ".repeat(indent) + theme.fg("dim", continuation) + theme.fg(isConfirmingDelete ? "error" : "muted", detail));
21090
21190
  }
@@ -21112,12 +21212,12 @@ var SessionList = class {
21112
21212
  const summary = session.summary ? cleanText(session.summary) : "";
21113
21213
  let line = head;
21114
21214
  if (paths.length > 0) {
21115
- const pathRoom = room - visibleWidth(line) - visibleWidth(sep) * paths.length;
21215
+ const pathRoom = room - visibleWidth$1(line) - visibleWidth$1(sep) * paths.length;
21116
21216
  const share = Math.floor(pathRoom / paths.length);
21117
21217
  const fitted = paths.map((path) => truncatePathStart(path, Math.max(1, share))).filter(Boolean);
21118
21218
  if (pathRoom > paths.length * 2) line += fitted.map((path) => sep + path).join("");
21119
21219
  }
21120
- if (summary && room - visibleWidth(line) - visibleWidth(sep) >= 10) line += sep + truncateToWidth(summary, room - visibleWidth(line) - visibleWidth(sep), "…");
21220
+ if (summary && room - visibleWidth$1(line) - visibleWidth$1(sep) >= 10) line += sep + truncateToWidth(summary, room - visibleWidth$1(line) - visibleWidth$1(sep), "…");
21121
21221
  return truncateToWidth(line, room, "…");
21122
21222
  }
21123
21223
  renderPreview(width) {
@@ -21138,7 +21238,7 @@ var SessionList = class {
21138
21238
  }
21139
21239
  for (const line of shown) {
21140
21240
  const cell = truncateToWidth(line, room, "…");
21141
- body.push(` ${border("│")} ${style(cell)}${" ".repeat(Math.max(0, room - visibleWidth(cell)))} ${border("│")}`);
21241
+ body.push(` ${border("│")} ${style(cell)}${" ".repeat(Math.max(0, room - visibleWidth$1(cell)))} ${border("│")}`);
21142
21242
  }
21143
21243
  };
21144
21244
  add(sessionRowTitle(selected), (text) => theme.bold(theme.fg("text", text)), 3);
@@ -21374,16 +21474,16 @@ var SessionList = class {
21374
21474
  handleInput(keyData) {
21375
21475
  const kb = this.activeKeybindings();
21376
21476
  if (this.showingHelp) {
21377
- if (matchesKey(keyData, "ctrl+c")) {
21477
+ if (matchesKey$1(keyData, "ctrl+c")) {
21378
21478
  this.showingHelp = false;
21379
21479
  this.onCancel?.();
21380
21480
  return true;
21381
21481
  }
21382
- if (kb.matches(keyData, "tui.select.cancel") || kb.matches(keyData, "app.keys.help") || this.availableHelpKeys().some((key) => matchesKey(keyData, keybindingIdentity(key)))) this.showingHelp = false;
21482
+ if (kb.matches(keyData, "tui.select.cancel") || kb.matches(keyData, "app.keys.help") || this.availableHelpKeys().some((key) => matchesKey$1(keyData, keybindingIdentity(key)))) this.showingHelp = false;
21383
21483
  return true;
21384
21484
  }
21385
21485
  if (this.confirmingDeleteSession !== null) {
21386
- if (matchesKey(keyData, "ctrl+c")) {
21486
+ if (matchesKey$1(keyData, "ctrl+c")) {
21387
21487
  this.setConfirmingDeleteSession(null);
21388
21488
  this.onCancel?.();
21389
21489
  return true;
@@ -21400,11 +21500,11 @@ var SessionList = class {
21400
21500
  }
21401
21501
  return true;
21402
21502
  }
21403
- if (this.availableHelpKeys().some((key) => matchesKey(keyData, keybindingIdentity(key)))) {
21503
+ if (this.availableHelpKeys().some((key) => matchesKey$1(keyData, keybindingIdentity(key)))) {
21404
21504
  this.showingHelp = true;
21405
21505
  return true;
21406
21506
  }
21407
- if (this.previewOpen && kb.matches(keyData, "tui.select.cancel") && !matchesKey(keyData, "ctrl+c")) {
21507
+ if (this.previewOpen && kb.matches(keyData, "tui.select.cancel") && !matchesKey$1(keyData, "ctrl+c")) {
21408
21508
  this.previewOpen = false;
21409
21509
  return true;
21410
21510
  }
@@ -21461,8 +21561,8 @@ var SessionList = class {
21461
21561
  else if (kb.matches(keyData, "tui.select.pageUp")) this.selectedIndex = Math.max(0, this.selectedIndex - this.maxVisible);
21462
21562
  else if (kb.matches(keyData, "tui.select.pageDown")) this.selectedIndex = Math.max(0, Math.min(this.filteredSessions.length - 1, this.selectedIndex + this.maxVisible));
21463
21563
  else if (kb.matches(keyData, "tui.select.confirm") || kb.matches(keyData, "app.list.open") && !this.searchInput.getValue()) this.selectSession();
21464
- else if (kb.matches(keyData, "tui.select.cancel") || matchesKey(keyData, "ctrl+c")) {
21465
- if (this.searchInput.getValue() && !matchesKey(keyData, "ctrl+c")) this.clearSearch();
21564
+ else if (kb.matches(keyData, "tui.select.cancel") || matchesKey$1(keyData, "ctrl+c")) {
21565
+ if (this.searchInput.getValue() && !matchesKey$1(keyData, "ctrl+c")) this.clearSearch();
21466
21566
  else this.onCancel?.();
21467
21567
  } else this.editSearch(keyData);
21468
21568
  return true;
@@ -21488,14 +21588,14 @@ var SessionList = class {
21488
21588
  /**
21489
21589
  * Component that renders a session selector
21490
21590
  */
21491
- var SessionSelectorComponent = class extends Container {
21591
+ var SessionSelectorComponent = class extends Container$1 {
21492
21592
  get capturesViewportInput() {
21493
21593
  return this.mode !== "rename";
21494
21594
  }
21495
21595
  handleInput(data) {
21496
21596
  if (this.mode === "rename") {
21497
21597
  const kb = getKeybindings();
21498
- if (matchesKey(data, "ctrl+c")) {
21598
+ if (matchesKey$1(data, "ctrl+c")) {
21499
21599
  this.exitRenameMode();
21500
21600
  this.sessionList.onCancel?.();
21501
21601
  return true;
@@ -21547,7 +21647,7 @@ var SessionSelectorComponent = class extends Container {
21547
21647
  }
21548
21648
  buildBaseLayout(content, options) {
21549
21649
  this.clear();
21550
- this.addChild(new Spacer(1));
21650
+ this.addChild(new Spacer$1(1));
21551
21651
  this.addChild(new DynamicBorder((s) => theme.fg("borderMuted", s)));
21552
21652
  if (options?.showHeader ?? true) this.addChild(this.header);
21553
21653
  this.addChild(content);
@@ -21679,12 +21779,12 @@ var SessionSelectorComponent = class extends Container {
21679
21779
  this.renameTarget = session;
21680
21780
  this.renameInput.setValue(session.name ?? "");
21681
21781
  this.renameInput.focused = true;
21682
- const panel = new Container();
21683
- panel.addChild(new Text(theme.bold("Rename Session"), 1, 0));
21684
- panel.addChild(new Spacer(1));
21782
+ const panel = new Container$1();
21783
+ panel.addChild(new Text$1(theme.bold("Rename Session"), 1, 0));
21784
+ panel.addChild(new Spacer$1(1));
21685
21785
  panel.addChild(this.renameInput);
21686
- panel.addChild(new Spacer(1));
21687
- panel.addChild(new Text(theme.fg("muted", `${keyTextHint("tui.select.confirm", "Save")} · ${keyTextHint("tui.select.cancel", "Cancel")}`), 1, 0));
21786
+ panel.addChild(new Spacer$1(1));
21787
+ panel.addChild(new Text$1(theme.fg("muted", `${keyTextHint("tui.select.confirm", "Save")} · ${keyTextHint("tui.select.cancel", "Cancel")}`), 1, 0));
21688
21788
  this.buildBaseLayout(panel, { showHeader: false });
21689
21789
  this.requestRender();
21690
21790
  }
@@ -21959,13 +22059,13 @@ function normalizePathPart(value) {
21959
22059
  }
21960
22060
  function resolveRepositoryPath(targetPath) {
21961
22061
  const normalizedTarget = normalizePathPart(targetPath);
21962
- const joined = normalizedTarget.startsWith("/") ? path.posix.normalize(normalizedTarget.replace(/^\/+/, "")) : path.posix.normalize(path.posix.join(CHANGELOG_LINK_BASE_PATH, normalizedTarget));
22062
+ const joined = normalizedTarget.startsWith("/") ? path$1.posix.normalize(normalizedTarget.replace(/^\/+/, "")) : path$1.posix.normalize(path$1.posix.join(CHANGELOG_LINK_BASE_PATH, normalizedTarget));
21963
22063
  if (joined === "." || joined.startsWith("../") || joined === "..") return;
21964
22064
  return joined;
21965
22065
  }
21966
22066
  function isDirectoryTarget(originalPath, repositoryPath) {
21967
22067
  if (originalPath.endsWith("/")) return true;
21968
- return !path.posix.basename(repositoryPath).includes(".");
22068
+ return !path$1.posix.basename(repositoryPath).includes(".");
21969
22069
  }
21970
22070
  function normalizeChangelogLinkTarget(target, tag) {
21971
22071
  let canonicalTarget = target.replace(LEGACY_REPO_RE, `https://github.com/${GITHUB_REPO}`);
@@ -22668,8 +22768,8 @@ function renderStartupManifesto(phase) {
22668
22768
  /** Compose mark, landed identity metadata, and optional first-landing manifesto. */
22669
22769
  function composeStartupIdentity(markLines, metaLines, maxWidth, manifestoLines = []) {
22670
22770
  if (markLines.length === 0) return [...metaLines, ...manifestoLines.length > 0 ? ["", ...manifestoLines] : []].join("\n");
22671
- const markWidth = Math.max(...markLines.map((line) => visibleWidth(line)));
22672
- const asideWidth = Math.max(0, ...metaLines.map(visibleWidth), ...manifestoLines.map(visibleWidth));
22771
+ const markWidth = Math.max(...markLines.map((line) => visibleWidth$1(line)));
22772
+ const asideWidth = Math.max(0, ...metaLines.map(visibleWidth$1), ...manifestoLines.map(visibleWidth$1));
22673
22773
  if (maxWidth === void 0 || maxWidth >= 80 && maxWidth >= markWidth + 2 + asideWidth) return markLines.map((line, index) => {
22674
22774
  const aside = index < 3 ? metaLines[index] : index >= 4 && index < 7 ? manifestoLines[index - 4] : "";
22675
22775
  return `${line}${aside ? ` ${aside}` : ""}`.trimEnd();
@@ -22681,7 +22781,7 @@ function composeStartupIdentity(markLines, metaLines, maxWidth, manifestoLines =
22681
22781
  }
22682
22782
  // dist/modes/interactive/components/bordered-loader.js
22683
22783
  /** Loader wrapped with borders for extension UI */
22684
- var BorderedLoader = class extends Container {
22784
+ var BorderedLoader = class extends Container$1 {
22685
22785
  loader;
22686
22786
  cancellable;
22687
22787
  signalController;
@@ -22693,14 +22793,14 @@ var BorderedLoader = class extends Container {
22693
22793
  if (this.cancellable) this.loader = new CancellableLoader(tui, (s) => theme.fg("accent", s), (s) => theme.fg("muted", s), message);
22694
22794
  else {
22695
22795
  this.signalController = new AbortController();
22696
- this.loader = new Loader(tui, (s) => theme.fg("accent", s), (s) => theme.fg("muted", s), message);
22796
+ this.loader = new Loader$1(tui, (s) => theme.fg("accent", s), (s) => theme.fg("muted", s), message);
22697
22797
  }
22698
22798
  this.addChild(this.loader);
22699
22799
  if (this.cancellable) {
22700
- this.addChild(new Spacer(1));
22701
- this.addChild(new Text(keyHint("tui.select.cancel", "cancel"), 1, 0));
22800
+ this.addChild(new Spacer$1(1));
22801
+ this.addChild(new Text$1(keyHint("tui.select.cancel", "cancel"), 1, 0));
22702
22802
  }
22703
- this.addChild(new Spacer(1));
22803
+ this.addChild(new Spacer$1(1));
22704
22804
  this.addChild(new DynamicBorder(borderColor));
22705
22805
  }
22706
22806
  get signal() {
@@ -22727,21 +22827,21 @@ const loadAnnouncementImageOnce = memoizeAsync(() => getBundledInteractiveAssetP
22727
22827
  function loadEarendilAnnouncementImage() {
22728
22828
  return loadAnnouncementImageOnce();
22729
22829
  }
22730
- var EarendilAnnouncementComponent = class extends Container {
22830
+ var EarendilAnnouncementComponent = class extends Container$1 {
22731
22831
  constructor(imageBase64) {
22732
22832
  super();
22733
22833
  this.addChild(new DynamicBorder((text) => theme.fg("accent", text)));
22734
- this.addChild(new Text(theme.bold(theme.fg("accent", "pi has joined Earendil")), 1, 0));
22735
- this.addChild(new Spacer(1));
22736
- this.addChild(new Text(theme.fg("muted", "Read the blog post:"), 1, 0));
22737
- this.addChild(new Text(theme.fg("mdLink", BLOG_URL), 1, 0));
22738
- this.addChild(new Spacer(1));
22834
+ this.addChild(new Text$1(theme.bold(theme.fg("accent", "pi has joined Earendil")), 1, 0));
22835
+ this.addChild(new Spacer$1(1));
22836
+ this.addChild(new Text$1(theme.fg("muted", "Read the blog post:"), 1, 0));
22837
+ this.addChild(new Text$1(theme.fg("mdLink", BLOG_URL), 1, 0));
22838
+ this.addChild(new Spacer$1(1));
22739
22839
  if (imageBase64) {
22740
22840
  this.addChild(new Image(imageBase64, "image/png", { fallbackColor: (text) => theme.fg("muted", text) }, {
22741
22841
  maxWidthCells: 56,
22742
22842
  filename: IMAGE_FILENAME
22743
22843
  }));
22744
- this.addChild(new Spacer(1));
22844
+ this.addChild(new Spacer$1(1));
22745
22845
  }
22746
22846
  this.addChild(new DynamicBorder((text) => theme.fg("accent", text)));
22747
22847
  }
@@ -22777,7 +22877,7 @@ function webLink(text, url) {
22777
22877
  /**
22778
22878
  * Login dialog component - replaces editor during OAuth login flow
22779
22879
  */
22780
- var LoginDialogComponent = class extends Container {
22880
+ var LoginDialogComponent = class extends Container$1 {
22781
22881
  contentContainer;
22782
22882
  input;
22783
22883
  tui;
@@ -22802,8 +22902,8 @@ var LoginDialogComponent = class extends Container {
22802
22902
  this.tui = tui;
22803
22903
  const title = titleOverride ?? `Login to ${providerNameOverride || providerId}`;
22804
22904
  this.addChild(new DynamicBorder());
22805
- this.addChild(new Text(theme.fg("accent", theme.bold(title)), 1, 0));
22806
- this.contentContainer = new Container();
22905
+ this.addChild(new Text$1(theme.fg("accent", theme.bold(title)), 1, 0));
22906
+ this.contentContainer = new Container$1();
22807
22907
  this.addChild(this.contentContainer);
22808
22908
  this.input = new Input();
22809
22909
  this.input.onSubmit = () => {
@@ -22845,16 +22945,16 @@ var LoginDialogComponent = class extends Container {
22845
22945
  this.clearDeviceCodeAction();
22846
22946
  this.contentContainer.clear();
22847
22947
  this.authCancelHint = void 0;
22848
- this.contentContainer.addChild(new Spacer(1));
22948
+ this.contentContainer.addChild(new Spacer$1(1));
22849
22949
  const target = webUrl(url);
22850
22950
  this.authUrl = new AuthUrlComponent(this.tui, target ?? replaceControlCharacters(url));
22851
22951
  this.contentContainer.addChild(this.authUrl);
22852
22952
  if (instructions) {
22853
- this.contentContainer.addChild(new Spacer(1));
22854
- this.contentContainer.addChild(new Text(theme.fg("warning", instructions), 1, 0));
22953
+ this.contentContainer.addChild(new Spacer$1(1));
22954
+ this.contentContainer.addChild(new Text$1(theme.fg("warning", instructions), 1, 0));
22855
22955
  }
22856
22956
  if (options.showCancelHint) {
22857
- this.authCancelHint = new Text(`(${keyHint("tui.select.cancel", "Cancel")})`, 1, 0);
22957
+ this.authCancelHint = new Text$1(`(${keyHint("tui.select.cancel", "Cancel")})`, 1, 0);
22858
22958
  this.contentContainer.addChild(this.authCancelHint);
22859
22959
  }
22860
22960
  if ((options.autoOpenBrowser ?? true) && target !== void 0) openBrowser(target);
@@ -22873,17 +22973,17 @@ var LoginDialogComponent = class extends Container {
22873
22973
  this.clearDeviceCodeAction();
22874
22974
  this.contentContainer.clear();
22875
22975
  this.authCancelHint = void 0;
22876
- this.contentContainer.addChild(new Spacer(1));
22976
+ this.contentContainer.addChild(new Spacer$1(1));
22877
22977
  const shownUrl = displayUrl(info.verificationUri);
22878
- this.contentContainer.addChild(new Text(theme.fg("accent", webLink(shownUrl, shownUrl)), 1, 0));
22978
+ this.contentContainer.addChild(new Text$1(theme.fg("accent", webLink(shownUrl, shownUrl)), 1, 0));
22879
22979
  const clickHint = process.platform === "darwin" ? "Cmd+click to open" : "Ctrl+click to open";
22880
- this.contentContainer.addChild(new Text(theme.fg("dim", webLink(clickHint, info.verificationUri)), 1, 0));
22881
- this.contentContainer.addChild(new Spacer(1));
22882
- this.contentContainer.addChild(new Text(theme.fg("warning", `Enter code: ${info.userCode}`), 1, 0));
22980
+ this.contentContainer.addChild(new Text$1(theme.fg("dim", webLink(clickHint, info.verificationUri)), 1, 0));
22981
+ this.contentContainer.addChild(new Spacer$1(1));
22982
+ this.contentContainer.addChild(new Text$1(theme.fg("warning", `Enter code: ${info.userCode}`), 1, 0));
22883
22983
  if (!this.signal.aborted && (info.openBrowserOnConfirm || info.copyCodeOnConfirm)) {
22884
22984
  const actionLabel = info.openBrowserOnConfirm ? info.copyCodeOnConfirm ? "to open browser and copy code" : "to open browser" : "to copy code";
22885
- const hint = new Container();
22886
- hint.addChild(new TruncatedText(`(${keyHint("tui.select.confirm", actionLabel)})`, 1, 0));
22985
+ const hint = new Container$1();
22986
+ hint.addChild(new TruncatedText$1(`(${keyHint("tui.select.confirm", actionLabel)})`, 1, 0));
22887
22987
  this.contentContainer.addChild(hint);
22888
22988
  this.deviceCodeHint = hint;
22889
22989
  this.deviceCodeAction = {
@@ -22895,7 +22995,7 @@ var LoginDialogComponent = class extends Container {
22895
22995
  }
22896
22996
  setDeviceCodeStatus(hint, message) {
22897
22997
  if (this.signal.aborted || !this.focused || !this.contentContainer.children.includes(hint)) return;
22898
- hint.children = [new TruncatedText(theme.fg("dim", message), 1, 0)];
22998
+ hint.children = [new TruncatedText$1(theme.fg("dim", message), 1, 0)];
22899
22999
  this.tui.requestRender();
22900
23000
  }
22901
23001
  activateDeviceCode(info, hint) {
@@ -22907,7 +23007,7 @@ var LoginDialogComponent = class extends Container {
22907
23007
  } catch {}
22908
23008
  }
22909
23009
  replaceInputWithSubmittedText(value) {
22910
- this.contentContainer.children = this.contentContainer.children.map((child) => child === this.input ? new Text(`> ${value}`, 0, 0) : child);
23010
+ this.contentContainer.children = this.contentContainer.children.map((child) => child === this.input ? new Text$1(`> ${value}`, 0, 0) : child);
22911
23011
  }
22912
23012
  removeAuthCancelHint() {
22913
23013
  if (!this.authCancelHint) return;
@@ -22921,10 +23021,10 @@ var LoginDialogComponent = class extends Container {
22921
23021
  this.clearDeviceCodeAction();
22922
23022
  this.removeAuthCancelHint();
22923
23023
  this.input.setValue("");
22924
- this.contentContainer.addChild(new Spacer(1));
22925
- this.contentContainer.addChild(new Text(theme.fg("dim", prompt), 1, 0));
23024
+ this.contentContainer.addChild(new Spacer$1(1));
23025
+ this.contentContainer.addChild(new Text$1(theme.fg("dim", prompt), 1, 0));
22926
23026
  this.contentContainer.addChild(this.input);
22927
- this.contentContainer.addChild(new Text(`(${keyHint("tui.select.cancel", "Cancel")})`, 1, 0));
23027
+ this.contentContainer.addChild(new Text$1(`(${keyHint("tui.select.cancel", "Cancel")})`, 1, 0));
22928
23028
  this.tui.requestRender();
22929
23029
  return new Promise((resolve, reject) => {
22930
23030
  this.inputResolver = resolve;
@@ -22944,11 +23044,11 @@ var LoginDialogComponent = class extends Container {
22944
23044
  showPrompt(message, placeholder) {
22945
23045
  this.clearDeviceCodeAction();
22946
23046
  this.removeAuthCancelHint();
22947
- this.contentContainer.addChild(new Spacer(1));
22948
- this.contentContainer.addChild(new Text(theme.fg("text", message), 1, 0));
22949
- if (placeholder) this.contentContainer.addChild(new Text(theme.fg("dim", `e.g., ${placeholder}`), 1, 0));
23047
+ this.contentContainer.addChild(new Spacer$1(1));
23048
+ this.contentContainer.addChild(new Text$1(theme.fg("text", message), 1, 0));
23049
+ if (placeholder) this.contentContainer.addChild(new Text$1(theme.fg("dim", `e.g., ${placeholder}`), 1, 0));
22950
23050
  this.contentContainer.addChild(this.input);
22951
- this.contentContainer.addChild(new Text(`(${keyHint("tui.select.cancel", "Cancel,")} ${keyHint("tui.select.confirm", "Submit")})`, 1, 0));
23051
+ this.contentContainer.addChild(new Text$1(`(${keyHint("tui.select.cancel", "Cancel,")} ${keyHint("tui.select.confirm", "Submit")})`, 1, 0));
22952
23052
  this.input.setValue("");
22953
23053
  this.tui.requestRender();
22954
23054
  return new Promise((resolve, reject) => {
@@ -22962,20 +23062,20 @@ var LoginDialogComponent = class extends Container {
22962
23062
  this.clearDeviceCodeAction();
22963
23063
  this.contentContainer.clear();
22964
23064
  this.authCancelHint = void 0;
22965
- this.contentContainer.addChild(new Spacer(1));
22966
- for (const line of lines) this.contentContainer.addChild(new Text(line, 1, 0));
22967
- this.contentContainer.addChild(new Spacer(1));
22968
- this.contentContainer.addChild(new Text(`(${keyHint("tui.select.cancel", "Close")})`, 1, 0));
23065
+ this.contentContainer.addChild(new Spacer$1(1));
23066
+ for (const line of lines) this.contentContainer.addChild(new Text$1(line, 1, 0));
23067
+ this.contentContainer.addChild(new Spacer$1(1));
23068
+ this.contentContainer.addChild(new Text$1(`(${keyHint("tui.select.cancel", "Close")})`, 1, 0));
22969
23069
  this.tui.requestRender();
22970
23070
  }
22971
23071
  /** Show provider-owned information and terminal hyperlinks. */
22972
23072
  showInfo(message, links = []) {
22973
- this.contentContainer.addChild(new Spacer(1));
22974
- this.contentContainer.addChild(new Text(theme.fg("text", message), 1, 0));
23073
+ this.contentContainer.addChild(new Spacer$1(1));
23074
+ this.contentContainer.addChild(new Text$1(theme.fg("text", message), 1, 0));
22975
23075
  for (const link of links) {
22976
23076
  const url = displayUrl(link.url);
22977
23077
  const text = link.label ? `${link.label}: ${url}` : url;
22978
- this.contentContainer.addChild(new Text(theme.fg("accent", webLink(text, url)), 1, 0));
23078
+ this.contentContainer.addChild(new Text$1(theme.fg("accent", webLink(text, url)), 1, 0));
22979
23079
  }
22980
23080
  this.tui.requestRender();
22981
23081
  }
@@ -22984,16 +23084,16 @@ var LoginDialogComponent = class extends Container {
22984
23084
  */
22985
23085
  showWaiting(message) {
22986
23086
  this.removeAuthCancelHint();
22987
- this.contentContainer.addChild(new Spacer(1));
22988
- this.contentContainer.addChild(new Text(theme.fg("dim", message), 1, 0));
22989
- this.contentContainer.addChild(new Text(`(${keyHint("tui.select.cancel", "Cancel")})`, 1, 0));
23087
+ this.contentContainer.addChild(new Spacer$1(1));
23088
+ this.contentContainer.addChild(new Text$1(theme.fg("dim", message), 1, 0));
23089
+ this.contentContainer.addChild(new Text$1(`(${keyHint("tui.select.cancel", "Cancel")})`, 1, 0));
22990
23090
  this.tui.requestRender();
22991
23091
  }
22992
23092
  /**
22993
23093
  * Called by onProgress callback
22994
23094
  */
22995
23095
  showProgress(message) {
22996
- this.contentContainer.addChild(new Text(theme.fg("dim", message), 1, 0));
23096
+ this.contentContainer.addChild(new Text$1(theme.fg("dim", message), 1, 0));
22997
23097
  this.tui.requestRender();
22998
23098
  }
22999
23099
  handleInput(data) {
@@ -23175,8 +23275,8 @@ function getModelSelectorSearchText(item) {
23175
23275
  // dist/modes/interactive/components/model-selector.js
23176
23276
  const MAX_VISIBLE$1 = 10;
23177
23277
  function effortDirection(data) {
23178
- if (matchesKey(data, "left")) return -1;
23179
- if (matchesKey(data, "right")) return 1;
23278
+ if (matchesKey$1(data, "left")) return -1;
23279
+ if (matchesKey$1(data, "right")) return 1;
23180
23280
  return 0;
23181
23281
  }
23182
23282
  const modelMetaCache = /* @__PURE__ */ new WeakMap();
@@ -23855,7 +23955,7 @@ var ScopedModelsSelectorComponent = class extends FramedSelector {
23855
23955
  return input;
23856
23956
  }
23857
23957
  handleInput(data) {
23858
- if (matchesKey(data, "ctrl+c") && this.selector.state.getQuery()) {
23958
+ if (matchesKey$1(data, "ctrl+c") && this.selector.state.getQuery()) {
23859
23959
  this.selector.clearSearch();
23860
23960
  return;
23861
23961
  }
@@ -24286,7 +24386,7 @@ const AUTOMATIC_THEME_VALUE = "/";
24286
24386
  /**
24287
24387
  * A submenu component for selecting from a list of options.
24288
24388
  */
24289
- var WarningSettingsSubmenu = class WarningSettingsSubmenu extends Container {
24389
+ var WarningSettingsSubmenu = class WarningSettingsSubmenu extends Container$1 {
24290
24390
  settingsList;
24291
24391
  state;
24292
24392
  constructor(warnings, onChange, onCancel) {
@@ -24412,7 +24512,7 @@ function defaultAutomaticThemes(currentThemeSetting, availableThemes) {
24412
24512
  darkTheme: themeName
24413
24513
  };
24414
24514
  }
24415
- var ThemeSubmenu = class ThemeSubmenu extends Container {
24515
+ var ThemeSubmenu = class ThemeSubmenu extends Container$1 {
24416
24516
  inputComponent;
24417
24517
  callbacks;
24418
24518
  availableThemes;
@@ -24599,7 +24699,7 @@ function afterCompactionItems(items) {
24599
24699
  return items.findIndex((item) => item.id === "autocompact") + 1;
24600
24700
  }
24601
24701
  function insertImageItems(items, config) {
24602
- if (!getCapabilities().images) return;
24702
+ if (!getCapabilities$1().images) return;
24603
24703
  const start = afterCompactionItems(items);
24604
24704
  items.splice(start, 0, {
24605
24705
  id: "show-images",
@@ -24625,7 +24725,7 @@ function insertAfter(items, afterId, item) {
24625
24725
  items.splice(index + 1, 0, item);
24626
24726
  }
24627
24727
  function insertUiToggles(items, config) {
24628
- const supportsImages = getCapabilities().images;
24728
+ const supportsImages = getCapabilities$1().images;
24629
24729
  items.splice(afterCompactionItems(items) + (supportsImages ? 2 : 0), 0, {
24630
24730
  id: "auto-resize-images",
24631
24731
  label: "Auto-resize images",
@@ -25053,7 +25153,7 @@ function buildSettingsItems(config, callbacks) {
25053
25153
  /**
25054
25154
  * Main settings selector component.
25055
25155
  */
25056
- var SettingsSelectorComponent = class extends Container {
25156
+ var SettingsSelectorComponent = class extends Container$1 {
25057
25157
  settingsList;
25058
25158
  callbacks;
25059
25159
  constructor(config, callbacks) {
@@ -25131,17 +25231,17 @@ var SearchLine = class {
25131
25231
  const prompt = theme.fg("text", "⌕ ");
25132
25232
  const cursor = this.focused ? `${CURSOR_MARKER}\x1b[7m \x1b[27m` : "";
25133
25233
  const room = Math.max(1, field - 2 - (this.focused ? 1 : 0));
25134
- const shown = visibleWidth(query) > room ? `…${sliceByColumn(query, visibleWidth(query) - room + 1, room - 1)}` : query;
25234
+ const shown = visibleWidth$1(query) > room ? `…${sliceByColumn(query, visibleWidth$1(query) - room + 1, room - 1)}` : query;
25135
25235
  const text = query ? theme.fg("text", shown) : this.focused ? "" : theme.fg("dim", "Search…");
25136
25236
  const placeholder = !query && this.focused ? theme.fg("dim", "Search…") : "";
25137
25237
  const content = query ? `${prompt}${text}${cursor}` : truncateToWidth(`${prompt}${text}${cursor}${placeholder}`, field, "");
25138
- const pad = " ".repeat(Math.max(0, field - visibleWidth(content)));
25238
+ const pad = " ".repeat(Math.max(0, field - visibleWidth$1(content)));
25139
25239
  const border = (value) => theme.fg(query ? "muted" : "borderMuted", value);
25140
25240
  return [
25141
25241
  ` ${border(`╭${"─".repeat(boxWidth - 2)}╮`)}`,
25142
25242
  ` ${border("│ ")}${content}${pad}${border(" │")}`,
25143
25243
  ` ${border(`╰${"─".repeat(boxWidth - 2)}╯`)}`
25144
- ].map((line) => visibleWidth(line) > width ? truncateToWidth(line, width) : line);
25244
+ ].map((line) => visibleWidth$1(line) > width ? truncateToWidth(line, width) : line);
25145
25245
  }
25146
25246
  handleInput(_keyData) {
25147
25247
  return false;
@@ -25165,7 +25265,7 @@ var TreeHelp = class {
25165
25265
  const line = () => kept.map((item) => item.text).join(" · ");
25166
25266
  const byDrop = [...items].filter((item) => item.drop !== void 0).sort((a, b) => (a.drop ?? 0) - (b.drop ?? 0));
25167
25267
  for (const item of byDrop) {
25168
- if (visibleWidth(line()) <= room) break;
25268
+ if (visibleWidth$1(line()) <= room) break;
25169
25269
  kept.splice(kept.indexOf(item), 1);
25170
25270
  }
25171
25271
  return [theme.fg("dim", truncateToWidth(` ${kept.map((item) => item.hint).join(" · ")}`, width, "…"))];
@@ -25941,7 +26041,7 @@ var TreeList = class {
25941
26041
  const flatNode = state.filteredNodes[i];
25942
26042
  const entry = flatNode.node.entry;
25943
26043
  const isSelected = i === state.selectedIndex;
25944
- const cursor = isSelected ? theme.fg("accent", theme.bold("❯ ")) : " ";
26044
+ const cursor = isSelected ? theme.fg("accent", theme.bold("∀ ")) : " ";
25945
26045
  const displayIndent = state.multipleRoots ? Math.max(0, flatNode.indent - 1) : flatNode.indent;
25946
26046
  const connector = flatNode.showConnector && !flatNode.isVirtualRootChild ? flatNode.isLast ? "└─ " : "├─ " : "";
25947
26047
  const connectorPosition = connector ? displayIndent - 1 : -1;
@@ -25976,7 +26076,7 @@ var TreeList = class {
25976
26076
  entry: preview.entry
25977
26077
  }, isSelected, new Map(preview.call ? [preview.call] : [])) : getPendingDisplayText(state.archive.rows.get(entry.id), isSelected, state.archive.failure(entry.id) !== void 0);
25978
26078
  const prefixPart = theme.fg("dim", prefix) + foldMarker + pathMarker;
25979
- const anchorCol = visibleWidth(prefixPart);
26079
+ const anchorCol = visibleWidth$1(prefixPart);
25980
26080
  let gutter = cursor;
25981
26081
  let body = prefixPart + label + labelTimestamp + content;
25982
26082
  if (isSelected) {
@@ -25987,7 +26087,7 @@ var TreeList = class {
25987
26087
  gutter,
25988
26088
  body,
25989
26089
  anchorCol,
25990
- bodyWidth: visibleWidth(body),
26090
+ bodyWidth: visibleWidth$1(body),
25991
26091
  isSelected
25992
26092
  });
25993
26093
  }
@@ -26124,7 +26224,7 @@ var TreeList = class {
26124
26224
  };
26125
26225
  // dist/modes/interactive/components/tree-selector-component.js
26126
26226
  /** Component that renders a session tree selector for navigation */
26127
- var TreeSelectorComponent = class extends Container {
26227
+ var TreeSelectorComponent = class extends Container$1 {
26128
26228
  treeList;
26129
26229
  searchLine;
26130
26230
  labelInput = null;
@@ -26155,18 +26255,18 @@ var TreeSelectorComponent = class extends Container {
26155
26255
  this.treeList.onCancel = onCancel;
26156
26256
  this.treeList.onLabelEdit = (entryId, currentLabel) => this.editLabel(entryId, currentLabel);
26157
26257
  this.searchLine = new SearchLine(this.treeList);
26158
- this.treeContainer = new Container();
26258
+ this.treeContainer = new Container$1();
26159
26259
  this.treeContainer.addChild(this.treeList);
26160
- this.labelInputContainer = new Container();
26260
+ this.labelInputContainer = new Container$1();
26161
26261
  const rule = () => new DynamicBorder((text) => theme.fg("borderMuted", text));
26162
- this.addChild(new Spacer(1));
26262
+ this.addChild(new Spacer$1(1));
26163
26263
  this.addChild(rule());
26164
- this.addChild(new Text(theme.bold(theme.fg("text", "Session tree")), 1, 0));
26264
+ this.addChild(new Text$1(theme.bold(theme.fg("text", "Session tree")), 1, 0));
26165
26265
  this.addChild(this.searchLine);
26166
- this.addChild(new Spacer(1));
26266
+ this.addChild(new Spacer$1(1));
26167
26267
  this.addChild(this.treeContainer);
26168
26268
  this.addChild(this.labelInputContainer);
26169
- this.addChild(new Spacer(1));
26269
+ this.addChild(new Spacer$1(1));
26170
26270
  this.addChild(new TreeHelp());
26171
26271
  this.addChild(rule());
26172
26272
  if (tree.length === 0) setTimeout(() => onCancel(), 100);
@@ -26182,7 +26282,7 @@ var TreeSelectorComponent = class extends Container {
26182
26282
  this.labelLoad = load;
26183
26283
  this.treeContainer.clear();
26184
26284
  this.labelInputContainer.clear();
26185
- this.labelInputContainer.addChild(new Text(theme.fg("dim", "Loading label…"), 2, 0));
26285
+ this.labelInputContainer.addChild(new Text$1(theme.fg("dim", "Loading label…"), 2, 0));
26186
26286
  const settle = () => {
26187
26287
  if (load.signal.aborted || !archive.open) return false;
26188
26288
  this.labelLoad = void 0;
@@ -26594,7 +26694,7 @@ function isExpandable(obj) {
26594
26694
  return typeof obj === "object" && obj !== null && "setExpanded" in obj && typeof obj.setExpanded === "function";
26595
26695
  }
26596
26696
  /** Text that Ctrl+O, or a click anywhere on it, switches between a collapsed and an expanded form. */
26597
- var ExpandableText = class extends Text$1 {
26697
+ var ExpandableText = class extends Text {
26598
26698
  expandsOnClick = true;
26599
26699
  expanded;
26600
26700
  contentWidth;
@@ -27137,13 +27237,13 @@ function exitWithStatus(code) {
27137
27237
  * {@link CONSOLE_CLOSE_TIMEOUT_MS} from its own notice before Windows ends it with {@link CONSOLE_CLOSED_EXIT_CODE}.
27138
27238
  */
27139
27239
  /** STATUS_CONTROL_C_EXIT: the status Windows gives a process it ends when its console is closed. */
27140
- const CONSOLE_CLOSED_EXIT_CODE = 3221225786;
27240
+ const CONSOLE_CLOSED_EXIT_CODE = 0xc000013a;
27141
27241
  /**
27142
27242
  * Once the console is closed, the longest a shutdown may take: the process then ends its children and exits, leaving
27143
27243
  * the rest of Windows's timeout for its own exit.
27144
27244
  */
27145
27245
  const CONSOLE_CLOSED_SHUTDOWN_MS = 4e3;
27146
- export { AGENT_PANEL_WIDGET_KEY, ANTHROPIC_SUBSCRIPTION_AUTH_WARNING, AgentViewSwitcher, ArminComponent, AssistantMessageComponent, AuthUrlComponent, BEDROCK_PROVIDER_ID, BUILTIN_SLASH_COMMAND_NAMES, BashExecutionComponent, BorderedLoader, BranchSummaryMessageComponent, COMMITTED_WIDGET_PREVIEW_GATE, CONSOLE_CLOSED_EXIT_CODE, CONSOLE_CLOSED_SHUTDOWN_MS, ChatSessionHost, ChatTranscriptComponent, CombinedAutocompleteProvider$1 as CombinedAutocompleteProvider, CompactionBoundaryMessageComponent, Container$1 as Container, CustomMessageComponent, EarendilAnnouncementComponent, ExpandableText, ExtensionEditorComponent, FooterComponent, HeartbeatBlock, InteractiveThemeController, KeybindingsReloadCoordinator, LiveChatEntriesController, Loader$1 as Loader, LoginDialogComponent, Markdown$1 as Markdown, ModelSelectorComponent, OAuthSelectorComponent, PromptHistorySelectorComponent, QueuedMessagesView, RETAINED_TOOL_RENDERERS, RemoteCustomMessageComponent, RemoteFrameWidthClamp, RemoteToolExecutionComponent, STARTUP_ASSEMBLY_GAPS, STOP_ALL_STATUS_KEY, SavedRendererInstances, ScopedModelsSelectorComponent, ScrollableChatTranscriptComponent, ScrollableComponentViewport, SessionSelectorComponent, SettingsSelectorComponent, SkillInvocationMessageComponent, Spacer$1 as Spacer, SteeringQueueController, TASK_CHAT_OVERLAY_KEYS, TaskList, TaskRow, Text$1 as Text, ThinkingSelectorComponent, ToolExecutionComponent, ToolGroupTracker, TranscriptTaskRow, TreeSelectorComponent, TrustSelectorComponent, UsageMeterComponent, UserMessageSelectorComponent, WorkingStatusComponent, addChatTranscriptEntry, agentPanelBoardSource, agentPanelCounts, agentPanelHasRows, agentPanelReturning, applyAssistantMessageDelta, applyToolEntryState, assistantCallBreaks, atomicWordmark, beginStreamingAssistantMessage, bindAgentPanel, blockRows, boundedInteractiveModelRefresh, callsAwaitingLaterResults, canPaintWidgetFrame, chalk$1 as chalk, chatEntriesFromAgentMessages, chatRecordsChanged, checkForNewPiVersion, classifyChatCommand, classifyWidgetFrame, clickableBlocksView, combineQueuedMessagesForEditor, compareProviders, composeStartupIdentity, countTasksBy, createChatAutocompleteProvider, createRemoteAgentSteering, createRpcErrorResponse, createRpcSuccessResponse, createSessionSkillAutocompleteProvider, createStopAllChord, createStopAllNotices, decisionSettingScopes, declaresHistoryReplayable, discardChatMount, displayUrl, disposeRemoteRenderers, disposeRenderer, endsAwaitedResults, engineTaskInspectorUi, exitWithStatus, formatAuthSelectorProviderType, formatCrashExtensionHint, formatResumeCommand, formatRpcErrorMessage, formatToolActionSummary, formatVersionCheckError, fs$1 as fs, fuzzyFilter$1 as fuzzyFilter, getAutocompleteSourceTag, getCachedChangelog, getCapabilities$1 as getCapabilities, getChangelogHighlights, getEntriesForVersion, getLatestPiRelease, getModelSearchText, getNewEntries, getSearchableText, getSessionCommandCatalog, getSessionSkillCommands, handleSetViewedAgent, handleTranscriptBlockClick, hasAssistantVisibleContent, hasDefaultModelProvider, hyperlink$1 as hyperlink, initialHostEngineViewSyncState, installEngineAgentViewBridge, interruptedNotice, isAnthropicSubscriptionAuthKey, isApiKeyLoginProvider, isChatSessionWorking, isClickExpandableBlock, isDeadTerminalError, isEngineHintRoute, isExpandable, isNewerPackageVersion, isResultWithoutCall, isSingleLeftClick, isUnansweredCancelMatch, loadEarendilAnnouncementImage, markHintRoutesAsEngine, matchesKey$1 as matchesKey, needsChangelogPreload, normalizeChangelogLinks, observeClickExpansion, onTaskDismissed, openExternalEditorForText, openLocalAgentViewPort, openWaitedShellOf, os, panelHintParts, panelHintSegments, parkedRun, parseChangelogAsync, pasteClipboardImageToEditor, path$1 as path, pickWhimsicalWorkingMessage, planPreViewCancelAck, prefixAutocompleteDescription, preloadChangelog, promptHistoryEntries, queuedMessageRows, readMountedAnchors, readTaskCompletionHistory, readTaskPrompts, refreshModelCatalogs, remoteAgentCommands, remoteAgentPrompts, renderAtomicAssemblyBanner, renderChatMessageEntry, renderStartupManifesto, renderTaskFooter, repaintAfterSingleClick, restoredQueue, retainChatRecords, retainedToolRenderer, retryCancelHint, retryWaitFromEvent, retryWaitMessage, rowsFrom, rpcShutdownErrorEvent, runHintRoute, runRendererCleanup, sameRows, sessionChatMount, sessionPromptsFromEntries, setAgentViewBridge, setKeybindings$1 as setKeybindings, setRendererClickTarget, settleUnansweredCalls, shouldCancelEngineViewOnArrival, showAgentPanel, showEngineTaskInspector, showTaskInspector, spawn$2 as spawn, stopAllBackgroundWork, supersedeBlockClicks, supportsAtomicBanner, taskChatKeys, taskListSections, taskNameAndTitle, taskSiblings, themedChatHostStyle, toolResultGroupState, viewedAgentCommand, visibleWidth$1 as visibleWidth, webUrl, withBlockRenderTime };
27246
+ export { AGENT_PANEL_WIDGET_KEY, ANTHROPIC_SUBSCRIPTION_AUTH_WARNING, AgentViewSwitcher, ArminComponent, AssistantMessageComponent, AuthUrlComponent, BEDROCK_PROVIDER_ID, BUILTIN_SLASH_COMMAND_NAMES, BashExecutionComponent, BorderedLoader, BranchSummaryMessageComponent, COMMITTED_WIDGET_PREVIEW_GATE, CONSOLE_CLOSED_EXIT_CODE, CONSOLE_CLOSED_SHUTDOWN_MS, ChatSessionHost, ChatTranscriptComponent, CombinedAutocompleteProvider, CompactionBoundaryMessageComponent, Container, CustomMessageComponent, EarendilAnnouncementComponent, ExpandableText, ExtensionEditorComponent, FooterComponent, HeartbeatBlock, InteractiveThemeController, KeybindingsReloadCoordinator, LiveChatEntriesController, Loader, LoginDialogComponent, Markdown, ModelSelectorComponent, OAuthSelectorComponent, PromptHistorySelectorComponent, QueuedMessagesView, RETAINED_TOOL_RENDERERS, RemoteCustomMessageComponent, RemoteFrameWidthClamp, RemoteToolExecutionComponent, STARTUP_ASSEMBLY_GAPS, STOP_ALL_STATUS_KEY, SavedRendererInstances, ScopedModelsSelectorComponent, ScrollableChatTranscriptComponent, ScrollableComponentViewport, SessionSelectorComponent, SettingsSelectorComponent, SkillInvocationMessageComponent, Spacer, SteeringQueueController, TASK_CHAT_OVERLAY_KEYS, TaskList, TaskRow, Text, ThinkingSelectorComponent, ToolExecutionComponent, ToolGroupTracker, TranscriptTaskRow, TreeSelectorComponent, TrustSelectorComponent, UsageMeterComponent, UserMessageSelectorComponent, WorkingStatusComponent, addChatTranscriptEntry, agentPanelBoardSource, agentPanelCounts, agentPanelHasRows, agentPanelReturning, applyAssistantMessageDelta, applyToolEntryState, assistantCallBreaks, atomicWordmark, beginStreamingAssistantMessage, bindAgentPanel, blockRows, boundedInteractiveModelRefresh, callsAwaitingLaterResults, canPaintWidgetFrame, chalk, chatEntriesFromAgentMessages, chatRecordsChanged, checkForNewPiVersion, classifyChatCommand, classifyWidgetFrame, clickableBlocksView, combineQueuedMessagesForEditor, compareProviders, composeStartupIdentity, countTasksBy, createChatAutocompleteProvider, createRemoteAgentSteering, createRpcErrorResponse, createRpcSuccessResponse, createSessionSkillAutocompleteProvider, createStopAllChord, createStopAllNotices, decisionSettingScopes, declaresHistoryReplayable, discardChatMount, displayUrl, disposeRemoteRenderers, disposeRenderer, endsAwaitedResults, engineTaskInspectorUi, exitWithStatus, formatAuthSelectorProviderType, formatCrashExtensionHint, formatResumeCommand, formatRpcErrorMessage, formatToolActionSummary, formatVersionCheckError, fs, fuzzyFilter, getAutocompleteSourceTag, getCachedChangelog, getCapabilities, getChangelogHighlights, getEntriesForVersion, getLatestPiRelease, getModelSearchText, getNewEntries, getSearchableText, getSessionCommandCatalog, getSessionSkillCommands, handleSetViewedAgent, handleTranscriptBlockClick, hasAssistantVisibleContent, hasDefaultModelProvider, hyperlink, initialHostEngineViewSyncState, installEngineAgentViewBridge, interruptedNotice, isAnthropicSubscriptionAuthKey, isApiKeyLoginProvider, isChatSessionWorking, isClickExpandableBlock, isDeadTerminalError, isEngineHintRoute, isExpandable, isNewerPackageVersion, isResultWithoutCall, isSingleLeftClick, isUnansweredCancelMatch, loadEarendilAnnouncementImage, markHintRoutesAsEngine, matchesKey, needsChangelogPreload, normalizeChangelogLinks, observeClickExpansion, onTaskDismissed, openExternalEditorForText, openLocalAgentViewPort, openWaitedShellOf, os, panelHintParts, panelHintSegments, parkedRun, parseChangelogAsync, pasteClipboardImageToEditor, path, pickWhimsicalWorkingMessage, planPreViewCancelAck, prefixAutocompleteDescription, preloadChangelog, promptHistoryEntries, queuedMessageRows, readMountedAnchors, readTaskCompletionHistory, readTaskPrompts, refreshModelCatalogs, remoteAgentCommands, remoteAgentPrompts, renderAtomicAssemblyBanner, renderChatMessageEntry, renderStartupManifesto, renderTaskFooter, repaintAfterSingleClick, restoredQueue, retainChatRecords, retainedToolRenderer, retryCancelHint, retryWaitFromEvent, retryWaitMessage, rowsFrom, rpcShutdownErrorEvent, runHintRoute, runRendererCleanup, sameRows, sessionChatMount, sessionPromptsFromEntries, setAgentViewBridge, setKeybindings, setRendererClickTarget, settleUnansweredCalls, shouldCancelEngineViewOnArrival, showAgentPanel, showEngineTaskInspector, showTaskInspector, spawn, stopAllBackgroundWork, supersedeBlockClicks, supportsAtomicBanner, taskChatKeys, taskListSections, taskNameAndTitle, taskSiblings, themedChatHostStyle, toolResultGroupState, viewedAgentCommand, visibleWidth, webUrl, withBlockRenderTime };
27147
27247
 
27148
27248
  //# sourceMappingURL=mode-shared-2QJSCUM6.js.map
27149
27249
  // __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
@@ -27152,7 +27252,7 @@ function __atomicOnDemandFailed(error, feature) {
27152
27252
  return (async () => {
27153
27253
  const root = new URL("../", import.meta.url);
27154
27254
  const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
27155
- const key = `${root.href}#0.10.5`;
27255
+ const key = `${root.href}#0.10.6`;
27156
27256
  let release = releases.get(key);
27157
27257
  if (release === undefined) {
27158
27258
  const current = (async () => {
@@ -27180,7 +27280,7 @@ function __atomicOnDemandFailed(error, feature) {
27180
27280
  } catch {
27181
27281
  // No installation to read, as in a bundle of the package: the release the process runs decides.
27182
27282
  }
27183
- const updatedTo = typeof installed === "string" && installed !== "0.10.5" ? installed : running !== undefined && running.version !== "0.10.5" ? "0.10.5" : undefined;
27283
+ const updatedTo = typeof installed === "string" && installed !== "0.10.6" ? installed : running !== undefined && running.version !== "0.10.6" ? "0.10.6" : undefined;
27184
27284
  if (updatedTo === undefined) throw error;
27185
27285
  const application = typeof running?.name === "string" ? running.name : "atomic";
27186
27286
  const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {