UI Components for Agents

Spikefrost provides special UI components that agents can render in the chat window by outputting specific message formats.

Approval Buttons

Display interactive buttons in the chat that either send messages back to Claude or execute local actions.

Format

[[APPROVAL:(color|action|label)|(color|action|label)|...]]

Parameters

ParameterDescription
colorButton color: red, green, yellow, blue, gray
actionIdentifier (sends label to Claude) or action:name:param (executes local action)
labelButton text displayed to user

Message Buttons

Buttons that send the label text back to Claude when clicked.

Example

[[APPROVAL:(green|accept|I Accept)|(red|cancel|Cancel)]]

Result: Two buttons appear. Clicking "I Accept" sends that text to Claude.


Action Buttons

Buttons that execute local commands instead of sending messages to Claude.

Format

action:actionName           → Action with no parameter
action:actionName:parameter → Action with parameter

Supported Actions

ActionParameterDescription
openEditorPath (optional)Opens a folder in VS Code. Uses project folder if no path specified.
dismissNoneHides the buttons without sending a message.

Examples

Open current project folder:

[[APPROVAL:(blue|action:openEditor|Open in VS Code)]]

Open specific path:

[[APPROVAL:(blue|action:openEditor:/Users/john/Projects/myapp|Open Project)]]

Mixed buttons (action + message):

[[APPROVAL:(blue|action:openEditor:/path/to/folder|Open in VS Code)|(red|cancel|Cancel)|(green|accept|Accept)]]

Button Colors

ColorUse Case
greenPositive actions (Accept, Confirm, Yes)
redNegative actions (Cancel, Reject, Delete)
blueNeutral actions (Open, View, Info)
yellowWarning actions (Proceed with caution)
grayDismiss or secondary actions

Best Practices

  • Keep it simple – Use 2-3 buttons maximum
  • Clear labels – Button text should clearly describe the action
  • Standalone syntax – Output the [[APPROVAL:...]] as its own line/paragraph
  • Use action buttons – For local commands, avoid sending unnecessary messages back to Claude