Kanshō/Message action toolbar

Message action toolbar

The per-message control strip. Reveals on hover or focus-within of the surrounding message; can be pinned permanently for the latest exchange.

Included in the single kansho full pack. Components are not offered as separate installs.

Hover variant — reveals on hover or focus

Static preview: actions are callback-less; Copy only previews visual feedback
Assistant
Three of the five commits are doc-only.
Assistant
Want me to draft the migration?

Pinned variant — always visible

Static preview: the displayed actions do not mutate message state
Assistant
Done. The migration is in db/migrations/0042_audit_log_delete.sql.

Floating variant — anchored above a selection

Static preview: selection actions are not wired in this specimen

The audit-log enum requires a migration whenever a new event type is added. The current diff adds delete without a backfill, which contradicts the documented procedure.

With an active toggle

Static preview: active is preset by the caller and does not toggle here
Assistant
Migration drafted, tests added, lint green.

Component documentation

Message Action Toolbar

components/agent/message-action-toolbar.tsx

Purpose

Provides contextual message actions such as copy, retry, edit, branching, sharing, and reactions.

Appropriate use

Use beside a message when actions are secondary and each supplied callback has host feedback.

Example

components/agent/message-action-toolbar.tsx has a representative live example in the "With an active toggle" section on /components/message-action-toolbar.

States

Variants are hover, pinned, and floating with start or end alignment; actions may be active or disabled.

API and props

MessageActionToolbar accepts actions, variant, align, and className; makeActions creates default labelled action records for supported ids.

Dependencies

Direct imports are React, Lucide icons, Tooltip, and cn.

Accessibility

Every icon button is named, active actions expose aria-pressed, and the local Copy visual state uses a polite live region.

Limitations

Default actions returned by makeActions have no callbacks; Copy only previews visual feedback without writing to the clipboard, active is caller-owned, and the host must wire every mutation.

Source

Source: components/agent/message-action-toolbar.tsx.

Full pack

components/agent/message-action-toolbar.tsx is documented at /components/message-action-toolbar and installs only through the single Kansho full pack; no individual component install is offered.