📦 deps(thirdparty): update snapshots

This commit is contained in:
ci[bot]
2026-08-13 15:38:07 +08:00
parent 0a12711d78
commit 5a5d0a9460
9 changed files with 122 additions and 63 deletions
+8 -20
View File
@@ -139,6 +139,13 @@ export async function renderSkillFile(config: PlatformConfig, isGlobal = false):
quickReferenceContent = await loadTemplate('base/quick-reference.md');
}
// scriptPath is relative to the platform root. Generated commands run from
// the user's project root, so local installs need the platform root prefix;
// global installs need the same path anchored at the user's home directory.
const rootedScriptPath = `${config.folderStructure.root}/${config.scriptPath}`
.replace(/\/{2,}/g, '/');
const commandScriptPath = isGlobal ? `~/${rootedScriptPath}` : rootedScriptPath;
// Build the final content
const frontmatter = renderFrontmatter(config.frontmatter);
@@ -149,29 +156,10 @@ export async function renderSkillFile(config: PlatformConfig, isGlobal = false):
content = content
.replace(/\{\{TITLE\}\}/g, config.title)
.replace(/\{\{DESCRIPTION\}\}/g, config.description)
.replace(/\{\{SCRIPT_PATH\}\}/g, config.scriptPath)
.replace(/\{\{SCRIPT_PATH\}\}/g, commandScriptPath)
.replace(/\{\{SKILL_OR_WORKFLOW\}\}/g, config.skillOrWorkflow)
.replace(/\{\{QUICK_REFERENCE\}\}/g, quickRefWithNewline);
// Rewrite the hardcoded default script path to the platform-specific path
const defaultScriptPath = 'skills/ui-ux-pro-max/scripts/search.py';
if (config.scriptPath !== defaultScriptPath) {
content = content.replace(
new RegExp(defaultScriptPath.replace(/\//g, '\\/'), 'g'),
config.scriptPath
);
}
// For global install, rewrite relative script paths to absolute ~/root/ paths
if (isGlobal) {
const globalPrefix = `~/${config.folderStructure.root}/`;
// Match any platform's script path pattern (skills/, prompts/, steering/, etc.)
content = content.replace(
new RegExp(`python3 ${config.scriptPath.replace(/\//g, '\\/')}`, 'g'),
`python3 ${globalPrefix}${config.scriptPath}`
);
}
return frontmatter + content;
}