feat(opencode): double-escape to clear prompt input#22126
Open
guarzo wants to merge 1 commit intoanomalyco:devfrom
Open
feat(opencode): double-escape to clear prompt input#22126guarzo wants to merge 1 commit intoanomalyco:devfrom
guarzo wants to merge 1 commit intoanomalyco:devfrom
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Related PR FoundPR #7320: feat: add double-ESC keybind to clear input field Why they're related: This is the exact alternative PR mentioned in your PR description. PR #22126 (the current PR) is an alternative implementation approach to #7320 that addresses the same feature request (#7319). Both implement double-escape to clear prompt input, but with different tradeoffs:
As noted in your PR, you're aware of #7320 and are offering this as a comparison for the maintainers to evaluate. |
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
402f6a3 to
1eb7b90
Compare
1eb7b90 to
5bdcfa6
Compare
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.
Issue for this PR
Closes #7319
Type of change
What does this PR do?
Adds double-escape to clear the prompt input when idle. First Escape shows a hint (
esc again to clear) in the status bar; second Escape within 2 seconds clears the input. No-op when input is empty or when a session is running.There's already a solid implementation in #7320. This is an alternative approach in case maintainers want to compare:
command.register()like all other keybinds; the key is configurable asinput_clear_promptin config (defaults toescape)esc again to clearin the idle status bar, matching the existing session interrupt hint patternclearTimeoutinonCleanupto avoid a stale callback firing against a disposed storeHappy to close this if #7320 moves forward.
How did you verify your code works?
bun typecheckpasses. Manually tested:session_interruptas beforeScreenshots / recordings
Checklist