fix: redact commander approval reasons

This commit is contained in:
Codex
2026-05-21 08:53:14 +00:00
parent f055e18523
commit cf40cd5f6c
3 changed files with 62 additions and 4 deletions
+12
View File
@@ -44,6 +44,18 @@ function displayCommandName(parts: string[]): string {
}
return shown.join(" ");
}
if (parts[0] === "commander" && parts[1] === "approval" && parts[2] === "request") {
const shown: string[] = [];
for (let index = 0; index < parts.length; index += 1) {
const part = parts[index] ?? "";
shown.push(part);
if (part === "--reason") {
shown.push("<reason:redacted>");
index += 1;
}
}
return shown.join(" ");
}
return parts.join(" ");
}