diff --git a/ui/desktop/src/main.ts b/ui/desktop/src/main.ts index 39a8b0f9b..7f27448e3 100644 --- a/ui/desktop/src/main.ts +++ b/ui/desktop/src/main.ts @@ -847,6 +847,17 @@ const parseArgs = () => { } } + if (!dirPath && process.stdin.isTTY) { + try { + const cwd = process.cwd(); + if (path.parse(cwd).root !== cwd) { + dirPath = cwd; + } + } catch { + // cwd unavailable; fall through to recentDirs + } + } + return { dirPath }; };