indusagi-coding-agent 0.1.38 → 0.1.40

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 (493) hide show
  1. package/CHANGELOG.md +22 -7
  2. package/{LICENSE.md → LICENSE} +0 -1
  3. package/README.md +2 -4
  4. package/dist/cli/args.d.ts +6 -128
  5. package/dist/cli/args.d.ts.map +1 -1
  6. package/dist/cli/args.js +277 -472
  7. package/dist/cli/args.js.map +1 -1
  8. package/dist/cli/config-selector.d.ts +9 -62
  9. package/dist/cli/config-selector.d.ts.map +1 -1
  10. package/dist/cli/config-selector.js +31 -146
  11. package/dist/cli/config-selector.js.map +1 -1
  12. package/dist/cli/file-processor.d.ts +1 -69
  13. package/dist/cli/file-processor.d.ts.map +1 -1
  14. package/dist/cli/file-processor.js +36 -267
  15. package/dist/cli/file-processor.js.map +1 -1
  16. package/dist/cli/list-models.d.ts +0 -60
  17. package/dist/cli/list-models.d.ts.map +1 -1
  18. package/dist/cli/list-models.js +53 -246
  19. package/dist/cli/list-models.js.map +1 -1
  20. package/dist/cli/session-picker.d.ts +1 -72
  21. package/dist/cli/session-picker.d.ts.map +1 -1
  22. package/dist/cli/session-picker.js +57 -231
  23. package/dist/cli/session-picker.js.map +1 -1
  24. package/dist/cli.js +25 -31
  25. package/dist/cli.js.map +1 -1
  26. package/dist/config.d.ts +0 -42
  27. package/dist/config.d.ts.map +1 -1
  28. package/dist/config.js +62 -97
  29. package/dist/config.js.map +1 -1
  30. package/dist/core/agent-session.d.ts +26 -2
  31. package/dist/core/agent-session.d.ts.map +1 -1
  32. package/dist/core/agent-session.js +78 -66
  33. package/dist/core/agent-session.js.map +1 -1
  34. package/dist/core/auth-storage.d.ts +4 -95
  35. package/dist/core/auth-storage.d.ts.map +1 -1
  36. package/dist/core/auth-storage.js +233 -288
  37. package/dist/core/auth-storage.js.map +1 -1
  38. package/dist/core/bash-executor.d.ts +0 -323
  39. package/dist/core/bash-executor.d.ts.map +1 -1
  40. package/dist/core/bash-executor.js +126 -359
  41. package/dist/core/bash-executor.js.map +1 -1
  42. package/dist/core/compaction/branch-summarization.d.ts +3 -3
  43. package/dist/core/compaction/branch-summarization.js +16 -16
  44. package/dist/core/compaction/branch-summarization.js.map +1 -1
  45. package/dist/core/compaction/compaction.d.ts +3 -3
  46. package/dist/core/compaction/compaction.js +40 -40
  47. package/dist/core/compaction/compaction.js.map +1 -1
  48. package/dist/core/compaction/index.d.ts +32 -4
  49. package/dist/core/compaction/index.d.ts.map +1 -1
  50. package/dist/core/compaction/index.js +30 -4
  51. package/dist/core/compaction/index.js.map +1 -1
  52. package/dist/core/compaction/utils.d.ts +1 -19
  53. package/dist/core/compaction/utils.d.ts.map +1 -1
  54. package/dist/core/compaction/utils.js +92 -113
  55. package/dist/core/compaction/utils.js.map +1 -1
  56. package/dist/core/discover-packages.d.ts +0 -4
  57. package/dist/core/discover-packages.d.ts.map +1 -1
  58. package/dist/core/discover-packages.js +41 -44
  59. package/dist/core/discover-packages.js.map +1 -1
  60. package/dist/core/event-bus.d.ts +1 -147
  61. package/dist/core/event-bus.d.ts.map +1 -1
  62. package/dist/core/event-bus.js +17 -106
  63. package/dist/core/event-bus.js.map +1 -1
  64. package/dist/core/exec.d.ts +0 -16
  65. package/dist/core/exec.d.ts.map +1 -1
  66. package/dist/core/exec.js +18 -27
  67. package/dist/core/exec.js.map +1 -1
  68. package/dist/core/export-html/ansi-to-html.ts +262 -0
  69. package/dist/core/export-html/index.ts +433 -0
  70. package/dist/core/export-html/template.html +48 -26
  71. package/dist/core/export-html/tool-renderer.d.ts +0 -21
  72. package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
  73. package/dist/core/export-html/tool-renderer.js +35 -51
  74. package/dist/core/export-html/tool-renderer.js.map +1 -1
  75. package/dist/core/export-html/tool-renderer.ts +80 -0
  76. package/dist/core/export-html/vendor/highlight.min.js +401 -370
  77. package/dist/core/export-html/vendor/marked.min.js +71 -3
  78. package/dist/core/extensions/index.d.ts +7 -4
  79. package/dist/core/extensions/index.d.ts.map +1 -1
  80. package/dist/core/extensions/index.js +17 -3
  81. package/dist/core/extensions/index.js.map +1 -1
  82. package/dist/core/extensions/loader.d.ts +0 -6
  83. package/dist/core/extensions/loader.d.ts.map +1 -1
  84. package/dist/core/extensions/loader.js +60 -56
  85. package/dist/core/extensions/loader.js.map +1 -1
  86. package/dist/core/extensions/runner.d.ts +3 -0
  87. package/dist/core/extensions/runner.d.ts.map +1 -1
  88. package/dist/core/extensions/runner.js +48 -80
  89. package/dist/core/extensions/runner.js.map +1 -1
  90. package/dist/core/extensions/types.d.ts +50 -23
  91. package/dist/core/extensions/types.d.ts.map +1 -1
  92. package/dist/core/footer-data-provider.d.ts +2 -15
  93. package/dist/core/footer-data-provider.d.ts.map +1 -1
  94. package/dist/core/footer-data-provider.js +21 -33
  95. package/dist/core/footer-data-provider.js.map +1 -1
  96. package/dist/core/hooks/loader.js +2 -2
  97. package/dist/core/hooks/loader.js.map +1 -1
  98. package/dist/core/index.d.ts +29 -10
  99. package/dist/core/index.d.ts.map +1 -1
  100. package/dist/core/index.js +29 -10
  101. package/dist/core/index.js.map +1 -1
  102. package/dist/core/keybindings.d.ts +2 -179
  103. package/dist/core/keybindings.d.ts.map +1 -1
  104. package/dist/core/keybindings.js +64 -238
  105. package/dist/core/keybindings.js.map +1 -1
  106. package/dist/core/model-registry.d.ts +26 -181
  107. package/dist/core/model-registry.d.ts.map +1 -1
  108. package/dist/core/model-registry.js +228 -407
  109. package/dist/core/model-registry.js.map +1 -1
  110. package/dist/core/model-resolver.d.ts +0 -139
  111. package/dist/core/model-resolver.d.ts.map +1 -1
  112. package/dist/core/model-resolver.js +34 -215
  113. package/dist/core/model-resolver.js.map +1 -1
  114. package/dist/core/package-manager.d.ts +25 -57
  115. package/dist/core/package-manager.d.ts.map +1 -1
  116. package/dist/core/package-manager.js +326 -964
  117. package/dist/core/package-manager.js.map +1 -1
  118. package/dist/core/prompt-templates.d.ts +2 -34
  119. package/dist/core/prompt-templates.d.ts.map +1 -1
  120. package/dist/core/prompt-templates.js +122 -170
  121. package/dist/core/prompt-templates.js.map +1 -1
  122. package/dist/core/resource-loader.d.ts +19 -12
  123. package/dist/core/resource-loader.d.ts.map +1 -1
  124. package/dist/core/resource-loader.js +353 -467
  125. package/dist/core/resource-loader.js.map +1 -1
  126. package/dist/core/sdk.d.ts +2 -61
  127. package/dist/core/sdk.d.ts.map +1 -1
  128. package/dist/core/sdk.js +184 -252
  129. package/dist/core/sdk.js.map +1 -1
  130. package/dist/core/session-manager.d.ts +447 -1
  131. package/dist/core/session-manager.d.ts.map +1 -1
  132. package/dist/core/session-manager.js +1176 -1
  133. package/dist/core/session-manager.js.map +1 -1
  134. package/dist/core/settings-manager.d.ts +9 -12
  135. package/dist/core/settings-manager.d.ts.map +1 -1
  136. package/dist/core/settings-manager.js +170 -398
  137. package/dist/core/settings-manager.js.map +1 -1
  138. package/dist/core/skills.d.ts +2 -27
  139. package/dist/core/skills.d.ts.map +1 -1
  140. package/dist/core/skills.js +149 -212
  141. package/dist/core/skills.js.map +1 -1
  142. package/dist/core/subagents.d.ts +2 -2
  143. package/dist/core/subagents.d.ts.map +1 -1
  144. package/dist/core/subagents.js +21 -14
  145. package/dist/core/subagents.js.map +1 -1
  146. package/dist/core/system-prompt.d.ts +0 -11
  147. package/dist/core/system-prompt.d.ts.map +1 -1
  148. package/dist/core/system-prompt.js +168 -139
  149. package/dist/core/system-prompt.js.map +1 -1
  150. package/dist/core/timings.d.ts +1 -4
  151. package/dist/core/timings.d.ts.map +1 -1
  152. package/dist/core/timings.js +34 -18
  153. package/dist/core/timings.js.map +1 -1
  154. package/dist/core/todo-store.d.ts +20 -0
  155. package/dist/core/todo-store.d.ts.map +1 -0
  156. package/dist/core/todo-store.js +60 -0
  157. package/dist/core/todo-store.js.map +1 -0
  158. package/dist/core/tools/bash.d.ts +2 -0
  159. package/dist/core/tools/bash.d.ts.map +1 -0
  160. package/dist/core/tools/bash.js +2 -0
  161. package/dist/core/tools/bash.js.map +1 -0
  162. package/dist/core/tools/bg-process.d.ts +1 -6
  163. package/dist/core/tools/bg-process.d.ts.map +1 -1
  164. package/dist/core/tools/bg-process.js +4 -18
  165. package/dist/core/tools/bg-process.js.map +1 -1
  166. package/dist/core/tools/edit-diff.d.ts +9 -0
  167. package/dist/core/tools/edit-diff.d.ts.map +1 -0
  168. package/dist/core/tools/edit-diff.js +2 -0
  169. package/dist/core/tools/edit-diff.js.map +1 -0
  170. package/dist/core/tools/edit.d.ts +2 -0
  171. package/dist/core/tools/edit.d.ts.map +1 -0
  172. package/dist/core/tools/edit.js +2 -0
  173. package/dist/core/tools/edit.js.map +1 -0
  174. package/dist/core/tools/find.d.ts +2 -0
  175. package/dist/core/tools/find.d.ts.map +1 -0
  176. package/dist/core/tools/find.js +2 -0
  177. package/dist/core/tools/find.js.map +1 -0
  178. package/dist/core/tools/grep.d.ts +2 -0
  179. package/dist/core/tools/grep.d.ts.map +1 -0
  180. package/dist/core/tools/grep.js +2 -0
  181. package/dist/core/tools/grep.js.map +1 -0
  182. package/dist/core/tools/index.d.ts +8 -2
  183. package/dist/core/tools/index.d.ts.map +1 -1
  184. package/dist/core/tools/ls.d.ts +2 -0
  185. package/dist/core/tools/ls.d.ts.map +1 -0
  186. package/dist/core/tools/ls.js +2 -0
  187. package/dist/core/tools/ls.js.map +1 -0
  188. package/dist/core/tools/memory.d.ts +50 -1
  189. package/dist/core/tools/memory.d.ts.map +1 -1
  190. package/dist/core/tools/memory.js +11 -7
  191. package/dist/core/tools/memory.js.map +1 -1
  192. package/dist/core/tools/path-utils.d.ts +2 -0
  193. package/dist/core/tools/path-utils.d.ts.map +1 -0
  194. package/dist/core/tools/path-utils.js +2 -0
  195. package/dist/core/tools/path-utils.js.map +1 -0
  196. package/dist/core/tools/read.d.ts +2 -0
  197. package/dist/core/tools/read.d.ts.map +1 -0
  198. package/dist/core/tools/read.js +2 -0
  199. package/dist/core/tools/read.js.map +1 -0
  200. package/dist/core/tools/registry.d.ts +0 -15
  201. package/dist/core/tools/registry.d.ts.map +1 -1
  202. package/dist/core/tools/registry.js +13 -37
  203. package/dist/core/tools/registry.js.map +1 -1
  204. package/dist/core/tools/task.d.ts +17 -23
  205. package/dist/core/tools/task.d.ts.map +1 -1
  206. package/dist/core/tools/task.js +43 -82
  207. package/dist/core/tools/task.js.map +1 -1
  208. package/dist/core/tools/todo.d.ts +17 -20
  209. package/dist/core/tools/todo.d.ts.map +1 -1
  210. package/dist/core/tools/todo.js +79 -58
  211. package/dist/core/tools/todo.js.map +1 -1
  212. package/dist/core/tools/truncate.d.ts +2 -0
  213. package/dist/core/tools/truncate.d.ts.map +1 -0
  214. package/dist/core/tools/truncate.js +2 -0
  215. package/dist/core/tools/truncate.js.map +1 -0
  216. package/dist/core/tools/webfetch.d.ts +2 -0
  217. package/dist/core/tools/webfetch.d.ts.map +1 -0
  218. package/dist/core/tools/webfetch.js +2 -0
  219. package/dist/core/tools/webfetch.js.map +1 -0
  220. package/dist/core/tools/websearch.d.ts +2 -0
  221. package/dist/core/tools/websearch.d.ts.map +1 -0
  222. package/dist/core/tools/websearch.js +2 -0
  223. package/dist/core/tools/websearch.js.map +1 -0
  224. package/dist/core/tools/write.d.ts +2 -0
  225. package/dist/core/tools/write.d.ts.map +1 -0
  226. package/dist/core/tools/write.js +2 -0
  227. package/dist/core/tools/write.js.map +1 -0
  228. package/dist/index.d.ts +35 -29
  229. package/dist/index.d.ts.map +1 -1
  230. package/dist/index.js +33 -41
  231. package/dist/index.js.map +1 -1
  232. package/dist/main.d.ts.map +1 -1
  233. package/dist/main.js +237 -225
  234. package/dist/main.js.map +1 -1
  235. package/dist/migrations.d.ts +0 -25
  236. package/dist/migrations.d.ts.map +1 -1
  237. package/dist/migrations.js +129 -180
  238. package/dist/migrations.js.map +1 -1
  239. package/dist/modes/index.d.ts +13 -6
  240. package/dist/modes/index.d.ts.map +1 -1
  241. package/dist/modes/index.js +11 -5
  242. package/dist/modes/index.js.map +1 -1
  243. package/dist/modes/interactive/components/armin.d.ts +8 -23
  244. package/dist/modes/interactive/components/armin.d.ts.map +1 -1
  245. package/dist/modes/interactive/components/armin.js +217 -266
  246. package/dist/modes/interactive/components/armin.js.map +1 -1
  247. package/dist/modes/interactive/components/assistant-message.d.ts +2 -168
  248. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  249. package/dist/modes/interactive/components/assistant-message.js +61 -216
  250. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  251. package/dist/modes/interactive/components/bash-execution.d.ts +6 -313
  252. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  253. package/dist/modes/interactive/components/bash-execution.js +86 -403
  254. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  255. package/dist/modes/interactive/components/bordered-loader.d.ts +1 -3
  256. package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
  257. package/dist/modes/interactive/components/bordered-loader.js +59 -29
  258. package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
  259. package/dist/modes/interactive/components/branch-summary-message.d.ts +3 -3
  260. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  261. package/dist/modes/interactive/components/branch-summary-message.js +30 -17
  262. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  263. package/dist/modes/interactive/components/compaction-summary-message.d.ts +3 -3
  264. package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
  265. package/dist/modes/interactive/components/compaction-summary-message.js +35 -18
  266. package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
  267. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
  268. package/dist/modes/interactive/components/config-selector.js +60 -68
  269. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  270. package/dist/modes/interactive/components/countdown-timer.d.ts +2 -6
  271. package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -1
  272. package/dist/modes/interactive/components/countdown-timer.js +32 -18
  273. package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
  274. package/dist/modes/interactive/components/custom-editor.d.ts +1 -5
  275. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  276. package/dist/modes/interactive/components/custom-editor.js +45 -37
  277. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  278. package/dist/modes/interactive/components/custom-message.d.ts +5 -6
  279. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  280. package/dist/modes/interactive/components/custom-message.js +43 -53
  281. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  282. package/dist/modes/interactive/components/diff.d.ts +0 -3
  283. package/dist/modes/interactive/components/diff.d.ts.map +1 -1
  284. package/dist/modes/interactive/components/diff.js +101 -108
  285. package/dist/modes/interactive/components/diff.js.map +1 -1
  286. package/dist/modes/interactive/components/dynamic-border.d.ts +7 -2
  287. package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
  288. package/dist/modes/interactive/components/dynamic-border.js +24 -4
  289. package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
  290. package/dist/modes/interactive/components/extension-editor.d.ts +5 -9
  291. package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
  292. package/dist/modes/interactive/components/extension-editor.js +43 -46
  293. package/dist/modes/interactive/components/extension-editor.js.map +1 -1
  294. package/dist/modes/interactive/components/extension-input.d.ts +4 -9
  295. package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
  296. package/dist/modes/interactive/components/extension-input.js +45 -28
  297. package/dist/modes/interactive/components/extension-input.js.map +1 -1
  298. package/dist/modes/interactive/components/extension-selector.d.ts +7 -12
  299. package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
  300. package/dist/modes/interactive/components/extension-selector.js +54 -32
  301. package/dist/modes/interactive/components/extension-selector.js.map +1 -1
  302. package/dist/modes/interactive/components/footer.d.ts +2 -11
  303. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  304. package/dist/modes/interactive/components/footer.js +135 -183
  305. package/dist/modes/interactive/components/footer.js.map +1 -1
  306. package/dist/modes/interactive/components/index.d.ts +79 -30
  307. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  308. package/dist/modes/interactive/components/index.js +73 -31
  309. package/dist/modes/interactive/components/index.js.map +1 -1
  310. package/dist/modes/interactive/components/keybinding-hints.d.ts +0 -18
  311. package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
  312. package/dist/modes/interactive/components/keybinding-hints.js +24 -31
  313. package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
  314. package/dist/modes/interactive/components/login-dialog.d.ts +11 -24
  315. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  316. package/dist/modes/interactive/components/login-dialog.js +89 -86
  317. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  318. package/dist/modes/interactive/components/model-selector.d.ts +15 -19
  319. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  320. package/dist/modes/interactive/components/model-selector.js +104 -157
  321. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  322. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  323. package/dist/modes/interactive/components/oauth-selector.js +5 -5
  324. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  325. package/dist/modes/interactive/components/scoped-models-selector.d.ts +12 -22
  326. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
  327. package/dist/modes/interactive/components/scoped-models-selector.js +111 -132
  328. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  329. package/dist/modes/interactive/components/session-selector-search.d.ts +3 -3
  330. package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
  331. package/dist/modes/interactive/components/session-selector-search.js +92 -103
  332. package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
  333. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  334. package/dist/modes/interactive/components/session-selector.js +28 -39
  335. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  336. package/dist/modes/interactive/components/settings-selector.d.ts +1 -1
  337. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  338. package/dist/modes/interactive/components/settings-selector.js +111 -203
  339. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  340. package/dist/modes/interactive/components/show-images-selector.d.ts +1 -1
  341. package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
  342. package/dist/modes/interactive/components/show-images-selector.js +17 -19
  343. package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
  344. package/dist/modes/interactive/components/skill-invocation-message.d.ts +3 -3
  345. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  346. package/dist/modes/interactive/components/skill-invocation-message.js +29 -19
  347. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  348. package/dist/modes/interactive/components/theme-selector.d.ts +2 -2
  349. package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
  350. package/dist/modes/interactive/components/theme-selector.js +20 -25
  351. package/dist/modes/interactive/components/theme-selector.js.map +1 -1
  352. package/dist/modes/interactive/components/thinking-selector.d.ts +1 -1
  353. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  354. package/dist/modes/interactive/components/thinking-selector.js +19 -20
  355. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  356. package/dist/modes/interactive/components/tool-execution.d.ts +12 -10
  357. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  358. package/dist/modes/interactive/components/tool-execution.js +14 -8
  359. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  360. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  361. package/dist/modes/interactive/components/tree-selector.js +53 -60
  362. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  363. package/dist/modes/interactive/components/user-message-selector.d.ts +3 -9
  364. package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
  365. package/dist/modes/interactive/components/user-message-selector.js +57 -68
  366. package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
  367. package/dist/modes/interactive/components/visual-truncate.d.ts +0 -12
  368. package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
  369. package/dist/modes/interactive/components/visual-truncate.js +14 -22
  370. package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
  371. package/dist/modes/interactive/interactive-mode.d.ts +6 -0
  372. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  373. package/dist/modes/interactive/interactive-mode.js +118 -113
  374. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  375. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  376. package/dist/modes/interactive/theme/theme.js +189 -39
  377. package/dist/modes/interactive/theme/theme.js.map +1 -1
  378. package/dist/modes/rpc/rpc-client.d.ts +8 -1
  379. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  380. package/dist/modes/rpc/rpc-client.js +88 -59
  381. package/dist/modes/rpc/rpc-client.js.map +1 -1
  382. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  383. package/dist/modes/rpc/rpc-mode.js +24 -46
  384. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  385. package/dist/modes/rpc/rpc-types.d.ts +75 -409
  386. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  387. package/dist/modes/rpc/rpc-types.js +21 -360
  388. package/dist/modes/rpc/rpc-types.js.map +1 -1
  389. package/dist/observability/core/config.d.ts +28 -0
  390. package/dist/observability/core/config.d.ts.map +1 -0
  391. package/dist/observability/core/config.js +150 -0
  392. package/dist/observability/core/config.js.map +1 -0
  393. package/dist/observability/core/event-bus.d.ts +15 -0
  394. package/dist/observability/core/event-bus.d.ts.map +1 -0
  395. package/dist/observability/core/event-bus.js +37 -0
  396. package/dist/observability/core/event-bus.js.map +1 -0
  397. package/dist/observability/core/index.d.ts +12 -0
  398. package/dist/observability/core/index.d.ts.map +1 -0
  399. package/dist/observability/core/index.js +14 -0
  400. package/dist/observability/core/index.js.map +1 -0
  401. package/dist/observability/core/observability.d.ts +63 -0
  402. package/dist/observability/core/observability.d.ts.map +1 -0
  403. package/dist/observability/core/observability.js +127 -0
  404. package/dist/observability/core/observability.js.map +1 -0
  405. package/dist/observability/core/span.d.ts +37 -0
  406. package/dist/observability/core/span.d.ts.map +1 -0
  407. package/dist/observability/core/span.js +90 -0
  408. package/dist/observability/core/span.js.map +1 -0
  409. package/dist/observability/core/tracer.d.ts +22 -0
  410. package/dist/observability/core/tracer.d.ts.map +1 -0
  411. package/dist/observability/core/tracer.js +79 -0
  412. package/dist/observability/core/tracer.js.map +1 -0
  413. package/dist/observability/core/types.d.ts +155 -0
  414. package/dist/observability/core/types.d.ts.map +1 -0
  415. package/dist/observability/core/types.js +38 -0
  416. package/dist/observability/core/types.js.map +1 -0
  417. package/dist/observability/exporters/base-exporter.d.ts +16 -0
  418. package/dist/observability/exporters/base-exporter.d.ts.map +1 -0
  419. package/dist/observability/exporters/base-exporter.js +26 -0
  420. package/dist/observability/exporters/base-exporter.js.map +1 -0
  421. package/dist/observability/exporters/console-exporter.d.ts +22 -0
  422. package/dist/observability/exporters/console-exporter.d.ts.map +1 -0
  423. package/dist/observability/exporters/console-exporter.js +80 -0
  424. package/dist/observability/exporters/console-exporter.js.map +1 -0
  425. package/dist/observability/exporters/file-exporter.d.ts +31 -0
  426. package/dist/observability/exporters/file-exporter.d.ts.map +1 -0
  427. package/dist/observability/exporters/file-exporter.js +120 -0
  428. package/dist/observability/exporters/file-exporter.js.map +1 -0
  429. package/dist/observability/exporters/index.d.ts +12 -0
  430. package/dist/observability/exporters/index.d.ts.map +1 -0
  431. package/dist/observability/exporters/index.js +11 -0
  432. package/dist/observability/exporters/index.js.map +1 -0
  433. package/dist/observability/exporters/langfuse-exporter.d.ts +27 -0
  434. package/dist/observability/exporters/langfuse-exporter.d.ts.map +1 -0
  435. package/dist/observability/exporters/langfuse-exporter.js +146 -0
  436. package/dist/observability/exporters/langfuse-exporter.js.map +1 -0
  437. package/dist/observability/exporters/sentry-exporter.d.ts +22 -0
  438. package/dist/observability/exporters/sentry-exporter.d.ts.map +1 -0
  439. package/dist/observability/exporters/sentry-exporter.js +121 -0
  440. package/dist/observability/exporters/sentry-exporter.js.map +1 -0
  441. package/dist/observability/index.d.ts +3 -0
  442. package/dist/observability/index.d.ts.map +1 -0
  443. package/dist/observability/index.js +3 -0
  444. package/dist/observability/index.js.map +1 -0
  445. package/dist/utils/changelog.d.ts +1 -2
  446. package/dist/utils/changelog.d.ts.map +1 -1
  447. package/dist/utils/changelog.js +53 -61
  448. package/dist/utils/changelog.js.map +1 -1
  449. package/dist/utils/clipboard-image.d.ts.map +1 -1
  450. package/dist/utils/clipboard-image.js +77 -83
  451. package/dist/utils/clipboard-image.js.map +1 -1
  452. package/dist/utils/clipboard.d.ts.map +1 -1
  453. package/dist/utils/clipboard.js +62 -49
  454. package/dist/utils/clipboard.js.map +1 -1
  455. package/dist/utils/image-convert.d.ts +6 -6
  456. package/dist/utils/image-convert.d.ts.map +1 -1
  457. package/dist/utils/image-convert.js +29 -23
  458. package/dist/utils/image-convert.js.map +1 -1
  459. package/dist/utils/image-resize.d.ts +0 -17
  460. package/dist/utils/image-resize.d.ts.map +1 -1
  461. package/dist/utils/image-resize.js +100 -138
  462. package/dist/utils/image-resize.js.map +1 -1
  463. package/dist/utils/mime.d.ts +1 -0
  464. package/dist/utils/mime.d.ts.map +1 -1
  465. package/dist/utils/mime.js +35 -15
  466. package/dist/utils/mime.js.map +1 -1
  467. package/dist/utils/photon.d.ts +4 -15
  468. package/dist/utils/photon.d.ts.map +1 -1
  469. package/dist/utils/photon.js +71 -60
  470. package/dist/utils/photon.js.map +1 -1
  471. package/dist/utils/shell.d.ts +4 -21
  472. package/dist/utils/shell.d.ts.map +1 -1
  473. package/dist/utils/shell.js +101 -124
  474. package/dist/utils/shell.js.map +1 -1
  475. package/dist/utils/sleep.d.ts +1 -1
  476. package/dist/utils/sleep.d.ts.map +1 -1
  477. package/dist/utils/sleep.js +32 -8
  478. package/dist/utils/sleep.js.map +1 -1
  479. package/dist/utils/tools-manager.d.ts +4 -2
  480. package/dist/utils/tools-manager.d.ts.map +1 -1
  481. package/dist/utils/tools-manager.js +96 -122
  482. package/dist/utils/tools-manager.js.map +1 -1
  483. package/docs/PI_MONO_MIT_REMOVAL_GUIDE.md +2132 -0
  484. package/docs/SAME_TO_SAME_PARITY_REPORT.md +312 -0
  485. package/examples/README.md +12 -0
  486. package/package.json +62 -88
  487. package/dist/modes/interactive/theme/dark.json +0 -85
  488. package/dist/modes/interactive/theme/light.json +0 -84
  489. package/dist/modes/interactive/theme/theme-schema.json +0 -335
  490. package/docs/FEATURES.md +0 -306
  491. package/docs/MCP.md +0 -341
  492. package/docs/MEMORY.md +0 -443
  493. package/examples/mcp-servers.example.json +0 -50
