diff --git a/src/main/utils/path.ts b/src/main/utils/path.ts index 71ddc87e97..a2f60b467d 100644 --- a/src/main/utils/path.ts +++ b/src/main/utils/path.ts @@ -1,7 +1,7 @@ /** * Path utilities for agent process management */ -import { homedir } from 'node:os' +import { homedir, platform } from 'node:os' /** * Get enhanced PATH that includes common custom installation directories @@ -9,6 +9,8 @@ import { homedir } from 'node:os' */ export function getEnhancedPath(): string { const home = homedir() + const isWindows = platform() === 'win32' + const separator = isWindows ? ';' : ':' const customPaths = [ `${home}/.opencode/bin`, `${home}/.claude/local/bin`, @@ -16,5 +18,5 @@ export function getEnhancedPath(): string { '/opt/homebrew/bin', '/usr/local/bin' ] - return `${customPaths.join(':')}:${process.env.PATH || ''}` + return `${customPaths.join(separator)}${separator}${process.env.PATH || ''}` } diff --git a/src/renderer/src/components/Settings.tsx b/src/renderer/src/components/Settings.tsx index 49bd11154b..6430f70cb7 100644 --- a/src/renderer/src/components/Settings.tsx +++ b/src/renderer/src/components/Settings.tsx @@ -302,11 +302,13 @@ function AgentItem({ // Determine status: checking -> setup/selected/ready const status = isChecking ? 'checking' - : !agent?.installed - ? 'setup' - : isSelected - ? 'selected' - : 'ready' + : agent === undefined + ? 'checking' // Still loading agent status + : !agent?.installed + ? 'setup' + : isSelected + ? 'selected' + : 'ready' // Auto-expand when waiting for install useEffect(() => {