Implement API changes from TPI feedback (#265213)

* Implement API changes from TPI feedback

* Update names

* Handle old fallback
This commit is contained in:
Logan Ramos
2025-09-04 17:45:03 -04:00
committed by GitHub
parent 28ecbd9837
commit 2eae3caa26
9 changed files with 46 additions and 47 deletions

View File

@@ -16,7 +16,7 @@ suite('chat', () => {
// Register a dummy default model which is required for a participant request to go through
disposables.push(lm.registerLanguageModelChatProvider('test-lm-vendor', {
async prepareLanguageModelChatInformation(_options, _token) {
async provideLanguageModelChatInformation(_options, _token) {
return [{
id: 'test-lm',
name: 'test-lm',

View File

@@ -41,7 +41,7 @@ suite('lm', function () {
try {
disposables.push(vscode.lm.registerLanguageModelChatProvider('test-lm-vendor', {
async prepareLanguageModelChatInformation(_options, _token) {
async provideLanguageModelChatInformation(_options, _token) {
return [testProviderOptions];
},
async provideLanguageModelChatResponse(_model, _messages, _options, progress, _token) {
@@ -93,7 +93,7 @@ suite('lm', function () {
test('lm request fail', async function () {
disposables.push(vscode.lm.registerLanguageModelChatProvider('test-lm-vendor', {
async prepareLanguageModelChatInformation(_options, _token) {
async provideLanguageModelChatInformation(_options, _token) {
return [testProviderOptions];
},
async provideLanguageModelChatResponse(_model, _messages, _options, _progress, _token) {
@@ -120,7 +120,7 @@ suite('lm', function () {
const defer = new DeferredPromise<void>();
disposables.push(vscode.lm.registerLanguageModelChatProvider('test-lm-vendor', {
async prepareLanguageModelChatInformation(_options, _token) {
async provideLanguageModelChatInformation(_options, _token) {
return [testProviderOptions];
},
async provideLanguageModelChatResponse(_model, _messages, _options, _progress, _token) {
@@ -158,7 +158,7 @@ suite('lm', function () {
test('LanguageModelError instance is not thrown to extensions#235322 (SYNC)', async function () {
disposables.push(vscode.lm.registerLanguageModelChatProvider('test-lm-vendor', {
async prepareLanguageModelChatInformation(_options, _token) {
async provideLanguageModelChatInformation(_options, _token) {
return [testProviderOptions];
},
provideLanguageModelChatResponse(_model, _messages, _options, _progress, _token) {
@@ -184,7 +184,7 @@ suite('lm', function () {
test('LanguageModelError instance is not thrown to extensions#235322 (ASYNC)', async function () {
disposables.push(vscode.lm.registerLanguageModelChatProvider('test-lm-vendor', {
async prepareLanguageModelChatInformation(_options, _token) {
async provideLanguageModelChatInformation(_options, _token) {
return [testProviderOptions];
},
async provideLanguageModelChatResponse(_model, _messages, _options, _progress, _token) {