فهرست منبع

fix: add timeout message if command times out (#2986)

Aiden Cline 4 ماه پیش
والد
کامیت
bdf77701cf
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      packages/opencode/src/tool/bash.ts

+ 4 - 0
packages/opencode/src/tool/bash.ts

@@ -201,6 +201,10 @@ export const BashTool = Tool.define("bash", {
       output += "\n\n(Output was truncated due to length limit)"
       output += "\n\n(Output was truncated due to length limit)"
     }
     }
 
 
+    if (process.signalCode === "SIGTERM" && params.timeout) {
+      output += `\n\n(Command timed out after ${timeout} ms)`
+    }
+
     return {
     return {
       title: params.command,
       title: params.command,
       metadata: {
       metadata: {