Преглед изворни кода

fix(core): contain lsp warmup defects (#30226)

Shoubhit Dash пре 2 месеци
родитељ
комит
d85f8cd4d8
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      packages/opencode/src/tool/read.ts

+ 2 - 1
packages/opencode/src/tool/read.ts

@@ -87,7 +87,8 @@ export const ReadTool = Tool.define(
     })
     })
 
 
     const warm = Effect.fn("ReadTool.warm")(function* (filepath: string) {
     const warm = Effect.fn("ReadTool.warm")(function* (filepath: string) {
-      yield* lsp.touchFile(filepath).pipe(Effect.ignore, Effect.forkIn(scope))
+      // LSP warm-up is optional; do not let a background defect fail an otherwise successful read.
+      yield* lsp.touchFile(filepath).pipe(Effect.ignoreCause, Effect.forkIn(scope))
     })
     })
 
 
     const readSample = Effect.fn("ReadTool.readSample")(function* (
     const readSample = Effect.fn("ReadTool.readSample")(function* (