mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
More fixes to checkbox state
This commit is contained in:
5
.changeset/dull-gifts-rhyme.md
Normal file
5
.changeset/dull-gifts-rhyme.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"roo-cline": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Another fix to the auto approve menu
|
||||||
@@ -877,7 +877,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||||||
await this.postStateToWebview()
|
await this.postStateToWebview()
|
||||||
break
|
break
|
||||||
case "autoApprovalEnabled":
|
case "autoApprovalEnabled":
|
||||||
await this.updateGlobalState("autoApprovalEnabled", message.bool)
|
await this.updateGlobalState("autoApprovalEnabled", message.bool ?? false)
|
||||||
await this.postStateToWebview()
|
await this.postStateToWebview()
|
||||||
break
|
break
|
||||||
case "enhancePrompt":
|
case "enhancePrompt":
|
||||||
@@ -1644,6 +1644,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||||||
mode,
|
mode,
|
||||||
customPrompts,
|
customPrompts,
|
||||||
enhancementApiConfigId,
|
enhancementApiConfigId,
|
||||||
|
autoApprovalEnabled,
|
||||||
} = await this.getState()
|
} = await this.getState()
|
||||||
|
|
||||||
const allowedCommands = vscode.workspace
|
const allowedCommands = vscode.workspace
|
||||||
@@ -1683,6 +1684,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||||||
mode: mode ?? codeMode,
|
mode: mode ?? codeMode,
|
||||||
customPrompts: customPrompts ?? {},
|
customPrompts: customPrompts ?? {},
|
||||||
enhancementApiConfigId,
|
enhancementApiConfigId,
|
||||||
|
autoApprovalEnabled: autoApprovalEnabled ?? false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1797,6 +1799,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||||||
modeApiConfigs,
|
modeApiConfigs,
|
||||||
customPrompts,
|
customPrompts,
|
||||||
enhancementApiConfigId,
|
enhancementApiConfigId,
|
||||||
|
autoApprovalEnabled,
|
||||||
] = await Promise.all([
|
] = await Promise.all([
|
||||||
this.getGlobalState("apiProvider") as Promise<ApiProvider | undefined>,
|
this.getGlobalState("apiProvider") as Promise<ApiProvider | undefined>,
|
||||||
this.getGlobalState("apiModelId") as Promise<string | undefined>,
|
this.getGlobalState("apiModelId") as Promise<string | undefined>,
|
||||||
@@ -1856,6 +1859,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||||||
this.getGlobalState("modeApiConfigs") as Promise<Record<Mode, string> | undefined>,
|
this.getGlobalState("modeApiConfigs") as Promise<Record<Mode, string> | undefined>,
|
||||||
this.getGlobalState("customPrompts") as Promise<CustomPrompts | undefined>,
|
this.getGlobalState("customPrompts") as Promise<CustomPrompts | undefined>,
|
||||||
this.getGlobalState("enhancementApiConfigId") as Promise<string | undefined>,
|
this.getGlobalState("enhancementApiConfigId") as Promise<string | undefined>,
|
||||||
|
this.getGlobalState("autoApprovalEnabled") as Promise<boolean | undefined>,
|
||||||
])
|
])
|
||||||
|
|
||||||
let apiProvider: ApiProvider
|
let apiProvider: ApiProvider
|
||||||
@@ -1959,6 +1963,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||||||
modeApiConfigs: modeApiConfigs ?? {} as Record<Mode, string>,
|
modeApiConfigs: modeApiConfigs ?? {} as Record<Mode, string>,
|
||||||
customPrompts: customPrompts ?? {},
|
customPrompts: customPrompts ?? {},
|
||||||
enhancementApiConfigId,
|
enhancementApiConfigId,
|
||||||
|
autoApprovalEnabled: autoApprovalEnabled ?? false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
|
|||||||
mode: codeMode,
|
mode: codeMode,
|
||||||
customPrompts: defaultPrompts,
|
customPrompts: defaultPrompts,
|
||||||
enhancementApiConfigId: '',
|
enhancementApiConfigId: '',
|
||||||
|
autoApprovalEnabled: false,
|
||||||
})
|
})
|
||||||
const [didHydrateState, setDidHydrateState] = useState(false)
|
const [didHydrateState, setDidHydrateState] = useState(false)
|
||||||
const [showWelcome, setShowWelcome] = useState(false)
|
const [showWelcome, setShowWelcome] = useState(false)
|
||||||
|
|||||||
Reference in New Issue
Block a user