summaryrefslogtreecommitdiff
path: root/packages/core/src/code_assist/oauth2.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/core/src/code_assist/oauth2.ts')
-rw-r--r--packages/core/src/code_assist/oauth2.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/core/src/code_assist/oauth2.ts b/packages/core/src/code_assist/oauth2.ts
index 3fbbd896..68f6e137 100644
--- a/packages/core/src/code_assist/oauth2.ts
+++ b/packages/core/src/code_assist/oauth2.ts
@@ -192,3 +192,11 @@ async function cacheCredentials(credentials: Credentials) {
function getCachedCredentialPath(): string {
return path.join(os.homedir(), GEMINI_DIR, CREDENTIAL_FILENAME);
}
+
+export async function clearCachedCredentialFile() {
+ try {
+ await fs.rm(getCachedCredentialPath());
+ } catch (_) {
+ /* empty */
+ }
+}