Allow createIfNone to also use detail (#240565)

Fixes https://github.com/microsoft/vscode/issues/240295
This commit is contained in:
Tyler James Leonhardt
2025-02-13 09:08:30 -08:00
committed by GitHub
parent efe7793773
commit 99a63c4a3c
5 changed files with 44 additions and 15 deletions

View File

@@ -285,7 +285,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
const authentication: typeof vscode.authentication = {
getSession(providerId: string, scopes: readonly string[], options?: vscode.AuthenticationGetSessionOptions) {
if (typeof options?.forceNewSession === 'object' && options.forceNewSession.learnMore) {
if (
(typeof options?.forceNewSession === 'object' && options.forceNewSession.learnMore) ||
(typeof options?.createIfNone === 'object' && options.createIfNone.learnMore)
) {
checkProposedApiEnabled(extension, 'authLearnMore');
}
return extHostAuthentication.getSession(extension, providerId, scopes, options as any);