feat(inquirerer): add engine-based prompt implementations#49
Merged
pyramation merged 3 commits intomainfrom Dec 27, 2025
Merged
feat(inquirerer): add engine-based prompt implementations#49pyramation merged 3 commits intomainfrom
pyramation merged 3 commits intomainfrom
Conversation
- Modify UIEngine to accept existing TerminalKeypress instance - Add keypress, ownsKeypress, clearScreenOnStart options - Properly handle shared keypress lifecycle (pause vs destroy) - Let TerminalKeypress handle CTRL+C exit to avoid double-exit - Create engine-based prompt implementations in ui/prompts.ts - listPromptEngine: Simple list selection with UP/DOWN/ENTER - autocompletePromptEngine: Filtering with space as input character - checkboxPromptEngine: Filtering with space to toggle selection - All implementations match existing prompt behavior - Add demo script (dev:prompts) to test all three prompts sequentially - Verifies keypress lifecycle works correctly across prompts - Tests list, autocomplete, and checkbox in sequence This provides the foundation for refactoring existing prompts to use the UIEngine internally while maintaining backward compatibility.
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
- Document Spinner with styles and text updates - Document Progress Bar with update and increment - Document Streaming Text for AI chat style output - Document UIEngine for fully custom interactive UIs - Add demo commands reference
- Show animated spinner while cloning (silent mode, default) - Add silent option to GitCloneOptions (default: true) - Silence git output when spinner is active - Show success/fail status when clone completes - Update test mock to include createSpinner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(inquirerer): add engine-based prompt implementations
Summary
This PR extends the UIEngine to support shared keypress instances and adds engine-based implementations of the three main prompt types (list, autocomplete, checkbox). This is foundational work for eventually refactoring the existing prompts to use the UIEngine internally.
Key changes:
TerminalKeypressviakeypressoption to avoid multiple listeners on stdinownsKeypressandclearScreenOnStartoptions for lifecycle controlui/prompts.tswithlistPromptEngine,autocompletePromptEngine, andcheckboxPromptEnginepnpm dev:prompts) that runs all three prompts sequentially to verify keypress lifecycleNote: The existing prompt methods in
prompt.tsare NOT modified. These are parallel implementations that can be used directly or serve as the basis for future refactoring.Updates since last revision
README Documentation:
Genomic Spinner Integration:
silentoption toGitCloneOptions- set tofalseto see raw git outputcreateSpinnerReview & Testing Checklist for Human
create-gen) and verify spinner appears instead of raw git outputcd packages/inquirerer && pnpm dev:prompts) and complete all three promptsRecommended test plan:
cd packages/inquirerer && pnpm buildpnpm dev:prompts- complete all three prompts normallycd packages/genomic && pnpm buildNotes
Inquirererimport indemo-prompts-engine.tsis unused (line 10)prompts.tscode (~477 lines)silentoption defaults totrue- this is a behavior change from previous raw git outputLink to Devin run: https://app.devin.ai/sessions/e424b0eaba2f4789815bb0cc22ca6233
Requested by: Dan Lynch (@pyramation)