diff --git a/vite.config.ts b/vite.config.ts index 718548f..8ba6f19 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -36,7 +36,7 @@ function apiSavePlugin() { server.middlewares.use('/api/ai/sessions', (req: any, res: any) => { if (req.method !== 'GET') { res.writeHead(405); res.end(); return } try { - const child = spawn('npx', ['opencode', 'session', 'list', '--format', 'json'], { timeout: 5000, stdio: ['ignore', 'pipe', 'pipe'] }) + const child = spawn('npx', ['opencode', 'session', 'list', '--format', 'json'], { timeout: 5000, stdio: ['ignore', 'pipe', 'pipe'], shell: process.platform === 'win32' }) let stdout = '' let responded = false child.stdout.on('data', (d: Buffer) => stdout += d.toString()) @@ -89,6 +89,7 @@ function apiSavePlugin() { env: { ...process.env, DEEPSEEK_API_KEY: apiKey || process.env.DEEPSEEK_API_KEY || '' }, timeout: 60000, stdio: ['ignore', 'pipe', 'pipe'], + shell: process.platform === 'win32', }) let stdout = ''