Fix WithMeta + WithProgress causing tool invocation failure (#1464)
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
cf63f0e42b
commit
49bf17077d
1 changed files with 97 additions and 2 deletions
|
|
@ -877,7 +877,7 @@ public abstract partial class McpClient : McpSession
|
|||
return default;
|
||||
}).ConfigureAwait(false);
|
||||
|
||||
JsonObject metaWithProgress = meta is not null ? new(meta) : [];
|
||||
JsonObject metaWithProgress = meta is not null ? (JsonObject)meta.DeepClone() : [];
|
||||
metaWithProgress["progressToken"] = progressToken.ToString();
|
||||
|
||||
return await CallToolAsync(
|
||||
|
|
@ -1007,7 +1007,7 @@ public abstract partial class McpClient : McpSession
|
|||
return default;
|
||||
}).ConfigureAwait(false);
|
||||
|
||||
JsonObject metaWithProgress = meta is not null ? new(meta) : [];
|
||||
JsonObject metaWithProgress = meta is not null ? (JsonObject)meta.DeepClone() : [];
|
||||
metaWithProgress["progressToken"] = progressToken.ToString();
|
||||
|
||||
var result = await SendRequestAsync(
|
||||
|
|
|
|||
Loading…
Reference in a new issue