From 2855b87a659536a441ecf117ce9bd10b6053f55a Mon Sep 17 00:00:00 2001 From: Abhijay Jain Date: Mon, 27 Jul 2026 05:02:44 +0530 Subject: [PATCH] fix(desktop): use shell working directory on initial launch (#10655) --- ui/desktop/src/main.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 }; };