Tool Confirmation

Asks a person to confirm before an agent's action changes anything.

Order #4471 · Maya Okafor · $248.00

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/agent-confirm

Usage

import { AgentConfirm } from "./ui/uicontext/components/agent/AgentConfirm.ts"
export const App = Html.component({ name: "App", model: Schema.Struct({}), message: Schema.Never }).make({	init: () => ({}),	update: ($) => $.model,	view: (h) => h.main.children(h.h1.children("Billing"), AgentConfirm(h, {})),})

Examples

An action that can be undone

Archiving can be reversed, so the dialog offers to stop asking for it until the page reloads.

  • #launch-2025
  • #offsite-planning
  • #q3-hiring
  • #old-website

Several steps waiting

Three agents ask at once. The dialog shows the oldest first and says how many more wait.

  • MOB-88 · Splash screen flickers on Android 12
  • MOB-102 · Offline banner overlaps the tab bar
  • MOB-131 · Old onboarding copy in Portuguese

API reference

Options

AgentConfirmPreview options
NameTypeDescription
requestrequiredOmit<ConfirmRequest, "id" | "expiresAt" | "more"> & { readonly more?: number }—
rememberboolean—
timeLeftnumber—

Accessibility

  • The request shows in a modal alert dialog that says what the agent wants to do, on what, and the exact values it applies to.
  • Deny has focus first, and Escape denies. A step nobody answers in time is refused.
  • An action that can be undone can be allowed for the rest of the session; one that can't is asked every time. Agents can't answer it.

Source