Skip to content

Commit 966f0a9

Browse files
committed
make capabilities optional
1 parent 2924a91 commit 966f0a9

File tree

5 files changed

+4
-17
lines changed

5 files changed

+4
-17
lines changed

extensions/vscode-api-tests/src/singlefolder-tests/chat.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ suite('chat', () => {
3030
maxInputTokens: 100,
3131
maxOutputTokens: 100,
3232
isDefault: true,
33-
isUserSelectable: true,
34-
capabilities: {}
33+
isUserSelectable: true
3534
}));
3635
});
3736

extensions/vscode-api-tests/src/singlefolder-tests/lm.test.ts

+1-10
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import * as assert from 'assert';
76
import 'mocha';
7+
import * as assert from 'assert';
88
import * as vscode from 'vscode';
99
import { assertNoRpc, closeAllEditors, DeferredPromise, disposeAll } from '../utils';
1010

@@ -44,9 +44,6 @@ suite('lm', function () {
4444
vendor: 'test-lm-vendor',
4545
maxInputTokens: 100,
4646
maxOutputTokens: 100,
47-
capabilities: {
48-
vision: false
49-
}
5047
}));
5148

5249
const models = await vscode.lm.selectChatModels({ id: 'test-lm' });
@@ -98,9 +95,6 @@ suite('lm', function () {
9895
vendor: 'test-lm-vendor',
9996
maxInputTokens: 100,
10097
maxOutputTokens: 100,
101-
capabilities: {
102-
vision: false
103-
}
10498
}));
10599

106100
const models = await vscode.lm.selectChatModels({ id: 'test-lm' });
@@ -132,9 +126,6 @@ suite('lm', function () {
132126
vendor: 'test-lm-vendor',
133127
maxInputTokens: 100,
134128
maxOutputTokens: 100,
135-
capabilities: {
136-
vision: false
137-
}
138129
}));
139130

140131
const models = await vscode.lm.selectChatModels({ id: 'test-lm' });

src/vs/workbench/contrib/chat/common/languageModels.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export interface ILanguageModelChatMetadata {
8686
readonly providerLabel: string;
8787
readonly accountLabel?: string;
8888
};
89-
readonly capabilities: {
89+
readonly capabilities?: {
9090
readonly vision?: boolean;
9191
};
9292
}

src/vs/workbench/contrib/chat/test/common/languageModels.test.ts

-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ suite('LanguageModels', function () {
5454
id: 'test-id',
5555
maxInputTokens: 100,
5656
maxOutputTokens: 100,
57-
capabilities: {}
5857
},
5958
sendChatRequest: async () => {
6059
throw new Error();
@@ -74,7 +73,6 @@ suite('LanguageModels', function () {
7473
id: 'test-id',
7574
maxInputTokens: 100,
7675
maxOutputTokens: 100,
77-
capabilities: {}
7876
},
7977
sendChatRequest: async () => {
8078
throw new Error();
@@ -121,7 +119,6 @@ suite('LanguageModels', function () {
121119
id: 'actual-lm',
122120
maxInputTokens: 100,
123121
maxOutputTokens: 100,
124-
capabilities: {}
125122
},
126123
sendChatRequest: async (messages, _from, _options, token) => {
127124
// const message = messages.at(-1);

src/vscode-dts/vscode.proposed.chatProvider.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ declare module 'vscode' {
6868
// TODO@API maybe an enum, LanguageModelChatProviderPickerAvailability?
6969
readonly isDefault?: boolean;
7070
readonly isUserSelectable?: boolean;
71-
readonly capabilities: {
71+
readonly capabilities?: {
7272
readonly vision?: boolean;
7373
};
7474
}

0 commit comments

Comments
 (0)