claudeSubagentResolver.ts ×10

Frontier kind: Code frontier

unlabeled · c_299e7e440939

2 tests · 20187 LOC · 76 files · introduces 0 tests · 28 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
10 ranges28 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1664 ranges20187 lines · 76 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: 28 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/claude/claudeSubagentResolver.ts 28 introduced LOC · 10 ranges

Open complete file

97 * structural narrowing of arbitrary SDK JSON payloads.
98 */
99 > function vString(input: unknown): string | undefined { claudeSubagentResolver.ts
100 > const r = vStringValidator().validate(input);
101 > return r.error ? undefined : r.content;
102 > }
103
104 > function vObj(input: unknown): Record<string, unknown> | undefined { claudeSubagentResolver.ts
105 > const r = vObjAny().validate(input);
106 > if (r.error || r.content === null || Array.isArray(r.content)) {
107 return undefined;
108 }
109 > return r.content as Record<string, unknown>; claudeSubagentResolver.ts
110 > }
111
112 // #endregion
177 export function extractSpawningPromptFromTranscript(transcript: readonly Turn[], toolCallId: string): string | undefined {
178 for (const turn of transcript) {
179 > for (const part of turn.responseParts) { claudeSubagentResolver.ts
180 > if (part.kind !== ResponsePartKind.ToolCall) {
181 continue;
182 }
183 > const state = part.toolCall; claudeSubagentResolver.ts
184 > if (state.toolCallId !== toolCallId) {
185 > continue;
186 > }
187 > if (!SUBAGENT_TOOL_NAMES.has(state.toolName)) {
188 return undefined;
189 }
190 > if (state.status === ToolCallStatus.Streaming) { claudeSubagentResolver.ts
191 return undefined;
192 }
193 > const inputRaw = state.toolInput; claudeSubagentResolver.ts
194 > if (typeof inputRaw !== 'string') {
195 return undefined;
196 }
197 > let parsed: unknown; claudeSubagentResolver.ts
198 > try {
199 > parsed = JSON.parse(inputRaw);
200 > } catch {
201 return undefined;
202 }
203 > const bag = vObj(parsed); claudeSubagentResolver.ts
204 > if (!bag) {
205 return undefined;
206 }
207 > return vString(bag.prompt); claudeSubagentResolver.ts
208 > }
209 > }
210 return undefined;
211 }