MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / resetAllState

Method resetAllState

src/core/config/ContextProxy.ts:589–601  ·  view source on GitHub ↗

* Resets all global state, secrets, and in-memory caches. * This clears all data from both the in-memory caches and the VSCode storage. * @returns A promise that resolves when all reset operations are complete

()

Source from the content-addressed store, hash-verified

587 * @returns A promise that resolves when all reset operations are complete
588 */
589 public async resetAllState() {
590 // Clear in-memory caches
591 this.stateCache = {}
592 this.secretCache = {}
593
594 await Promise.all([
595 ...GLOBAL_STATE_KEYS.map((key) => this.originalContext.globalState.update(key, undefined)),
596 ...SECRET_STATE_KEYS.map((key) => this.originalContext.secrets.delete(key)),
597 ...GLOBAL_SECRET_KEYS.map((key) => this.originalContext.secrets.delete(key)),
598 ])
599
600 await this.initialize()
601 }
602
603 private static _instance: ContextProxy | null = null
604

Callers 2

resetStateMethod · 0.80

Calls 4

initializeMethod · 0.95
allMethod · 0.80
updateMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected