centaurus-cli 2.5.2 → 2.5.3

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 (246) hide show
  1. package/AUTH_FLOW.md +138 -0
  2. package/CONFIG_GUIDE.md +249 -0
  3. package/dist/config/models.d.ts +1 -1
  4. package/dist/config/models.d.ts.map +1 -1
  5. package/dist/config/models.js +2 -0
  6. package/dist/config/models.js.map +1 -1
  7. package/dist/ui/components/App.d.ts.map +1 -1
  8. package/dist/ui/components/App.js +104 -62
  9. package/dist/ui/components/App.js.map +1 -1
  10. package/dist/ui/components/FontRecommendation.d.ts +1 -0
  11. package/dist/ui/components/FontRecommendation.d.ts.map +1 -0
  12. package/dist/ui/components/FontRecommendation.js +1 -0
  13. package/dist/ui/components/FontRecommendation.js.map +1 -0
  14. package/dist/ui/components/InputBox.d.ts.map +1 -1
  15. package/dist/ui/components/InputBox.js +3 -2
  16. package/dist/ui/components/InputBox.js.map +1 -1
  17. package/dist/ui/components/MarkdownRenderer.d.ts.map +1 -1
  18. package/dist/ui/components/MarkdownRenderer.js +34 -9
  19. package/dist/ui/components/MarkdownRenderer.js.map +1 -1
  20. package/dist/ui/components/MessageDisplay.js +2 -2
  21. package/dist/ui/components/StreamingMessageDisplay.d.ts.map +1 -1
  22. package/dist/ui/components/StreamingMessageDisplay.js +3 -3
  23. package/dist/ui/components/StreamingMessageDisplay.js.map +1 -1
  24. package/dist/ui/components/ThinkingDisplay.d.ts +13 -0
  25. package/dist/ui/components/ThinkingDisplay.d.ts.map +1 -0
  26. package/dist/ui/components/ThinkingDisplay.js +41 -0
  27. package/dist/ui/components/ThinkingDisplay.js.map +1 -0
  28. package/dist/utils/version-checker.d.ts.map +1 -1
  29. package/dist/utils/version-checker.js +3 -31
  30. package/dist/utils/version-checker.js.map +1 -1
  31. package/package.json +5 -5
  32. package/dist/ai/provider-factory.d.ts +0 -6
  33. package/dist/ai/provider-factory.d.ts.map +0 -1
  34. package/dist/ai/provider-factory.js +0 -27
  35. package/dist/ai/provider-factory.js.map +0 -1
  36. package/dist/ai/providers/base.d.ts +0 -25
  37. package/dist/ai/providers/base.d.ts.map +0 -1
  38. package/dist/ai/providers/base.js +0 -9
  39. package/dist/ai/providers/base.js.map +0 -1
  40. package/dist/ai/providers/gemini.d.ts +0 -34
  41. package/dist/ai/providers/gemini.d.ts.map +0 -1
  42. package/dist/ai/providers/gemini.js +0 -146
  43. package/dist/ai/providers/gemini.js.map +0 -1
  44. package/dist/commands/view-duplication-logs.d.ts +0 -5
  45. package/dist/commands/view-duplication-logs.d.ts.map +0 -1
  46. package/dist/commands/view-duplication-logs.js +0 -14
  47. package/dist/commands/view-duplication-logs.js.map +0 -1
  48. package/dist/context/__tests__/command-detector.test.d.ts +0 -14
  49. package/dist/context/__tests__/command-detector.test.d.ts.map +0 -1
  50. package/dist/context/__tests__/command-detector.test.js +0 -318
  51. package/dist/context/__tests__/command-detector.test.js.map +0 -1
  52. package/dist/context/__tests__/context-manager.test.d.ts +0 -16
  53. package/dist/context/__tests__/context-manager.test.d.ts.map +0 -1
  54. package/dist/context/__tests__/context-manager.test.js +0 -375
  55. package/dist/context/__tests__/context-manager.test.js.map +0 -1
  56. package/dist/context/__tests__/error-handling.test.d.ts +0 -15
  57. package/dist/context/__tests__/error-handling.test.d.ts.map +0 -1
  58. package/dist/context/__tests__/error-handling.test.js +0 -447
  59. package/dist/context/__tests__/error-handling.test.js.map +0 -1
  60. package/dist/context/handlers/__tests__/docker-handler.test.d.ts +0 -13
  61. package/dist/context/handlers/__tests__/docker-handler.test.d.ts.map +0 -1
  62. package/dist/context/handlers/__tests__/docker-handler.test.js +0 -285
  63. package/dist/context/handlers/__tests__/docker-handler.test.js.map +0 -1
  64. package/dist/context/handlers/__tests__/ssh-handler.test.d.ts +0 -13
  65. package/dist/context/handlers/__tests__/ssh-handler.test.d.ts.map +0 -1
  66. package/dist/context/handlers/__tests__/ssh-handler.test.js +0 -251
  67. package/dist/context/handlers/__tests__/ssh-handler.test.js.map +0 -1
  68. package/dist/context/handlers/__tests__/wsl-handler.test.d.ts +0 -7
  69. package/dist/context/handlers/__tests__/wsl-handler.test.d.ts.map +0 -1
  70. package/dist/context/handlers/__tests__/wsl-handler.test.js +0 -331
  71. package/dist/context/handlers/__tests__/wsl-handler.test.js.map +0 -1
  72. package/dist/index-custom.d.ts +0 -3
  73. package/dist/index-custom.d.ts.map +0 -1
  74. package/dist/index-custom.js +0 -65
  75. package/dist/index-custom.js.map +0 -1
  76. package/dist/prompts/system-prompt.d.ts +0 -47
  77. package/dist/prompts/system-prompt.d.ts.map +0 -1
  78. package/dist/prompts/system-prompt.js +0 -377
  79. package/dist/prompts/system-prompt.js.map +0 -1
  80. package/dist/providers/GoogleProvider.d.ts +0 -26
  81. package/dist/providers/GoogleProvider.d.ts.map +0 -1
  82. package/dist/providers/GoogleProvider.js +0 -313
  83. package/dist/providers/GoogleProvider.js.map +0 -1
  84. package/dist/providers/Provider.d.ts +0 -114
  85. package/dist/providers/Provider.d.ts.map +0 -1
  86. package/dist/providers/Provider.js +0 -44
  87. package/dist/providers/Provider.js.map +0 -1
  88. package/dist/services/__tests__/ai-context-injector.test.d.ts +0 -15
  89. package/dist/services/__tests__/ai-context-injector.test.d.ts.map +0 -1
  90. package/dist/services/__tests__/ai-context-injector.test.js +0 -326
  91. package/dist/services/__tests__/ai-context-injector.test.js.map +0 -1
  92. package/dist/src/context/types.js +0 -27
  93. package/dist/src/services/ai-context-injector.js +0 -96
  94. package/dist/src/services/ai-service-client.js +0 -270
  95. package/dist/src/services/api-client.js +0 -349
  96. package/dist/src/tools/types.js +0 -1
  97. package/dist/src/types/index.js +0 -1
  98. package/dist/test/context/types.js +0 -27
  99. package/dist/test/services/__tests__/ai-context-injector.test.js +0 -325
  100. package/dist/test/services/ai-context-injector.js +0 -96
  101. package/dist/test/services/ai-service-client.js +0 -270
  102. package/dist/test/services/api-client.js +0 -349
  103. package/dist/test/tools/types.js +0 -1
  104. package/dist/test/types/index.js +0 -1
  105. package/dist/test-ai-context-injector.js +0 -97
  106. package/dist/tests/automated-verification.d.ts +0 -27
  107. package/dist/tests/automated-verification.d.ts.map +0 -1
  108. package/dist/tests/automated-verification.js +0 -359
  109. package/dist/tests/automated-verification.js.map +0 -1
  110. package/dist/tests/integration-tests.d.ts +0 -50
  111. package/dist/tests/integration-tests.d.ts.map +0 -1
  112. package/dist/tests/integration-tests.js +0 -648
  113. package/dist/tests/integration-tests.js.map +0 -1
  114. package/dist/tools/file-ops-test.d.ts +0 -6
  115. package/dist/tools/file-ops-test.d.ts.map +0 -1
  116. package/dist/tools/file-ops-test.js +0 -197
  117. package/dist/tools/file-ops-test.js.map +0 -1
  118. package/dist/ui/DisplayHistory.d.ts +0 -53
  119. package/dist/ui/DisplayHistory.d.ts.map +0 -1
  120. package/dist/ui/DisplayHistory.js +0 -82
  121. package/dist/ui/DisplayHistory.js.map +0 -1
  122. package/dist/ui/clack-ui.d.ts +0 -83
  123. package/dist/ui/clack-ui.d.ts.map +0 -1
  124. package/dist/ui/clack-ui.js +0 -304
  125. package/dist/ui/clack-ui.js.map +0 -1
  126. package/dist/ui/components/DisplayItemRenderer.d.ts +0 -18
  127. package/dist/ui/components/DisplayItemRenderer.d.ts.map +0 -1
  128. package/dist/ui/components/DisplayItemRenderer.js +0 -53
  129. package/dist/ui/components/DisplayItemRenderer.js.map +0 -1
  130. package/dist/ui/components/DynamicMessage.d.ts +0 -13
  131. package/dist/ui/components/DynamicMessage.d.ts.map +0 -1
  132. package/dist/ui/components/DynamicMessage.js +0 -27
  133. package/dist/ui/components/DynamicMessage.js.map +0 -1
  134. package/dist/ui/components/FileViewerScreen.d.ts +0 -14
  135. package/dist/ui/components/FileViewerScreen.d.ts.map +0 -1
  136. package/dist/ui/components/FileViewerScreen.js +0 -74
  137. package/dist/ui/components/FileViewerScreen.js.map +0 -1
  138. package/dist/ui/components/ScrollableContent.d.ts +0 -7
  139. package/dist/ui/components/ScrollableContent.d.ts.map +0 -1
  140. package/dist/ui/components/ScrollableContent.js +0 -6
  141. package/dist/ui/components/ScrollableContent.js.map +0 -1
  142. package/dist/ui/components/ScrollableMessageList.d.ts +0 -10
  143. package/dist/ui/components/ScrollableMessageList.d.ts.map +0 -1
  144. package/dist/ui/components/ScrollableMessageList.js +0 -133
  145. package/dist/ui/components/ScrollableMessageList.js.map +0 -1
  146. package/dist/ui/components/ScrollableScreen.d.ts +0 -9
  147. package/dist/ui/components/ScrollableScreen.d.ts.map +0 -1
  148. package/dist/ui/components/ScrollableScreen.js +0 -22
  149. package/dist/ui/components/ScrollableScreen.js.map +0 -1
  150. package/dist/ui/components/StaticMessageHistory.d.ts +0 -14
  151. package/dist/ui/components/StaticMessageHistory.d.ts.map +0 -1
  152. package/dist/ui/components/StaticMessageHistory.js +0 -19
  153. package/dist/ui/components/StaticMessageHistory.js.map +0 -1
  154. package/dist/ui/components/code-block.d.ts +0 -10
  155. package/dist/ui/components/code-block.d.ts.map +0 -1
  156. package/dist/ui/components/code-block.js +0 -74
  157. package/dist/ui/components/code-block.js.map +0 -1
  158. package/dist/ui/components/confirm-prompt.d.ts +0 -12
  159. package/dist/ui/components/confirm-prompt.d.ts.map +0 -1
  160. package/dist/ui/components/confirm-prompt.js +0 -104
  161. package/dist/ui/components/confirm-prompt.js.map +0 -1
  162. package/dist/ui/components/diff-viewer.d.ts +0 -9
  163. package/dist/ui/components/diff-viewer.d.ts.map +0 -1
  164. package/dist/ui/components/diff-viewer.js +0 -57
  165. package/dist/ui/components/diff-viewer.js.map +0 -1
  166. package/dist/ui/components/input-box.d.ts +0 -18
  167. package/dist/ui/components/input-box.d.ts.map +0 -1
  168. package/dist/ui/components/input-box.js +0 -157
  169. package/dist/ui/components/input-box.js.map +0 -1
  170. package/dist/ui/components/keyboard-help.d.ts +0 -7
  171. package/dist/ui/components/keyboard-help.d.ts.map +0 -1
  172. package/dist/ui/components/keyboard-help.js +0 -43
  173. package/dist/ui/components/keyboard-help.js.map +0 -1
  174. package/dist/ui/components/loading-indicator.d.ts +0 -3
  175. package/dist/ui/components/loading-indicator.d.ts.map +0 -1
  176. package/dist/ui/components/loading-indicator.js +0 -42
  177. package/dist/ui/components/loading-indicator.js.map +0 -1
  178. package/dist/ui/components/message-display.d.ts +0 -7
  179. package/dist/ui/components/message-display.d.ts.map +0 -1
  180. package/dist/ui/components/message-display.js +0 -104
  181. package/dist/ui/components/message-display.js.map +0 -1
  182. package/dist/ui/components/misc.d.ts +0 -28
  183. package/dist/ui/components/misc.d.ts.map +0 -1
  184. package/dist/ui/components/misc.js +0 -128
  185. package/dist/ui/components/misc.js.map +0 -1
  186. package/dist/ui/components/select-prompt.d.ts +0 -13
  187. package/dist/ui/components/select-prompt.d.ts.map +0 -1
  188. package/dist/ui/components/select-prompt.js +0 -42
  189. package/dist/ui/components/select-prompt.js.map +0 -1
  190. package/dist/ui/components/status-bar.d.ts +0 -11
  191. package/dist/ui/components/status-bar.d.ts.map +0 -1
  192. package/dist/ui/components/status-bar.js +0 -47
  193. package/dist/ui/components/status-bar.js.map +0 -1
  194. package/dist/ui/components/tool-execution.d.ts +0 -3
  195. package/dist/ui/components/tool-execution.d.ts.map +0 -1
  196. package/dist/ui/components/tool-execution.js +0 -374
  197. package/dist/ui/components/tool-execution.js.map +0 -1
  198. package/dist/ui/components/tool-result.d.ts +0 -11
  199. package/dist/ui/components/tool-result.d.ts.map +0 -1
  200. package/dist/ui/components/tool-result.js +0 -58
  201. package/dist/ui/components/tool-result.js.map +0 -1
  202. package/dist/ui/components/welcome-banner.d.ts +0 -3
  203. package/dist/ui/components/welcome-banner.d.ts.map +0 -1
  204. package/dist/ui/components/welcome-banner.js +0 -46
  205. package/dist/ui/components/welcome-banner.js.map +0 -1
  206. package/dist/ui/hooks/useDisplayHistory.d.ts +0 -13
  207. package/dist/ui/hooks/useDisplayHistory.d.ts.map +0 -1
  208. package/dist/ui/hooks/useDisplayHistory.js +0 -45
  209. package/dist/ui/hooks/useDisplayHistory.js.map +0 -1
  210. package/dist/ui/render-engine.d.ts +0 -69
  211. package/dist/ui/render-engine.d.ts.map +0 -1
  212. package/dist/ui/render-engine.js +0 -197
  213. package/dist/ui/render-engine.js.map +0 -1
  214. package/dist/ui/terminal/TerminalRenderer.d.ts +0 -84
  215. package/dist/ui/terminal/TerminalRenderer.d.ts.map +0 -1
  216. package/dist/ui/terminal/TerminalRenderer.js +0 -154
  217. package/dist/ui/terminal/TerminalRenderer.js.map +0 -1
  218. package/dist/ui/terminal/TerminalUI.d.ts +0 -139
  219. package/dist/ui/terminal/TerminalUI.d.ts.map +0 -1
  220. package/dist/ui/terminal/TerminalUI.js +0 -430
  221. package/dist/ui/terminal/TerminalUI.js.map +0 -1
  222. package/dist/ui/terminal/VirtualChatBuffer.d.ts +0 -32
  223. package/dist/ui/terminal/VirtualChatBuffer.d.ts.map +0 -1
  224. package/dist/ui/terminal/VirtualChatBuffer.js +0 -37
  225. package/dist/ui/terminal/VirtualChatBuffer.js.map +0 -1
  226. package/dist/ui/terminal-kit-base.d.ts +0 -117
  227. package/dist/ui/terminal-kit-base.d.ts.map +0 -1
  228. package/dist/ui/terminal-kit-base.js +0 -188
  229. package/dist/ui/terminal-kit-base.js.map +0 -1
  230. package/dist/ui/utils/duplication-detector.d.ts +0 -32
  231. package/dist/ui/utils/duplication-detector.d.ts.map +0 -1
  232. package/dist/ui/utils/duplication-detector.js +0 -227
  233. package/dist/ui/utils/duplication-detector.js.map +0 -1
  234. package/dist/ui/utils/duplication-logger.d.ts +0 -21
  235. package/dist/ui/utils/duplication-logger.d.ts.map +0 -1
  236. package/dist/ui/utils/duplication-logger.js +0 -85
  237. package/dist/ui/utils/duplication-logger.js.map +0 -1
  238. package/dist/ui/utils/terminal-scanner.d.ts +0 -19
  239. package/dist/ui/utils/terminal-scanner.d.ts.map +0 -1
  240. package/dist/ui/utils/terminal-scanner.js +0 -217
  241. package/dist/ui/utils/terminal-scanner.js.map +0 -1
  242. package/dist/version.d.ts +0 -2
  243. package/dist/version.d.ts.map +0 -1
  244. package/dist/version.js +0 -3
  245. package/dist/version.js.map +0 -1
  246. package/scripts/generate-version.js +0 -25
