Skip to content
Sign in
AgentsAgent config editorMenu

Agent config editorPro

System prompt, model, tools and parameters with versions, a word diff against production, and publish.

ProChanges against production in words and as a prompt diff, then publish.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/agent-config-editor

Usage

tsx
import { AgentConfigEditor } from "@/components/ui/chatcn/pro/agent-config-editor"

<AgentConfigEditor value={draft} onValueChange={setDraft} versions={versions} models={models} tools={tools} onPublish={publish} />

The footer says what changed against the version tagged Production, field by field, and the prompt diff shows the words added and removed. Publish says what it did; a failure says how to fix it. Load any version into the draft from the list.

Examples

States

ProMatches production, and a publish that fails with how to fix it.

Props

PropTypeNotes
value, onValueChangeAgentConfigThe controlled draft
versionsAgentConfigVersion[]Newest first, one tagged Production
models, toolsOption listsWhat the draft can choose from
onPublish(draft) => Promise<void>Reject with a message to show it
onRestore(version) => voidLoads a version

Accessibility

  • Every field has a visible label. Tool chips are real checkboxes.
  • Added and removed words carry hidden "added" and "removed" words, not only color.
  • The publish result is a polite live region.