From 4bdfa86b83f078af389c03a2a41c944bf00899bd Mon Sep 17 00:00:00 2001 From: Pedram Amini Date: Tue, 3 Feb 2026 14:27:24 -0600 Subject: [PATCH] fix(wizard): use navigator.platform for Windows detection in renderer Replace process.platform with navigator.platform for Windows detection in the inline wizard conversation service, as process.platform is not available in the browser/renderer context. --- src/renderer/services/inlineWizardConversation.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/renderer/services/inlineWizardConversation.ts b/src/renderer/services/inlineWizardConversation.ts index 53426d0c..27c5513f 100644 --- a/src/renderer/services/inlineWizardConversation.ts +++ b/src/renderer/services/inlineWizardConversation.ts @@ -582,7 +582,9 @@ export async function sendWizardMessage( const argsForSpawn = agent ? buildArgsForAgent(agent) : []; // On Windows, use sendPromptViaStdin to bypass cmd.exe ~8KB command line length limit - const sendViaStdin = process.platform === 'win32'; + // Note: Use navigator.platform in renderer (process.platform is not available in browser context) + const isWindows = navigator.platform.toLowerCase().includes('win'); + const sendViaStdin = isWindows; if (sendViaStdin && !argsForSpawn.includes('--input-format')) { // Add --input-format stream-json when using stdin with stream-json compatible agents if (session.agentType === 'claude-code' || session.agentType === 'codex') { @@ -592,7 +594,7 @@ export async function sendWizardMessage( logger.info(`Using stdin for Windows: ${sendViaStdin}`, '[InlineWizardConversation]', { sessionId: session.sessionId, - platform: process.platform, + platform: navigator.platform, promptLength: fullPrompt.length, sendViaStdin, });