Просмотр исходного кода

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

Aiden Cline 4 месяцев назад
Родитель
Сommit
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)"
     }
 
+    if (process.signalCode === "SIGTERM" && params.timeout) {
+      output += `\n\n(Command timed out after ${timeout} ms)`
+    }
+
     return {
       title: params.command,
       metadata: {