fix: inject agent_id into system prompt for all WS handlers + enhance schedule_delete
- All 5 WS handlers (lingxi/feishu/orange/suyao/tiantian) now inject agent_id into LLM system prompt so agents know their own ID for schedule_list calls - schedule_delete_tool now supports agent_id parameter for ownership checks and bulk delete by agent_id - SCHEDULE_DELETE_SCHEMA updated: required fields now empty, supports both schedule_id and agent_id params Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -176,7 +176,11 @@ async def _handle_message_async(data):
|
||||
|
||||
config = AgentConfig(
|
||||
name=agent.name or "agent",
|
||||
system_prompt=system_prompt,
|
||||
system_prompt=system_prompt + (
|
||||
f"\n\n## 系统信息\n"
|
||||
f"你的 Agent ID 是: {agent.id}\n"
|
||||
f"在调用 schedule_list、schedule_delete 等工具时,使用此 ID 作为 agent_id 参数。"
|
||||
),
|
||||
llm=AgentLLMConfig(
|
||||
model=model,
|
||||
provider=provider,
|
||||
|
||||
Reference in New Issue
Block a user