From b7a637f1890153b4e9f7ae95784ff86494a5ba74 Mon Sep 17 00:00:00 2001 From: Alexander Davydov Date: Tue, 17 Mar 2026 16:32:16 +0300 Subject: [PATCH] tools finally work --- src/agents/system-prompt.test.ts | 1 + src/agents/system-prompt.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/agents/system-prompt.test.ts b/src/agents/system-prompt.test.ts index 3877f6fed21..14a409e88a2 100644 --- a/src/agents/system-prompt.test.ts +++ b/src/agents/system-prompt.test.ts @@ -554,6 +554,7 @@ describe("buildAgentSystemPrompt", () => { expect(prompt).toContain("message: Send messages and channel actions"); expect(prompt).toContain("### message tool"); + expect(prompt).toContain("For `action=send`, include `target` and `message`."); expect(prompt).toContain(`respond with ONLY: ${SILENT_REPLY_TOKEN}`); }); diff --git a/src/agents/system-prompt.ts b/src/agents/system-prompt.ts index 848222b7880..94d859f4e92 100644 --- a/src/agents/system-prompt.ts +++ b/src/agents/system-prompt.ts @@ -140,7 +140,7 @@ function buildMessagingSection(params: { "", "### message tool", "- Use `message` for proactive sends + channel actions (polls, reactions, etc.).", - "- For `action=send`, include `to` and `message`.", + "- For `action=send`, include `target` and `message`.", `- If multiple channels are configured, pass \`channel\` (${params.messageChannelOptions}).`, `- If you use \`message\` (\`action=send\`) to deliver your user-visible reply, respond with ONLY: ${SILENT_REPLY_TOKEN} (avoid duplicate replies).`, params.inlineButtonsEnabled