From 9d83bf14f1d6d329ec72bd657e24f710192459fc Mon Sep 17 00:00:00 2001 From: Mohankumar Ramachandran Date: Thu, 26 Dec 2024 10:03:02 +0000 Subject: [PATCH] Change identifier to id --- src/vs/workbench/contrib/chat/common/languageModels.ts | 4 ++-- .../workbench/contrib/chat/test/common/languageModels.test.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/chat/common/languageModels.ts b/src/vs/workbench/contrib/chat/common/languageModels.ts index b3310ea5332db..66fee6ef6c27d 100644 --- a/src/vs/workbench/contrib/chat/common/languageModels.ts +++ b/src/vs/workbench/contrib/chat/common/languageModels.ts @@ -101,7 +101,7 @@ export interface ILanguageModelChat { export interface ILanguageModelChatSelector { readonly name?: string; - readonly identifier?: string; + readonly id?: string; readonly vendor?: string; readonly version?: string; readonly family?: string; @@ -264,7 +264,7 @@ export class LanguageModelsService implements ILanguageModelsService { if ((selector.vendor === undefined || model.metadata.vendor === selector.vendor) && (selector.family === undefined || model.metadata.family === selector.family) && (selector.version === undefined || model.metadata.version === selector.version) - && (selector.identifier === undefined || model.metadata.id === selector.identifier) + && (selector.id === undefined || model.metadata.id === selector.id) && (!model.metadata.targetExtensions || model.metadata.targetExtensions.some(candidate => ExtensionIdentifier.equals(candidate, selector.extension))) ) { result.push(identifier); diff --git a/src/vs/workbench/contrib/chat/test/common/languageModels.test.ts b/src/vs/workbench/contrib/chat/test/common/languageModels.test.ts index bc148fcd6935a..06560d694d6ed 100644 --- a/src/vs/workbench/contrib/chat/test/common/languageModels.test.ts +++ b/src/vs/workbench/contrib/chat/test/common/languageModels.test.ts @@ -144,7 +144,7 @@ suite('LanguageModels', function () { } })); - const models = await languageModels.selectLanguageModels({ identifier: 'actual-lm' }); + const models = await languageModels.selectLanguageModels({ id: 'actual-lm' }); assert.ok(models.length === 1); const first = models[0];