runSubagentTool.ts ×4

Frontier kind: Code frontier

unlabeled · c_d84487b3b1dc

3 tests · 50030 LOC · 214 files · introduces 0 tests · 30 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges30 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
3827 ranges50030 lines · 214 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.

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

src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.ts 25 introduced LOC · 4 ranges

Open complete file

457 .map(id => ({ id, metadata: this.languageModelsService.lookupLanguageModel(id) }))
458 .filter((m): m is { id: string; metadata: ILanguageModelChatMetadata } =>
459 > !!m.metadata runSubagentTool.ts
460 > && ILanguageModelChatMetadata.suitableForAgentMode(m.metadata)
461 > && m.metadata.isUserSelectable !== false
462 > && !m.metadata.targetChatSessionType
463 );
464
466 return 'No models available.';
467 }
469 > const available: string[] = [];
470 > const unavailableDueToMultiplier: string[] = [];
471 >
472 > for (const { id, metadata } of models) {
473 > const qualifiedName = ILanguageModelChatMetadata.asQualifiedName(metadata);
474 > const check = this.checkMultiplierConstraint(id, mainModelId);
475 >
476 > if (check.exceeds) {
477 unavailableDueToMultiplier.push(qualifiedName);
478 > } else { runSubagentTool.ts
479 > available.push(qualifiedName);
480 > }
481 > }
482 >
483 > const parts: string[] = [];
484 > if (available.length > 0) {
485 > parts.push(`Available models: ${available.join(', ')}`);
486 > }
487 > if (unavailableDueToMultiplier.length > 0) {
488 parts.push(`Unavailable (exceeds current model's cost tier): ${unavailableDueToMultiplier.join(', ')}`);
489 }
491 > return parts.join('. ') || 'No models available.';
492 }
493
src/vs/workbench/contrib/chat/common/languageModels.ts 5 introduced LOC · 2 ranges

Open complete file

332 export namespace ILanguageModelChatMetadata {
333 export function suitableForAgentMode(metadata: ILanguageModelChatMetadata): boolean {
334 > const supportsToolsAgent = typeof metadata.capabilities?.agentMode === 'undefined' || metadata.capabilities.agentMode; languageModels.ts
335 > return supportsToolsAgent && !!metadata.capabilities?.toolCalling;
336 > }
337
338 export function asQualifiedName(metadata: ILanguageModelChatMetadata): string {
339 > return `${metadata.name} (${metadata.vendor})`; languageModels.ts
340 > }
341
342 export function matchesQualifiedName(name: string, metadata: ILanguageModelChatMetadata): boolean {