@henryqw/pi-ask-question
Ask Pi users one interactive question with choices or a custom answer.
Package details
Install @henryqw/pi-ask-question from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@henryqw/pi-ask-question- Package
@henryqw/pi-ask-question- Version
0.1.8- Published
- Aug 24, 2026
- Downloads
- 679/mo · 342/wk
- Author
- henrywang
- License
- MIT
- Types
- extension
- Size
- 14.1 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./extensions/ask-question.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@henryqw/pi-ask-question
Ask the user one interactive question with up to three choices, or a custom answer.
Why
- Created for: Asking the user one interactive question with up to three choices during a Pi session.
- Advantage: Offers a keyboard-selectable prompt and returns one explicit answer instead of relying on free-form chat parsing.
Install
pi install npm:@henryqw/pi-ask-question
Use
| Surface | Type | Purpose |
|---|---|---|
ask_question |
tool | Pause for one interactive answer. |
{
"question": "Which database should we use?",
"options": [
{ "label": "PostgreSQL", "description": "Shared server database" },
{ "label": "SQLite", "description": "Local, embedded storage" },
{ "label": "File", "description": "Plain file storage" }
]
}
Supply one to three options in preference order. UI marks the first (Recommended) and adds Something else. for a custom answer. Number keys select options. Empty questions, blank or duplicate labels, empty lists, more than three options, and non-interactive sessions return an error. Aborting the tool closes the pending question.
Remove
pi remove npm:@henryqw/pi-ask-question
Development
npm test --workspace @henryqw/pi-ask-question
npm run typecheck --workspace @henryqw/pi-ask-question
npm run pack:check --workspace @henryqw/pi-ask-question
Manual TUI check outside CI:
npm run test:manual --workspace @henryqw/pi-ask-question