-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: Add Ctrl+L keyboard shortcut for new task (#3599) #5749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add Ctrl+L keyboard shortcut for new task (#3599) #5749
Conversation
|
Thanks for working on this! I noticed that this functionality is already available through VSCode's keybinding system. Regarding the focus requirement mentioned in the issue, VSCode provides the {
"key": "ctrl+l",
"command": "roo-cline.plusButtonClicked",
"when": "focusedView == 'roo-cline.SidebarProvider'"
}This ensures the shortcut only works when the Roo Code sidebar is focused (not just visible), which addresses the specific requirement from the issue discussion. The If we want to provide this shortcut by default, we could add it to the I'll close this PR in the meantime. |
Related GitHub Issue
Closes: #3599
Roo Code Task Context (Optional)
Description
This PR implements the Ctrl+L (Cmd+L on Mac) keyboard shortcut to close the current task and start a new one, as requested in issue #3599.
Implementation Details:
startNewTask()when Ctrl+L (Windows/Linux) or Cmd+L (Mac) is pressedDesign Decisions:
Note: The implementation deviates from the original plan to use VSCode's keybinding system, but maintains consistency with existing keyboard shortcut patterns in the codebase.
Test Procedure
Automated Tests:
ChatView.spec.tsxcovering:Manual Testing Steps:
Test Results:
Pre-Submission Checklist
Screenshots / Videos
No visual changes - this PR only adds a keyboard shortcut that triggers existing functionality.
Documentation Updates
Additional Notes
Translation Impact: No translations were required as no new user-facing strings were added.
PR Review Feedback: Based on the review feedback, the implementation deviates from the original architectural plan by implementing the shortcut in the webview rather than using VSCode's keybinding system. This approach was chosen to maintain consistency with existing keyboard shortcut patterns in the codebase (e.g., mode switching with Ctrl+Period).
Get in Touch
@MuriloFP
Important
Adds Ctrl+L/Cmd+L keyboard shortcut in
ChatView.tsxto start a new task, with comprehensive tests.ChatView.tsxto start a new task.startNewTask()when pressed, preventing default browser behavior.ChatViewComponentto handle Ctrl+L/Cmd+L.ChatView.spec.tsxfor new shortcut functionality.This description was created by
for e0e3443. You can customize this summary. It will automatically update as commits are pushed.