Skip to content

Commit b020758

Browse files
committed
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.
1 parent 179c407 commit b020758

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/opencode/src/session/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,16 +507,16 @@ export namespace Session {
507507

508508
export function* list() {
509509
const project = Instance.project
510-
const rel = path.relative(Instance.worktree, Instance.directory)
511-
const suffix = path.sep + rel
510+
// const rel = path.relative(Instance.worktree, Instance.directory)
511+
// const suffix = path.sep + rel
512512
const rows = Database.use((db) =>
513513
db
514514
.select()
515515
.from(SessionTable)
516516
.where(
517517
and(
518518
eq(SessionTable.project_id, project.id),
519-
or(eq(SessionTable.directory, Instance.directory), like(SessionTable.directory, `%${suffix}`)),
519+
// or(eq(SessionTable.directory, Instance.directory), like(SessionTable.directory, `%${suffix}`)),
520520
),
521521
)
522522
.all(),

0 commit comments

Comments
 (0)