@jqwn/pi-ask-user-question
v0.2.0
Published
A Pi extension that lets the model ask rich multi-question TUI dialogs with options, descriptions, previews, multi-select, and custom answers.
Downloads
231
Maintainers
Readme
@jqwn/pi-ask-user-question
A Pi extension that lets the model pause mid-task and ask rich questions in the terminal UI.
It registers an AskUserQuestion tool with support for:
- 1-4 questions in a single dialog
- 2-4 options per question
- short headers for multi-question navigation
- option descriptions
- optional option previews for code/config/mockup comparisons
- single-select or multi-select questions
- automatic
Othercustom-text answers
Installation
pi install npm:@jqwn/pi-ask-user-questionProject-local install:
pi install -l npm:@jqwn/pi-ask-user-questionTry from a local checkout:
pi -e /path/to/pi-ask-user-questionUsage
Once installed, AskUserQuestion is available to the model automatically. Ask Pi to clarify before choosing an approach, for example:
Before implementing, use AskUserQuestion to ask me which database to use: Postgres, MySQL, or SQLite.The extension also provides a manual demo command:
/ask-user-question-demoTool schema
{
questions: [
{
question: string,
header: string,
options: [
{
label: string,
description: string,
preview?: string
}
],
multiSelect?: boolean
}
],
metadata?: {
source?: string
}
}Notes for model behavior
- Use
AskUserQuestionwhen a user preference, requirement, or decision is needed before proceeding. - Ask specific questions with 2-4 concrete choices.
- Do not include an
Otheroption; the TUI adds it automatically. - Use
multiSelectonly when multiple options can be chosen together. - Use previews only for concrete artifacts users need to compare, like snippets, configs, or ASCII mockups.
License
MIT
