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