mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
feat: Add auto-approval for mode switching
Implements automatic approval for mode switching operations when enabled, following existing auto-approval patterns in the codebase. Implementation: - Added `alwaysAllowModeSwitch` to state management - Updated `isAutoApproved` function in ChatView to handle mode switch requests - Added mode switch option to AutoApproveMenu with appropriate handler - Integrated with existing auto-approval flow Tests: - Added three test cases in ChatView.auto-approve.test.tsx: 1. Verifies mode switch auto-approval when enabled 2. Verifies no auto-approval when mode switch setting is disabled 3. Verifies no auto-approval when global auto-approval is disabled The implementation follows existing patterns for other auto-approve features (read, write, browser, etc.) to maintain consistency in the codebase.
This commit is contained in:
@@ -91,6 +91,7 @@ export interface ExtensionState {
|
||||
alwaysAllowBrowser?: boolean
|
||||
alwaysAllowMcp?: boolean
|
||||
alwaysApproveResubmit?: boolean
|
||||
alwaysAllowModeSwitch?: boolean
|
||||
requestDelaySeconds: number
|
||||
uriScheme?: string
|
||||
allowedCommands?: string[]
|
||||
|
||||
Reference in New Issue
Block a user