agentSideEffects.ts ×5

Frontier kind: Code frontier

unlabeled · c_d8f6dba98a0a

26 tests · 50172 LOC · 291 files · introduces 0 tests · 17 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges17 lines · 1 files
Tests
0 tests

Contains — complete concept membership

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

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

Open complete file

1058 */
1059 private async _handleToolReady(e: IAgentToolPendingConfirmationSignal, sessionKey: ProtocolURI, turnId: string, agent: IAgent): Promise<void> {
1060 > const approvalEvent = { agentSideEffects.ts
1061 > toolCallId: e.state.toolCallId,
1062 > session: e.chat,
1063 > permissionKind: e.permissionKind,
1064 > permissionPath: e.permissionPath,
1065 > toolInput: e.state.toolInput,
1066 > requestSandboxBypass: e.requestSandboxBypass,
1067 > };
1068 > const autoApproval = await this._permissionManager.getAutoApproval(approvalEvent, sessionKey);
1069 > const part = this._stateManager.getSessionState(sessionKey)?.activeTurn?.responseParts.find(part => part.kind === ResponsePartKind.ToolCall && part.toolCall.toolCallId === e.state.toolCallId);
1070 > const toolCall = part?.kind === ResponsePartKind.ToolCall ? part.toolCall : undefined;
1071 > if (toolCall
1072 && toolCall.status !== ToolCallStatus.Streaming
1073 && toolCall.status !== ToolCallStatus.Running
1074 > && toolCall.status !== ToolCallStatus.PendingConfirmation) { agentSideEffects.ts
1075 this._toolCallAgents.delete(`${sessionKey}:${e.state.toolCallId}`);
1076 this._logService.trace(`[AgentSideEffects] Dropping stale tool ready for ${e.state.toolCallId}: status=${toolCall.status}`);
1078 }
1079 const contributor = e.state.contributor ?? toolCall?.contributor;
1080 > let effective = e; agentSideEffects.ts
1081 > const clientShouldAutoApprove = autoApproval !== undefined
1082 && contributor?.kind === ToolCallContributorKind.Client
1083 && !!e.state.confirmationTitle;
1084 > if (clientShouldAutoApprove) { agentSideEffects.ts
1085 this._toolCallAgents.set(`${sessionKey}:${e.state.toolCallId}`, agent.id);
1086 effective = { ...e, state: { ...e.state, _meta: { ...toolCall?._meta, ...e.state._meta, ...toToolCallMeta({ autoApproveBySetting: true }) } } };
1099 this._permissionManager.createToolReadyAction(effective, sessionKey, turnId)
1100 );
1102
1103 handleAction(channel: ProtocolURI, action: StateAction, clientId?: string): void {