dexto 1.3.0 → 1.4.0

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 (400) hide show
  1. package/README.md +25 -15
  2. package/dist/agents/agent-registry.json +9 -0
  3. package/dist/agents/coding-agent/coding-agent.yml +5 -0
  4. package/dist/agents/default-agent.yml +2 -2
  5. package/dist/api/server-hono.d.ts.map +1 -1
  6. package/dist/api/server-hono.js +39 -5
  7. package/dist/cli/cli-subscriber.d.ts.map +1 -1
  8. package/dist/cli/cli-subscriber.js +7 -1
  9. package/dist/cli/commands/helpers/formatters.d.ts.map +1 -1
  10. package/dist/cli/commands/helpers/formatters.js +2 -1
  11. package/dist/cli/commands/install.d.ts.map +1 -1
  12. package/dist/cli/commands/install.js +14 -40
  13. package/dist/cli/commands/interactive-commands/command-parser.d.ts +17 -14
  14. package/dist/cli/commands/interactive-commands/command-parser.d.ts.map +1 -1
  15. package/dist/cli/commands/interactive-commands/command-parser.js +0 -15
  16. package/dist/cli/commands/interactive-commands/commands.d.ts +4 -4
  17. package/dist/cli/commands/interactive-commands/commands.d.ts.map +1 -1
  18. package/dist/cli/commands/interactive-commands/commands.js +34 -42
  19. package/dist/cli/commands/interactive-commands/documentation-commands.d.ts.map +1 -1
  20. package/dist/cli/commands/interactive-commands/documentation-commands.js +4 -7
  21. package/dist/cli/commands/interactive-commands/general-commands.d.ts.map +1 -1
  22. package/dist/cli/commands/interactive-commands/general-commands.js +159 -117
  23. package/dist/cli/commands/interactive-commands/mcp/index.d.ts +9 -3
  24. package/dist/cli/commands/interactive-commands/mcp/index.d.ts.map +1 -1
  25. package/dist/cli/commands/interactive-commands/mcp/index.js +18 -3
  26. package/dist/cli/commands/interactive-commands/model/index.d.ts +8 -6
  27. package/dist/cli/commands/interactive-commands/model/index.d.ts.map +1 -1
  28. package/dist/cli/commands/interactive-commands/model/index.js +18 -6
  29. package/dist/cli/commands/interactive-commands/prompt-commands.d.ts +3 -2
  30. package/dist/cli/commands/interactive-commands/prompt-commands.d.ts.map +1 -1
  31. package/dist/cli/commands/interactive-commands/prompt-commands.js +69 -52
  32. package/dist/cli/commands/interactive-commands/session/index.d.ts +7 -12
  33. package/dist/cli/commands/interactive-commands/session/index.d.ts.map +1 -1
  34. package/dist/cli/commands/interactive-commands/session/index.js +7 -14
  35. package/dist/cli/commands/interactive-commands/session/session-commands.d.ts +10 -24
  36. package/dist/cli/commands/interactive-commands/session/session-commands.d.ts.map +1 -1
  37. package/dist/cli/commands/interactive-commands/session/session-commands.js +16 -371
  38. package/dist/cli/commands/interactive-commands/system/system-commands.d.ts +1 -0
  39. package/dist/cli/commands/interactive-commands/system/system-commands.d.ts.map +1 -1
  40. package/dist/cli/commands/interactive-commands/system/system-commands.js +103 -74
  41. package/dist/cli/commands/interactive-commands/tool-commands.d.ts +1 -1
  42. package/dist/cli/commands/interactive-commands/tool-commands.d.ts.map +1 -1
  43. package/dist/cli/commands/interactive-commands/tool-commands.js +5 -62
  44. package/dist/cli/commands/interactive-commands/utils/command-output.d.ts +13 -17
  45. package/dist/cli/commands/interactive-commands/utils/command-output.d.ts.map +1 -1
  46. package/dist/cli/commands/interactive-commands/utils/command-output.js +18 -37
  47. package/dist/cli/commands/list-agents.d.ts +2 -2
  48. package/dist/cli/commands/list-agents.d.ts.map +1 -1
  49. package/dist/cli/commands/list-agents.js +36 -32
  50. package/dist/cli/commands/uninstall.d.ts.map +1 -1
  51. package/dist/cli/commands/uninstall.js +4 -6
  52. package/dist/cli/commands/which.d.ts.map +1 -1
  53. package/dist/cli/commands/which.js +17 -3
  54. package/dist/cli/ink-cli/InkCLIRefactored.d.ts +9 -22
  55. package/dist/cli/ink-cli/InkCLIRefactored.d.ts.map +1 -1
  56. package/dist/cli/ink-cli/InkCLIRefactored.js +50 -133
  57. package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts +24 -3
  58. package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts.map +1 -1
  59. package/dist/cli/ink-cli/components/ApprovalPrompt.js +160 -45
  60. package/dist/cli/ink-cli/components/ElicitationForm.d.ts +22 -0
  61. package/dist/cli/ink-cli/components/ElicitationForm.d.ts.map +1 -0
  62. package/dist/cli/ink-cli/components/ElicitationForm.js +358 -0
  63. package/dist/cli/ink-cli/components/Footer.d.ts +16 -0
  64. package/dist/cli/ink-cli/components/Footer.d.ts.map +1 -0
  65. package/dist/cli/ink-cli/components/Footer.js +27 -0
  66. package/dist/cli/ink-cli/components/HistorySearchBar.d.ts +17 -0
  67. package/dist/cli/ink-cli/components/HistorySearchBar.d.ts.map +1 -0
  68. package/dist/cli/ink-cli/components/HistorySearchBar.js +8 -0
  69. package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts +15 -2
  70. package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts.map +1 -1
  71. package/dist/cli/ink-cli/components/ResourceAutocomplete.js +126 -82
  72. package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts +15 -2
  73. package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts.map +1 -1
  74. package/dist/cli/ink-cli/components/SlashCommandAutocomplete.js +228 -122
  75. package/dist/cli/ink-cli/components/StatusBar.d.ts +15 -2
  76. package/dist/cli/ink-cli/components/StatusBar.d.ts.map +1 -1
  77. package/dist/cli/ink-cli/components/StatusBar.js +46 -8
  78. package/dist/cli/ink-cli/components/TextBufferInput.d.ts +52 -0
  79. package/dist/cli/ink-cli/components/TextBufferInput.d.ts.map +1 -0
  80. package/dist/cli/ink-cli/components/TextBufferInput.js +471 -0
  81. package/dist/cli/ink-cli/components/base/BaseSelector.d.ts +11 -1
  82. package/dist/cli/ink-cli/components/base/BaseSelector.d.ts.map +1 -1
  83. package/dist/cli/ink-cli/components/base/BaseSelector.js +90 -49
  84. package/dist/cli/ink-cli/components/chat/Header.d.ts +1 -0
  85. package/dist/cli/ink-cli/components/chat/Header.d.ts.map +1 -1
  86. package/dist/cli/ink-cli/components/chat/Header.js +7 -2
  87. package/dist/cli/ink-cli/components/chat/MessageItem.d.ts +3 -0
  88. package/dist/cli/ink-cli/components/chat/MessageItem.d.ts.map +1 -1
  89. package/dist/cli/ink-cli/components/chat/MessageItem.js +95 -9
  90. package/dist/cli/ink-cli/components/chat/MessageList.js +1 -1
  91. package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts +16 -0
  92. package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts.map +1 -0
  93. package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.js +27 -0
  94. package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts +4 -2
  95. package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts.map +1 -1
  96. package/dist/cli/ink-cli/components/chat/ToolIcon.js +19 -5
  97. package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts +10 -0
  98. package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts.map +1 -0
  99. package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.js +6 -0
  100. package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts +10 -0
  101. package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts.map +1 -0
  102. package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.js +15 -0
  103. package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts +10 -0
  104. package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts.map +1 -0
  105. package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.js +9 -0
  106. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts +10 -0
  107. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts.map +1 -0
  108. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.js +37 -0
  109. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts +10 -0
  110. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts.map +1 -0
  111. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.js +9 -0
  112. package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts +10 -0
  113. package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts.map +1 -0
  114. package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.js +6 -0
  115. package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts +10 -0
  116. package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts.map +1 -0
  117. package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.js +29 -0
  118. package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts +45 -0
  119. package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts.map +1 -0
  120. package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.js +38 -0
  121. package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts +10 -0
  122. package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts.map +1 -0
  123. package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.js +6 -0
  124. package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts +13 -0
  125. package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts.map +1 -0
  126. package/dist/cli/ink-cli/components/chat/styled-boxes/index.js +12 -0
  127. package/dist/cli/ink-cli/components/input/InputArea.d.ts +36 -8
  128. package/dist/cli/ink-cli/components/input/InputArea.d.ts.map +1 -1
  129. package/dist/cli/ink-cli/components/input/InputArea.js +3 -3
  130. package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts +25 -0
  131. package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts.map +1 -0
  132. package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.js +166 -0
  133. package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts +27 -0
  134. package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts.map +1 -0
  135. package/dist/cli/ink-cli/components/modes/StaticCLI.js +95 -0
  136. package/dist/cli/ink-cli/components/modes/index.d.ts +10 -0
  137. package/dist/cli/ink-cli/components/modes/index.d.ts.map +1 -0
  138. package/dist/cli/ink-cli/components/modes/index.js +9 -0
  139. package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts +26 -0
  140. package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts.map +1 -0
  141. package/dist/cli/ink-cli/components/overlays/ApiKeyInput.js +92 -0
  142. package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts +21 -0
  143. package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts.map +1 -0
  144. package/dist/cli/ink-cli/components/overlays/CustomModelWizard.js +177 -0
  145. package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts +22 -0
  146. package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts.map +1 -0
  147. package/dist/cli/ink-cli/components/overlays/LogLevelSelector.js +59 -0
  148. package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts +22 -0
  149. package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts.map +1 -0
  150. package/dist/cli/ink-cli/components/overlays/McpAddChoice.js +59 -0
  151. package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts +26 -0
  152. package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts.map +1 -0
  153. package/dist/cli/ink-cli/components/overlays/McpAddSelector.js +73 -0
  154. package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts +21 -0
  155. package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts.map +1 -0
  156. package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.js +51 -0
  157. package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts +29 -0
  158. package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts.map +1 -0
  159. package/dist/cli/ink-cli/components/overlays/McpCustomWizard.js +215 -0
  160. package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts +22 -0
  161. package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts.map +1 -0
  162. package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.js +74 -0
  163. package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts +21 -0
  164. package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts.map +1 -0
  165. package/dist/cli/ink-cli/components/overlays/McpSelector.js +52 -0
  166. package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts +28 -0
  167. package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts.map +1 -0
  168. package/dist/cli/ink-cli/components/overlays/McpServerActions.js +84 -0
  169. package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts +29 -0
  170. package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts.map +1 -0
  171. package/dist/cli/ink-cli/components/overlays/McpServerList.js +109 -0
  172. package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts +15 -8
  173. package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts.map +1 -1
  174. package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.js +247 -24
  175. package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts +22 -0
  176. package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts.map +1 -0
  177. package/dist/cli/ink-cli/components/overlays/PromptAddChoice.js +52 -0
  178. package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts +29 -0
  179. package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts.map +1 -0
  180. package/dist/cli/ink-cli/components/overlays/PromptAddWizard.js +166 -0
  181. package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts +27 -0
  182. package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts.map +1 -0
  183. package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.js +119 -0
  184. package/dist/cli/ink-cli/components/overlays/PromptList.d.ts +33 -0
  185. package/dist/cli/ink-cli/components/overlays/PromptList.d.ts.map +1 -0
  186. package/dist/cli/ink-cli/components/overlays/PromptList.js +144 -0
  187. package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts +23 -0
  188. package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts.map +1 -0
  189. package/dist/cli/ink-cli/components/overlays/SearchOverlay.js +189 -0
  190. package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts +7 -2
  191. package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts.map +1 -1
  192. package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.js +19 -5
  193. package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts +21 -0
  194. package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts.map +1 -0
  195. package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.js +42 -0
  196. package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts +20 -0
  197. package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts.map +1 -0
  198. package/dist/cli/ink-cli/components/overlays/StreamSelector.js +58 -0
  199. package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts +25 -0
  200. package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts.map +1 -0
  201. package/dist/cli/ink-cli/components/overlays/ToolBrowser.js +400 -0
  202. package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts +21 -0
  203. package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts.map +1 -0
  204. package/dist/cli/ink-cli/components/renderers/DiffRenderer.js +65 -0
  205. package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts +28 -0
  206. package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts.map +1 -0
  207. package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.js +66 -0
  208. package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts +19 -0
  209. package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts.map +1 -0
  210. package/dist/cli/ink-cli/components/renderers/FileRenderer.js +26 -0
  211. package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts +21 -0
  212. package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts.map +1 -0
  213. package/dist/cli/ink-cli/components/renderers/GenericRenderer.js +26 -0
  214. package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts +20 -0
  215. package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts.map +1 -0
  216. package/dist/cli/ink-cli/components/renderers/SearchRenderer.js +12 -0
  217. package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts +21 -0
  218. package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts.map +1 -0
  219. package/dist/cli/ink-cli/components/renderers/ShellRenderer.js +25 -0
  220. package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts +61 -0
  221. package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts.map +1 -0
  222. package/dist/cli/ink-cli/components/renderers/diff-shared.js +158 -0
  223. package/dist/cli/ink-cli/components/renderers/index.d.ts +28 -0
  224. package/dist/cli/ink-cli/components/renderers/index.d.ts.map +1 -0
  225. package/dist/cli/ink-cli/components/renderers/index.js +36 -0
  226. package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts +38 -0
  227. package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts.map +1 -0
  228. package/dist/cli/ink-cli/components/shared/MarkdownText.js +360 -0
  229. package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts +44 -0
  230. package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts.map +1 -0
  231. package/dist/cli/ink-cli/components/shared/VirtualizedList.js +300 -0
  232. package/dist/cli/ink-cli/components/shared/text-buffer.d.ts +185 -0
  233. package/dist/cli/ink-cli/components/shared/text-buffer.d.ts.map +1 -0
  234. package/dist/cli/ink-cli/components/shared/text-buffer.js +1338 -0
  235. package/dist/cli/ink-cli/constants/processingPhrases.d.ts +10 -0
  236. package/dist/cli/ink-cli/constants/processingPhrases.d.ts.map +1 -0
  237. package/dist/cli/ink-cli/constants/processingPhrases.js +64 -0
  238. package/dist/cli/ink-cli/constants/tips.d.ts +15 -0
  239. package/dist/cli/ink-cli/constants/tips.d.ts.map +1 -0
  240. package/dist/cli/ink-cli/constants/tips.js +53 -0
  241. package/dist/cli/ink-cli/containers/InputContainer.d.ts +42 -8
  242. package/dist/cli/ink-cli/containers/InputContainer.d.ts.map +1 -1
  243. package/dist/cli/ink-cli/containers/InputContainer.js +491 -85
  244. package/dist/cli/ink-cli/containers/OverlayContainer.d.ts +23 -5
  245. package/dist/cli/ink-cli/containers/OverlayContainer.d.ts.map +1 -1
  246. package/dist/cli/ink-cli/containers/OverlayContainer.js +1156 -130
  247. package/dist/cli/ink-cli/containers/index.d.ts +1 -1
  248. package/dist/cli/ink-cli/containers/index.d.ts.map +1 -1
  249. package/dist/cli/ink-cli/contexts/KeypressContext.d.ts +36 -0
  250. package/dist/cli/ink-cli/contexts/KeypressContext.d.ts.map +1 -0
  251. package/dist/cli/ink-cli/contexts/KeypressContext.js +461 -0
  252. package/dist/cli/ink-cli/contexts/MouseContext.d.ts +27 -0
  253. package/dist/cli/ink-cli/contexts/MouseContext.d.ts.map +1 -0
  254. package/dist/cli/ink-cli/contexts/MouseContext.js +102 -0
  255. package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts +33 -0
  256. package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts.map +1 -0
  257. package/dist/cli/ink-cli/contexts/ScrollProvider.js +170 -0
  258. package/dist/cli/ink-cli/contexts/index.d.ts +7 -0
  259. package/dist/cli/ink-cli/contexts/index.d.ts.map +1 -0
  260. package/dist/cli/ink-cli/contexts/index.js +6 -0
  261. package/dist/cli/ink-cli/hooks/index.d.ts +5 -0
  262. package/dist/cli/ink-cli/hooks/index.d.ts.map +1 -1
  263. package/dist/cli/ink-cli/hooks/index.js +6 -1
  264. package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts +26 -9
  265. package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts.map +1 -1
  266. package/dist/cli/ink-cli/hooks/useAgentEvents.js +86 -198
  267. package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts +14 -0
  268. package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts.map +1 -0
  269. package/dist/cli/ink-cli/hooks/useBatchedScroll.js +25 -0
  270. package/dist/cli/ink-cli/hooks/useCLIState.d.ts +50 -0
  271. package/dist/cli/ink-cli/hooks/useCLIState.d.ts.map +1 -0
  272. package/dist/cli/ink-cli/hooks/useCLIState.js +188 -0
  273. package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts +24 -0
  274. package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts.map +1 -0
  275. package/dist/cli/ink-cli/hooks/useElapsedTime.js +69 -0
  276. package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts +61 -0
  277. package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts.map +1 -0
  278. package/dist/cli/ink-cli/hooks/useHistorySearch.js +210 -0
  279. package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts +136 -0
  280. package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts.map +1 -0
  281. package/dist/cli/ink-cli/hooks/useInputOrchestrator.js +663 -0
  282. package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.d.ts.map +1 -1
  283. package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.js +7 -26
  284. package/dist/cli/ink-cli/hooks/useKeypress.d.ts +18 -0
  285. package/dist/cli/ink-cli/hooks/useKeypress.d.ts.map +1 -0
  286. package/dist/cli/ink-cli/hooks/useKeypress.js +26 -0
  287. package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts +30 -0
  288. package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts.map +1 -0
  289. package/dist/cli/ink-cli/hooks/usePhraseCycler.js +68 -0
  290. package/dist/cli/ink-cli/hooks/useStreaming.d.ts +19 -0
  291. package/dist/cli/ink-cli/hooks/useStreaming.d.ts.map +1 -0
  292. package/dist/cli/ink-cli/hooks/useStreaming.js +26 -0
  293. package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts +14 -0
  294. package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts.map +1 -0
  295. package/dist/cli/ink-cli/hooks/useTerminalSize.js +31 -0
  296. package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts +42 -0
  297. package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts.map +1 -0
  298. package/dist/cli/ink-cli/hooks/useTokenCounter.js +96 -0
  299. package/dist/cli/ink-cli/services/CommandService.d.ts +32 -1
  300. package/dist/cli/ink-cli/services/CommandService.d.ts.map +1 -1
  301. package/dist/cli/ink-cli/services/CommandService.js +36 -5
  302. package/dist/cli/ink-cli/services/InputService.d.ts +1 -5
  303. package/dist/cli/ink-cli/services/InputService.d.ts.map +1 -1
  304. package/dist/cli/ink-cli/services/InputService.js +1 -8
  305. package/dist/cli/ink-cli/services/index.d.ts +2 -1
  306. package/dist/cli/ink-cli/services/index.d.ts.map +1 -1
  307. package/dist/cli/ink-cli/services/index.js +2 -1
  308. package/dist/cli/ink-cli/services/processStream.d.ts +69 -0
  309. package/dist/cli/ink-cli/services/processStream.d.ts.map +1 -0
  310. package/dist/cli/ink-cli/services/processStream.js +674 -0
  311. package/dist/cli/ink-cli/state/actions.d.ts +30 -60
  312. package/dist/cli/ink-cli/state/actions.d.ts.map +1 -1
  313. package/dist/cli/ink-cli/state/actions.js +3 -0
  314. package/dist/cli/ink-cli/state/index.d.ts +5 -3
  315. package/dist/cli/ink-cli/state/index.d.ts.map +1 -1
  316. package/dist/cli/ink-cli/state/index.js +4 -3
  317. package/dist/cli/ink-cli/state/initialState.d.ts +4 -3
  318. package/dist/cli/ink-cli/state/initialState.d.ts.map +1 -1
  319. package/dist/cli/ink-cli/state/initialState.js +20 -4
  320. package/dist/cli/ink-cli/state/reducer.d.ts +3 -0
  321. package/dist/cli/ink-cli/state/reducer.d.ts.map +1 -1
  322. package/dist/cli/ink-cli/state/reducer.js +62 -168
  323. package/dist/cli/ink-cli/state/streaming-state.d.ts +27 -0
  324. package/dist/cli/ink-cli/state/streaming-state.d.ts.map +1 -0
  325. package/dist/cli/ink-cli/state/streaming-state.js +39 -0
  326. package/dist/cli/ink-cli/state/types.d.ts +222 -6
  327. package/dist/cli/ink-cli/state/types.d.ts.map +1 -1
  328. package/dist/cli/ink-cli/utils/bracketedPaste.d.ts +22 -0
  329. package/dist/cli/ink-cli/utils/bracketedPaste.d.ts.map +1 -0
  330. package/dist/cli/ink-cli/utils/bracketedPaste.js +27 -0
  331. package/dist/cli/ink-cli/utils/clipboardUtils.d.ts +49 -0
  332. package/dist/cli/ink-cli/utils/clipboardUtils.d.ts.map +1 -0
  333. package/dist/cli/ink-cli/utils/clipboardUtils.js +356 -0
  334. package/dist/cli/ink-cli/utils/commandOverlays.d.ts +33 -0
  335. package/dist/cli/ink-cli/utils/commandOverlays.d.ts.map +1 -0
  336. package/dist/cli/ink-cli/utils/commandOverlays.js +78 -0
  337. package/dist/cli/ink-cli/utils/debugLog.d.ts +38 -0
  338. package/dist/cli/ink-cli/utils/debugLog.d.ts.map +1 -0
  339. package/dist/cli/ink-cli/utils/debugLog.js +66 -0
  340. package/dist/cli/ink-cli/utils/index.d.ts +2 -1
  341. package/dist/cli/ink-cli/utils/index.d.ts.map +1 -1
  342. package/dist/cli/ink-cli/utils/index.js +3 -1
  343. package/dist/cli/ink-cli/utils/input.d.ts +25 -0
  344. package/dist/cli/ink-cli/utils/input.d.ts.map +1 -0
  345. package/dist/cli/ink-cli/utils/input.js +56 -0
  346. package/dist/cli/ink-cli/utils/inputParsing.d.ts +0 -9
  347. package/dist/cli/ink-cli/utils/inputParsing.d.ts.map +1 -1
  348. package/dist/cli/ink-cli/utils/inputParsing.js +0 -27
  349. package/dist/cli/ink-cli/utils/messageFormatting.d.ts +54 -3
  350. package/dist/cli/ink-cli/utils/messageFormatting.d.ts.map +1 -1
  351. package/dist/cli/ink-cli/utils/messageFormatting.js +290 -20
  352. package/dist/cli/ink-cli/utils/mouse.d.ts +61 -0
  353. package/dist/cli/ink-cli/utils/mouse.d.ts.map +1 -0
  354. package/dist/cli/ink-cli/utils/mouse.js +209 -0
  355. package/dist/cli/ink-cli/utils/streamSplitter.d.ts +44 -0
  356. package/dist/cli/ink-cli/utils/streamSplitter.d.ts.map +1 -0
  357. package/dist/cli/ink-cli/utils/streamSplitter.js +154 -0
  358. package/dist/cli/ink-cli/utils/textUtils.d.ts +63 -0
  359. package/dist/cli/ink-cli/utils/textUtils.d.ts.map +1 -0
  360. package/dist/cli/ink-cli/utils/textUtils.js +248 -0
  361. package/dist/cli/ink-cli/utils/toolUtils.d.ts +9 -0
  362. package/dist/cli/ink-cli/utils/toolUtils.d.ts.map +1 -0
  363. package/dist/cli/ink-cli/utils/toolUtils.js +13 -0
  364. package/dist/cli/utils/options.d.ts.map +1 -1
  365. package/dist/cli/utils/options.js +0 -2
  366. package/dist/config/cli-overrides.d.ts +1 -1
  367. package/dist/config/cli-overrides.d.ts.map +1 -1
  368. package/dist/config/cli-overrides.js +5 -10
  369. package/dist/index.js +66 -48
  370. package/dist/utils/agent-helpers.d.ts +95 -0
  371. package/dist/utils/agent-helpers.d.ts.map +1 -0
  372. package/dist/utils/agent-helpers.js +117 -0
  373. package/dist/webui/assets/index-BkwPkZpd.css +1 -0
  374. package/dist/webui/assets/index-D9u1XfyH.js +2025 -0
  375. package/dist/webui/assets/{tanstack-DgxBONJY.js → tanstack-Br79RQ-n.js} +1 -1
  376. package/dist/webui/index.html +3 -3
  377. package/package.json +16 -14
  378. package/dist/cli/commands/interactive-commands/index.d.ts +0 -63
  379. package/dist/cli/commands/interactive-commands/index.d.ts.map +0 -1
  380. package/dist/cli/commands/interactive-commands/index.js +0 -73
  381. package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.d.ts +0 -34
  382. package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.d.ts.map +0 -1
  383. package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.js +0 -178
  384. package/dist/cli/commands/interactive-commands/mcp/mcp-commands.d.ts +0 -9
  385. package/dist/cli/commands/interactive-commands/mcp/mcp-commands.d.ts.map +0 -1
  386. package/dist/cli/commands/interactive-commands/mcp/mcp-commands.js +0 -325
  387. package/dist/cli/commands/interactive-commands/model/model-commands.d.ts +0 -21
  388. package/dist/cli/commands/interactive-commands/model/model-commands.d.ts.map +0 -1
  389. package/dist/cli/commands/interactive-commands/model/model-commands.js +0 -190
  390. package/dist/cli/ink-cli/components/MultiLineTextInput.d.ts +0 -26
  391. package/dist/cli/ink-cli/components/MultiLineTextInput.d.ts.map +0 -1
  392. package/dist/cli/ink-cli/components/MultiLineTextInput.js +0 -220
  393. package/dist/discord/bot.d.ts +0 -4
  394. package/dist/discord/bot.d.ts.map +0 -1
  395. package/dist/discord/bot.js +0 -193
  396. package/dist/telegram/bot.d.ts +0 -5
  397. package/dist/telegram/bot.d.ts.map +0 -1
  398. package/dist/telegram/bot.js +0 -251
  399. package/dist/webui/assets/index-DKq5Xng1.js +0 -687
  400. package/dist/webui/assets/index-D_0_GBu5.css +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"documentation-commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/documentation-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG7D;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,EA8BpD,CAAC"}
