|
|
@@ -123,6 +123,7 @@ type GlobalStateKey =
|
|
|
| "customModes" // Array of custom modes
|
|
|
| "unboundModelId"
|
|
|
| "unboundModelInfo"
|
|
|
+ | "modelTemperature"
|
|
|
|
|
|
export const GlobalFileNames = {
|
|
|
apiConversationHistory: "api_conversation_history.json",
|
|
|
@@ -1587,6 +1588,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|
|
unboundApiKey,
|
|
|
unboundModelId,
|
|
|
unboundModelInfo,
|
|
|
+ modelTemperature,
|
|
|
} = apiConfiguration
|
|
|
await this.updateGlobalState("apiProvider", apiProvider)
|
|
|
await this.updateGlobalState("apiModelId", apiModelId)
|
|
|
@@ -1628,6 +1630,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|
|
await this.storeSecret("unboundApiKey", unboundApiKey)
|
|
|
await this.updateGlobalState("unboundModelId", unboundModelId)
|
|
|
await this.updateGlobalState("unboundModelInfo", unboundModelInfo)
|
|
|
+ await this.updateGlobalState("modelTemperature", modelTemperature)
|
|
|
if (this.cline) {
|
|
|
this.cline.api = buildApiHandler(apiConfiguration)
|
|
|
}
|
|
|
@@ -2388,6 +2391,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|
|
unboundApiKey,
|
|
|
unboundModelId,
|
|
|
unboundModelInfo,
|
|
|
+ modelTemperature,
|
|
|
] = await Promise.all([
|
|
|
this.getGlobalState("apiProvider") as Promise<ApiProvider | undefined>,
|
|
|
this.getGlobalState("apiModelId") as Promise<string | undefined>,
|
|
|
@@ -2464,6 +2468,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|
|
this.getSecret("unboundApiKey") as Promise<string | undefined>,
|
|
|
this.getGlobalState("unboundModelId") as Promise<string | undefined>,
|
|
|
this.getGlobalState("unboundModelInfo") as Promise<ModelInfo | undefined>,
|
|
|
+ this.getGlobalState("modelTemperature") as Promise<number | undefined>,
|
|
|
])
|
|
|
|
|
|
let apiProvider: ApiProvider
|
|
|
@@ -2522,6 +2527,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|
|
unboundApiKey,
|
|
|
unboundModelId,
|
|
|
unboundModelInfo,
|
|
|
+ modelTemperature,
|
|
|
},
|
|
|
lastShownAnnouncementId,
|
|
|
customInstructions,
|