feat: 更新工具描述,添加重要的目标配置说明以优化任务执行逻辑

This commit is contained in:
oudecheng 2026-05-13 10:20:57 +08:00
parent 9d3d8b812c
commit 79f9e36871

View File

@ -31,7 +31,16 @@ impl Tool for SchedulerManageTool {
}
fn description(&self) -> &str {
"Manage repository-backed scheduled jobs. Supports actions: list, get, put, delete, pause, resume. Jobs are persisted by the configured scheduler job repository and executed by the scheduler runtime. 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."
"Manage repository-backed scheduled jobs. Supports actions: list, get, put, delete, pause, resume. Jobs are persisted by the configured scheduler job repository and executed by the scheduler runtime. \
\
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 - 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. \
- To send to the current conversation: omit target or set target fields to null/empty. \
- To send to a specific target: explicitly provide channel (e.g., 'feishu', 'wechat', 'cli') and chat_id (e.g., 'oc_xxx'). \
- Do NOT use placeholder values like 'current' or 'default' - these will be treated as literal values and cause message delivery failures."
}
fn parameters_schema(&self) -> serde_json::Value {