mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Merge pull request #1332 from aheizi/fix_switch_mode
fix: switch mode state
This commit is contained in:
commit
9faed0e0dc
1 changed files with 5 additions and 0 deletions
|
|
@ -973,7 +973,12 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
|
|||
const allModes = getAllModes(customModes)
|
||||
const currentModeIndex = allModes.findIndex((m) => m.slug === mode)
|
||||
const nextModeIndex = (currentModeIndex + 1) % allModes.length
|
||||
// Update local state and notify extension to sync mode change
|
||||
setMode(allModes[nextModeIndex].slug)
|
||||
vscode.postMessage({
|
||||
type: "mode",
|
||||
text: allModes[nextModeIndex].slug,
|
||||
})
|
||||
}, [mode, setMode, customModes])
|
||||
|
||||
// Add keyboard event handler
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue