Files
vscode/src/vscode-dts
Connor Peet 5b46a7924f chat: make sendChatRequest extensionIdentifier parameter optional (#298767)
* chat: make sendChatRequest extensionIdentifier parameter optional

Makes the 'from' parameter optional (ExtensionIdentifier | undefined) in the
sendChatRequest method chain across ILanguageModelsService, RPC protocol, and
implementations. This allows internal VS Code calls to pass undefined instead
of instantiating invalid ExtensionIdentifier('core') identifiers.

- Updates ILanguageModelsService.sendChatRequest signature
- Updates ILanguageModelChatProvider.sendChatRequest signature
- Updates ExtHostLanguageModelsShape protocol
- Updates ExtHostLanguageModels \ implementation
- Removes new ExtensionIdentifier('core') from 5 internal callers
- Passes undefined as requestInitiator when from is absent
- Bumps vscode.proposed.chatProvider API version to 5
- Updates test mocks to accept optional from parameter

Refs https://github.com/microsoft/vscode/issues/290436

(Commit message generated by Copilot)

* keep api as old version for now

* Update src/vs/workbench/contrib/mcp/common/mcpSamplingService.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-02 14:45:16 -05:00
..

vscode-dts

This is the place for the stable API and for API proposals.

Consume a proposal

  1. find a proposal you are interested in
  2. add its name to your extensions package.json#enabledApiProposals property
  3. run npx vscode-dts dev to download the d.ts files into your project
  4. don't forget that extension using proposed API cannot be published
  5. learn more here: https://code.visualstudio.com/api/advanced-topics/using-proposed-api

Add a new proposal

  1. create a new file in this directory, its name must follow this pattern vscode.proposed.[a-zA-Z]+.d.ts
  2. creating the proposal-file will automatically update src/vs/platform/extensions/common/extensionsApiProposals.ts (make sure to run npm run watch)
  3. declare and implement your proposal
  4. make sure to use the checkProposedApiEnabled and/or isProposedApiEnabled-utils to enforce the API being proposed. Make sure to invoke them with your proposal's name which got generated into extensionsApiProposals.ts
  5. Most likely will need to add your proposed api to vscode-api-tests as well