Skip to content

Commit 91aa9f2

Browse files
auto approve by default
1 parent 670cd88 commit 91aa9f2

File tree

3 files changed

+26
-20
lines changed

3 files changed

+26
-20
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2057,11 +2057,11 @@ export class ClineProvider implements vscode.WebviewViewProvider {
20572057
version: this.context.extension?.packageJSON?.version ?? "",
20582058
apiConfiguration,
20592059
customInstructions,
2060-
alwaysAllowReadOnly: alwaysAllowReadOnly ?? false,
2061-
alwaysAllowWrite: alwaysAllowWrite ?? false,
2062-
alwaysAllowExecute: alwaysAllowExecute ?? false,
2063-
alwaysAllowBrowser: alwaysAllowBrowser ?? false,
2064-
alwaysAllowMcp: alwaysAllowMcp ?? false,
2060+
alwaysAllowReadOnly: alwaysAllowReadOnly ?? true,
2061+
alwaysAllowWrite: alwaysAllowWrite ?? true,
2062+
alwaysAllowExecute: alwaysAllowExecute ?? true,
2063+
alwaysAllowBrowser: alwaysAllowBrowser ?? true,
2064+
alwaysAllowMcp: alwaysAllowMcp ?? true,
20652065
alwaysAllowModeSwitch: alwaysAllowModeSwitch ?? false,
20662066
uriScheme: vscode.env.uriScheme,
20672067
currentTaskItem: this.cline?.taskId
@@ -2085,7 +2085,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
20852085
fuzzyMatchThreshold: fuzzyMatchThreshold ?? 1.0,
20862086
mcpEnabled: mcpEnabled ?? true,
20872087
enableMcpServerCreation: enableMcpServerCreation ?? true,
2088-
alwaysApproveResubmit: alwaysApproveResubmit ?? false,
2088+
alwaysApproveResubmit: alwaysApproveResubmit ?? true,
20892089
requestDelaySeconds: requestDelaySeconds ?? 10,
20902090
rateLimitSeconds: rateLimitSeconds ?? 0,
20912091
currentApiConfigName: currentApiConfigName ?? "default",
@@ -2094,7 +2094,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
20942094
customModePrompts: customModePrompts ?? {},
20952095
customSupportPrompts: customSupportPrompts ?? {},
20962096
enhancementApiConfigId,
2097-
autoApprovalEnabled: autoApprovalEnabled ?? false,
2097+
autoApprovalEnabled: autoApprovalEnabled ?? true,
20982098
customModes: await this.customModesManager.getCustomModes(),
20992099
experiments: experiments ?? experimentDefault,
21002100
mcpServers: this.mcpHub?.getAllServers() ?? [],
@@ -2405,12 +2405,12 @@ export class ClineProvider implements vscode.WebviewViewProvider {
24052405
},
24062406
lastShownAnnouncementId,
24072407
customInstructions,
2408-
alwaysAllowReadOnly: alwaysAllowReadOnly ?? false,
2409-
alwaysAllowWrite: alwaysAllowWrite ?? false,
2410-
alwaysAllowExecute: alwaysAllowExecute ?? false,
2411-
alwaysAllowBrowser: alwaysAllowBrowser ?? false,
2412-
alwaysAllowMcp: alwaysAllowMcp ?? false,
2413-
alwaysAllowModeSwitch: alwaysAllowModeSwitch ?? false,
2408+
alwaysAllowReadOnly: alwaysAllowReadOnly ?? true,
2409+
alwaysAllowWrite: alwaysAllowWrite ?? true,
2410+
alwaysAllowExecute: alwaysAllowExecute ?? true,
2411+
alwaysAllowBrowser: alwaysAllowBrowser ?? true,
2412+
alwaysAllowMcp: alwaysAllowMcp ?? true,
2413+
alwaysAllowModeSwitch: alwaysAllowModeSwitch ?? true,
24142414
taskHistory,
24152415
allowedCommands,
24162416
soundEnabled: soundEnabled ?? false,
@@ -2456,7 +2456,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
24562456
})(),
24572457
mcpEnabled: mcpEnabled ?? true,
24582458
enableMcpServerCreation: enableMcpServerCreation ?? true,
2459-
alwaysApproveResubmit: alwaysApproveResubmit ?? false,
2459+
alwaysApproveResubmit: alwaysApproveResubmit ?? true,
24602460
requestDelaySeconds: Math.max(5, requestDelaySeconds ?? 10),
24612461
rateLimitSeconds: rateLimitSeconds ?? 0,
24622462
currentApiConfigName: currentApiConfigName ?? "default",
@@ -2466,7 +2466,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
24662466
customSupportPrompts: customSupportPrompts ?? {},
24672467
enhancementApiConfigId,
24682468
experiments: experiments ?? experimentDefault,
2469-
autoApprovalEnabled: autoApprovalEnabled ?? false,
2469+
autoApprovalEnabled: autoApprovalEnabled ?? true,
24702470
customModes,
24712471
maxOpenTabsContext: maxOpenTabsContext ?? 20,
24722472
}

webview-ui/src/components/chat/AutoApproveMenu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
176176
onClick={toggleExpanded}>
177177
<div onClick={(e) => e.stopPropagation()}>
178178
<VSCodeCheckbox
179-
checked={autoApprovalEnabled ?? false}
179+
checked={autoApprovalEnabled ?? true}
180180
onChange={() => {
181-
const newValue = !(autoApprovalEnabled ?? false)
181+
const newValue = !(autoApprovalEnabled ?? true)
182182
setAutoApprovalEnabled(newValue)
183183
vscode.postMessage({ type: "autoApprovalEnabled", bool: newValue })
184184
}}

webview-ui/src/context/ExtensionStateContext.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,15 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
8888
taskHistory: [],
8989
shouldShowAnnouncement: false,
9090
allowedCommands: [],
91+
alwaysAllowReadOnly: true,
92+
alwaysAllowWrite: true,
93+
alwaysAllowExecute: true,
94+
alwaysAllowBrowser: true,
95+
alwaysAllowMcp: true,
96+
alwaysAllowModeSwitch: true,
9197
soundEnabled: false,
9298
soundVolume: 0.5,
93-
diffEnabled: false,
99+
diffEnabled: true,
94100
checkpointsEnabled: false,
95101
fuzzyMatchThreshold: 1.0,
96102
preferredLanguage: "English",
@@ -100,7 +106,7 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
100106
terminalOutputLineLimit: 500,
101107
mcpEnabled: true,
102108
enableMcpServerCreation: true,
103-
alwaysApproveResubmit: false,
109+
alwaysApproveResubmit: true,
104110
requestDelaySeconds: 5,
105111
rateLimitSeconds: 0, // Minimum time between successive requests (0 = disabled)
106112
currentApiConfigName: "default",
@@ -110,7 +116,7 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
110116
customSupportPrompts: {},
111117
experiments: experimentDefault,
112118
enhancementApiConfigId: "",
113-
autoApprovalEnabled: false,
119+
autoApprovalEnabled: true,
114120
customModes: [],
115121
maxOpenTabsContext: 20,
116122
cwd: "",

0 commit comments

Comments
 (0)