protocolServerHandler.ts ×4

Frontier kind: Code frontier

unlabeled · c_d2a19a06ddc6

29 tests · 28353 LOC · 148 files · introduces 0 tests · 16 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
4 ranges16 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2655 ranges28353 lines · 148 files · Browse complete extent
All tests (intent)
29 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: 16 introduced LOC across 4 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/protocolServerHandler.ts 16 introduced LOC · 4 ranges

Open complete file

357
358 this._register(this._stateManager.onDidEmitEnvelope(envelope => {
359 > this._replayBuffer.push(envelope); protocolServerHandler.ts
360 > if (this._replayBuffer.length > REPLAY_BUFFER_CAPACITY) {
361 this._replayBuffer.shift();
362 }
363 > this._broadcastAction(envelope); protocolServerHandler.ts
364 > // A client tool call may be issued for a client that is no longer
365 > // connected — e.g. a stale stamp from a window that reloaded. The
366 > // live-disconnect path (`_handleClientDisconnected`) does not cover
367 > // these because no disconnect event fires for an already-gone
368 > // client. Detect the orphan at issuance time and arm the same
369 > // grace-period timeout so the call cannot hang forever. Calls
370 > // stamped while no client is connected are failed immediately by
371 > // the provider, so they never reach this path.
372 > if (envelope.action.type === ActionType.ChatToolCallStart || envelope.action.type === ActionType.ChatToolCallReady) {
373 if (!isAhpChatChannel(envelope.channel)) {
374 throw new Error(`[ProtocolServer] Chat tool-call action emitted on non-chat channel: ${envelope.channel}`);
1480
1481 private _broadcastAction(envelope: ActionEnvelope): void {
1482 > this._logService.trace(`[ProtocolServer] Broadcasting action: ${envelope.action.type}`); protocolServerHandler.ts
1483 > const msg: AhpServerNotification<'action'> = { jsonrpc: '2.0', method: 'action', params: envelope };
1484 > for (const record of this._clients.values()) {
1485 const client = this._getActiveClientFromRecord(record);
1486 if (client && this._isRelevantToClient(client, envelope)) {
1488 }
1489 }
1491
1492 private _broadcastNotification(notification: INotification): void {