Use core vscode*d.ts files for copilot extension#308841
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR switches the Copilot extension’s TypeScript typing source for the VS Code API (stable + proposed) from locally vendored vscode.proposed.*.d.ts files to the repo’s canonical src/vscode-dts/* definitions, reducing duplication and keeping the extension aligned with core.
Changes:
- Add
extensions/copilot/src/vscode-api.d.tsthat triple-slash referencessrc/vscode-dts/vscode.d.tsplus the set of proposed API.d.tsfiles the extension relies on. - Remove many locally maintained
extensions/copilot/src/extension/vscode.proposed.*.d.tsfiles and the old proposed-dts maintenance scripts/CI check. - Adjust a few call sites/types to account for API typing changes (e.g. dropped
isReadonlyusage, updatedChatContextshape, command arg type loosening).
Show a summary per file
| File | Description |
|---|---|
| extensions/copilot/tsconfig.worker.json | JSON formatting-only changes to lib/exclude arrays. |
| extensions/copilot/tsconfig.json | Stop including a vscode ambient types package; keep a vscode path shim for tests. |
| extensions/copilot/src/vscode-api.d.ts | New central reference file pointing to core src/vscode-dts stable + proposed API definitions. |
| extensions/copilot/src/extension/**/vscode.proposed.*.d.ts | Remove locally vendored proposed API declaration files in favor of core ones. |
| extensions/copilot/src/extension/prompt/common/chatVariablesCollection.ts | Drop isReadonly propagation (no longer present in core typings). |
| extensions/copilot/src/extension/intents/node/editCodeIntent.ts | Remove readonly-reference edit confirmation logic (API no longer exposes isReadonly). |
| extensions/copilot/src/extension/conversation/vscode-node/conversationFeature.ts | Loosen unused command arg type where the API type no longer exists. |
| extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts | Provide inputState in chatSessionContext to satisfy updated typing expectations. |
| extensions/copilot/script/** | Remove scripts that downloaded/checked vendored proposed .d.ts files. |
| extensions/copilot/chat-lib/package.json | Remove @types/vscode devDependency (but lockfile needs updating). |
| extensions/copilot/.github/workflows/pr.yml | Remove the “proposed API types up to date” CI step. |
Copilot's findings
Files not reviewed (1)
- extensions/copilot/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)
extensions/copilot/chat-lib/package.json:40
@types/vscodewas removed from chat-lib's devDependencies, butextensions/copilot/chat-lib/package-lock.jsonstill contains entries for it. Please regenerate/update the lockfile so installs remain deterministic (and sonpm cidoesn't fail if run inchat-lib).
"devDependencies": {
"@anthropic-ai/sdk": "^0.82.0",
"@octokit/types": "^14.1.0",
"@types/node": "^22.16.3",
"copyfiles": "^2.4.1",
"dotenv": "^17.2.0",
"npm-run-all": "^4.1.5",
"outdent": "^0.8.0",
- Files reviewed: 13/80 changed files
- Comments generated: 0
Contributor
bryanchen-d
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.