Skip to content

feat: add dynamic 'prompt' menu item (prompt history, send prompt)#3186

Closed
Jud wants to merge 2 commits intoblock:mainfrom
Jud:feat/use-cmd-shift-arrows
Closed

feat: add dynamic 'prompt' menu item (prompt history, send prompt)#3186
Jud wants to merge 2 commits intoblock:mainfrom
Jud:feat/use-cmd-shift-arrows

Conversation

@Jud
Copy link
Contributor

@Jud Jud commented Jul 1, 2025

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:

  • Previous Prompt
  • Next Prompt
  • Send

These are dynamically enabled based on the current state.

Screenshot 2025-06-30 at 8 03 16 PM

Jud added 2 commits June 30, 2025 17:33
- 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
@Jud Jud changed the title feat: add dynamic 'prompt' menu item (prompt history, send prompt) with keyboard shortcuts feat: add dynamic 'prompt' menu item (prompt history, send prompt) Jul 1, 2025
@DOsinga DOsinga requested a review from spencrmartin July 16, 2025 18:32
@spencrmartin
Copy link
Collaborator

spencrmartin commented Jul 16, 2025

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?

@DOsinga
Copy link
Collaborator

DOsinga commented Aug 2, 2025

I'm going to close this for now based on @spencrmartin comment. feel free to reopen if you want to continue the conversation

@DOsinga DOsinga closed this Aug 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants