import { CodeBlock } from './CodeBlock.jsx'
const KIND_STYLES = {
draft: 'text-accent border-accent',
run_baseline: 'text-[#7ecfc5] border-[#5a9c94]',
inspect: 'text-[#b5a5e0] border-[#7e6ea8]',
commit: 'text-[#7ab68c] border-[#4e7c5c]',
}
export function TurnCard({ turn, kind, action_str, output, duration_s,
budget_remaining, code }) {
const chipClass = KIND_STYLES[kind] || 'text-ink border-border'
return (
Turn {turn}
{kind}
{duration_s.toFixed(1)}s ยท budget {budget_remaining}
{action_str}
{output.length === 0 ? 'ok' : output.map((o, i) => (
))}
{code && (
)}
)
}
function Row({ label, children }) {
return (
)
}
function StatusChip({ kind, text }) {
const cls = {
good: 'text-good border-good/40 bg-good/10',
warn: 'text-warn border-warn/40 bg-warn/10',
bad: 'text-bad border-bad/40 bg-bad/10',
info: 'text-ink border-border bg-transparent',
}[kind] || 'text-ink border-border'
return (
)
}