agentSideEffects.ts ×5

Frontier kind: Code frontier

unlabeled · c_457bf575d7ef

5 tests · 42542 LOC · 238 files · introduces 0 tests · 28 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges28 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
4029 ranges42542 lines · 238 files · Browse complete extent
All tests (intent)
5 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: 28 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/agentSideEffects.ts 23 introduced LOC · 5 ranges

Open complete file

938 */
939 cancelSubagentSessions(parentChatURI: ProtocolURI): void {
940 > for (const subagent of this._subagentChats.getAll(parentChatURI)) { agentSideEffects.ts
941 const turnId = this._stateManager.getActiveTurnId(subagent.chatUri);
942 if (turnId) {
950 this._toolCallTracker.clearSession(subagent.chatUri);
951 }
952 > this._subagentChats.deleteAll(parentChatURI); agentSideEffects.ts
953 > // Drop any buffered events targeted at subagents that never started.
954 > this._pendingSubagentSignals.deleteAll(parentChatURI);
955 > }
956
957 /**
1186 }
1187 case ActionType.ChatTurnCancelled: {
1188 > if (!chatChannel) { agentSideEffects.ts
1189 throw new Error(`ChatTurnCancelled must be handled on an AHP chat channel: ${channel}`);
1190 }
1191 > this._turnTracker.turnCompleted(channel, action.turnId, 'cancelled'); agentSideEffects.ts
1192 > this._toolCallTracker.clearSession(channel);
1193 > // Cancel all subagent sessions for this parent
1194 > this.cancelSubagentSessions(channel);
1195 > const agent = this._options.getAgent(sessionChannel);
1196 > if (agent) {
1197 > const chat = URI.parse(channel);
1198 > agent.chats.abort(chat).catch(err => {
1199 this._logService.error('[AgentSideEffects] abort failed', err);
1200 > }); agentSideEffects.ts
1201 > }
1202 > // Intentionally do NOT drain queued messages here: cancelling means
1203 > // "stop", so messages queued behind the turn stay queued for the
1204 > // user to dequeue/run manually. (A message the user sends *after*
1205 > // the abort is still consumed via the ChatPendingMessageSet path
1206 > // once cancellation has cleared the active turn.)
1207 > break;
1208 > }
1209 case ActionType.SessionTitleChanged: {
1210 if (chatChannel) {
src/vs/platform/agentHost/test/node/mockAgent.ts 5 introduced LOC · 2 ranges

Open complete file

183
184 async abortSession(session: URI): Promise<void> {
185 > this.abortSessionCalls.push(session); mockAgent.ts
186 > }
187
188 async truncateSession(session: URI, turnId?: string, chat?: URI): Promise<void> {
247 },
248 abort: (chat: URI): Promise<void> => {
249 > const { session } = this._resolveChatTarget(chat); mockAgent.ts
250 > return this.abortSession(session);
251 > },
252 changeModel: (chatUri: URI, model: ModelSelection): Promise<void> => {
253 const { session, chat } = this._resolveChatTarget(chatUri);