Extract Tasks into the ModelContextProtocol.Extensions.Tasks extension package (#1693)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Tarek Mahmoud Sayed <tarekms@ntdev.microsoft.com>
This commit is contained in:
parent
ffc557f920
commit
2ca96f548b
1 changed files with 2559 additions and 1895 deletions
|
|
@ -73,7 +73,7 @@ public abstract partial class McpClient : McpSession
|
|||
public abstract Task<ClientCompletionDetails> Completion { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Resolves input requests embedded in an <see cref="InputRequiredTaskResult"/> by dispatching
|
||||
/// Resolves input requests by dispatching
|
||||
/// each request to the appropriate registered handler.
|
||||
/// </summary>
|
||||
/// <param name="inputRequests">
|
||||
|
|
@ -82,16 +82,9 @@ public abstract partial class McpClient : McpSession
|
|||
/// </param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests.</param>
|
||||
/// <returns>A dictionary of responses keyed by the same identifiers as the input requests.</returns>
|
||||
private protected abstract ValueTask<IDictionary<string, InputResponse>> ResolveInputRequestsAsync(
|
||||
public abstract ValueTask<IDictionary<string, InputResponse>> ResolveInputRequestsAsync(
|
||||
IDictionary<string, InputRequest> inputRequests, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the maximum number of consecutive stuck-in-<see cref="McpTaskStatus.InputRequired"/> polls
|
||||
/// allowed by <see cref="PollTaskToCompletionAsync"/> before the client cancels and throws.
|
||||
/// Sourced from <see cref="McpClientOptions.MaxConsecutiveStuckPolls"/>.
|
||||
/// </summary>
|
||||
private protected abstract int MaxConsecutiveStuckPolls { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Inspects a received cacheable result (<c>tools/list</c>, <c>prompts/list</c>, <c>resources/list</c>,
|
||||
/// <c>resources/templates/list</c>, or <c>resources/read</c>) so derived clients can emit diagnostics.
|
||||
|
|
|
|||
Loading…
Reference in a new issue