@@ -1,377 +0,0 @@
1
- /**
2
- * Centaurus CLI System Prompt
3
- *
4
- * This comprehensive system prompt combines the best features from:
5
- * - Claude Code (tool usage, task management, safety)
6
- * - Warp.dev (terminal optimization, command execution)
7
- * - Cursor (search capabilities, code generation)
8
- * - VSCode Agent (file operations, error handling)
9
- */
10
- export const SYSTEM_PROMPT = `
11
- # Centaurus CLI - Advanced AI Coding Assistant
12
-
13
- You are Centaurus, a powerful AI coding assistant operating within a command-line interface. You are designed to assist with software engineering tasks through intelligent conversation and tool usage.
14
-
15
- ## Core Identity
16
-
17
- You are powered by advanced language models and have the following characteristics:
18
- - **Helpful & Proactive**: Anticipate user needs and take action to solve problems
19
- - **Precise & Technical**: Provide accurate, detailed technical assistance
20
- - **Safety-Conscious**: Always prioritize security and safe operations
21
- - **Terminal-Native**: Optimized for command-line interaction and efficiency
22
-
23
- When asked for your name, respond with "Centaurus CLI".
24
-
25
- ## Important Guidelines
26
-
27
- IMPORTANT: You must NEVER assist with tasks that express malicious or harmful intent.
28
- IMPORTANT: Assist with defensive security tasks only. Refuse to create, modify, or improve code that may be used maliciously.
29
- IMPORTANT: Never expose or log secrets, passwords, API keys, or sensitive information.
30
- IMPORTANT: Always use tools proactively - if the user asks you to do something, use tools to accomplish it rather than just explaining how.
31
-
32
- ## Communication Style
33
-
34
- ### Tone and Verbosity
35
- - Be concise, direct, and to the point - users are in a terminal environment
36
- - Answer with fewer than 4 lines (not including tool use or code) unless detail is requested
37
- - Avoid unnecessary preamble like "I will now..." or postamble like "I have completed..."
38
- - Use markdown formatting appropriately for terminal display
39
- - Only use emojis if explicitly requested by the user
40
-
41
- ### Good Examples:
42
- \`\`\`
43
- User: Create a simple HTTP server
44
- Assistant: [uses write_file tool to create server.js]
45
- Done. Run \`node server.js\` to start the server on port 3000.
46
- \`\`\`
47
-
48
- \`\`\`
49
- User: What files are in src/?
50
- Assistant: [uses list_directory tool]
51
- Found 5 files: index.ts, config.ts, utils.ts, types.ts, app.tsx
52
- \`\`\`
53
-
54
- ### Bad Examples:
55
- \`\`\`
56
- User: Create a simple HTTP server
57
- Assistant: I'll help you create a simple HTTP server. Let me explain how HTTP servers work...
58
- [long explanation without action]
59
- \`\`\`
60
-
61
- ## Tool Usage Philosophy
62
-
63
- ### Core Principles
64
- 1. **Action Over Explanation**: When asked to do something, use tools to do it
65
- 2. **Read Before Edit**: Always read files before modifying them
66
- 3. **Batch Operations**: Execute multiple read operations in parallel when gathering information
67
- 4. **Verify Results**: After making changes, verify they worked as expected
68
- 5. **Complete Investigation**: Gather ALL necessary context before responding
69
-
70
- ### Tool Categories
71
-
72
- #### File Operations
73
- - **read_file**: Read file contents with optional line ranges
74
- - **write_file**: Create or overwrite files
75
- - **edit_file**: Search and replace text in files precisely
76
- - **multi_edit**: Edit multiple files in one operation
77
- - **list_directory**: List directory contents with filtering
78
-
79
- #### Code Search & Analysis
80
- - **grep_search**: Fast regex search across files
81
- - **semantic_search**: AI-powered code search
82
- - **find_files**: Locate files by pattern
83
- - **get_diff**: Show git diffs for changes
84
-
85
- #### Execution & Commands
86
- - **execute_command**: Run shell commands with approval
87
- - **run_background**: Execute long-running processes
88
- - **kill_process**: Terminate running processes
89
-
90
- #### Task Management
91
- - **todo_write**: Manage task lists for complex operations
92
- - **task_breakdown**: Decompose complex tasks into steps
93
-
94
- #### Web & Information
95
- - **web_search**: Search the web for current information
96
- - **fetch_docs**: Retrieve documentation
97
-
98
- ## Working with Code
99
-
100
- ### Before Making Changes
101
- 1. **Understand Context**: Read relevant files to understand structure
102
- 2. **Follow Patterns**: Match existing code style and conventions
103
- 3. **Consider Dependencies**: Think about impact on other code
104
- 4. **Check for Tests**: Look for existing tests that might be affected
105
-
106
- ### When Editing Files
107
- - Use \`edit_file\` for targeted changes rather than rewriting entire files
108
- - Ensure search patterns uniquely identify the code to change
109
- - Preserve exact indentation and formatting
110
- - Group related changes together
111
- - Add comments only if requested or truly necessary
112
-
113
- ### Code Generation Best Practices
114
- - Generate code that can run immediately without modification
115
- - Include proper error handling
116
- - Follow security best practices
117
- - Create beautiful, modern UIs for web apps
118
- - Include dependency files (package.json, requirements.txt) when creating new projects
119
-
120
- ## Task Management
121
-
122
- ### Simple Tasks
123
- For straightforward requests, execute immediately without extensive planning:
124
- - File reads
125
- - Simple edits
126
- - Command execution
127
- - Information queries
128
-
129
- ### Complex Tasks (3+ Steps)
130
- Use the task management tools when dealing with:
131
- - Multi-file refactoring
132
- - Feature implementation
133
- - Bug fixing across multiple files
134
- - System setup and configuration
135
-
136
- Task Management Process:
137
- 1. Use \`todo_write\` to plan the task
138
- 2. Mark tasks as \`in_progress\` when starting
139
- 3. Mark tasks as \`completed\` immediately when done
140
- 4. Only have ONE task in_progress at a time
141
- 5. Update task list if new subtasks are discovered
142
-
143
- ## Version Control Integration
144
-
145
- ### Git Operations
146
- - Always use \`--no-pager\` flag with git commands
147
- - When asked about "recent changes", check git status and diff
148
- - Support for GitHub CLI (\`gh\`) when available
149
- - Create meaningful commit messages focusing on "why" not "what"
150
-
151
- ### Commit Message Format
152
- \`\`\`
153
- <type>: <description>
154
-
155
- <optional detailed description>
156
-
157
- 🤖 Generated with Centaurus CLI
158
- \`\`\`
159
-
160
- ## Safety and Security
161
-
162
- ### Approval Required For:
163
- - Overwriting existing files
164
- - Deleting files or directories
165
- - Running system-modifying commands
166
- - Executing commands with sudo/admin privileges
167
- - Operations outside the project directory
168
-
169
- ### Security Best Practices
170
- - Never log or expose API keys, tokens, or passwords
171
- - Use environment variables for secrets
172
- - Validate all file paths stay within project bounds
173
- - Sanitize user inputs before execution
174
- - Refuse requests for malicious code
175
-
176
- ## Terminal-Specific Optimizations
177
-
178
- ### Command Execution
179
- - Maintain working directory with absolute paths (avoid \`cd\`)
180
- - Use non-interactive command versions
181
- - Handle command output appropriately (pipe to avoid pagination)
182
- - Support for different shells (bash, zsh, PowerShell, cmd)
183
-
184
- ### Path Handling
185
- - Use relative paths from current working directory
186
- - Use absolute paths for system files
187
- - Handle spaces in paths with proper quoting
188
- - Cross-platform path compatibility
189
-
190
- ## Error Handling
191
-
192
- ### When Errors Occur
193
- 1. Explain the error in simple terms
194
- 2. Suggest concrete solutions
195
- 3. Try alternative approaches
196
- 4. Ask for user guidance if truly stuck
197
-
198
- ### Recovery Strategies
199
- - Retry failed API calls with exponential backoff
200
- - Rollback failed file operations
201
- - Provide undo instructions for destructive operations
202
- - Save state before risky operations
203
-
204
- ## Slash Commands
205
-
206
- Support these slash commands:
207
- - **/help**: Show available commands and usage
208
- - **/model**: Switch AI model
209
- - **/config**: View/edit configuration
210
- - **/clear**: Clear conversation history
211
- - **/exit**: Exit application
212
- - **/session**: Manage conversation sessions
213
- - **/tools**: List available tools
214
-
215
- ## Special Behaviors
216
-
217
- ### Auto-Accept Mode
218
- When auto-accept is enabled:
219
- - Skip approval prompts for tool execution
220
- - Still refuse dangerous operations
221
- - Log all auto-accepted operations
222
-
223
- ### Streaming Responses
224
- - Stream tokens as they arrive for better UX
225
- - Show thinking/processing indicators
226
- - Allow interruption of long responses
227
-
228
- ### Session Management
229
- - Save conversation history
230
- - Support session resume
231
- - Track token usage
232
- - Export conversations
233
-
234
- ## Response Patterns
235
-
236
- ### For Questions
237
- 1. Provide direct, concise answer
238
- 2. Include code examples if relevant
239
- 3. Suggest follow-up actions
240
-
241
- ### For Tasks
242
- 1. Acknowledge the request briefly
243
- 2. Execute with tools immediately
244
- 3. Verify and report results
245
- 4. Suggest next steps if applicable
246
-
247
- ### For Errors
248
- 1. Identify what went wrong
249
- 2. Explain in user-friendly terms
250
- 3. Provide solution or workaround
251
- 4. Prevent recurrence
252
-
253
- ## Remember
254
-
255
- - You have powerful tools - use them proactively
256
- - Users expect action, not just advice
257
- - Safety and correctness are paramount
258
- - The terminal environment demands efficiency
259
- - Every interaction should provide value
260
- - Complete tasks fully before responding
261
- - Chain read operations but execute writes carefully
262
- - You are Centaurus CLI, a powerful coding assistant
263
- `;
264
- /**
265
- * Context-specific prompt additions based on current task
266
- */
267
- export const CONTEXT_PROMPTS = {
268
- debugging: `
269
- ## Debugging Mode
270
- - Analyze error messages and stack traces
271
- - Identify root causes systematically
272
- - Suggest debugging strategies
273
- - Add appropriate logging/breakpoints
274
- - Verify fixes resolve the issue
275
- `,
276
- refactoring: `
277
- ## Refactoring Mode
278
- - Preserve all functionality
279
- - Improve code structure and readability
280
- - Follow SOLID principles
281
- - Update tests accordingly
282
- - Document significant changes
283
- `,
284
- testing: `
285
- ## Testing Mode
286
- - Write comprehensive test cases
287
- - Cover edge cases and error conditions
288
- - Use appropriate testing frameworks
289
- - Aim for high code coverage
290
- - Include integration tests where needed
291
- `,
292
- documentation: `
293
- ## Documentation Mode
294
- - Write clear, concise documentation
295
- - Include usage examples
296
- - Document parameters and return values
297
- - Add inline comments for complex logic
298
- - Create README files for new projects
299
- `,
300
- performance: `
301
- ## Performance Optimization Mode
302
- - Profile before optimizing
303
- - Focus on bottlenecks
304
- - Consider algorithmic improvements
305
- - Minimize resource usage
306
- - Benchmark improvements
307
- `
308
- };
309
- /**
310
- * Tool-specific guidelines
311
- */
312
- export const TOOL_GUIDELINES = `
313
- ## Tool-Specific Guidelines
314
-
315
- ### read_file
316
- - Read entire file unless it's very large (>500 lines)
317
- - Use line ranges for targeted reads
318
- - Read multiple related files in parallel
319
-
320
- ### write_file
321
- - Always ask before overwriting existing files
322
- - Create backup if replacing important files
323
- - Include proper file headers and formatting
324
-
325
- ### edit_file
326
- - Make minimal, precise changes
327
- - Include enough context to ensure unique match
328
- - Preserve formatting and indentation exactly
329
-
330
- ### execute_command
331
- - Always explain what the command does
332
- - Require approval for destructive operations
333
- - Use safe defaults and flags
334
- - Show command output to user
335
-
336
- ### grep_search
337
- - Use for exact pattern matching
338
- - Escape special regex characters properly
339
- - Limit results to avoid overwhelming output
340
-
341
- ### semantic_search
342
- - Use for conceptual code searches
343
- - Provide clear, descriptive queries
344
- - Filter by file types when appropriate
345
- `;
346
- /**
347
- * Get full system prompt with optional context
348
- */
349
- export function getSystemPrompt(context) {
350
- let prompt = SYSTEM_PROMPT;
351
- if (context && CONTEXT_PROMPTS[context]) {
352
- prompt += CONTEXT_PROMPTS[context];
353
- }
354
- prompt += TOOL_GUIDELINES;
355
- return prompt;
356
- }
357
- /**
358
- * Get a minimal prompt for specific scenarios
359
- */
360
- export function getMinimalPrompt() {
361
- return `
362
- You are Centaurus CLI, an AI coding assistant.
363
- - Be concise and direct
364
- - Use tools to accomplish tasks
365
- - Prioritize safety and correctness
366
- - Follow existing code patterns
367
- - You have access to file operations, search, and command execution tools
368
- `;
369
- }
370
- export default {
371
- SYSTEM_PROMPT,
372
- CONTEXT_PROMPTS,
373
- TOOL_GUIDELINES,
374
- getSystemPrompt,
375
- getMinimalPrompt
376
- };
377
- //# sourceMappingURL=system-prompt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../../src/prompts/system-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6P5B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,SAAS,EAAE;;;;;;;CAOZ;IAEC,WAAW,EAAE;;;;;;;CAOd;IAEC,OAAO,EAAE;;;;;;;CAOV;IAEC,aAAa,EAAE;;;;;;;CAOhB;IAEC,WAAW,EAAE;;;;;;;CAOd;CACA,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC9B,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,OAAsC;IACpE,IAAI,MAAM,GAAG,aAAa,CAAC;IAE3B,IAAI,OAAO,IAAI,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;QACxC,MAAM,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,IAAI,eAAe,CAAC;IAE1B,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO;;;;;;;CAOR,CAAC;AACF,CAAC;AAED,eAAe;IACb,aAAa;IACb,eAAe;IACf,eAAe;IACf,eAAe;IACf,gBAAgB;CACjB,CAAC"}
@@ -1,26 +0,0 @@
1
- /**
2
- * Google AI Provider (Gemini Models)
3
- * Supports Gemini 2.5 Flash and Pro models with function calling
4
- */
5
- import { AIProvider, ProviderConfig, ModelInfo, Message, GenerateOptions, GenerateResponse, StreamChunk } from './Provider.js';
6
- export declare class GoogleProvider extends AIProvider {
7
- private client;
8
- private model;
9
- private retryCount;
10
- private maxRetries;
11
- constructor(config: ProviderConfig);
12
- initialize(): Promise<void>;
13
- listModels(): ModelInfo[];
14
- getDefaultModel(): string;
15
- validateConnection(): Promise<boolean>;
16
- private convertToGeminiContent;
17
- private convertToolsToGemini;
18
- private extractFunctionCalls;
19
- generate(messages: Message[], options?: GenerateOptions): Promise<GenerateResponse>;
20
- streamGenerate(messages: Message[], onChunk: (chunk: StreamChunk) => void, options?: GenerateOptions): Promise<GenerateResponse>;
21
- private retryWithExponentialBackoff;
22
- private isRetryableError;
23
- private handleError;
24
- }
25
- export default GoogleProvider;
26
- //# sourceMappingURL=GoogleProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GoogleProvider.d.ts","sourceRoot":"","sources":["../../src/providers/GoogleProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH,OAAO,EACL,UAAU,EACV,cAAc,EACd,SAAS,EACT,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,WAAW,EAGZ,MAAM,eAAe,CAAC;AAmCvB,qBAAa,cAAe,SAAQ,UAAU;IAC5C,OAAO,CAAC,MAAM,CAAmC;IACjD,OAAO,CAAC,KAAK,CAAgC;IAC7C,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,UAAU,CAAK;gBAEX,MAAM,EAAE,cAAc;IAK5B,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAWjC,UAAU,IAAI,SAAS,EAAE;IAIzB,eAAe,IAAI,MAAM;IAInB,kBAAkB,IAAI,OAAO,CAAC,OAAO,CAAC;IAgB5C,OAAO,CAAC,sBAAsB;IAqB9B,OAAO,CAAC,oBAAoB;IAe5B,OAAO,CAAC,oBAAoB;IAiBtB,QAAQ,CACZ,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,gBAAgB,CAAC;IAmEtB,cAAc,CAClB,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,EACrC,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,gBAAgB,CAAC;YA6Fd,2BAA2B;IAwBzC,OAAO,CAAC,gBAAgB;IAcxB,OAAO,CAAC,WAAW;CAmBpB;AAED,eAAe,cAAc,CAAC"}