@@ -83,6 +83,8 @@ type GlobalStateKey =
8383 | "writeDelayMs"
8484 | "terminalOutputLineLimit"
8585 | "mcpEnabled"
86+ | "alwaysApproveResubmit"
87+ | "requestDelaySeconds"
8688export const GlobalFileNames = {
8789 apiConversationHistory : "api_conversation_history.json" ,
8890 uiMessages : "ui_messages.json" ,
@@ -675,6 +677,14 @@ export class ClineProvider implements vscode.WebviewViewProvider {
675677 await this . updateGlobalState ( "fuzzyMatchThreshold" , message . value )
676678 await this . postStateToWebview ( )
677679 break
680+ case "alwaysApproveResubmit" :
681+ await this . updateGlobalState ( "alwaysApproveResubmit" , message . bool ?? false )
682+ await this . postStateToWebview ( )
683+ break
684+ case "requestDelaySeconds" :
685+ await this . updateGlobalState ( "requestDelaySeconds" , message . value ?? 5 )
686+ await this . postStateToWebview ( )
687+ break
678688 case "preferredLanguage" :
679689 await this . updateGlobalState ( "preferredLanguage" , message . text )
680690 await this . postStateToWebview ( )
@@ -1224,9 +1234,9 @@ export class ClineProvider implements vscode.WebviewViewProvider {
12241234 }
12251235
12261236 async getStateToPostToWebview ( ) {
1227- const {
1228- apiConfiguration,
1229- lastShownAnnouncementId,
1237+ const {
1238+ apiConfiguration,
1239+ lastShownAnnouncementId,
12301240 customInstructions,
12311241 alwaysAllowReadOnly,
12321242 alwaysAllowWrite,
@@ -1244,6 +1254,8 @@ export class ClineProvider implements vscode.WebviewViewProvider {
12441254 terminalOutputLineLimit,
12451255 fuzzyMatchThreshold,
12461256 mcpEnabled,
1257+ alwaysApproveResubmit,
1258+ requestDelaySeconds,
12471259 } = await this . getState ( )
12481260
12491261 const allowedCommands = vscode . workspace
@@ -1276,6 +1288,8 @@ export class ClineProvider implements vscode.WebviewViewProvider {
12761288 terminalOutputLineLimit : terminalOutputLineLimit ?? 500 ,
12771289 fuzzyMatchThreshold : fuzzyMatchThreshold ?? 1.0 ,
12781290 mcpEnabled : mcpEnabled ?? true ,
1291+ alwaysApproveResubmit : alwaysApproveResubmit ?? false ,
1292+ requestDelaySeconds : requestDelaySeconds ?? 5 ,
12791293 }
12801294 }
12811295
@@ -1381,6 +1395,8 @@ export class ClineProvider implements vscode.WebviewViewProvider {
13811395 screenshotQuality ,
13821396 terminalOutputLineLimit ,
13831397 mcpEnabled ,
1398+ alwaysApproveResubmit ,
1399+ requestDelaySeconds ,
13841400 ] = await Promise . all ( [
13851401 this . getGlobalState ( "apiProvider" ) as Promise < ApiProvider | undefined > ,
13861402 this . getGlobalState ( "apiModelId" ) as Promise < string | undefined > ,
@@ -1431,6 +1447,8 @@ export class ClineProvider implements vscode.WebviewViewProvider {
14311447 this . getGlobalState ( "screenshotQuality" ) as Promise < number | undefined > ,
14321448 this . getGlobalState ( "terminalOutputLineLimit" ) as Promise < number | undefined > ,
14331449 this . getGlobalState ( "mcpEnabled" ) as Promise < boolean | undefined > ,
1450+ this . getGlobalState ( "alwaysApproveResubmit" ) as Promise < boolean | undefined > ,
1451+ this . getGlobalState ( "requestDelaySeconds" ) as Promise < number | undefined > ,
14341452 ] )
14351453
14361454 let apiProvider : ApiProvider
@@ -1525,6 +1543,8 @@ export class ClineProvider implements vscode.WebviewViewProvider {
15251543 return langMap [ vscodeLang . split ( '-' ) [ 0 ] ] ?? 'English' ;
15261544 } ) ( ) ,
15271545 mcpEnabled : mcpEnabled ?? true ,
1546+ alwaysApproveResubmit : alwaysApproveResubmit ?? false ,
1547+ requestDelaySeconds : requestDelaySeconds ?? 5 ,
15281548 }
15291549 }
15301550
0 commit comments