Expand description
extensions:getInstalled(type?) - return scanned extensions
reshaped as VS Code’s ILocalExtension[] so
ExtensionManagementChannelClient.getInstalled can
destructure extension.identifier.id,
extension.manifest.*, and extension.location without
blowing up.
§Argument contract
Arguments[0] is the optional ExtensionType filter VS
Code passes:
0(System) → only built-ins.1(User) → only VSIX-installed.null/ missing → every known extension.
Without the filter the trusted-publishers boot migration
iterates User-typed extensions over System manifests and
crashes on manifest.publisher.toLowerCase().
§Boot-time race
The workbench fires getInstalled ~13 times within the
first second. ExtensionPopulate runs in parallel and only
writes to ScannedExtensions ~250-500 ms in. If we returned
[] early, the workbench cached it forever and the activity
bar lost every extension-contributed icon. We poll for ≤5 s
before returning empty.
§Manifest skeleton
VS Code unconditionally calls
manifest.publisher.toLowerCase(). A null or non-object
manifest crashes the webview before its first paint. We
coerce to {} and inject publisher/name/version
defaults so the renderer always has shape.