feat: cache same-turn approval selections

Add an AlwaysApprove flag to resolve-approval commands and cache
approved tool keys for the current request so repeated runtime
permissions are auto-approved immediately within the same turn.
The cache is cleared when the turn finishes to avoid leaking across
future requests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David Kaya
2026-03-27 21:24:55 +01:00
co-authored by Copilot
parent 3ec69d990b
commit f04e3b9dcc
5 changed files with 235 additions and 5 deletions
@@ -111,6 +111,10 @@ public sealed class CopilotWorkflowRunner : ITurnWorkflowRunner
await onExitPlanMode(exitPlanModeEvent).ConfigureAwait(false);
return state.FinalizeCompletedMessages();
}
finally
{
_approvalCoordinator.ClearRequestApprovals(command.RequestId);
}
}
private static async Task EmitPendingActivityEventsAsync(