[codex] Fix doctor completion cache plugin loading (#76235)

* fix(completion): make cache generation mode explicit

* test(completion): type spawned cache options

* fix(completion): require explicit cache binary name
This commit is contained in:
Peter Steinberger
2026-07-05 07:33:54 -07:00
committed by GitHub
parent 7613f6ebb3
commit 17c0ad86cb
7 changed files with 89 additions and 20 deletions
+4 -3
View File
@@ -1467,10 +1467,11 @@ async function tryInstallShellCompletion(opts: {
}
const status = await checkShellCompletionStatus(CLI_NAME);
const generationOptions = { generationMode: "core-only" } as const;
if (status.usesSlowPattern) {
defaultRuntime.log(theme.muted("Upgrading shell completion to cached version..."));
const cacheGenerated = await ensureCompletionCacheExists(CLI_NAME);
const cacheGenerated = await ensureCompletionCacheExists(CLI_NAME, generationOptions);
if (cacheGenerated) {
await installShellCompletionForUpdate(status.shell, true);
}
@@ -1479,7 +1480,7 @@ async function tryInstallShellCompletion(opts: {
if (status.profileInstalled && !status.cacheExists) {
defaultRuntime.log(theme.muted("Regenerating shell completion cache..."));
await ensureCompletionCacheExists(CLI_NAME);
await ensureCompletionCacheExists(CLI_NAME, generationOptions);
return;
}
@@ -1503,7 +1504,7 @@ async function tryInstallShellCompletion(opts: {
return;
}
const cacheGenerated = await ensureCompletionCacheExists(CLI_NAME);
const cacheGenerated = await ensureCompletionCacheExists(CLI_NAME, generationOptions);
if (!cacheGenerated) {
defaultRuntime.log(theme.warn("Failed to generate completion cache."));
return;