Config & playground

PromptPlayground

Self-contained prompt → response box: model selector on the left, Run button on the right, side-by-side input/output panes below. Supply any async onSubmit and PromptPlayground handles loading, output, and error states.

Sourcesrc/components/ai/prompt-playground.tsx

Mock backend

onSubmit returns a canned promise after 600 ms. Wire this to your real API route in production.

Output will appear here…

Error state

When onSubmit throws, the component shows the thrown message in red in the output pane.

Output will appear here…