agentHostStateManager.ts ×3

Frontier kind: Code frontier

unlabeled · c_1340078b2503

248 tests · 25814 LOC · 107 files · introduces 0 tests · 49 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges49 lines · 3 files
Tests
0 tests

Contains — complete concept membership

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

src/vs/platform/agentHost/common/changesetUri.ts 32 introduced LOC · 2 ranges

Open complete file

294 */
295 export function buildDefaultChangesetCatalog(sessionUri: URI, state?: ISessionWithDefaultChat): Changeset[] {
296 > // Session that failed to create changesetUri.ts
297 > if (!state || state.lifecycle === SessionLifecycle.CreationFailed) {
298 return [];
299 }
339 ? formatBranchChangesetDescription(gitState)
340 : undefined,
341 > uriTemplate: buildBranchChangesetUri(sessionUri), changesetUri.ts
342 > changeKind: ChangesetKind.Branch,
343 > capabilities: { review: {} }
344 > },
345 > {
346 > label: uncommittedChangesetLabel(),
347 > description: uncommittedChangesetDescription(),
348 > uriTemplate: buildUncommittedChangesetUri(sessionUri),
349 > changeKind: ChangesetKind.Uncommitted
350 > },
351 > {
352 > label: sessionChangesetLabel(),
353 > description: sessionChangesetDescription(),
354 > uriTemplate: buildSessionChangesetUri(sessionUri),
355 > changeKind: ChangesetKind.Session
356 > },
357 > {
358 > label: thisTurnChangesetLabel(),
359 > description: thisTurnChangesetDescription(),
360 > uriTemplate: buildTurnChangesetUriTemplate(sessionUri),
361 > changeKind: ChangesetKind.Turn
362 > },
363 > {
364 > label: compareTurnsChangesetLabel(),
365 > description: compareTurnsChangesetDescription(),
366 > uriTemplate: buildCompareTurnsChangesetUriTemplate(sessionUri),
367 > changeKind: ChangesetKind.Compare
368 > }
369 > ] satisfies Changeset[];
370 > }
src/vs/platform/agentHost/node/agentHostStateManager.ts 15 introduced LOC · 3 ranges

Open complete file

1020 */
1021 setSessionChangesets(session: URI, changesets: readonly Changeset[] | undefined): void {
1022 > const entry = this._sessionStates.get(session); agentHostStateManager.ts
1023 > if (!entry) {
1024 this._logService.warn(`[AgentHostStateManager] setSessionChangesets: unknown session ${session}`);
1025 return;
1026 }
1027 > const state = entry.state; agentHostStateManager.ts
1028 >
1029 > // Skip dispatch when the catalogue is field-equal to the existing one.
1030 > // Producers call this after every compute pass, so duplicate calls
1031 > // are common and would otherwise broadcast a redundant envelope to
1032 > // every subscriber.
1033 > if (arrayEquals(state.changesets ?? [], changesets ?? [], structuralEquals)) {
1034 return;
1035 }
1036 // Take a defensive copy so callers can't mutate the catalogue array
1037 // after dispatch; the reducer otherwise stores the reference as-is.
1038 > const next = changesets ? changesets.slice() : undefined; agentHostStateManager.ts
1039 > this.dispatchServerAction(session, {
1040 > type: ActionType.SessionChangesetsChanged,
1041 > changesets: next,
1042 > });
1043 > }
1044
1045 /**
src/vs/base/common/equals.ts 2 introduced LOC · 1 range

Open complete file

37 */
38 export function arrayEquals<T>(a: readonly T[], b: readonly T[], itemEquals?: EqualityComparer<T>): boolean {
39 > return arrays.equals(a, b, itemEquals ?? strictEquals); equals.ts
40 > }
41
42 /**