|
@@ -79,6 +79,8 @@ type GlobalStateKey =
|
|
|
| "alwaysAllowWrite"
|
|
| "alwaysAllowWrite"
|
|
|
| "alwaysAllowExecute"
|
|
| "alwaysAllowExecute"
|
|
|
| "alwaysAllowBrowser"
|
|
| "alwaysAllowBrowser"
|
|
|
|
|
+ | "alwaysAllowMcp"
|
|
|
|
|
+ | "alwaysAllowModeSwitch"
|
|
|
| "taskHistory"
|
|
| "taskHistory"
|
|
|
| "openAiBaseUrl"
|
|
| "openAiBaseUrl"
|
|
|
| "openAiModelId"
|
|
| "openAiModelId"
|
|
@@ -99,7 +101,6 @@ type GlobalStateKey =
|
|
|
| "soundEnabled"
|
|
| "soundEnabled"
|
|
|
| "soundVolume"
|
|
| "soundVolume"
|
|
|
| "diffEnabled"
|
|
| "diffEnabled"
|
|
|
- | "alwaysAllowMcp"
|
|
|
|
|
| "browserViewportSize"
|
|
| "browserViewportSize"
|
|
|
| "screenshotQuality"
|
|
| "screenshotQuality"
|
|
|
| "fuzzyMatchThreshold"
|
|
| "fuzzyMatchThreshold"
|
|
@@ -620,6 +621,10 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|
|
await this.updateGlobalState("alwaysAllowMcp", message.bool)
|
|
await this.updateGlobalState("alwaysAllowMcp", message.bool)
|
|
|
await this.postStateToWebview()
|
|
await this.postStateToWebview()
|
|
|
break
|
|
break
|
|
|
|
|
+ case "alwaysAllowModeSwitch":
|
|
|
|
|
+ await this.updateGlobalState("alwaysAllowModeSwitch", message.bool)
|
|
|
|
|
+ await this.postStateToWebview()
|
|
|
|
|
+ break
|
|
|
case "askResponse":
|
|
case "askResponse":
|
|
|
this.cline?.handleWebviewAskResponse(message.askResponse!, message.text, message.images)
|
|
this.cline?.handleWebviewAskResponse(message.askResponse!, message.text, message.images)
|
|
|
break
|
|
break
|
|
@@ -1848,6 +1853,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|
|
alwaysAllowExecute,
|
|
alwaysAllowExecute,
|
|
|
alwaysAllowBrowser,
|
|
alwaysAllowBrowser,
|
|
|
alwaysAllowMcp,
|
|
alwaysAllowMcp,
|
|
|
|
|
+ alwaysAllowModeSwitch,
|
|
|
soundEnabled,
|
|
soundEnabled,
|
|
|
diffEnabled,
|
|
diffEnabled,
|
|
|
taskHistory,
|
|
taskHistory,
|
|
@@ -1882,6 +1888,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|
|
alwaysAllowExecute: alwaysAllowExecute ?? false,
|
|
alwaysAllowExecute: alwaysAllowExecute ?? false,
|
|
|
alwaysAllowBrowser: alwaysAllowBrowser ?? false,
|
|
alwaysAllowBrowser: alwaysAllowBrowser ?? false,
|
|
|
alwaysAllowMcp: alwaysAllowMcp ?? false,
|
|
alwaysAllowMcp: alwaysAllowMcp ?? false,
|
|
|
|
|
+ alwaysAllowModeSwitch: alwaysAllowModeSwitch ?? false,
|
|
|
uriScheme: vscode.env.uriScheme,
|
|
uriScheme: vscode.env.uriScheme,
|
|
|
clineMessages: this.cline?.clineMessages || [],
|
|
clineMessages: this.cline?.clineMessages || [],
|
|
|
taskHistory: (taskHistory || [])
|
|
taskHistory: (taskHistory || [])
|
|
@@ -2009,6 +2016,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|
|
alwaysAllowExecute,
|
|
alwaysAllowExecute,
|
|
|
alwaysAllowBrowser,
|
|
alwaysAllowBrowser,
|
|
|
alwaysAllowMcp,
|
|
alwaysAllowMcp,
|
|
|
|
|
+ alwaysAllowModeSwitch,
|
|
|
taskHistory,
|
|
taskHistory,
|
|
|
allowedCommands,
|
|
allowedCommands,
|
|
|
soundEnabled,
|
|
soundEnabled,
|
|
@@ -2078,6 +2086,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|
|
this.getGlobalState("alwaysAllowExecute") as Promise<boolean | undefined>,
|
|
this.getGlobalState("alwaysAllowExecute") as Promise<boolean | undefined>,
|
|
|
this.getGlobalState("alwaysAllowBrowser") as Promise<boolean | undefined>,
|
|
this.getGlobalState("alwaysAllowBrowser") as Promise<boolean | undefined>,
|
|
|
this.getGlobalState("alwaysAllowMcp") as Promise<boolean | undefined>,
|
|
this.getGlobalState("alwaysAllowMcp") as Promise<boolean | undefined>,
|
|
|
|
|
+ this.getGlobalState("alwaysAllowModeSwitch") as Promise<boolean | undefined>,
|
|
|
this.getGlobalState("taskHistory") as Promise<HistoryItem[] | undefined>,
|
|
this.getGlobalState("taskHistory") as Promise<HistoryItem[] | undefined>,
|
|
|
this.getGlobalState("allowedCommands") as Promise<string[] | undefined>,
|
|
this.getGlobalState("allowedCommands") as Promise<string[] | undefined>,
|
|
|
this.getGlobalState("soundEnabled") as Promise<boolean | undefined>,
|
|
this.getGlobalState("soundEnabled") as Promise<boolean | undefined>,
|
|
@@ -2166,6 +2175,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|
|
alwaysAllowExecute: alwaysAllowExecute ?? false,
|
|
alwaysAllowExecute: alwaysAllowExecute ?? false,
|
|
|
alwaysAllowBrowser: alwaysAllowBrowser ?? false,
|
|
alwaysAllowBrowser: alwaysAllowBrowser ?? false,
|
|
|
alwaysAllowMcp: alwaysAllowMcp ?? false,
|
|
alwaysAllowMcp: alwaysAllowMcp ?? false,
|
|
|
|
|
+ alwaysAllowModeSwitch: alwaysAllowModeSwitch ?? false,
|
|
|
taskHistory,
|
|
taskHistory,
|
|
|
allowedCommands,
|
|
allowedCommands,
|
|
|
soundEnabled: soundEnabled ?? false,
|
|
soundEnabled: soundEnabled ?? false,
|