From 8385cc2f44f5ea28b64ff0695df94913a07169a7 Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" Date: Wed, 10 Jun 2026 05:03:26 +0000 Subject: [PATCH 1/2] fix(tui): label worktree copy as session location --- packages/tui/src/app.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/tui/src/app.tsx b/packages/tui/src/app.tsx index edf9085ae8..c46fa0b028 100644 --- a/packages/tui/src/app.tsx +++ b/packages/tui/src/app.tsx @@ -579,15 +579,15 @@ function App(props: { onSnapshot?: () => Promise; pluginHost: TuiPlugi }, { name: "workspace.copy_path", - title: "Copy worktree path", - category: "Workspace", + title: "Copy session location", + category: "Session", enabled: () => currentWorktreeWorkspace() !== undefined, run: async () => { const workspace = currentWorktreeWorkspace() if (!workspace?.directory) return await clipboard .write?.(workspace.directory) - .then(() => toast.show({ message: "Copied worktree path", variant: "info" })) + .then(() => toast.show({ message: "Copied session location", variant: "info" })) .catch(toast.error) dialog.clear() }, From 3a5d684c690cab755599073e603d8c59d377f96a Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" Date: Wed, 10 Jun 2026 05:07:35 +0000 Subject: [PATCH 2/2] fix(tui): copy active session directory --- packages/tui/src/app.tsx | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/packages/tui/src/app.tsx b/packages/tui/src/app.tsx index c46fa0b028..c49778291b 100644 --- a/packages/tui/src/app.tsx +++ b/packages/tui/src/app.tsx @@ -534,12 +534,9 @@ function App(props: { onSnapshot?: () => Promise; pluginHost: TuiPlugi ) const connected = useConnected() - const currentWorktreeWorkspace = createMemo(() => { - const workspaceID = project.workspace.current() - if (!workspaceID) return - const workspace = project.workspace.get(workspaceID) - if (workspace?.type !== "worktree" || !workspace.directory) return - return workspace + const currentSessionLocation = createMemo(() => { + if (route.data.type !== "session") return + return sync.session.get(route.data.sessionID)?.directory }) const appCommands = createMemo(() => [ @@ -578,15 +575,15 @@ function App(props: { onSnapshot?: () => Promise; pluginHost: TuiPlugi }, }, { - name: "workspace.copy_path", + name: "session.copy_location", title: "Copy session location", category: "Session", - enabled: () => currentWorktreeWorkspace() !== undefined, + enabled: () => currentSessionLocation() !== undefined, run: async () => { - const workspace = currentWorktreeWorkspace() - if (!workspace?.directory) return + const directory = currentSessionLocation() + if (!directory) return await clipboard - .write?.(workspace.directory) + .write?.(directory) .then(() => toast.show({ message: "Copied session location", variant: "info" })) .catch(toast.error) dialog.clear()