|
1 | | -import * as fs from 'fs'; |
2 | | -import * as path from 'path'; |
3 | | - |
4 | 1 | import { cosmiconfig } from 'cosmiconfig'; |
5 | 2 | import { ArgumentsCamelCase } from 'yargs'; |
6 | 3 |
|
@@ -107,51 +104,3 @@ export async function loadConfig( |
107 | 104 | }; |
108 | 105 | return mergedConfig; |
109 | 106 | } |
110 | | - |
111 | | -/** |
112 | | - * Create a default configuration file if it doesn't exist |
113 | | - * @param filePath Path to create the configuration file |
114 | | - * @returns true if file was created, false if it already exists |
115 | | - */ |
116 | | -export function createDefaultConfigFile(filePath?: string): boolean { |
117 | | - // Default to current directory if no path provided |
118 | | - const configPath = filePath || path.join(process.cwd(), 'mycoder.config.js'); |
119 | | - |
120 | | - // Check if file already exists |
121 | | - if (fs.existsSync(configPath)) { |
122 | | - return false; |
123 | | - } |
124 | | - |
125 | | - // Create default configuration file |
126 | | - const configContent = `// mycoder.config.js |
127 | | -export default { |
128 | | - // GitHub integration |
129 | | - githubMode: true, |
130 | | - |
131 | | - // Browser settings |
132 | | - headless: true, |
133 | | - userSession: false, |
134 | | - pageFilter: 'none', // 'simple', 'none', or 'readability' |
135 | | - |
136 | | - // Model settings |
137 | | - provider: 'anthropic', |
138 | | - model: 'claude-3-7-sonnet-20250219', |
139 | | - maxTokens: 4096, |
140 | | - temperature: 0.7, |
141 | | - |
142 | | - // Custom settings |
143 | | - customPrompt: '', |
144 | | - profile: false, |
145 | | - tokenCache: true, |
146 | | - |
147 | | - // Ollama configuration |
148 | | - ollamaBaseUrl: 'http://localhost:11434', |
149 | | - |
150 | | - // API keys (better to use environment variables for these) |
151 | | - // ANTHROPIC_API_KEY: 'your-api-key', |
152 | | -}; |
153 | | -`; |
154 | | - |
155 | | - fs.writeFileSync(configPath, configContent); |
156 | | - return true; |
157 | | -} |
0 commit comments