feat(file-explorer): double-click empty space to create new file (#889)

This commit is contained in:
Kelvin Amoaba
2026-04-22 15:41:44 -07:00
committed by GitHub
parent 0ace379c9e
commit f1f9ac3ddb
@@ -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 && (
<div className="flex items-center justify-center h-full text-[11px] text-muted-foreground">