Skip to content

Commit e45d2da

Browse files
author
Bruno Bergher
committed
Fixes type errors
1 parent 7ef7202 commit e45d2da

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,6 +1451,7 @@ export class ClineProvider
14511451
codebaseIndexEmbedderModelId: "",
14521452
},
14531453
mdmCompliant: this.checkMdmCompliance(),
1454+
hasOpenedModeSelector: this.getGlobalState("hasOpenedModeSelector") ?? false,
14541455
}
14551456
}
14561457

src/core/webview/__tests__/ClineProvider.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ describe("ClineProvider", () => {
522522
autoCondenseContextPercent: 100,
523523
cloudIsAuthenticated: false,
524524
sharingEnabled: false,
525+
hasOpenedModeSelector: false,
525526
}
526527

527528
const message: ExtensionMessage = {

src/core/webview/webviewMessageHandler.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,11 @@ export const webviewMessageHandler = async (
856856
const updatedPrompts = { ...existingPrompts, [message.promptMode]: message.customPrompt }
857857
await updateGlobalState("customModePrompts", updatedPrompts)
858858
const currentState = await provider.getStateToPostToWebview()
859-
const stateWithPrompts = { ...currentState, customModePrompts: updatedPrompts }
859+
const stateWithPrompts = {
860+
...currentState,
861+
customModePrompts: updatedPrompts,
862+
hasOpenedModeSelector: currentState.hasOpenedModeSelector ?? false,
863+
}
860864
provider.postMessageToWebview({ type: "state", state: stateWithPrompts })
861865
}
862866
break

0 commit comments

Comments
 (0)