@@ -1,175 +1,9 @@
1
1
  import type { AssistantMessage } from "indusagi/ai";
2
2
  import { Container, type MarkdownTheme } from "indusagi/tui";
3
- /**
4
- * ============================================================================
5
- * ASSISTANT MESSAGE COMPONENT - RENDERING MODULE
6
- * ============================================================================
7
- *
8
- * PURPOSE:
9
- * ============================================================================
10
- * Renders complete assistant messages with support for streaming text content,
11
- * thinking blocks, and error states. This component is the core renderer for
12
- * all AI assistant responses in the interactive chat interface.
13
- *
14
- * MESSAGE TYPES:
15
- * - Text: Regular assistant responses with markdown formatting
16
- * - Thinking: Internal reasoning traces (collapsible, italicized)
17
- * - Errors: Graceful rendering of aborted/failed operations
18
- * - Mixed: Multiple content types in sequence (text + thinking)
19
- *
20
- * DATA FLOW:
21
- * ============================================================================
22
- * Session Event Flow:
23
- * AgentSession.prompt() emits message_streamed events
24
- * ↓
25
- * InteractiveMode.subscribeToAgent() receives event
26
- * ↓
27
- * AssistantMessage extracted from event.message
28
- * ↓
29
- * AssistantMessageComponent created or updateContent() called
30
- * ↓
31
- * contentContainer cleared and rebuilt
32
- * ↓
33
- * Markdown/Text components added for each content block
34
- * ↓
35
- * TUI invalidate() and requestRender()
36
- * ↓
37
- * Terminal renders styled markdown
38
- *
39
- * Component State Lifecycle:
40
- * 1. Constructor: Initialize empty container, apply theme
41
- * 2. updateContent(): Parse message.content array
42
- * 3. For each content item:
43
- * - Check if visible (non-empty text/thinking)
44
- * - Apply appropriate styling and formatting
45
- * - Add to contentContainer with spacing
46
- * 4. Check for error/abort states
47
- * 5. invalidate() on theme change: re-render preserving message
48
- *
49
- * RENDERING PIPELINE:
50
- * ============================================================================
51
- * Layout Structure (ASCII):
52
- * ┌─────────────────────────────────────┐
53
- * │ [Spacer 1 line] │ ← Top spacing
54
- * ├─────────────────────────────────────┤
55
- * │ Markdown: Regular assistant text │ ← Text content (if present)
56
- * │ with code blocks, lists, etc. │
57
- * ├─────────────────────────────────────┤
58
- * │ [Thinking...] (or full thinking) │ ← Thinking block (if present)
59
- * │ Italic, dimmed color │
60
- * ├─────────────────────────────────────┤
61
- * │ Error: Operation aborted │ ← Error message (if error)
62
- * └─────────────────────────────────────┘
63
- *
64
- * Rendering Rules:
65
- * 1. Only show spacer if content is visible (non-empty text/thinking)
66
- * 2. Text content: full markdown rendering with syntax highlight
67
- * 3. Thinking blocks:
68
- * - If hideThinkingBlock=true: show compact "Thinking..." label
69
- * - If hideThinkingBlock=false: show full thinking text in italic
70
- * 4. Spacing: Spacer(1) between thinking and following text
71
- * 5. Errors: Only shown if no tool calls in message (tools show their own errors)
72
- *
73
- * STYLING/FORMATTING:
74
- * ============================================================================
75
- * Color Scheme (from theme):
76
- * - Text: markdownTheme colors (inherit from theme)
77
- * - Thinking: theme.fg("thinkingText", text) + italic
78
- * - Error: theme.fg("error", message)
79
- * - Aborted: theme.fg("error", message) [same as error]
80
- *
81
- * Text Processing:
82
- * - Markdown: Full markdown rendering (lists, code, emphasis, etc.)
83
- * - Text trim(): Remove leading/trailing whitespace
84
- * - Thinking italic: Applied via theme formatter
85
- *
86
- * Component Nesting:
87
- * - AssistantMessageComponent (Container)
88
- * └── contentContainer (Container)
89
- * ├── Spacer(1) [conditional]
90
- * ├── Markdown(text content) [0+ times]
91
- * ├── Markdown(thinking) [italic] [0+ times]
92
- * ├── Spacer(1) [between thinking and text]
93
- * └── Text(error message) [conditional]
94
- *
95
- * EXAMPLES:
96
- * ============================================================================
97
- *
98
- * Example 1: Regular Text Response
99
- * ─────────────────────────────────
100
- * Message content: [{ type: "text", text: "# Hello\n\nThis is a response" }]
101
- * Rendered output:
102
- * <blank line>
103
- * # Hello
104
- *
105
- * This is a response
106
- *
107
- * Example 2: Response with Thinking
108
- * ──────────────────────────────────
109
- * Message content: [
110
- * { type: "thinking", thinking: "Let me reason about this..." },
111
- * { type: "text", text: "The answer is..." }
112
- * ]
113
- * Rendered output:
114
- * <blank line>
115
- * [italic, dim] Thinking...
116
- * <blank line>
117
- * The answer is...
118
- *
119
- * Example 3: Thinking with Full Trace (hideThinkingBlock=false)
120
- * ───────────────────────────────────────────────────────────
121
- * Message content: [
122
- * { type: "thinking", thinking: "1. Check args\n2. Validate\n3. Execute" }
123
- * ]
124
- * Rendered output:
125
- * <blank line>
126
- * [italic, muted color]
127
- * 1. Check args
128
- * 2. Validate
129
- * 3. Execute
130
- *
131
- * Example 4: Error State
132
- * ──────────────────────
133
- * Message: { stopReason: "error", errorMessage: "Rate limit exceeded" }
134
- * Rendered output:
135
- * Error: Rate limit exceeded
136
- *
137
- * INTEGRATION:
138
- * ============================================================================
139
- * TUI Integration:
140
- * - Extends Container (indusagi/tui base component)
141
- * - Uses Markdown, Text, Spacer from indusagi/tui
142
- * - Theme system: getMarkdownTheme(), theme.fg(), theme.italic()
143
- *
144
- * Session Integration:
145
- * - Created in InteractiveMode.handleEvent() for message_streamed
146
- * - Updated via updateContent() as streaming progresses
147
- * - Stored in chatContainer for display
148
- *
149
- * Theme Integration:
150
- * - Listens to theme changes via invalidate()
151
- * - Re-renders with new theme when theme.json changes
152
- * - Preserves message content across re-renders
153
- *
154
- * Settings Integration:
155
- * - hideThinkingBlock: Toggle thinking visibility
156
- * - Can be changed after component creation via setHideThinkingBlock()
157
- * - Changes take effect on next invalidate()
158
- *
159
- * Streaming Integration:
160
- * - updateContent() called repeatedly as text arrives
161
- * - Maintains lastMessage reference for invalidate() re-render
162
- * - Efficient: only modifies contentContainer, not entire component tree
163
- *
164
- * Performance Notes:
165
- * - Markdown rendering is cached by indusagi/tui library
166
- * - invalidate() only re-renders contentContainer
167
- * - Suitable for incremental streaming (100+ updates acceptable)
168
- */
169
3
  export declare class AssistantMessageComponent extends Container {
170
- private contentContainer;
4
+ private readonly contentContainer;
171
5
  private hideThinkingBlock;
172
- private markdownTheme;
6
+ private readonly markdownTheme;
173
7
  private lastMessage?;
174
8
  constructor(message?: AssistantMessage, hideThinkingBlock?: boolean, markdownTheme?: MarkdownTheme);
175
9
  invalidate(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"assistant-message.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/assistant-message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,SAAS,EAAY,KAAK,aAAa,EAAgB,MAAM,cAAc,CAAC;AAGrF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqKG;AACH,qBAAa,yBAA0B,SAAQ,SAAS;IACvD,OAAO,CAAC,gBAAgB,CAAY;IACpC,OAAO,CAAC,iBAAiB,CAAU;IACnC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,WAAW,CAAC,CAAmB;gBAGtC,OAAO,CAAC,EAAE,gBAAgB,EAC1B,iBAAiB,UAAQ,EACzB,aAAa,GAAE,aAAkC;IAgBzC,UAAU,IAAI,IAAI;IAO3B,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAIzC,aAAa,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;CAkE9C"}
1
+ {"version":3,"file":"assistant-message.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/assistant-message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,SAAS,EAAY,KAAK,aAAa,EAAgB,MAAM,cAAc,CAAC;AA0ErF,qBAAa,yBAA0B,SAAQ,SAAS;IACvD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAY;IAC7C,OAAO,CAAC,iBAAiB,CAAU;IACnC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAC9C,OAAO,CAAC,WAAW,CAAC,CAAmB;gBAGtC,OAAO,CAAC,EAAE,gBAAgB,EAC1B,iBAAiB,UAAQ,EACzB,aAAa,GAAE,aAAkC;IAYzC,UAAU,IAAI,IAAI;IAO3B,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAIzC,aAAa,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;CAiB9C"}
@@ -1,177 +1,63 @@
1
1
  import { Container, Markdown, Spacer, Text } from "indusagi/tui";
2
2
  import { getMarkdownTheme, theme } from "../theme/theme.js";
3
- /**
4
- * ============================================================================
5
- * ASSISTANT MESSAGE COMPONENT - RENDERING MODULE
6
- * ============================================================================
7
- *
8
- * PURPOSE:
9
- * ============================================================================
10
- * Renders complete assistant messages with support for streaming text content,
11
- * thinking blocks, and error states. This component is the core renderer for
12
- * all AI assistant responses in the interactive chat interface.
13
- *
14
- * MESSAGE TYPES:
15
- * - Text: Regular assistant responses with markdown formatting
16
- * - Thinking: Internal reasoning traces (collapsible, italicized)
17
- * - Errors: Graceful rendering of aborted/failed operations
18
- * - Mixed: Multiple content types in sequence (text + thinking)
19
- *
20
- * DATA FLOW:
21
- * ============================================================================
22
- * Session Event Flow:
23
- * AgentSession.prompt() emits message_streamed events
24
- * ↓
25
- * InteractiveMode.subscribeToAgent() receives event
26
- * ↓
27
- * AssistantMessage extracted from event.message
28
- * ↓
29
- * AssistantMessageComponent created or updateContent() called
30
- * ↓
31
- * contentContainer cleared and rebuilt
32
- * ↓
33
- * Markdown/Text components added for each content block
34
- * ↓
35
- * TUI invalidate() and requestRender()
36
- * ↓
37
- * Terminal renders styled markdown
38
- *
39
- * Component State Lifecycle:
40
- * 1. Constructor: Initialize empty container, apply theme
41
- * 2. updateContent(): Parse message.content array
42
- * 3. For each content item:
43
- * - Check if visible (non-empty text/thinking)
44
- * - Apply appropriate styling and formatting
45
- * - Add to contentContainer with spacing
46
- * 4. Check for error/abort states
47
- * 5. invalidate() on theme change: re-render preserving message
48
- *
49
- * RENDERING PIPELINE:
50
- * ============================================================================
51
- * Layout Structure (ASCII):
52
- * ┌─────────────────────────────────────┐
53
- * │ [Spacer 1 line] │ ← Top spacing
54
- * ├─────────────────────────────────────┤
55
- * │ Markdown: Regular assistant text │ ← Text content (if present)
56
- * │ with code blocks, lists, etc. │
57
- * ├─────────────────────────────────────┤
58
- * │ [Thinking...] (or full thinking) │ ← Thinking block (if present)
59
- * │ Italic, dimmed color │
60
- * ├─────────────────────────────────────┤
61
- * │ Error: Operation aborted │ ← Error message (if error)
62
- * └─────────────────────────────────────┘
63
- *
64
- * Rendering Rules:
65
- * 1. Only show spacer if content is visible (non-empty text/thinking)
66
- * 2. Text content: full markdown rendering with syntax highlight
67
- * 3. Thinking blocks:
68
- * - If hideThinkingBlock=true: show compact "Thinking..." label
69
- * - If hideThinkingBlock=false: show full thinking text in italic
70
- * 4. Spacing: Spacer(1) between thinking and following text
71
- * 5. Errors: Only shown if no tool calls in message (tools show their own errors)
72
- *
73
- * STYLING/FORMATTING:
74
- * ============================================================================
75
- * Color Scheme (from theme):
76
- * - Text: markdownTheme colors (inherit from theme)
77
- * - Thinking: theme.fg("thinkingText", text) + italic
78
- * - Error: theme.fg("error", message)
79
- * - Aborted: theme.fg("error", message) [same as error]
80
- *
81
- * Text Processing:
82
- * - Markdown: Full markdown rendering (lists, code, emphasis, etc.)
83
- * - Text trim(): Remove leading/trailing whitespace
84
- * - Thinking italic: Applied via theme formatter
85
- *
86
- * Component Nesting:
87
- * - AssistantMessageComponent (Container)
88
- * └── contentContainer (Container)
89
- * ├── Spacer(1) [conditional]
90
- * ├── Markdown(text content) [0+ times]
91
- * ├── Markdown(thinking) [italic] [0+ times]
92
- * ├── Spacer(1) [between thinking and text]
93
- * └── Text(error message) [conditional]
94
- *
95
- * EXAMPLES:
96
- * ============================================================================
97
- *
98
- * Example 1: Regular Text Response
99
- * ─────────────────────────────────
100
- * Message content: [{ type: "text", text: "# Hello\n\nThis is a response" }]
101
- * Rendered output:
102
- * <blank line>
103
- * # Hello
104
- *
105
- * This is a response
106
- *
107
- * Example 2: Response with Thinking
108
- * ──────────────────────────────────
109
- * Message content: [
110
- * { type: "thinking", thinking: "Let me reason about this..." },
111
- * { type: "text", text: "The answer is..." }
112
- * ]
113
- * Rendered output:
114
- * <blank line>
115
- * [italic, dim] Thinking...
116
- * <blank line>
117
- * The answer is...
118
- *
119
- * Example 3: Thinking with Full Trace (hideThinkingBlock=false)
120
- * ───────────────────────────────────────────────────────────
121
- * Message content: [
122
- * { type: "thinking", thinking: "1. Check args\n2. Validate\n3. Execute" }
123
- * ]
124
- * Rendered output:
125
- * <blank line>
126
- * [italic, muted color]
127
- * 1. Check args
128
- * 2. Validate
129
- * 3. Execute
130
- *
131
- * Example 4: Error State
132
- * ──────────────────────
133
- * Message: { stopReason: "error", errorMessage: "Rate limit exceeded" }
134
- * Rendered output:
135
- * Error: Rate limit exceeded
136
- *
137
- * INTEGRATION:
138
- * ============================================================================
139
- * TUI Integration:
140
- * - Extends Container (indusagi/tui base component)
141
- * - Uses Markdown, Text, Spacer from indusagi/tui
142
- * - Theme system: getMarkdownTheme(), theme.fg(), theme.italic()
143
- *
144
- * Session Integration:
145
- * - Created in InteractiveMode.handleEvent() for message_streamed
146
- * - Updated via updateContent() as streaming progresses
147
- * - Stored in chatContainer for display
148
- *
149
- * Theme Integration:
150
- * - Listens to theme changes via invalidate()
151
- * - Re-renders with new theme when theme.json changes
152
- * - Preserves message content across re-renders
153
- *
154
- * Settings Integration:
155
- * - hideThinkingBlock: Toggle thinking visibility
156
- * - Can be changed after component creation via setHideThinkingBlock()
157
- * - Changes take effect on next invalidate()
158
- *
159
- * Streaming Integration:
160
- * - updateContent() called repeatedly as text arrives
161
- * - Maintains lastMessage reference for invalidate() re-render
162
- * - Efficient: only modifies contentContainer, not entire component tree
163
- *
164
- * Performance Notes:
165
- * - Markdown rendering is cached by indusagi/tui library
166
- * - invalidate() only re-renders contentContainer
167
- * - Suitable for incremental streaming (100+ updates acceptable)
168
- */
3
+ function extractAssistantRenderableBlocks(message) {
4
+ const blocks = [];
5
+ for (let index = 0; index < message.content.length; index++) {
6
+ const content = message.content[index];
7
+ if (content.type === "text" && content.text.trim()) {
8
+ blocks.push({ kind: "text", value: content.text.trim(), hasTextAfter: false });
9
+ continue;
10
+ }
11
+ if (content.type === "thinking" && content.thinking.trim()) {
12
+ blocks.push({
13
+ kind: "thinking",
14
+ value: content.thinking.trim(),
15
+ hasTextAfter: message.content.slice(index + 1).some((next) => next.type === "text" && next.text.trim()),
16
+ });
17
+ }
18
+ }
19
+ return blocks;
20
+ }
21
+ function renderAssistantThinking(container, block, hideThinkingBlock, markdownTheme) {
22
+ if (hideThinkingBlock) {
23
+ container.addChild(new Text(theme.italic(theme.fg("thinkingText", "Thinking...")), 1, 0));
24
+ if (block.hasTextAfter) {
25
+ container.addChild(new Spacer(1));
26
+ }
27
+ return;
28
+ }
29
+ container.addChild(new Markdown(block.value, 1, 0, markdownTheme, {
30
+ color: (text) => theme.fg("thinkingText", text),
31
+ italic: true,
32
+ }));
33
+ container.addChild(new Spacer(1));
34
+ }
35
+ function renderAssistantText(container, block, markdownTheme) {
36
+ container.addChild(new Markdown(block.value, 1, 0, markdownTheme));
37
+ }
38
+ function renderAssistantErrorState(container, message) {
39
+ const hasToolCalls = message.content.some((content) => content.type === "toolCall");
40
+ if (hasToolCalls) {
41
+ return;
42
+ }
43
+ if (message.stopReason === "aborted") {
44
+ const abortMessage = message.errorMessage && message.errorMessage !== "Request was aborted"
45
+ ? message.errorMessage
46
+ : "Operation aborted";
47
+ container.addChild(new Spacer(1));
48
+ container.addChild(new Text(theme.fg("error", abortMessage), 1, 0));
49
+ return;
50
+ }
51
+ if (message.stopReason === "error") {
52
+ container.addChild(new Spacer(1));
53
+ container.addChild(new Text(theme.fg("error", `Error: ${message.errorMessage || "Unknown error"}`), 1, 0));
54
+ }
55
+ }
169
56
  export class AssistantMessageComponent extends Container {
170
57
  constructor(message, hideThinkingBlock = false, markdownTheme = getMarkdownTheme()) {
171
58
  super();
172
59
  this.hideThinkingBlock = hideThinkingBlock;
173
60
  this.markdownTheme = markdownTheme;
174
- // Container for text/thinking content
175
61
  this.contentContainer = new Container();
176
62
  this.addChild(this.contentContainer);
177
63
  if (message) {
@@ -189,62 +75,21 @@ export class AssistantMessageComponent extends Container {
189
75
  }
190
76
  updateContent(message) {
191
77
  this.lastMessage = message;
192
- // Clear content container
193
78
  this.contentContainer.clear();
194
- const hasVisibleContent = message.content.some((c) => (c.type === "text" && c.text.trim()) || (c.type === "thinking" && c.thinking.trim()));
79
+ const blocks = extractAssistantRenderableBlocks(message);
80
+ const hasVisibleContent = blocks.length > 0;
195
81
  if (hasVisibleContent) {
196
82
  this.contentContainer.addChild(new Spacer(1));
197
83
  }
198
- // Render content in order
199
- for (let i = 0; i < message.content.length; i++) {
200
- const content = message.content[i];
201
- if (content.type === "text" && content.text.trim()) {
202
- // Assistant text messages with no background - trim the text
203
- // Set paddingY=0 to avoid extra spacing before tool executions
204
- this.contentContainer.addChild(new Markdown(content.text.trim(), 1, 0, this.markdownTheme));
205
- }
206
- else if (content.type === "thinking" && content.thinking.trim()) {
207
- // Check if there's text content after this thinking block
208
- const hasTextAfter = message.content.slice(i + 1).some((c) => c.type === "text" && c.text.trim());
209
- if (this.hideThinkingBlock) {
210
- // Show static "Thinking..." label when hidden
211
- this.contentContainer.addChild(new Text(theme.italic(theme.fg("thinkingText", "Thinking...")), 1, 0));
212
- if (hasTextAfter) {
213
- this.contentContainer.addChild(new Spacer(1));
214
- }
215
- }
216
- else {
217
- // Thinking traces in thinkingText color, italic
218
- this.contentContainer.addChild(new Markdown(content.thinking.trim(), 1, 0, this.markdownTheme, {
219
- color: (text) => theme.fg("thinkingText", text),
220
- italic: true,
221
- }));
222
- this.contentContainer.addChild(new Spacer(1));
223
- }
224
- }
225
- }
226
- // Check if aborted - show after partial content
227
- // But only if there are no tool calls (tool execution components will show the error)
228
- const hasToolCalls = message.content.some((c) => c.type === "toolCall");
229
- if (!hasToolCalls) {
230
- if (message.stopReason === "aborted") {
231
- const abortMessage = message.errorMessage && message.errorMessage !== "Request was aborted"
232
- ? message.errorMessage
233
- : "Operation aborted";
234
- if (hasVisibleContent) {
235
- this.contentContainer.addChild(new Spacer(1));
236
- }
237
- else {
238
- this.contentContainer.addChild(new Spacer(1));
239
- }
240
- this.contentContainer.addChild(new Text(theme.fg("error", abortMessage), 1, 0));
84
+ for (const block of blocks) {
85
+ if (block.kind === "text") {
86
+ renderAssistantText(this.contentContainer, block, this.markdownTheme);
241
87
  }
242
- else if (message.stopReason === "error") {
243
- const errorMsg = message.errorMessage || "Unknown error";
244
- this.contentContainer.addChild(new Spacer(1));
245
- this.contentContainer.addChild(new Text(theme.fg("error", `Error: ${errorMsg}`), 1, 0));
88
+ else {
89
+ renderAssistantThinking(this.contentContainer, block, this.hideThinkingBlock, this.markdownTheme);
246
90
  }
247
91
  }
92
+ renderAssistantErrorState(this.contentContainer, message);
248
93
  }
249
94
  }
250
95
  //# sourceMappingURL=assistant-message.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"assistant-message.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/assistant-message.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAsB,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;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