949
950
private _completeActiveTurn(): void {
952
>
if (!turn) {
953
return;
954
}
956
>
// Emit the restricted per-turn tool-call aggregate before the turn is cleared. Main agent
957
>
// only: `_appliedSnapshot.tools` and this turn's accumulator describe the main session's turn.
958
>
// No-ops (in the reporter) when the turn made no tool calls.
959
>
this._telemetryReporter.toolCallDetails({
960
>
session: this.sessionUri.toString(),
961
>
turnId: turn.id,
962
>
model: turn.lastModel,
963
>
responseType: 'success',
964
>
toolCounts: Object.fromEntries(turn.toolCounts),
965
>
availableTools: this._appliedSnapshot.tools.map(tool => tool.name),
966
>
numRequests: turn.toolCallRounds,
967
>
totalToolCalls: turn.totalToolCalls,
968
>
parallelToolCallRounds: turn.parallelToolCallRounds,
969
>
parallelToolCallsTotal: turn.parallelToolCallsTotal,
970
>
});
971
>
this._emitAction({
972
>
type: ActionType.ChatTurnComplete,
973
>
turnId: turn.id,
974
>
duration: turn.duration,
975
>
});
976
>
this._currentTurn = undefined;
977
>
}
978
979
private _getEditFilePaths(parameters: unknown): string[] {