1
+ {"version":3,"file":"documentation-commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/documentation-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAkB,MAAM,qBAAqB,CAAC;AAG7E;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,EAkCpD,CAAC"}
@@ -7,7 +7,6 @@
7
7
  * Available Documentation Commands:
8
8
  * - /docs, /doc - Open Dexto documentation in browser
9
9
  */
10
- import chalk from 'chalk';
11
10
  import { CommandOutputHelper } from './utils/command-output.js';
12
11
  /**
13
12
  * Documentation commands
@@ -19,11 +18,10 @@ export const documentationCommands = [
19
18
  usage: '/docs',
20
19
  category: 'Documentation',
21
20
  aliases: ['doc'],
22
- handler: async (_args, _agent) => {
21
+ handler: async (_args, _agent, _ctx) => {
23
22
  const docsUrl = 'https://docs.dexto.ai/docs/category/getting-started';
24
23
  try {
25
24
  const { spawn } = await import('child_process');
26
- console.log(chalk.blue(`🌐 Opening Dexto documentation: ${docsUrl}`));
27
25
  // Cross-platform browser opening
28
26
  const command = process.platform === 'darwin'
29
27
  ? 'open'
@@ -31,11 +29,10 @@ export const documentationCommands = [
31
29
  ? 'start'
32
30
  : 'xdg-open';
33
31
  spawn(command, [docsUrl], { detached: true, stdio: 'ignore' });
34
- return CommandOutputHelper.success('✅ Documentation opened in browser');
32
+ return true; // Silent success
35
33
  }
36
- catch (error) {
37
- console.log(chalk.yellow(`💡 You can manually visit: ${docsUrl}`));
38
- return CommandOutputHelper.error(error, 'Failed to open documentation');
34
+ catch {
35
+ return CommandOutputHelper.error(new Error(`Could not open browser. Visit: ${docsUrl}`), 'Failed to open documentation');
39
36
  }
40
37
  },
41
38
  },
@@ -1 +1 @@
1
- {"version":3,"file":"general-commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/general-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAI7D;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,MAAM,iBAAiB,EAAE,GAAG,iBAAiB,CA0I9F;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,iBAAiB,EAkC9C,CAAC"}
1
+ {"version":3,"file":"general-commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/general-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAwC,MAAM,qBAAqB,CAAC;AAMnG;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,MAAM,iBAAiB,EAAE,GAAG,iBAAiB,CAgC9F;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,iBAAiB,EAiM9C,CAAC"}
@@ -10,9 +10,9 @@
10
10
  * - /clear, /reset - Clear conversation history
11
11
  */
