Просмотр исходного кода

fix undo/redo when opencode is run in nested folders

Dax Raad 6 месяцев назад
Родитель
Сommit
7d095d19f6
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      packages/opencode/src/snapshot/index.ts

+ 2 - 2
packages/opencode/src/snapshot/index.ts

@@ -43,7 +43,7 @@ export namespace Snapshot {
     }
     }
     await $`git --git-dir ${git} add .`.quiet().cwd(app.path.cwd).nothrow()
     await $`git --git-dir ${git} add .`.quiet().cwd(app.path.cwd).nothrow()
     const hash = await $`git --git-dir ${git} write-tree`.quiet().cwd(app.path.cwd).nothrow().text()
     const hash = await $`git --git-dir ${git} write-tree`.quiet().cwd(app.path.cwd).nothrow().text()
-    log.info("tracking", { hash })
+    log.info("tracking", { hash, cwd: app.path.cwd, git })
     return hash.trim()
     return hash.trim()
   }
   }
 
 
@@ -65,7 +65,7 @@ export namespace Snapshot {
         .split("\n")
         .split("\n")
         .map((x) => x.trim())
         .map((x) => x.trim())
         .filter(Boolean)
         .filter(Boolean)
-        .map((x) => path.join(app.path.cwd, x)),
+        .map((x) => path.join(app.path.root, x)),
     }
     }
   }
   }