Skip to content
AI & AgentsPro

Prompt Mode Switch

What the agent may do with the next prompt — answer, act or edit — with the send keys underneath.

Usage

Answers questions. Changes nothing.

↵ to send ⇧↵ for a new line

Installation

bash
npm install @wunderui/react

Then import what you need:

tsx
import { PromptModeSwitch } from "@wunderui/react"

Examples

Ask

Answers questions and changes nothing.

Answers questions. Changes nothing.

↵ to send ⇧↵ for a new line

Agent

Plans and runs tools, asks before risky steps.

Plans and runs tools. Asks before risky steps.

↵ to send ⇧↵ for a new line

Edit

Edits the selected files in place.

Edits the selected files in place.

↵ to send ⇧↵ for a new line

In context

How the component is used inside real screens — the same compositions as the Usage section of the Figma page.

Mode switcher

Under the prompt: the mode decides whether the agent only answers, acts, or edits files.

Plans and runs tools. Asks before risky steps.

↵ to send ⇧↵ for a new line

API Reference

PropTypeDefault
value / defaultValue"ask" | "agent" | "edit""ask"
onValueChange(mode) => void—
hintsRecord<mode, string>one line per mode
showKeysbooleantrue