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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fileType === 'todo') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
return assetParamsToRoute({
|
return assetParamsToRoute({
|
||||||
chatId,
|
chatId,
|
||||||
assetId: fileId,
|
assetId: fileId,
|
||||||
|
|
|
@ -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}
|
||||||
|
|
|
@ -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">
|
||||||
|
|
Loading…
Reference in New Issue