feat(skills): implement enable/disable functionality for skills

- Added new API endpoints to enable and disable skills.
- Introduced logic to manage disabled skills, including loading and saving configurations.
- Enhanced skills routes to return lists of disabled skills.
- Updated frontend to display disabled skills and allow toggling their status.
- Added internationalization support for new skill status messages.
- Created JSON schemas for plan verification agent and findings.
- Defined new types for skill management in TypeScript.
This commit is contained in:
catlog22
2026-01-28 00:49:39 +08:00
parent 8d178feaac
commit 7a40f16235
35 changed files with 1123 additions and 2016 deletions

View File

@@ -280,11 +280,12 @@ export async function handler(params: Record<string, unknown>): Promise<ToolResu
// Scan directory
const { info: structureInfo, folderType } = scanDirectoryStructure(targetPath);
// Calculate output path
// Calculate output path (relative for display, absolute for CLI prompt)
const outputPath = calculateOutputPath(targetPath, projectName, process.cwd());
const absOutputPath = resolve(process.cwd(), outputPath);
// Ensure output directory exists
mkdirSync(outputPath, { recursive: true });
mkdirSync(absOutputPath, { recursive: true });
// Build prompt based on strategy
let prompt: string;
@@ -304,7 +305,7 @@ Generate documentation files:
- API.md: Code API documentation
- README.md: Module overview and usage
Output directory: ${outputPath}
Output directory: ${absOutputPath}
Template Guidelines:
${templateContent}`;
@@ -318,7 +319,7 @@ Read: @*/API.md @*/README.md
Generate documentation file:
- README.md: Navigation overview of subdirectories
Output directory: ${outputPath}
Output directory: ${absOutputPath}
Template Guidelines:
${templateContent}`;
@@ -327,12 +328,13 @@ ${templateContent}`;
case 'project-readme':
templateContent = loadTemplate('project-readme');
const projectDocsDir = resolve(process.cwd(), '.workflow', 'docs', projectName);
prompt = `Read all module documentation:
@.workflow/docs/${projectName}/**/API.md
@.workflow/docs/${projectName}/**/README.md
Generate project-level documentation:
- README.md in .workflow/docs/${projectName}/
- README.md in ${projectDocsDir}/
Template Guidelines:
${templateContent}`;
@@ -340,6 +342,7 @@ ${templateContent}`;
case 'project-architecture':
templateContent = loadTemplate('project-architecture');
const projectArchDir = resolve(process.cwd(), '.workflow', 'docs', projectName);
prompt = `Read project documentation:
@.workflow/docs/${projectName}/README.md
@.workflow/docs/${projectName}/**/API.md
@@ -348,13 +351,14 @@ Generate:
- ARCHITECTURE.md: System design documentation
- EXAMPLES.md: Usage examples
Output directory: .workflow/docs/${projectName}/
Output directory: ${projectArchDir}/
Template Guidelines:
${templateContent}`;
break;
case 'http-api':
const apiDocsDir = resolve(process.cwd(), '.workflow', 'docs', projectName, 'api');
prompt = `Read API route files:
@**/routes/**/*.ts @**/routes/**/*.js
@**/api/**/*.ts @**/api/**/*.js
@@ -362,7 +366,7 @@ ${templateContent}`;
Generate HTTP API documentation:
- api/README.md: REST API endpoints documentation
Output directory: .workflow/docs/${projectName}/api/`;
Output directory: ${apiDocsDir}/`;
break;
}