Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions src/core/webview/ClineProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2044,11 +2044,11 @@ export class ClineProvider implements vscode.WebviewViewProvider {
version: this.context.extension?.packageJSON?.version ?? "",
apiConfiguration,
customInstructions,
alwaysAllowReadOnly: alwaysAllowReadOnly ?? false,
alwaysAllowWrite: alwaysAllowWrite ?? false,
alwaysAllowExecute: alwaysAllowExecute ?? false,
alwaysAllowBrowser: alwaysAllowBrowser ?? false,
alwaysAllowMcp: alwaysAllowMcp ?? false,
alwaysAllowReadOnly: alwaysAllowReadOnly ?? true,
alwaysAllowWrite: alwaysAllowWrite ?? true,
alwaysAllowExecute: alwaysAllowExecute ?? true,
alwaysAllowBrowser: alwaysAllowBrowser ?? true,
alwaysAllowMcp: alwaysAllowMcp ?? true,
alwaysAllowModeSwitch: alwaysAllowModeSwitch ?? false,
uriScheme: vscode.env.uriScheme,
clineMessages: this.cline?.clineMessages || [],
Expand All @@ -2067,7 +2067,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
terminalOutputLineLimit: terminalOutputLineLimit ?? 500,
fuzzyMatchThreshold: fuzzyMatchThreshold ?? 1.0,
mcpEnabled: mcpEnabled ?? true,
alwaysApproveResubmit: alwaysApproveResubmit ?? false,
alwaysApproveResubmit: alwaysApproveResubmit ?? true,
requestDelaySeconds: requestDelaySeconds ?? 10,
rateLimitSeconds: rateLimitSeconds ?? 0,
currentApiConfigName: currentApiConfigName ?? "default",
Expand All @@ -2076,7 +2076,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
customModePrompts: customModePrompts ?? {},
customSupportPrompts: customSupportPrompts ?? {},
enhancementApiConfigId,
autoApprovalEnabled: autoApprovalEnabled ?? false,
autoApprovalEnabled: autoApprovalEnabled ?? true,
customModes: await this.customModesManager.getCustomModes(),
experiments: experiments ?? experimentDefault,
}
Expand Down Expand Up @@ -2354,12 +2354,12 @@ export class ClineProvider implements vscode.WebviewViewProvider {
},
lastShownAnnouncementId,
customInstructions,
alwaysAllowReadOnly: alwaysAllowReadOnly ?? false,
alwaysAllowWrite: alwaysAllowWrite ?? false,
alwaysAllowExecute: alwaysAllowExecute ?? false,
alwaysAllowBrowser: alwaysAllowBrowser ?? false,
alwaysAllowMcp: alwaysAllowMcp ?? false,
alwaysAllowModeSwitch: alwaysAllowModeSwitch ?? false,
alwaysAllowReadOnly: alwaysAllowReadOnly ?? true,
alwaysAllowWrite: alwaysAllowWrite ?? true,
alwaysAllowExecute: alwaysAllowExecute ?? true,
alwaysAllowBrowser: alwaysAllowBrowser ?? true,
alwaysAllowMcp: alwaysAllowMcp ?? true,
alwaysAllowModeSwitch: alwaysAllowModeSwitch ?? true,
taskHistory,
allowedCommands,
soundEnabled: soundEnabled ?? false,
Expand Down Expand Up @@ -2401,7 +2401,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
return langMap[vscodeLang.split("-")[0]] ?? "English"
})(),
mcpEnabled: mcpEnabled ?? true,
alwaysApproveResubmit: alwaysApproveResubmit ?? false,
alwaysApproveResubmit: alwaysApproveResubmit ?? true,
requestDelaySeconds: Math.max(5, requestDelaySeconds ?? 10),
rateLimitSeconds: rateLimitSeconds ?? 0,
currentApiConfigName: currentApiConfigName ?? "default",
Expand All @@ -2411,7 +2411,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
customSupportPrompts: customSupportPrompts ?? {},
enhancementApiConfigId,
experiments: experiments ?? experimentDefault,
autoApprovalEnabled: autoApprovalEnabled ?? false,
autoApprovalEnabled: autoApprovalEnabled ?? true,
customModes,
}
}
Expand Down
4 changes: 2 additions & 2 deletions webview-ui/src/components/chat/AutoApproveMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
onClick={toggleExpanded}>
<div onClick={(e) => e.stopPropagation()}>
<VSCodeCheckbox
checked={autoApprovalEnabled ?? false}
checked={autoApprovalEnabled ?? true}
onChange={() => {
const newValue = !(autoApprovalEnabled ?? false)
const newValue = !(autoApprovalEnabled ?? true)
setAutoApprovalEnabled(newValue)
vscode.postMessage({ type: "autoApprovalEnabled", bool: newValue })
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ describe("AutoApproveMenu", () => {
customModes: [],

// Auto-approve specific properties
alwaysAllowReadOnly: false,
alwaysAllowWrite: false,
alwaysAllowExecute: false,
alwaysAllowBrowser: false,
alwaysAllowMcp: false,
alwaysApproveResubmit: false,
alwaysAllowModeSwitch: false,
autoApprovalEnabled: false,
alwaysAllowReadOnly: true,
alwaysAllowWrite: true,
alwaysAllowExecute: true,
alwaysAllowBrowser: true,
alwaysAllowMcp: true,
alwaysApproveResubmit: true,
alwaysAllowModeSwitch: true,
autoApprovalEnabled: true,

// Required setter functions
setApiConfiguration: jest.fn(),
Expand Down
12 changes: 9 additions & 3 deletions webview-ui/src/context/ExtensionStateContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,23 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
taskHistory: [],
shouldShowAnnouncement: false,
allowedCommands: [],
alwaysAllowReadOnly: true,
alwaysAllowWrite: true,
alwaysAllowExecute: true,
alwaysAllowBrowser: true,
alwaysAllowMcp: true,
alwaysAllowModeSwitch: true,
soundEnabled: false,
soundVolume: 0.5,
diffEnabled: false,
diffEnabled: true,
fuzzyMatchThreshold: 1.0,
preferredLanguage: "English",
writeDelayMs: 1000,
browserViewportSize: "900x600",
screenshotQuality: 75,
terminalOutputLineLimit: 500,
mcpEnabled: true,
alwaysApproveResubmit: false,
alwaysApproveResubmit: true,
requestDelaySeconds: 5,
rateLimitSeconds: 0, // Minimum time between successive requests (0 = disabled)
currentApiConfigName: "default",
Expand All @@ -103,7 +109,7 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
customSupportPrompts: {},
experiments: experimentDefault,
enhancementApiConfigId: "",
autoApprovalEnabled: false,
autoApprovalEnabled: true,
customModes: [],
})

Expand Down
Loading