fix(cli): support OpenCode ai type (#84)

This commit is contained in:
September999999999
2026-01-17 10:48:00 +08:00
committed by GitHub
parent e7c27e60af
commit 319a9393cd
5 changed files with 263 additions and 4 deletions

View File

@@ -43,7 +43,9 @@ export function detectAIType(cwd: string = process.cwd()): DetectionResult {
if (existsSync(join(cwd, '.trae'))) {
detected.push('trae');
}
if (existsSync(join(cwd, '.opencode'))) {
detected.push('opencode');
}
// Suggest based on what's detected
let suggested: AIType | null = null;
@@ -80,6 +82,8 @@ export function getAITypeDescription(aiType: AIType): string {
return 'Gemini CLI (.gemini/skills/ + .shared/)';
case 'trae':
return 'Trae (.trae/skills/ + .shared/)';
case 'opencode':
return 'OpenCode (.opencode/skills/ + .shared/)';
case 'all':
return 'All AI assistants';
}

View File

@@ -40,7 +40,7 @@ export async function copyFolders(
const copiedFolders: string[] = [];
const foldersToCopy = aiType === 'all'
? ['.claude', '.cursor', '.windsurf', '.agent', '.github', '.kiro', '.roo','.codex', '.gemini', '.trae', '.shared']
? Object.values(AI_FOLDERS).flat()
: AI_FOLDERS[aiType];
// Deduplicate folders (e.g., .shared might be listed multiple times)