()
| 2808 | // dev |
| 2809 | |
| 2810 | async resetState() { |
| 2811 | const answer = await vscode.window.showInformationMessage( |
| 2812 | t("common:confirmation.reset_state"), |
| 2813 | { modal: true }, |
| 2814 | t("common:answers.yes"), |
| 2815 | ) |
| 2816 | |
| 2817 | if (answer !== t("common:answers.yes")) { |
| 2818 | return |
| 2819 | } |
| 2820 | |
| 2821 | // Log out from cloud if authenticated |
| 2822 | if (CloudService.hasInstance()) { |
| 2823 | try { |
| 2824 | await CloudService.instance.logout() |
| 2825 | } catch (error) { |
| 2826 | this.log( |
| 2827 | `Failed to logout from cloud during reset: ${error instanceof Error ? error.message : String(error)}`, |
| 2828 | ) |
| 2829 | // Continue with reset even if logout fails |
| 2830 | } |
| 2831 | } |
| 2832 | |
| 2833 | await this.contextProxy.resetAllState() |
| 2834 | await this.providerSettingsManager.resetAllConfigs() |
| 2835 | await this.customModesManager.resetCustomModes() |
| 2836 | await this.removeClineFromStack() |
| 2837 | await this.postStateToWebview() |
| 2838 | await this.postMessageToWebview({ type: "action", action: "chatButtonClicked" }) |
| 2839 | } |
| 2840 | |
| 2841 | // logging |
| 2842 |
no test coverage detected