Skip to content
Eskais UI

Agent tasks

Proposal Actions

Approve and Reject for one task proposal: async pending with no double submit, inline errors, an on-screen reject confirmation, and agent access set by agentApproval (confirm, allow or deny). Renders nothing in snapshot mode.

Example

T-011 · Split the billing service. Approve fails once on purpose.

Installation

npx shadcn@latest add @eskais/proposal-actions

Usage

Import
import { ProposalActions } from "@/components/ui/proposal-actions"

API reference

ProposalActions

PropTypeDefault
taskIdrequiredstring–
moderequiredBoardMode–
onApproveA returned Promise keeps the button pending; a rejection shows its message.(id: string) => void | Promise<void>–
onRejectRuns after the on-screen confirmation, with the same pending and error handling.(id: string) => void | Promise<void>–
agentApprovalAgentApproval"confirm"
labelsPartial<ProposalLabels>–
renderError(error: unknown) => stringmessageOf
classNamestring–

Other exports

type ProposalActionsProps

Accessibility

  • Async approve and reject with pending state and no double press; errors show inline.

Agent actions

Both actions carry data-agent-confirm: an agent can ask, a person decides.

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.