(
providerName?: string | undefined,
oauthRef?: KimiOAuthTokenRef | undefined,
)
| 223 | } |
| 224 | |
| 225 | async logout( |
| 226 | providerName?: string | undefined, |
| 227 | oauthRef?: KimiOAuthTokenRef | undefined, |
| 228 | ): Promise<KimiOAuthLogoutResult> { |
| 229 | const name = providerName ?? KIMI_CODE_PROVIDER_NAME; |
| 230 | const oauthHost = this.oauthHostFor(oauthRef); |
| 231 | const oauthKey = oauthRef?.key ?? this.defaultOAuthKey(undefined, oauthHost); |
| 232 | await this.managerFor(name, oauthKey, oauthHost).logout(); |
| 233 | if (this.configAdapter?.remove !== undefined && name === KIMI_CODE_PROVIDER_NAME) { |
| 234 | const config = await this.configAdapter.read(); |
| 235 | this.configAdapter.remove(config); |
| 236 | await this.configAdapter.write(config); |
| 237 | } |
| 238 | return { providerName: name, ok: true }; |
| 239 | } |
| 240 | |
| 241 | async ensureFresh( |
| 242 | providerName?: string | undefined, |
no test coverage detected