Skip to content

Conversation

@yohangwak
Copy link

@yohangwak yohangwak commented Apr 5, 2025

Description

This PR introduces a keyboard shortcut to navigate to the previous mode in the Roo Code chat view and updates the corresponding UI hint text for clarity.

  • Adds Shortcut: Implements Cmd+/ (macOS) / Ctrl+/ (Windows/Linux) to switch to the previous mode. The / key was chosen to avoid conflict with the default VS Code settings shortcut (Cmd+,).

  • Updates Hint Text: Modifies the tooltip hint in the chat view to clearly display both shortcuts using the format: ⌘ + / (prev) or . (next) mode (on macOS) or Ctrl + / (prev) or . (next) mode (on Windows/Linux).

Why

  • Improves user experience by providing a quick keyboard method to cycle backward through available modes.

  • Enhances clarity of the shortcut hint text.

How

  • Press command + / to change mode

Screenshots

macOS:

2025-04-05-17-06-57


Important

Adds Cmd+/ (macOS) / Ctrl+/ (Windows/Linux) shortcut for previous mode and updates hint text in ChatView.tsx.

  • Behavior:
    • Adds Cmd+/ (macOS) / Ctrl+/ (Windows/Linux) shortcut in ChatView.tsx to switch to the previous mode.
    • Updates hint text format in ChatView.tsx to ⌘ + / (prev) or . (next) mode for macOS and Ctrl + / (prev) or . (next) mode for Windows/Linux.
  • Functions:
    • Adds switchToPreviousMode() in ChatView.tsx to handle previous mode switching.
    • Updates handleKeyDown() in ChatView.tsx to include switchToPreviousMode() logic.
  • Misc:
    • Updates modeShortcutText in ChatView.tsx to reflect new shortcut format.

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

@yohangwak yohangwak requested review from cte and mrubens as code owners April 5, 2025 08:06
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Apr 5, 2025
@changeset-bot
Copy link

changeset-bot bot commented Apr 5, 2025

⚠️ No Changeset found

Latest commit: b3bd175

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 the enhancement New feature or request label Apr 5, 2025
const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryView }: ChatViewProps) => {
const { t } = useAppTranslation()
const modeShortcutText = `${isMac ? "⌘" : "Ctrl"} + . ${t("chat:forNextMode")}`
const modeShortcutText = `${isMac ? "⌘" : "Ctrl"} + . next or / prev mode` // Updated shortcut hint format
Copy link
Contributor

Choose a reason for hiding this comment

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

The shortcut hint text is now hard-coded as ${isMac ? "⌘" : "Ctrl"} + . next or / prev mode. For consistency and internationalization, consider using the translation function (t) instead of hard-coding the string.

type: "mode",
text: previousMode.slug,
})
// Consider adding playSound("progress_loop") here if desired for consistency
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a commented suggestion to add playSound('progress_loop') in switchToPreviousMode. For clarity, either remove this comment or implement the functionality consistently if it is desired.

Suggested change
// Consider adding playSound("progress_loop") here if desired for consistency

@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap Apr 6, 2025
@yohangwak yohangwak closed this by deleting the head repository Apr 7, 2025
@hannesrudolph hannesrudolph moved this from New to Done in Roo Code Roadmap May 20, 2025
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:S This PR changes 10-29 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant