revert(inquirerer): simplify keypress to per-instance model #32
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.
Summary
Reverts the SharedInputState/stack-based ownership approach back to a simple per-instance listener model. The complex multi-instance handling from PR #29 and #31 didn't work as expected during manual testing, so this PR simplifies back to the original approach where each TerminalKeypress instance manages its own data listener independently.
Changes:
pause()to prevent handler accumulation between questionsThe simplified approach is more predictable. Users should either reuse a single Inquirerer instance or call
close()on one before creating another.Review & Testing Checklist for Human
Recommended Test Plan
Run
create-gen-appor another CLI that uses inquirerer interactively and verify:Notes
Link to Devin run: https://app.devin.ai/sessions/48555739db3d4f1b9e9edfa9ea1e559a
Requested by: Dan Lynch (@pyramation)