Refactor code structure for improved readability and maintainability

This commit is contained in:
catlog22
2025-12-12 16:27:37 +08:00
parent dfa8dbc52a
commit 6a39f7e69d
166 changed files with 13 additions and 27110 deletions

View File

@@ -694,11 +694,20 @@ function generateWizardCommand() {
// Handle skill-context wizard
if (wizardId === 'skill-context') {
const keywords = wizardConfig.keywords || '';
const skills = wizardConfig.skills || '';
if (triggerType === 'keyword') {
const params = JSON.stringify({ keywords, skills, prompt: '$CLAUDE_PROMPT' });
const skillConfigs = wizardConfig.skillConfigs || [];
const validConfigs = skillConfigs.filter(c => c.skill && c.keywords);
if (validConfigs.length === 0) {
return '# No SKILL configurations yet';
}
const configJson = validConfigs.map(c => ({
skill: c.skill,
keywords: c.keywords.split(',').map(k => k.trim()).filter(k => k)
}));
const params = JSON.stringify({ configs: configJson, prompt: '$CLAUDE_PROMPT' });
return `ccw tool exec skill_context_loader '${params}'`;
} else {
// auto mode