agentHostStateManager.ts ×7

Frontier kind: Code frontier

unlabeled · c_c975bf54c706

494 tests · 19232 LOC · 83 files · introduces 0 tests · 30 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges30 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1800 ranges19232 lines · 83 files · Browse complete extent
All tests (intent)
494 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: 30 introduced LOC across 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/agentHostStateManager.ts 26 introduced LOC · 7 ranges

Open complete file

1157
1158 private _applyAndEmit(channel: URI, action: StateAction, origin: ActionOrigin | undefined): unknown {
1159 > let resultingState: unknown = undefined; agentHostStateManager.ts
1160 > if (action.type === ActionType.RootConfigChanged && action.replace) {
1161 action = {
1162 ...action,
1164 };
1165 }
1166 > // Apply to state agentHostStateManager.ts
1167 > if (isRootAction(action)) {
1168 // `RootConfigChanged` can be a true no-op: the reducer merges/replaces
1169 // values even when the patch matches the current state, and re-emitting
1185 resultingState = this._rootState;
1186 }
1188 > if (isSessionAction(action)) {
1189 const sessionAction = action as SessionAction;
1190 const key = channel;
1206 }
1207 }
1209 > if (isChatAction(action)) {
1210 if (!isAhpChatChannel(channel)) {
1211 throw new Error(`[AgentHostStateManager] Chat action dispatched to non-chat channel: ${channel}, type=${action.type}`);
1224 }
1225 }
1227 > if (isChangesetAction(action)) {
1228 const changesetAction = action as ChangesetAction;
1229 const key = channel;
1243 resultingState = newState;
1244 }
1246 > if (isAnnotationsAction(action)) {
1247 const annotationsAction = action as AnnotationsAction;
1248 const key = channel;
1256 resultingState = newState;
1257 }
1259 > // Emit envelope
1260 > const envelope: ActionEnvelope = {
1261 > channel,
1262 > action,
1263 > serverSeq: ++this._serverSeq,
1264 > origin,
1265 > };
1266 >
1267 > this._logService.trace(`[AgentHostStateManager] Emitting envelope: seq=${envelope.serverSeq}, channel=${envelope.channel}, type=${action.type}${origin ? `, origin=${origin.clientId}:${origin.clientSeq}` : ''}`);
1268 > this._onDidEmitEnvelope.fire(envelope);
1269 >
1270 > return resultingState;
1271 > }
1272
1273 /**
src/vs/platform/agentHost/common/state/sessionActions.ts 4 introduced LOC · 2 ranges

Open complete file

199
200 export function isRootAction(action: StateAction): action is RootAction {
201 > return action.type.startsWith('root/'); sessionActions.ts
202 > }
203
204 export function isSessionAction(action: StateAction): action is SessionAction {
219
220 export function isAnnotationsAction(action: StateAction): action is AnnotationsAction {
221 > return action.type.startsWith('annotations/'); sessionActions.ts
222 > }