- {images.map((block, index) =>
)}
+ {renderImages({ images, align: 'start' })}
)
}
@@ -1404,12 +1389,12 @@ function ToolOutputBlocks({
blocks,
error,
preview,
- t,
+ renderImages,
}: {
blocks: readonly TrajectorySourceBlock[]
error: boolean
preview: boolean
- t: TrajectoryTranslate
+ renderImages: RenderMessageImages
}) {
return (
value !== undefined).join(' ')}
>
{blocks.map((block, index) => (
- block.imageSrc !== undefined
- ?
+ block.attachment !== undefined
+ ? (
+
+ {renderImages({ images: [{ attachment: block.attachment }], align: 'start' })}
+
+ )
: block.content !== ''
?
{block.content}
: null
@@ -1436,6 +1425,7 @@ function MarkdownRecordContent({
thinkingExpanded,
onThinkingExpandedChange,
onOpenCall,
+ renderImages,
t,
}: {
record: TableRecord
@@ -1444,10 +1434,18 @@ function MarkdownRecordContent({
thinkingExpanded: boolean
onThinkingExpandedChange: (expanded: boolean) => void
onOpenCall: (callId: string) => void
+ renderImages: RenderMessageImages
t: TrajectoryTranslate
}) {
if (!rendered && record.cell.sourceBlocks && record.cell.sourceBlocks.length > 0) {
- return
+ return (
+
+ )
}
if (record.cell.thinkingDetail) {
if (!rendered) {
@@ -1502,13 +1500,13 @@ function MarkdownRecordContent({
)
}
const source = markdownSource(record)
- const hasImages = record.cell.sourceBlocks?.some(block => block.imageSrc !== undefined) === true
+ const hasImages = record.cell.sourceBlocks?.some(block => block.attachment !== undefined) === true
const hasToolCalls = record.cell.kind === 'message'
&& record.cell.sourceBlocks?.some(block => block.type === 'tool-call') === true
if (!source && !hasImages && !hasToolCalls) {
@@ -1531,7 +1529,7 @@ function MarkdownRecordContent({
t={t}
/>
)}
-