瀏覽代碼

fix(session): ignore instruction lookup errors (#27656)

James Long 3 月之前
父節點
當前提交
af06e52708
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      packages/opencode/src/session/instruction.ts

+ 3 - 1
packages/opencode/src/session/instruction.ts

@@ -118,7 +118,9 @@ export const layer: Layer.Layer<
       // The first project-level match wins so we don't stack AGENTS.md/CLAUDE.md from every ancestor.
       if (!Flag.OPENCODE_DISABLE_PROJECT_CONFIG) {
         for (const file of FILES) {
-          const matches = yield* fs.findUp(file, ctx.directory, ctx.worktree)
+          const matches = yield* fs
+            .findUp(file, ctx.directory, ctx.worktree)
+            .pipe(Effect.catch(() => Effect.succeed([])))
           if (matches.length > 0) {
             matches.forEach((item) => paths.add(path.resolve(item)))
             break