Skip to content

Commit d79dfc7

Browse files
committed
Make retries respect the global auto approve checkbox
1 parent 5067190 commit d79dfc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/Cline.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ export class Cline extends EventEmitter<ClineEvents> {
930930
async *attemptApiRequest(previousApiReqIndex: number, retryAttempt: number = 0): ApiStream {
931931
let mcpHub: McpHub | undefined
932932

933-
const { apiConfiguration, mcpEnabled, alwaysApproveResubmit, requestDelaySeconds } =
933+
const { apiConfiguration, mcpEnabled, autoApprovalEnabled, alwaysApproveResubmit, requestDelaySeconds } =
934934
(await this.providerRef.deref()?.getState()) ?? {}
935935

936936
let rateLimitDelay = 0
@@ -1093,7 +1093,7 @@ export class Cline extends EventEmitter<ClineEvents> {
10931093
this.isWaitingForFirstChunk = false
10941094
} catch (error) {
10951095
// note that this api_req_failed ask is unique in that we only present this option if the api hasn't streamed any content yet (ie it fails on the first chunk due), as it would allow them to hit a retry button. However if the api failed mid-stream, it could be in any arbitrary state where some tools may have executed, so that error is handled differently and requires cancelling the task entirely.
1096-
if (alwaysApproveResubmit) {
1096+
if (autoApprovalEnabled && alwaysApproveResubmit) {
10971097
let errorMsg
10981098

10991099
if (error.error?.metadata?.raw) {

0 commit comments

Comments
 (0)