Fix Ollama-cloud.ts getBaseUrl endpoint undefined error

This commit is contained in:
Gemini AI
2025-12-25 23:41:41 +04:00
Unverified
parent 07dbe552f7
commit a1a30e66fe
2 changed files with 152 additions and 103 deletions

View File

@@ -182,11 +182,11 @@ export class QwenOAuthService {
return refreshed;
} catch (error) {
console.error("Qwen token refresh failed", error);
this.clearTokens();
this.setOAuthTokens(undefined);
return null;
}
}
this.clearTokens();
this.setOAuthTokens(undefined);
return null;
}
@@ -197,13 +197,13 @@ export class QwenOAuthService {
* Sign out the OAuth session.
*/
signOut(): void {
this.clearTokens();
this.setOAuthTokens(undefined);
}
/**
* Stores OAuth tokens locally.
*/
setOAuthTokens(tokens?: QwenOAuthToken) {
setOAuthTokens(tokens?: QwenOAuthToken | null) {
if (!tokens) {
this.token = null;
this.persistToken(null);