dexto 1.3.0 → 1.5.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 (494) hide show
  1. package/README.md +87 -22
  2. package/dist/agents/agent-registry.json +9 -0
  3. package/dist/agents/agent-template.yml +2 -2
  4. package/dist/agents/coding-agent/coding-agent.yml +27 -16
  5. package/dist/agents/database-agent/database-agent.yml +2 -2
  6. package/dist/agents/default-agent.yml +9 -7
  7. package/dist/agents/github-agent/github-agent.yml +2 -2
  8. package/dist/agents/product-name-researcher/product-name-researcher.yml +2 -2
  9. package/dist/agents/talk2pdf-agent/talk2pdf-agent.yml +2 -2
  10. package/dist/analytics/events.d.ts +13 -6
  11. package/dist/analytics/events.d.ts.map +1 -1
  12. package/dist/analytics/index.d.ts +1 -1
  13. package/dist/analytics/index.d.ts.map +1 -1
  14. package/dist/analytics/index.js +6 -2
  15. package/dist/api/server-hono.d.ts.map +1 -1
  16. package/dist/api/server-hono.js +65 -9
  17. package/dist/cli/cli-subscriber.d.ts +4 -0
  18. package/dist/cli/cli-subscriber.d.ts.map +1 -1
  19. package/dist/cli/cli-subscriber.js +47 -3
  20. package/dist/cli/commands/create-app.d.ts +16 -14
  21. package/dist/cli/commands/create-app.d.ts.map +1 -1
  22. package/dist/cli/commands/create-app.js +626 -102
  23. package/dist/cli/commands/create-image.d.ts +7 -0
  24. package/dist/cli/commands/create-image.d.ts.map +1 -0
  25. package/dist/cli/commands/create-image.js +201 -0
  26. package/dist/cli/commands/helpers/formatters.d.ts.map +1 -1
  27. package/dist/cli/commands/helpers/formatters.js +9 -8
  28. package/dist/cli/commands/index.d.ts +2 -1
  29. package/dist/cli/commands/index.d.ts.map +1 -1
  30. package/dist/cli/commands/index.js +2 -1
  31. package/dist/cli/commands/init-app.js +7 -7
  32. package/dist/cli/commands/install.d.ts +0 -3
  33. package/dist/cli/commands/install.d.ts.map +1 -1
  34. package/dist/cli/commands/install.js +19 -70
  35. package/dist/cli/commands/interactive-commands/command-parser.d.ts +17 -14
  36. package/dist/cli/commands/interactive-commands/command-parser.d.ts.map +1 -1
  37. package/dist/cli/commands/interactive-commands/command-parser.js +7 -22
  38. package/dist/cli/commands/interactive-commands/commands.d.ts +4 -4
  39. package/dist/cli/commands/interactive-commands/commands.d.ts.map +1 -1
  40. package/dist/cli/commands/interactive-commands/commands.js +34 -42
  41. package/dist/cli/commands/interactive-commands/documentation-commands.d.ts.map +1 -1
  42. package/dist/cli/commands/interactive-commands/documentation-commands.js +4 -7
  43. package/dist/cli/commands/interactive-commands/general-commands.d.ts.map +1 -1
  44. package/dist/cli/commands/interactive-commands/general-commands.js +159 -117
  45. package/dist/cli/commands/interactive-commands/mcp/index.d.ts +9 -3
  46. package/dist/cli/commands/interactive-commands/mcp/index.d.ts.map +1 -1
  47. package/dist/cli/commands/interactive-commands/mcp/index.js +18 -3
  48. package/dist/cli/commands/interactive-commands/model/index.d.ts +8 -6
  49. package/dist/cli/commands/interactive-commands/model/index.d.ts.map +1 -1
  50. package/dist/cli/commands/interactive-commands/model/index.js +18 -6
  51. package/dist/cli/commands/interactive-commands/prompt-commands.d.ts +3 -2
  52. package/dist/cli/commands/interactive-commands/prompt-commands.d.ts.map +1 -1
  53. package/dist/cli/commands/interactive-commands/prompt-commands.js +77 -60
  54. package/dist/cli/commands/interactive-commands/session/index.d.ts +7 -12
  55. package/dist/cli/commands/interactive-commands/session/index.d.ts.map +1 -1
  56. package/dist/cli/commands/interactive-commands/session/index.js +7 -14
  57. package/dist/cli/commands/interactive-commands/session/session-commands.d.ts +10 -24
  58. package/dist/cli/commands/interactive-commands/session/session-commands.d.ts.map +1 -1
  59. package/dist/cli/commands/interactive-commands/session/session-commands.js +16 -371
  60. package/dist/cli/commands/interactive-commands/system/system-commands.d.ts +1 -0
  61. package/dist/cli/commands/interactive-commands/system/system-commands.d.ts.map +1 -1
  62. package/dist/cli/commands/interactive-commands/system/system-commands.js +106 -77
  63. package/dist/cli/commands/interactive-commands/tool-commands.d.ts +1 -1
  64. package/dist/cli/commands/interactive-commands/tool-commands.d.ts.map +1 -1
  65. package/dist/cli/commands/interactive-commands/tool-commands.js +5 -62
  66. package/dist/cli/commands/interactive-commands/utils/command-output.d.ts +13 -17
  67. package/dist/cli/commands/interactive-commands/utils/command-output.d.ts.map +1 -1
  68. package/dist/cli/commands/interactive-commands/utils/command-output.js +18 -37
  69. package/dist/cli/commands/list-agents.d.ts +2 -2
  70. package/dist/cli/commands/list-agents.d.ts.map +1 -1
  71. package/dist/cli/commands/list-agents.js +38 -34
  72. package/dist/cli/commands/session-commands.js +16 -16
  73. package/dist/cli/commands/setup.d.ts +13 -5
  74. package/dist/cli/commands/setup.d.ts.map +1 -1
  75. package/dist/cli/commands/setup.js +860 -65
  76. package/dist/cli/commands/uninstall.d.ts.map +1 -1
  77. package/dist/cli/commands/uninstall.js +4 -6
  78. package/dist/cli/commands/which.d.ts.map +1 -1
  79. package/dist/cli/commands/which.js +18 -4
  80. package/dist/cli/ink-cli/InkCLIRefactored.d.ts +9 -22
  81. package/dist/cli/ink-cli/InkCLIRefactored.d.ts.map +1 -1
  82. package/dist/cli/ink-cli/InkCLIRefactored.js +50 -133
  83. package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts +26 -3
  84. package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts.map +1 -1
  85. package/dist/cli/ink-cli/components/ApprovalPrompt.js +182 -45
  86. package/dist/cli/ink-cli/components/CustomInput.js +1 -1
  87. package/dist/cli/ink-cli/components/EditableMultiLineInput.js +4 -4
  88. package/dist/cli/ink-cli/components/ElicitationForm.d.ts +22 -0
  89. package/dist/cli/ink-cli/components/ElicitationForm.d.ts.map +1 -0
  90. package/dist/cli/ink-cli/components/ElicitationForm.js +358 -0
  91. package/dist/cli/ink-cli/components/ErrorBoundary.d.ts.map +1 -1
  92. package/dist/cli/ink-cli/components/ErrorBoundary.js +1 -1
  93. package/dist/cli/ink-cli/components/Footer.d.ts +16 -0
  94. package/dist/cli/ink-cli/components/Footer.d.ts.map +1 -0
  95. package/dist/cli/ink-cli/components/Footer.js +27 -0
  96. package/dist/cli/ink-cli/components/HistorySearchBar.d.ts +17 -0
  97. package/dist/cli/ink-cli/components/HistorySearchBar.d.ts.map +1 -0
  98. package/dist/cli/ink-cli/components/HistorySearchBar.js +8 -0
  99. package/dist/cli/ink-cli/components/MultiLineInput.d.ts.map +1 -1
  100. package/dist/cli/ink-cli/components/MultiLineInput.js +3 -3
  101. package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts +15 -2
  102. package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts.map +1 -1
  103. package/dist/cli/ink-cli/components/ResourceAutocomplete.js +126 -82
  104. package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts +15 -2
  105. package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts.map +1 -1
  106. package/dist/cli/ink-cli/components/SlashCommandAutocomplete.js +228 -122
  107. package/dist/cli/ink-cli/components/StatusBar.d.ts +15 -2
  108. package/dist/cli/ink-cli/components/StatusBar.d.ts.map +1 -1
  109. package/dist/cli/ink-cli/components/StatusBar.js +50 -10
  110. package/dist/cli/ink-cli/components/TextBufferInput.d.ts +52 -0
  111. package/dist/cli/ink-cli/components/TextBufferInput.d.ts.map +1 -0
  112. package/dist/cli/ink-cli/components/TextBufferInput.js +471 -0
  113. package/dist/cli/ink-cli/components/base/BaseAutocomplete.js +4 -4
  114. package/dist/cli/ink-cli/components/base/BaseSelector.d.ts +11 -1
  115. package/dist/cli/ink-cli/components/base/BaseSelector.d.ts.map +1 -1
  116. package/dist/cli/ink-cli/components/base/BaseSelector.js +90 -49
  117. package/dist/cli/ink-cli/components/chat/Footer.js +1 -1
  118. package/dist/cli/ink-cli/components/chat/Header.d.ts +1 -0
  119. package/dist/cli/ink-cli/components/chat/Header.d.ts.map +1 -1
  120. package/dist/cli/ink-cli/components/chat/Header.js +6 -3
  121. package/dist/cli/ink-cli/components/chat/MessageItem.d.ts +3 -0
  122. package/dist/cli/ink-cli/components/chat/MessageItem.d.ts.map +1 -1
  123. package/dist/cli/ink-cli/components/chat/MessageItem.js +95 -9
  124. package/dist/cli/ink-cli/components/chat/MessageList.js +1 -1
  125. package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts +16 -0
  126. package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts.map +1 -0
  127. package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.js +27 -0
  128. package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts +5 -3
  129. package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts.map +1 -1
  130. package/dist/cli/ink-cli/components/chat/ToolIcon.js +21 -7
  131. package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts +10 -0
  132. package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts.map +1 -0
  133. package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.js +6 -0
  134. package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts +10 -0
  135. package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts.map +1 -0
  136. package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.js +15 -0
  137. package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts +10 -0
  138. package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts.map +1 -0
  139. package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.js +9 -0
  140. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts +10 -0
  141. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts.map +1 -0
  142. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.js +37 -0
  143. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts +10 -0
  144. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts.map +1 -0
  145. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.js +9 -0
  146. package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts +10 -0
  147. package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts.map +1 -0
  148. package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.js +6 -0
  149. package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts +10 -0
  150. package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts.map +1 -0
  151. package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.js +29 -0
  152. package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts +45 -0
  153. package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts.map +1 -0
  154. package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.js +38 -0
  155. package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts +10 -0
  156. package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts.map +1 -0
  157. package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.js +6 -0
  158. package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts +13 -0
  159. package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts.map +1 -0
  160. package/dist/cli/ink-cli/components/chat/styled-boxes/index.js +12 -0
  161. package/dist/cli/ink-cli/components/input/InputArea.d.ts +36 -8
  162. package/dist/cli/ink-cli/components/input/InputArea.d.ts.map +1 -1
  163. package/dist/cli/ink-cli/components/input/InputArea.js +3 -3
  164. package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts +25 -0
  165. package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts.map +1 -0
  166. package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.js +166 -0
  167. package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts +27 -0
  168. package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts.map +1 -0
  169. package/dist/cli/ink-cli/components/modes/StaticCLI.js +95 -0
  170. package/dist/cli/ink-cli/components/modes/index.d.ts +10 -0
  171. package/dist/cli/ink-cli/components/modes/index.d.ts.map +1 -0
  172. package/dist/cli/ink-cli/components/modes/index.js +9 -0
  173. package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts +26 -0
  174. package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts.map +1 -0
  175. package/dist/cli/ink-cli/components/overlays/ApiKeyInput.js +92 -0
  176. package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts +29 -0
  177. package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts.map +1 -0
  178. package/dist/cli/ink-cli/components/overlays/CustomModelWizard.js +286 -0
  179. package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts +22 -0
  180. package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts.map +1 -0
  181. package/dist/cli/ink-cli/components/overlays/LogLevelSelector.js +59 -0
  182. package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts +22 -0
  183. package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts.map +1 -0
  184. package/dist/cli/ink-cli/components/overlays/McpAddChoice.js +59 -0
  185. package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts +26 -0
  186. package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts.map +1 -0
  187. package/dist/cli/ink-cli/components/overlays/McpAddSelector.js +73 -0
  188. package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts +21 -0
  189. package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts.map +1 -0
  190. package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.js +51 -0
  191. package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts +29 -0
  192. package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts.map +1 -0
  193. package/dist/cli/ink-cli/components/overlays/McpCustomWizard.js +215 -0
  194. package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts +22 -0
  195. package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts.map +1 -0
  196. package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.js +74 -0
  197. package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts +21 -0
  198. package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts.map +1 -0
  199. package/dist/cli/ink-cli/components/overlays/McpSelector.js +52 -0
  200. package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts +28 -0
  201. package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts.map +1 -0
  202. package/dist/cli/ink-cli/components/overlays/McpServerActions.js +84 -0
  203. package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts +29 -0
  204. package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts.map +1 -0
  205. package/dist/cli/ink-cli/components/overlays/McpServerList.js +109 -0
  206. package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts +15 -8
  207. package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts.map +1 -1
  208. package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.js +400 -23
  209. package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts +22 -0
  210. package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts.map +1 -0
  211. package/dist/cli/ink-cli/components/overlays/PromptAddChoice.js +52 -0
  212. package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts +29 -0
  213. package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts.map +1 -0
  214. package/dist/cli/ink-cli/components/overlays/PromptAddWizard.js +166 -0
  215. package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts +27 -0
  216. package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts.map +1 -0
  217. package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.js +119 -0
  218. package/dist/cli/ink-cli/components/overlays/PromptList.d.ts +33 -0
  219. package/dist/cli/ink-cli/components/overlays/PromptList.d.ts.map +1 -0
  220. package/dist/cli/ink-cli/components/overlays/PromptList.js +144 -0
  221. package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts +23 -0
  222. package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts.map +1 -0
  223. package/dist/cli/ink-cli/components/overlays/SearchOverlay.js +189 -0
  224. package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts +7 -2
  225. package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts.map +1 -1
  226. package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.js +19 -5
  227. package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts +21 -0
  228. package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts.map +1 -0
  229. package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.js +42 -0
  230. package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts +20 -0
  231. package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts.map +1 -0
  232. package/dist/cli/ink-cli/components/overlays/StreamSelector.js +58 -0
  233. package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts +25 -0
  234. package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts.map +1 -0
  235. package/dist/cli/ink-cli/components/overlays/ToolBrowser.js +400 -0
  236. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts +25 -0
  237. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts.map +1 -0
  238. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.js +609 -0
  239. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts +15 -0
  240. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts.map +1 -0
  241. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.js +14 -0
  242. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts +33 -0
  243. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts.map +1 -0
  244. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.js +419 -0
  245. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts +25 -0
  246. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts.map +1 -0
  247. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.js +29 -0
  248. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts +17 -0
  249. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts.map +1 -0
  250. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.js +11 -0
  251. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts +20 -0
  252. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts.map +1 -0
  253. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.js +10 -0
  254. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts +30 -0
  255. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts.map +1 -0
  256. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.js +13 -0
  257. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts +8 -0
  258. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts.map +1 -0
  259. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.js +7 -0
  260. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts +79 -0
  261. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts.map +1 -0
  262. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.js +38 -0
  263. package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts +21 -0
  264. package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts.map +1 -0
  265. package/dist/cli/ink-cli/components/renderers/DiffRenderer.js +65 -0
  266. package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts +28 -0
  267. package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts.map +1 -0
  268. package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.js +66 -0
  269. package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts +19 -0
  270. package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts.map +1 -0
  271. package/dist/cli/ink-cli/components/renderers/FileRenderer.js +26 -0
  272. package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts +21 -0
  273. package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts.map +1 -0
  274. package/dist/cli/ink-cli/components/renderers/GenericRenderer.js +26 -0
  275. package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts +20 -0
  276. package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts.map +1 -0
  277. package/dist/cli/ink-cli/components/renderers/SearchRenderer.js +12 -0
  278. package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts +21 -0
  279. package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts.map +1 -0
  280. package/dist/cli/ink-cli/components/renderers/ShellRenderer.js +25 -0
  281. package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts +61 -0
  282. package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts.map +1 -0
  283. package/dist/cli/ink-cli/components/renderers/diff-shared.js +158 -0
  284. package/dist/cli/ink-cli/components/renderers/index.d.ts +28 -0
  285. package/dist/cli/ink-cli/components/renderers/index.d.ts.map +1 -0
  286. package/dist/cli/ink-cli/components/renderers/index.js +36 -0
  287. package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts +38 -0
  288. package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts.map +1 -0
  289. package/dist/cli/ink-cli/components/shared/MarkdownText.js +362 -0
  290. package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts +44 -0
  291. package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts.map +1 -0
  292. package/dist/cli/ink-cli/components/shared/VirtualizedList.js +300 -0
  293. package/dist/cli/ink-cli/components/shared/text-buffer.d.ts +185 -0
  294. package/dist/cli/ink-cli/components/shared/text-buffer.d.ts.map +1 -0
  295. package/dist/cli/ink-cli/components/shared/text-buffer.js +1338 -0
  296. package/dist/cli/ink-cli/constants/processingPhrases.d.ts +10 -0
  297. package/dist/cli/ink-cli/constants/processingPhrases.d.ts.map +1 -0
  298. package/dist/cli/ink-cli/constants/processingPhrases.js +64 -0
  299. package/dist/cli/ink-cli/constants/tips.d.ts +15 -0
  300. package/dist/cli/ink-cli/constants/tips.d.ts.map +1 -0
  301. package/dist/cli/ink-cli/constants/tips.js +53 -0
  302. package/dist/cli/ink-cli/containers/InputContainer.d.ts +42 -8
  303. package/dist/cli/ink-cli/containers/InputContainer.d.ts.map +1 -1
  304. package/dist/cli/ink-cli/containers/InputContainer.js +513 -85
  305. package/dist/cli/ink-cli/containers/OverlayContainer.d.ts +23 -5
  306. package/dist/cli/ink-cli/containers/OverlayContainer.d.ts.map +1 -1
  307. package/dist/cli/ink-cli/containers/OverlayContainer.js +1214 -132
  308. package/dist/cli/ink-cli/containers/index.d.ts +1 -1
  309. package/dist/cli/ink-cli/containers/index.d.ts.map +1 -1
  310. package/dist/cli/ink-cli/contexts/KeypressContext.d.ts +36 -0
  311. package/dist/cli/ink-cli/contexts/KeypressContext.d.ts.map +1 -0
  312. package/dist/cli/ink-cli/contexts/KeypressContext.js +461 -0
  313. package/dist/cli/ink-cli/contexts/MouseContext.d.ts +27 -0
  314. package/dist/cli/ink-cli/contexts/MouseContext.d.ts.map +1 -0
  315. package/dist/cli/ink-cli/contexts/MouseContext.js +102 -0
  316. package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts +33 -0
  317. package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts.map +1 -0
  318. package/dist/cli/ink-cli/contexts/ScrollProvider.js +170 -0
  319. package/dist/cli/ink-cli/contexts/index.d.ts +7 -0
  320. package/dist/cli/ink-cli/contexts/index.d.ts.map +1 -0
  321. package/dist/cli/ink-cli/contexts/index.js +6 -0
  322. package/dist/cli/ink-cli/hooks/index.d.ts +5 -0
  323. package/dist/cli/ink-cli/hooks/index.d.ts.map +1 -1
  324. package/dist/cli/ink-cli/hooks/index.js +6 -1
  325. package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts +26 -9
  326. package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts.map +1 -1
  327. package/dist/cli/ink-cli/hooks/useAgentEvents.js +90 -198
  328. package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts +14 -0
  329. package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts.map +1 -0
  330. package/dist/cli/ink-cli/hooks/useBatchedScroll.js +25 -0
  331. package/dist/cli/ink-cli/hooks/useCLIState.d.ts +50 -0
  332. package/dist/cli/ink-cli/hooks/useCLIState.d.ts.map +1 -0
  333. package/dist/cli/ink-cli/hooks/useCLIState.js +190 -0
  334. package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts +24 -0
  335. package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts.map +1 -0
  336. package/dist/cli/ink-cli/hooks/useElapsedTime.js +69 -0
  337. package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts +61 -0
  338. package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts.map +1 -0
  339. package/dist/cli/ink-cli/hooks/useHistorySearch.js +210 -0
  340. package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts +136 -0
  341. package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts.map +1 -0
  342. package/dist/cli/ink-cli/hooks/useInputOrchestrator.js +663 -0
  343. package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.d.ts.map +1 -1
  344. package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.js +7 -26
  345. package/dist/cli/ink-cli/hooks/useKeypress.d.ts +18 -0
  346. package/dist/cli/ink-cli/hooks/useKeypress.d.ts.map +1 -0
  347. package/dist/cli/ink-cli/hooks/useKeypress.js +26 -0
  348. package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts +30 -0
  349. package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts.map +1 -0
  350. package/dist/cli/ink-cli/hooks/usePhraseCycler.js +68 -0
  351. package/dist/cli/ink-cli/hooks/useStreaming.d.ts +19 -0
  352. package/dist/cli/ink-cli/hooks/useStreaming.d.ts.map +1 -0
  353. package/dist/cli/ink-cli/hooks/useStreaming.js +26 -0
  354. package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts +14 -0
  355. package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts.map +1 -0
  356. package/dist/cli/ink-cli/hooks/useTerminalSize.js +31 -0
  357. package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts +42 -0
  358. package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts.map +1 -0
  359. package/dist/cli/ink-cli/hooks/useTokenCounter.js +96 -0
  360. package/dist/cli/ink-cli/services/CommandService.d.ts +32 -1
  361. package/dist/cli/ink-cli/services/CommandService.d.ts.map +1 -1
  362. package/dist/cli/ink-cli/services/CommandService.js +36 -5
  363. package/dist/cli/ink-cli/services/InputService.d.ts +1 -5
  364. package/dist/cli/ink-cli/services/InputService.d.ts.map +1 -1
  365. package/dist/cli/ink-cli/services/InputService.js +1 -8
  366. package/dist/cli/ink-cli/services/index.d.ts +2 -1
  367. package/dist/cli/ink-cli/services/index.d.ts.map +1 -1
  368. package/dist/cli/ink-cli/services/index.js +2 -1
  369. package/dist/cli/ink-cli/services/processStream.d.ts +69 -0
  370. package/dist/cli/ink-cli/services/processStream.d.ts.map +1 -0
  371. package/dist/cli/ink-cli/services/processStream.js +742 -0
  372. package/dist/cli/ink-cli/state/actions.d.ts +30 -60
  373. package/dist/cli/ink-cli/state/actions.d.ts.map +1 -1
  374. package/dist/cli/ink-cli/state/actions.js +3 -0
  375. package/dist/cli/ink-cli/state/index.d.ts +5 -3
  376. package/dist/cli/ink-cli/state/index.d.ts.map +1 -1
  377. package/dist/cli/ink-cli/state/index.js +4 -3
  378. package/dist/cli/ink-cli/state/initialState.d.ts +4 -3
  379. package/dist/cli/ink-cli/state/initialState.d.ts.map +1 -1
  380. package/dist/cli/ink-cli/state/initialState.js +20 -4
  381. package/dist/cli/ink-cli/state/reducer.d.ts +3 -0
  382. package/dist/cli/ink-cli/state/reducer.d.ts.map +1 -1
  383. package/dist/cli/ink-cli/state/reducer.js +62 -168
  384. package/dist/cli/ink-cli/state/streaming-state.d.ts +27 -0
  385. package/dist/cli/ink-cli/state/streaming-state.d.ts.map +1 -0
  386. package/dist/cli/ink-cli/state/streaming-state.js +39 -0
  387. package/dist/cli/ink-cli/state/types.d.ts +223 -6
  388. package/dist/cli/ink-cli/state/types.d.ts.map +1 -1
  389. package/dist/cli/ink-cli/utils/bracketedPaste.d.ts +22 -0
  390. package/dist/cli/ink-cli/utils/bracketedPaste.d.ts.map +1 -0
  391. package/dist/cli/ink-cli/utils/bracketedPaste.js +27 -0
  392. package/dist/cli/ink-cli/utils/clipboardUtils.d.ts +49 -0
  393. package/dist/cli/ink-cli/utils/clipboardUtils.d.ts.map +1 -0
  394. package/dist/cli/ink-cli/utils/clipboardUtils.js +356 -0
  395. package/dist/cli/ink-cli/utils/commandOverlays.d.ts +33 -0
  396. package/dist/cli/ink-cli/utils/commandOverlays.d.ts.map +1 -0
  397. package/dist/cli/ink-cli/utils/commandOverlays.js +78 -0
  398. package/dist/cli/ink-cli/utils/debugLog.d.ts +38 -0
  399. package/dist/cli/ink-cli/utils/debugLog.d.ts.map +1 -0
  400. package/dist/cli/ink-cli/utils/debugLog.js +66 -0
  401. package/dist/cli/ink-cli/utils/index.d.ts +2 -1
  402. package/dist/cli/ink-cli/utils/index.d.ts.map +1 -1
  403. package/dist/cli/ink-cli/utils/index.js +3 -1
  404. package/dist/cli/ink-cli/utils/input.d.ts +25 -0
  405. package/dist/cli/ink-cli/utils/input.d.ts.map +1 -0
  406. package/dist/cli/ink-cli/utils/input.js +56 -0
  407. package/dist/cli/ink-cli/utils/inputParsing.d.ts +0 -9
  408. package/dist/cli/ink-cli/utils/inputParsing.d.ts.map +1 -1
  409. package/dist/cli/ink-cli/utils/inputParsing.js +0 -27
  410. package/dist/cli/ink-cli/utils/messageFormatting.d.ts +59 -3
  411. package/dist/cli/ink-cli/utils/messageFormatting.d.ts.map +1 -1
  412. package/dist/cli/ink-cli/utils/messageFormatting.js +348 -20
  413. package/dist/cli/ink-cli/utils/mouse.d.ts +61 -0
  414. package/dist/cli/ink-cli/utils/mouse.d.ts.map +1 -0
  415. package/dist/cli/ink-cli/utils/mouse.js +209 -0
  416. package/dist/cli/ink-cli/utils/streamSplitter.d.ts +44 -0
  417. package/dist/cli/ink-cli/utils/streamSplitter.d.ts.map +1 -0
  418. package/dist/cli/ink-cli/utils/streamSplitter.js +154 -0
  419. package/dist/cli/ink-cli/utils/textUtils.d.ts +63 -0
  420. package/dist/cli/ink-cli/utils/textUtils.d.ts.map +1 -0
  421. package/dist/cli/ink-cli/utils/textUtils.js +248 -0
  422. package/dist/cli/ink-cli/utils/toolUtils.d.ts +9 -0
  423. package/dist/cli/ink-cli/utils/toolUtils.d.ts.map +1 -0
  424. package/dist/cli/ink-cli/utils/toolUtils.js +15 -0
  425. package/dist/cli/utils/api-key-setup.d.ts +54 -4
  426. package/dist/cli/utils/api-key-setup.d.ts.map +1 -1
  427. package/dist/cli/utils/api-key-setup.js +433 -107
  428. package/dist/cli/utils/api-key-verification.d.ts +17 -0
  429. package/dist/cli/utils/api-key-verification.d.ts.map +1 -0
  430. package/dist/cli/utils/api-key-verification.js +211 -0
  431. package/dist/cli/utils/config-validation.d.ts +22 -2
  432. package/dist/cli/utils/config-validation.d.ts.map +1 -1
  433. package/dist/cli/utils/config-validation.js +354 -25
  434. package/dist/cli/utils/local-model-setup.d.ts +46 -0
  435. package/dist/cli/utils/local-model-setup.d.ts.map +1 -0
  436. package/dist/cli/utils/local-model-setup.js +662 -0
  437. package/dist/cli/utils/options.d.ts.map +1 -1
  438. package/dist/cli/utils/options.js +1 -3
  439. package/dist/cli/utils/prompt-helpers.d.ts +47 -0
  440. package/dist/cli/utils/prompt-helpers.d.ts.map +1 -0
  441. package/dist/cli/utils/prompt-helpers.js +66 -0
  442. package/dist/cli/utils/provider-setup.d.ts +66 -8
  443. package/dist/cli/utils/provider-setup.d.ts.map +1 -1
  444. package/dist/cli/utils/provider-setup.js +324 -84
  445. package/dist/cli/utils/scaffolding-utils.d.ts +76 -0
  446. package/dist/cli/utils/scaffolding-utils.d.ts.map +1 -0
  447. package/dist/cli/utils/scaffolding-utils.js +246 -0
  448. package/dist/cli/utils/setup-utils.d.ts +16 -0
  449. package/dist/cli/utils/setup-utils.d.ts.map +1 -1
  450. package/dist/cli/utils/setup-utils.js +72 -21
  451. package/dist/cli/utils/template-engine.d.ts +65 -0
  452. package/dist/cli/utils/template-engine.d.ts.map +1 -0
  453. package/dist/cli/utils/template-engine.js +1089 -0
  454. package/dist/config/cli-overrides.d.ts +45 -2
  455. package/dist/config/cli-overrides.d.ts.map +1 -1
  456. package/dist/config/cli-overrides.js +107 -10
  457. package/dist/index.js +379 -99
  458. package/dist/utils/agent-helpers.d.ts +95 -0
  459. package/dist/utils/agent-helpers.d.ts.map +1 -0
  460. package/dist/utils/agent-helpers.js +117 -0
  461. package/dist/webui/assets/index-8j-KMkX1.js +2054 -0
  462. package/dist/webui/assets/index-c_AX24V4.css +1 -0
  463. package/dist/webui/assets/{tanstack-DgxBONJY.js → tanstack-Br79RQ-n.js} +1 -1
  464. package/dist/webui/index.html +4 -10
  465. package/dist/webui/logos/aws-color.svg +1 -0
  466. package/dist/webui/logos/dexto/dexto_logo.svg +1 -1
  467. package/dist/webui/logos/dexto/dexto_logo_light.svg +6 -6
  468. package/dist/webui/logos/glama.svg +7 -0
  469. package/dist/webui/logos/litellm.svg +7 -0
  470. package/dist/webui/logos/openrouter.svg +1 -0
  471. package/package.json +18 -15
  472. package/dist/cli/commands/interactive-commands/index.d.ts +0 -63
  473. package/dist/cli/commands/interactive-commands/index.d.ts.map +0 -1
  474. package/dist/cli/commands/interactive-commands/index.js +0 -73
  475. package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.d.ts +0 -34
  476. package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.d.ts.map +0 -1
  477. package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.js +0 -178
  478. package/dist/cli/commands/interactive-commands/mcp/mcp-commands.d.ts +0 -9
  479. package/dist/cli/commands/interactive-commands/mcp/mcp-commands.d.ts.map +0 -1
  480. package/dist/cli/commands/interactive-commands/mcp/mcp-commands.js +0 -325
  481. package/dist/cli/commands/interactive-commands/model/model-commands.d.ts +0 -21
  482. package/dist/cli/commands/interactive-commands/model/model-commands.d.ts.map +0 -1
  483. package/dist/cli/commands/interactive-commands/model/model-commands.js +0 -190
  484. package/dist/cli/ink-cli/components/MultiLineTextInput.d.ts +0 -26
  485. package/dist/cli/ink-cli/components/MultiLineTextInput.d.ts.map +0 -1
  486. package/dist/cli/ink-cli/components/MultiLineTextInput.js +0 -220
  487. package/dist/discord/bot.d.ts +0 -4
  488. package/dist/discord/bot.d.ts.map +0 -1
  489. package/dist/discord/bot.js +0 -193
  490. package/dist/telegram/bot.d.ts +0 -5
  491. package/dist/telegram/bot.d.ts.map +0 -1
  492. package/dist/telegram/bot.js +0 -251
  493. package/dist/webui/assets/index-DKq5Xng1.js +0 -687
  494. package/dist/webui/assets/index-D_0_GBu5.css +0 -1