12
12
  import chalk from 'chalk';
13
- import { logger } from '@dexto/core';
14
- import { displayAllCommands, formatCommandHelp } from './command-parser.js';
15
13
  import { formatForInkCli } from './utils/format-output.js';
14
+ import { CommandOutputHelper } from './utils/command-output.js';
15
+ import { writeToClipboard } from '../../ink-cli/utils/clipboardUtils.js';
16
16
  /**
17
17
  * Creates the help command with access to all commands for display
18
18
  */
@@ -20,113 +20,25 @@ export function createHelpCommand(getAllCommands) {
20
20
  return {
21
21
  name: 'help',
22
22
  description: 'Show help information',
23
- usage: '/help [command]',
23
+ usage: '/help',
24
24
  category: 'General',
25
25
  aliases: ['h', '?'],
26
- handler: async (args, _agent) => {
26
+ handler: async (_args, _agent, _ctx) => {
27
27
  const allCommands = getAllCommands();
28
- if (args.length === 0) {
29
- // Build output string for ink-cli
30
- const outputLines = ['\n📋 Available Commands:\n'];
31
- // Define category order for consistent display
32
- const categoryOrder = [
33
- 'General',
34
- 'MCP Management',
35
- 'Tool Management',
36
- 'Prompt Management',
37
- 'System',
38
- 'Documentation',
39
- ];
40
- const categories = {};
41
- // Initialize categories
42
- for (const category of categoryOrder) {
43
- categories[category] = [];
44
- }
45
- // Categorize commands using metadata
46
- for (const cmd of allCommands) {
47
- const category = cmd.category || 'General';
48
- if (!categories[category]) {
49
- categories[category] = [];
50
- }
51
- categories[category].push(cmd);
52
- }
53
- // Build output by category in order
54
- for (const category of categoryOrder) {
55
- const cmds = categories[category];
56
- if (cmds && cmds.length > 0) {
57
- outputLines.push(`${category}:`);
58
- for (const cmd of cmds) {
59
- const help = formatCommandHelp(cmd, false);
60
- outputLines.push(' ' + formatForInkCli(help));
61
- }
62
- outputLines.push('');
63
- }
64
- }
65
- // Display any uncategorized commands (fallback)
66
- for (const [category, cmds] of Object.entries(categories)) {
67
- if (!categoryOrder.includes(category) && cmds.length > 0) {
68
- outputLines.push(`${category}:`);
69
- for (const cmd of cmds) {
70
- const help = formatCommandHelp(cmd, false);
71
- outputLines.push(' ' + formatForInkCli(help));
72
- }
73
- outputLines.push('');
74
- }
75
- }
76
- outputLines.push('💡 Tips:');
77
- outputLines.push(' • Type your message normally (without /) to chat with the AI');
78
- outputLines.push(' • Use /<prompt-name> to execute any listed prompt directly');
79
- outputLines.push(' • Use /clear to start a new session (preserves old)');
80
- outputLines.push(' • Press Ctrl+M to switch models, Ctrl+R to switch sessions');
81
- outputLines.push(' • Use /search <query> to search across all sessions\n');
82
- const output = outputLines.join('\n');
83
- // Log for regular CLI (with chalk formatting)
84
- displayAllCommands(allCommands);
85
- return formatForInkCli(output);
86
- }
87
- const commandName = args[0];
88
- if (!commandName) {
89
- const output = '❌ No command specified';
90
- console.log(chalk.red(output));
91
- return formatForInkCli(output);
92
- }
93
- // Find the specific command to show detailed help
94
- const cmd = allCommands.find((c) => c.name === commandName || (c.aliases && c.aliases.includes(commandName)));
95
- if (cmd) {
96
- const helpText = formatCommandHelp(cmd, true);
97
- console.log(helpText);
98
- return formatForInkCli(helpText);
99
- }
100
- // Redirect to contextual help for commands that have their own help subcommands
101
- let output;
102
- if (commandName === 'session') {
103
- output =
104
- '💡 For detailed session help, use:\n /session help\n\n This shows all session subcommands with examples and tips.';
105
- console.log(chalk.blue('💡 For detailed session help, use:'));
106
- console.log(` ${chalk.cyan('/session help')}`);
107
- console.log(chalk.dim('\n This shows all session subcommands with examples and tips.'));
108
- return formatForInkCli(output);
109
- }
110
- if (commandName === 'model' || commandName === 'm') {
111
- output =
112
- '💡 For detailed model help, use:\n /model help\n\n This shows all model subcommands with examples and usage.';
113
- console.log(chalk.blue('💡 For detailed model help, use:'));
114
- console.log(` ${chalk.cyan('/model help')}`);
115
- console.log(chalk.dim('\n This shows all model subcommands with examples and usage.'));
116
- return formatForInkCli(output);
117
- }
118
- if (commandName === 'mcp') {
119
- output =
120
- '💡 For detailed MCP help, use:\n /mcp help\n\n This shows all MCP subcommands with examples and usage.';
121
- console.log(chalk.blue('💡 For detailed MCP help, use:'));
122
- console.log(` ${chalk.cyan('/mcp help')}`);
123
- console.log(chalk.dim('\n This shows all MCP subcommands with examples and usage.'));
124
- return formatForInkCli(output);
28
+ // Build styled data for help
29
+ const styledData = {
30
+ commands: allCommands.map((cmd) => ({
31
+ name: cmd.name,
32
+ description: cmd.description,
33
+ category: cmd.category || 'General',
34
+ })),
35
+ };
36
+ // Build fallback text
37
+ const fallbackLines = ['Available Commands:'];
38
+ for (const cmd of allCommands) {
39
+ fallbackLines.push(` /${cmd.name} - ${cmd.description}`);
125
40
  }
126
- output = `❓ No help available for: ${commandName}\nUse /help to see all available commands`;
127
- console.log(chalk.yellow(`❓ No help available for: ${commandName}`));
128
- console.log(chalk.dim('Use /help to see all available commands'));
129
- return formatForInkCli(output);
41
+ return CommandOutputHelper.styled('help', styledData, fallbackLines.join('\n'));
130
42
  },
131
43
  };
132
44
  }
@@ -141,31 +53,161 @@ export const generalCommands = [
141
53
  usage: '/exit',
142
54
  category: 'General',
143
55
  aliases: ['quit', 'q'],
144
- handler: async (_args, _agent) => {
145
- logger.warn('Exiting AI CLI. Goodbye!');
56
+ handler: async (_args, _agent, _ctx) => {
57
+ console.log(chalk.yellow('Exiting AI CLI. Goodbye!'));
146
58
  process.exit(0);
147
59
  },
148
60
  },
149
61
  {
150
62
  name: 'clear',
151
- description: 'Start a new session (clears viewable history without deleting)',
63
+ description: 'Clear context window (history preserved in DB, not sent to LLM)',
152
64
  usage: '/clear',
153
65
  category: 'General',
154
66
  aliases: ['new'],
155
- handler: async (_args, agent) => {
67
+ handler: async (_args, agent, ctx) => {
156
68
  try {
157
- // Create a new session instead of deleting history
158
- // This clears the viewable conversation without deleting the old session
159
- const newSession = await agent.createSession();
160
- const output = `🔄 Started new session: ${newSession.id.slice(0, 8)}\n💡 Previous session preserved. Use /resume to switch back.`;
161
- console.log(chalk.green(output));
162
- return formatForInkCli(output);
69
+ const { sessionId } = ctx;
70
+ if (!sessionId) {
71
+ return formatForInkCli('⚠️ No active session to clear');
72
+ }
73
+ // Clear context window - adds a marker so filterCompacted skips prior messages
74
+ // History stays in DB for review, but LLM won't see it
75
+ await agent.clearContext(sessionId);
76
+ return formatForInkCli('🔄 Context cleared\n💡 Previous messages preserved in history but not sent to LLM.');
163
77
  }
164
78
  catch (error) {
165
- const errorMsg = `Failed to start new session: ${error instanceof Error ? error.message : String(error)}`;
166
- logger.error(errorMsg);
79
+ const errorMsg = `Failed to clear context: ${error instanceof Error ? error.message : String(error)}`;
80
+ agent.logger.error(errorMsg);
167
81
  return formatForInkCli(`❌ ${errorMsg}`);
168
82
  }
169
83
  },
170
84
  },
85
+ {
86
+ name: 'copy',
87
+ description: 'Copy the last assistant response to clipboard',
88
+ usage: '/copy',
89
+ category: 'General',
90
+ aliases: ['cp'],
91
+ handler: async (_args, agent, ctx) => {
92
+ try {
93
+ const { sessionId } = ctx;
94
+ if (!sessionId) {
95
+ return formatForInkCli('❌ No active session');
96
+ }
97
+ // Get session history
98
+ const history = await agent.getSessionHistory(sessionId);
99
+ if (!history || history.length === 0) {
100
+ return formatForInkCli('❌ No messages in current session');
101
+ }
102
+ // Find the last assistant message
103
+ const lastAssistantMessage = [...history]
104
+ .reverse()
105
+ .find((msg) => msg.role === 'assistant');
106
+ if (!lastAssistantMessage) {
107
+ return formatForInkCli('❌ No assistant response to copy');
108
+ }
109
+ // Extract text content from the message
110
+ let textContent = '';
111
+ if (typeof lastAssistantMessage.content === 'string') {
112
+ textContent = lastAssistantMessage.content;
113
+ }
114
+ else if (Array.isArray(lastAssistantMessage.content)) {
115
+ // Handle multi-part content
116
+ textContent = lastAssistantMessage.content
117
+ .filter((part) => part.type === 'text')
118
+ .map((part) => part.text)
119
+ .join('\n');
120
+ }
121
+ if (!textContent) {
122
+ return formatForInkCli('❌ No text content to copy');
123
+ }
124
+ // Copy to clipboard
125
+ const success = await writeToClipboard(textContent);
126
+ if (success) {
127
+ const preview = textContent.length > 50
128
+ ? textContent.substring(0, 50) + '...'
129
+ : textContent;
130
+ return formatForInkCli(`📋 Copied to clipboard (${textContent.length} chars)\n${preview.replace(/\n/g, ' ')}`);
131
+ }
132
+ else {
133
+ return formatForInkCli('❌ Failed to copy to clipboard');
134
+ }
135
+ }
136
+ catch (error) {
137
+ const errorMsg = `Failed to copy: ${error instanceof Error ? error.message : String(error)}`;
138
+ agent.logger.error(errorMsg);
139
+ return formatForInkCli(`❌ ${errorMsg}`);
140
+ }
141
+ },
142
+ },
143
+ {
144
+ name: 'shortcuts',
145
+ description: 'Show keyboard shortcuts',
146
+ usage: '/shortcuts',
147
+ category: 'General',
148
+ aliases: ['keys', 'hotkeys'],
149
+ handler: async (_args, _agent, _ctx) => {
150
+ const styledData = {
151
+ categories: [
152
+ {
153
+ name: 'Global',
154
+ shortcuts: [
155
+ { keys: 'Ctrl+C', description: 'Clear input, then exit (press twice)' },
156
+ { keys: 'Escape', description: 'Cancel processing / close overlay' },
157
+ ],
158
+ },
159
+ {
160
+ name: 'Input',
161
+ shortcuts: [
162
+ { keys: 'Enter', description: 'Submit message' },
163
+ { keys: 'Shift+Enter', description: 'New line (multi-line input)' },
164
+ { keys: 'Up/Down', description: 'Navigate input history' },
165
+ { keys: 'Ctrl+R', description: 'Search history (enter search mode)' },
166
+ { keys: 'Tab', description: 'Autocomplete command' },
167
+ { keys: 'Ctrl+U', description: 'Clear input line' },
168
+ { keys: 'Ctrl+W', description: 'Delete word before cursor' },
169
+ { keys: 'Ctrl+A', description: 'Move cursor to start' },
170
+ { keys: 'Ctrl+E', description: 'Move cursor to end' },
171
+ ],
172
+ },
173
+ {
174
+ name: 'History Search (after Ctrl+R)',
175
+ shortcuts: [
176
+ { keys: 'Ctrl+R', description: 'Next older match' },
177
+ { keys: 'Ctrl+E', description: 'Next newer match' },
178
+ { keys: 'Enter', description: 'Accept and exit search' },
179
+ { keys: 'Escape', description: 'Cancel search' },
180
+ ],
181
+ },
182
+ {
183
+ name: 'Autocomplete & Selectors',
184
+ shortcuts: [
185
+ { keys: 'Up/Down', description: 'Navigate options' },
186
+ { keys: 'Enter', description: 'Select / execute' },
187
+ { keys: 'Tab', description: 'Load command into input' },
188
+ { keys: 'Escape', description: 'Close overlay' },
189
+ ],
190
+ },
191
+ {
192
+ name: 'Tool Approval',
193
+ shortcuts: [
194
+ { keys: 'y', description: 'Allow once' },
195
+ { keys: 'a', description: 'Allow for session' },
196
+ { keys: 'n', description: 'Deny' },
197
+ { keys: 'Escape', description: 'Cancel' },
198
+ ],
199
+ },
200
+ ],
201
+ };
202
+ // Build fallback text
203
+ const fallbackLines = ['Keyboard Shortcuts:'];
204
+ for (const category of styledData.categories) {
205
+ fallbackLines.push(`\n${category.name}:`);
206
+ for (const shortcut of category.shortcuts) {
207
+ fallbackLines.push(` ${shortcut.keys.padEnd(14)} ${shortcut.description}`);
208
+ }
209
+ }
210
+ return CommandOutputHelper.styled('shortcuts', styledData, fallbackLines.join('\n'));
211
+ },
212
+ },
171
213
  ];
@@ -1,7 +1,13 @@
1
1
  /**
2
- * MCP Commands Index
2
+ * MCP Commands Module
3
3
  *
4
- * Exports MCP command definitions for integration with the CLI system.
4
+ * In interactive CLI, /mcp always shows the interactive MCP server list overlay.
5
+ * This command definition exists for autocomplete and help display.
5
6
  */
6
- export { mcpCommands } from './mcp-commands.js';
7
+ import type { CommandDefinition } from '../command-parser.js';
8
+ /**
9
+ * MCP management command definition
10
+ * Always shows the interactive MCP server list overlay (handled by ALWAYS_OVERLAY)
11
+ */
12
+ export declare const mcpCommands: CommandDefinition;
7
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/interactive-commands/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/interactive-commands/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAwC,MAAM,sBAAsB,CAAC;AAEpG;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,iBAczB,CAAC"}
@@ -1,6 +1,21 @@
1
1
  /**
2
- * MCP Commands Index
2
+ * MCP Commands Module
3
3
  *
4
- * Exports MCP command definitions for integration with the CLI system.
4
+ * In interactive CLI, /mcp always shows the interactive MCP server list overlay.
5
+ * This command definition exists for autocomplete and help display.
5
6
  */
6
- export { mcpCommands } from './mcp-commands.js';
7
+ /**
8
+ * MCP management command definition
9
+ * Always shows the interactive MCP server list overlay (handled by ALWAYS_OVERLAY)
10
+ */
11
+ export const mcpCommands = {
12
+ name: 'mcp',
13
+ description: 'Manage MCP servers (interactive)',
14
+ usage: '/mcp',
15
+ category: 'MCP Management',
16
+ handler: async (_args, _agent, _ctx) => {
17
+ // This handler is never called - mcp is in ALWAYS_OVERLAY
18
+ // which intercepts and shows the MCP server list overlay instead
19
+ return true;
20
+ },
21
+ };
@@ -1,11 +1,13 @@
1
1
  /**
2
2
  * Model Commands Module
3
3
  *
4
- * This module provides centralized access to all model-related commands and utilities.
5
- * It serves as the main entry point for model management functionality in the CLI.
6
- *
7
- * Exports:
8
- * - modelCommands: Complete model command definition with all subcommands
4
+ * In interactive CLI, /model always shows the interactive model selector overlay.
5
+ * This command definition exists for autocomplete and help display.
6
+ */
7
+ import type { CommandDefinition } from '../command-parser.js';
8
+ /**
9
+ * Model management command definition
10
+ * Always shows the interactive model selector overlay (handled by ALWAYS_OVERLAY)
9
11
  */
10
- export { modelCommands } from './model-commands.js';
12
+ export declare const modelCommands: CommandDefinition;
11
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/interactive-commands/model/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/interactive-commands/model/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAwB,MAAM,sBAAsB,CAAC;AAEpF;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,iBAW3B,CAAC"}
@@ -1,10 +1,22 @@
1
1
  /**
2
2
  * Model Commands Module
3
3
  *
4
- * This module provides centralized access to all model-related commands and utilities.
5
- * It serves as the main entry point for model management functionality in the CLI.
6
- *
7
- * Exports:
8
- * - modelCommands: Complete model command definition with all subcommands
4
+ * In interactive CLI, /model always shows the interactive model selector overlay.
5
+ * This command definition exists for autocomplete and help display.
6
+ */
7
+ /**
8
+ * Model management command definition
9
+ * Always shows the interactive model selector overlay (handled by ALWAYS_OVERLAY)
9
10
  */
10
- export { modelCommands } from './model-commands.js';
11
+ export const modelCommands = {
12
+ name: 'model',
13
+ description: 'Switch AI model (interactive selector)',
14
+ usage: '/model',
15
+ category: 'General',
16
+ aliases: ['m'],
17
+ handler: async () => {
18
+ // This handler is never called - model is in ALWAYS_OVERLAY
19
+ // which intercepts and shows the model selector overlay instead
20
+ return true;
21
+ },
22
+ };
@@ -9,14 +9,15 @@
9
9
  * - /prompts - List all available prompts (MCP + internal)
10
10
  * - /<prompt-name> [args] - Direct prompt execution (auto-generated for each prompt)
11
11
  */
12
- import { type DextoAgent } from '@dexto/core';
12
+ import type { DextoAgent } from '@dexto/core';
13
13
  import type { CommandDefinition } from './command-parser.js';
14
14
  /**
15
15
  * Prompt management commands
16
16
  */
17
17
  export declare const promptCommands: CommandDefinition[];
18
18
  /**
19
- * Get all dynamic prompt commands based on available prompts
19
+ * Get all dynamic prompt commands based on available prompts.
20
+ * Handles displayName collisions by prefixing with source (e.g., config:review).
20
21
  */
21
22
  export declare function getDynamicPromptCommands(agent: DextoAgent): Promise<CommandDefinition[]>;
22
23
  //# sourceMappingURL=prompt-commands.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/prompt-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAK7D;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,iBAAiB,EAiL7C,CAAC;AAqFF;;GAEG;AACH,wBAAsB,wBAAwB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAU9F"}
1
+ {"version":3,"file":"prompt-commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/prompt-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAwC,MAAM,qBAAqB,CAAC;AAKnG;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,iBAAiB,EA8L7C,CAAC;AAwFF;;;GAGG;AACH,wBAAsB,wBAAwB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAwB9F"}