"use client";
import { motion } from "framer-motion";
import { CheckCircle2, CircleDashed, XCircle, AlertCircle, Play, FileCode2 } from "lucide-react";
export interface PlanStep {
id: string;
description: string;
filesData?: string[];
status: "pending" | "running" | "done" | "error";
error?: string;
}
interface PlanViewProps {
steps: PlanStep[];
goal: string;
onExecute: () => void;
isExecuting: boolean;
onExecuteStep: (id: string) => void;
}
export function PlanView({ steps, goal, onExecute, isExecuting, onExecuteStep }: PlanViewProps) {
const getIcon = (status: string) => {
switch (status) {
case "done": return
{goal}
{/* Progress bar */}Step {i + 1}: {step.description}
{step.filesData && step.filesData.length > 0 && ({step.error}