Skip to content

Commit 9c5174c

Browse files
committed
Fixed merge
1 parent 4fad4a6 commit 9c5174c

File tree

1 file changed

+1
-65
lines changed

1 file changed

+1
-65
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 1 addition & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
133133

134134
this.context.subscriptions.push(
135135
vscode.commands.registerCommand("roo-cline.setApiConfiguration", async (config: ApiConfiguration) => {
136-
await this.handleApiConfigurationUpdate(config)
136+
await this.updateApiConfiguration(config)
137137
}),
138138
)
139139
}
@@ -514,7 +514,6 @@ export class ClineProvider implements vscode.WebviewViewProvider {
514514
case "apiConfiguration":
515515
if (message.apiConfiguration) {
516516
await this.updateApiConfiguration(message.apiConfiguration)
517-
await this.handleApiConfigurationUpdate(message.apiConfiguration)
518517
}
519518
await this.postStateToWebview()
520519
break
@@ -1212,69 +1211,6 @@ export class ClineProvider implements vscode.WebviewViewProvider {
12121211
}
12131212
}
12141213

1215-
private async handleApiConfigurationUpdate(config: ApiConfiguration) {
1216-
if (config) {
1217-
const {
1218-
apiProvider,
1219-
apiModelId,
1220-
apiKey,
1221-
openRouterApiKey,
1222-
awsAccessKey,
1223-
awsSecretKey,
1224-
awsSessionToken,
1225-
awsRegion,
1226-
awsUseCrossRegionInference,
1227-
vertexProjectId,
1228-
vertexRegion,
1229-
openAiBaseUrl,
1230-
openAiApiKey,
1231-
openAiModelId,
1232-
ollamaModelId,
1233-
ollamaBaseUrl,
1234-
lmStudioModelId,
1235-
lmStudioBaseUrl,
1236-
anthropicBaseUrl,
1237-
geminiApiKey,
1238-
openAiNativeApiKey,
1239-
deepSeekApiKey,
1240-
mistralApiKey,
1241-
azureApiVersion,
1242-
openRouterModelId,
1243-
openRouterModelInfo,
1244-
} = config
1245-
await this.updateGlobalState("apiProvider", apiProvider)
1246-
await this.updateGlobalState("apiModelId", apiModelId)
1247-
await this.storeSecret("apiKey", apiKey)
1248-
await this.storeSecret("openRouterApiKey", openRouterApiKey)
1249-
await this.storeSecret("awsAccessKey", awsAccessKey)
1250-
await this.storeSecret("awsSecretKey", awsSecretKey)
1251-
await this.storeSecret("awsSessionToken", awsSessionToken)
1252-
await this.updateGlobalState("awsRegion", awsRegion)
1253-
await this.updateGlobalState("awsUseCrossRegionInference", awsUseCrossRegionInference)
1254-
await this.updateGlobalState("vertexProjectId", vertexProjectId)
1255-
await this.updateGlobalState("vertexRegion", vertexRegion)
1256-
await this.updateGlobalState("openAiBaseUrl", openAiBaseUrl)
1257-
await this.storeSecret("openAiApiKey", openAiApiKey)
1258-
await this.updateGlobalState("openAiModelId", openAiModelId)
1259-
await this.updateGlobalState("ollamaModelId", ollamaModelId)
1260-
await this.updateGlobalState("ollamaBaseUrl", ollamaBaseUrl)
1261-
await this.updateGlobalState("lmStudioModelId", lmStudioModelId)
1262-
await this.updateGlobalState("lmStudioBaseUrl", lmStudioBaseUrl)
1263-
await this.updateGlobalState("anthropicBaseUrl", anthropicBaseUrl)
1264-
await this.storeSecret("geminiApiKey", geminiApiKey)
1265-
await this.storeSecret("openAiNativeApiKey", openAiNativeApiKey)
1266-
await this.storeSecret("deepSeekApiKey", deepSeekApiKey)
1267-
await this.storeSecret("mistralApiKey", mistralApiKey)
1268-
await this.updateGlobalState("azureApiVersion", azureApiVersion)
1269-
await this.updateGlobalState("openRouterModelId", openRouterModelId)
1270-
await this.updateGlobalState("openRouterModelInfo", openRouterModelInfo)
1271-
1272-
if (this.cline) {
1273-
this.cline.api = buildApiHandler(config)
1274-
}
1275-
}
1276-
}
1277-
12781214
async updateCustomInstructions(instructions?: string) {
12791215
// User may be clearing the field
12801216
await this.updateGlobalState("customInstructions", instructions || undefined)

0 commit comments

Comments
 (0)