Add Code Queue resume contract

This commit is contained in:
Codex
2026-05-23 10:28:57 +00:00
parent 184667b4cb
commit fd8e21e611
11 changed files with 830 additions and 4 deletions
+18
View File
@@ -83,6 +83,24 @@ function displayCommandName(parts: string[]): string {
}
return shown.join(" ");
}
if (parts[0] === "codex" && parts[1] === "resume" && parts[2] !== undefined) {
const shown = ["codex", "resume", parts[2]];
const shownValueOptions = new Set(["--prompt-file", "--file", "--resume-id", "--resumeId"]);
const hasPromptFile = parts.includes("--prompt-file") || parts.includes("--file");
const hasPromptStdin = parts.includes("--prompt-stdin") || parts.includes("--stdin");
const hasHelp = parts.slice(3).some(isHelpToken);
if (!hasPromptFile && !hasPromptStdin && !hasHelp) shown.push("<prompt:redacted>");
for (let index = 3; index < parts.length; index += 1) {
const part = parts[index] ?? "";
if (!part.startsWith("--")) continue;
shown.push(part);
if (shownValueOptions.has(part)) {
shown.push(parts[index + 1] ?? "<missing>");
index += 1;
}
}
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) {