From b020758446254e6c03b0182247b611ce1e5f2c55 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Sat, 14 Feb 2026 01:21:41 -0500 Subject: [PATCH] tui: show all project sessions from any working directory Previously sessions were only listed if they were created in the current working directory or its subdirectories. Users can now view and switch to any session in the project regardless of which directory they're in. --- packages/opencode/src/session/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/opencode/src/session/index.ts b/packages/opencode/src/session/index.ts index 5f889385c..38007a0a7 100644 --- a/packages/opencode/src/session/index.ts +++ b/packages/opencode/src/session/index.ts @@ -507,8 +507,8 @@ export namespace Session { export function* list() { const project = Instance.project - const rel = path.relative(Instance.worktree, Instance.directory) - const suffix = path.sep + rel + // const rel = path.relative(Instance.worktree, Instance.directory) + // const suffix = path.sep + rel const rows = Database.use((db) => db .select() @@ -516,7 +516,7 @@ export namespace Session { .where( and( eq(SessionTable.project_id, project.id), - or(eq(SessionTable.directory, Instance.directory), like(SessionTable.directory, `%${suffix}`)), + // or(eq(SessionTable.directory, Instance.directory), like(SessionTable.directory, `%${suffix}`)), ), ) .all(),