mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-18 05:06:39 +01:00
* Add authSessionAccountIcon proposed API and account avatar support
Introduces a new proposed API `authSessionAccountIcon` that allows authentication
providers to supply an icon URL (typically a profile avatar) for authentication
session accounts.
Changes:
- New proposed API: `AuthenticationSessionAccountInformation.iconUrl`
- GitHub authentication extension updated to fetch and provide user avatar URLs
- Activity bar and global composite bar updated to display account avatars
- Authentication service extended to propagate icon information
* Address Copilot review feedback
- Use removeAttribute('src') instead of empty string to avoid spurious requests
- Add alt='', aria-hidden='true', draggable=false to avatar img for accessibility
- Update iconUrl in addOrUpdateAccount when provider supplies/changes it
- Fetch avatarUrl for existing sessions that are missing iconUrl
* Address review feedback: account icon as Uri, avatar setting, Agents window consolidation
- Change AuthenticationSessionAccountInformation.iconUrl (string) to icon (Uri)
per review feedback, and use URI in the internal workbench type
- Revive the icon URI at the RPC boundaries (MainThread/ExtHost), typing the
proxies as Proxied<T>
- Persist the fetched avatar in stored GitHub auth sessions so it is not
refetched on every read
- Add workbench.accounts.showAvatar setting to show/hide account avatars
- Agents window: prefer the authentication session's account icon over the
hardcoded github.com avatar URL pattern and honor the new setting
* Fix Compile & Hygiene: tab indentation in extensionsApiProposals and remove unused import
* Fix DynamicAuthProvider test mock to match Proxied proxy typing
* auth - improve account avatar support
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
102 lines
2.7 KiB
JSON
102 lines
2.7 KiB
JSON
{
|
|
"name": "github-authentication",
|
|
"displayName": "%displayName%",
|
|
"description": "%description%",
|
|
"publisher": "vscode",
|
|
"license": "MIT",
|
|
"version": "0.0.2",
|
|
"engines": {
|
|
"vscode": "^1.41.0"
|
|
},
|
|
"icon": "images/icon.png",
|
|
"categories": [
|
|
"Other"
|
|
],
|
|
"api": "none",
|
|
"extensionKind": [
|
|
"ui",
|
|
"workspace"
|
|
],
|
|
"enabledApiProposals": [
|
|
"authIssuers",
|
|
"authProviderSpecific",
|
|
"authSessionAccountIcon"
|
|
],
|
|
"activationEvents": [],
|
|
"capabilities": {
|
|
"virtualWorkspaces": true,
|
|
"untrustedWorkspaces": {
|
|
"supported": "limited",
|
|
"restrictedConfigurations": [
|
|
"github-enterprise.uri"
|
|
]
|
|
}
|
|
},
|
|
"contributes": {
|
|
"authentication": [
|
|
{
|
|
"label": "GitHub",
|
|
"id": "github",
|
|
"authorizationServerGlobs": [
|
|
"https://github.com/login/oauth"
|
|
]
|
|
},
|
|
{
|
|
"label": "GitHub Enterprise Server",
|
|
"id": "github-enterprise",
|
|
"authorizationServerGlobs": [
|
|
"*"
|
|
]
|
|
}
|
|
],
|
|
"configuration": [
|
|
{
|
|
"title": "%config.github-enterprise.title%",
|
|
"properties": {
|
|
"github-enterprise.uri": {
|
|
"type": "string",
|
|
"markdownDescription": "%config.github-enterprise.uri.description%",
|
|
"pattern": "^(?:$|(https?)://(?!github\\.com).*)"
|
|
},
|
|
"github-authentication.useElectronFetch": {
|
|
"type": "boolean",
|
|
"default": true,
|
|
"scope": "application",
|
|
"markdownDescription": "%config.github-authentication.useElectronFetch.description%"
|
|
},
|
|
"github-authentication.preferDeviceCodeFlow": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"scope": "application",
|
|
"markdownDescription": "%config.github-authentication.preferDeviceCodeFlow.description%"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"aiKey": "0c6ae279ed8443289764825290e4f9e2-1a736e7c-1324-4338-be46-fc2a58ae4d14-7255",
|
|
"main": "./out/extension.js",
|
|
"browser": "./dist/browser/extension.js",
|
|
"scripts": {
|
|
"compile": "gulp compile-extension:github-authentication",
|
|
"compile-web": "node esbuild.browser.mts",
|
|
"watch": "gulp watch-extension:github-authentication",
|
|
"watch-web": "node esbuild.browser.mts --watch",
|
|
"vscode:prepublish": "npm run compile"
|
|
},
|
|
"dependencies": {
|
|
"node-fetch": "2.6.7",
|
|
"@vscode/extension-telemetry": "^0.9.8",
|
|
"vscode-tas-client": "^0.1.84"
|
|
},
|
|
"devDependencies": {
|
|
"@types/mocha": "^10.0.10",
|
|
"@types/node": "24.x",
|
|
"@types/node-fetch": "^2.5.7"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/microsoft/vscode.git"
|
|
}
|
|
}
|