tycono 0.1.79 → 0.1.81-beta.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.
package/package.json
CHANGED
|
@@ -343,11 +343,14 @@ export function scaffold(config: ScaffoldConfig): string[] {
|
|
|
343
343
|
created.push('.gitignore');
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
-
// Write .tycono/config.json (engine + API key)
|
|
346
|
+
// Write .tycono/config.json (engine + API key + codeRoot)
|
|
347
|
+
const slug = config.companyName.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '') || 'my-company';
|
|
348
|
+
const defaultCodeRoot = path.join(path.dirname(root), `${slug}-code`);
|
|
347
349
|
if (config.apiKey) {
|
|
348
350
|
const companyConfig: CompanyConfig = {
|
|
349
351
|
engine: 'direct-api',
|
|
350
352
|
apiKey: config.apiKey,
|
|
353
|
+
codeRoot: defaultCodeRoot,
|
|
351
354
|
};
|
|
352
355
|
writeConfig(root, companyConfig);
|
|
353
356
|
created.push('.tycono/config.json');
|
|
@@ -355,10 +358,13 @@ export function scaffold(config: ScaffoldConfig): string[] {
|
|
|
355
358
|
fs.writeFileSync(path.join(root, '.env'), `ANTHROPIC_API_KEY=${config.apiKey}\n`);
|
|
356
359
|
created.push('.env');
|
|
357
360
|
} else {
|
|
358
|
-
const companyConfig: CompanyConfig = { engine: 'claude-cli' };
|
|
361
|
+
const companyConfig: CompanyConfig = { engine: 'claude-cli', codeRoot: defaultCodeRoot };
|
|
359
362
|
writeConfig(root, companyConfig);
|
|
360
363
|
created.push('.tycono/config.json');
|
|
361
364
|
}
|
|
365
|
+
// Ensure codeRoot directory exists
|
|
366
|
+
fs.mkdirSync(defaultCodeRoot, { recursive: true });
|
|
367
|
+
created.push(`(code) ${defaultCodeRoot}`);
|
|
362
368
|
|
|
363
369
|
// Save language preference (default: English)
|
|
364
370
|
mergePreferences(root, { language: config.language || 'en' });
|