languageModels.ts ×27

Frontier kind: Code frontier

unlabeled · c_e0909ac8c321

68 tests · 69898 LOC · 309 files · introduces 0 tests · 145 LOC · 5 files

Introduces — evidence that enters the hierarchy at this concept

Code
37 ranges145 lines · 5 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
5603 ranges69898 lines · 309 files · Browse complete extent
All tests (intent)
68 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

5 files ranked by introduced lines: 145 introduced LOC across 37 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/contrib/chat/test/common/languageModels.ts 81 introduced LOC · 27 ranges

Open complete file

15
16 export class NullLanguageModelsService implements ILanguageModelsService {
17 > _serviceBrand: undefined; languageModels.ts
18 >
19 > registerLanguageModelProvider(vendor: string, provider: ILanguageModelChatProvider): IDisposable {
20 > return Disposable.None;
21 > }
22 >
23 > deltaLanguageModelChatProviderDescriptors(added: IUserFriendlyLanguageModel[], removed: IUserFriendlyLanguageModel[]): void {
24 }
26 > onDidChangeLanguageModels = Event.None;
27 > onDidChangeLanguageModelVendors = Event.None;
28 > onDidChangeModelsControlManifest = Event.None;
29 > onDidChangePinnedModels = Event.None;
30 > onDidChangeModelVisibility = Event.None;
31 >
32 > getVendors(): ILanguageModelProviderDescriptor[] {
33 return [];
34 }
36 > getLanguageModelIds(): string[] {
37 return [];
38 }
40 > lookupLanguageModel(identifier: string): ILanguageModelChatMetadata | undefined {
41 return undefined;
42 }
44 > lookupLanguageModelByQualifiedName(qualifiedName: string) {
45 return undefined;
46 }
48 > getLanguageModels(): ILanguageModelChatMetadataAndIdentifier[] {
49 return [];
50 }
52 > setContributedSessionModels(): void {
53 return;
54 }
56 > clearContributedSessionModels(): void {
57 return;
58 }
60 > getLanguageModelGroups(vendor: string): ILanguageModelsGroup[] {
61 return [];
62 }
64 > hasResolvedVendor(vendor: string): boolean {
65 return false;
66 }
68 > async selectLanguageModels(selector: ILanguageModelChatSelector): Promise<string[]> {
69 return [];
70 }
72 > sendChatRequest(identifier: string, from: ExtensionIdentifier | undefined, messages: IChatMessage[], options: ILanguageModelChatRequestOptions, token: CancellationToken): Promise<ILanguageModelChatResponse> {
73 throw new Error('Method not implemented.');
74 }
76 > computeTokenLength(identifier: string, message: string | IChatMessage, token: CancellationToken): Promise<number> {
77 throw new Error('Method not implemented.');
78 }
80 > getModelConfiguration(_modelId: string): IStringDictionary<unknown> | undefined {
81 return undefined;
82 }
84 > async setModelConfiguration(_modelId: string, _values: IStringDictionary<unknown>): Promise<void> {
85 }
87 > getModelConfigurationActions(_modelId: string): IAction[] {
88 return [];
89 }
91 > async configureLanguageModelsProviderGroup(vendorId: string, name?: string): Promise<void> {
92
93 }
95 > async renameLanguageModelsProviderGroup(vendorId: string, providerGroupName: string): Promise<void> {
96 }
98 > async updateLanguageModelsProviderGroupApiKey(vendorId: string, providerGroupName: string): Promise<void> {
99 }
101 > async addLanguageModelsProviderGroupModel(vendorId: string, providerGroupName: string): Promise<void> {
102 }
104 > async openLanguageModelsProviderGroupSettings(vendorId: string, providerGroupName: string): Promise<void> {
105 }
107 > async configureModel(_modelId: string): Promise<void> {
108 }
110 > async addLanguageModelsProviderGroup(name: string, vendorId: string, configuration: IStringDictionary<unknown> | undefined): Promise<void> {
111
112 }
114 > async removeLanguageModelsProviderGroup(vendorId: string, providerGroupName: string): Promise<void> {
115 }
117 > async migrateLanguageModelsProviderGroup(languageModelsProviderGroup: ILanguageModelsProviderGroup): Promise<void> { }
118 >
119 > getRecentlyUsedModelIds(): string[] {
120 return [];
121 }
123 > addToRecentlyUsedList(): void { }
124 > clearRecentlyUsedList(): void { }
125 >
126 > getPinnedModelIds(): string[] { return []; }
127 > pinModel(_modelIdentifier: string): void { }
128 > unpinModel(_modelIdentifier: string): void { }
129 > isModelPinned(_modelIdentifier: string): boolean { return false; }
130 >
131 > isModelHidden(_modelIdentifier: string): boolean { return false; }
132 > isGroupHidden(_vendor: string, _groupName: string): boolean { return false; }
133 > setModelHidden(_modelIdentifier: string, _hidden: boolean): void { }
134 > setGroupHidden(_vendor: string, _groupName: string, _hidden: boolean): void { }
135 > getHiddenModelIds(): string[] { return []; }
136 >
137 > getModelsControlManifest(): IModelsControlManifest {
138 return { free: {}, paid: {} };
139 }
141 > restrictedChatParticipants = observableValue('restrictedChatParticipants', Object.create(null));
142 }
src/vs/workbench/test/common/workbenchTestServices.ts 39 introduced LOC · 1 range

