From ccbc018072c2c23e1331cb84b45515b351564365 Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" <219766164+opencode-agent[bot]@users.noreply.github.com> Date: Tue, 8 Sep 2026 12:46:57 -0400 Subject: [PATCH] fix(tui): honor configured worktree strategy (#47991) Co-authored-by: nexxeln <95541290+nexxeln@users.noreply.github.com> Co-authored-by: Hona <10430890+Hona@users.noreply.github.com> --- packages/tui/src/component/dialog-open.tsx | 2 -- packages/tui/test/cli/tui/dialog-open.test.tsx | 6 +----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/tui/src/component/dialog-open.tsx b/packages/tui/src/component/dialog-open.tsx index e2fb4373ed3..4f4a3a888e9 100644 --- a/packages/tui/src/component/dialog-open.tsx +++ b/packages/tui/src/component/dialog-open.tsx @@ -458,8 +458,6 @@ export function DialogOpen(props: { sessions: SessionInfo[]; onLoad: (sessions: directory: data.project.get(id)!.canonical, workspace: workspaceID(), }, - strategy: "git", - directory: path.join(paths.worktree, id.slice(0, 6)), ...(value.trim() ? { name: value.trim() } : {}), }) .then((created) => { diff --git a/packages/tui/test/cli/tui/dialog-open.test.tsx b/packages/tui/test/cli/tui/dialog-open.test.tsx index bfae5d8ce59..07609c34a12 100644 --- a/packages/tui/test/cli/tui/dialog-open.test.tsx +++ b/packages/tui/test/cli/tui/dialog-open.test.tsx @@ -509,11 +509,7 @@ test.each(["", "search-ui"])("creates a worktree named '%s' and opens it in the fixture.app.mockInput.pressEnter() await fixture.app.waitFor(() => fixture.route.data.type === "home") - expect(payload).toEqual({ - strategy: "git", - directory: path.join("/tmp/opencode", projectID.slice(0, 6)), - ...(name ? { name } : {}), - }) + expect(payload).toEqual(name ? { name } : {}) expect(fixture.route.data).toEqual({ type: "home", location: { directory: created, workspaceID } }) expect(fixture.location.ref).toEqual({ directory: created, workspaceID }) } finally {