dexto 1.6.1 → 1.6.2

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 (552) hide show
  1. package/dist/analytics/wrapper.js +1 -1
  2. package/dist/cli/auth/dexto-api-key.d.ts +34 -0
  3. package/dist/cli/auth/dexto-api-key.d.ts.map +1 -0
  4. package/dist/cli/auth/dexto-api-key.js +161 -0
  5. package/dist/cli/auth/index.d.ts +2 -1
  6. package/dist/cli/auth/index.d.ts.map +1 -1
  7. package/dist/cli/auth/index.js +2 -1
  8. package/dist/cli/auth/oauth.d.ts +10 -0
  9. package/dist/cli/auth/oauth.d.ts.map +1 -1
  10. package/dist/cli/auth/oauth.js +113 -36
  11. package/dist/cli/auth/service.d.ts +1 -0
  12. package/dist/cli/auth/service.d.ts.map +1 -1
  13. package/dist/cli/auth/service.js +1 -0
  14. package/dist/cli/commands/auth/login.d.ts.map +1 -1
  15. package/dist/cli/commands/auth/login.js +40 -105
  16. package/dist/cli/commands/setup.d.ts.map +1 -1
  17. package/dist/cli/commands/setup.js +157 -120
  18. package/dist/cli/utils/config-validation.js +3 -3
  19. package/dist/cli/utils/options.d.ts.map +1 -1
  20. package/dist/cli/utils/options.js +6 -0
  21. package/dist/index-main.js +36 -2
  22. package/dist/webui/assets/index-BPlk2Wbt.css +1 -0
  23. package/dist/webui/assets/index-BZvrpxyh.js +2059 -0
  24. package/dist/webui/index.html +2 -2
  25. package/package.json +12 -22
  26. package/dist/cli/assets/sounds/SOURCES.md +0 -35
  27. package/dist/cli/assets/sounds/boot.wav +0 -0
  28. package/dist/cli/assets/sounds/chime.wav +0 -0
  29. package/dist/cli/assets/sounds/coin.wav +0 -0
  30. package/dist/cli/assets/sounds/confirm.wav +0 -0
  31. package/dist/cli/assets/sounds/levelup.wav +0 -0
  32. package/dist/cli/assets/sounds/ping.wav +0 -0
  33. package/dist/cli/assets/sounds/powerup.wav +0 -0
  34. package/dist/cli/assets/sounds/startup.wav +0 -0
  35. package/dist/cli/assets/sounds/success.wav +0 -0
  36. package/dist/cli/assets/sounds/treasure.wav +0 -0
  37. package/dist/cli/assets/sounds/win.wav +0 -0
  38. package/dist/cli/commands/interactive-commands/auth/index.d.ts +0 -12
  39. package/dist/cli/commands/interactive-commands/auth/index.d.ts.map +0 -1
  40. package/dist/cli/commands/interactive-commands/auth/index.js +0 -20
  41. package/dist/cli/commands/interactive-commands/command-parser.d.ts +0 -56
  42. package/dist/cli/commands/interactive-commands/command-parser.d.ts.map +0 -1
  43. package/dist/cli/commands/interactive-commands/command-parser.js +0 -173
  44. package/dist/cli/commands/interactive-commands/commands.d.ts +0 -52
  45. package/dist/cli/commands/interactive-commands/commands.d.ts.map +0 -1
  46. package/dist/cli/commands/interactive-commands/commands.js +0 -142
  47. package/dist/cli/commands/interactive-commands/documentation-commands.d.ts +0 -15
  48. package/dist/cli/commands/interactive-commands/documentation-commands.d.ts.map +0 -1
  49. package/dist/cli/commands/interactive-commands/documentation-commands.js +0 -39
  50. package/dist/cli/commands/interactive-commands/exit-handler.d.ts +0 -12
  51. package/dist/cli/commands/interactive-commands/exit-handler.d.ts.map +0 -1
  52. package/dist/cli/commands/interactive-commands/exit-handler.js +0 -20
  53. package/dist/cli/commands/interactive-commands/exit-stats.d.ts +0 -24
  54. package/dist/cli/commands/interactive-commands/exit-stats.d.ts.map +0 -1
  55. package/dist/cli/commands/interactive-commands/exit-stats.js +0 -17
  56. package/dist/cli/commands/interactive-commands/export/index.d.ts +0 -13
  57. package/dist/cli/commands/interactive-commands/export/index.d.ts.map +0 -1
  58. package/dist/cli/commands/interactive-commands/export/index.js +0 -21
  59. package/dist/cli/commands/interactive-commands/general-commands.d.ts +0 -22
  60. package/dist/cli/commands/interactive-commands/general-commands.d.ts.map +0 -1
  61. package/dist/cli/commands/interactive-commands/general-commands.js +0 -508
  62. package/dist/cli/commands/interactive-commands/mcp/index.d.ts +0 -13
  63. package/dist/cli/commands/interactive-commands/mcp/index.d.ts.map +0 -1
  64. package/dist/cli/commands/interactive-commands/mcp/index.js +0 -18
  65. package/dist/cli/commands/interactive-commands/model/index.d.ts +0 -13
  66. package/dist/cli/commands/interactive-commands/model/index.d.ts.map +0 -1
  67. package/dist/cli/commands/interactive-commands/model/index.js +0 -19
  68. package/dist/cli/commands/interactive-commands/plugin/index.d.ts +0 -13
  69. package/dist/cli/commands/interactive-commands/plugin/index.d.ts.map +0 -1
  70. package/dist/cli/commands/interactive-commands/plugin/index.js +0 -18
  71. package/dist/cli/commands/interactive-commands/prompt-commands.d.ts +0 -25
  72. package/dist/cli/commands/interactive-commands/prompt-commands.d.ts.map +0 -1
  73. package/dist/cli/commands/interactive-commands/prompt-commands.js +0 -284
  74. package/dist/cli/commands/interactive-commands/session/index.d.ts +0 -16
  75. package/dist/cli/commands/interactive-commands/session/index.d.ts.map +0 -1
  76. package/dist/cli/commands/interactive-commands/session/index.js +0 -15
  77. package/dist/cli/commands/interactive-commands/session/session-commands.d.ts +0 -32
  78. package/dist/cli/commands/interactive-commands/session/session-commands.d.ts.map +0 -1
  79. package/dist/cli/commands/interactive-commands/session/session-commands.js +0 -65
  80. package/dist/cli/commands/interactive-commands/system/index.d.ts +0 -13
  81. package/dist/cli/commands/interactive-commands/system/index.d.ts.map +0 -1
  82. package/dist/cli/commands/interactive-commands/system/index.js +0 -12
  83. package/dist/cli/commands/interactive-commands/system/system-commands.d.ts +0 -6
  84. package/dist/cli/commands/interactive-commands/system/system-commands.d.ts.map +0 -1
  85. package/dist/cli/commands/interactive-commands/system/system-commands.js +0 -188
  86. package/dist/cli/commands/interactive-commands/tool-commands.d.ts +0 -15
  87. package/dist/cli/commands/interactive-commands/tool-commands.d.ts.map +0 -1
  88. package/dist/cli/commands/interactive-commands/tool-commands.js +0 -24
  89. package/dist/cli/commands/interactive-commands/utils/arg-parser.d.ts +0 -57
  90. package/dist/cli/commands/interactive-commands/utils/arg-parser.d.ts.map +0 -1
  91. package/dist/cli/commands/interactive-commands/utils/arg-parser.js +0 -81
  92. package/dist/cli/commands/interactive-commands/utils/command-output.d.ts +0 -40
  93. package/dist/cli/commands/interactive-commands/utils/command-output.d.ts.map +0 -1
  94. package/dist/cli/commands/interactive-commands/utils/command-output.js +0 -56
  95. package/dist/cli/commands/interactive-commands/utils/format-output.d.ts +0 -14
  96. package/dist/cli/commands/interactive-commands/utils/format-output.d.ts.map +0 -1
  97. package/dist/cli/commands/interactive-commands/utils/format-output.js +0 -18
  98. package/dist/cli/ink-cli/InkCLIRefactored.d.ts +0 -52
  99. package/dist/cli/ink-cli/InkCLIRefactored.d.ts.map +0 -1
  100. package/dist/cli/ink-cli/InkCLIRefactored.js +0 -231
  101. package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts +0 -44
  102. package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts.map +0 -1
  103. package/dist/cli/ink-cli/components/ApprovalPrompt.js +0 -323
  104. package/dist/cli/ink-cli/components/BackgroundTasksPanel.d.ts +0 -18
  105. package/dist/cli/ink-cli/components/BackgroundTasksPanel.d.ts.map +0 -1
  106. package/dist/cli/ink-cli/components/BackgroundTasksPanel.js +0 -48
  107. package/dist/cli/ink-cli/components/CustomInput.d.ts +0 -17
  108. package/dist/cli/ink-cli/components/CustomInput.d.ts.map +0 -1
  109. package/dist/cli/ink-cli/components/CustomInput.js +0 -51
  110. package/dist/cli/ink-cli/components/CustomTextInput.d.ts +0 -16
  111. package/dist/cli/ink-cli/components/CustomTextInput.d.ts.map +0 -1
  112. package/dist/cli/ink-cli/components/CustomTextInput.js +0 -36
  113. package/dist/cli/ink-cli/components/EditableMultiLineInput.d.ts +0 -19
  114. package/dist/cli/ink-cli/components/EditableMultiLineInput.d.ts.map +0 -1
  115. package/dist/cli/ink-cli/components/EditableMultiLineInput.js +0 -120
  116. package/dist/cli/ink-cli/components/ElicitationForm.d.ts +0 -24
  117. package/dist/cli/ink-cli/components/ElicitationForm.d.ts.map +0 -1
  118. package/dist/cli/ink-cli/components/ElicitationForm.js +0 -592
  119. package/dist/cli/ink-cli/components/ErrorBoundary.d.ts +0 -20
  120. package/dist/cli/ink-cli/components/ErrorBoundary.d.ts.map +0 -1
  121. package/dist/cli/ink-cli/components/ErrorBoundary.js +0 -29
  122. package/dist/cli/ink-cli/components/Footer.d.ts +0 -22
  123. package/dist/cli/ink-cli/components/Footer.d.ts.map +0 -1
  124. package/dist/cli/ink-cli/components/Footer.js +0 -76
  125. package/dist/cli/ink-cli/components/HistorySearchBar.d.ts +0 -17
  126. package/dist/cli/ink-cli/components/HistorySearchBar.d.ts.map +0 -1
  127. package/dist/cli/ink-cli/components/HistorySearchBar.js +0 -8
  128. package/dist/cli/ink-cli/components/MultiLineInput.d.ts +0 -12
  129. package/dist/cli/ink-cli/components/MultiLineInput.d.ts.map +0 -1
  130. package/dist/cli/ink-cli/components/MultiLineInput.js +0 -27
  131. package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts +0 -26
  132. package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts.map +0 -1
  133. package/dist/cli/ink-cli/components/ResourceAutocomplete.js +0 -385
  134. package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts +0 -28
  135. package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts.map +0 -1
  136. package/dist/cli/ink-cli/components/SlashCommandAutocomplete.js +0 -412
  137. package/dist/cli/ink-cli/components/StatusBar.d.ts +0 -41
  138. package/dist/cli/ink-cli/components/StatusBar.d.ts.map +0 -1
  139. package/dist/cli/ink-cli/components/StatusBar.js +0 -116
  140. package/dist/cli/ink-cli/components/TextBufferInput.d.ts +0 -52
  141. package/dist/cli/ink-cli/components/TextBufferInput.d.ts.map +0 -1
  142. package/dist/cli/ink-cli/components/TextBufferInput.js +0 -490
  143. package/dist/cli/ink-cli/components/TodoPanel.d.ts +0 -26
  144. package/dist/cli/ink-cli/components/TodoPanel.d.ts.map +0 -1
  145. package/dist/cli/ink-cli/components/TodoPanel.js +0 -62
  146. package/dist/cli/ink-cli/components/base/BaseAutocomplete.d.ts +0 -29
  147. package/dist/cli/ink-cli/components/base/BaseAutocomplete.d.ts.map +0 -1
  148. package/dist/cli/ink-cli/components/base/BaseAutocomplete.js +0 -98
  149. package/dist/cli/ink-cli/components/base/BaseSelector.d.ts +0 -37
  150. package/dist/cli/ink-cli/components/base/BaseSelector.d.ts.map +0 -1
  151. package/dist/cli/ink-cli/components/base/BaseSelector.js +0 -128
  152. package/dist/cli/ink-cli/components/base/index.d.ts +0 -6
  153. package/dist/cli/ink-cli/components/base/index.d.ts.map +0 -1
  154. package/dist/cli/ink-cli/components/base/index.js +0 -5
  155. package/dist/cli/ink-cli/components/chat/ChatView.d.ts +0 -19
  156. package/dist/cli/ink-cli/components/chat/ChatView.d.ts.map +0 -1
  157. package/dist/cli/ink-cli/components/chat/ChatView.js +0 -11
  158. package/dist/cli/ink-cli/components/chat/Footer.d.ts +0 -9
  159. package/dist/cli/ink-cli/components/chat/Footer.d.ts.map +0 -1
  160. package/dist/cli/ink-cli/components/chat/Footer.js +0 -8
  161. package/dist/cli/ink-cli/components/chat/Header.d.ts +0 -18
  162. package/dist/cli/ink-cli/components/chat/Header.d.ts.map +0 -1
  163. package/dist/cli/ink-cli/components/chat/Header.js +0 -16
  164. package/dist/cli/ink-cli/components/chat/MessageItem.d.ts +0 -21
  165. package/dist/cli/ink-cli/components/chat/MessageItem.d.ts.map +0 -1
  166. package/dist/cli/ink-cli/components/chat/MessageItem.js +0 -182
  167. package/dist/cli/ink-cli/components/chat/MessageList.d.ts +0 -16
  168. package/dist/cli/ink-cli/components/chat/MessageList.d.ts.map +0 -1
  169. package/dist/cli/ink-cli/components/chat/MessageList.js +0 -20
  170. package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts +0 -16
  171. package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts.map +0 -1
  172. package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.js +0 -27
  173. package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts +0 -18
  174. package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts.map +0 -1
  175. package/dist/cli/ink-cli/components/chat/ToolIcon.js +0 -36
  176. package/dist/cli/ink-cli/components/chat/index.d.ts +0 -10
  177. package/dist/cli/ink-cli/components/chat/index.d.ts.map +0 -1
  178. package/dist/cli/ink-cli/components/chat/index.js +0 -9
  179. package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts +0 -10
  180. package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts.map +0 -1
  181. package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.js +0 -6
  182. package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts +0 -10
  183. package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts.map +0 -1
  184. package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.js +0 -15
  185. package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts +0 -10
  186. package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts.map +0 -1
  187. package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.js +0 -9
  188. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts +0 -10
  189. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts.map +0 -1
  190. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.js +0 -37
  191. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts +0 -10
  192. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts.map +0 -1
  193. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.js +0 -9
  194. package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts +0 -10
  195. package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts.map +0 -1
  196. package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.js +0 -6
  197. package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts +0 -10
  198. package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts.map +0 -1
  199. package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.js +0 -29
  200. package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts +0 -45
  201. package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts.map +0 -1
  202. package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.js +0 -38
  203. package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts +0 -10
  204. package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts.map +0 -1
  205. package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.js +0 -6
  206. package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts +0 -13
  207. package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts.map +0 -1
  208. package/dist/cli/ink-cli/components/chat/styled-boxes/index.js +0 -12
  209. package/dist/cli/ink-cli/components/input/InputArea.d.ts +0 -46
  210. package/dist/cli/ink-cli/components/input/InputArea.d.ts.map +0 -1
  211. package/dist/cli/ink-cli/components/input/InputArea.js +0 -6
  212. package/dist/cli/ink-cli/components/input/index.d.ts +0 -5
  213. package/dist/cli/ink-cli/components/input/index.d.ts.map +0 -1
  214. package/dist/cli/ink-cli/components/input/index.js +0 -4
  215. package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts +0 -27
  216. package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts.map +0 -1
  217. package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.js +0 -182
  218. package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts +0 -29
  219. package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts.map +0 -1
  220. package/dist/cli/ink-cli/components/modes/StaticCLI.js +0 -114
  221. package/dist/cli/ink-cli/components/modes/index.d.ts +0 -10
  222. package/dist/cli/ink-cli/components/modes/index.d.ts.map +0 -1
  223. package/dist/cli/ink-cli/components/modes/index.js +0 -9
  224. package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts +0 -26
  225. package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts.map +0 -1
  226. package/dist/cli/ink-cli/components/overlays/ApiKeyInput.js +0 -92
  227. package/dist/cli/ink-cli/components/overlays/CommandOutputOverlay.d.ts +0 -13
  228. package/dist/cli/ink-cli/components/overlays/CommandOutputOverlay.d.ts.map +0 -1
  229. package/dist/cli/ink-cli/components/overlays/CommandOutputOverlay.js +0 -60
  230. package/dist/cli/ink-cli/components/overlays/ContextStatsOverlay.d.ts +0 -26
  231. package/dist/cli/ink-cli/components/overlays/ContextStatsOverlay.d.ts.map +0 -1
  232. package/dist/cli/ink-cli/components/overlays/ContextStatsOverlay.js +0 -241
  233. package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts +0 -29
  234. package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts.map +0 -1
  235. package/dist/cli/ink-cli/components/overlays/CustomModelWizard.js +0 -301
  236. package/dist/cli/ink-cli/components/overlays/ExportWizard.d.ts +0 -22
  237. package/dist/cli/ink-cli/components/overlays/ExportWizard.d.ts.map +0 -1
  238. package/dist/cli/ink-cli/components/overlays/ExportWizard.js +0 -308
  239. package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts +0 -23
  240. package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts.map +0 -1
  241. package/dist/cli/ink-cli/components/overlays/LogLevelSelector.js +0 -70
  242. package/dist/cli/ink-cli/components/overlays/MarketplaceAddPrompt.d.ts +0 -20
  243. package/dist/cli/ink-cli/components/overlays/MarketplaceAddPrompt.d.ts.map +0 -1
  244. package/dist/cli/ink-cli/components/overlays/MarketplaceAddPrompt.js +0 -81
  245. package/dist/cli/ink-cli/components/overlays/MarketplaceBrowser.d.ts +0 -31
  246. package/dist/cli/ink-cli/components/overlays/MarketplaceBrowser.d.ts.map +0 -1
  247. package/dist/cli/ink-cli/components/overlays/MarketplaceBrowser.js +0 -297
  248. package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts +0 -22
  249. package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts.map +0 -1
  250. package/dist/cli/ink-cli/components/overlays/McpAddChoice.js +0 -59
  251. package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts +0 -26
  252. package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts.map +0 -1
  253. package/dist/cli/ink-cli/components/overlays/McpAddSelector.js +0 -73
  254. package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts +0 -21
  255. package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts.map +0 -1
  256. package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.js +0 -51
  257. package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts +0 -29
  258. package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts.map +0 -1
  259. package/dist/cli/ink-cli/components/overlays/McpCustomWizard.js +0 -215
  260. package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts +0 -22
  261. package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts.map +0 -1
  262. package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.js +0 -80
  263. package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts +0 -21
  264. package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts.map +0 -1
  265. package/dist/cli/ink-cli/components/overlays/McpSelector.js +0 -52
  266. package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts +0 -28
  267. package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts.map +0 -1
  268. package/dist/cli/ink-cli/components/overlays/McpServerActions.js +0 -93
  269. package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts +0 -29
  270. package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts.map +0 -1
  271. package/dist/cli/ink-cli/components/overlays/McpServerList.js +0 -116
  272. package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts +0 -28
  273. package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts.map +0 -1
  274. package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.js +0 -743
  275. package/dist/cli/ink-cli/components/overlays/PluginActions.d.ts +0 -27
  276. package/dist/cli/ink-cli/components/overlays/PluginActions.d.ts.map +0 -1
  277. package/dist/cli/ink-cli/components/overlays/PluginActions.js +0 -66
  278. package/dist/cli/ink-cli/components/overlays/PluginList.d.ts +0 -21
  279. package/dist/cli/ink-cli/components/overlays/PluginList.d.ts.map +0 -1
  280. package/dist/cli/ink-cli/components/overlays/PluginList.js +0 -70
  281. package/dist/cli/ink-cli/components/overlays/PluginManager.d.ts +0 -21
  282. package/dist/cli/ink-cli/components/overlays/PluginManager.d.ts.map +0 -1
  283. package/dist/cli/ink-cli/components/overlays/PluginManager.js +0 -63
  284. package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts +0 -22
  285. package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts.map +0 -1
  286. package/dist/cli/ink-cli/components/overlays/PromptAddChoice.js +0 -52
  287. package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts +0 -29
  288. package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts.map +0 -1
  289. package/dist/cli/ink-cli/components/overlays/PromptAddWizard.js +0 -166
  290. package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts +0 -27
  291. package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts.map +0 -1
  292. package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.js +0 -119
  293. package/dist/cli/ink-cli/components/overlays/PromptList.d.ts +0 -33
  294. package/dist/cli/ink-cli/components/overlays/PromptList.d.ts.map +0 -1
  295. package/dist/cli/ink-cli/components/overlays/PromptList.js +0 -143
  296. package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts +0 -23
  297. package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts.map +0 -1
  298. package/dist/cli/ink-cli/components/overlays/SearchOverlay.js +0 -189
  299. package/dist/cli/ink-cli/components/overlays/SessionRenameOverlay.d.ts +0 -21
  300. package/dist/cli/ink-cli/components/overlays/SessionRenameOverlay.d.ts.map +0 -1
  301. package/dist/cli/ink-cli/components/overlays/SessionRenameOverlay.js +0 -63
  302. package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts +0 -26
  303. package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts.map +0 -1
  304. package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.js +0 -126
  305. package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts +0 -21
  306. package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts.map +0 -1
  307. package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.js +0 -42
  308. package/dist/cli/ink-cli/components/overlays/SoundsSelector.d.ts +0 -21
  309. package/dist/cli/ink-cli/components/overlays/SoundsSelector.d.ts.map +0 -1
  310. package/dist/cli/ink-cli/components/overlays/SoundsSelector.js +0 -566
  311. package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts +0 -20
  312. package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts.map +0 -1
  313. package/dist/cli/ink-cli/components/overlays/StreamSelector.js +0 -58
  314. package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts +0 -26
  315. package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts.map +0 -1
  316. package/dist/cli/ink-cli/components/overlays/ToolBrowser.js +0 -697
  317. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts +0 -25
  318. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts.map +0 -1
  319. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.js +0 -604
  320. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts +0 -15
  321. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts.map +0 -1
  322. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.js +0 -14
  323. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts +0 -42
  324. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts.map +0 -1
  325. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.js +0 -547
  326. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts +0 -25
  327. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts.map +0 -1
  328. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.js +0 -29
  329. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts +0 -17
  330. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts.map +0 -1
  331. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.js +0 -11
  332. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts +0 -20
  333. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts.map +0 -1
  334. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.js +0 -10
  335. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts +0 -30
  336. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts.map +0 -1
  337. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.js +0 -13
  338. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts +0 -8
  339. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts.map +0 -1
  340. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.js +0 -7
  341. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts +0 -85
  342. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts.map +0 -1
  343. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.js +0 -38
  344. package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts +0 -21
  345. package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts.map +0 -1
  346. package/dist/cli/ink-cli/components/renderers/DiffRenderer.js +0 -65
  347. package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts +0 -30
  348. package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts.map +0 -1
  349. package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.js +0 -67
  350. package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts +0 -21
  351. package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts.map +0 -1
  352. package/dist/cli/ink-cli/components/renderers/FileRenderer.js +0 -37
  353. package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts +0 -21
  354. package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts.map +0 -1
  355. package/dist/cli/ink-cli/components/renderers/GenericRenderer.js +0 -26
  356. package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts +0 -20
  357. package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts.map +0 -1
  358. package/dist/cli/ink-cli/components/renderers/SearchRenderer.js +0 -26
  359. package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts +0 -21
  360. package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts.map +0 -1
  361. package/dist/cli/ink-cli/components/renderers/ShellRenderer.js +0 -15
  362. package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts +0 -61
  363. package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts.map +0 -1
  364. package/dist/cli/ink-cli/components/renderers/diff-shared.js +0 -158
  365. package/dist/cli/ink-cli/components/renderers/index.d.ts +0 -28
  366. package/dist/cli/ink-cli/components/renderers/index.d.ts.map +0 -1
  367. package/dist/cli/ink-cli/components/renderers/index.js +0 -36
  368. package/dist/cli/ink-cli/components/shared/FocusOverlayFrame.d.ts +0 -7
  369. package/dist/cli/ink-cli/components/shared/FocusOverlayFrame.d.ts.map +0 -1
  370. package/dist/cli/ink-cli/components/shared/FocusOverlayFrame.js +0 -8
  371. package/dist/cli/ink-cli/components/shared/HintBar.d.ts +0 -6
  372. package/dist/cli/ink-cli/components/shared/HintBar.d.ts.map +0 -1
  373. package/dist/cli/ink-cli/components/shared/HintBar.js +0 -6
  374. package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts +0 -38
  375. package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts.map +0 -1
  376. package/dist/cli/ink-cli/components/shared/MarkdownText.js +0 -389
  377. package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts +0 -44
  378. package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts.map +0 -1
  379. package/dist/cli/ink-cli/components/shared/VirtualizedList.js +0 -300
  380. package/dist/cli/ink-cli/components/shared/text-buffer.d.ts +0 -185
  381. package/dist/cli/ink-cli/components/shared/text-buffer.d.ts.map +0 -1
  382. package/dist/cli/ink-cli/components/shared/text-buffer.js +0 -1338
  383. package/dist/cli/ink-cli/constants/processingPhrases.d.ts +0 -10
  384. package/dist/cli/ink-cli/constants/processingPhrases.d.ts.map +0 -1
  385. package/dist/cli/ink-cli/constants/processingPhrases.js +0 -92
  386. package/dist/cli/ink-cli/constants/spinnerFrames.d.ts +0 -2
  387. package/dist/cli/ink-cli/constants/spinnerFrames.d.ts.map +0 -1
  388. package/dist/cli/ink-cli/constants/spinnerFrames.js +0 -1
  389. package/dist/cli/ink-cli/constants/tips.d.ts +0 -15
  390. package/dist/cli/ink-cli/constants/tips.d.ts.map +0 -1
  391. package/dist/cli/ink-cli/constants/tips.js +0 -58
  392. package/dist/cli/ink-cli/containers/InputContainer.d.ts +0 -62
  393. package/dist/cli/ink-cli/containers/InputContainer.d.ts.map +0 -1
  394. package/dist/cli/ink-cli/containers/InputContainer.js +0 -643
  395. package/dist/cli/ink-cli/containers/OverlayContainer.d.ts +0 -42
  396. package/dist/cli/ink-cli/containers/OverlayContainer.d.ts.map +0 -1
  397. package/dist/cli/ink-cli/containers/OverlayContainer.js +0 -1840
  398. package/dist/cli/ink-cli/containers/index.d.ts +0 -6
  399. package/dist/cli/ink-cli/containers/index.d.ts.map +0 -1
  400. package/dist/cli/ink-cli/containers/index.js +0 -5
  401. package/dist/cli/ink-cli/contexts/KeypressContext.d.ts +0 -36
  402. package/dist/cli/ink-cli/contexts/KeypressContext.d.ts.map +0 -1
  403. package/dist/cli/ink-cli/contexts/KeypressContext.js +0 -461
  404. package/dist/cli/ink-cli/contexts/MouseContext.d.ts +0 -27
  405. package/dist/cli/ink-cli/contexts/MouseContext.d.ts.map +0 -1
  406. package/dist/cli/ink-cli/contexts/MouseContext.js +0 -102
  407. package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts +0 -33
  408. package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts.map +0 -1
  409. package/dist/cli/ink-cli/contexts/ScrollProvider.js +0 -170
  410. package/dist/cli/ink-cli/contexts/SoundContext.d.ts +0 -23
  411. package/dist/cli/ink-cli/contexts/SoundContext.d.ts.map +0 -1
  412. package/dist/cli/ink-cli/contexts/SoundContext.js +0 -22
  413. package/dist/cli/ink-cli/contexts/index.d.ts +0 -8
  414. package/dist/cli/ink-cli/contexts/index.d.ts.map +0 -1
  415. package/dist/cli/ink-cli/contexts/index.js +0 -7
  416. package/dist/cli/ink-cli/hooks/index.d.ts +0 -12
  417. package/dist/cli/ink-cli/hooks/index.d.ts.map +0 -1
  418. package/dist/cli/ink-cli/hooks/index.js +0 -14
  419. package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts +0 -49
  420. package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts.map +0 -1
  421. package/dist/cli/ink-cli/hooks/useAgentEvents.js +0 -369
  422. package/dist/cli/ink-cli/hooks/useAnimationTick.d.ts +0 -11
  423. package/dist/cli/ink-cli/hooks/useAnimationTick.d.ts.map +0 -1
  424. package/dist/cli/ink-cli/hooks/useAnimationTick.js +0 -54
  425. package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts +0 -14
  426. package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts.map +0 -1
  427. package/dist/cli/ink-cli/hooks/useBatchedScroll.js +0 -25
  428. package/dist/cli/ink-cli/hooks/useCLIState.d.ts +0 -52
  429. package/dist/cli/ink-cli/hooks/useCLIState.d.ts.map +0 -1
  430. package/dist/cli/ink-cli/hooks/useCLIState.js +0 -224
  431. package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts +0 -24
  432. package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts.map +0 -1
  433. package/dist/cli/ink-cli/hooks/useElapsedTime.js +0 -69
  434. package/dist/cli/ink-cli/hooks/useGitBranch.d.ts +0 -13
  435. package/dist/cli/ink-cli/hooks/useGitBranch.d.ts.map +0 -1
  436. package/dist/cli/ink-cli/hooks/useGitBranch.js +0 -35
  437. package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts +0 -61
  438. package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts.map +0 -1
  439. package/dist/cli/ink-cli/hooks/useHistorySearch.js +0 -210
  440. package/dist/cli/ink-cli/hooks/useInputHistory.d.ts +0 -18
  441. package/dist/cli/ink-cli/hooks/useInputHistory.d.ts.map +0 -1
  442. package/dist/cli/ink-cli/hooks/useInputHistory.js +0 -26
  443. package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts +0 -136
  444. package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts.map +0 -1
  445. package/dist/cli/ink-cli/hooks/useInputOrchestrator.js +0 -715
  446. package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.d.ts +0 -21
  447. package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.d.ts.map +0 -1
  448. package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.js +0 -80
  449. package/dist/cli/ink-cli/hooks/useKeypress.d.ts +0 -18
  450. package/dist/cli/ink-cli/hooks/useKeypress.d.ts.map +0 -1
  451. package/dist/cli/ink-cli/hooks/useKeypress.js +0 -26
  452. package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts +0 -30
  453. package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts.map +0 -1
  454. package/dist/cli/ink-cli/hooks/usePhraseCycler.js +0 -68
  455. package/dist/cli/ink-cli/hooks/useStreaming.d.ts +0 -19
  456. package/dist/cli/ink-cli/hooks/useStreaming.d.ts.map +0 -1
  457. package/dist/cli/ink-cli/hooks/useStreaming.js +0 -26
  458. package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts +0 -14
  459. package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts.map +0 -1
  460. package/dist/cli/ink-cli/hooks/useTerminalSize.js +0 -31
  461. package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts +0 -46
  462. package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts.map +0 -1
  463. package/dist/cli/ink-cli/hooks/useTokenCounter.js +0 -122
  464. package/dist/cli/ink-cli/services/CommandService.d.ts +0 -58
  465. package/dist/cli/ink-cli/services/CommandService.d.ts.map +0 -1
  466. package/dist/cli/ink-cli/services/CommandService.js +0 -64
  467. package/dist/cli/ink-cli/services/InputService.d.ts +0 -40
  468. package/dist/cli/ink-cli/services/InputService.d.ts.map +0 -1
  469. package/dist/cli/ink-cli/services/InputService.js +0 -87
  470. package/dist/cli/ink-cli/services/MessageService.d.ts +0 -35
  471. package/dist/cli/ink-cli/services/MessageService.d.ts.map +0 -1
  472. package/dist/cli/ink-cli/services/MessageService.js +0 -49
  473. package/dist/cli/ink-cli/services/index.d.ts +0 -8
  474. package/dist/cli/ink-cli/services/index.d.ts.map +0 -1
  475. package/dist/cli/ink-cli/services/index.js +0 -7
  476. package/dist/cli/ink-cli/services/processStream.d.ts +0 -75
  477. package/dist/cli/ink-cli/services/processStream.d.ts.map +0 -1
  478. package/dist/cli/ink-cli/services/processStream.js +0 -951
  479. package/dist/cli/ink-cli/state/actions.d.ts +0 -124
  480. package/dist/cli/ink-cli/state/actions.d.ts.map +0 -1
  481. package/dist/cli/ink-cli/state/actions.js +0 -8
  482. package/dist/cli/ink-cli/state/index.d.ts +0 -10
  483. package/dist/cli/ink-cli/state/index.d.ts.map +0 -1
  484. package/dist/cli/ink-cli/state/index.js +0 -8
  485. package/dist/cli/ink-cli/state/initialState.d.ts +0 -12
  486. package/dist/cli/ink-cli/state/initialState.d.ts.map +0 -1
  487. package/dist/cli/ink-cli/state/initialState.js +0 -58
  488. package/dist/cli/ink-cli/state/reducer.d.ts +0 -15
  489. package/dist/cli/ink-cli/state/reducer.d.ts.map +0 -1
  490. package/dist/cli/ink-cli/state/reducer.js +0 -341
  491. package/dist/cli/ink-cli/state/streaming-state.d.ts +0 -27
  492. package/dist/cli/ink-cli/state/streaming-state.d.ts.map +0 -1
  493. package/dist/cli/ink-cli/state/streaming-state.js +0 -39
  494. package/dist/cli/ink-cli/state/types.d.ts +0 -378
  495. package/dist/cli/ink-cli/state/types.d.ts.map +0 -1
  496. package/dist/cli/ink-cli/state/types.js +0 -5
  497. package/dist/cli/ink-cli/utils/bracketedPaste.d.ts +0 -22
  498. package/dist/cli/ink-cli/utils/bracketedPaste.d.ts.map +0 -1
  499. package/dist/cli/ink-cli/utils/bracketedPaste.js +0 -27
  500. package/dist/cli/ink-cli/utils/clipboardUtils.d.ts +0 -49
  501. package/dist/cli/ink-cli/utils/clipboardUtils.d.ts.map +0 -1
  502. package/dist/cli/ink-cli/utils/clipboardUtils.js +0 -356
  503. package/dist/cli/ink-cli/utils/commandOverlays.d.ts +0 -33
  504. package/dist/cli/ink-cli/utils/commandOverlays.d.ts.map +0 -1
  505. package/dist/cli/ink-cli/utils/commandOverlays.js +0 -85
  506. package/dist/cli/ink-cli/utils/debugLog.d.ts +0 -38
  507. package/dist/cli/ink-cli/utils/debugLog.d.ts.map +0 -1
  508. package/dist/cli/ink-cli/utils/debugLog.js +0 -66
  509. package/dist/cli/ink-cli/utils/elicitationSchema.d.ts +0 -11
  510. package/dist/cli/ink-cli/utils/elicitationSchema.d.ts.map +0 -1
  511. package/dist/cli/ink-cli/utils/elicitationSchema.js +0 -80
  512. package/dist/cli/ink-cli/utils/idGenerator.d.ts +0 -10
  513. package/dist/cli/ink-cli/utils/idGenerator.d.ts.map +0 -1
  514. package/dist/cli/ink-cli/utils/idGenerator.js +0 -12
  515. package/dist/cli/ink-cli/utils/index.d.ts +0 -9
  516. package/dist/cli/ink-cli/utils/index.d.ts.map +0 -1
  517. package/dist/cli/ink-cli/utils/index.js +0 -13
  518. package/dist/cli/ink-cli/utils/input.d.ts +0 -25
  519. package/dist/cli/ink-cli/utils/input.d.ts.map +0 -1
  520. package/dist/cli/ink-cli/utils/input.js +0 -56
  521. package/dist/cli/ink-cli/utils/inputParsing.d.ts +0 -31
  522. package/dist/cli/ink-cli/utils/inputParsing.d.ts.map +0 -1
  523. package/dist/cli/ink-cli/utils/inputParsing.js +0 -70
  524. package/dist/cli/ink-cli/utils/llm-provider-display.d.ts +0 -3
  525. package/dist/cli/ink-cli/utils/llm-provider-display.d.ts.map +0 -1
  526. package/dist/cli/ink-cli/utils/llm-provider-display.js +0 -22
  527. package/dist/cli/ink-cli/utils/messageFormatting.d.ts +0 -125
  528. package/dist/cli/ink-cli/utils/messageFormatting.d.ts.map +0 -1
  529. package/dist/cli/ink-cli/utils/messageFormatting.js +0 -485
  530. package/dist/cli/ink-cli/utils/mouse.d.ts +0 -61
  531. package/dist/cli/ink-cli/utils/mouse.d.ts.map +0 -1
  532. package/dist/cli/ink-cli/utils/mouse.js +0 -209
  533. package/dist/cli/ink-cli/utils/overlayPresentation.d.ts +0 -19
  534. package/dist/cli/ink-cli/utils/overlayPresentation.d.ts.map +0 -1
  535. package/dist/cli/ink-cli/utils/overlayPresentation.js +0 -33
  536. package/dist/cli/ink-cli/utils/overlaySizing.d.ts +0 -19
  537. package/dist/cli/ink-cli/utils/overlaySizing.d.ts.map +0 -1
  538. package/dist/cli/ink-cli/utils/overlaySizing.js +0 -11
  539. package/dist/cli/ink-cli/utils/soundNotification.d.ts +0 -77
  540. package/dist/cli/ink-cli/utils/soundNotification.d.ts.map +0 -1
  541. package/dist/cli/ink-cli/utils/soundNotification.js +0 -226
  542. package/dist/cli/ink-cli/utils/streamSplitter.d.ts +0 -44
  543. package/dist/cli/ink-cli/utils/streamSplitter.d.ts.map +0 -1
  544. package/dist/cli/ink-cli/utils/streamSplitter.js +0 -154
  545. package/dist/cli/ink-cli/utils/textUtils.d.ts +0 -63
  546. package/dist/cli/ink-cli/utils/textUtils.d.ts.map +0 -1
  547. package/dist/cli/ink-cli/utils/textUtils.js +0 -248
  548. package/dist/cli/ink-cli/utils/toolUtils.d.ts +0 -20
  549. package/dist/cli/ink-cli/utils/toolUtils.d.ts.map +0 -1
  550. package/dist/cli/ink-cli/utils/toolUtils.js +0 -25
  551. package/dist/webui/assets/index-C9JXwpvo.css +0 -1
  552. package/dist/webui/assets/index-CKhumsZA.js +0 -2059
