En

@2008muyu/pi-ui-prompt-dialog

A TUI dialog extension for pi, integrating menus and input fields.

开发流程 拦截危险操作 通用 ★ 70 Updated 2026-08-02

Install & Use

Copy this prompt and send it to your AI assistant (Claude / Cursor / TRAE / Codex / WorkBuddy etc.) to auto-install:

Help me install this AI Skill: @2008muyu/pi-ui-prompt-dialog.
It is used for: A TUI dialog extension for pi, integrating menus and input fields.
Full Skill content: https://321skill.com/skills/2008muyu-pi-ui-prompt-dialog/raw/index.md
Read that page and install it.

The prompt includes a link to the full Skill content. You can also view the full content.

This Skill addresses a common pain point in terminal interactions where users need to both select an action and input text. When using the pi coding agent, scenarios often arise that require user confirmation or additional information—for example, when the AI is about to perform a risky operation, and the user needs to choose between "Allow" or "Deny," while possibly also wanting to enter extra instructions. The traditional approach requires two steps: first selecting an action, then popping up an input dialog, which creates a fragmented and inefficient workflow.

Usage is straightforward: simply install the package in your project, then call the showPromptDialog function, passing in a title, description, a list of action buttons, and optional input field configuration. The AI will then render an overlay in the terminal that displays both the action menu and an input line. Users can navigate with the up/down arrow keys, switch between input modes with the Tab key, and confirm with Enter. The returned result clearly indicates which action the user selected or what text they entered.

It is particularly well-suited for teams or individuals who need to add a human confirmation step to AI operations. This is especially useful for developers using the pi coding agent for tasks like code generation, command execution, or file operations—for instance, intercepting a risky npm install in Plan mode or prompting the user to supplement parameters before execution.

It is recommended to use this tool consistently when writing pi extensions that require user interaction to maintain a uniform experience. Note that it currently only supports single-line input, a maximum of 10 action buttons, and lacks custom theming—it reuses pi's built-in terminal colors.

Key Features

Unlike standard terminal selectors (like fzf) or standalone input prompts, pi-ui-prompt-dialog presents both the action menu and the text input box within the same overlay. Users don't need to switch between two interfaces; a single keystroke can complete either a selection or input.

Limitations

Supports a maximum of 10 action buttons. The input field only supports single-line text. Content may be truncated if the terminal is too narrow. Custom theme colors are not available (it reuses pi's built-in theme).

FAQ

Does it support multi-line input?

No, the input field currently only supports single-line text.

How many action buttons can be added at most?

A maximum of 10. Exceeding this limit will cause an error or be ignored.

Installation guide for AI assistants

If your AI coding assistant (Claude Code, Cursor, TRAE etc.) can see this page, send it this message to auto-install:

Visit https://321skill.com/skills/2008muyu-pi-ui-prompt-dialog/raw/index.md to read the original Skill definition (Markdown format) for @2008muyu/pi-ui-prompt-dialog, and install it according to the instructions.