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>
This commit is contained in:
opencode-agent[bot]
2026-09-08 12:46:57 -04:00
committed by GitHub
Unverified
parent 4432956490
commit ccbc018072
2 changed files with 1 additions and 7 deletions
@@ -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) => {
@@ -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 {