import React from "react"; import PlanView from "./PlanView.jsx"; export default function AssistantMessage({ answer, plan, executionLog }) { const styles = { container: { marginBottom: "20px", padding: "20px", backgroundColor: "#18181B", // Zinc-900 borderRadius: "12px", border: "1px solid #27272A", // Zinc-800 color: "#F4F4F5", // Zinc-100 fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', boxShadow: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)", }, section: { marginBottom: "20px", }, lastSection: { marginBottom: "0", }, header: { display: "flex", alignItems: "center", marginBottom: "12px", paddingBottom: "8px", borderBottom: "1px solid #3F3F46", // Zinc-700 }, title: { fontSize: "12px", fontWeight: "600", textTransform: "uppercase", letterSpacing: "0.05em", color: "#A1A1AA", // Zinc-400 margin: 0, }, content: { fontSize: "14px", lineHeight: "1.6", whiteSpace: "pre-wrap", }, executionList: { listStyle: "none", padding: 0, margin: 0, display: "flex", flexDirection: "column", gap: "8px", }, executionStep: { display: "flex", flexDirection: "column", gap: "4px", padding: "10px", backgroundColor: "#09090B", // Zinc-950 borderRadius: "6px", border: "1px solid #27272A", fontSize: "13px", }, stepNumber: { fontSize: "11px", fontWeight: "600", color: "#10B981", // Emerald-500 textTransform: "uppercase", }, stepSummary: { color: "#D4D4D8", // Zinc-300 fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace", }, }; return (
{/* Answer section */}

Answer

{answer}

{/* Action Plan section */} {plan && (

Action Plan

)} {/* Execution Log section (shown after execution) */} {executionLog && (

Execution Log

    {executionLog.steps.map((s) => (
  • Step {s.step_number} {s.summary}
  • ))}
)}
); }