fix(converters): preserve Codex agent sidecar scripts (#563)

This commit is contained in:
alexph-dev
2026-04-16 00:06:26 +07:00
committed by GitHub
parent d8305dd159
commit ee8e402897
6 changed files with 111 additions and 5 deletions

View File

@@ -41,7 +41,7 @@ export function transformContentForCodex(
: `${prefix}Use the $${skillName} skill`
})
const slashCommandPattern = /(?<![:\w])\/([a-z][a-z0-9_:-]*?)(?=[\s,."')\]}`]|$)/gi
const slashCommandPattern = /(?<![:\w>}\]\)])\/([a-z][a-z0-9_:-]*?)(?=[\s,."')\]}`]|$)/gi
result = result.replace(slashCommandPattern, (match, commandName: string) => {
if (commandName.includes("/")) return match
if (["dev", "tmp", "etc", "usr", "var", "bin", "home"].includes(commandName)) return match