claudeReplayMapper.ts ×12

Frontier kind: Code frontier

unlabeled · c_9967bf3c4c3f

27 tests · 19863 LOC · 73 files · introduces 0 tests · 24 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
12 ranges24 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1641 ranges19863 lines · 73 files · Browse complete extent
All tests (intent)
27 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: 24 introduced LOC across 12 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/claude/claudeReplayMapper.ts 24 introduced LOC · 12 ranges

Open complete file

50 const builder = new ReplayBuilder(session, logService);
51 for (const msg of messages) {
52 > const parsed = parseSessionMessage(msg); claudeReplayMapper.ts
53 > if (parsed === undefined) {
54 continue;
55 }
56 > builder.consume(parsed); claudeReplayMapper.ts
57 > }
58 return builder.finish();
59 }
244
245 consume(msg: ParsedSessionMessage): void {
246 > switch (msg.kind) { claudeReplayMapper.ts
247 > case 'user-text':
248 this._closeActive();
249 this._active = {
256 };
257 return;
258 > case 'user-tool-results': { claudeReplayMapper.ts
259 let updatesActiveTurn = false;
260 for (const block of msg.results) {
266 return;
267 }
268 > case 'assistant': claudeReplayMapper.ts
269 > this._consumeAssistant(msg);
270 > return;
271 > case 'system-notification':
272 if (this._active === undefined) {
273 // System notification before any user message — drop. Without an active turn there's nowhere to attach.
291
292 private _consumeAssistant(msg: ParsedSessionMessage & { kind: 'assistant' }): void {
293 > if (this._active === undefined) { claudeReplayMapper.ts
294 if (!msg.isInner) {
295 // Top-level assistant envelope without a preceding user message —
313 };
314 }
315 > let textPartCounter = 0; claudeReplayMapper.ts
316 > let reasoningPartCounter = 0;
317 > for (const block of msg.blocks) {
318 > if (block.type === 'text' && typeof block.text === 'string') {
319 this._active.responseParts.push({
320 kind: ResponsePartKind.Markdown,
322 content: block.text,
323 });
324 > } else if (block.type === 'thinking' && typeof block.thinking === 'string') { claudeReplayMapper.ts
325 this._active.responseParts.push({
326 kind: ResponsePartKind.Reasoning,
335 this._openToolUse(block.id, stripClientToolNamePrefix(block.name), block.input);
336 }
337 > // Other block types (server_tool_use, etc.) are dropped silently per M7. claudeReplayMapper.ts
338 > }
339 > if (msg.timestamp) {
340 this._active.lastResponseAt = msg.timestamp;
341 }
343
344 private _openToolUse(toolUseId: string, toolName: string, input: unknown): void {
445 return;
446 }
447 > const a = this._active; claudeReplayMapper.ts
448 const state = a.pendingToolUseIds.size === 0 ? TurnState.Complete : TurnState.Cancelled;
449 const startedAt = a.startedAt === undefined ? undefined : Date.parse(a.startedAt);