From d38b6dfc0a4108201e127ab2bb67fd61546a1db1 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Wed, 25 Mar 2026 18:18:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E5=BF=83=E8=B7=B3?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E8=AF=8D=EF=BC=8C=E5=90=8E=E5=8F=B0=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=8F=AA=E7=94=9F=E6=88=90=E6=89=A7=E8=A1=8C=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E6=91=98=E8=A6=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/agent/__init__.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/agent/__init__.py b/app/agent/__init__.py index 24744432..6223d9de 100644 --- a/app/agent/__init__.py +++ b/app/agent/__init__.py @@ -406,13 +406,18 @@ class AgentManager: # 英文提示词,便于大模型理解 heartbeat_message = ( - "[System Heartbeat Wake-up] Please check all jobs in your jobs directory and process pending tasks:\n" + "[System Heartbeat] Check all jobs in your jobs directory and process pending tasks:\n" "1. List all jobs with status 'pending' or 'in_progress'\n" - "2. For 'recurring' jobs, check the 'last_run' timestamp to determine if it's time to run again\n" + "2. For 'recurring' jobs, check 'last_run' to determine if it's time to run again\n" "3. For 'once' jobs with status 'pending', execute them now\n" "4. After executing each job, update its status, 'last_run' time, and execution log in the JOB.md file\n" - "5. If there are no pending jobs, simply respond with a brief summary\n" - "IMPORTANT: Respond in Chinese (中文). Begin checking and processing jobs now." + "5. If there are no pending jobs, do NOT generate any response\n\n" + "IMPORTANT: This is a background system task, NOT a user conversation. " + "Your final response will be broadcast as a notification. " + "Only output a brief completion summary listing each executed job and its result. " + "Do NOT include greetings, explanations, or conversational text. " + "If no jobs were executed, output nothing. " + "Respond in Chinese (中文)." ) await self.process_message(