136
137
async reportEnd(context: IAgentHostRestrictedTelemetryContext, sessionUri: string, telemetryMessageId: string, workingDirectory: URI | undefined, baseBranch: string | undefined, isContextCurrent: () => boolean): Promise<void> {
139
>
if (!begin) {
140
return;
141
}
143
>
const beginResult = await begin;
144
>
if (beginResult === 'success' || beginResult === 'noChanges') {
145
await this._captureSafely(context, sessionUri, telemetryMessageId, 'end', workingDirectory, baseBranch, isContextCurrent);
146
}
148
>
this._beginResults.delete(telemetryMessageId);
149
>
}
150
>
}
151
152
clearTurn(telemetryMessageId: string): void {