fix(tui): open external editor in worktree cwd (#29130)

This commit is contained in:
James Long
2026-05-24 22:40:40 -04:00
committed by GitHub
parent 5ca613e28e
commit d5f397a2da
3 changed files with 17 additions and 4 deletions
@@ -509,7 +509,11 @@ export function Prompt(props: PromptProps) {
const nonTextParts = store.prompt.parts.filter((p) => p.type !== "text")
const value = text
const content = await Editor.open({ value, renderer })
const content = await Editor.open({
value,
renderer,
cwd: project.instance.path().worktree || project.instance.directory() || process.cwd(),
})
if (!content) return
input.setText(content)