fix(acp): include structuredContent from MCP tool response (#10128)

This commit is contained in:
Chih-Tao Lee 2026-07-02 10:26:11 -04:00 committed by GitHub
parent 402ff562b3
commit de331d78ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -184,11 +184,17 @@ function toolResultValue(
update: ToolCallUpdate,
mcpAppMeta: DesktopMcpAppMeta | undefined
): ToolResultValue {
return {
const toolResult: ToolResultValue = {
content: toolResultContent(update),
isError: false,
...(mcpAppMeta ? { _meta: mcpAppMeta } : {}),
};
if (update.rawOutput !== undefined) {
toolResult.structuredContent = update.rawOutput;
}
return toolResult;
}
function toolResultContent(update: ToolCallUpdate): GooseContentBlock[] {