VSCode Service Upgrade
What This Skill Produces
- A fully updated
src/missing-services.tsaligned with current VSCode service interfaces. - New services introduced between two VSCode refs, wired into this library for web builds.
- Updated
service-overridemodules that dispatch real VSCode implementations for newly added services. - Updated
src/services.tsexports for all newly introduced service identifiers. - A user-confirmed fixup of the corresponding commit in
../vscode, followed by a user-performed patch re-export, when a required real VSCode implementation is not exported upstream. - Mandatory dual wiring for each added service:
- a fake implementation in
src/missing-services.ts, - the real implementation in the relevant
src/service-override/*.tsmodule. - Validation signals that unsupported stubs are explicitly marked and type-safe.
When To Use
- After updating
config.vscode.refinpackage.json. - When TypeScript errors indicate service interface drift in
src/missing-services.ts. - When upstream VSCode added service singletons and this project now misses overrides.
Inputs And Assumptions
- Repository root is the current working directory.
- Upstream VSCode source is located at
../vscode. - Built/transformed VSCode sources exist under
./vscodewhere service identifiers were split into*.service.jsnext to original modules. - All existing service integrations must be updated, including session services and their fake implementations, overrides, and exports.
- New services in web, common, and browser layers are in scope, including those under
vs/sessions. A session path is not a reason to exclude a service. - New services available only in electron, electron-browser, electron-sandbox, node, or other non-web layers are out of scope.
Procedure
- Run preflight dependency sync first (mandatory).
- Before any ref analysis or code migration, run:
- npm run update-vscode-dependencies && npm i
- Do not continue until this command succeeds.
- Also sync Node runtime config used by this repo:
- update
mise.vscode.tomlsotools.nodematches the Node version from the VSCode.nvmrcused for the upgrade source.
- Resolve refs and scope.
- Read the new ref from
package.jsonatconfig.vscode.ref. - Determine previous ref from git history of
package.json(for example:git log -p -- package.json, then extract priorconfig.vscode.ref). - Include all existing integrations and all newly added web-compatible services in
commonandbrowser, includingvs/sessions.
- Update missing-services first.
- Open
src/missing-services.tsand align every fake service implementation with current interface signatures, including session services. Update moved imports and remove registrations for identifiers removed upstream. - For methods and fields that are straightforward: implement a minimal functional behavior.
- For methods and fields that are too complex or not meaningful in this runtime:
- use
unsupportedimplementation, - add the
@Unsupportedannotation. - Ensure every method declaration is typed by the interface member type pattern so future removals/renames fail at compile time.
- Keep conventions already used in this file (naming, ordering, decorators, helper usage).
- Discover newly registered services upstream.
- In
../vscode, diff old and new refs and list newly registered singletons. - Preferred command pattern:
git diff <oldRef> <newRef> -G'registerSingleton\('- Filter findings:
- keep services defined in
commonorbrowser, including session services, - ignore entries available only in
electron,electron-browser,electron-sandbox,node, and similar non-web layers, - distinguish moved registrations from genuinely new services and update existing wiring for moves.
- Add new services to this library.
- Introduce missing service identifiers/imports based on transformed modules in
./vscode(module.jsand siblingmodule.service.js). - For each newly in-scope service, first add a fake implementation in
src/missing-services.tsusing the same decision rules from Step 2. - Then wire the same service into every relevant
service-overridemodule, including session overrides. Update existing overrides and public exports for moved or removed services. - In
service-overridemodules, use the actual VSCode implementation (not a fake fallback) whenever available and compatible with web scope. - If the actual implementation class is not exported by its VSCode module:
- never edit
vscode-patches/0011-feat-export-some-classes-and-make-some-methods-acces.patchby hand, - stop and ask the user to export the class in
../vscode, fix up the commit corresponding to that patch, and re-export the patch series, - do not continue until the user confirms that the fixup and patch re-export are complete,
- then regenerate/reinstall the transformed VSCode sources so the export is available under
./vscode, - import the class normally and register it with a
SyncDescriptorin the relevantservice-overridemodule. - Never work around a missing class export with side-effect imports, singleton-registry inspection, descriptor capture, or a duplicate local implementation.
- Export every newly added service identifier from
src/services.ts. - Do not consider a service migration complete unless both sides are implemented: fake in
missing-services.tsand real inservice-override.
- Validate changes.
- Run type/lint checks for touched files.
- Run unsupported coverage check:
npm run check-unsupported-decorator- Ensure no unsupported fallback is left without
@Unsupported. - Ensure all interface-typed methods compile.
Decision Rules
- Implement vs unsupported:
- Implement if behavior is deterministic, low-risk, and feasible in browser runtime.
- This skill uses a pragmatic default: do a minimal implementation for simple web-safe behavior, and reserve
unsupportedfor complex or runtime-incompatible behavior. - Mark unsupported if behavior depends on desktop-only capabilities or heavy runtime coupling. Session services follow the same implement-versus-unsupported rules as other services.
- Add service override vs skip:
- Add when service is registered upstream in web-relevant layers and used by bundled code.
- Skip when service exists only in non-web layers.
- Keep override-module coverage checks generic (do not require a fixed hardcoded module list).
- Missing implementation export:
- ask the user to export the class and fix up the corresponding commit in
../vscode, then re-export the patch series, - never modify the generated patch file manually,
- wait for explicit user confirmation before continuing,
- do not introduce runtime registration hacks.
Completion Checklist
- Preflight dependency sync completed successfully:
- npm run update-vscode-dependencies && npm i
- Node runtime sync completed:
mise.vscode.tomltools.nodematches the Node version from VSCode.nvmrc.src/missing-services.tsupdated before any other service migration work.- Every newly added service has both:
- a fake registration in
src/missing-services.ts, - a real registration in a relevant
src/service-override/*.tsmodule. - Every newly added service identifier is exported from
src/services.ts. - Every new/changed member follows interface-member typing convention.
- Every unsupported member uses both
unsupportedand@Unsupported. - New upstream services between refs are reviewed and triaged by runtime layer, not excluded for belonging to sessions.
- Existing service integrations, including session services, are aligned with current interfaces and module paths.
- Relevant
service-overridemodules include all newly in-scope services, including session services. - Every real implementation used by an override is imported directly; any missing upstream export was added by a user-confirmed fixup in
../vscodeand patch re-export. - Generated patch files were never edited manually by the agent.
- No side-effect import or singleton-registry inspection is used to recover a non-exported implementation.
- Required validation commands pass:
npm run check-unsupported-decoratornpm run build
Suggested Prompt Examples
/vscode-service-upgrade upgrade services after vscode ref bump from 1.123.0 to 1.124.0/vscode-service-upgrade update missing-services.ts and add new browser/common services/vscode-service-upgrade find registerSingleton additions and wire service-overrides