@henryqw/pi-ask-question
v0.1.4
Published
Ask Pi users one interactive question with choices or a custom answer.
Maintainers
Readme
@henryqw/pi-ask-question
Ask the user one interactive question with up to three choices, or a custom answer.
Install
pi install npm:@henryqw/pi-ask-questionUse
| 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-questionDevelopment
npm test --workspace @henryqw/pi-ask-question
npm run typecheck --workspace @henryqw/pi-ask-question
npm run pack:check --workspace @henryqw/pi-ask-questionManual TUI check outside CI:
npm run test:manual --workspace @henryqw/pi-ask-question