fix(acp): include structuredContent from MCP tool response (#10128)
This commit is contained in:
@@ -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[] {
|
||||
|
||||
Reference in New Issue
Block a user