AI Agents/Code Panel

Code PanelNew

Light editor panel with a line-numbered Code view and a unified Diff view with word-level highlights.

churn.ts
1export async function churnBatch() {
2 const flavor = await getFlavor("pistachio");
3 const base = await dairy.fetch({ flavor });
4 await freezer.store(base, { temp: "-16C" });
5 if (!base.approved) return null;
6 return base.gallons;
7}

Installation

$npx shadcn@latest add @opendraft/code-panel

Needs the @opendraft registry in your components.json. See Installation.

Dependencies

Source

The files the install command adds to your project. They're yours to edit.