copilotAgentSession.ts ×11

Frontier kind: Code frontier

unlabeled · c_89a8237ce6c5

13 tests · 43754 LOC · 243 files · introduces 0 tests · 37 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
11 ranges37 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
4012 ranges43754 lines · 243 files · Browse complete extent
All tests (intent)
13 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: 37 introduced LOC across 11 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts 37 introduced LOC · 11 ranges

Open complete file

3933 */
3934 private _logMcpServerLifecycle(server: IMcpLifecycleLogInfo & { readonly origin: McpLifecycleOrigin }): void {
3935 > if (this._lastLoggedMcpStatus.get(server.name) === server.status) { copilotAgentSession.ts
3936 return;
3937 }
3938 > this._lastLoggedMcpStatus.set(server.name, server.status); copilotAgentSession.ts
3939 >
3940 > const state = this._translateSdkMcpStatus(server.name, server.status, server.error);
3941 > const attributes: Record<string, OtelAttributeValue> = {
3942 > mcpEvent: server.origin,
3943 > mcpServer: server.name,
3944 > mcpStatus: server.status,
3945 > mcpState: state.kind,
3946 > };
3947 > if (server.source) { attributes.mcpSource = server.source; }
3948 > if (server.transport) { attributes.mcpTransport = server.transport; }
3949 > if (server.pluginName) { attributes.mcpPlugin = server.pluginName; }
3950 > if (server.pluginVersion) { attributes.mcpPluginVersion = server.pluginVersion; }
3951 > if (state.kind === McpServerStatus.Error) { attributes.errorType = state.error.errorType; }
3952 >
3953 > const detail = server.error ? `: ${server.error}` : '';
3954 > const message = `[Copilot:${this.sessionId}] MCP server '${server.name}' ${server.status} (${state.kind})${detail}`;
3955 > if (server.status === 'failed') {
3956 this._logService.error(message, new OtelData(attributes));
3957 > } else { copilotAgentSession.ts
3958 this._logService.info(message, new OtelData(attributes));
3959 }
3961
3962 private _setToolCallUiMeta(meta: Mutable<IToolCallMeta>, resourceUri: string | undefined, mcpServerName: string | undefined): void {
4000 */
4001 private _toSdkMcpServer(name: string, status: SdkMcpServerStatus, error?: string): ISdkMcpServer {
4002 > return { copilotAgentSession.ts
4003 > name,
4004 > state: this._translateSdkMcpStatus(name, status, error),
4005 > enabled: status !== 'disabled',
4006 > };
4007 > }
4008
4009 private _translateSdkMcpStatus(name: string, status: SdkMcpServerStatus, error?: string): McpServerState {
4010 > switch (status) { copilotAgentSession.ts
4011 > case 'connected':
4012 return { kind: McpServerStatus.Ready };
4013 > case 'failed': copilotAgentSession.ts
4014 return {
4015 kind: McpServerStatus.Error,
4019 },
4020 };
4021 > case 'pending': copilotAgentSession.ts
4022 > case 'needs-auth': {
4023 const previous = this._mcpCustomizations.stateForServer(name);
4024 if (previous?.kind === McpServerStatus.AuthRequired) {