Skip to content

Commit

Permalink
fix: show [image] for multi-modal in text export
Browse files Browse the repository at this point in the history
  • Loading branch information
pionxzh committed Nov 5, 2023
1 parent 249ffb9 commit ddfbee7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/userscript/src/exporter/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ function transformContent(
case 'multimodal_text': {
return content.parts?.map((part) => {
if (typeof part === 'string') return postProcess(part)
if (part.asset_pointer) return `![image](${part.asset_pointer})`
// We show `[image]` for multimodal as the base64 string is too long. This is bad for sharing pure text.
if (part.asset_pointer) return '[image]'
return postProcess('[Unsupported multimodal content]')
}).join('\n') || ''
}
Expand Down

0 comments on commit ddfbee7

Please sign in to comment.