mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 16:18:58 +01:00
* 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>
vscode-dts
This is the place for the stable API and for API proposals.
Consume a proposal
- find a proposal you are interested in
- add its name to your extensions
package.json#enabledApiProposalsproperty - run
npx vscode-dts devto download thed.tsfiles into your project - don't forget that extension using proposed API cannot be published
- learn more here: https://code.visualstudio.com/api/advanced-topics/using-proposed-api
Add a new proposal
- create a new file in this directory, its name must follow this pattern
vscode.proposed.[a-zA-Z]+.d.ts - creating the proposal-file will automatically update
src/vs/platform/extensions/common/extensionsApiProposals.ts(make sure to runnpm run watch) - declare and implement your proposal
- make sure to use the
checkProposedApiEnabledand/orisProposedApiEnabled-utils to enforce the API being proposed. Make sure to invoke them with your proposal's name which got generated intoextensionsApiProposals.ts - Most likely will need to add your proposed api to vscode-api-tests as well