Quellcode durchsuchen

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.
Dax Raad vor 6 Monaten
Ursprung
Commit
b020758446
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 3 3
      packages/opencode/src/session/index.ts

+ 3 - 3
packages/opencode/src/session/index.ts

@@ -507,8 +507,8 @@ export namespace Session {
 
 
   export function* list() {
   export function* list() {
     const project = Instance.project
     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) =>
     const rows = Database.use((db) =>
       db
       db
         .select()
         .select()
@@ -516,7 +516,7 @@ export namespace Session {
         .where(
         .where(
           and(
           and(
             eq(SessionTable.project_id, project.id),
             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(),
         .all(),