import { useState } from 'react' import { ArrowRight, ChevronDown, ChevronRight, MessageSquare } from 'lucide-react' interface EscalationPackage { original_user_id?: string problem_summary?: string escalation_reason?: string steps_tried?: Array<{ step_type?: string description?: string response?: string }> steps_ruled_out?: string[] remaining_hypotheses?: string[] suggested_next_steps?: string[] confidence_at_escalation?: number } interface SessionBriefingProps { escalationPackage: EscalationPackage originalEngineerName?: string onContinue: () => void onFresh: (context: string) => void isProcessing: boolean } export function SessionBriefing({ escalationPackage, originalEngineerName, onContinue, onFresh, isProcessing, }: SessionBriefingProps) { const [showSteps, setShowSteps] = useState(false) const [freshMode, setFreshMode] = useState(false) const [freshContext, setFreshContext] = useState('') const pkg = escalationPackage return (

Escalation from {originalEngineerName || 'another engineer'}

Review the briefing below, then choose how to proceed.

{/* Problem */} {pkg.problem_summary && (

Problem

{pkg.problem_summary}

)} {/* Escalation reason */} {pkg.escalation_reason && (

Why escalated

{pkg.escalation_reason}

)} {/* Steps taken (collapsible) */} {pkg.steps_tried && pkg.steps_tried.length > 0 && (
{showSteps && (
{pkg.steps_tried.map((step, i) => (

{i + 1}. {step.description}

{step.response && (

→ {step.response}

)}
))}
)}
)} {/* Remaining hypotheses */} {pkg.remaining_hypotheses && pkg.remaining_hypotheses.length > 0 && (

Remaining hypotheses

)} {/* Suggested next steps */} {pkg.suggested_next_steps && pkg.suggested_next_steps.length > 0 && (

Suggested next steps

)} {/* Action buttons */} {!freshMode ? (
) : (