fix(tauri): use navigator.platform for Windows detection in MCP spawn
navigator.userAgent may not contain 'Windows' in all WebView2
contexts. navigator.platform.includes('Win') is more reliable.
Verified working on Windows x64 VM — MCP server spawns via
cmd /c and connects successfully.
This commit is contained in:
parent
1bf19fff59
commit
8b5e372953
|
|
@ -67,7 +67,7 @@ export async function spawnMCPIfNeeded(): Promise<AutomationServerHandle | null>
|
|||
runtimeAutomationAuthToken = authToken
|
||||
|
||||
const { Command } = await import('@tauri-apps/plugin-shell')
|
||||
const isWindows = navigator.userAgent.includes('Windows')
|
||||
const isWindows = navigator.platform.includes('Win')
|
||||
const command = isWindows
|
||||
? Command.create('cmd', ['/c', 'openpencil-mcp-http'], {
|
||||
env: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue