Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(mac): folder-path prompt default is /Users/ on macOS, not C:\\Users

purple9f7e1013d58c
diff --git a/src/components/chat/FileTree.tsx b/src/components/chat/FileTree.tsx
index 4dc2c03c..f92978bf 100644
--- a/src/components/chat/FileTree.tsx
+++ b/src/components/chat/FileTree.tsx
@@ -2,7 +2,7 @@ import { useState, useEffect, useRef } from 'react'
import { FolderOpen, Folder, FileText, ArrowLeft, RefreshCw } from 'lucide-react'
import { useCodexStore } from '../../stores/codexStore'
import { toolRegistry } from '../../api/mcp'
-import { isTauri } from '../../api/backend'
+import { isTauri, isMacOS } from '../../api/backend'
import type { FileTreeNode } from '../../types/codex'
export function FileTree() {
@@ -68,11 +68,11 @@ export function FileTree() {
if (selected) loadDirectory(selected)
} catch {
// Fallback if invoke fails
- const dir = window.prompt('Enter folder path:', workingDirectory || 'C:\\Users')
+ const dir = window.prompt('Enter folder path:', workingDirectory || (isMacOS() ? '/Users/' : 'C:\\Users'))
if (dir) loadDirectory(dir)
}
} else {
- const dir = window.prompt('Enter folder path:', workingDirectory || 'C:\\Users')
+ const dir = window.prompt('Enter folder path:', workingDirectory || (isMacOS() ? '/Users/' : 'C:\\Users'))
if (dir) loadDirectory(dir)
}
}