claudeAgent.ts ×3

Frontier kind: Code frontier

unlabeled · c_c0fb476ab667

4 tests · 54313 LOC · 346 files · introduces 0 tests · 25 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
3 ranges25 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
5027 ranges54313 lines · 346 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.

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: 25 introduced LOC across 3 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/claude/claudeAgent.ts 25 introduced LOC · 3 ranges

Open complete file

1867
1868 shutdown(): Promise<void> {
1869 > // Phase 6: drain provisional sessions FIRST so any in-flight claudeAgent.ts
1870 > // `await sdk.startup()` (kicked off by a racing `sendMessage`)
1871 > // observes the abort and unwinds. Each provisional record's
1872 > // AbortController is wired into Options.abortController at
1873 > // materialize time, so aborting here flips the same signal the
1874 > // SDK is racing on.
1875 > //
1876 > // Then drain the materialized sessions through the existing
1877 > // per-session {@link _disposeSequencer} routing — that path
1878 > // inherits Phase 6's real async teardown (`Query.interrupt()`,
1879 > // in-flight metadata writes) once those land.
1880 > //
1881 > // The promise is memoized so concurrent callers share a single
1882 > // drain pass — see `_shutdownPromise` JSDoc.
1883 > // NOTE: declared sync (returns Promise<void>) rather than async
1884 > // so that re-entrant calls return the cached promise *identity*,
1885 > // not a fresh outer-async wrapper around it.
1886 > return this._shutdownPromise ??= (async () => {
1887 > for (const entry of this._sessions.values()) {
1888 // Provisional chats (a default or peer whose first send's
1889 // materialize is in-flight) race on their own abort controller —
1897 }
1898 }
1900 > const sessionIds = [...this._sessions.keys()];
1901 > await Promise.all(sessionIds.map(sessionId =>
1902 this._disposeSequencer.queue(sessionId, async () => {
1903 await this._teardownEntry(sessionId);
1904 this._pruneActiveClientHandles(sessionId);
1905 })
1906 > )); claudeAgent.ts
1907 > })();
1908 > }
1909
1910 private async _sendMessage(chat: URI, prompt: string, workingDirectory: URI | undefined, attachments?: readonly MessageAttachment[], turnId?: string, _senderClientId?: string): Promise<void> {