@@ -1,19 +1,4 @@
1
1
  import chalk from 'chalk';
2
- /**
3
- * Helper for command handlers to get the current session ID from CLI context.
4
- * This is set by executeCommand() when invoked from InkCLI.
5
- *
6
- * Maintains separation of concerns:
7
- * - InkCLI state manages current sessionId
8
- * - executeCommand() stores it temporarily on agent for command access
9
- * - Commands use this helper instead of removed agent.getCurrentSessionId()
10
- *
11
- * @param agent - DextoAgent instance with __cliSessionId set by executeCommand
12
- * @returns Current session ID from CLI context, or null if not available
13
- */
14
- export function getCLISessionId(agent) {
15
- return agent.__cliSessionId || null;
16
- }
17
2
  /**
18
3
  * Parse arguments respecting quotes and escape sequences
19
4
  */
@@ -105,12 +90,12 @@ export function getCommandSuggestions(partial, commands) {
105
90
  export function formatCommandHelp(cmd, detailed = false) {
106
91
  let help = chalk.cyan(`/${cmd.name}`) + ' - ' + cmd.description;
107
92
  if (detailed) {
108
- help += '\n' + chalk.dim(`Usage: ${cmd.usage}`);
93
+ help += '\n' + chalk.gray(`Usage: ${cmd.usage}`);
109
94
  if (cmd.aliases && cmd.aliases.length > 0) {
110
- help += '\n' + chalk.dim(`Aliases: ${cmd.aliases.map((a) => `/${a}`).join(', ')}`);
95
+ help += '\n' + chalk.gray(`Aliases: ${cmd.aliases.map((a) => `/${a}`).join(', ')}`);
111
96
  }
112
97
  if (cmd.subcommands && cmd.subcommands.length > 0) {
113
- help += '\n' + chalk.dim('Subcommands:');
98
+ help += '\n' + chalk.gray('Subcommands:');
114
99
  for (const sub of cmd.subcommands) {
115
100
  help += '\n ' + chalk.cyan(`/${cmd.name} ${sub.name}`) + ' - ' + sub.description;
116
101
  }
@@ -150,7 +135,7 @@ export function displayAllCommands(commands) {
150
135
  for (const category of categoryOrder) {
151
136
  const cmds = categories[category];
152
137
  if (cmds && cmds.length > 0) {
153
- console.log(chalk.bold.yellow(`${category}:`));
138
+ console.log(chalk.bold.rgb(255, 165, 0)(`${category}:`));
154
139
  for (const cmd of cmds) {
155
140
  console.log(' ' + formatCommandHelp(cmd));
156
141
  }
@@ -160,13 +145,13 @@ export function displayAllCommands(commands) {
160
145
  // Display any uncategorized commands (fallback)
161
146
  for (const [category, cmds] of Object.entries(categories)) {
162
147
  if (!categoryOrder.includes(category) && cmds.length > 0) {
163
- console.log(chalk.bold.yellow(`${category}:`));
148
+ console.log(chalk.bold.rgb(255, 165, 0)(`${category}:`));
164
149
  for (const cmd of cmds) {
165
150
  console.log(' ' + formatCommandHelp(cmd));
166
151
  }
167
152
  console.log();
168
153
  }
169
154
  }
170
- console.log(chalk.dim('💡 Tip: Use /help <command> for detailed help on any command'));
171
- console.log(chalk.dim('💡 Tip: Type your message normally (without /) to chat with the AI\n'));
155
+ console.log(chalk.gray('💡 Tip: Use /help <command> for detailed help on any command'));
156
+ console.log(chalk.gray('💡 Tip: Type your message normally (without /) to chat with the AI\n'));
172
157
  }
@@ -18,8 +18,8 @@
18
18
  * This file serves as the integration layer that combines all modular commands
19
19
  * into a single CLI_COMMANDS array for the command execution system.
20
20
  */
21
- import { type DextoAgent } from '@dexto/core';
22
- import type { CommandDefinition } from './command-parser.js';
21
+ import type { DextoAgent } from '@dexto/core';
22
+ import type { CommandDefinition, CommandHandlerResult } from './command-parser.js';
23
23
  /**
24
24
  * Complete list of all available CLI commands.
25
25
  * This array combines commands from all extracted modules to maintain
@@ -40,9 +40,9 @@ export declare const CLI_COMMANDS: CommandDefinition[];
40
40
  * Execute a slash command
41
41
  *
42
42
  * @param sessionId - Session ID to use for agent.run() calls
43
- * @returns boolean indicating if command was handled, or string for ink-cli output
43
+ * @returns CommandHandlerResult - boolean, string, or StyledOutput
44
44
  */
45
- export declare function executeCommand(command: string, args: string[], agent: DextoAgent, sessionId?: string): Promise<boolean | string>;
45
+ export declare function executeCommand(command: string, args: string[], agent: DextoAgent, sessionId?: string): Promise<CommandHandlerResult>;
46
46
  /**
47
47
  * Get all available command definitions
48
48
  * This is used by external systems that need to inspect available commands
@@ -1 +1 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAY7D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,YAAY,EAAE,iBAAiB,EAAO,CAAC;AAsCpD;;;;;GAKG;AACH,wBAAsB,cAAc,CAChC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,KAAK,EAAE,UAAU,EACjB,SAAS,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CA0D3B;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,iBAAiB,EAAE,CAEpD"}
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAYnF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,YAAY,EAAE,iBAAiB,EAAO,CAAC;AAqCpD;;;;;GAKG;AACH,wBAAsB,cAAc,CAChC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,KAAK,EAAE,UAAU,EACjB,SAAS,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,oBAAoB,CAAC,CAyD/B;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,iBAAiB,EAAE,CAEpD"}
@@ -18,7 +18,6 @@
18
18
  * This file serves as the integration layer that combines all modular commands
19
19
  * into a single CLI_COMMANDS array for the command execution system.
20
20
  */
21
- import { logger } from '@dexto/core';
22
21
  // Import modular command definitions
23
22
  import { generalCommands, createHelpCommand } from './general-commands.js';
24
23
  import { searchCommand, resumeCommand } from './session/index.js';
@@ -45,18 +44,17 @@ import { documentationCommands } from './documentation-commands.js';
45
44
  */
46
45
  export const CLI_COMMANDS = [];
47
46
  // Build the commands array with proper help command that can access all commands
48
- // Note: Interactive CLI uses simplified commands (interactive selectors instead of subcommands)
49
- // Regular CLI (headless) has full subcommand access via `dexto session list`, etc.
47
+ // All commands here use interactive overlays - no text-based subcommands
50
48
  const baseCommands = [
51
49
  // General commands (without help)
52
50
  ...generalCommands,
53
- // Session management - simplified for interactive CLI
54
- searchCommand, // /search - search across sessions
55
- resumeCommand, // /resume - show interactive selector (no /session subcommands)
56
- // Model management - simplified for interactive CLI
57
- modelCommands, // /model - show interactive selector (subcommands available but not emphasized)
58
- // MCP server management commands
59
- mcpCommands,
51
+ // Session management
52
+ searchCommand, // /search - opens search overlay
53
+ resumeCommand, // /resume - opens session selector overlay
54
+ // Model management
55
+ modelCommands, // /model - opens model selector overlay
56
+ // MCP server management
57
+ mcpCommands, // /mcp - opens MCP server list overlay
60
58
  // Tool management commands
61
59
  ...toolCommands,
62
60
  // Prompt management commands
@@ -74,60 +72,54 @@ CLI_COMMANDS.push(...baseCommands);
74
72
  * Execute a slash command
75
73
  *
76
74
  * @param sessionId - Session ID to use for agent.run() calls
77
- * @returns boolean indicating if command was handled, or string for ink-cli output
75
+ * @returns CommandHandlerResult - boolean, string, or StyledOutput
78
76
  */
79
77
  export async function executeCommand(command, args, agent, sessionId) {
80
- // Store sessionId in agent context for command handlers to access
81
- if (sessionId) {
82
- agent.__cliSessionId = sessionId;
83
- }
78
+ // Create command context with sessionId
79
+ const ctx = { sessionId: sessionId ?? null };
84
80
  // Find the command (including aliases)
85
81
  const cmd = CLI_COMMANDS.find((c) => c.name === command || (c.aliases && c.aliases.includes(command)));
86
82
  if (cmd) {
87
83
  try {
88
- // Execute the handler with error handling
89
- const result = await cmd.handler(args, agent);
84
+ // Execute the handler with context
85
+ const result = await cmd.handler(args, agent, ctx);
90
86
  // If handler returns a string, it's formatted output for ink-cli
91
87
  // If it returns boolean, it's the old behavior (handled or not)
92
88
  return result;
93
89
  }
94
90
  catch (error) {
95
91
  const errorMsg = `❌ Error executing command /${command}:\n${error instanceof Error ? error.message : String(error)}`;
96
- console.error(errorMsg);
92
+ agent.logger.error(`Error executing command /${command}: ${error instanceof Error ? error.message : String(error)}`);
97
93
  return errorMsg; // Return for ink-cli
98
94
  }
99
95
  }
100
- // Command not found in static commands - check if it's a prompt
96
+ // Command not found in static commands - check if it's a dynamic prompt command
97
+ // Dynamic commands use displayName (e.g., "quick-start" instead of "config:quick-start")
101
98
  try {
102
- const hasPrompt = await agent.hasPrompt(command);
103
- if (hasPrompt) {
104
- // Import prompt command creation dynamically to avoid circular dependencies
105
- const { getDynamicPromptCommands } = await import('./prompt-commands.js');
106
- const dynamicCommands = await getDynamicPromptCommands(agent);
107
- const promptCmd = dynamicCommands.find((c) => c.name === command);
108
- if (promptCmd) {
109
- try {
110
- const result = await promptCmd.handler(args, agent);
111
- // If result is a string, return it (for ink-cli display)
112
- // If result is boolean true, return empty string (command handled, message shown via agent.run())
113
- // If result is boolean false, return empty string (command handled)
114
- return typeof result === 'string' ? result : '';
115
- }
116
- catch (error) {
117
- const errorMsg = `❌ Error executing prompt /${command}:\n${error instanceof Error ? error.message : String(error)}`;
118
- console.error(errorMsg);
119
- return errorMsg;
120
- }
99
+ // Import prompt command creation dynamically to avoid circular dependencies
100
+ const { getDynamicPromptCommands } = await import('./prompt-commands.js');
101
+ const dynamicCommands = await getDynamicPromptCommands(agent);
102
+ // Commands are registered by displayName, so search by command name directly
103
+ const promptCmd = dynamicCommands.find((c) => c.name === command);
104
+ if (promptCmd) {
105
+ try {
106
+ const result = await promptCmd.handler(args, agent, ctx);
107
+ // Return the result directly - can be string, boolean, StyledOutput, or SendMessageMarker
108
+ return result;
109
+ }
110
+ catch (error) {
111
+ const errorMsg = `❌ Error executing prompt /${command}:\n${error instanceof Error ? error.message : String(error)}`;
112
+ agent.logger.error(`Error executing prompt /${command}: ${error instanceof Error ? error.message : String(error)}`);
113
+ return errorMsg;
121
114
  }
122
115
  }
123
116
  }
124
117
  catch (error) {
125
- // If checking for prompt fails, continue to unknown command error
126
- logger.debug(`Failed to check if ${command} is a prompt: ${error instanceof Error ? error.message : String(error)}`);
118
+ // If loading dynamic commands fails, continue to unknown command error
119
+ agent.logger.debug(`Failed to check dynamic commands for ${command}: ${error instanceof Error ? error.message : String(error)}`);
127
120
  }
128
121
  // Command not found and not a prompt
129
- const errorMsg = `❌ Unknown command: /${command}\nType /help to see available commands`;
130
- console.log(errorMsg);
122
+ const errorMsg = `❌ Unknown command: /${command}\nType / to see available commands, /prompts to add new ones`;
131
123
  return errorMsg; // Return for ink-cli
132
124
  }
133
125
  /**
@@ -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.rgb(255, 165, 0)('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
+ };