mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-20 01:56:37 +03:00
fix: Codex was showing / instead of $ for command references
The build system hardcoded `/` as the command prefix for every provider, but Codex CLI uses `$`. Added command_prefix to PROVIDER_PLACEHOLDERS so replacePlaceholders and prefixSkillReferences use the right one. Now `$normalize` shows up in Codex output instead of `/normalize`.
This commit is contained in:
@@ -46,8 +46,8 @@ export function transformCodex(skills, distDir, patterns = null, options = {}) {
|
||||
|
||||
const frontmatter = generateYamlFrontmatter(frontmatterObj);
|
||||
|
||||
let skillBody = replacePlaceholders(skill.body, 'codex', commandNames);
|
||||
if (prefix) skillBody = prefixSkillReferences(skillBody, prefix, allSkillNames);
|
||||
let skillBody = replacePlaceholders(skill.body, 'codex', commandNames, allSkillNames);
|
||||
if (prefix) skillBody = prefixSkillReferences(skillBody, prefix, allSkillNames, '$');
|
||||
// For user-invocable skills, transform remaining {{argname}} to $ARGNAME
|
||||
if (skill.userInvocable) {
|
||||
skillBody = skillBody.replace(/\{\{([^}]+)\}\}/g, (match, argName) => {
|
||||
@@ -65,7 +65,7 @@ export function transformCodex(skills, distDir, patterns = null, options = {}) {
|
||||
ensureDir(refDir);
|
||||
for (const ref of skill.references) {
|
||||
const refOutputPath = path.join(refDir, `${ref.name}.md`);
|
||||
const refContent = replacePlaceholders(ref.content, 'codex');
|
||||
const refContent = replacePlaceholders(ref.content, 'codex', [], allSkillNames);
|
||||
writeFile(refOutputPath, refContent);
|
||||
refCount++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user