* 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
()
| 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 |
no test coverage detected