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';
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';
import AppMarkdownStreaming from '@/components/ui/streaming/AppMarkdownStreaming/AppMarkdownStreaming';
type MessageAssumptionsProps = Pick<
PostProcessingMessage,
@ -151,13 +150,12 @@ const AssumptionSummary = ({
{summary_title}
</Title>
</div>
<div className="mt-2">
<AnimatedMarkdown
content={summary_message}
className="text-text-secondary"
animation="none"
/>
</div>
<AppMarkdownStreaming
content={summary_message}
isStreamFinished={true}
stripFormatting={true}
className="mt-2 text-text-secondary"
/>
</div>
);
};
@ -273,7 +271,12 @@ const AssumptionCard = ({
<Title as={'h4'} className="text-base">
{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 className="flex items-center justify-between border-t px-3.5 py-2">

View File

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

View File

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

View File

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