mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-07 05:39:05 +08:00
fix: display image from mcp response (#5780)
This commit is contained in:
parent
3bd7a9fbe8
commit
671bc64529
@ -438,8 +438,8 @@ export async function parseAndCallTools(
|
|||||||
upsertMCPToolResponse(toolResponses, { id: `${tool.id}-${idx}-${i}`, tool: tool.tool, status: 'invoking' }, onChunk)
|
upsertMCPToolResponse(toolResponses, { id: `${tool.id}-${idx}-${i}`, tool: tool.tool, status: 'invoking' }, onChunk)
|
||||||
}
|
}
|
||||||
|
|
||||||
const images: string[] = []
|
|
||||||
const toolPromises = tools.map(async (tool, i) => {
|
const toolPromises = tools.map(async (tool, i) => {
|
||||||
|
const images: string[] = []
|
||||||
const toolCallResponse = await callMCPTool(tool.tool)
|
const toolCallResponse = await callMCPTool(tool.tool)
|
||||||
upsertMCPToolResponse(
|
upsertMCPToolResponse(
|
||||||
toolResponses,
|
toolResponses,
|
||||||
@ -454,6 +454,9 @@ export async function parseAndCallTools(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (images.length) {
|
if (images.length) {
|
||||||
|
onChunk({
|
||||||
|
type: ChunkType.IMAGE_CREATED
|
||||||
|
})
|
||||||
onChunk({
|
onChunk({
|
||||||
type: ChunkType.IMAGE_COMPLETE,
|
type: ChunkType.IMAGE_COMPLETE,
|
||||||
image: {
|
image: {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user