Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 21, 2025

This PR adds a keyboard shortcut (Ctrl+Shift+E / Cmd+Shift+E on Mac) to trigger the prompt enhancement feature, improving the user experience by eliminating the need to manually click the enhance prompt button.

Changes Made:

  • Added new VS Code command roo-cline.enhancePrompt with keyboard shortcut binding
  • Registered the command in the extension activation
  • Connected the command to trigger the enhance prompt functionality via webview messaging
  • Updated the enhance prompt button tooltip to display the keyboard shortcut
  • Added triggerEnhancePrompt action to ExtensionMessage type for proper TypeScript support

Testing:

  • TypeScript compilation passes for both extension and webview
  • ESLint checks pass with no warnings
  • The keyboard shortcut can be tested by:
    1. Opening the Roo Code sidebar
    2. Typing some text in the prompt area
    3. Pressing Ctrl+Shift+E (or Cmd+Shift+E on Mac)
    4. The prompt enhancement should trigger just like clicking the wand button

This is a quality-of-life improvement that makes the prompt enhancement feature more accessible and efficient for power users.


Important

Adds Ctrl+Shift+E (or Cmd+Shift+E on Mac) shortcut for prompt enhancement, updating command registration, UI, and TypeScript support.

  • Behavior:
    • Adds roo-cline.enhancePrompt command with Ctrl+Shift+E (or Cmd+Shift+E on Mac) shortcut in src/package.json.
    • Registers command in registerCommands.ts to trigger enhancePrompt via webview messaging.
    • Updates tooltip in ChatTextArea.tsx to show shortcut.
  • TypeScript:
    • Adds triggerEnhancePrompt action to ExtensionMessage in ExtensionMessage.ts and WebviewMessage.ts.
  • UI:
    • Implements triggerEnhancePrompt in ChatView.tsx to simulate button click.
    • Updates App.tsx to handle triggerEnhancePrompt message.
  • Testing:
    • Confirms TypeScript compilation and ESLint checks pass.
    • Manual testing steps provided for shortcut functionality.

This description was created by Ellipsis for a563f91. You can customize this summary. It will automatically update as commits are pushed.

- Add Ctrl+Shift+E (Cmd+Shift+E on Mac) keyboard shortcut
- Register new command roo-cline.enhancePrompt in VS Code
- Connect command to trigger enhance prompt functionality
- Update UI tooltip to show keyboard shortcut hint
- Add triggerEnhancePrompt action to ExtensionMessage type
@roomote roomote bot requested review from cte, jr and mrubens as code owners July 21, 2025 15:04
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. UI/UX UI/UX related or focused labels Jul 21, 2025
},
triggerEnhancePrompt: () => {
// Find the enhance prompt button and trigger its click
const enhanceButton = document.querySelector('[aria-label*="enhance"]') as HTMLButtonElement
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using document.querySelector('[aria-label*="enhance"]') to find the enhance prompt button, consider passing a ref from the ChatTextArea component. This will improve reliability and maintainability.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 21, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 21, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:M This PR changes 30-99 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants