claudeSdkPipeline.ts ×4

Frontier kind: Code frontier

unlabeled · c_1dc9635220c1

107 tests · 56148 LOC · 346 files · introduces 0 tests · 22 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges22 lines · 3 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
5486 ranges56148 lines · 346 files · Browse complete extent
All tests (intent)
107 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.

3 files ranked by introduced lines: 22 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/claude/claudeAgent.ts 13 introduced LOC · 1 range

Open complete file

1956 /** Builds the SDK user message for a send, addressed to `sdkSessionId`. */
1957 private _buildSdkPrompt(sdkSessionId: string, prompt: string, attachments: readonly MessageAttachment[] | undefined, turnId: string): SDKUserMessage {
1958 > const contentBlocks = resolvePromptToContentBlocks(prompt, attachments); claudeAgent.ts
1959 > return {
1960 > type: 'user',
1961 > message: { role: 'user', content: contentBlocks },
1962 > session_id: sdkSessionId,
1963 > parent_tool_use_id: null,
1964 > // M1 / Glossary: `Turn.id ↔ SDKUserMessage.uuid`. The SDK types this
1965 > // as a branded `${string}-…` template-literal alias of Node's
1966 > // `crypto.UUID`; cast at the boundary rather than threading the brand
1967 > // up to every caller.
1968 > uuid: turnId as `${string}-${string}-${string}-${string}-${string}`,
1969 > };
1970 > }
1971
1972 respondToPermissionRequest(requestId: string, approved: boolean): void {
src/vs/platform/agentHost/node/claude/claudeSdkPipeline.ts 6 introduced LOC · 4 ranges

Open complete file

636 try {
637 for await (const message of query) {
638 > if (this._abortController.signal.aborted) { claudeSdkPipeline.ts
639 throw new CancellationError();
640 }
641 > if (message.type === 'system' && message.subtype === 'init') { claudeSdkPipeline.ts
642 // Capture the loaded native-plugin list on every init (incl.
643 // resume / post-rebind) so the post-materialize filter is fresh.
648 }
649 const turnId = this._queue.peekParent()?.turnId;
650 > const turnDuration = this._queue.peekParent()?.stopWatch.elapsed(); claudeSdkPipeline.ts
651 > try {
652 > await this._router.handle(message, turnId, turnDuration);
653 } catch (handlerErr) {
654 this._logService.warn(`[ClaudeSdkPipeline:${this.sessionId}] router threw, skipping: ${handlerErr}`);
672 }
673 }
675 if (this._abortController.signal.aborted) {
676 throw new CancellationError();
src/vs/platform/agentHost/node/claude/claudeAgentSession.ts 3 introduced LOC · 2 ranges

Open complete file

704 if (this.toolDiff.hasDifference || this.clientCustomizationsDiff.hasDifferenceFrom(this._desiredClientPluginPaths()) || this._pendingResumeSessionAt !== undefined) {
705 await this._rebindForSyncedState();
706 > } else { claudeAgentSession.ts
707 await pipeline.setPermissionMode(resolveCurrentPermissionMode(this._configurationService, this._storageUri, this._permissionModeFallback));
708 }
709 > await this._reconcileMcpServerEnablement(); claudeAgentSession.ts
710 > return pipeline.send(prompt, turnId);
711 }
712