centaurus-cli 2.0.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 (338) hide show
  1. package/AUTH_FLOW.md +138 -0
  2. package/CONFIG_GUIDE.md +255 -0
  3. package/LICENSE +21 -0
  4. package/README.md +346 -0
  5. package/dist/ai/provider-factory.d.ts +6 -0
  6. package/dist/ai/provider-factory.d.ts.map +1 -0
  7. package/dist/ai/provider-factory.js +27 -0
  8. package/dist/ai/provider-factory.js.map +1 -0
  9. package/dist/ai/providers/base.d.ts +25 -0
  10. package/dist/ai/providers/base.d.ts.map +1 -0
  11. package/dist/ai/providers/base.js +9 -0
  12. package/dist/ai/providers/base.js.map +1 -0
  13. package/dist/ai/providers/gemini.d.ts +34 -0
  14. package/dist/ai/providers/gemini.d.ts.map +1 -0
  15. package/dist/ai/providers/gemini.js +146 -0
  16. package/dist/ai/providers/gemini.js.map +1 -0
  17. package/dist/ai/types.d.ts +20 -0
  18. package/dist/ai/types.d.ts.map +1 -0
  19. package/dist/ai/types.js +2 -0
  20. package/dist/ai/types.js.map +1 -0
  21. package/dist/cli-adapter.d.ts +78 -0
  22. package/dist/cli-adapter.d.ts.map +1 -0
  23. package/dist/cli-adapter.js +605 -0
  24. package/dist/cli-adapter.js.map +1 -0
  25. package/dist/commands/CommandParser.d.ts +27 -0
  26. package/dist/commands/CommandParser.d.ts.map +1 -0
  27. package/dist/commands/CommandParser.js +238 -0
  28. package/dist/commands/CommandParser.js.map +1 -0
  29. package/dist/config/ConfigManager.d.ts +59 -0
  30. package/dist/config/ConfigManager.d.ts.map +1 -0
  31. package/dist/config/ConfigManager.js +332 -0
  32. package/dist/config/ConfigManager.js.map +1 -0
  33. package/dist/config/defaultConfig.d.ts +82 -0
  34. package/dist/config/defaultConfig.d.ts.map +1 -0
  35. package/dist/config/defaultConfig.js +88 -0
  36. package/dist/config/defaultConfig.js.map +1 -0
  37. package/dist/config/manager.d.ts +60 -0
  38. package/dist/config/manager.d.ts.map +1 -0
  39. package/dist/config/manager.js +162 -0
  40. package/dist/config/manager.js.map +1 -0
  41. package/dist/config/types.d.ts +9 -0
  42. package/dist/config/types.d.ts.map +1 -0
  43. package/dist/config/types.js +6 -0
  44. package/dist/config/types.js.map +1 -0
  45. package/dist/index-custom.d.ts +3 -0
  46. package/dist/index-custom.d.ts.map +1 -0
  47. package/dist/index-custom.js +65 -0
  48. package/dist/index-custom.js.map +1 -0
  49. package/dist/index.d.ts +3 -0
  50. package/dist/index.d.ts.map +1 -0
  51. package/dist/index.js +102 -0
  52. package/dist/index.js.map +1 -0
  53. package/dist/prompts/system-prompt.d.ts +47 -0
  54. package/dist/prompts/system-prompt.d.ts.map +1 -0
  55. package/dist/prompts/system-prompt.js +378 -0
  56. package/dist/prompts/system-prompt.js.map +1 -0
  57. package/dist/providers/GoogleProvider.d.ts +26 -0
  58. package/dist/providers/GoogleProvider.d.ts.map +1 -0
  59. package/dist/providers/GoogleProvider.js +313 -0
  60. package/dist/providers/GoogleProvider.js.map +1 -0
  61. package/dist/providers/Provider.d.ts +114 -0
  62. package/dist/providers/Provider.d.ts.map +1 -0
  63. package/dist/providers/Provider.js +44 -0
  64. package/dist/providers/Provider.js.map +1 -0
  65. package/dist/services/api-client.d.ts +282 -0
  66. package/dist/services/api-client.d.ts.map +1 -0
  67. package/dist/services/api-client.js +339 -0
  68. package/dist/services/api-client.js.map +1 -0
  69. package/dist/services/auth-handler.d.ts +30 -0
  70. package/dist/services/auth-handler.d.ts.map +1 -0
  71. package/dist/services/auth-handler.js +210 -0
  72. package/dist/services/auth-handler.js.map +1 -0
  73. package/dist/services/conversation-manager.d.ts +73 -0
  74. package/dist/services/conversation-manager.d.ts.map +1 -0
  75. package/dist/services/conversation-manager.js +128 -0
  76. package/dist/services/conversation-manager.js.map +1 -0
  77. package/dist/tests/automated-verification.d.ts +27 -0
  78. package/dist/tests/automated-verification.d.ts.map +1 -0
  79. package/dist/tests/automated-verification.js +359 -0
  80. package/dist/tests/automated-verification.js.map +1 -0
  81. package/dist/tests/integration-tests.d.ts +50 -0
  82. package/dist/tests/integration-tests.d.ts.map +1 -0
  83. package/dist/tests/integration-tests.js +648 -0
  84. package/dist/tests/integration-tests.js.map +1 -0
  85. package/dist/tools/ToolRegistry.d.ts +44 -0
  86. package/dist/tools/ToolRegistry.d.ts.map +1 -0
  87. package/dist/tools/ToolRegistry.js +494 -0
  88. package/dist/tools/ToolRegistry.js.map +1 -0
  89. package/dist/tools/command.d.ts +4 -0
  90. package/dist/tools/command.d.ts.map +1 -0
  91. package/dist/tools/command.js +117 -0
  92. package/dist/tools/command.js.map +1 -0
  93. package/dist/tools/file-ops-test.d.ts +6 -0
  94. package/dist/tools/file-ops-test.d.ts.map +1 -0
  95. package/dist/tools/file-ops-test.js +197 -0
  96. package/dist/tools/file-ops-test.js.map +1 -0
  97. package/dist/tools/file-ops.d.ts +6 -0
  98. package/dist/tools/file-ops.d.ts.map +1 -0
  99. package/dist/tools/file-ops.js +189 -0
  100. package/dist/tools/file-ops.js.map +1 -0
  101. package/dist/tools/plan-mode.d.ts +53 -0
  102. package/dist/tools/plan-mode.d.ts.map +1 -0
  103. package/dist/tools/plan-mode.js +202 -0
  104. package/dist/tools/plan-mode.js.map +1 -0
  105. package/dist/tools/registry.d.ts +30 -0
  106. package/dist/tools/registry.d.ts.map +1 -0
  107. package/dist/tools/registry.js +67 -0
  108. package/dist/tools/registry.js.map +1 -0
  109. package/dist/tools/types.d.ts +34 -0
  110. package/dist/tools/types.d.ts.map +1 -0
  111. package/dist/tools/types.js +2 -0
  112. package/dist/tools/types.js.map +1 -0
  113. package/dist/tools/web-search.d.ts +24 -0
  114. package/dist/tools/web-search.d.ts.map +1 -0
  115. package/dist/tools/web-search.js +194 -0
  116. package/dist/tools/web-search.js.map +1 -0
  117. package/dist/types/index.d.ts +32 -0
  118. package/dist/types/index.d.ts.map +1 -0
  119. package/dist/types/index.js +2 -0
  120. package/dist/types/index.js.map +1 -0
  121. package/dist/ui/DisplayHistory.d.ts +53 -0
  122. package/dist/ui/DisplayHistory.d.ts.map +1 -0
  123. package/dist/ui/DisplayHistory.js +82 -0
  124. package/dist/ui/DisplayHistory.js.map +1 -0
  125. package/dist/ui/clack-ui.d.ts +83 -0
  126. package/dist/ui/clack-ui.d.ts.map +1 -0
  127. package/dist/ui/clack-ui.js +304 -0
  128. package/dist/ui/clack-ui.js.map +1 -0
  129. package/dist/ui/components/App.d.ts +47 -0
  130. package/dist/ui/components/App.d.ts.map +1 -0
  131. package/dist/ui/components/App.js +389 -0
  132. package/dist/ui/components/App.js.map +1 -0
  133. package/dist/ui/components/AuthScreen.d.ts +8 -0
  134. package/dist/ui/components/AuthScreen.d.ts.map +1 -0
  135. package/dist/ui/components/AuthScreen.js +37 -0
  136. package/dist/ui/components/AuthScreen.js.map +1 -0
  137. package/dist/ui/components/AuthWelcomeScreen.d.ts +8 -0
  138. package/dist/ui/components/AuthWelcomeScreen.d.ts.map +1 -0
  139. package/dist/ui/components/AuthWelcomeScreen.js +34 -0
  140. package/dist/ui/components/AuthWelcomeScreen.js.map +1 -0
  141. package/dist/ui/components/CodeBlock.d.ts +9 -0
  142. package/dist/ui/components/CodeBlock.d.ts.map +1 -0
  143. package/dist/ui/components/CodeBlock.js +22 -0
  144. package/dist/ui/components/CodeBlock.js.map +1 -0
  145. package/dist/ui/components/ConfigViewer.d.ts +11 -0
  146. package/dist/ui/components/ConfigViewer.d.ts.map +1 -0
  147. package/dist/ui/components/ConfigViewer.js +27 -0
  148. package/dist/ui/components/ConfigViewer.js.map +1 -0
  149. package/dist/ui/components/ConfirmPrompt.d.ts +11 -0
  150. package/dist/ui/components/ConfirmPrompt.d.ts.map +1 -0
  151. package/dist/ui/components/ConfirmPrompt.js +55 -0
  152. package/dist/ui/components/ConfirmPrompt.js.map +1 -0
  153. package/dist/ui/components/DiffViewer.d.ts +8 -0
  154. package/dist/ui/components/DiffViewer.d.ts.map +1 -0
  155. package/dist/ui/components/DiffViewer.js +63 -0
  156. package/dist/ui/components/DiffViewer.js.map +1 -0
  157. package/dist/ui/components/DisplayItemRenderer.d.ts +18 -0
  158. package/dist/ui/components/DisplayItemRenderer.d.ts.map +1 -0
  159. package/dist/ui/components/DisplayItemRenderer.js +53 -0
  160. package/dist/ui/components/DisplayItemRenderer.js.map +1 -0
  161. package/dist/ui/components/DynamicMessage.d.ts +13 -0
  162. package/dist/ui/components/DynamicMessage.d.ts.map +1 -0
  163. package/dist/ui/components/DynamicMessage.js +27 -0
  164. package/dist/ui/components/DynamicMessage.js.map +1 -0
  165. package/dist/ui/components/ErrorBoundary.d.ts +16 -0
  166. package/dist/ui/components/ErrorBoundary.d.ts.map +1 -0
  167. package/dist/ui/components/ErrorBoundary.js +25 -0
  168. package/dist/ui/components/ErrorBoundary.js.map +1 -0
  169. package/dist/ui/components/FileOperation.d.ts +10 -0
  170. package/dist/ui/components/FileOperation.d.ts.map +1 -0
  171. package/dist/ui/components/FileOperation.js +31 -0
  172. package/dist/ui/components/FileOperation.js.map +1 -0
  173. package/dist/ui/components/InputBox.d.ts +12 -0
  174. package/dist/ui/components/InputBox.d.ts.map +1 -0
  175. package/dist/ui/components/InputBox.js +50 -0
  176. package/dist/ui/components/InputBox.js.map +1 -0
  177. package/dist/ui/components/KeyboardHelp.d.ts +7 -0
  178. package/dist/ui/components/KeyboardHelp.d.ts.map +1 -0
  179. package/dist/ui/components/KeyboardHelp.js +25 -0
  180. package/dist/ui/components/KeyboardHelp.js.map +1 -0
  181. package/dist/ui/components/LoadingIndicator.d.ts +3 -0
  182. package/dist/ui/components/LoadingIndicator.d.ts.map +1 -0
  183. package/dist/ui/components/LoadingIndicator.js +25 -0
  184. package/dist/ui/components/LoadingIndicator.js.map +1 -0
  185. package/dist/ui/components/MarkdownRenderer.d.ts +8 -0
  186. package/dist/ui/components/MarkdownRenderer.d.ts.map +1 -0
  187. package/dist/ui/components/MarkdownRenderer.js +96 -0
  188. package/dist/ui/components/MarkdownRenderer.js.map +1 -0
  189. package/dist/ui/components/MessageBox.d.ts +10 -0
  190. package/dist/ui/components/MessageBox.d.ts.map +1 -0
  191. package/dist/ui/components/MessageBox.js +50 -0
  192. package/dist/ui/components/MessageBox.js.map +1 -0
  193. package/dist/ui/components/MessageDisplay.d.ts +8 -0
  194. package/dist/ui/components/MessageDisplay.d.ts.map +1 -0
  195. package/dist/ui/components/MessageDisplay.js +43 -0
  196. package/dist/ui/components/MessageDisplay.js.map +1 -0
  197. package/dist/ui/components/ScrollableContent.d.ts +7 -0
  198. package/dist/ui/components/ScrollableContent.d.ts.map +1 -0
  199. package/dist/ui/components/ScrollableContent.js +6 -0
  200. package/dist/ui/components/ScrollableContent.js.map +1 -0
  201. package/dist/ui/components/ScrollableMessageList.d.ts +10 -0
  202. package/dist/ui/components/ScrollableMessageList.d.ts.map +1 -0
  203. package/dist/ui/components/ScrollableMessageList.js +133 -0
  204. package/dist/ui/components/ScrollableMessageList.js.map +1 -0
  205. package/dist/ui/components/ScrollableScreen.d.ts +9 -0
  206. package/dist/ui/components/ScrollableScreen.d.ts.map +1 -0
  207. package/dist/ui/components/ScrollableScreen.js +22 -0
  208. package/dist/ui/components/ScrollableScreen.js.map +1 -0
  209. package/dist/ui/components/SelectPrompt.d.ts +12 -0
  210. package/dist/ui/components/SelectPrompt.d.ts.map +1 -0
  211. package/dist/ui/components/SelectPrompt.js +10 -0
  212. package/dist/ui/components/SelectPrompt.js.map +1 -0
  213. package/dist/ui/components/StaticMessageHistory.d.ts +14 -0
  214. package/dist/ui/components/StaticMessageHistory.d.ts.map +1 -0
  215. package/dist/ui/components/StaticMessageHistory.js +19 -0
  216. package/dist/ui/components/StaticMessageHistory.js.map +1 -0
  217. package/dist/ui/components/StatusBar.d.ts +10 -0
  218. package/dist/ui/components/StatusBar.d.ts.map +1 -0
  219. package/dist/ui/components/StatusBar.js +20 -0
  220. package/dist/ui/components/StatusBar.js.map +1 -0
  221. package/dist/ui/components/StreamingMessageDisplay.d.ts +13 -0
  222. package/dist/ui/components/StreamingMessageDisplay.d.ts.map +1 -0
  223. package/dist/ui/components/StreamingMessageDisplay.js +26 -0
  224. package/dist/ui/components/StreamingMessageDisplay.js.map +1 -0
  225. package/dist/ui/components/ToolExecutionMessage.d.ts +8 -0
  226. package/dist/ui/components/ToolExecutionMessage.d.ts.map +1 -0
  227. package/dist/ui/components/ToolExecutionMessage.js +189 -0
  228. package/dist/ui/components/ToolExecutionMessage.js.map +1 -0
  229. package/dist/ui/components/ToolExecutionStatus.d.ts +10 -0
  230. package/dist/ui/components/ToolExecutionStatus.d.ts.map +1 -0
  231. package/dist/ui/components/ToolExecutionStatus.js +65 -0
  232. package/dist/ui/components/ToolExecutionStatus.js.map +1 -0
  233. package/dist/ui/components/ToolResult.d.ts +10 -0
  234. package/dist/ui/components/ToolResult.d.ts.map +1 -0
  235. package/dist/ui/components/ToolResult.js +17 -0
  236. package/dist/ui/components/ToolResult.js.map +1 -0
  237. package/dist/ui/components/WelcomeBanner.d.ts +3 -0
  238. package/dist/ui/components/WelcomeBanner.d.ts.map +1 -0
  239. package/dist/ui/components/WelcomeBanner.js +28 -0
  240. package/dist/ui/components/WelcomeBanner.js.map +1 -0
  241. package/dist/ui/components/code-block.d.ts +10 -0
  242. package/dist/ui/components/code-block.d.ts.map +1 -0
  243. package/dist/ui/components/code-block.js +74 -0
  244. package/dist/ui/components/code-block.js.map +1 -0
  245. package/dist/ui/components/confirm-prompt.d.ts +12 -0
  246. package/dist/ui/components/confirm-prompt.d.ts.map +1 -0
  247. package/dist/ui/components/confirm-prompt.js +104 -0
  248. package/dist/ui/components/confirm-prompt.js.map +1 -0
  249. package/dist/ui/components/diff-viewer.d.ts +9 -0
  250. package/dist/ui/components/diff-viewer.d.ts.map +1 -0
  251. package/dist/ui/components/diff-viewer.js +57 -0
  252. package/dist/ui/components/diff-viewer.js.map +1 -0
  253. package/dist/ui/components/input-box.d.ts +18 -0
  254. package/dist/ui/components/input-box.d.ts.map +1 -0
  255. package/dist/ui/components/input-box.js +157 -0
  256. package/dist/ui/components/input-box.js.map +1 -0
  257. package/dist/ui/components/keyboard-help.d.ts +7 -0
  258. package/dist/ui/components/keyboard-help.d.ts.map +1 -0
  259. package/dist/ui/components/keyboard-help.js +43 -0
  260. package/dist/ui/components/keyboard-help.js.map +1 -0
  261. package/dist/ui/components/loading-indicator.d.ts +3 -0
  262. package/dist/ui/components/loading-indicator.d.ts.map +1 -0
  263. package/dist/ui/components/loading-indicator.js +42 -0
  264. package/dist/ui/components/loading-indicator.js.map +1 -0
  265. package/dist/ui/components/message-display.d.ts +7 -0
  266. package/dist/ui/components/message-display.d.ts.map +1 -0
  267. package/dist/ui/components/message-display.js +104 -0
  268. package/dist/ui/components/message-display.js.map +1 -0
  269. package/dist/ui/components/misc.d.ts +28 -0
  270. package/dist/ui/components/misc.d.ts.map +1 -0
  271. package/dist/ui/components/misc.js +128 -0
  272. package/dist/ui/components/misc.js.map +1 -0
  273. package/dist/ui/components/select-prompt.d.ts +13 -0
  274. package/dist/ui/components/select-prompt.d.ts.map +1 -0
  275. package/dist/ui/components/select-prompt.js +42 -0
  276. package/dist/ui/components/select-prompt.js.map +1 -0
  277. package/dist/ui/components/status-bar.d.ts +11 -0
  278. package/dist/ui/components/status-bar.d.ts.map +1 -0
  279. package/dist/ui/components/status-bar.js +47 -0
  280. package/dist/ui/components/status-bar.js.map +1 -0
  281. package/dist/ui/components/tool-execution.d.ts +3 -0
  282. package/dist/ui/components/tool-execution.d.ts.map +1 -0
  283. package/dist/ui/components/tool-execution.js +374 -0
  284. package/dist/ui/components/tool-execution.js.map +1 -0
  285. package/dist/ui/components/tool-result.d.ts +11 -0
  286. package/dist/ui/components/tool-result.d.ts.map +1 -0
  287. package/dist/ui/components/tool-result.js +58 -0
  288. package/dist/ui/components/tool-result.js.map +1 -0
  289. package/dist/ui/components/welcome-banner.d.ts +3 -0
  290. package/dist/ui/components/welcome-banner.d.ts.map +1 -0
  291. package/dist/ui/components/welcome-banner.js +46 -0
  292. package/dist/ui/components/welcome-banner.js.map +1 -0
  293. package/dist/ui/hooks/useDisplayHistory.d.ts +13 -0
  294. package/dist/ui/hooks/useDisplayHistory.d.ts.map +1 -0
  295. package/dist/ui/hooks/useDisplayHistory.js +45 -0
  296. package/dist/ui/hooks/useDisplayHistory.js.map +1 -0
  297. package/dist/ui/render-engine.d.ts +69 -0
  298. package/dist/ui/render-engine.d.ts.map +1 -0
  299. package/dist/ui/render-engine.js +197 -0
  300. package/dist/ui/render-engine.js.map +1 -0
  301. package/dist/ui/terminal/TerminalRenderer.d.ts +84 -0
  302. package/dist/ui/terminal/TerminalRenderer.d.ts.map +1 -0
  303. package/dist/ui/terminal/TerminalRenderer.js +154 -0
  304. package/dist/ui/terminal/TerminalRenderer.js.map +1 -0
  305. package/dist/ui/terminal/TerminalUI.d.ts +139 -0
  306. package/dist/ui/terminal/TerminalUI.d.ts.map +1 -0
  307. package/dist/ui/terminal/TerminalUI.js +430 -0
  308. package/dist/ui/terminal/TerminalUI.js.map +1 -0
  309. package/dist/ui/terminal/VirtualChatBuffer.d.ts +32 -0
  310. package/dist/ui/terminal/VirtualChatBuffer.d.ts.map +1 -0
  311. package/dist/ui/terminal/VirtualChatBuffer.js +37 -0
  312. package/dist/ui/terminal/VirtualChatBuffer.js.map +1 -0
  313. package/dist/ui/terminal-kit-base.d.ts +117 -0
  314. package/dist/ui/terminal-kit-base.d.ts.map +1 -0
  315. package/dist/ui/terminal-kit-base.js +188 -0
  316. package/dist/ui/terminal-kit-base.js.map +1 -0
  317. package/dist/utils/file.d.ts +21 -0
  318. package/dist/utils/file.d.ts.map +1 -0
  319. package/dist/utils/file.js +68 -0
  320. package/dist/utils/file.js.map +1 -0
  321. package/dist/utils/logger.d.ts +17 -0
  322. package/dist/utils/logger.d.ts.map +1 -0
  323. package/dist/utils/logger.js +57 -0
  324. package/dist/utils/logger.js.map +1 -0
  325. package/dist/utils/markdown-parser.d.ts +56 -0
  326. package/dist/utils/markdown-parser.d.ts.map +1 -0
  327. package/dist/utils/markdown-parser.js +307 -0
  328. package/dist/utils/markdown-parser.js.map +1 -0
  329. package/dist/utils/shell.d.ts +7 -0
  330. package/dist/utils/shell.d.ts.map +1 -0
  331. package/dist/utils/shell.js +62 -0
  332. package/dist/utils/shell.js.map +1 -0
  333. package/dist/utils/state.d.ts +13 -0
  334. package/dist/utils/state.d.ts.map +1 -0
  335. package/dist/utils/state.js +25 -0
  336. package/dist/utils/state.js.map +1 -0
  337. package/package.json +81 -0
  338. package/postinstall.js +46 -0
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { Box, Text } from 'ink';
3
+ import { MarkdownRenderer } from './MarkdownRenderer.js';
4
+ export const StreamingMessageDisplay = React.memo(({ message }) => {
5
+ const timestamp = message.timestamp
6
+ ? new Date(message.timestamp).toLocaleTimeString()
7
+ : '';
8
+ return (React.createElement(Box, { flexDirection: "column", marginBottom: 1 },
9
+ React.createElement(Box, { marginBottom: 1 },
10
+ React.createElement(Text, { color: "#00cc66", bold: true }, "Centaurus:"),
11
+ timestamp && (React.createElement(Text, { color: "#666666", dimColor: true },
12
+ " ",
13
+ timestamp))),
14
+ message.content && (React.createElement(MarkdownRenderer, { content: message.content, maxWidth: 100 })),
15
+ React.createElement(Box, { paddingLeft: 2 },
16
+ React.createElement(Text, { color: "#00ccff" }, "\u258A"))));
17
+ }, (prevProps, nextProps) => {
18
+ // Return true if props are equal (skip re-render), false if different (re-render)
19
+ // For streaming messages, we need to re-render when content changes
20
+ if (prevProps.message.id !== nextProps.message.id)
21
+ return false;
22
+ if (prevProps.message.content !== nextProps.message.content)
23
+ return false;
24
+ return true;
25
+ });
26
+ //# sourceMappingURL=StreamingMessageDisplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StreamingMessageDisplay.js","sourceRoot":"","sources":["../../../src/ui/components/StreamingMessageDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK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'../../types/index.js';
3
+ interface ToolExecutionMessageProps {
4
+ message: Message;
5
+ }
6
+ export declare const ToolExecutionMessage: React.FC<ToolExecutionMessageProps>;
7
+ export {};
8
+ //# sourceMappingURL=ToolExecutionMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolExecutionMessage.d.ts","sourceRoot":"","sources":["../../../src/ui/components/ToolExecutionMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAC;CAClB;AAaD,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA8MnE,CAAC"}
@@ -0,0 +1,189 @@
1
+ import React from 'react';
2
+ import { Box, Text } from 'ink';
3
+ const TOOL_LABELS = {
4
+ read_file: { verb: 'Reading file', emoji: '📖' },
5
+ write_file: { verb: 'Writing file', emoji: '✍️' },
6
+ edit_file: { verb: 'Editing file', emoji: '✏️' },
7
+ list_directory: { verb: 'Listing directory', emoji: '📁' },
8
+ execute_command: { verb: 'Executing command', emoji: '⚡' },
9
+ grep_search: { verb: 'Searching files', emoji: '🔍' },
10
+ web_search: { verb: 'Searching web', emoji: '🌐' },
11
+ fetch_url: { verb: 'Fetching URL', emoji: '📡' },
12
+ };
13
+ export const ToolExecutionMessage = React.memo(({ message }) => {
14
+ if (!message.toolExecution) {
15
+ return null;
16
+ }
17
+ const { toolName, status, result, error, arguments: toolArgs } = message.toolExecution;
18
+ const toolInfo = TOOL_LABELS[toolName] || { verb: 'Executing', emoji: '🔧' };
19
+ // EXECUTING state
20
+ if (status === 'executing') {
21
+ return (React.createElement(Box, { flexDirection: "column", borderStyle: "round", borderColor: "#003b59", paddingX: 1, marginY: 1 },
22
+ React.createElement(Box, null,
23
+ React.createElement(Text, { color: "#00ccff", bold: true },
24
+ "\u23F3 ",
25
+ toolInfo.emoji,
26
+ " ",
27
+ toolInfo.verb,
28
+ "..."))));
29
+ }
30
+ // ERROR state
31
+ if (status === 'error') {
32
+ return (React.createElement(Box, { flexDirection: "column", borderStyle: "round", borderColor: "#ff3366", paddingX: 1, marginY: 1 },
33
+ React.createElement(Box, { marginBottom: 1 },
34
+ React.createElement(Text, { color: "#ff3366", bold: true },
35
+ "\u2717 ",
36
+ toolInfo.emoji,
37
+ " ",
38
+ toolInfo.verb,
39
+ " failed")),
40
+ error && (React.createElement(Box, { paddingLeft: 2 },
41
+ React.createElement(Text, { color: "#ff3366" },
42
+ error.slice(0, 500),
43
+ error.length > 500 ? '...' : '')))));
44
+ }
45
+ // COMPLETED state - tool-specific rendering
46
+ if (status === 'completed') {
47
+ // READ_FILE
48
+ if (toolName === 'read_file' && toolArgs) {
49
+ const { file_path, start_line, end_line } = toolArgs;
50
+ const lineInfo = start_line && end_line
51
+ ? `lines ${start_line}-${end_line}`
52
+ : 'entire file';
53
+ return (React.createElement(Box, { flexDirection: "column", borderStyle: "round", borderColor: "#00ccff", paddingX: 1, marginY: 1 },
54
+ React.createElement(Box, null,
55
+ React.createElement(Text, { color: "#00cc66", bold: true },
56
+ "\u2713 ",
57
+ toolInfo.emoji,
58
+ " Read ",
59
+ lineInfo,
60
+ " from "),
61
+ React.createElement(Text, { color: "#00ccff" }, file_path))));
62
+ }
63
+ // EXECUTE_COMMAND
64
+ if (toolName === 'execute_command' && toolArgs) {
65
+ const { command } = toolArgs;
66
+ return (React.createElement(Box, { flexDirection: "column", borderStyle: "round", borderColor: "#00cc66", paddingX: 1, marginY: 1 },
67
+ React.createElement(Box, { marginBottom: 1 },
68
+ React.createElement(Text, { color: "#00cc66", bold: true },
69
+ "\u2713 ",
70
+ toolInfo.emoji,
71
+ " "),
72
+ React.createElement(Text, { color: "#00ccff" }, command)),
73
+ result && (React.createElement(Box, { flexDirection: "column", paddingLeft: 2, paddingY: 1, borderStyle: "single", borderColor: "#666666" },
74
+ React.createElement(Text, { color: "#aaaaaa" },
75
+ result.slice(0, 1000),
76
+ result.length > 1000 ? '\n...(truncated)' : '')))));
77
+ }
78
+ // WRITE_FILE
79
+ if (toolName === 'write_file' && toolArgs) {
80
+ const { file_path, content } = toolArgs;
81
+ const lines = content ? content.split('\n').length : 0;
82
+ return (React.createElement(Box, { flexDirection: "column", borderStyle: "round", borderColor: "#00ccff", paddingX: 1, marginY: 1 },
83
+ React.createElement(Box, { marginBottom: 1 },
84
+ React.createElement(Text, { color: "#00cc66", bold: true },
85
+ "\u2713 ",
86
+ toolInfo.emoji,
87
+ " Wrote to "),
88
+ React.createElement(Text, { color: "#00ccff" }, file_path),
89
+ React.createElement(Text, { color: "#666666" },
90
+ " (",
91
+ lines,
92
+ " lines)")),
93
+ content && content.length < 500 && (React.createElement(Box, { flexDirection: "column", paddingLeft: 2, paddingY: 1, borderStyle: "single", borderColor: "#666666" },
94
+ React.createElement(Text, { color: "#aaaaaa" }, content)))));
95
+ }
96
+ // EDIT_FILE
97
+ if (toolName === 'edit_file' && toolArgs) {
98
+ const { file_path, search_pattern, replacement } = toolArgs;
99
+ return (React.createElement(Box, { flexDirection: "column", borderStyle: "round", borderColor: "#00ccff", paddingX: 1, marginY: 1 },
100
+ React.createElement(Box, { marginBottom: 1 },
101
+ React.createElement(Text, { color: "#00cc66", bold: true },
102
+ "\u2713 ",
103
+ toolInfo.emoji,
104
+ " Edited "),
105
+ React.createElement(Text, { color: "#00ccff" }, file_path)),
106
+ search_pattern && replacement && (React.createElement(Box, { flexDirection: "column", paddingLeft: 2, paddingY: 1, borderStyle: "single", borderColor: "#666666" },
107
+ React.createElement(Text, { color: "#ff6666" },
108
+ "- ",
109
+ search_pattern.split('\n')[0],
110
+ search_pattern.includes('\n') ? '...' : ''),
111
+ React.createElement(Text, { color: "#66ff66" },
112
+ "+ ",
113
+ replacement.split('\n')[0],
114
+ replacement.includes('\n') ? '...' : '')))));
115
+ }
116
+ // LIST_DIRECTORY
117
+ if (toolName === 'list_directory' && toolArgs) {
118
+ const { directory_path } = toolArgs;
119
+ return (React.createElement(Box, { flexDirection: "column", borderStyle: "round", borderColor: "#00ccff", paddingX: 1, marginY: 1 },
120
+ React.createElement(Box, null,
121
+ React.createElement(Text, { color: "#00cc66", bold: true },
122
+ "\u2713 ",
123
+ toolInfo.emoji,
124
+ " Listed "),
125
+ React.createElement(Text, { color: "#00ccff" }, directory_path)),
126
+ result && result.length < 300 && (React.createElement(Box, { paddingLeft: 2, paddingTop: 1 },
127
+ React.createElement(Text, { color: "#aaaaaa" }, result)))));
128
+ }
129
+ // GREP_SEARCH
130
+ if (toolName === 'grep_search' && toolArgs) {
131
+ const { pattern } = toolArgs;
132
+ return (React.createElement(Box, { flexDirection: "column", borderStyle: "round", borderColor: "#00ccff", paddingX: 1, marginY: 1 },
133
+ React.createElement(Box, null,
134
+ React.createElement(Text, { color: "#00cc66", bold: true },
135
+ "\u2713 ",
136
+ toolInfo.emoji,
137
+ " Searched for "),
138
+ React.createElement(Text, { color: "#00ccff" },
139
+ "\"",
140
+ pattern,
141
+ "\"")),
142
+ result && result.length < 400 && (React.createElement(Box, { paddingLeft: 2, paddingTop: 1 },
143
+ React.createElement(Text, { color: "#aaaaaa" }, result)))));
144
+ }
145
+ // WEB_SEARCH
146
+ if (toolName === 'web_search' && toolArgs) {
147
+ const { query } = toolArgs;
148
+ return (React.createElement(Box, { flexDirection: "column", borderStyle: "round", borderColor: "#00ccff", paddingX: 1, marginY: 1 },
149
+ React.createElement(Box, null,
150
+ React.createElement(Text, { color: "#00cc66", bold: true },
151
+ "\u2713 ",
152
+ toolInfo.emoji,
153
+ " Executing"))));
154
+ }
155
+ // FETCH_URL
156
+ if (toolName === 'fetch_url' && toolArgs) {
157
+ const { url } = toolArgs;
158
+ return (React.createElement(Box, { flexDirection: "column", borderStyle: "round", borderColor: "#00ccff", paddingX: 1, marginY: 1 },
159
+ React.createElement(Box, null,
160
+ React.createElement(Text, { color: "#00cc66", bold: true },
161
+ "\u2713 ",
162
+ toolInfo.emoji,
163
+ " Fetched "),
164
+ React.createElement(Text, { color: "#00ccff" }, url))));
165
+ }
166
+ // DEFAULT - for any other tool
167
+ return (React.createElement(Box, { flexDirection: "column", borderStyle: "round", borderColor: "#00ccff", paddingX: 1, marginY: 1 },
168
+ React.createElement(Box, { marginBottom: 1 },
169
+ React.createElement(Text, { color: "#00cc66", bold: true },
170
+ "\u2713 ",
171
+ toolInfo.emoji,
172
+ " ",
173
+ toolInfo.verb)),
174
+ result && result.length < 300 && (React.createElement(Box, { paddingLeft: 2 },
175
+ React.createElement(Text, { color: "#aaaaaa" }, result)))));
176
+ }
177
+ return null;
178
+ }, (prevProps, nextProps) => {
179
+ // Only re-render if the status or key fields changed
180
+ const prevExec = prevProps.message.toolExecution;
181
+ const nextExec = nextProps.message.toolExecution;
182
+ if (!prevExec || !nextExec)
183
+ return false;
184
+ return prevExec.status === nextExec.status &&
185
+ prevExec.toolName === nextExec.toolName &&
186
+ prevExec.result === nextExec.result &&
187
+ prevExec.error === nextExec.error;
188
+ });
189
+ //# sourceMappingURL=ToolExecutionMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolExecutionMessage.js","sourceRoot":"","sources":["../../../src/ui/components/ToolExecutionMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAQhC,MAAM,WAAW,GAAoD;IACnE,SAAS,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,IAAI,EAAE;IAChD,UAAU,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,IAAI,EAAE;IACjD,SAAS,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,IAAI,EAAE;IAChD,cAAc,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,IAAI,EAAE;IAC1D,eAAe,EAAE,EAAE,IAAI,E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AAQ,CAAC,QAAQ;QACvC,QAAQ,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM;QACnC,QAAQ,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAC3C,CAAC,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface ToolExecutionStatusProps {
3
+ toolName: string;
4
+ status: 'pending' | 'executing' | 'success' | 'error';
5
+ result?: string;
6
+ error?: string;
7
+ }
8
+ export declare const ToolExecutionStatus: React.FC<ToolExecutionStatusProps>;
9
+ export {};
10
+ //# sourceMappingURL=ToolExecutionStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolExecutionStatus.d.ts","sourceRoot":"","sources":["../../../src/ui/components/ToolExecutionStatus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,UAAU,wBAAwB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAWD,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAgEjE,CAAC"}
@@ -0,0 +1,65 @@
1
+ import React from 'react';
2
+ import { Box, Text } from 'ink';
3
+ import Spinner from 'ink-spinner';
4
+ const TOOL_LABELS = {
5
+ read_file: { verb: 'Reading file', emoji: '📖' },
6
+ write_file: { verb: 'Writing file', emoji: '✍️' },
7
+ edit_file: { verb: 'Editing file', emoji: '✏️' },
8
+ list_directory: { verb: 'Listing directory', emoji: '📁' },
9
+ execute_command: { verb: 'Executing command', emoji: '⚡' },
10
+ grep_search: { verb: 'Searching files', emoji: '🔍' },
11
+ };
12
+ export const ToolExecutionStatus = React.memo(({ toolName, status, result, error, }) => {
13
+ const toolInfo = TOOL_LABELS[toolName] || { verb: 'Executing', emoji: '🔧' };
14
+ if (status === 'pending') {
15
+ return (React.createElement(Box, null,
16
+ React.createElement(Text, { color: "#666666", dimColor: true },
17
+ "\u23F3 ",
18
+ toolInfo.verb,
19
+ "...")));
20
+ }
21
+ if (status === 'executing') {
22
+ return (React.createElement(Box, null,
23
+ React.createElement(Text, { color: "#00ccff" },
24
+ React.createElement(Spinner, { type: "dots" })),
25
+ React.createElement(Text, { color: "#00ccff", bold: true },
26
+ " ",
27
+ toolInfo.emoji,
28
+ " ",
29
+ toolInfo.verb,
30
+ "...")));
31
+ }
32
+ if (status === 'success') {
33
+ return (React.createElement(Box, { flexDirection: "column" },
34
+ React.createElement(Box, null,
35
+ React.createElement(Text, { color: "#00cc66", bold: true },
36
+ "\u2713 ",
37
+ toolInfo.emoji,
38
+ " ",
39
+ toolInfo.verb)),
40
+ result && result.length < 300 && (React.createElement(Box, { marginLeft: 2 },
41
+ React.createElement(Text, { color: "#666666" }, result)))));
42
+ }
43
+ if (status === 'error') {
44
+ return (React.createElement(Box, { flexDirection: "column" },
45
+ React.createElement(Box, null,
46
+ React.createElement(Text, { color: "#ff3366", bold: true },
47
+ "\u2717 ",
48
+ toolInfo.emoji,
49
+ " ",
50
+ toolInfo.verb,
51
+ " failed")),
52
+ error && (React.createElement(Box, { marginLeft: 2 },
53
+ React.createElement(Text, { color: "#ff3366" },
54
+ error.slice(0, 200),
55
+ error.length > 200 ? '...' : '')))));
56
+ }
57
+ return null;
58
+ }, (prevProps, nextProps) => {
59
+ // Only re-render if props actually changed
60
+ return prevProps.toolName === nextProps.toolName &&
61
+ prevProps.status === nextProps.status &&
62
+ prevProps.result === nextProps.result &&
63
+ prevProps.error === nextProps.error;
64
+ });
65
+ //# sourceMappingURL=ToolExecutionStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolExecutionStatus.js","sourceRoot":"","sources":["../../../src/ui/components/ToolExecutionStatus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC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CAAC,MAAM,KAAK,SAAS,CAAC,MAAM;QACrC,SAAS,CAAC,MAAM,KAAK,SAAS,CAAC,MAAM;QACrC,SAAS,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,CAAC;AAC7C,CAAC,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface ToolResultProps {
3
+ toolName: string;
4
+ result: string;
5
+ success: boolean;
6
+ duration?: number;
7
+ }
8
+ export declare const ToolResult: React.FC<ToolResultProps>;
9
+ export {};
10
+ //# sourceMappingURL=ToolResult.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolResult.d.ts","sourceRoot":"","sources":["../../../src/ui/components/ToolResult.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,eAAe;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA2BhD,CAAC"}
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { Box, Text } from 'ink';
3
+ export const ToolResult = ({ toolName, result, success, duration }) => {
4
+ return (React.createElement(Box, { flexDirection: "column", borderStyle: "round", borderColor: success ? '#00cc66' : '#ff3366', paddingX: 1 },
5
+ React.createElement(Box, { marginBottom: 1 },
6
+ React.createElement(Text, { color: success ? '#00cc66' : '#ff3366', bold: true },
7
+ success ? '✓' : '✗',
8
+ " ",
9
+ toolName),
10
+ duration && (React.createElement(Text, { color: "#666666" },
11
+ " (",
12
+ duration,
13
+ "ms)"))),
14
+ React.createElement(Box, null,
15
+ React.createElement(Text, { color: "#ffffff" }, result))));
16
+ };
17
+ //# sourceMappingURL=ToolResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolResult.js","sourceRoot":"","sources":["../../../src/ui/components/ToolResult.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAShC,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,MAAM,EACN,OAAO,EACP,QAAQ,EACT,EAAE,EAAE;IACH,OAAO,CACL,oBAAC,GAAG,IACF,aAAa,EAAC,QAAQ,EACtB,WAAW,EAAC,OAAO,EACnB,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAC5C,QAAQ,EAAE,CAAC;QAEX,oBAAC,GAAG,IAAC,YAAY,EAAE,CAAC;YAClB,oBAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,IAAI;gBAC/C,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;;gBAAG,QAAQ,CAC1B;YACN,QAAQ,IAAI,CACX,oBAAC,IAAI,IAAC,KAAK,EAAC,SAAS;;gBAAI,QAAQ;sBAAW,CAC7C,CACG;QAEN,oBAAC,GAAG;YACF,oBAAC,IAAI,IAAC,KAAK,EAAC,SAAS,IAAE,MAAM,CAAQ,CACjC,CACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const WelcomeBanner: React.FC;
3
+ //# sourceMappingURL=WelcomeBanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WelcomeBanner.d.ts","sourceRoot":"","sources":["../../../src/ui/components/WelcomeBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAiChC,CAAC"}
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { Box, Text } from 'ink';
3
+ export const WelcomeBanner = React.memo(() => {
4
+ // Clearer ASCII art that properly spells CENTAURUS CLI
5
+ const lines = [
6
+ ' ██████╗███████╗███╗ ██╗████████╗ █████╗ ██╗ ██╗██████╗ ██╗ ██╗███████╗',
7
+ '██╔════╝██╔════╝████╗ ██║╚══██╔══╝██╔══██╗██║ ██║██╔══██╗██║ ██║██╔════╝',
8
+ '██║ █████╗ ██╔██╗ ██║ ██║ ███████║██║ ██║██████╔╝██║ ██║███████╗',
9
+ '██║ ██╔══╝ ██║╚██╗██║ ██║ ██╔══██║██║ ██║██╔══██╗██║ ██║╚════██║',
10
+ '╚██████╗███████╗██║ ╚████║ ██║ ██║ ██║╚██████╔╝██║ ██║╚██████╔╝███████║',
11
+ ' ╚═════╝╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝',
12
+ '',
13
+ ' ██████╗██╗ ██╗',
14
+ ' ██╔════╝██║ ██║',
15
+ ' ██║ ██║ ██║',
16
+ ' ██║ ██║ ██║',
17
+ ' ╚██████╗███████╗██║',
18
+ ' ╚═════╝╚══════╝╚═╝'
19
+ ];
20
+ return (React.createElement(Box, { flexDirection: "column", marginBottom: 1 },
21
+ React.createElement(Box, { flexDirection: "column" }, lines.map((line, i) => (React.createElement(Text, { key: i, color: "#00ccff" }, line)))),
22
+ React.createElement(Box, { marginTop: 1 },
23
+ React.createElement(Text, { dimColor: true },
24
+ "Type ",
25
+ React.createElement(Text, { color: "#00ccff" }, "/help"),
26
+ " for commands"))));
27
+ });
28
+ //# sourceMappingURL=WelcomeBanner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WelcomeBanner.js","sourceRoot":"","sources":["../../../src/ui/components/WelcomeBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAGhC,MAAM,CAAC,MAAM,aAAa,GAAa,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;IACrD,uDAAuD;IACvD,MAAM,KAAK,GAAG;QACZ,+EAA+E;QAC/E,+EAA+E;QAC/E,+EAA+E;QAC/E,+EAA+E;QAC/E,+EAA+E;QAC/E,+EAA+E;QAC/E,EAAE;QACF,yCAAyC;QACzC,yCAAyC;QACzC,yCAAyC;QACzC,yCAAyC;QACzC,yCAAyC;QACzC,yCAAyC;KAC1C,CAAC;IAEF,OAAO,CACL,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,YAAY,EAAE,CAAC;QAEzC,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,IACxB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CACtB,oBAAC,IAAI,IAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAC,SAAS,IAAE,IAAI,CAAQ,CAC5C,CAAC,CACE;QAGN,oBAAC,GAAG,IAAC,SAAS,EAAE,CAAC;YACf,oBAAC,IAAI,IAAC,QAAQ;;gBAAM,oBAAC,IAAI,IAAC,KAAK,EAAC,SAAS,YAAa;gCAAoB,CACtE,CACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ export interface CodeBlockOptions {
2
+ x: number;
3
+ y: number;
4
+ width: number;
5
+ code: string;
6
+ language?: string;
7
+ title?: string;
8
+ }
9
+ export declare function renderCodeBlock(options: CodeBlockOptions): number;
10
+ //# sourceMappingURL=code-block.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-block.d.ts","sourceRoot":"","sources":["../../../src/ui/components/code-block.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAKD,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAoFjE"}
@@ -0,0 +1,74 @@
1
+ import { screenBuffer, createColorAttr, colors, drawBox, truncate } from '../terminal-kit-base.js';
2
+ // Render a code block with line numbers
3
+ // Format: LineNum │ Code
4
+ // Max 20 lines, truncated with message
5
+ export function renderCodeBlock(options) {
6
+ const { x, y, width, code, language = 'text', title } = options;
7
+ const lines = code.split('\n');
8
+ const MAX_LINES = 20;
9
+ const truncated = lines.length > MAX_LINES;
10
+ const displayLines = truncated ? lines.slice(0, MAX_LINES) : lines;
11
+ // Calculate height
12
+ let height = 3; // Border + title + border
13
+ height += displayLines.length; // Code lines
14
+ if (truncated)
15
+ height += 1; // Truncation message
16
+ // Draw rounded border with dark blue color
17
+ drawBox({
18
+ x,
19
+ y,
20
+ width,
21
+ height,
22
+ borderStyle: 'rounded',
23
+ borderColor: colors.border, // #003b59
24
+ });
25
+ let currentY = y + 1;
26
+ // Title with icon if provided
27
+ if (title) {
28
+ const titleAttr = createColorAttr(colors.primary, true); // Cyan, bold
29
+ const langAttr = createColorAttr(colors.dimmed); // Gray
30
+ let titleText = `📄 ${title}`;
31
+ if (language) {
32
+ titleText += ` `;
33
+ }
34
+ screenBuffer.put({ x: x + 2, y: currentY, attr: titleAttr }, titleText);
35
+ if (language) {
36
+ screenBuffer.put({
37
+ x: x + 2 + titleText.length,
38
+ y: currentY,
39
+ attr: langAttr
40
+ }, `(${language})`);
41
+ }
42
+ currentY += 2; // Title + empty line
43
+ }
44
+ // Render code lines with line numbers
45
+ const lineNumAttr = createColorAttr(colors.dimmed); // Gray
46
+ const codeAttr = createColorAttr(colors.text); // White
47
+ const maxLineNumWidth = 3; // Pad to 3 chars
48
+ for (let i = 0; i < displayLines.length; i++) {
49
+ const lineNum = (i + 1).toString().padStart(maxLineNumWidth, ' ');
50
+ const line = displayLines[i];
51
+ // Line number
52
+ screenBuffer.put({ x: x + 2, y: currentY, attr: lineNumAttr }, lineNum + ' │ ');
53
+ // Code (truncate if too long for width)
54
+ const codeWidth = width - 2 - maxLineNumWidth - 5; // Border + line num + separator + padding
55
+ const truncatedLine = truncate(line, codeWidth);
56
+ screenBuffer.put({
57
+ x: x + 2 + maxLineNumWidth + 3,
58
+ y: currentY,
59
+ attr: codeAttr
60
+ }, truncatedLine);
61
+ currentY++;
62
+ }
63
+ // Truncation message if needed
64
+ if (truncated) {
65
+ currentY++; // Empty line before message
66
+ const truncMsg = `... (${lines.length - MAX_LINES} more lines)`;
67
+ const truncAttr = createColorAttr(colors.dimmed, false, true); // Dimmed
68
+ screenBuffer.put({ x: x + 2, y: currentY, attr: truncAttr }, truncMsg);
69
+ currentY++;
70
+ }
71
+ // Return total height + bottom margin
72
+ return height + 1;
73
+ }
74
+ //# sourceMappingURL=code-block.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-block.js","sourceRoot":"","sources":["../../../src/ui/components/code-block.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,EAAE,OAAO,EAAO,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAWxG,wCAAwC;AACxC,yBAAyB;AACzB,uCAAuC;AACvC,MAAM,UAAU,eAAe,CAAC,OAAyB;IACvD,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,GAAG,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAEhE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,SAAS,GAAG,EAAE,CAAC;IACrB,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;IAC3C,MAAM,YAAY,GAAG,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,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CAAC,CAAC,CAAC,SAAS;QAExE,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,QAAQ,CAAC,CAAC;QACvE,QAAQ,EAAE,CAAC;IACb,CAAC;IAED,sCAAsC;IACtC,OAAO,MAAM,GAAG,CAAC,CAAC;AACpB,CAAC"}
@@ -0,0 +1,12 @@
1
+ export interface ConfirmPromptOptions {
2
+ x: number;
3
+ y: number;
4
+ width: number;
5
+ message: string;
6
+ showFeedbackOption?: boolean;
7
+ }
8
+ type PromptOption = 'yes' | 'no' | 'feedback';
9
+ export declare function renderConfirmPrompt(options: ConfirmPromptOptions, selected?: PromptOption): number;
10
+ export declare function waitForConfirmation(options: ConfirmPromptOptions): Promise<'yes' | 'no' | 'feedback' | null>;
11
+ export {};
12
+ //# sourceMappingURL=confirm-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-prompt.d.ts","sourceRoot":"","sources":["../../../src/ui/components/confirm-prompt.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,oBAAoB;IACnC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,KAAK,YAAY,GAAG,KAAK,GAAG,IAAI,GAAG,UAAU,CAAC;AAG9C,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,GAAE,YAAoB,GAC7B,MAAM,CAgER;AAGD,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,KAAK,GAAG,IAAI,GAAG,UAAU,GAAG,IAAI,CAAC,CA8D3C"}