75
const caption = toolInvocation.pastTenseMessage ?? toolInvocation.invocationMessage;
76
const pushImage = (mimeType: string, data: VSBuffer, outputIndex: number) => {
78
>
const permalinkBasename = ext ? `file${ext}` : 'file.bin';
79
>
const uri = ChatResponseResource.createUri(sessionResource, toolInvocation.toolCallId, outputIndex, permalinkBasename);
80
>
images.push({
81
>
id: `${toolInvocation.toolCallId}_${outputIndex}`,
82
>
uri,
83
>
name: localize('chatImageExtraction.imageName', "Image {0}", images.length + 1),
84
>
mimeType,
85
>
data,
86
>
source: localize('chatImageExtraction.toolSource', "Tool: {0}", toolInvocation.toolId),
87
>
caption,
88
>
});
89
>
};
90
91
if (isToolResultInputOutputDetails(resultDetails)) {