From f1f9ac3ddb9517e77596e08234609a82a6b7e7fc Mon Sep 17 00:00:00 2001 From: Kelvin Amoaba <97001695+AmoabaKelvin@users.noreply.github.com> Date: Wed, 22 Apr 2026 22:41:44 +0000 Subject: [PATCH] feat(file-explorer): double-click empty space to create new file (#889) --- .../src/components/right-sidebar/FileExplorer.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/renderer/src/components/right-sidebar/FileExplorer.tsx b/src/renderer/src/components/right-sidebar/FileExplorer.tsx index f59140530..0de598364 100644 --- a/src/renderer/src/components/right-sidebar/FileExplorer.tsx +++ b/src/renderer/src/components/right-sidebar/FileExplorer.tsx @@ -329,6 +329,16 @@ function FileExplorerInner(): React.JSX.Element { setBgMenuPoint({ x: e.clientX, y: e.clientY }) setBgMenuOpen(true) }} + onDoubleClick={(e) => { + if (!worktreePath || inlineInput) { + return + } + const target = e.target as HTMLElement + if (target.closest('[data-slot="context-menu-trigger"]')) { + return + } + startNew('file', worktreePath, 0) + }} > {isLoading && (