From b7dce6bf3ff89b8aa7972f859740bbddbb8b1579 Mon Sep 17 00:00:00 2001 From: weishu Date: Tue, 30 Dec 2025 17:39:24 +0800 Subject: [PATCH] refactor: use undefined instead of null for optional return type --- cli/src/codex/codexRemoteLauncher.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/src/codex/codexRemoteLauncher.ts b/cli/src/codex/codexRemoteLauncher.ts index c4451bb1..12f43efd 100644 --- a/cli/src/codex/codexRemoteLauncher.ts +++ b/cli/src/codex/codexRemoteLauncher.ts @@ -162,10 +162,10 @@ export async function codexRemoteLauncher(session: CodexSession): Promise<'switc return `${normalized.slice(0, maxChars)}...`; } - function buildResumeInstructionsFromFile(resumeFile: string): string | null { + function buildResumeInstructionsFromFile(resumeFile: string): string | undefined { const result = readResumeFileContent(resumeFile); if (!result) { - return null; + return undefined; } const items: { role: 'user' | 'assistant' | 'tool'; text: string }[] = []; @@ -211,7 +211,7 @@ export async function codexRemoteLauncher(session: CodexSession): Promise<'switc } if (items.length === 0) { - return null; + return undefined; } if (items.length > RESUME_CONTEXT_MAX_ITEMS) { @@ -236,7 +236,7 @@ export async function codexRemoteLauncher(session: CodexSession): Promise<'switc } if (rendered.length === 0) { - return null; + return undefined; } const header = truncated