@@ -1,21 +0,0 @@
1
- /**
2
- * Hook for global keyboard shortcuts
3
- * Handles shortcuts like Ctrl+C (with double-press to exit), Escape, etc.
4
- */
5
- import type React from 'react';
6
- import type { DextoAgent } from '@dexto/core';
7
- import type { CLIAction } from '../state/actions.js';
8
- import type { CLIState } from '../state/types.js';
9
- interface UseKeyboardShortcutsProps {
10
- state: CLIState;
11
- dispatch: React.Dispatch<CLIAction>;
12
- agent: DextoAgent;
13
- }
14
- /**
15
- * Manages global keyboard shortcuts
16
- * - Ctrl+C: Cancel processing (if running) or show exit warning (press again to exit)
17
- * - Escape: Cancel processing or close overlays
18
- */
19
- export declare function useKeyboardShortcuts({ state, dispatch, agent }: UseKeyboardShortcutsProps): void;
20
- export {};
21
- //# sourceMappingURL=useKeyboardShortcuts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useKeyboardShortcuts.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/hooks/useKeyboardShortcuts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,UAAU,yBAAyB;IAC/B,KAAK,EAAE,QAAQ,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IACpC,KAAK,EAAE,UAAU,CAAC;CACrB;AAKD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,yBAAyB,GAAG,IAAI,CA4EhG"}
@@ -1,80 +0,0 @@
1
- /**
2
- * Hook for global keyboard shortcuts
3
- * Handles shortcuts like Ctrl+C (with double-press to exit), Escape, etc.
4
- */
5
- import { useEffect, useRef } from 'react';
6
- import { useInput, useApp } from 'ink';
7
- /** Time window for double Ctrl+C to exit (in milliseconds) */
8
- const EXIT_WARNING_TIMEOUT = 3000;
9
- /**
10
- * Manages global keyboard shortcuts
11
- * - Ctrl+C: Cancel processing (if running) or show exit warning (press again to exit)
12
- * - Escape: Cancel processing or close overlays
13
- */
14
- export function useKeyboardShortcuts({ state, dispatch, agent }) {
15
- const { exit } = useApp();
16
- // Use ref for session.id to avoid stale closures in async operations
17
- const sessionIdRef = useRef(state.session.id);
18
- useEffect(() => {
19
- sessionIdRef.current = state.session.id;
20
- }, [state.session.id]);
21
- // Auto-clear exit warning after timeout
22
- useEffect(() => {
23
- if (!state.ui.exitWarningShown || !state.ui.exitWarningTimestamp)
24
- return;
25
- const elapsed = Date.now() - state.ui.exitWarningTimestamp;
26
- const remaining = EXIT_WARNING_TIMEOUT - elapsed;
27
- if (remaining <= 0) {
28
- dispatch({ type: 'EXIT_WARNING_CLEAR' });
29
- return;
30
- }
31
- const timer = setTimeout(() => {
32
- dispatch({ type: 'EXIT_WARNING_CLEAR' });
33
- }, remaining);
34
- return () => clearTimeout(timer);
35
- }, [state.ui.exitWarningShown, state.ui.exitWarningTimestamp, dispatch]);
36
- useInput((inputChar, key) => {
37
- // Don't intercept if approval prompt is active (it handles its own keys)
38
- if (state.approval) {
39
- return;
40
- }
41
- // Don't intercept if autocomplete/selector is active (they handle their own keys)
42
- if (state.ui.activeOverlay !== 'none' && state.ui.activeOverlay !== 'approval') {
43
- return;
44
- }
45
- // Ctrl+C: Exit only (with double-press safety)
46
- // Use Escape to cancel processing
47
- if (key.ctrl && inputChar === 'c') {
48
- if (state.ui.exitWarningShown) {
49
- // Second Ctrl+C within timeout - actually exit
50
- exit();
51
- }
52
- else {
53
- // First Ctrl+C - show warning
54
- dispatch({ type: 'EXIT_WARNING_SHOW' });
55
- }
56
- return;
57
- }
58
- // Escape: Cancel processing or close overlay
59
- if (key.escape) {
60
- // Clear exit warning if shown
61
- if (state.ui.exitWarningShown) {
62
- dispatch({ type: 'EXIT_WARNING_CLEAR' });
63
- return;
64
- }
65
- if (state.ui.isProcessing) {
66
- const currentSessionId = sessionIdRef.current;
67
- if (!currentSessionId) {
68
- return;
69
- }
70
- void agent.cancel(currentSessionId).catch(() => { });
71
- dispatch({ type: 'CANCEL_START' });
72
- }
73
- else if (state.ui.activeOverlay !== 'none') {
74
- dispatch({ type: 'CLOSE_OVERLAY' });
75
- }
76
- }
77
- },
78
- // Always active - we handle guards internally for more reliable behavior
79
- { isActive: true });
80
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * useKeypress Hook
3
- *
4
- * Subscribe to keyboard events from the KeypressProvider.
5
- * This replaces Ink's useInput hook.
6
- */
7
- import type { KeypressHandler, Key } from '../contexts/KeypressContext.js';
8
- export type { Key };
9
- /**
10
- * Hook to subscribe to keypress events.
11
- *
12
- * @param onKeypress - Callback for each keypress
13
- * @param options.isActive - Whether to listen for input
14
- */
15
- export declare function useKeypress(onKeypress: KeypressHandler, { isActive }: {
16
- isActive: boolean;
17
- }): void;
18
- //# sourceMappingURL=useKeypress.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useKeypress.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/hooks/useKeypress.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAG3E,YAAY,EAAE,GAAG,EAAE,CAAC;AAEpB;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,eAAe,EAAE,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,QAa3F"}
@@ -1,26 +0,0 @@
1
- /**
2
- * useKeypress Hook
3
- *
4
- * Subscribe to keyboard events from the KeypressProvider.
5
- * This replaces Ink's useInput hook.
6
- */
7
- import { useEffect } from 'react';
8
- import { useKeypressContext } from '../contexts/KeypressContext.js';
9
- /**
10
- * Hook to subscribe to keypress events.
11
- *
12
- * @param onKeypress - Callback for each keypress
13
- * @param options.isActive - Whether to listen for input
14
- */
15
- export function useKeypress(onKeypress, { isActive }) {
16
- const { subscribe, unsubscribe } = useKeypressContext();
17
- useEffect(() => {
18
- if (!isActive) {
19
- return;
20
- }
21
- subscribe(onKeypress);
22
- return () => {
23
- unsubscribe(onKeypress);
24
- };
25
- }, [isActive, onKeypress, subscribe, unsubscribe]);
26
- }
@@ -1,30 +0,0 @@
1
- /**
2
- * usePhraseCycler Hook
3
- * Cycles through processing phrases and tips at regular intervals
4
- *
5
- * Behavior:
6
- * - 1/3 chance to show tip, 2/3 chance for witty phrase
7
- * - Phrases cycle every 8 seconds while isActive is true
8
- */
9
- export interface PhraseCyclerOptions {
10
- /** Whether the cycler is active (should only run during processing) */
11
- isActive: boolean;
12
- /** Interval in milliseconds between phrase changes (default: 8000ms = 8 seconds) */
13
- intervalMs?: number;
14
- /** Disable tips (only show witty phrases) */
15
- disableTips?: boolean;
16
- }
17
- export interface PhraseCyclerResult {
18
- /** Current phrase to display */
19
- phrase: string;
20
- /** Manually trigger a new phrase */
21
- nextPhrase: () => void;
22
- }
23
- /**
24
- * Hook that cycles through witty processing phrases and informative tips
25
- *
26
- * @param options - Configuration options
27
- * @returns Current phrase and control functions
28
- */
29
- export declare function usePhraseCycler({ isActive, intervalMs, disableTips, }: PhraseCyclerOptions): PhraseCyclerResult;
30
- //# sourceMappingURL=usePhraseCycler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePhraseCycler.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/hooks/usePhraseCycler.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,MAAM,WAAW,mBAAmB;IAChC,uEAAuE;IACvE,QAAQ,EAAE,OAAO,CAAC;IAClB,oFAAoF;IACpF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IAC/B,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,UAAU,EAAE,MAAM,IAAI,CAAC;CAC1B;AAgBD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAC5B,QAAQ,EACR,UAAiB,EACjB,WAAmB,GACtB,EAAE,mBAAmB,GAAG,kBAAkB,CA0C1C"}
@@ -1,68 +0,0 @@
1
- /**
2
- * usePhraseCycler Hook
3
- * Cycles through processing phrases and tips at regular intervals
4
- *
5
- * Behavior:
6
- * - 1/3 chance to show tip, 2/3 chance for witty phrase
7
- * - Phrases cycle every 8 seconds while isActive is true
8
- */
9
- import { useState, useEffect, useCallback, useRef } from 'react';
10
- import { getRandomPhrase } from '../constants/processingPhrases.js';
11
- import { getRandomTip } from '../constants/tips.js';
12
- /**
13
- * Get a random phrase or tip based on probability
14
- * 1/3 chance tip, 2/3 chance phrase
15
- */
16
- function getRandomPhraseOrTip(disableTips = false) {
17
- if (disableTips) {
18
- return getRandomPhrase();
19
- }
20
- // 1/3 chance to show a tip (roughly 33%)
21
- const showTip = Math.random() < 1 / 3;
22
- return showTip ? getRandomTip() : getRandomPhrase();
23
- }
24
- /**
25
- * Hook that cycles through witty processing phrases and informative tips
26
- *
27
- * @param options - Configuration options
28
- * @returns Current phrase and control functions
29
- */
30
- export function usePhraseCycler({ isActive, intervalMs = 8000, disableTips = false, }) {
31
- const [phrase, setPhrase] = useState(() => getRandomPhraseOrTip(disableTips));
32
- const intervalRef = useRef(null);
33
- const nextPhrase = useCallback(() => {
34
- // Get a new phrase that's different from current
35
- let newPhrase = getRandomPhraseOrTip(disableTips);
36
- // Avoid showing the same phrase twice in a row
37
- let attempts = 0;
38
- while (newPhrase === phrase && attempts < 3) {
39
- newPhrase = getRandomPhraseOrTip(disableTips);
40
- attempts++;
41
- }
42
- setPhrase(newPhrase);
43
- }, [phrase, disableTips]);
44
- useEffect(() => {
45
- if (isActive) {
46
- // Set initial phrase when becoming active
47
- setPhrase(getRandomPhraseOrTip(disableTips));
48
- // Start cycling
49
- intervalRef.current = setInterval(() => {
50
- setPhrase(getRandomPhraseOrTip(disableTips));
51
- }, intervalMs);
52
- }
53
- else {
54
- // Clear interval when inactive
55
- if (intervalRef.current) {
56
- clearInterval(intervalRef.current);
57
- intervalRef.current = null;
58
- }
59
- }
60
- return () => {
61
- if (intervalRef.current) {
62
- clearInterval(intervalRef.current);
63
- intervalRef.current = null;
64
- }
65
- };
66
- }, [isActive, intervalMs, disableTips]);
67
- return { phrase, nextPhrase };
68
- }
@@ -1,19 +0,0 @@
1
- /**
2
- * React hook for streaming state
3
- *
4
- * Subscribes to the streaming state manager and returns current value.
5
- * Components using this hook will re-render when streaming is toggled.
6
- */
7
- export interface UseStreamingResult {
8
- /** Current streaming state */
9
- streaming: boolean;
10
- /** Set streaming state */
11
- setStreaming: (enabled: boolean) => void;
12
- /** Toggle streaming state */
13
- toggleStreaming: () => boolean;
14
- }
15
- /**
16
- * Hook to access and modify streaming state
17
- */
18
- export declare function useStreaming(): UseStreamingResult;
19
- //# sourceMappingURL=useStreaming.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useStreaming.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/hooks/useStreaming.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,MAAM,WAAW,kBAAkB;IAC/B,8BAA8B;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,0BAA0B;IAC1B,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,6BAA6B;IAC7B,eAAe,EAAE,MAAM,OAAO,CAAC;CAClC;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,kBAAkB,CAiBjD"}
@@ -1,26 +0,0 @@
1
- /**
2
- * React hook for streaming state
3
- *
4
- * Subscribes to the streaming state manager and returns current value.
5
- * Components using this hook will re-render when streaming is toggled.
6
- */
7
- import { useState, useEffect } from 'react';
8
- import { isStreamingEnabled, subscribeToStreaming, setStreamingEnabled, toggleStreaming, } from '../state/streaming-state.js';
9
- /**
10
- * Hook to access and modify streaming state
11
- */
12
- export function useStreaming() {
13
- const [streaming, setStreamingState] = useState(isStreamingEnabled);
14
- useEffect(() => {
15
- // Subscribe to changes from command or other sources
16
- const unsubscribe = subscribeToStreaming((enabled) => {
17
- setStreamingState(enabled);
18
- });
19
- return unsubscribe;
20
- }, []);
21
- return {
22
- streaming,
23
- setStreaming: setStreamingEnabled,
24
- toggleStreaming,
25
- };
26
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * useTerminalSize Hook
3
- *
4
- * Listens to terminal resize events and provides current dimensions.
5
- */
6
- export interface TerminalSize {
7
- columns: number;
8
- rows: number;
9
- }
10
- /**
11
- * Hook that returns current terminal size and updates on resize
12
- */
13
- export declare function useTerminalSize(): TerminalSize;
14
- //# sourceMappingURL=useTerminalSize.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTerminalSize.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/hooks/useTerminalSize.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,WAAW,YAAY;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,YAAY,CA0B9C"}
@@ -1,31 +0,0 @@
1
- /**
2
- * useTerminalSize Hook
3
- *
4
- * Listens to terminal resize events and provides current dimensions.
5
- */
6
- import { useState, useEffect } from 'react';
7
- /**
8
- * Hook that returns current terminal size and updates on resize
9
- */
10
- export function useTerminalSize() {
11
- const [size, setSize] = useState({
12
- columns: process.stdout.columns || 80,
13
- rows: process.stdout.rows || 24,
14
- });
15
- useEffect(() => {
16
- function updateSize() {
17
- setSize({
18
- columns: process.stdout.columns || 80,
19
- rows: process.stdout.rows || 24,
20
- });
21
- }
22
- // Listen for resize events
23
- process.stdout.on('resize', updateSize);
24
- // Initial update in case size changed between render and effect
25
- updateSize();
26
- return () => {
27
- process.stdout.off('resize', updateSize);
28
- };
29
- }, []);
30
- return size;
31
- }
@@ -1,46 +0,0 @@
1
- /**
2
- * useTokenCounter Hook
3
- * Tracks token usage during streaming with live estimates
4
- *
5
- * Accumulation strategy for multi-step turns:
6
- * - lastInputTokens: Input tokens from the most recent LLM call (not summed to avoid double-counting)
7
- * - cumulativeOutputTokens: Sum of output tokens across all LLM calls in the turn
8
- * - currentSegmentEstimate: Estimated tokens for current streaming segment
9
- * - Display = lastInput + cumulativeOutput + currentEstimate
10
- *
11
- * This approach avoids double-counting shared context (system prompt, history) across
12
- * multiple LLM calls in a single turn while accurately capturing output generation.
13
- *
14
- * For queued messages: Tokens continue accumulating (same turn)
15
- * Reset only when isActive transitions false→true (new turn)
16
- */
17
- import type { DextoAgent } from '@dexto/core';
18
- export interface TokenCounterOptions {
19
- /** DextoAgent instance for event bus access */
20
- agent: DextoAgent;
21
- /** Whether counting is active (should only run during processing) */
22
- isActive: boolean;
23
- }
24
- export interface TokenCounterResult {
25
- /** Total actual tokens (lastInput + cumulativeOutput) */
26
- totalActualTokens: number;
27
- /** Estimated tokens for current streaming segment */
28
- currentSegmentEstimate: number;
29
- /** Combined display count (actual + current estimate) */
30
- displayCount: number;
31
- /** Whether the display includes an estimate component */
32
- includesEstimate: boolean;
33
- /** Formatted display string (e.g., "~125 tokens" or "125 tokens") */
34
- formatted: string;
35
- }
36
- /**
37
- * Hook that tracks token usage during LLM streaming
38
- *
39
- * Tracks tokens across multi-step turns (text → tool → text → tool)
40
- * using: lastInputTokens + cumulativeOutputTokens to avoid double-counting.
41
- *
42
- * @param options - Configuration options
43
- * @returns Token counts (actual + current segment estimate)
44
- */
45
- export declare function useTokenCounter({ agent, isActive }: TokenCounterOptions): TokenCounterResult;
46
- //# sourceMappingURL=useTokenCounter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTokenCounter.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/hooks/useTokenCounter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,WAAW,mBAAmB;IAChC,+CAA+C;IAC/C,KAAK,EAAE,UAAU,CAAC;IAClB,qEAAqE;IACrE,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IAC/B,yDAAyD;IACzD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qDAAqD;IACrD,sBAAsB,EAAE,MAAM,CAAC;IAC/B,yDAAyD;IACzD,YAAY,EAAE,MAAM,CAAC;IACrB,yDAAyD;IACzD,gBAAgB,EAAE,OAAO,CAAC;IAC1B,qEAAqE;IACrE,SAAS,EAAE,MAAM,CAAC;CACrB;AAsBD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,mBAAmB,GAAG,kBAAkB,CA6F5F"}
@@ -1,122 +0,0 @@
1
- /**
2
- * useTokenCounter Hook
3
- * Tracks token usage during streaming with live estimates
4
- *
5
- * Accumulation strategy for multi-step turns:
6
- * - lastInputTokens: Input tokens from the most recent LLM call (not summed to avoid double-counting)
7
- * - cumulativeOutputTokens: Sum of output tokens across all LLM calls in the turn
8
- * - currentSegmentEstimate: Estimated tokens for current streaming segment
9
- * - Display = lastInput + cumulativeOutput + currentEstimate
10
- *
11
- * This approach avoids double-counting shared context (system prompt, history) across
12
- * multiple LLM calls in a single turn while accurately capturing output generation.
13
- *
14
- * For queued messages: Tokens continue accumulating (same turn)
15
- * Reset only when isActive transitions false→true (new turn)
16
- */
17
- import { useState, useEffect, useRef } from 'react';
18
- /**
19
- * Estimate tokens from character count
20
- * Uses ~4 characters per token as a rough approximation
21
- * This matches common tokenizer behavior for English text
22
- */
23
- function estimateTokens(charCount) {
24
- return Math.ceil(charCount / 4);
25
- }
26
- /**
27
- * Format token count for display
28
- * Only shows count when >= 1000, using x.xK format
29
- */
30
- function formatTokenCount(count, includesEstimate) {
31
- if (count < 1000)
32
- return '';
33
- const prefix = includesEstimate ? '~' : '';
34
- const kValue = (count / 1000).toFixed(1);
35
- return `${prefix}${kValue}K tokens`;
36
- }
37
- /**
38
- * Hook that tracks token usage during LLM streaming
39
- *
40
- * Tracks tokens across multi-step turns (text → tool → text → tool)
41
- * using: lastInputTokens + cumulativeOutputTokens to avoid double-counting.
42
- *
43
- * @param options - Configuration options
44
- * @returns Token counts (actual + current segment estimate)
45
- */
46
- export function useTokenCounter({ agent, isActive }) {
47
- // Input tokens from the most recent LLM response (replaced, not summed)
48
- const [lastInputTokens, setLastInputTokens] = useState(0);
49
- // Cumulative output tokens across all LLM responses in this turn
50
- const [cumulativeOutputTokens, setCumulativeOutputTokens] = useState(0);
51
- // Estimated tokens for current streaming segment (resets after each response)
52
- const [currentSegmentEstimate, setCurrentSegmentEstimate] = useState(0);
53
- // Character count for current segment (ref to avoid re-renders on each chunk)
54
- const currentCharCountRef = useRef(0);
55
- useEffect(() => {
56
- if (!isActive) {
57
- // Reset when turn ends (isActive becomes false)
58
- setLastInputTokens(0);
59
- setCumulativeOutputTokens(0);
60
- setCurrentSegmentEstimate(0);
61
- currentCharCountRef.current = 0;
62
- return;
63
- }
64
- const controller = new AbortController();
65
- const { signal } = controller;
66
- // Reset on new turn (isActive just became true)
67
- currentCharCountRef.current = 0;
68
- setLastInputTokens(0);
69
- setCumulativeOutputTokens(0);
70
- setCurrentSegmentEstimate(0);
71
- // Track streaming chunks - accumulate estimate for current segment
72
- agent.on('llm:chunk', (payload) => {
73
- if (payload.chunkType === 'text') {
74
- currentCharCountRef.current += payload.content.length;
75
- const estimate = estimateTokens(currentCharCountRef.current);
76
- // Avoid frequent re-renders for short responses where we don't show tokens anyway.
77
- if (estimate >= 1000) {
78
- setCurrentSegmentEstimate(estimate);
79
- }
80
- }
81
- }, { signal });
82
- // On response: update input (replace), accumulate output, reset estimate
83
- agent.on('llm:response', (payload) => {
84
- const usage = payload.tokenUsage;
85
- if (usage) {
86
- // Replace input tokens (most recent call's context)
87
- // Subtract cacheWriteTokens to exclude system prompt on first call
88
- const rawInputTokens = usage.inputTokens ?? 0;
89
- const cacheWriteTokens = usage.cacheWriteTokens ?? 0;
90
- const inputTokens = Math.max(0, rawInputTokens - cacheWriteTokens);
91
- if (inputTokens > 0) {
92
- setLastInputTokens(inputTokens);
93
- }
94
- // Accumulate output tokens (additive across calls)
95
- const outputTokens = usage.outputTokens ?? 0;
96
- if (outputTokens > 0) {
97
- setCumulativeOutputTokens((prev) => prev + outputTokens);
98
- }
99
- }
100
- // Reset current segment for next streaming segment
101
- currentCharCountRef.current = 0;
102
- setCurrentSegmentEstimate(0);
103
- }, { signal });
104
- // Note: No reset on llm:thinking - queued messages continue the same turn
105
- // Reset only happens when isActive transitions (new user-initiated turn)
106
- return () => {
107
- controller.abort();
108
- };
109
- }, [agent, isActive]);
110
- // Total = lastInput + cumulativeOutput (avoids double-counting shared context)
111
- const totalActualTokens = lastInputTokens + cumulativeOutputTokens;
112
- // Display = actual + current streaming estimate
113
- const displayCount = totalActualTokens + currentSegmentEstimate;
114
- const includesEstimate = currentSegmentEstimate > 0;
115
- return {
116
- totalActualTokens,
117
- currentSegmentEstimate,
118
- displayCount,
119
- includesEstimate,
120
- formatted: formatTokenCount(displayCount, includesEstimate),
121
- };
122
- }
@@ -1,58 +0,0 @@
1
- /**
2
- * Command execution service
3
- * Handles command parsing and execution
4
- */
5
- import type { DextoAgent } from '@dexto/core';
6
- import type { CommandResult } from '../../commands/interactive-commands/command-parser.js';
7
- import type { StyledMessageType, StyledData } from '../state/types.js';
8
- /**
9
- * Styled output for command execution
10
- */
11
- export interface StyledOutput {
12
- styledType: StyledMessageType;
13
- styledData: StyledData;
14
- fallbackText: string;
15
- }
16
- /**
17
- * Result of command execution
18
- */
19
- export interface CommandExecutionResult {
20
- type: 'handled' | 'output' | 'styled' | 'sendMessage';
21
- output?: string;
22
- styled?: StyledOutput;
23
- /** Message text to send through normal streaming flow (for prompt commands) */
24
- messageToSend?: string;
25
- }
26
- /**
27
- * Check if a result is a styled output
28
- */
29
- export declare function isStyledOutput(result: unknown): result is StyledOutput;
30
- /**
31
- * Marker object for commands that want to send a message through the normal stream flow
32
- */
33
- export interface SendMessageMarker {
34
- __sendMessage: true;
35
- text: string;
36
- }
37
- /**
38
- * Create a send message marker (used by prompt commands)
39
- */
40
- export declare function createSendMessageMarker(text: string): SendMessageMarker;
41
- /**
42
- * Check if a result is a send message marker
43
- */
44
- export declare function isSendMessageMarker(result: unknown): result is SendMessageMarker;
45
- /**
46
- * Service for executing commands
47
- */
48
- export declare class CommandService {
49
- /**
50
- * Parses input and determines if it's a command or prompt
51
- */
52
- parseInput(input: string): CommandResult;
53
- /**
54
- * Executes a command and returns the result
55
- */
56
- executeCommand(command: string, args: string[], agent: DextoAgent, sessionId?: string, configFilePath?: string | null): Promise<CommandExecutionResult>;
57
- }
58
- //# sourceMappingURL=CommandService.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CommandService.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/services/CommandService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uDAAuD,CAAC;AAC3F,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,UAAU,EAAE,UAAU,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,aAAa,CAAC;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,YAAY,CAQtE;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,aAAa,EAAE,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,CAEvE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,iBAAiB,CAShF;AAED;;GAEG;AACH,qBAAa,cAAc;IACvB;;OAEG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa;IAIxC;;OAEG;IACG,cAAc,CAChB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,KAAK,EAAE,UAAU,EACjB,SAAS,CAAC,EAAE,MAAM,EAClB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,GAC/B,OAAO,CAAC,sBAAsB,CAAC;CAqBrC"}
@@ -1,64 +0,0 @@
1
- /**
2
- * Command execution service
3
- * Handles command parsing and execution
4
- */
5
- import { parseInput } from '../utils/inputParsing.js';
6
- import { executeCommand } from '../../commands/interactive-commands/commands.js';
7
- /**
8
- * Check if a result is a styled output
9
- */
10
- export function isStyledOutput(result) {
11
- return (typeof result === 'object' &&
12
- result !== null &&
13
- 'styledType' in result &&
14
- 'styledData' in result &&
15
- 'fallbackText' in result);
16
- }
17
- /**
18
- * Create a send message marker (used by prompt commands)
19
- */
20
- export function createSendMessageMarker(text) {
21
- return { __sendMessage: true, text };
22
- }
23
- /**
24
- * Check if a result is a send message marker
25
- */
26
- export function isSendMessageMarker(result) {
27
- return (typeof result === 'object' &&
28
- result !== null &&
29
- '__sendMessage' in result &&
30
- result.__sendMessage === true &&
31
- 'text' in result &&
32
- typeof result.text === 'string');
33
- }
34
- /**
35
- * Service for executing commands
36
- */
37
- export class CommandService {
38
- /**
39
- * Parses input and determines if it's a command or prompt
40
- */
41
- parseInput(input) {
42
- return parseInput(input);
43
- }
44
- /**
45
- * Executes a command and returns the result
46
- */
47
- async executeCommand(command, args, agent, sessionId, configFilePath) {
48
- const result = await executeCommand(command, args, agent, sessionId, configFilePath);
49
- // If result is a send message marker, return the text to send through normal flow
50
- if (isSendMessageMarker(result)) {
51
- return { type: 'sendMessage', messageToSend: result.text };
52
- }
53
- // If result is a string, it's output for display
54
- if (typeof result === 'string') {
55
- return { type: 'output', output: result };
56
- }
57
- // If result is a styled output object
58
- if (isStyledOutput(result)) {
59
- return { type: 'styled', styled: result };
60
- }
61
- // If result is boolean, command was handled
62
- return { type: 'handled' };
63
- }
64
- }