copilotAgent.ts ×11

Frontier kind: Code frontier

unlabeled · c_b31cf1eaef21

2 tests · 51432 LOC · 300 files · introduces 0 tests · 34 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
11 ranges34 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
4934 ranges51432 lines · 300 files · Browse complete extent
All tests (intent)
2 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.

1 file ranked by introduced lines: 34 introduced LOC across 11 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/copilot/copilotAgent.ts 34 introduced LOC · 11 ranges

Open complete file

3833
3834 public async resolveSyncedCustomization(item: ISyncedCustomization, clientId: string, input: ClientPluginCustomization | undefined): Promise<IResolvedCustomization> {
3835 > const baseCustomization: PluginCustomization = { ...item.customization, clientId }; copilotAgent.ts
3836 > if (!item.pluginDir) {
3837 return { customization: baseCustomization, input };
3838 }
3858 input,
3859 };
3860 > } copilotAgent.ts
3861
3862 public async tryParsePlugin(pluginDir: URI): Promise<IParsedPlugin | undefined> {
3995 const result: IResolvedCustomization[] = [];
3996 for (const client of this._clients.values()) {
3997 > for (const item of client.customizations) { copilotAgent.ts
3998 > if (seen.has(item.customization.uri)) {
3999 continue;
4000 }
4001 > seen.add(item.customization.uri); copilotAgent.ts
4002 > result.push(item);
4003 > }
4004 > }
4005 return result;
4006 }
4093 }));
4094 if (!quiet) {
4095 > this._onDidPublish.fire({ copilotAgent.ts
4096 > type: ActionType.SessionCustomizationsChanged,
4097 > customizations: [...this.getCustomizations()],
4098 > });
4099 > }
4100 const published = new Map<string, Customization>();
4101 for (const customization of client.customizations) {
4104 }
4105 const publishUpdate = (item: IResolvedCustomization) => {
4106 > const customization = this._projectForPublish(item.customization); copilotAgent.ts
4107 > if (equals(published.get(customization.uri), customization)) {
4108 return;
4109 }
4110 > published.set(customization.uri, customization); copilotAgent.ts
4111 > if (!quiet) {
4112 > this._onDidPublish.fire({
4113 > type: ActionType.SessionCustomizationUpdated,
4114 > customization,
4115 > });
4116 > }
4117 > };
4118
4119 const prev = client.sync;
4136 client.customizations = resolved;
4137 for (const item of resolved) {
4138 > publishUpdate(item); copilotAgent.ts
4139 > }
4140 }
4141 return resolved;
4143
4144 return promise.then(results => results.map(item => ({
4145 > customization: this._overlayMcpState(this._applyEnablement(item.customization)), copilotAgent.ts
4146 > ...(item.pluginDir ? { pluginDir: item.pluginDir } : {}),
4147 })));
4148 }
4245 }
4246 if (!this._directory) {
4247 > return undefined; copilotAgent.ts
4248 > }
4249 for (const previousDirectory of this._previousDirectories) {
4250 const previousUri = rebaseUnder(URI.parse(customization.uri), this._directory, previousDirectory);
4351 }
4352 set customizations(customizations: readonly ClientPluginCustomization[]) {
4353 > // Fire-and-forget: progress and the settled result flow out via the copilotAgent.ts
4354 > // controller's `onDidPublish` session actions, not the setter.
4355 > this._owner.pluginController.sync(this.clientId, [...customizations]).catch(() => { /* logged inside sync */ });
4356 > }
4357 }
4358