fix: preserve multimodal tool image exports

This commit is contained in:
shallfun
2026-04-29 15:21:42 +08:00
committed by Pionxzh
parent 3d491744f4
commit 7998a4fcc5

View File

@@ -707,14 +707,13 @@ export function shouldSkipMessageInExport(message?: ConversationNodeMessage): bo
const hasExecutionImages = message.content.content_type === 'execution_output'
&& !!message.metadata?.aggregate_result?.messages?.some(msg => msg.message_type === 'image')
const hasDalleImage = message.content.content_type === 'multimodal_text'
const hasMultimodalImage = message.content.content_type === 'multimodal_text'
&& message.content.parts.some((part) => {
return typeof part !== 'string'
&& part.content_type === 'image_asset_pointer'
&& !!part.metadata?.dalle
})
if (!hasExecutionImages && !hasDalleImage) {
if (!hasExecutionImages && !hasMultimodalImage) {
return true
}
}