Update styling for todo and reasoning file types

This commit is contained in:
Nate Kelley 2025-07-14 12:07:29 -06:00
parent 3592ed51ac
commit c83d433510
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
3 changed files with 19 additions and 3 deletions

View File

@ -25,6 +25,10 @@ export const ReasoningFileButtons = React.memo(
return; return;
} }
if (fileType === 'todo') {
return;
}
return assetParamsToRoute({ return assetParamsToRoute({
chatId, chatId,
assetId: fileId, assetId: fileId,

View File

@ -29,7 +29,7 @@ export const ReasoningMessage_File: React.FC<ReasoningMessageFileProps> = React.
if (!file || !status || !file_type || !id) return null; if (!file || !status || !file_type || !id) return null;
return !isCompletedStream ? ( return !isCompletedStream ? (
<StreamingMessageStatus status={status} /> <StreamingMessageStatus status={status} fileType={file_type} />
) : ( ) : (
<ReasoningFileButtons <ReasoningFileButtons
fileType={file_type} fileType={file_type}

View File

@ -13,8 +13,20 @@ const animationProps: MotionProps = {
}; };
export const StreamingMessageStatus = React.memo( export const StreamingMessageStatus = React.memo(
({ status }: { status: BusterChatMessageReasoning_file['status'] }) => { ({
status,
fileType
}: {
status: BusterChatMessageReasoning_file['status'];
fileType: BusterChatMessageReasoning_file['file_type'];
}) => {
const content = useMemo(() => { const content = useMemo(() => {
if (fileType === 'todo' || fileType === 'agent-action' || fileType === 'reasoning') {
return null;
}
const _typeCheck: 'metric' | 'dashboard' = fileType;
if (status === 'loading') if (status === 'loading')
return ( return (
<div className="flex items-center gap-1.5"> <div className="flex items-center gap-1.5">
@ -36,7 +48,7 @@ export const StreamingMessageStatus = React.memo(
Failed <CircleWarning /> Failed <CircleWarning />
</Text> </Text>
); );
}, [status]); }, [status, fileType]);
return ( return (
<AnimatePresence mode="wait"> <AnimatePresence mode="wait">