fix(agent): reject send tool when targeting the same conversation

Pass replyTarget through the full pipeline (ChatRequest → gateway
identity → agent headers → MCP session) so the send tool can detect
when the destination matches the current conversation and return an
error guiding the agent to reply directly instead.
This commit is contained in:
Acbox
2026-03-11 16:59:42 +08:00
parent a2e5c4f893
commit 30653fbdbf
8 changed files with 40 additions and 2 deletions
+1
View File
@@ -225,6 +225,7 @@ type ChatRequest struct {
RouteID string `json:"-"`
ChatToken string `json:"-"`
ExternalMessageID string `json:"-"`
ReplyTarget string `json:"-"`
ConversationType string `json:"-"`
ConversationName string `json:"-"`
UserMessagePersisted bool `json:"-"`