fix: add missing id/sessionID/messageID to MCP tool attachments (#14345)

This commit is contained in:
NatChung
2026-02-20 08:26:29 +08:00
committed by Aiden Cline
parent 8ad60b1ec2
commit d2d7a37bca

View File

@@ -906,7 +906,12 @@ export namespace SessionPrompt {
title: "",
metadata,
output: truncated.content,
attachments,
attachments: attachments.map((attachment) => ({
...attachment,
id: Identifier.ascending("part"),
sessionID: ctx.sessionID,
messageID: input.processor.message.id,
})),
content: result.content, // directly return content to preserve ordering when outputting to model
}
}