agentSideEffects.ts ×4

Frontier kind: Code frontier

unlabeled · c_18165dc93243

15 tests · 42737 LOC · 238 files · introduces 0 tests · 27 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges27 lines · 3 files
Tests
0 tests

Contains — complete concept membership

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

src/vs/platform/agentHost/node/agentSideEffects.ts 21 introduced LOC · 4 ranges

Open complete file

1222 case ActionType.ChatPendingMessageRemoved:
1223 case ActionType.ChatQueuedMessagesReordered: {
1224 > if (!chatChannel) { agentSideEffects.ts
1225 throw new Error(`${action.type} must be handled on an AHP chat channel: ${channel}`);
1226 }
1227 > this._syncPendingMessages(channel); agentSideEffects.ts
1228 > break;
1229 > }
1230 case ActionType.ChatTruncated: {
1231 if (!chatChannel) {
1408 */
1409 private _syncPendingMessages(chatChannel: ProtocolURI): void {
1410 > const sessionChannel = parseRequiredSessionUriFromChatUri(chatChannel); agentSideEffects.ts
1411 > const state = this._stateManager.getSessionState(chatChannel);
1412 > if (!state) {
1413 return;
1414 }
1415 > const agent = this._options.getAgent(sessionChannel); agentSideEffects.ts
1416 > agent?.setPendingMessages?.(
1417 > URI.parse(chatChannel),
1418 > state.steeringMessage,
1419 > [],
1420 > );
1421 >
1422 > // Steering message removal is now dispatched by the agent
1423 > // via the 'steering_consumed' progress event once the message
1424 > // has actually been sent to the model.
1425 >
1426 > // If the session is idle, try to consume the next queued message
1427 > this._tryConsumeNextQueuedMessage(chatChannel);
1428 > }
1429
1430 /**
src/vs/platform/agentHost/common/state/protocol/channels-chat/reducer.ts 4 introduced LOC · 2 ranges

Open complete file

766
767 case ActionType.ChatPendingMessageSet: {
768 > const entry: PendingMessage = { id: action.id, message: action.message }; reducer.ts
769 > if (action.kind === PendingMessageKind.Steering) {
770 return { ...state, steeringMessage: entry };
771 }
772 const existing = state.queuedMessages ?? [];
773 > const idx = existing.findIndex(m => m.id === action.id); reducer.ts
774 > if (idx >= 0) {
775 const updated = [...existing];
776 updated[idx] = entry;
src/vs/platform/agentHost/test/node/mockAgent.ts 2 introduced LOC · 1 range

Open complete file

155
156 setPendingMessages(chat: URI, steeringMessage: PendingMessage | undefined, queuedMessages: readonly PendingMessage[]): void {
157 > this.setPendingMessagesCalls.push({ chat, steeringMessage, queuedMessages }); mockAgent.ts
158 > }
159
160 readonly onSessionConfigChangedCalls: { session: URI; values: Record<string, unknown> }[] = [];