mirror of https://github.com/buster-so/buster.git
Update styling for todo and reasoning file types
This commit is contained in:
parent
3592ed51ac
commit
c83d433510
|
@ -25,6 +25,10 @@ export const ReasoningFileButtons = React.memo(
|
|||
return;
|
||||
}
|
||||
|
||||
if (fileType === 'todo') {
|
||||
return;
|
||||
}
|
||||
|
||||
return assetParamsToRoute({
|
||||
chatId,
|
||||
assetId: fileId,
|
||||
|
|
|
@ -29,7 +29,7 @@ export const ReasoningMessage_File: React.FC<ReasoningMessageFileProps> = React.
|
|||
if (!file || !status || !file_type || !id) return null;
|
||||
|
||||
return !isCompletedStream ? (
|
||||
<StreamingMessageStatus status={status} />
|
||||
<StreamingMessageStatus status={status} fileType={file_type} />
|
||||
) : (
|
||||
<ReasoningFileButtons
|
||||
fileType={file_type}
|
||||
|
|
|
@ -13,8 +13,20 @@ const animationProps: MotionProps = {
|
|||
};
|
||||
|
||||
export const StreamingMessageStatus = React.memo(
|
||||
({ status }: { status: BusterChatMessageReasoning_file['status'] }) => {
|
||||
({
|
||||
status,
|
||||
fileType
|
||||
}: {
|
||||
status: BusterChatMessageReasoning_file['status'];
|
||||
fileType: BusterChatMessageReasoning_file['file_type'];
|
||||
}) => {
|
||||
const content = useMemo(() => {
|
||||
if (fileType === 'todo' || fileType === 'agent-action' || fileType === 'reasoning') {
|
||||
return null;
|
||||
}
|
||||
|
||||
const _typeCheck: 'metric' | 'dashboard' = fileType;
|
||||
|
||||
if (status === 'loading')
|
||||
return (
|
||||
<div className="flex items-center gap-1.5">
|
||||
|
@ -36,7 +48,7 @@ export const StreamingMessageStatus = React.memo(
|
|||
Failed <CircleWarning />
|
||||
</Text>
|
||||
);
|
||||
}, [status]);
|
||||
}, [status, fileType]);
|
||||
|
||||
return (
|
||||
<AnimatePresence mode="wait">
|
||||
|
|
Loading…
Reference in New Issue