"use client"; import type { CSSProperties } from "react"; import { useState } from "react"; import { highlight } from "@/lib/highlight"; const STEPS = [ { command: "zero init", output: 'Created zero.toml\nCreated zero.graph graph:e3b0c442\nInitialized package "hello"', }, { command: 'zero patch --op addMain --op \'addCheckWrite fn="main" text="hello from zero\\n"\'', output: "Patched zero.graph\n graph hash graph:a7f7e689\n symbols main", }, { command: "zero run", output: "hello from zero", }, ]; function TerminalIcon() { return ( ); } export function ChatToolRuns({ startDelayMs = 0 }: { startDelayMs?: number }) { const [open, setOpen] = useState([]); const toggle = (i: number) => setOpen((prev) => (prev.includes(i) ? prev.filter((n) => n !== i) : [...prev, i])); return (
{STEPS.map((step, i) => { const isOpen = open.includes(i); return (
{isOpen && (
                {step.output}
              
)}
); })}
); }