feat: add dynamic 'prompt' menu item (prompt history, send prompt)#3186
Closed
Jud wants to merge 2 commits intoblock:mainfrom
Closed
feat: add dynamic 'prompt' menu item (prompt history, send prompt)#3186Jud wants to merge 2 commits intoblock:mainfrom
Jud wants to merge 2 commits intoblock:mainfrom
Conversation
- Add Prompt menu with Previous/Next/Send items that dynamically enable/disable - Add Return key menu item for sending prompts - Convert ChatInput to forwardRef with imperative API for menu integration - Rebuild complete menu system using immutable Electron menu architecture - Add comprehensive E2E tests for keyboard shortcuts and menu behavior
Collaborator
|
Hey @Jud, pulled and taking a look We may have introduced a fix for this outlined behaviour -- re avoid conflicting with the typical mac keyboard commands by only filling prompts via cmd up and down when the entry section is empty. When a user inputs their crafted prompt the cmd arrow to navigate via prompts is disabled and follow the typical keyboard behaviour (#3246) I'm struggling to understand the use case in its current form outside of adding a top bar segment for user to leverage the keyboard shortcuts/ navigating entries. Does your proposed override the behaviour outlined in #3246? |
Collaborator
|
I'm going to close this for now based on @spencrmartin comment. feel free to reopen if you want to continue the conversation |
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.
The default shortcuts for prompt history navigation conflict with the default MacOS shortcuts for navigation within a text area (e.g. cmd+up typically takes you to the beginning of a text input). To enable key remaping on MacOS, we need to have menu items that correspond to the history navigation actions.
There are other additions to this Prompt menu (like Attach that would be fast follows). This menuitem would also be an interesting jumping off point for prompt subflows like using a low-cost model to refine a prompt for a higher cost model.
This PR adds a new 'Prompt' menu to the top menu bar with the following items:
These are dynamically enabled based on the current state.