Sfoglia il codice sorgente

tweak: add ctx.abort to grep tool

Aiden Cline 7 mesi fa
parent
commit
4d2696e027
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      packages/opencode/src/tool/grep.ts

+ 1 - 0
packages/opencode/src/tool/grep.ts

@@ -54,6 +54,7 @@ export const GrepTool = Tool.define("grep", {
     const proc = Bun.spawn([rgPath, ...args], {
     const proc = Bun.spawn([rgPath, ...args], {
       stdout: "pipe",
       stdout: "pipe",
       stderr: "pipe",
       stderr: "pipe",
+      signal: ctx.abort,
     })
     })
 
 
     const output = await new Response(proc.stdout).text()
     const output = await new Response(proc.stdout).text()