feat(inquirerer): add event-driven UI engine for custom prompts #47
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 event-driven UI engine for custom prompts
Summary
Adds a new
uimodule to inquirerer that provides an event-driven engine for building rich terminal interfaces. This enables developers to create custom interactive UIs beyond the standard prompt types.New components:
UIEngine- Core engine with render/reducer pattern for custom screensSpinner- Animated loading spinner with multiple styles (dots, line, arc, etc.)ProgressBar- Visual progress indicator for operations with known completionStreamingText- AI-style streaming text display with cursor animationinteractiveUpgrade- pnpm-style interactive dependency upgrade UIDemo scripts:
pnpm dev:spinner- Demonstrates spinner styles and statespnpm dev:chat- Simulates AI chat with streaming responsespnpm dev:upgrade- Interactive package upgrade selectionReview & Testing Checklist for Human
pnpm dev:spinner,pnpm dev:chat,pnpm dev:upgrade) - these were only briefly tested and the upgrade demo wasn't tested at alldispatchmethod in engine.ts (line 218) - it's a stub for future async event dispatchRecommended test plan:
pnpm buildin the inquirerer packageNotes
Spinnerclass accepts aUIEnginein constructor but doesn't use it (may be for future extensibility)Link to Devin run: https://app.devin.ai/sessions/e424b0eaba2f4789815bb0cc22ca6233
Requested by: Dan Lynch (@pyramation)