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
@@ -31,6 +31,7 @@ export const IdentityContextModel = z.object({
channelIdentityId: z.string().min(1, 'Channel identity ID is required'),
displayName: z.string().min(1, 'Display name is required'),
currentPlatform: z.string().optional(),
replyTarget: z.string().optional(),
conversationType: z.string().optional(),
sessionToken: z.string().optional(),
})