mirror of https://github.com/buster-so/buster.git
Assumption cards can use markdown streaming
This commit is contained in:
parent
b08938e0fb
commit
00ff79c593
|
@ -14,6 +14,7 @@ import {
|
|||
import { CircleCheck, OctagonWarning } from '@/components/ui/icons';
|
||||
import { Pill } from '@/components/ui/pills/Pill';
|
||||
import { AppMarkdownStreaming } from '@/components/ui/streaming/AppMarkdownStreaming';
|
||||
import { AnimatedMarkdown } from '../../ui/typography/AnimatedMarkdown';
|
||||
|
||||
type MessageAssumptionsProps = Pick<
|
||||
PostProcessingMessage,
|
||||
|
@ -151,10 +152,10 @@ const AssumptionSummary = ({
|
|||
</Title>
|
||||
</div>
|
||||
<div className="mt-2">
|
||||
<AppMarkdownStreaming
|
||||
<AnimatedMarkdown
|
||||
content={summary_message}
|
||||
isStreamFinished={true}
|
||||
className="text-text-secondary"
|
||||
animation="none"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -272,9 +273,7 @@ const AssumptionCard = ({
|
|||
<Title as={'h4'} className="text-base">
|
||||
{title}
|
||||
</Title>
|
||||
<Paragraph size={'sm'} variant={'secondary'}>
|
||||
{explanation}
|
||||
</Paragraph>
|
||||
<AnimatedMarkdown content={explanation} animation="none" className="text-text-secondary" />
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between border-t px-3.5 py-2">
|
||||
|
|
|
@ -13,7 +13,7 @@ export interface AnimatedMarkdownProps {
|
|||
content: string;
|
||||
animation?: MarkdownAnimation;
|
||||
animationDuration?: number;
|
||||
isStreamFinished: boolean;
|
||||
isStreamFinished?: boolean;
|
||||
stripFormatting?: boolean;
|
||||
animationTimingFunction?: 'ease-in-out' | 'ease-in' | 'ease-out' | 'linear';
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ const remarkPlugins = [remarkGfm];
|
|||
|
||||
const AnimatedMarkdown: React.FC<AnimatedMarkdownProps> = ({
|
||||
content,
|
||||
animation = 'fadeIn',
|
||||
animation = 'none',
|
||||
animationDuration = 300,
|
||||
animationTimingFunction = 'ease-in-out',
|
||||
isStreamFinished = true,
|
||||
|
|
Loading…
Reference in New Issue