@linxiraos/pi-tui 1.4.6 → 1.4.9

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 (399) hide show
  1. package/CHANGELOG.md +162 -244
  2. package/README.md +41 -35
  3. package/dist/types/app-keybindings.d.ts +20 -0
  4. package/dist/types/apps/session-picker.d.ts +5 -0
  5. package/dist/types/charts/chart-plan.d.ts +9 -7
  6. package/dist/types/charts/table-data.d.ts +4 -2
  7. package/dist/types/chat/assistant-message.d.ts +15 -3
  8. package/dist/types/chat/bash-execution.d.ts +6 -1
  9. package/dist/types/chat/display-preferences.d.ts +2 -0
  10. package/dist/types/chat/eval-execution.d.ts +2 -0
  11. package/dist/types/chat/execution-shared.d.ts +14 -8
  12. package/dist/types/chat/extension-types.d.ts +31 -0
  13. package/dist/types/chat/figure-markdown.d.ts +2 -0
  14. package/dist/types/chat/reply-write.d.ts +48 -0
  15. package/dist/types/chat/svg-figure.d.ts +5 -0
  16. package/dist/types/chat/table-chart.d.ts +6 -3
  17. package/dist/types/chat/tool-execution.d.ts +1 -2
  18. package/dist/types/chat/transcript-outline.d.ts +7 -0
  19. package/dist/types/chat/transcript-render-helpers.d.ts +13 -3
  20. package/dist/types/chrome/dynamic-border.d.ts +6 -0
  21. package/dist/types/chrome/index.d.ts +1 -0
  22. package/dist/types/chrome/transcript-notice.d.ts +35 -0
  23. package/dist/types/chrome/transcript-status.d.ts +21 -9
  24. package/dist/types/components/editor.d.ts +23 -6
  25. package/dist/types/components/image.d.ts +6 -0
  26. package/dist/types/components/loader.d.ts +2 -0
  27. package/dist/types/components/markdown.d.ts +7 -0
  28. package/dist/types/keybinding-matchers.d.ts +7 -0
  29. package/dist/types/native/blobs.d.ts +2 -1
  30. package/dist/types/native/describe.d.ts +4 -2
  31. package/dist/types/native/node.d.ts +2 -3
  32. package/dist/types/native/overlay.d.ts +42 -2
  33. package/dist/types/native/picker.d.ts +4 -4
  34. package/dist/types/native/state.d.ts +4 -0
  35. package/dist/types/overlays/annotation-overlay.d.ts +7 -1
  36. package/dist/types/overlays/annotation-types.d.ts +28 -0
  37. package/dist/types/overlays/btw-history-panel.d.ts +15 -0
  38. package/dist/types/overlays/btw-history.d.ts +24 -0
  39. package/dist/types/overlays/btw-inject.d.ts +22 -0
  40. package/dist/types/overlays/btw-panel.d.ts +7 -0
  41. package/dist/types/overlays/hook-editor.d.ts +2 -0
  42. package/dist/types/overlays/jobs-panel.d.ts +4 -0
  43. package/dist/types/overlays/login-dialog.d.ts +5 -1
  44. package/dist/types/overlays/model-browser.d.ts +11 -2
  45. package/dist/types/overlays/oauth-selector.d.ts +23 -0
  46. package/dist/types/overlays/plan-review-overlay.d.ts +2 -0
  47. package/dist/types/overlays/rewind-selector.d.ts +1 -1
  48. package/dist/types/overlays/session-selector.d.ts +33 -4
  49. package/dist/types/prompt/composer.d.ts +56 -5
  50. package/dist/types/prompt/interactive-context-helpers.d.ts +10 -3
  51. package/dist/types/render/extension-links.d.ts +65 -0
  52. package/dist/types/render/hyperlink.d.ts +25 -7
  53. package/dist/types/render/index.d.ts +1 -0
  54. package/dist/types/render/render-utils.d.ts +23 -1
  55. package/dist/types/setup/scenes/glyph.d.ts +1 -1
  56. package/dist/types/setup/scenes/model.d.ts +1 -1
  57. package/dist/types/setup/scenes/outro.d.ts +5 -4
  58. package/dist/types/setup/scenes/sign-in.d.ts +13 -8
  59. package/dist/types/setup/scenes/types.d.ts +16 -1
  60. package/dist/types/setup/startup-splash.d.ts +1 -1
  61. package/dist/types/setup/wizard-overlay.d.ts +11 -7
  62. package/dist/types/setup/wizard.d.ts +5 -1
  63. package/dist/types/status-line/component.d.ts +1 -1
  64. package/dist/types/status-line/context-usage.d.ts +28 -6
  65. package/dist/types/status-line/host.d.ts +6 -2
  66. package/dist/types/status-line/startup.d.ts +0 -15
  67. package/dist/types/terminal-capabilities.d.ts +1 -1
  68. package/dist/types/theme/symbols.d.ts +3 -1
  69. package/dist/types/theme/theme-class.d.ts +1 -0
  70. package/dist/types/theme/theme.d.ts +1 -24
  71. package/dist/types/theme/tui-adapters.d.ts +2 -0
  72. package/dist/types/thinking.d.ts +8 -6
  73. package/dist/types/tools/ast-grep.d.ts +2 -0
  74. package/dist/types/tools/bash-interactive.d.ts +6 -0
  75. package/dist/types/tools/bash.d.ts +2 -0
  76. package/dist/types/tools/default-renderer.d.ts +6 -4
  77. package/dist/types/tools/eval.d.ts +2 -0
  78. package/dist/types/tools/find.d.ts +1 -1
  79. package/dist/types/tools/grouped-file-output.d.ts +100 -19
  80. package/dist/types/tools/hashline-format.d.ts +5 -0
  81. package/dist/types/tools/irc.d.ts +6 -0
  82. package/dist/types/tools/json-tree.d.ts +23 -4
  83. package/dist/types/tools/lsp.d.ts +2 -0
  84. package/dist/types/tools/mcp.d.ts +6 -5
  85. package/dist/types/tools/native-view.d.ts +3 -1
  86. package/dist/types/tools/output-meta.d.ts +27 -0
  87. package/dist/types/tools/read.d.ts +14 -4
  88. package/dist/types/tools/renderer.d.ts +2 -0
  89. package/dist/types/tools/streaming-output.d.ts +11 -0
  90. package/dist/types/tools/task.d.ts +13 -4
  91. package/dist/types/tools/url-scheme-host.d.ts +17 -0
  92. package/dist/types/tools/wait.d.ts +2 -0
  93. package/dist/types/tools/yield.d.ts +1 -1
  94. package/dist/types/tui.d.ts +19 -2
  95. package/dist/types/utils.d.ts +4 -0
  96. package/package.json +10 -14
  97. package/src/app-keybindings.d.ts +20 -0
  98. package/src/app-keybindings.ts +20 -0
  99. package/src/apps/git/git-tui.ts +10 -17
  100. package/src/apps/git/sidebar.ts +21 -35
  101. package/src/apps/ps-top.ts +4 -12
  102. package/src/apps/session-picker.ts +7 -0
  103. package/src/charts/chart-plan.d.ts +9 -7
  104. package/src/charts/chart-plan.ts +20 -79
  105. package/src/charts/table-data.d.ts +4 -2
  106. package/src/charts/table-data.ts +55 -6
  107. package/src/chat/advisor-message.ts +2 -0
  108. package/src/chat/assistant-message.d.ts +15 -3
  109. package/src/chat/assistant-message.ts +137 -19
  110. package/src/chat/background-tan-message.ts +4 -0
  111. package/src/chat/bash-execution.d.ts +6 -1
  112. package/src/chat/bash-execution.ts +26 -9
  113. package/src/chat/chat-transcript-builder.ts +63 -30
  114. package/src/chat/compaction-summary-message.ts +2 -1
  115. package/src/chat/display-preferences.d.ts +2 -0
  116. package/src/chat/display-preferences.ts +3 -0
  117. package/src/chat/eval-execution.d.ts +2 -0
  118. package/src/chat/eval-execution.ts +14 -7
  119. package/src/chat/execution-shared.d.ts +14 -8
  120. package/src/chat/execution-shared.ts +39 -18
  121. package/src/chat/extension-types.d.ts +31 -0
  122. package/src/chat/extension-types.ts +34 -0
  123. package/src/chat/figure-markdown.d.ts +2 -0
  124. package/src/chat/figure-markdown.ts +6 -4
  125. package/src/chat/read-tool-group.ts +56 -36
  126. package/src/chat/reply-write.d.ts +48 -0
  127. package/src/chat/reply-write.ts +127 -0
  128. package/src/chat/svg-figure.d.ts +5 -0
  129. package/src/chat/svg-figure.ts +55 -16
  130. package/src/chat/table-chart.d.ts +6 -3
  131. package/src/chat/table-chart.ts +29 -6
  132. package/src/chat/tool-execution.d.ts +1 -2
  133. package/src/chat/tool-execution.ts +20 -13
  134. package/src/chat/transcript-outline.d.ts +7 -0
  135. package/src/chat/transcript-outline.ts +27 -0
  136. package/src/chat/transcript-render-helpers.d.ts +13 -3
  137. package/src/chat/transcript-render-helpers.ts +134 -44
  138. package/src/chrome/dynamic-border.d.ts +6 -0
  139. package/src/chrome/dynamic-border.ts +28 -2
  140. package/src/chrome/index.ts +1 -0
  141. package/src/chrome/transcript-notice.d.ts +35 -0
  142. package/src/chrome/transcript-notice.ts +83 -0
  143. package/src/chrome/transcript-status.d.ts +21 -9
  144. package/src/chrome/transcript-status.ts +32 -30
  145. package/src/components/editor.d.ts +23 -6
  146. package/src/components/editor.ts +133 -25
  147. package/src/components/image.d.ts +6 -0
  148. package/src/components/image.ts +13 -0
  149. package/src/components/key-value-list.ts +9 -9
  150. package/src/components/loader.d.ts +2 -0
  151. package/src/components/loader.ts +7 -0
  152. package/src/components/markdown.d.ts +7 -0
  153. package/src/components/markdown.ts +116 -6
  154. package/src/components/section.ts +1 -9
  155. package/src/components/table.ts +1 -9
  156. package/src/hotkeys-markdown.ts +1 -0
  157. package/src/keybinding-matchers.d.ts +7 -0
  158. package/src/keybinding-matchers.ts +13 -0
  159. package/src/native/backend.ts +10 -67
  160. package/src/native/blobs.d.ts +2 -1
  161. package/src/native/blobs.ts +3 -2
  162. package/src/native/describe.d.ts +4 -2
  163. package/src/native/describe.ts +9 -4
  164. package/src/native/node.d.ts +2 -3
  165. package/src/native/node.ts +2 -3
  166. package/src/native/overlay.d.ts +42 -2
  167. package/src/native/overlay.ts +124 -16
  168. package/src/native/picker.d.ts +4 -4
  169. package/src/native/picker.ts +4 -4
  170. package/src/native/state.d.ts +4 -0
  171. package/src/native/state.ts +25 -5
  172. package/src/overlays/advisor-config.ts +1 -10
  173. package/src/overlays/annotation-overlay.ts +125 -37
  174. package/src/overlays/annotation-types.ts +24 -0
  175. package/src/overlays/btw-history-panel.ts +106 -14
  176. package/src/overlays/btw-history.ts +65 -0
  177. package/src/overlays/btw-inject.ts +91 -0
  178. package/src/overlays/btw-panel.ts +53 -12
  179. package/src/overlays/extensions/extension-dashboard.ts +7 -8
  180. package/src/overlays/hook-editor.ts +6 -0
  181. package/src/overlays/hook-selector.ts +2 -2
  182. package/src/overlays/jobs-panel.ts +82 -22
  183. package/src/overlays/login-dialog.ts +39 -31
  184. package/src/overlays/mcp-add-wizard.ts +1 -1
  185. package/src/overlays/model-browser.ts +106 -10
  186. package/src/overlays/model-hub.ts +1 -7
  187. package/src/overlays/model-picker.ts +1 -10
  188. package/src/overlays/oauth-selector.ts +44 -6
  189. package/src/overlays/plan-review-overlay.ts +13 -2
  190. package/src/overlays/rewind-selector.ts +29 -12
  191. package/src/overlays/session-selector.ts +338 -47
  192. package/src/overlays/settings-defs.ts +2 -2
  193. package/src/overlays/tree-selector.ts +83 -27
  194. package/src/overlays/usage-dashboard.ts +9 -18
  195. package/src/prompt/composer.ts +233 -6
  196. package/src/prompt/custom-editor.ts +6 -1
  197. package/src/prompt/emoji-autocomplete.ts +0 -2
  198. package/src/prompt/interactive-context-helpers.ts +29 -4
  199. package/src/render/code-cell.ts +1 -1
  200. package/src/render/extension-links.d.ts +65 -0
  201. package/src/render/extension-links.ts +214 -0
  202. package/src/render/file-list.ts +4 -7
  203. package/src/render/hyperlink.d.ts +25 -7
  204. package/src/render/hyperlink.ts +65 -9
  205. package/src/render/index.d.ts +1 -0
  206. package/src/render/index.ts +1 -0
  207. package/src/render/render-utils.d.ts +23 -1
  208. package/src/render/render-utils.ts +38 -6
  209. package/src/setup/scenes/composer.ts +2 -0
  210. package/src/setup/scenes/glyph.ts +4 -2
  211. package/src/setup/scenes/model.ts +192 -29
  212. package/src/setup/scenes/outro.ts +33 -15
  213. package/src/setup/scenes/sign-in.ts +196 -400
  214. package/src/setup/scenes/theme.ts +2 -0
  215. package/src/setup/scenes/types.ts +18 -1
  216. package/src/setup/startup-splash.ts +8 -7
  217. package/src/setup/wizard-overlay.ts +164 -35
  218. package/src/setup/wizard.ts +11 -2
  219. package/src/status-line/component.ts +4 -10
  220. package/src/status-line/context-usage.ts +72 -21
  221. package/src/status-line/host.ts +6 -2
  222. package/src/status-line/startup.ts +36 -70
  223. package/src/terminal-capabilities.d.ts +1 -1
  224. package/src/terminal-capabilities.ts +5 -0
  225. package/src/terminal.ts +24 -2
  226. package/src/theme/defaults.json +1 -0
  227. package/src/theme/loader.ts +1 -1
  228. package/src/theme/symbols.d.ts +3 -1
  229. package/src/theme/symbols.ts +16 -9
  230. package/src/theme/theme-class.d.ts +1 -0
  231. package/src/theme/theme-class.ts +15 -3
  232. package/src/theme/theme.d.ts +1 -24
  233. package/src/theme/theme.ts +3 -75
  234. package/src/theme/tui-adapters.d.ts +2 -0
  235. package/src/theme/tui-adapters.ts +8 -3
  236. package/src/thinking.d.ts +8 -6
  237. package/src/thinking.ts +17 -11
  238. package/src/tmux.ts +1 -0
  239. package/src/tools/agent-tree.ts +13 -11
  240. package/src/tools/ask.ts +24 -37
  241. package/src/tools/ast-edit.ts +48 -93
  242. package/src/tools/ast-grep.d.ts +2 -0
  243. package/src/tools/ast-grep.ts +31 -67
  244. package/src/tools/bash-interactive.d.ts +49 -0
  245. package/src/tools/bash-interactive.ts +6 -1
  246. package/src/tools/bash.d.ts +2 -0
  247. package/src/tools/bash.ts +9 -0
  248. package/src/tools/default-renderer.d.ts +6 -4
  249. package/src/tools/default-renderer.ts +10 -7
  250. package/src/tools/edit.ts +50 -43
  251. package/src/tools/eval.d.ts +2 -0
  252. package/src/tools/eval.ts +16 -4
  253. package/src/tools/fetch.ts +2 -1
  254. package/src/tools/find.d.ts +1 -1
  255. package/src/tools/find.ts +13 -5
  256. package/src/tools/github.ts +14 -46
  257. package/src/tools/glob.ts +2 -1
  258. package/src/tools/grep.ts +47 -277
  259. package/src/tools/grouped-file-output.d.ts +100 -19
  260. package/src/tools/grouped-file-output.ts +414 -103
  261. package/src/tools/hashline-format.d.ts +5 -0
  262. package/src/tools/hashline-format.ts +5 -0
  263. package/src/tools/irc.d.ts +6 -0
  264. package/src/tools/irc.ts +6 -0
  265. package/src/tools/job-widget.ts +13 -1
  266. package/src/tools/json-tree.d.ts +23 -4
  267. package/src/tools/json-tree.ts +132 -46
  268. package/src/tools/lsp.d.ts +2 -0
  269. package/src/tools/lsp.ts +246 -47
  270. package/src/tools/mcp.d.ts +6 -5
  271. package/src/tools/mcp.ts +20 -12
  272. package/src/tools/native-view.d.ts +3 -1
  273. package/src/tools/native-view.ts +12 -6
  274. package/src/tools/output-meta.d.ts +27 -0
  275. package/src/tools/output-meta.ts +68 -4
  276. package/src/tools/proc-render.ts +3 -3
  277. package/src/tools/read.d.ts +14 -4
  278. package/src/tools/read.ts +20 -5
  279. package/src/tools/renderer.d.ts +2 -0
  280. package/src/tools/renderer.ts +2 -0
  281. package/src/tools/streaming-output.d.ts +11 -0
  282. package/src/tools/streaming-output.ts +41 -0
  283. package/src/tools/task.d.ts +13 -4
  284. package/src/tools/task.ts +100 -97
  285. package/src/tools/url-scheme-host.d.ts +17 -0
  286. package/src/tools/url-scheme-host.ts +21 -0
  287. package/src/tools/vibe.ts +4 -4
  288. package/src/tools/wait.d.ts +2 -0
  289. package/src/tools/wait.ts +8 -5
  290. package/src/tools/write.ts +17 -27
  291. package/src/tools/yield.d.ts +1 -1
  292. package/src/tools/yield.ts +19 -10
  293. package/src/tui.d.ts +19 -2
  294. package/src/tui.ts +134 -24
  295. package/src/utils.d.ts +4 -0
  296. package/src/utils.ts +10 -0
  297. package/dist/types/theme/defaults/index.d.ts +0 -10289
  298. package/src/theme/defaults/alabaster.json +0 -103
  299. package/src/theme/defaults/amethyst.json +0 -106
  300. package/src/theme/defaults/anthracite.json +0 -103
  301. package/src/theme/defaults/basalt.json +0 -101
  302. package/src/theme/defaults/birch.json +0 -105
  303. package/src/theme/defaults/dark-abyss.json +0 -101
  304. package/src/theme/defaults/dark-arctic.json +0 -114
  305. package/src/theme/defaults/dark-aurora.json +0 -105
  306. package/src/theme/defaults/dark-catppuccin.json +0 -117
  307. package/src/theme/defaults/dark-cavern.json +0 -101
  308. package/src/theme/defaults/dark-celestial.json +0 -116
  309. package/src/theme/defaults/dark-copper.json +0 -105
  310. package/src/theme/defaults/dark-cosmos.json +0 -100
  311. package/src/theme/defaults/dark-cyberpunk.json +0 -112
  312. package/src/theme/defaults/dark-dracula.json +0 -108
  313. package/src/theme/defaults/dark-eclipse.json +0 -101
  314. package/src/theme/defaults/dark-ember.json +0 -105
  315. package/src/theme/defaults/dark-equinox.json +0 -100
  316. package/src/theme/defaults/dark-forest.json +0 -106
  317. package/src/theme/defaults/dark-github.json +0 -115
  318. package/src/theme/defaults/dark-gruvbox.json +0 -122
  319. package/src/theme/defaults/dark-lavender.json +0 -105
  320. package/src/theme/defaults/dark-lunar.json +0 -99
  321. package/src/theme/defaults/dark-midnight.json +0 -105
  322. package/src/theme/defaults/dark-monochrome.json +0 -104
  323. package/src/theme/defaults/dark-monokai.json +0 -108
  324. package/src/theme/defaults/dark-nebula.json +0 -100
  325. package/src/theme/defaults/dark-neon-noir.json +0 -110
  326. package/src/theme/defaults/dark-nord.json +0 -108
  327. package/src/theme/defaults/dark-ocean.json +0 -111
  328. package/src/theme/defaults/dark-one.json +0 -110
  329. package/src/theme/defaults/dark-poimandres.json +0 -125
  330. package/src/theme/defaults/dark-rainforest.json +0 -101
  331. package/src/theme/defaults/dark-reef.json +0 -101
  332. package/src/theme/defaults/dark-retro.json +0 -102
  333. package/src/theme/defaults/dark-rose-pine.json +0 -106
  334. package/src/theme/defaults/dark-sakura.json +0 -105
  335. package/src/theme/defaults/dark-slate.json +0 -105
  336. package/src/theme/defaults/dark-solarized.json +0 -107
  337. package/src/theme/defaults/dark-solstice.json +0 -100
  338. package/src/theme/defaults/dark-starfall.json +0 -101
  339. package/src/theme/defaults/dark-sunset.json +0 -109
  340. package/src/theme/defaults/dark-swamp.json +0 -100
  341. package/src/theme/defaults/dark-synthwave.json +0 -113
  342. package/src/theme/defaults/dark-taiga.json +0 -101
  343. package/src/theme/defaults/dark-terminal.json +0 -105
  344. package/src/theme/defaults/dark-tokyo-night.json +0 -111
  345. package/src/theme/defaults/dark-tundra.json +0 -101
  346. package/src/theme/defaults/dark-twilight.json +0 -101
  347. package/src/theme/defaults/dark-volcanic.json +0 -101
  348. package/src/theme/defaults/graphite.json +0 -102
  349. package/src/theme/defaults/index.d.ts +0 -10289
  350. package/src/theme/defaults/index.ts +0 -203
  351. package/src/theme/defaults/light-arctic.json +0 -117
  352. package/src/theme/defaults/light-aurora-day.json +0 -101
  353. package/src/theme/defaults/light-canyon.json +0 -101
  354. package/src/theme/defaults/light-catppuccin.json +0 -116
  355. package/src/theme/defaults/light-cirrus.json +0 -100
  356. package/src/theme/defaults/light-coral.json +0 -105
  357. package/src/theme/defaults/light-cyberpunk.json +0 -106
  358. package/src/theme/defaults/light-dawn.json +0 -100
  359. package/src/theme/defaults/light-dunes.json +0 -101
  360. package/src/theme/defaults/light-eucalyptus.json +0 -105
  361. package/src/theme/defaults/light-forest.json +0 -110
  362. package/src/theme/defaults/light-frost.json +0 -105
  363. package/src/theme/defaults/light-github.json +0 -125
  364. package/src/theme/defaults/light-glacier.json +0 -101
  365. package/src/theme/defaults/light-gruvbox.json +0 -118
  366. package/src/theme/defaults/light-haze.json +0 -100
  367. package/src/theme/defaults/light-honeycomb.json +0 -105
  368. package/src/theme/defaults/light-lagoon.json +0 -101
  369. package/src/theme/defaults/light-lavender.json +0 -105
  370. package/src/theme/defaults/light-meadow.json +0 -101
  371. package/src/theme/defaults/light-mint.json +0 -105
  372. package/src/theme/defaults/light-monochrome.json +0 -111
  373. package/src/theme/defaults/light-ocean.json +0 -109
  374. package/src/theme/defaults/light-one.json +0 -109
  375. package/src/theme/defaults/light-opal.json +0 -101
  376. package/src/theme/defaults/light-orchard.json +0 -101
  377. package/src/theme/defaults/light-paper.json +0 -105
  378. package/src/theme/defaults/light-poimandres.json +0 -125
  379. package/src/theme/defaults/light-prism.json +0 -100
  380. package/src/theme/defaults/light-retro.json +0 -108
  381. package/src/theme/defaults/light-sand.json +0 -105
  382. package/src/theme/defaults/light-savanna.json +0 -101
  383. package/src/theme/defaults/light-solarized.json +0 -112
  384. package/src/theme/defaults/light-soleil.json +0 -100
  385. package/src/theme/defaults/light-sunset.json +0 -109
  386. package/src/theme/defaults/light-synthwave.json +0 -108
  387. package/src/theme/defaults/light-tokyo-night.json +0 -121
  388. package/src/theme/defaults/light-wetland.json +0 -101
  389. package/src/theme/defaults/light-zenith.json +0 -99
  390. package/src/theme/defaults/limestone.json +0 -104
  391. package/src/theme/defaults/mahogany.json +0 -107
  392. package/src/theme/defaults/marble.json +0 -103
  393. package/src/theme/defaults/obsidian.json +0 -101
  394. package/src/theme/defaults/onyx.json +0 -101
  395. package/src/theme/defaults/pearl.json +0 -103
  396. package/src/theme/defaults/porcelain.json +0 -101
  397. package/src/theme/defaults/quartz.json +0 -106
  398. package/src/theme/defaults/sandstone.json +0 -105
  399. package/src/theme/defaults/titanium.json +0 -100
