summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2026-02-14 01:21:41 -0500
committerDax Raad <[email protected]>2026-02-14 01:21:41 -0500
commitb020758446254e6c03b0182247b611ce1e5f2c55 (patch)
tree109fc19cb70dfbe7918d4412880f160d082f2466 /packages
parent179c40749d759e2b56cfa4abc49b587373540851 (diff)
downloadopencode-b020758446254e6c03b0182247b611ce1e5f2c55.tar.gz
opencode-b020758446254e6c03b0182247b611ce1e5f2c55.zip
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.
Diffstat (limited to 'packages')
-rw-r--r--packages/opencode/src/session/index.ts6
1 files 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(),