copilotAgent.ts ×8

Frontier kind: Code frontier

unlabeled · c_a75bad79f6b4

3 tests · 51296 LOC · 300 files · introduces 0 tests · 42 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges42 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
4879 ranges51296 lines · 300 files · Browse complete extent
All tests (intent)
3 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: 42 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/copilot/copilotAgent.ts 42 introduced LOC · 8 ranges

Open complete file

4065 */
4066 public sync(clientId: string, customizations: ClientPluginCustomization[], options?: { quiet?: boolean }) {
4067 > const quiet = options?.quiet === true; copilotAgent.ts
4068 > let client = this._clients.get(clientId);
4069 > if (!client) {
4070 > client = { revision: 0, customizations: [], sync: Promise.resolve([]), inputs: [] };
4071 > this._clients.set(clientId, client);
4072 > } else if (equals(client.inputs, customizations)) {
4073 // No-op re-sync: a window re-subscribing (e.g. navigating away from
4074 // and back to a session) re-publishes the same customizations. Skip
4082 })));
4083 }
4084 > const revision = ++client.revision; copilotAgent.ts
4085 > client.inputs = customizations;
4086 > client.customizations = customizations.map(customization => ({
4087 > customization: {
4088 > ...customization,
4089 > clientId,
4090 > load: { kind: CustomizationLoadStatus.Loading },
4091 > },
4092 > input: customization,
4093 > }));
4094 > if (!quiet) {
4095 this._onDidPublish.fire({
4096 type: ActionType.SessionCustomizationsChanged,
4098 });
4099 }
4100 > const published = new Map<string, Customization>(); copilotAgent.ts
4101 > for (const customization of client.customizations) {
4102 > const enabled = this._projectForPublish(customization.customization);
4103 > published.set(enabled.uri, enabled);
4104 > }
4105 > const publishUpdate = (item: IResolvedCustomization) => {
4106 const customization = this._projectForPublish(item.customization);
4107 if (equals(published.get(customization.uri), customization)) {
4116 }
4117 };
4119 > const prev = client.sync;
4120 > const promise = client.sync = prev.catch(err => {
4121 this._logService.warn('[Copilot:SessionPluginController] Previous customization sync failed', err);
4122 > }).then(async () => { copilotAgent.ts
4123 > const inputByUri = new Map(customizations.map(c => [c.uri, c]));
4124 > const result = await this._parent.pluginManager.syncCustomizations(clientId, customizations, status => {
4125 if (revision !== client.revision) {
4126 return;
4130 input: inputByUri.get(status.uri),
4131 });
4132 > }); copilotAgent.ts
4133 >
4134 > const resolved = await Promise.all(result.map(item => this._parent.resolveSyncedCustomization(item, clientId, inputByUri.get(item.customization.uri))));
4135 > if (revision === client.revision) {
4136 > client.customizations = resolved;
4137 > for (const item of resolved) {
4138 publishUpdate(item);
4139 }
4140 > } copilotAgent.ts
4141 > return resolved;
4142 > });
4143 >
4144 > return promise.then(results => results.map(item => ({
4145 customization: this._overlayMcpState(this._applyEnablement(item.customization)),
4146 ...(item.pluginDir ? { pluginDir: item.pluginDir } : {}),
4147 > }))); copilotAgent.ts
4148 > }
4149
4150 /**