Fix Extensions not being copied to ServerCapabilities during initialization (#1399)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
This commit is contained in:
parent
1578e940dd
commit
94aa6952eb
1 changed files with 93 additions and 3 deletions
|
|
@ -90,7 +90,7 @@ internal sealed partial class McpServerImpl : McpServer
|
|||
ConfigureTasks(options);
|
||||
ConfigureLogging(options);
|
||||
ConfigureCompletion(options);
|
||||
ConfigureExperimental(options);
|
||||
ConfigureExperimentalAndExtensions(options);
|
||||
|
||||
// Register any notification handlers that were provided.
|
||||
if (options.Handlers.NotificationHandlers is { } notificationHandlers)
|
||||
|
|
@ -138,7 +138,7 @@ internal sealed partial class McpServerImpl : McpServer
|
|||
public override string? NegotiatedProtocolVersion => _negotiatedProtocolVersion;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ServerCapabilities ServerCapabilities { get; } = new();
|
||||
public ServerCapabilities ServerCapabilities { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public override ClientCapabilities? ClientCapabilities => _clientCapabilities;
|
||||
|
|
@ -262,9 +262,10 @@ internal sealed partial class McpServerImpl : McpServer
|
|||
McpJsonUtilities.JsonContext.Default.CompleteResult);
|
||||
}
|
||||
|
||||
private void ConfigureExperimental(McpServerOptions options)
|
||||
private void ConfigureExperimentalAndExtensions(McpServerOptions options)
|
||||
{
|
||||
ServerCapabilities.Experimental = options.Capabilities?.Experimental;
|
||||
ServerCapabilities.Extensions = options.Capabilities?.Extensions;
|
||||
}
|
||||
|
||||
private void ConfigureResources(McpServerOptions options)
|
||||
|
|
|
|||
Loading…
Reference in a new issue