Fix BUS-1522: Replace AnimatedMarkdown with AppMarkdownStreaming and default stripFormatting to true

- Replace AnimatedMarkdown with AppMarkdownStreaming in AssumptionSummary and AssumptionCard components
- Set isStreamFinished=true and stripFormatting=true for both instances
- Update AppMarkdownStreaming component to default stripFormatting to true
- Update AnimatedMarkdown component to default stripFormatting to true for consistency
- Update useMarkdownComponents to default stripFormatting to true
- Remove unused AnimatedMarkdown import from MessageAssumptions.tsx

Co-Authored-By: nate@buster.so <nate@buster.so>
This commit is contained in:
Devin AI 2025-07-24 21:15:17 +00:00
parent 4d61349c6c
commit b5681a67f7
4 changed files with 17 additions and 14 deletions

View File

@ -13,8 +13,7 @@ import {
} from '@/lib/messages/confidence-translations'; } from '@/lib/messages/confidence-translations';
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/AppMarkdownStreaming';
import { AnimatedMarkdown } from '../../ui/typography/AnimatedMarkdown';
type MessageAssumptionsProps = Pick< type MessageAssumptionsProps = Pick<
PostProcessingMessage, PostProcessingMessage,
@ -151,13 +150,12 @@ const AssumptionSummary = ({
{summary_title} {summary_title}
</Title> </Title>
</div> </div>
<div className="mt-2"> <AppMarkdownStreaming
<AnimatedMarkdown content={summary_message}
content={summary_message} isStreamFinished={true}
className="text-text-secondary" stripFormatting={true}
animation="none" className="mt-2 text-text-secondary"
/> />
</div>
</div> </div>
); );
}; };
@ -273,7 +271,12 @@ const AssumptionCard = ({
<Title as={'h4'} className="text-base"> <Title as={'h4'} className="text-base">
{title} {title}
</Title> </Title>
<AnimatedMarkdown content={explanation} animation="none" className="text-text-secondary" /> <AppMarkdownStreaming
content={explanation}
isStreamFinished={true}
stripFormatting={true}
className="text-text-secondary text-sm"
/>
</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">

View File

@ -16,7 +16,7 @@ const AppMarkdownStreaming = ({
animationDuration = 300, animationDuration = 300,
animationTimingFunction = 'linear', animationTimingFunction = 'linear',
className, className,
stripFormatting = false stripFormatting = true
}: { }: {
content: string; content: string;
isStreamFinished: boolean; isStreamFinished: boolean;
@ -66,7 +66,7 @@ const AppMarkdownStreamingContext = createContext<{
animationTimingFunction: 'ease-in-out', animationTimingFunction: 'ease-in-out',
isStreamFinished: false, isStreamFinished: false,
isThrottleStreamingFinished: false, isThrottleStreamingFinished: false,
stripFormatting: false stripFormatting: true
}); });
export const useAppMarkdownStreaming = () => { export const useAppMarkdownStreaming = () => {

View File

@ -26,7 +26,7 @@ const AnimatedMarkdown: React.FC<AnimatedMarkdownProps> = ({
animationDuration = 300, animationDuration = 300,
animationTimingFunction = 'ease-in-out', animationTimingFunction = 'ease-in-out',
isStreamFinished = true, isStreamFinished = true,
stripFormatting = false, stripFormatting = true,
className className
}) => { }) => {
const { components } = useMarkdownComponents({ const { components } = useMarkdownComponents({

View File

@ -37,7 +37,7 @@ export const useMarkdownComponents = ({
animationDuration = 700, animationDuration = 700,
animationTimingFunction = 'ease-in-out', animationTimingFunction = 'ease-in-out',
isStreamFinished = true, isStreamFinished = true,
stripFormatting = false stripFormatting = true
}: UseMarkdownComponentsProps) => { }: UseMarkdownComponentsProps) => {
const commonProps = useMemo(() => { const commonProps = useMemo(() => {
return { return {