Add initial task extension conformance coverage (#1734)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7c99928c-a943-49f4-9a63-8b04a0e4d18b
This commit is contained in:
parent
f7c61fafdb
commit
83523b0a42
1 changed files with 463 additions and 43 deletions
|
|
@ -592,7 +592,8 @@ internal sealed partial class StreamableHttpClientSessionTransport : TransportBa
|
|||
headers.Add(McpHttpHeaders.Method, method);
|
||||
|
||||
// Add Mcp-Name header for methods that target a specific named resource
|
||||
string? name = message switch
|
||||
#pragma warning disable MCPEXP002
|
||||
string? name = message.Context?.RoutingName ?? message switch
|
||||
{
|
||||
JsonRpcRequest { Method: RequestMethods.ToolsCall or RequestMethods.PromptsGet } request
|
||||
=> GetParamsStringProperty(request.Params, "name"),
|
||||
|
|
@ -600,6 +601,7 @@ internal sealed partial class StreamableHttpClientSessionTransport : TransportBa
|
|||
=> GetParamsStringProperty(request.Params, "uri"),
|
||||
_ => null,
|
||||
};
|
||||
#pragma warning restore MCPEXP002
|
||||
|
||||
if (name is not null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue