Skip to content

Commit f91ce13

Browse files
committed
Fix no-case-declarations lint issue and put back missing autoCondenseContextPercent webviewMessageHandler case
1 parent 5dbe531 commit f91ce13

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/api/providers/fetchers/modelCache.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,11 @@ export const getModels = async (options: GetModelsOptions): Promise<ModelRecord>
6868
// Type safety ensures apiKey and baseUrl are always provided for litellm
6969
models = await getLiteLLMModels(options.apiKey, options.baseUrl)
7070
break
71-
default:
71+
default: {
7272
// Ensures router is exhaustively checked if RouterName is a strict union
7373
const exhaustiveCheck: never = provider
7474
throw new Error(`Unknown provider: ${exhaustiveCheck}`)
75+
}
7576
}
7677

7778
// Cache the fetched models (even if empty, to signify a successful fetch with no models)

src/core/webview/webviewMessageHandler.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ export const webviewMessageHandler = async (provider: ClineProvider, message: We
171171
case "askResponse":
172172
provider.getCurrentCline()?.handleWebviewAskResponse(message.askResponse!, message.text, message.images)
173173
break
174+
case "autoCondenseContextPercent":
175+
await updateGlobalState("autoCondenseContextPercent", message.value)
176+
await provider.postStateToWebview()
177+
break
174178
case "terminalOperation":
175179
if (message.terminalOperation) {
176180
provider.getCurrentCline()?.handleTerminalOperation(message.terminalOperation)

0 commit comments

Comments
 (0)