agentSideEffects.ts ×17

Frontier kind: Code frontier

unlabeled · c_1e30cdc36e87

126 tests · 42051 LOC · 237 files · introduces 0 tests · 23 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
17 ranges23 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
3901 ranges42051 lines · 237 files · Browse complete extent
All tests (intent)
126 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 17 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

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

Open complete file

1102
1103 handleAction(channel: ProtocolURI, action: StateAction, clientId?: string): void {
1104 > const chatChannel = isAhpChatChannel(channel) ? channel : undefined; agentSideEffects.ts
1105 > const sessionChannel = chatChannel ? parseRequiredSessionUriFromChatUri(chatChannel) : channel;
1106 > switch (action.type) {
1107 > case ActionType.ChatTurnStarted: {
1108 if (!chatChannel) {
1109 throw new Error(`ChatTurnStarted must be handled on an AHP chat channel: ${channel}`);
1156 break;
1157 }
1158 > case ActionType.ChatToolCallConfirmed: { agentSideEffects.ts
1159 if (!chatChannel) {
1160 throw new Error(`ChatToolCallConfirmed must be handled on an AHP chat channel: ${channel}`);
1177 break;
1178 }
1179 > case ActionType.ChatInputCompleted: { agentSideEffects.ts
1180 if (!chatChannel) {
1181 throw new Error(`ChatInputCompleted must be handled on an AHP chat channel: ${channel}`);
1185 break;
1186 }
1187 > case ActionType.ChatTurnCancelled: { agentSideEffects.ts
1188 if (!chatChannel) {
1189 throw new Error(`ChatTurnCancelled must be handled on an AHP chat channel: ${channel}`);
1207 break;
1208 }
1209 > case ActionType.SessionTitleChanged: { agentSideEffects.ts
1210 if (chatChannel) {
1211 // The rename targeted a specific chat (default or additional),
1219 break;
1220 }
1221 > case ActionType.ChatPendingMessageSet: agentSideEffects.ts
1222 > case ActionType.ChatPendingMessageRemoved:
1223 > case ActionType.ChatQueuedMessagesReordered: {
1224 if (!chatChannel) {
1225 throw new Error(`${action.type} must be handled on an AHP chat channel: ${channel}`);
1228 break;
1229 }
1230 > case ActionType.ChatTruncated: { agentSideEffects.ts
1231 if (!chatChannel) {
1232 throw new Error(`ChatTruncated must be handled on an AHP chat channel: ${channel}`);
1253 break;
1254 }
1255 > case ActionType.SessionActiveClientSet: { agentSideEffects.ts
1256 const agent = this._options.getAgent(channel);
1257 if (!agent) {
1267 break;
1268 }
1269 > case ActionType.SessionActiveClientRemoved: { agentSideEffects.ts
1270 const agent = this._options.getAgent(channel);
1271 agent?.removeActiveClient(URI.parse(channel), action.clientId);
1272 break;
1273 }
1274 > case ActionType.RootConfigChanged: { agentSideEffects.ts
1275 updateAgentHostTelemetryLevelFromConfig(this._telemetryService, action.config);
1276 // Host customizations are self-managed by each agent's
1282 break;
1283 }
1284 > case ActionType.SessionMcpServerStartRequested: { agentSideEffects.ts
1285 const agent = this._options.getAgent(sessionChannel);
1286 agent?.startMcpServer?.(URI.parse(sessionChannel), action.id).catch(err => {
1289 break;
1290 }
1291 > case ActionType.SessionMcpServerStopRequested: { agentSideEffects.ts
1292 const agent = this._options.getAgent(sessionChannel);
1293 agent?.stopMcpServer?.(URI.parse(sessionChannel), action.id).catch(err => {
1296 break;
1297 }
1298 > case ActionType.SessionIsReadChanged: { agentSideEffects.ts
1299 this._persistSessionFlag(channel, 'isRead', action.isRead ? 'true' : '');
1300 break;
1301 }
1302 > case ActionType.SessionIsArchivedChanged: { agentSideEffects.ts
1303 this._persistSessionFlag(channel, AH_META_IS_ARCHIVED_DB_KEY, action.isArchived ? 'true' : '');
1304 // Host-owned worktree lifecycle (agents stay unaware): remove the
1320 break;
1321 }
1322 > case ActionType.SessionConfigChanged: { agentSideEffects.ts
1323 // Persist merged values so a future `restoreSession` can re-hydrate
1324 // the user's previous selections (e.g. autoApprove).
1346 break;
1347 }
1348 > case ActionType.ChatToolCallComplete: { agentSideEffects.ts
1349 if (!chatChannel) {
1350 break; // Not a chat channel; ignore.
1353 break;
1354 }
1356 > }
1357
1358 /** Injects the host-owned worktree isolation controller (see {@link AgentService.setWorktreeIsolation}). */