diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx index 2cf55aa65c..28b1f62f69 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx @@ -513,9 +513,7 @@ export function Prompt(props: PromptProps) { value, renderer, cwd: - (project.instance.path().worktree === "/" - ? undefined - : project.instance.path().worktree) || + (project.instance.path().worktree === "/" ? undefined : project.instance.path().worktree) || project.instance.directory() || process.cwd(), }) diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx index 4436ac423b..debc0341a2 100644 --- a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx @@ -969,9 +969,7 @@ export function Session() { value: transcript, renderer, cwd: - (project.instance.path().worktree === "/" - ? undefined - : project.instance.path().worktree) || + (project.instance.path().worktree === "/" ? undefined : project.instance.path().worktree) || project.instance.directory() || process.cwd(), }) @@ -987,9 +985,7 @@ export function Session() { value: transcript, renderer, cwd: - (project.instance.path().worktree === "/" - ? undefined - : project.instance.path().worktree) || + (project.instance.path().worktree === "/" ? undefined : project.instance.path().worktree) || project.instance.directory() || process.cwd(), })