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.
This commit is contained in:
Pedram Amini
2026-02-03 14:27:24 -06:00
parent 078a837ef4
commit 4bdfa86b83

View File

@@ -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,
});