chatDebugServiceImpl.ts ×6

Frontier kind: Code frontier

unlabeled · c_bfaf858a4556

12 tests · 11115 LOC · 49 files · introduces 0 tests · 23 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges23 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1437 ranges11115 lines · 49 files · Browse complete extent
All tests (intent)
12 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: 23 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.ts 23 introduced LOC · 6 ranges

Open complete file

292 return [];
293 }
294 > let result = buffer.toArray(); chatDebugServiceImpl.ts
295 > // Sort only when the buffer is not in chronological order,
296 > // which can happen when events arrive out of order (e.g.
297 > // tail-first backfill). When events arrive in
298 > // order (the common case) the check is O(n) with no sort.
299 > if (!this._isSorted(result)) {
300 result.sort((a, b) => a.created.getTime() - b.created.getTime());
301 }
302 > // Deduplicate: when multiple events share the same ID (e.g. chatDebugServiceImpl.ts
303 > // subagentInvocation + userMessage from the same span), keep
304 > // the one with the richest kind.
305 > result = this._deduplicateEvents(result);
306 > return result;
307 > }
308
309 // Cross-session query: merge all buffers and sort to interleave.
317
318 private _isSorted(events: IChatDebugEvent[]): boolean {
319 > for (let i = 1; i < events.length; i++) { chatDebugServiceImpl.ts
320 if (events[i].created.getTime() < events[i - 1].created.getTime()) {
321 return false;
322 }
323 }
324 > return true; chatDebugServiceImpl.ts
325 > }
326
327 private _deduplicateEvents(events: IChatDebugEvent[]): IChatDebugEvent[] {
328 > const seen = new Map<string, number>(); // id → index in result chatDebugServiceImpl.ts
329 > const priority = ChatDebugServiceImpl._eventKindPriority;
330 > const result: IChatDebugEvent[] = [];
331 > for (const event of events) {
332 > if (!event.id) {
333 result.push(event);
334 continue;
344 }
345 }
347 > return result;
348 > }
349
350 getSessionResources(): readonly URI[] {