Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Nov 24, 2024
1 parent d023034 commit e696d8b
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ class ChatSetupEntitlementResolver extends Disposable {
return ChatEntitlement.Unresolved;
}

private async resolveEntitlement(session: AuthenticationSession | undefined, token: CancellationToken): Promise<void> {
private async resolveEntitlement(session: AuthenticationSession, token: CancellationToken): Promise<void> {
if (typeof this.resolvedEntitlement !== 'undefined') {
return; // only resolve once
}
Expand All @@ -253,15 +253,11 @@ class ChatSetupEntitlementResolver extends Disposable {
}
}

private async doResolveEntitlement(session: AuthenticationSession | undefined, token: CancellationToken): Promise<ChatEntitlement | undefined> {
private async doResolveEntitlement(session: AuthenticationSession, token: CancellationToken): Promise<ChatEntitlement | undefined> {
if (token.isCancellationRequested) {
return undefined;
}

if (!session) {
return ChatEntitlement.Unknown;
}

const response = await this.instantiationService.invokeFunction(accessor => ChatSetupRequestHelper.request(accessor, defaultChat.entitlementUrl, 'GET', undefined, session, token));
if (token.isCancellationRequested) {
return undefined;
Expand Down

0 comments on commit e696d8b

Please sign in to comment.