Przeglądaj źródła

fix: snapshot undo bug (#3290)

Aiden Cline 4 miesięcy temu
rodzic
commit
5d3a88f34f

+ 0 - 2
packages/opencode/src/project/bootstrap.ts

@@ -2,7 +2,6 @@ import { Plugin } from "../plugin"
 import { Share } from "../share/share"
 import { Share } from "../share/share"
 import { Format } from "../format"
 import { Format } from "../format"
 import { LSP } from "../lsp"
 import { LSP } from "../lsp"
-import { Snapshot } from "../snapshot"
 import { FileWatcher } from "../file/watcher"
 import { FileWatcher } from "../file/watcher"
 import { File } from "../file"
 import { File } from "../file"
 import { Flag } from "../flag/flag"
 import { Flag } from "../flag/flag"
@@ -13,7 +12,6 @@ export async function InstanceBootstrap() {
   Share.init()
   Share.init()
   Format.init()
   Format.init()
   LSP.init()
   LSP.init()
-  Snapshot.init()
   FileWatcher.init()
   FileWatcher.init()
   File.init()
   File.init()
 }
 }

+ 0 - 14
packages/opencode/src/snapshot/index.ts

@@ -10,20 +10,6 @@ import { Instance } from "../project/instance"
 export namespace Snapshot {
 export namespace Snapshot {
   const log = Log.create({ service: "snapshot" })
   const log = Log.create({ service: "snapshot" })
 
 
-  export function init() {
-    Array.fromAsync(
-      new Bun.Glob("**/snapshot").scan({
-        absolute: true,
-        onlyFiles: false,
-        cwd: Global.Path.data,
-      }),
-    ).then((files) => {
-      for (const file of files) {
-        fs.rmdir(file, { recursive: true })
-      }
-    })
-  }
-
   export async function track() {
   export async function track() {
     if (Instance.project.vcs !== "git") return
     if (Instance.project.vcs !== "git") return
     const cfg = await Config.get()
     const cfg = await Config.get()