@@ -24,6 +24,7 @@ interface AppKeybindings {
24
24
  "app.message.followUp": true;
25
25
  "app.retry": true;
26
26
  "app.message.dequeue": true;
27
+ "app.btw.inject": true;
27
28
  "app.clipboard.pasteImage": true;
28
29
  "app.clipboard.pasteTextRaw": true;
29
30
  "app.clipboard.copyLine": true;
@@ -39,10 +40,13 @@ interface AppKeybindings {
39
40
  "app.session.rename": true;
40
41
  "app.session.delete": true;
41
42
  "app.session.deleteNoninvasive": true;
43
+ "app.session.pin": true;
44
+ "app.session.unpin": true;
42
45
  "app.tree.previousBranch": true;
43
46
  "app.tree.nextBranch": true;
44
47
  "app.plan.toggle": true;
45
48
  "app.history.search": true;
49
+ "app.links.hint": true;
46
50
  "app.stt.pushToTalk": true;
47
51
  "app.stt.toggle": true;
48
52
  "app.live.toggle": true;
@@ -269,6 +273,10 @@ export declare const KEYBINDINGS: {
269
273
  readonly defaultKeys: ["alt+up", "shift+up"];
270
274
  readonly description: "Dequeue message";
271
275
  };
276
+ readonly "app.btw.inject": {
277
+ readonly defaultKeys: "alt+i";
278
+ readonly description: "Send a /btw answer's steering prompt to the main session";
279
+ };
272
280
  readonly "app.clipboard.pasteImage": {
273
281
  readonly defaultKeys: KeyId[];
274
282
  readonly description: "Paste image or text from clipboard";
@@ -329,6 +337,14 @@ export declare const KEYBINDINGS: {
329
337
  readonly defaultKeys: "ctrl+backspace";
330
338
  readonly description: "Delete session (non-invasive)";
331
339
  };
340
+ readonly "app.session.pin": {
341
+ readonly defaultKeys: "alt+k";
342
+ readonly description: "Pin the selected session in the resume picker";
343
+ };
344
+ readonly "app.session.unpin": {
345
+ readonly defaultKeys: "alt+shift+k";
346
+ readonly description: "Unpin the selected session in the resume picker";
347
+ };
332
348
  readonly "app.tree.previousBranch": {
333
349
  readonly defaultKeys: [];
334
350
  readonly description: "Jump to the previous branch in /tree";
@@ -345,6 +361,10 @@ export declare const KEYBINDINGS: {
345
361
  readonly defaultKeys: "ctrl+r";
346
362
  readonly description: "Search history";
347
363
  };
364
+ readonly "app.links.hint": {
365
+ readonly defaultKeys: "alt+o";
366
+ readonly description: "Pick an extension link on screen by its hint tag";
367
+ };
348
368
  readonly "app.stt.pushToTalk": {
349
369
  readonly defaultKeys: "space";
350
370
  readonly description: "Hold to record speech-to-text";
@@ -5,6 +5,9 @@ export interface SessionPickerHost<T extends SessionSelectorEntry = SessionSelec
5
5
  loadPinnedIds?(): Promise<ReadonlySet<string>>;
6
6
  loadHistoryMatcher?(): SessionHistoryMatcher;
7
7
  deleteSession?(session: T): Promise<boolean>;
8
+ /** Rename the session and resolve with the title as stored, or null when it did not happen. */
9
+ renameSession?(session: T, title: string): Promise<string | null>;
10
+ setSessionPinned?(session: T, pinned: boolean): Promise<void>;
8
11
  loadAllSessions?(): Promise<T[]>;
9
12
  /** Builds the three-level resume source for the standalone `--resume` tree. */
10
13
  loadResumeSource?(deleteMode: "trash" | "permanent", workspacePath?: string): Promise<ResumeTreeSource | undefined>;
@@ -16,6 +19,8 @@ export interface SessionPickerOptions<T extends SessionSelectorEntry = SessionSe
16
19
  scopeLabel?: string | false;
17
20
  showCwd?: boolean;
18
21
  allowDelete?: boolean;
22
+ /** Rename the selected session; resolve with the title as stored, or null when it did not happen. */
23
+ onRename?: (session: T, title: string) => Promise<string | null>;
19
24
  allowGlobalScope?: boolean;
20
25
  historySearch?: boolean;
21
26
  pinnedIds?: ReadonlySet<string>;
@@ -419,9 +419,10 @@ export type ChartAnnotation = {
419
419
  export declare function planChart(table: TableAnalysis): ChartPlan | undefined;
420
420
  /**
421
421
  * Whether a model should pick `table`'s chart (`tui.autoGraph: smart`):
422
- * multi-series tables, and tables whose rows may be named by a number the
423
- * `guess` plots (`Thread | State`, `Finding | Current`), where only meaning
424
- * tells a name from a measure.
422
+ * multi-series tables, tables whose rows may be named by a number the
423
+ * `guess` plots (`Thread | State`, `Finding | Current`), and any other chart
424
+ * the guess would draw — only meaning tells a measure from page references,
425
+ * step numbers or figures quoted in prose, which the judge charts as none.
425
426
  */
426
427
  export declare function shouldJudge(table: TableAnalysis, guess: ChartPlan | undefined): boolean;
427
428
  /** Measure columns before `guess`'s text label column: numbers that may only name their rows. */
@@ -446,10 +447,11 @@ export declare function tableTakeaways(table: TableAnalysis, plan: ChartPlan, co
446
447
  */
447
448
  export declare function drawnNames(spec: ChartSpec): Set<string>;
448
449
  /**
449
- * The local guess at what `plan`'s rows and measures mean: header keywords
450
- * for each measure's {@link Polarity} (resources like tokens or memory only
451
- * beside a baseline), rivals from the label's header, focus from bolded or
452
- * `(current)` row names, and a status column whose cells vary.
450
+ * The local guess at what `plan`'s rows and measures mean: each measure's
451
+ * {@link Polarity} as far as its unit says ({@link dimPolarity}; what a name
452
+ * means — `Memory` as a capacity or a cost — is the judge's call), rivals from
453
+ * the label's header, focus from bolded or `(current)` row names, and a status
454
+ * column whose cells vary.
453
455
  */
454
456
  export declare function guessMeaning(table: TableAnalysis, plan: ChartPlan): Pick<ChartPlan, "polarity" | "rowPolarity" | "rivals" | "focus" | "status">;
455
457
  /** Whether `plan`'s rows may each be a metric of their own: a `change`, a transposed table, or mixed-unit columns. */
@@ -101,8 +101,10 @@ export interface TableColumn {
101
101
  /**
102
102
  * Index of the measure column this one restates, read from the values: a
103
103
  * proportional copy (`pass` 33/38 beside `pass%` 87%, `Samples` beside `% of
104
- * Total`, `Leverage vs $200` beside the cost) or a running total of it
105
- * (`Offset` summing `Verts`). Such a column is never a measure of its own.
104
+ * Total`, `Leverage vs $200` beside the cost), a running total of it
105
+ * (`Offset` summing `Verts`), or its ratio to another column of its unit
106
+ * (`ratio` 0.997 for `Python (ms)` ÷ `C++ (ms)`, `Speedup` 4.1×: the
107
+ * numerator's index). Such a column is never a measure of its own.
106
108
  */
107
109
  readonly restates?: number;
108
110
  }
@@ -1,7 +1,7 @@
1
1
  import type { AssistantMessage, ImageContent } from "@linxiraos/pi-ai";
2
2
  import { type Component, Container } from "../tui.js";
3
3
  import { type ImageBudget } from "../components/image.js";
4
- import type { AssistantThinkingRenderer } from "./extension-types.js";
4
+ import type { AssistantTextRenderer, AssistantTextRendering, AssistantThinkingRenderer } from "./extension-types.js";
5
5
  import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
6
6
  import { type CacheInvalidation } from "./cache-invalidation-marker.js";
7
7
  import { type ServedModelMismatch } from "./served-model-marker.js";
@@ -38,7 +38,7 @@ export declare class AssistantMessageComponent extends Container {
38
38
  * for lack of a target is re-rendered with its reaction stripped.
39
39
  */
40
40
  pickReactionTarget(transcript: readonly Component[]): void;
41
- constructor(message?: AssistantMessage, hideThinkingBlock?: boolean, onImageUpdate?: () => void, thinkingRenderers?: readonly AssistantThinkingRenderer[], imageBudget?: ImageBudget, proseOnlyThinking?: boolean, linkTargets?: ReadonlyMap<string, string>, expandThinkingBlocks?: boolean);
41
+ constructor(message?: AssistantMessage, hideThinkingBlock?: boolean, onImageUpdate?: () => void, thinkingRenderers?: readonly AssistantThinkingRenderer[], imageBudget?: ImageBudget, proseOnlyThinking?: boolean, linkTargets?: ReadonlyMap<string, string>, expandThinkingBlocks?: boolean, textRendering?: AssistantTextRendering);
42
42
  /**
43
43
  * Show or clear the trailing cache-invalidation divider. Set at `message_end`
44
44
  * (live) or during rebuild, once the turn's usage is known and compared
@@ -87,7 +87,7 @@ export declare class AssistantMessageComponent extends Container {
87
87
  */
88
88
  setExpanded(expanded: boolean): void;
89
89
  isTranscriptBlockFinalized(): boolean;
90
- /** Whether a figure still waits for the raster of its final source; the transcript holds retirement meanwhile. */
90
+ /** Hold image and figure rendering until the completed block can enter immutable scrollback. */
91
91
  isTranscriptBlockPending(): boolean;
92
92
  render(width: number): readonly string[];
93
93
  /**
@@ -122,7 +122,19 @@ export declare class AssistantMessageComponent extends Container {
122
122
  renderTranscriptBlockEmergencyRow(width: number): string | undefined;
123
123
  getTranscriptBlockVersion(): number;
124
124
  markTranscriptBlockFinalized(): void;
125
+ /**
126
+ * Swap the extension text renderers (the setting enabling them changed) and redraw with them.
127
+ * Enabling them also drops rows already published as stable, since a renderer may rewrite them;
128
+ * callers MUST pair this with a scrollback-clearing display reset, as for
129
+ * {@link resetTranscriptStableRows}.
130
+ */
131
+ setTextRenderers(renderers: readonly AssistantTextRenderer[]): void;
125
132
  applyRetryRecovery(retryRecovery: AssistantMessage["retryRecovery"]): void;
133
+ /**
134
+ * Draw the current message again when it is the reply sent at `timestamp`, re-running the
135
+ * extension text renderers; returns whether it was. The caller schedules the frame.
136
+ */
137
+ rerenderMessage(timestamp: number): boolean;
126
138
  messagePersistenceKey(): string | undefined;
127
139
  /** Toggle rendering for assistant-native and tool-result images. */
128
140
  setImagesVisible(visible: boolean): void;
@@ -4,7 +4,7 @@
4
4
  import type { ImageContent } from "@linxiraos/pi-ai";
5
5
  import { Container, type TUI } from "../tui.js";
6
6
  import type { OutputArtifactError } from "../tools/streaming-output.js";
7
- import type { TruncationMeta } from "../tools/output-meta.js";
7
+ import type { MinimizedMeta, TruncationMeta } from "../tools/output-meta.js";
8
8
  import { type DescribeContext, type NativeNode, type NativeUiEvent } from "../native/node.js";
9
9
  /** PTY size for `!` commands: the execution frame's inner content area. */
10
10
  export declare function bashPtyViewport(ui: TUI): {
@@ -37,13 +37,18 @@ export declare class BashExecutionComponent extends Container {
37
37
  appendOutput(chunk: string): void;
38
38
  /** Switch to PTY rendering and feed raw terminal bytes through the vterm replay. */
39
39
  appendPtyChunk(chunk: string): void;
40
+ /** Bytes a terminal would send for a key event, honoring the command's cursor-key mode; "" for key releases. */
41
+ encodePtyInput(data: string): string;
40
42
  setComplete(exitCode: number | undefined, cancelled: boolean, options?: {
41
43
  output?: string;
42
44
  truncation?: TruncationMeta;
43
45
  artifactError?: OutputArtifactError;
46
+ minimized?: MinimizedMeta;
44
47
  images?: readonly ImageContent[];
45
48
  showImages?: boolean;
46
49
  }): void;
50
+ /** The loader animates the bottom border from outside the child tree, so teardown stops it here. */
51
+ dispose(): void;
47
52
  render(width: number): readonly string[];
48
53
  /**
49
54
  * Get the raw output for creating BashExecutionMessage.
@@ -6,6 +6,8 @@ export interface ChatTranscriptDisplayPreferences {
6
6
  cacheMissMarker: boolean;
7
7
  showTokenUsage: boolean;
8
8
  showTurnTime: boolean;
9
+ /** Max rows a collapsed advisor card shows below its header; 0 = no cap. */
10
+ advisorCollapsedLines: number;
9
11
  }
10
12
  /** Current transcript display preferences. */
11
13
  export declare const chatTranscriptDisplayPreferences: ChatTranscriptDisplayPreferences;
@@ -32,6 +32,8 @@ export declare class EvalExecutionComponent extends Container {
32
32
  truncation?: TruncationMeta;
33
33
  artifactError?: OutputArtifactError;
34
34
  }): void;
35
+ /** The loader animates the bottom border from outside the child tree, so teardown stops it here. */
36
+ dispose(): void;
35
37
  getOutput(): string;
36
38
  getCode(): string;
37
39
  }
@@ -10,7 +10,8 @@ import { Loader } from "../components/loader.js";
10
10
  import { Text } from "../components/text.js";
11
11
  import { Container, type TUI } from "../tui.js";
12
12
  import type { OutputArtifactError } from "../tools/streaming-output.js";
13
- import { type TruncationMeta } from "../tools/output-meta.js";
13
+ import { type MinimizedMeta, type TruncationMeta } from "../tools/output-meta.js";
14
+ import { DynamicBorder } from "../chrome/dynamic-border.js";
14
15
  import type { TspText } from "@linxiraos/pi-wire";
15
16
  import type { NativeChild, NativeNode } from "../native/node.js";
16
17
  /** Output rows shown while an execution is collapsed. */
@@ -25,23 +26,26 @@ export type ExecutionColorKey = "dim" | "bashMode" | "pythonMode";
25
26
  /**
26
27
  * Build the spacer + top border + content container + bottom border scaffold
27
28
  * that bash and eval execution components share. The caller appends the
28
- * header (command vs `>>>` prompt) and the returned loader to
29
- * `contentContainer` so per-mode order is preserved.
29
+ * header (command vs `>>>` prompt) to `contentContainer` and keeps the run's
30
+ * state in `bottomBorder` ({@link executionStatusLabel}); the returned loader
31
+ * animates that label rather than taking a row of its own.
30
32
  */
31
33
  export declare function buildExecutionFrame(parent: Container, ui: TUI, colorKey: ExecutionColorKey): {
32
34
  contentContainer: Container;
33
35
  loader: Loader;
36
+ bottomBorder: DynamicBorder;
34
37
  };
38
+ /** The bottom-border marker of a settled run: `exit N` for a failure, `cancelled` for a cancel. */
39
+ export declare function executionStatusLabel(status: Exclude<ExecutionStatus, "running">, exitCode: number | undefined): string | undefined;
35
40
  /**
36
- * Build the post-run status block (hidden-line hint, exit/cancel marker,
37
- * truncation notice). Returns undefined when there is nothing to display so
38
- * callers can skip appending a stray Text child.
41
+ * Build the post-run status block (hidden-line hint, truncation notice).
42
+ * Returns undefined when there is nothing to display so callers can skip
43
+ * appending a stray Text child.
39
44
  */
40
45
  export declare function buildStatusFooter(opts: {
41
- status: ExecutionStatus;
42
- exitCode: number | undefined;
43
46
  truncation: TruncationMeta | undefined;
44
47
  artifactError?: OutputArtifactError;
48
+ minimized?: MinimizedMeta;
45
49
  hiddenLineCount: number;
46
50
  /** Suppress the "… N more lines" hint (used when sixel passthrough renders the full output). */
47
51
  suppressHiddenCount?: boolean;
@@ -64,6 +68,7 @@ export interface ExecutionCardInput {
64
68
  readonly exitCode: number | undefined;
65
69
  readonly truncation: TruncationMeta | undefined;
66
70
  readonly artifactError?: OutputArtifactError;
71
+ readonly minimized?: MinimizedMeta;
67
72
  }
68
73
  /**
69
74
  * Native card shared by user bash/eval runs: the head with a live `elapsed`
@@ -94,6 +99,7 @@ export interface ExecutionToolInput {
94
99
  readonly exitCode: number | undefined;
95
100
  readonly truncation: TruncationMeta | undefined;
96
101
  readonly artifactError?: OutputArtifactError;
102
+ readonly minimized?: MinimizedMeta;
97
103
  }
98
104
  /**
99
105
  * A user `!`/`$` run as the agent's `tool` frame (§6.6): a head with a `you`
@@ -1,3 +1,4 @@
1
+ import type { AssistantMessage } from "@linxiraos/pi-ai";
1
2
  import type { Component, TUI } from "../tui.js";
2
3
  import type { Theme } from "../theme/theme.js";
3
4
  import type { CustomMessage, HookMessage } from "./messages.js";
@@ -17,6 +18,36 @@ export interface AssistantThinkingRenderContext {
17
18
  requestRender(): void;
18
19
  }
19
20
  export type AssistantThinkingRenderer = (context: AssistantThinkingRenderContext, theme: Theme) => Component | undefined;
21
+ export interface AssistantTextRenderContext {
22
+ /**
23
+ * The message being drawn; `message.timestamp` identifies the reply for `ctx.ui.rerenderMessage()`.
24
+ * After a tool call this is only the segment drawn there, so its `content` does not hold the whole reply.
25
+ * A deep copy: editing it, at any depth, cannot change the stored reply.
26
+ */
27
+ message: AssistantMessage;
28
+ /**
29
+ * The text block's index in the full reply's `content`, also when the reply is drawn in segments
30
+ * around tool calls; not an index into `message.content` for a segment. It counts the content as
31
+ * currently stored: a transcript rebuild that drops tool calls left without a result shifts later
32
+ * blocks down, so do not persist it as a permanent key.
33
+ */
34
+ contentIndex: number;
35
+ /** The block's markdown as drawn so far, after any earlier renderer. */
36
+ text: string;
37
+ /** True while the block may still grow; false for its final render, a block sealed at a tool call, and later redraws. */
38
+ streaming: boolean;
39
+ }
40
+ /**
41
+ * Display-only transform of one assistant text block: returns the markdown to draw, or `undefined`
42
+ * to draw `context.text` unchanged. The session, exports and model context keep the original text.
43
+ */
44
+ export type AssistantTextRenderer = (context: AssistantTextRenderContext) => string | undefined;
45
+ /** Extension text renderers for one assistant component, and where its content starts in the full reply. */
46
+ export interface AssistantTextRendering {
47
+ renderers: readonly AssistantTextRenderer[];
48
+ /** Index in the full reply's `content` of this component's first block; a segment after a tool call starts past it. */
49
+ contentOffset: number;
50
+ }
20
51
  export interface HookMessageRenderOptions {
21
52
  /** Whether the view is expanded */
22
53
  expanded: boolean;
@@ -8,6 +8,8 @@ export interface FigureMarkdownOptions {
8
8
  charts: boolean;
9
9
  /** Shared inline-image budget for the figures. */
10
10
  budget?: ImageBudget;
11
+ /** Rows each figure may fill, read on every render; callers reserve prose, chrome and separators themselves. Unset or `undefined` takes a share of the terminal viewport. */
12
+ maxRows?: () => number | undefined;
11
13
  /** A figure's rows changed outside a text update (raster landed, fell back to code). */
12
14
  onChange: () => void;
13
15
  }
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Replies: text the agent sends to a scheme whose writes are `reply`-scoped (`out://`)
3
+ * is its mid-turn message to the user, drawn as assistant prose so it can answer
4
+ * without ending its turn.
5
+ * - A `write` call to a reply URL draws as {@link ReplyWriteComponent}, streaming as the
6
+ * call's arguments arrive, instead of a tool card.
7
+ * - Text a tool's commands write there (`printf … > out://` in bash) arrives in the
8
+ * tool's result `details.replies` ({@link toolResultReplies}); transcripts draw each
9
+ * one as a prose block after the call ({@link replyDisplayMessage}).
10
+ */
11
+ import type { AssistantMessage } from "@linxiraos/pi-ai";
12
+ import type { ImageBudget } from "../components/image.js";
13
+ import { AssistantMessageComponent } from "./assistant-message.js";
14
+ import type { ToolExecutionHandle, ToolResultFrame } from "./tool-execution.js";
15
+ /**
16
+ * Whether a `toolName` call writes to a reply URL. `undefined` while streamed args cannot tell yet:
17
+ * no path so far, or a path that could still grow into a reply URL (`ou`, `out:/`). Callers holding
18
+ * final args treat `undefined` as `false`.
19
+ */
20
+ export declare function isReplyWrite(toolName: string, args: unknown): boolean | undefined;
21
+ /** Display options of a reply block; the rest of its presentation follows the assistant prose defaults. */
22
+ export interface ReplyWriteOptions {
23
+ /** Repaint request for figures and images that finish loading after a render. */
24
+ readonly requestRender?: () => void;
25
+ readonly imageBudget?: ImageBudget;
26
+ /** Resolved local destinations of Markdown links, as for assistant text. */
27
+ readonly linkTargets?: ReadonlyMap<string, string>;
28
+ }
29
+ /** Replies a tool result carries in `details.replies` (text its commands wrote to a reply URL), oldest first. */
30
+ export declare function toolResultReplies(details: unknown): readonly string[];
31
+ /** Assistant message drawing reply text. No provider turn backs it, so its identity fields stay empty. */
32
+ export declare function replyDisplayMessage(text: string, errorMessage?: string): AssistantMessage;
33
+ /**
34
+ * A reply write ({@link isReplyWrite}) drawn as assistant prose. The call's lifecycle arrives
35
+ * through {@link ToolExecutionHandle}: streamed args grow the text, final args settle it, and
36
+ * the result seals the block, a failure showing its error under the text. It is a reply, not
37
+ * tool activity, so hiding tool activity leaves it on screen.
38
+ */
39
+ export declare class ReplyWriteComponent extends AssistantMessageComponent implements ToolExecutionHandle {
40
+ #private;
41
+ constructor(options?: ReplyWriteOptions);
42
+ updateArgs(args: unknown): void;
43
+ setArgsComplete(): void;
44
+ setExecutionStarted(): void;
45
+ updateResult(result: ToolResultFrame, isPartial?: boolean): void;
46
+ parkAsBackground(): void;
47
+ seal(): void;
48
+ }
@@ -16,6 +16,11 @@ export interface SvgFigureOptions {
16
16
  markdown?: (text: string) => Markdown;
17
17
  /** Shared inline-image budget; superseded rasters are released from it. */
18
18
  budget?: ImageBudget;
19
+ /**
20
+ * Rows the figure may fill, fallback code included, read on every render;
21
+ * zero hides it. Unset or `undefined` takes a share of the terminal viewport.
22
+ */
23
+ maxRows?: () => number | undefined;
19
24
  /** The figure's rows changed outside a text update: a raster landed or rendering fell back to code. */
20
25
  onChange: () => void;
21
26
  }
@@ -19,10 +19,11 @@ export interface TableChartRequest {
19
19
  readonly guess: ChartPlan;
20
20
  }
21
21
  /**
22
- * Picks the chart for a multi-series table under `smart`: a plan, or `null`
23
- * for no chart. A rejection falls back to the local guess.
22
+ * Picks the chart for a table under `smart`: a plan, or `null` for no chart.
23
+ * A rejection falls back to the local guess; `undefined` (no judge to ask
24
+ * right now) keeps the guess at once, exactly as `always` would draw it.
24
25
  */
25
- export type TableChartPlanner = (request: TableChartRequest) => Promise<ChartPlan | null>;
26
+ export type TableChartPlanner = (request: TableChartRequest) => Promise<ChartPlan | null> | undefined;
26
27
  /**
27
28
  * The chart under a table: its SVG, colored with figure tokens (`var(--accent)`, …)
28
29
  * still to resolve; none; or a smart pick on its way (the promise settles once the cache holds it).
@@ -63,6 +64,8 @@ export declare function chartFence(svg: string): string;
63
64
  export interface TableChartFigureOptions {
64
65
  /** Shared inline-image budget. */
65
66
  budget?: ImageBudget;
67
+ /** Rows the chart may fill, its separator included, read on every render; under two hides it. Unset or `undefined` takes a share of the terminal viewport. */
68
+ maxRows?: () => number | undefined;
66
69
  /** The chart's rows changed outside a text update: its pick or raster landed. */
67
70
  onChange: () => void;
68
71
  }
@@ -35,7 +35,6 @@ export interface ToolExecutionHandle extends Component {
35
35
  setArgsComplete(toolCallId?: string): void;
36
36
  setExecutionStarted(toolCallId?: string): void;
37
37
  setExpanded(expanded: boolean): void;
38
- setToolActivityVisible(visible: boolean): void;
39
38
  /** Mark the call parked: it returned, but stays tracked for async job frames. */
40
39
  parkAsBackground(): void;
41
40
  /** Seal the block as final history and stop its animations. */
@@ -102,7 +101,7 @@ export declare class ToolExecutionComponent extends Container {
102
101
  * component-scoped so the TUI reuses every other root subtree (issue #4377).
103
102
  */
104
103
  tickSpinner(frame: number): void;
105
- /** Whether the result's figure still waits for its raster; the transcript holds retirement meanwhile. */
104
+ /** Hold visible results until their figures and Kitty images are ready for immutable scrollback. */
106
105
  isTranscriptBlockPending(): boolean;
107
106
  /**
108
107
  * Whether this block is ready to retire as immutable history. Partial
@@ -9,6 +9,7 @@ import { type TranscriptEntryLike as TranscriptEntry } from "./transcript-entry.
9
9
  import type { SessionMessageEntryLike as SessionMessageEntry } from "./transcript-entry.js";
10
10
  import { type ThemeColor } from "../theme/index.js";
11
11
  import type { ChatTranscriptBuilder } from "./chat-transcript-builder.js";
12
+ import type { DescribeContext } from "../native/node.js";
12
13
  /** One selectable transcript item: a message entry plus its rendered block range. */
13
14
  export interface OutlineTarget {
14
15
  /** Entry the selection resolves to; extended over trailing componentless tool results. */
@@ -63,6 +64,12 @@ export declare class OutlineRowCache {
63
64
  export declare function appendOutlineEntries(builder: ChatTranscriptBuilder, entries: TranscriptEntry[]): OutlineTarget[];
64
65
  /** Per-target "renders at least one non-blank row" flags at the given rows. */
65
66
  export declare function outlineVisibility(childRows: readonly (readonly string[])[], targets: readonly OutlineTarget[]): boolean[];
67
+ /**
68
+ * Per-target "describes something that shows" flags: {@link outlineVisibility}
69
+ * for a TSP page, where blocks describe nodes instead of rendering rows. An
70
+ * empty `col`/`row` (an interrupted turn with no output) shows nothing.
71
+ */
72
+ export declare function describedVisibility(blocks: readonly Component[], targets: readonly OutlineTarget[], cx: DescribeContext): boolean[];
66
73
  /** Dotted horizontal rule with rounded corners, spanning the outline width. */
67
74
  export declare function outlineRule(left: string, right: string, innerWidth: number, color?: ThemeColor, caption?: string): string;
68
75
  /** Wrap pre-rendered rows in the dotted outline (rules above/below, `┆` sides). */
@@ -8,6 +8,7 @@ import type { AgentMessage } from "@linxiraos/pi-agent-core";
8
8
  import { type Component } from "../tui.js";
9
9
  import { type FileMentionMessage } from "./messages.js";
10
10
  import { ToolActivityContainer } from "../chrome/tool-activity.js";
11
+ import type { MessageRenderer } from "./extension-types.js";
11
12
  import { type TranscriptBlock } from "../chrome/transcript-container.js";
12
13
  type CustomOrHookMessage = Extract<AgentMessage, {
13
14
  role: "custom" | "hookMessage";
@@ -21,6 +22,13 @@ type AssistantAgentMessage = Extract<AgentMessage, {
21
22
  * row per job.
22
23
  */
23
24
  export declare function buildAsyncResultBlock(message: CustomOrHookMessage): ToolActivityContainer;
25
+ /**
26
+ * The `async-result` card for both transcript surfaces: a registered renderer owns it (#14131);
27
+ * the built-in block covers no renderer, a declining renderer, and a throwing one.
28
+ */
29
+ export declare function buildAsyncResultComponent(message: CustomOrHookMessage, renderer: MessageRenderer | undefined): Component & {
30
+ setExpanded(expanded: boolean): void;
31
+ };
24
32
  /**
25
33
  * Render a `launch-completion` custom message (terminal supervised-process
26
34
  * exits from the launch broker) as a transcript block of one compact
@@ -28,9 +36,9 @@ export declare function buildAsyncResultBlock(message: CustomOrHookMessage): Too
28
36
  */
29
37
  export declare function buildLaunchCompletionBlock(message: CustomOrHookMessage): ToolActivityContainer;
30
38
  /**
31
- * Render a live IRC traffic custom message (`irc:incoming` / `irc:autoreply` /
32
- * `irc:relay`) as a transcript card. `getExpanded` supplies the live
33
- * expanded-state getter for the cached card.
39
+ * Render an IRC coordination custom message (`irc:incoming` / `irc:autoreply` /
40
+ * `irc:relay` / `irc:workpool`) as a tool-activity card. `getExpanded` supplies
41
+ * the live expanded-state getter for the cached card.
34
42
  */
35
43
  export declare function buildIrcMessageCard(message: CustomOrHookMessage, getExpanded: () => boolean): Component;
36
44
  /**
@@ -55,6 +63,8 @@ export declare function assistantHasVisibleContent(message: AssistantAgentMessag
55
63
  export declare function splitAssistantMessageToolTimeline(message: AssistantAgentMessage): {
56
64
  beforeTools: AssistantAgentMessage;
57
65
  afterToolCalls: ReadonlyMap<string, AssistantAgentMessage>;
66
+ /** Index in `message.content` of each after-tool segment's first block, by tool-call id. */
67
+ contentOffsets: ReadonlyMap<string, number>;
58
68
  hasToolCalls: boolean;
59
69
  lastToolCallId?: string;
60
70
  };
@@ -13,6 +13,12 @@ export declare class DynamicBorder implements Component {
13
13
  #private;
14
14
  constructor(color?: (str: string) => string);
15
15
  invalidate(): void;
16
+ /**
17
+ * Pre-styled text set into the rule after a short lead (`─── label ────`);
18
+ * undefined draws a plain rule. A function label is re-read every render,
19
+ * for live text such as a spinner.
20
+ */
21
+ setLabel(label: string | (() => string) | undefined): void;
16
22
  /** Native terminals draw their own chrome; a border rule describes nothing. */
17
23
  describe(): NativeNode;
18
24
  render(width: number): readonly string[];
@@ -16,5 +16,6 @@ export * from "./shared.js";
16
16
  export * from "./streaming-panel.js";
17
17
  export * from "./tool-activity.js";
18
18
  export * from "./transcript-container.js";
19
+ export * from "./transcript-notice.js";
19
20
  export * from "./transcript-status.js";
20
21
  export * from "./visual-truncate.js";
@@ -0,0 +1,35 @@
1
+ import type { TspText } from "@linxiraos/pi-wire";
2
+ import type { NativeNode } from "../native/node.js";
3
+ import type { Component } from "../tui.js";
4
+ import { TranscriptBlock } from "./transcript-container.js";
5
+ /** How loud an inline transcript notice is; a native terminal styles it as `zeta.notice.<tone>`. */
6
+ export type NoticeTone = "info" | "success" | "warning" | "error";
7
+ /** Optional parts of a {@link noticeRow}. */
8
+ export interface NoticeRowOptions {
9
+ /** Icon name in place of the tone's own (`read` for a file read, `download` for an update). */
10
+ readonly icon?: string;
11
+ readonly key?: string;
12
+ }
13
+ /**
14
+ * One inline transcript notice for a native terminal (`zeta.notice.<tone>`): a
15
+ * leading icon beside the wrapped message. Warnings, errors, background-job
16
+ * completions and prompt file reads all draw as this row, so they read alike.
17
+ * The tone colors the icon (an info notice keeps it quiet); the message spans
18
+ * carry emphasis only (`path`, `mono`, `dim`), never the tone itself.
19
+ */
20
+ export declare function noticeRow(tone: NoticeTone, message: TspText, options?: NoticeRowOptions): NativeNode;
21
+ /**
22
+ * A transcript block that a native terminal draws as one {@link noticeRow}
23
+ * while a text terminal draws `ansi`.
24
+ */
25
+ export declare class TranscriptNotice extends TranscriptBlock {
26
+ #private;
27
+ constructor(native: NativeNode, ansi: readonly Component[]);
28
+ /**
29
+ * `showWarning` / `showError`: a blank row and the `Warning: …` / `Error: …`
30
+ * line in its color in a text terminal; natively the tone's icon and the
31
+ * message, the label left to the icon.
32
+ */
33
+ static line(tone: "warning" | "error", message: string): TranscriptNotice;
34
+ describe(): NativeNode;
35
+ }
@@ -1,24 +1,36 @@
1
+ import type { TspSpan } from "@linxiraos/pi-wire";
1
2
  import type { NativeNode } from "../native/node.js";
2
3
  import { type ThemeColor } from "../theme/index.js";
3
4
  import { TranscriptBlock } from "./transcript-container.js";
4
- /** One themed run of a status row. */
5
+ import { type NoticeTone } from "./transcript-notice.js";
6
+ /** One run of a status row's terminal line, in `color` unless the text is already styled. */
5
7
  export interface TranscriptStatusPart {
6
8
  readonly text: string;
7
- readonly color: ThemeColor;
8
- /** Glyph art (tree connectors) drawn only in rows; native terminals draw their own structure. */
9
- readonly rowsOnly?: boolean;
9
+ readonly color?: ThemeColor;
10
10
  }
11
- /** One compact transcript status row assembled from themed parts, joined by single spaces. */
11
+ /** A status row in a native terminal: its {@link noticeRow}'s tone, icon and message. */
12
+ export interface TranscriptStatusNative {
13
+ readonly tone: NoticeTone;
14
+ /** Icon name in place of the tone's own. */
15
+ readonly icon?: string;
16
+ readonly message: readonly TspSpan[];
17
+ }
18
+ /**
19
+ * One compact transcript status row: the terminal line's themed parts (joined
20
+ * by single spaces, glyphs and brackets included) and the same row natively.
21
+ */
12
22
  export interface TranscriptStatusRow {
13
23
  readonly parts: readonly (TranscriptStatusPart | undefined)[];
14
24
  readonly indent?: number;
25
+ readonly native: TranscriptStatusNative;
15
26
  }
16
- /** Shared compact status-pill block used by notices and background activity. */
27
+ /**
28
+ * Shared compact status block for background activity and prompt file reads:
29
+ * one themed line per row in a text terminal, one notice row per row natively
30
+ * (`zeta.status-block`).
31
+ */
17
32
  export declare class TranscriptStatusBlock extends TranscriptBlock {
18
33
  #private;
19
34
  constructor(rows: readonly TranscriptStatusRow[]);
20
- /** Append a supplemental line such as an artifact warning. */
21
- addLine(parts: readonly (TranscriptStatusPart | undefined)[], indent?: number): void;
22
- /** One wrapped text line per status row. */
23
35
  describe(): NativeNode;
24
36
  }