@@ -123,6 +123,7 @@ type GlobalStateKey =
123123 | "customModes" // Array of custom modes
124124 | "unboundModelId"
125125 | "unboundModelInfo"
126+ | "modelTemperature"
126127
127128export const GlobalFileNames = {
128129 apiConversationHistory : "api_conversation_history.json" ,
@@ -1587,6 +1588,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
15871588 unboundApiKey,
15881589 unboundModelId,
15891590 unboundModelInfo,
1591+ modelTemperature,
15901592 } = apiConfiguration
15911593 await this . updateGlobalState ( "apiProvider" , apiProvider )
15921594 await this . updateGlobalState ( "apiModelId" , apiModelId )
@@ -1628,6 +1630,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
16281630 await this . storeSecret ( "unboundApiKey" , unboundApiKey )
16291631 await this . updateGlobalState ( "unboundModelId" , unboundModelId )
16301632 await this . updateGlobalState ( "unboundModelInfo" , unboundModelInfo )
1633+ await this . updateGlobalState ( "modelTemperature" , modelTemperature )
16311634 if ( this . cline ) {
16321635 this . cline . api = buildApiHandler ( apiConfiguration )
16331636 }
@@ -2388,6 +2391,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
23882391 unboundApiKey ,
23892392 unboundModelId ,
23902393 unboundModelInfo ,
2394+ modelTemperature ,
23912395 ] = await Promise . all ( [
23922396 this . getGlobalState ( "apiProvider" ) as Promise < ApiProvider | undefined > ,
23932397 this . getGlobalState ( "apiModelId" ) as Promise < string | undefined > ,
@@ -2464,6 +2468,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
24642468 this . getSecret ( "unboundApiKey" ) as Promise < string | undefined > ,
24652469 this . getGlobalState ( "unboundModelId" ) as Promise < string | undefined > ,
24662470 this . getGlobalState ( "unboundModelInfo" ) as Promise < ModelInfo | undefined > ,
2471+ this . getGlobalState ( "modelTemperature" ) as Promise < number | undefined > ,
24672472 ] )
24682473
24692474 let apiProvider : ApiProvider
@@ -2522,6 +2527,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
25222527 unboundApiKey,
25232528 unboundModelId,
25242529 unboundModelInfo,
2530+ modelTemperature,
25252531 } ,
25262532 lastShownAnnouncementId,
25272533 customInstructions,
0 commit comments