fix: skip internal tools in manifest generation and improve Windows path handling in command generator
This commit is contained in:
parent
6f99092be1
commit
5d470b2de3
|
|
@ -479,6 +479,11 @@ class ManifestGenerator {
|
|||
const filePath = path.join(dirPath, file);
|
||||
const content = await fs.readFile(filePath, 'utf8');
|
||||
|
||||
// Skip internal tools (same as tasks)
|
||||
if (content.includes('internal="true"')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let name = file.replace(/\.(xml|md)$/, '');
|
||||
let displayName = name;
|
||||
let description = '';
|
||||
|
|
|
|||
|
|
@ -164,7 +164,9 @@ class TaskToolCommandGenerator {
|
|||
// Extract relative path from absolute paths (Windows or Unix)
|
||||
// Look for _bmad/ or bmad/ in the path and extract everything after it
|
||||
// Match patterns like: /_bmad/core/tasks/... or /bmad/core/tasks/...
|
||||
const bmadMatch = itemPath.match(/\/_bmad\/(.+)$/) || itemPath.match(/\/bmad\/(.+)$/);
|
||||
// Use [/\\] to handle both Unix forward slashes and Windows backslashes,
|
||||
// and also paths without a leading separator (e.g., C:/_bmad/...)
|
||||
const bmadMatch = itemPath.match(/[/\\]_bmad[/\\](.+)$/) || itemPath.match(/[/\\]bmad[/\\](.+)$/);
|
||||
if (bmadMatch) {
|
||||
// Found /_bmad/ or /bmad/ - use relative path after it
|
||||
itemPath = `{project-root}/${this.bmadFolderName}/${bmadMatch[1]}`;
|
||||
|
|
|
|||
Loading…
Reference in New Issue