Skip to content
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 command to switch mode #1120

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aheizi
Copy link

@aheizi aheizi commented Feb 22, 2025

Description

Feature: add command to switch mode

When I'm developing with roo-code, I often need to switch between different modes. Clicking the select box is somewhat inconvenient for me, and I hope there could be a better way to help me switch modes. When I learned that the new version of Cursor added a Cmd + . shortcut to switch modes, I was excited and wanted to add this functionality to roo-code as well.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Manual testing

Checklist:

  • My code follows the patterns of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Additional context

roo-code-add-cmd-switch-mode.mov

Related Issues

Reviewers


Important

Add cycleModes command and keyboard shortcut to switch modes in Roo Code, integrating it with the ChatView component.

  • Feature:
    • Add cycleModes command in package.json to switch modes.
    • Register cycleModes command in src/commands/mode-switching.ts.
    • Add keybinding for cycleModes in package.json.
  • Integration:
    • Register mode switching command in src/extension.ts.
    • Handle mode messages in webview-ui/src/App.tsx to switch to chat tab and call switchMode.
  • Components:
    • Add switchMode method to ChatView in webview-ui/src/components/chat/ChatView.tsx to update mode and send message to VSCode.

This description was created by Ellipsis for 867d5e0. It will automatically update as commits are pushed.

Copy link

changeset-bot bot commented Feb 22, 2025

⚠️ No Changeset found

Latest commit: 71bdc7e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. enhancement New feature or request labels Feb 22, 2025
"win": "ctrl+.",
"linux": "ctrl+.",
"mac": "cmd+.",
"when": "true"
Copy link

Choose a reason for hiding this comment

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

The new keybinding for 'roo-cline.cycleModes' is registered with a universal condition ('when': 'true'). Consider refining the condition (e.g. checking for an active editor or focused window) to avoid accidental triggering in contexts where switching modes isn’t applicable.

Suggested change
"when": "true"
"when": "editorTextFocus"

@aheizi aheizi force-pushed the feature/add-command-to-switch-mode branch from c8985fe to 71bdc7e Compare February 23, 2025 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant