ngx-prompt-kit

Approval

ngx-prompt-kit original — not part of ibelick/prompt-kit

A confirmation card for tool execution. Three severity tiers (info / warning / destructive) drive the action badge color and the Approve button variant.

Examples

Minimal — yes / no question

Just a title and the two buttons. Use when there's nothing to disclose beyond the question itself — tool name, parameters, and severity all elided.

Allow the assistant to access your clipboard?

Info — read-only tool call

Default severity. Use for low-risk actions: querying data, reading a file, listing resources. Approve gets the default button styling.

Run database query

The assistant wants to read from the analytics warehouse. No mutation will occur.

execute
tableevents_2026_05limit10000

Warning — side effects

Use for actions with reversible-but-noisy side effects: sending notifications, creating records, calling rate-limited APIs.

Send email to 247 recipients

The assistant prepared a marketing campaign. Recipients are filtered to verified addresses only.

send
listq2-newsletterrecipients247 (verified only)subjectYour Q2 update is here — three new releases inside

Destructive — irreversible

Use for hard-to-reverse actions. The Approve button switches to destructive variant. Pending state shows a spinner and disables both buttons.

Delete repository

Removes the repository, all branches, and all associated CI history. This cannot be undone.

delete
orgPianoNicrepongx-prompt-kitbranches14workflow runs1,243

Installation

Add the approval component (and the cn() utility) to your project.

ng generate ngx-prompt-kit:approval

Component API

PkApproval

PropTypeDefaultDescription
titlestringThe action being requested (required).
descriptionstring | undefinedOptional context shown beneath the title.
actionstring | undefinedVerb shown in the badge — e.g. "execute", "send", "delete".
severity"info" | "warning" | "destructive" "info" Drives the action badge tint and the Approve button variant.
parametersreadonly ApprovalParameter[] [] Label/value rows shown beneath the description. Each: { label, value, truncate? }.
approveLabelstring "Approve" Approve button label.
rejectLabelstring "Reject" Reject button label.
pendingboolean false Disables both buttons and shows a spinner on Approve while an async action is in flight.
classstringExtra classes for the host.

PkApprovalParameter

PropTypeDefaultDescription
labelstringParameter name (required).
valuestringParameter value, rendered in monospace (required).
truncateboolean true Truncate long values with ellipsis.

Outputs

PropTypeDefaultDescription
approved() => voidApprove clicked, or Enter pressed while focused.
rejected() => voidReject clicked, or Esc pressed while focused.