Skip to content
Sign in
CodeTask composerMenu

Task composerPro

Where a coding task starts: what to do, which repository and branch, where it runs (cloud, this machine or SSH), which model and how many attempts, then Ask or Code.

ProStart a coding task: repository, branch, where it runs (cloud, this machine or SSH), model and attempts, then Ask or Code. Enter runs Code, Cmd or Ctrl+Enter runs Ask.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/task-composer

Usage

tsx
import { TaskComposer } from "@/components/ui/chatcn/pro/task-composer"

<TaskComposer repos={repos} environments={environments} models={models} onSubmit={startTask} />

onSubmit gets the text, mode (ask or code), repository, branch, environment, model and attempt count. More than one attempt pairs with Best of n. Offline environments stay listed but cannot be picked, and choosing one explains what to do.

Examples

States

ProStarting a task, a start that failed with the fix, an offline host, no repository connected and a long task.

Props

PropTypeNotes
reposTaskRepo[]id, name (owner/name), private, branches
environmentsTaskEnvironment[]kind cloud, local or ssh; detail; status offline
models, providersModelOption[]Shows the free model picker
value, repo, branch, environment, model, attemptsEach controlled, with default… and on…Change
maxAttemptsnumberDefault 4
onSubmit(task: TaskSubmission) => void
submitting"ask" | "code" | falseThe sent mode shows a spinner
errorReactNodeWhy the task did not start, with the fix
disabled, disabledReason, disabledActionFor example no repository connected
placeholderstring

Keyboard

KeyAction
EnterCode
Cmd Enter / Ctrl EnterAsk
Shift EnterNew line

Accessibility

  • Nothing sends while an input method is composing.
  • Each selector names what it sets and its value. Errors are alerts tied to the field.

Motion

Menus open from their trigger in 180 ms. Opened from the keyboard, they appear without animation.