fix(flowpilot): render step content as markdown instead of plain text

FlowPilot AI sends markdown-formatted instructions but FlowPilotStepCard
was rendering them as plain <p> tags, producing an unreadable wall of text.
Switch to the existing MarkdownContent component for proper formatting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-18 16:50:43 +00:00
parent 5494816b06
commit 2063a799b0

View File

@@ -2,6 +2,7 @@ import { useState } from 'react'
import { MessageSquare, Zap, CheckCircle2, SkipForward, ChevronDown, ChevronUp } from 'lucide-react'
import { cn } from '@/lib/utils'
import type { AISessionStepResponse, StepResponseRequest } from '@/types/ai-session'
import { MarkdownContent } from '@/components/ui/MarkdownContent'
import { FlowPilotOptions } from './FlowPilotOptions'
interface FlowPilotStepCardProps {
@@ -94,7 +95,7 @@ export function FlowPilotStepCard({ step, isCurrentStep, isProcessing, onRespond
</div>
<ChevronUp size={14} className="text-muted-foreground" />
</button>
<p className="text-sm text-foreground">{stepText}</p>
<MarkdownContent content={stepText} className="text-sm text-foreground" />
</div>
)
}
@@ -122,8 +123,8 @@ export function FlowPilotStepCard({ step, isCurrentStep, isProcessing, onRespond
)}>
<Icon size={14} />
</span>
<div>
<p className="text-sm font-medium text-foreground">{stepText}</p>
<div className="min-w-0 flex-1">
<MarkdownContent content={stepText} className="text-sm" />
{isResolutionSuggestion && typeof content.resolution_summary === 'string' && (
<p className="mt-2 text-sm text-muted-foreground">
{content.resolution_summary}