@alexgorbatchev/pi-quick-answer
v1.0.0
Published
Pi extension to quickly extract questions, options, and decisions from the assistant's last response for prompt answering
Maintainers
Readme
@alexgorbatchev/pi-quick-answer
A Pi extension that extracts open questions, options, and decisions from the assistant's latest response, presents an interactive selector, and opens a prefilled modal editor to quickly submit your answer.
Workflow
- Run
/quick-answer. - The extension extracts questions and options from the last assistant turn using a fast model (or regex heuristic). Extraction results are cached per turn for instant repeat invocations.
- If multiple questions/options exist, select one using the inline interactive picker (
ctx.ui.select). - Enter your answer in the prefilled modal editor dialog (
[Selected Question] ->). - Press Enter to submit; the message is sent directly to the assistant.
Installation
To install globally:
pi install npm:@alexgorbatchev/pi-quick-answerTo install locally for a specific project:
pi install npm:@alexgorbatchev/pi-quick-answer -lConfiguration
You can optionally configure preferred extraction models and custom system prompts in your global or project .pi/settings.json under the "@alexgorbatchev/pi-quick-answer" key.
{
"@alexgorbatchev/pi-quick-answer": {
"models": ["google/gemini-2.5-flash", "openai/gpt-4o-mini"],
"systemPrompt": "Custom extraction prompt..."
}
}Options
models(string[]orstring): Preferred model identifier(s) or wildcard patterns (e.g."google/gemini-2.5-flash","openai/gpt-4o-mini","flash"). Evaluated in order against available models. If omitted, defaults to fast models (flash,mini,haiku) or the current active model.systemPrompt(string): Overrides the default extraction prompt.
Startup Summary
On startup, the extension reports the resolved model and the prompt source:
[@alexgorbatchev/pi-quick-answer]
model: google/gemini-2.5-flash
prompt: defaultOr if a custom prompt is configured:
[@alexgorbatchev/pi-quick-answer]
model: google/gemini-2.5-flash
prompt: project settingsDevelopment & Testing
# Run unit tests
bun test
# Run linter and typecheck
bun run check
# Launch interactive Pi session with the test prompt prefilled
bun run test:local