Fixes to the auto approve menu

This commit is contained in:
Matt Rubens
2025-01-16 03:37:23 -05:00
parent 6e3919f5e2
commit ee344facda
8 changed files with 56 additions and 118 deletions

View File

@@ -124,16 +124,6 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
switch (message.type) {
case "state": {
const newState = message.state!
// Set autoApprovalEnabled to true if undefined and any individual flag is true
if (newState.autoApprovalEnabled === undefined) {
newState.autoApprovalEnabled = !!(
newState.alwaysAllowBrowser ||
newState.alwaysAllowReadOnly ||
newState.alwaysAllowWrite ||
newState.alwaysAllowExecute ||
newState.alwaysAllowMcp ||
newState.alwaysApproveResubmit)
}
setState(prevState => ({
...prevState,
...newState