mcpTypesUtils.ts ×4

Frontier kind: Joint frontier

unlabeled · c_25584a2d903b

4 tests · 37187 LOC · 182 files · introduces 2 tests · 28 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges28 lines · 2 files
Tests
2 tests

Contains — complete concept membership

All code (extent)
3254 ranges37187 lines · 182 files · Browse complete extent
All tests (intent)
4 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.

2 tests introduced at this concept.

Introduced code

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

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

src/vs/workbench/contrib/mcp/common/mcpTypesUtils.ts 25 introduced LOC · 4 ranges

Open complete file

51 export async function startServerAndWaitForLiveTools(server: IMcpServer, opts?: IMcpServerStartOpts, token?: CancellationToken): Promise<boolean> {
52 const r = await server.start(opts);
54 > const store = new DisposableStore();
55 > const ok = await new Promise<boolean>(resolve => {
56 > if (token?.isCancellationRequested || r.state === McpConnectionState.Kind.Error || r.state === McpConnectionState.Kind.Stopped) {
57 return resolve(false);
58 }
60 > if (token) {
61 store.add(token.onCancellationRequested(() => {
62 resolve(false);
63 }));
64 }
66 > store.add(autorun(reader => {
67 > const connState = server.connectionState.read(reader).state;
68 > if (connState === McpConnectionState.Kind.Error || connState === McpConnectionState.Kind.Stopped) {
69 resolve(false); // some error, don't block the request
70 }
72 > const toolState = server.cacheState.read(reader);
73 > if (toolState === McpServerCacheState.Live) {
74 > resolve(true); // got tools, all done
75 > }
76 > }));
77 > });
78 > store.dispose();
79 >
80 > if (ok) {
81 > await timeout(0); // let the tools register in the language model contribution
82 > }
83 >
84 > return ok;
85 > }
86
87 export function mcpServerToSourceData(server: IMcpServer, reader?: IReader): ToolDataSource {
src/vs/workbench/contrib/mcp/common/mcpGatewayToolBrokerChannel.ts 3 introduced LOC · 1 range

Open complete file

322 errorOnUserInteraction: true,
323 });
324 > this._logService.debug(`[McpGateway][ToolBroker] Server '${server.definition.id}' ready=${ready}`); mcpGatewayToolBrokerChannel.ts
325 > return ready;
326 > } catch (error) {
327 this._logService.warn(`[McpGateway][ToolBroker] Server '${server.definition.id}' failed to start`, error);
328 return false;