瀏覽代碼

chore: generate

opencode-agent[bot] 5 月之前
父節點
當前提交
605559b165
共有 2 個文件被更改,包括 4 次插入7 次删除
  1. 3 3
      packages/opencode/src/session/index.ts
  2. 1 4
      packages/opencode/test/storage/storage.test.ts

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

@@ -586,9 +586,9 @@ export namespace Session {
       })
       })
 
 
       const diff = Effect.fn("Session.diff")(function* (sessionID: SessionID) {
       const diff = Effect.fn("Session.diff")(function* (sessionID: SessionID) {
-        return yield* storage.read<Snapshot.FileDiff[]>(["session_diff", sessionID]).pipe(
-          Effect.orElseSucceed((): Snapshot.FileDiff[] => []),
-        )
+        return yield* storage
+          .read<Snapshot.FileDiff[]>(["session_diff", sessionID])
+          .pipe(Effect.orElseSucceed((): Snapshot.FileDiff[] => []))
       })
       })
 
 
       const messages = Effect.fn("Session.messages")(function* (input: { sessionID: SessionID; limit?: number }) {
       const messages = Effect.fn("Session.messages")(function* (input: { sessionID: SessionID; limit?: number }) {

+ 1 - 4
packages/opencode/test/storage/storage.test.ts

@@ -11,9 +11,7 @@ import { testEffect } from "../lib/effect"
 
 
 const dir = path.join(Global.Path.data, "storage")
 const dir = path.join(Global.Path.data, "storage")
 
 
-const it = testEffect(
-  Layer.mergeAll(Storage.defaultLayer, AppFileSystem.defaultLayer, CrossSpawnSpawner.defaultLayer),
-)
+const it = testEffect(Layer.mergeAll(Storage.defaultLayer, AppFileSystem.defaultLayer, CrossSpawnSpawner.defaultLayer))
 
 
 const scope = Effect.fnUntraced(function* () {
 const scope = Effect.fnUntraced(function* () {
   const root = ["storage_test", crypto.randomUUID()]
   const root = ["storage_test", crypto.randomUUID()]
@@ -293,4 +291,3 @@ describe("Storage", () => {
     }),
     }),
   )
   )
 })
 })
-