You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1370903
Browse filesBrowse the repository at this point in the historyBrowse files
// Set only once the stream has run to completion, so that any abnormal end - an exception from the inner
@@ -177,41 +186,63 @@ private bool TryGetSession([NotNullWhen(true)] out AgentSession? session)
177
186
[LoggerMessage(LogLevel.Warning,"ApprovalNotRequiredFunctionBypassingChatClient was invoked without an active agent run context or session. Approval-not-required function bypassing is skipped and all approval requests are surfaced to the caller. Invoke the chat client through AIAgent.RunAsync or AIAgent.RunStreamingAsync to enable bypassing.")]
[LoggerMessage(LogLevel.Warning,"A tool call to '{ToolName}' was stored for automatic approval on a previous turn, but the tool available under that name now requires approval or is no longer available. The stored approval is discarded and the call is rejected rather than executed.")]
Copy file name to clipboardExpand all lines: dotnet/src/Microsoft.Agents.AI/ChatClient/ApprovalRequirement.cs
+36-6Lines changed: 36 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -31,19 +31,49 @@ internal static class ApprovalRequirement
31
31
/// </summary>
32
32
/// <param name="client">The decorator requesting the set, used to locate the <see cref="FunctionInvokingChatClient"/> below it in the pipeline.</param>
33
33
/// <param name="options">The options for the current request, if any.</param>
34
+
/// <remarks>
35
+
/// Only executable functions are checked for duplicate names. A declaration may share a name with its
36
+
/// implementation, and service-hosted tools are handled by the provider.
37
+
/// </remarks>
38
+
/// <exception cref="InvalidOperationException">Two different executable functions available to the request share a name.</exception>
[LoggerMessage(LogLevel.Warning,"A call to '{ToolName}' was bypassed for execution on a previous turn, but the tool available under that name now requires approval or is no longer available. The call is rejected rather than executed.")]
0 commit comments