agentHostStateManager.ts ×4

Frontier kind: Code frontier

unlabeled · c_219f7be9c318

78 tests · 19606 LOC · 83 files · introduces 0 tests · 20 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges20 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1907 ranges19606 lines · 83 files · Browse complete extent
All tests (intent)
78 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.

2 files ranked by introduced lines: 20 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/agentHostStateManager.ts 15 introduced LOC · 4 ranges

Open complete file

704 return undefined;
705 }
706 > const sessionState = entry.state; agentHostStateManager.ts
707 > const existing = sessionState.chats.find(c => c.resource === chatUri);
708 > if (existing) {
709 return existing;
710 }
712 > // A session gains its first additional chat here: snapshot the current
713 > // session title onto the still-inheriting default chat so the two
714 > // titles become fully independent. Without this the default chat keeps
715 > // an empty title (= inherit the session title), so renaming the session
716 > // would also move the default chat tab and vice-versa.
717 > const defaultChatUri = sessionState.defaultChat ?? buildDefaultChatUri(session);
718 const defaultEntry = sessionState.chats.find(c => c.resource === defaultChatUri);
719 if (defaultEntry && !defaultEntry.title && sessionState.title) {
720 this.updateChatTitle(session, defaultChatUri, sessionState.title);
721 }
723 > const chatSummary: ChatSummary = {
724 > ...createDefaultChatSummary(this._toSummary(session, entry), chatUri),
725 title: options?.title ?? '',
726 status: SessionStatus.Idle,
732 this._chatProviderData.set(chatUri, options.providerData);
733 }
734 > this.dispatchServerAction(session, { type: ActionType.SessionChatAdded, summary: chatSummary }); agentHostStateManager.ts
735 > return chatSummary;
736 }
737
src/vs/platform/agentHost/common/state/protocol/channels-session/reducer.ts 5 introduced LOC · 1 range

Open complete file

112
113 case ActionType.SessionChatAdded: {
114 > const list = state.chats; reducer.ts
115 > const idx = list.findIndex(c => c.resource === action.summary.resource);
116 > if (idx < 0) {
117 > return { ...state, chats: [...list, action.summary] };
118 > }
119 const updated = list.slice();
120 updated[idx] = action.summary;