+
+
Converted
+
+ {convertedFileChip.iconKind === 'image' && '🖼️'}
+ {convertedFileChip.iconKind === 'audio' && '🎵'}
+ {convertedFileChip.iconKind === 'video' && '🎥'}
+ {convertedFileChip.iconKind === 'file' && '📄'}
+
+
+ {convertedFileChip.name}
+
+
+
+
+ Open
+
+
+
}
+ onClick={onClearConvertedFileChip}
+ data-testid="clear-converted-file-chip"
+ />
+
+ {convertedFileChip.iconKind === 'image' && (
+

+ )}
+ {convertedFileChip.iconKind === 'audio' && (
+
+ )}
+ {convertedFileChip.iconKind === 'video' && (
+
+ )}
+
+ )}
>
)
}
@@ -255,11 +324,14 @@ interface ChatInputAreaProps {
onClearConversion: () => void
onConvertedValueChange: (value: string) => void
converterOutputDataTypes?: string[]
- mediaConversions?: Array<{ pieceType: string; convertedValue: string }>
+ mediaConversions?: Array<{ pieceType: string; convertedValue: string; convertedDataType: string }>
onClearMediaConversion: (pieceType: string) => void
+ /** Chip describing a text→file conversion (e.g. PDFConverter output). */
+ convertedFileChip?: ConvertedFileChip | null
+ onClearConvertedFileChip?: () => void
}
-const ChatInputArea = forwardRef