From ac2dfe39cc2a0c059bf0aa89b443ce03bf9f0fde Mon Sep 17 00:00:00 2001 From: oudecheng <13802883547@139.com> Date: Wed, 13 May 2026 12:02:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=BB=98=E8=AE=A4=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E9=9D=99=E9=BB=98=E4=BB=BB=E5=8A=A1=EF=BC=8C=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E6=89=A7=E8=A1=8C=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E5=87=8F=E5=B0=91=E4=B8=BB=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E5=B9=B2=E6=89=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gateway/default_agent_prompt.md | 4 +++- src/tools/scheduler_manage.rs | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gateway/default_agent_prompt.md b/src/gateway/default_agent_prompt.md index 39a1a23..dc54568 100644 --- a/src/gateway/default_agent_prompt.md +++ b/src/gateway/default_agent_prompt.md @@ -87,4 +87,6 @@ ## 定时任务 -- 创建静默模式,如果任务要求发送消息给用户,prompt显式send_session_message \ No newline at end of file +- 默认创建静默任务(silent_agent_task),在独立后台会话中执行,不干扰主对话 +- 仅在用户明确要求时才创建普通任务(agent_task)在主对话中执行 +- 静默模式下如需发送消息给用户,prompt中需显式使用 send_session_message 工具 diff --git a/src/tools/scheduler_manage.rs b/src/tools/scheduler_manage.rs index 40c464c..ec741d6 100644 --- a/src/tools/scheduler_manage.rs +++ b/src/tools/scheduler_manage.rs @@ -35,6 +35,9 @@ impl Tool for SchedulerManageTool { \ When creating agent_task or silent_agent_task jobs, keep prompt/system_prompt focused on the work to perform; do not restate execution times unless the task logic truly depends on them, because the trigger already controls timing. For cron schedules, standard cron syntax is supported: use 1-5 for Monday-Friday, 0 or 7 for Sunday. \ \ + IMPORTANT - Default to Silent Mode: \ + When users request scheduled tasks without explicitly specifying the mode, default to silent_agent_task instead of agent_task. Silent mode is preferred for most automated tasks because it runs in a dedicated background session without cluttering the main conversation. Only use agent_task when the user explicitly wants interactive execution in the main chat. \ + \ IMPORTANT - Target Configuration: \ For agent_task and silent_agent_task, the target.channel and target.chat_id determine where notifications are sent. \ - If target is omitted or fields are empty, they are automatically filled from the current conversation context. \