Quellcode durchsuchen

fix: background agent prompting, lets kill this sleep behavior oml (#31162)

Aiden Cline vor 3 Monaten
Ursprung
Commit
b9131aa69c
1 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen
  1. 4 3
      packages/opencode/src/tool/task.ts

+ 4 - 3
packages/opencode/src/tool/task.ts

@@ -30,13 +30,13 @@ const BACKGROUND_DESCRIPTION = [
 ].join(" ")
 ].join(" ")
 const BACKGROUND_STARTED = [
 const BACKGROUND_STARTED = [
   "The task is working in the background. You will be notified automatically when it finishes.",
   "The task is working in the background. You will be notified automatically when it finishes.",
-  "Do not poll for progress, ask the task for status, or duplicate this task's work — avoid working with the same files or topics it is using.",
+  "DO NOT sleep, poll for progress, ask the task for status, or duplicate this task's work — avoid working with the same files or topics it is using.",
   "Work on non-overlapping tasks, or briefly tell the user what you launched and end your response.",
   "Work on non-overlapping tasks, or briefly tell the user what you launched and end your response.",
 ].join("\n")
 ].join("\n")
 const BACKGROUND_UPDATED = [
 const BACKGROUND_UPDATED = [
   "Additional context sent to the running background task.",
   "Additional context sent to the running background task.",
   "The task is still working in the background. You will be notified automatically when it finishes.",
   "The task is still working in the background. You will be notified automatically when it finishes.",
-  "Do not poll for progress, ask the task for status, or duplicate this task's work — avoid working with the same files or topics it is using.",
+  "DO NOT sleep, poll for progress, ask the task for status, or duplicate this task's work — avoid working with the same files or topics it is using.",
   "Work on non-overlapping tasks, or briefly tell the user what you sent and end your response.",
   "Work on non-overlapping tasks, or briefly tell the user what you sent and end your response.",
 ].join("\n")
 ].join("\n")
 
 
@@ -56,7 +56,8 @@ const BaseParameters = Schema.Struct(BaseParameterFields)
 export const Parameters = Schema.Struct({
 export const Parameters = Schema.Struct({
   ...BaseParameterFields,
   ...BaseParameterFields,
   background: Schema.optional(Schema.Boolean).annotate({
   background: Schema.optional(Schema.Boolean).annotate({
-    description: "Run the agent in the background. You will be notified when it completes.",
+    description:
+      "Run the agent in the background. You will be notified when it completes. DO NOT sleep, poll, or proactively check on its progress",
   }),
   }),
 })
 })