Open complete file

785
786 export class TestChatEntitlementService implements IChatEntitlementService {
788 > _serviceBrand: undefined;
789 >
790 > context: Lazy<ChatEntitlementContext> | undefined;
791 >
792 > readonly organisations: undefined;
793 > readonly isInternal = false;
794 > readonly sku = undefined;
795 > readonly copilotTrackingId = undefined;
796 >
797 > readonly onDidChangeQuotaExceeded = Event.None;
798 > readonly onDidChangeQuotaRemaining = Event.None;
799 > readonly onDidChangeUsageBasedBilling = Event.None;
800 > readonly quotas = {};
801 >
802 > update(token: CancellationToken): Promise<void> {
803 > throw new Error('Method not implemented.');
804 > }
805 >
806 > readonly onDidChangeSentiment = Event.None;
807 > readonly sentimentObs = observableValue({}, {});
808 > readonly sentiment = {};
809 >
810 > readonly onDidChangeEntitlement = Event.None;
811 > entitlement: ChatEntitlement = ChatEntitlement.Unknown;
812 > readonly entitlementObs = observableValue({}, ChatEntitlement.Unknown);
813 >
814 > readonly anonymous = false;
815 > onDidChangeAnonymous = Event.None;
816 > readonly anonymousObs = observableValue({}, false);
817 >
818 > acceptQuotas(): void { }
819 > clearQuotas(): void { }
820 > markAnonymousRateLimited(): void { }
821 > markSetupCompleted(): void { }
822 > setForceHidden(_hidden: boolean): void { }
823 >
824 > readonly clientByokEnabled = false;
825 > readonly hasByokModels = false;
826 }
827
src/vs/workbench/contrib/chat/common/participants/chatAgents.ts 17 introduced LOC · 6 ranges

Open complete file

366 for (const agent of this.getAgents()) {
367 if (agent.isDefault) {
368 > if (!agent.isCore) { chatAgents.ts
369 > extensionAgentRegistered = true;
370 > }
371 > if (agent.id === 'chat.setup' || agent.id === 'github.copilot.editsAgent') {
372 // TODO@roblourens firing the event below probably isn't necessary but leave it alone for now
373 toolsAgentRegistered = true;
374 > } else { chatAgents.ts
375 > defaultAgentRegistered = true;
376 > }
377 > }
378 }
379 this._defaultAgentRegistered.set(defaultAgentRegistered);
396
397 if (entry.data.isDefault) {
398 > this._hasDefaultAgent.set(true); chatAgents.ts
399 > }
400
401 entry.impl = agentImpl;
407
408 if (entry.data.isDefault) {
409 > this._hasDefaultAgent.set(Iterable.some(this._agents.values(), agent => agent.data.isDefault && !!agent.impl)); chatAgents.ts
410 > }
411 });
412 }
438
439 updateAgent(id: string, updateMetadata: IChatAgentMetadata): void {
440 > const agent = this._agents.get(id); chatAgents.ts
441 > if (!agent?.impl) {
442 throw new Error(`No activated agent with id ${JSON.stringify(id)} registered`);
443 }
444 > agent.data.metadata = { ...agent.data.metadata, ...updateMetadata }; chatAgents.ts
445 > this._onDidChangeAgents.fire(new MergedChatAgent(agent.data, agent.impl));
446 > }
447
448 getDefaultAgent(location: ChatAgentLocation, mode: ChatModeKind = ChatModeKind.Ask): IChatAgent | undefined {
src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.ts 5 introduced LOC · 2 ranges

Open complete file

86
87 constructor(@IExtensionService private readonly _extensionService: IExtensionService) {
88 > super(); chatSlashCommands.ts
89 > }
90
91 override dispose(): void {
92 > super.dispose(); chatSlashCommands.ts
93 > this._commands.clear();
94 > }
95
96 private getSessionScopedCommands(id: string): RegisteredSlashCommand[] {
src/vs/workbench/services/assignment/test/common/nullAssignmentService.ts 3 introduced LOC · 1 range

Open complete file

8
9 export class NullWorkbenchAssignmentService implements IWorkbenchAssignmentService {
10 > _serviceBrand: undefined; nullAssignmentService.ts
11 >
12 > readonly onDidRefetchAssignments: Event<void> = Event.None;
13
14 async getCurrentExperiments(): Promise<string[] | undefined> {