claudeAgent.ts ×2

Frontier kind: Code frontier

unlabeled · c_15f1b3f05795

7 tests · 54505 LOC · 346 files · introduces 0 tests · 34 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
3 ranges34 lines · 2 files
Tests
0 tests

Contains — complete concept membership

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

src/vs/platform/agentHost/node/claude/claudeAgent.ts 21 introduced LOC · 2 ranges

Open complete file

650 const filtered = proxyAtStart
651 ? await this._fetchProxyModels(tokenAtStart!)
652 > : await this._fetchNativeModels(); claudeAgent.ts
653 > // Stale-write guard: bail if the transport flipped, or (proxy) the
654 > // token rotated, while we were awaiting — a newer refresh already
655 > // published the right list.
656 if (this._isProxyEnabled() !== proxyAtStart || (proxyAtStart && this._githubToken !== tokenAtStart)) {
657 return;
677 */
678 private async _fetchNativeModels(): Promise<readonly IAgentModelInfo[]> {
679 > // A prompt iterable that never yields: enumeration only needs the claudeAgent.ts
680 > // control-request channel (`Query.supportedModels()`), not a real turn.
681 > const neverYieldingPrompt: AsyncIterable<SDKUserMessage> = {
682 > [Symbol.asyncIterator]: () => ({ next: () => new Promise<IteratorResult<SDKUserMessage>>(() => { /* never resolves */ }) }),
683 > };
684 > const options = buildModelEnumerationOptions();
685 > const query = await this._sdkService.query({ prompt: neverYieldingPrompt, options });
686 > try {
687 > const models = await query.supportedModels();
688 > return models.map(m => fromSdkModelInfo(m, this.id));
689 > } finally {
690 > // `close()` terminates the subprocess; aborting the controller is a
691 > // belt-and-suspenders teardown for anything `close()` leaves pending.
692 > query.close();
693 > options.abortController?.abort();
694 > }
695 > }
696
697 /**
src/vs/platform/agentHost/node/claude/claudeSdkOptions.ts 13 introduced LOC · 1 range

Open complete file

185 */
186 export function buildModelEnumerationOptions(): Options {
187 > return { claudeSdkOptions.ts
188 > cwd: tmpdir(),
189 > executable: process.execPath as 'node',
190 > env: buildSubprocessEnv(false),
191 > abortController: new AbortController(),
192 > systemPrompt: { type: 'preset', preset: 'claude_code' },
193 > settings: {
194 > env: {
195 > CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1',
196 > },
197 > },
198 > };
199 > }
200
201 /**