SSE ClientTransport fixes and tests (#27)

SSE fixes
Additional SSE integration tests with everything server
This commit is contained in:
Peder Holdgaard Pedersen 2025-02-27 21:14:20 +01:00 • committed by GitHub
commit 30f3f192ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 381 additions and 81 deletions

View file

@ -9,10 +9,10 @@
<PropertyGroup>
<!-- license and package properties -->
<PackageId>McpDotNet.Extensions.AI</PackageId>
<Version>1.0.1.1</Version>
<Version>1.0.1.3</Version>
<Authors>PederHP</Authors>
<Description>Microsoft.Extensions.AI integration for the Model Context Protocol (MCP). Enables seamless use of MCP tools as AI functions in any IChatClient implementation.</Description>
<PackageProjectUrl>https://github.com/PederHP/mcpdotnet/src/McpDotNet.Extensions.AI</PackageProjectUrl>
<PackageProjectUrl>https://github.com/PederHP/mcpdotnet/tree/main/src/McpDotNet.Extensions.AI</PackageProjectUrl>
<RepositoryUrl>https://github.com/PederHP/mcpdotnet</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>mcp;ai;microsoft-extensions-ai;chatclient;llm</PackageTags>
@ -26,6 +26,10 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="/" />
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="McpDotNet.Extensions.AI.Tests" />
</ItemGroup>
@ -33,7 +37,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.3.0-preview.1.25114.11" />
<PackageReference Include="Microsoft.Extensions.AI" Version="9.3.0-preview.1.25114.11" />
<PackageReference Include="mcpdotnet" Version="1.0.1.1" />
<PackageReference Include="mcpdotnet" Version="1.0.1.3" />
</ItemGroup>
</Project>

View file

@ -20,7 +20,7 @@ public class McpSessionScope : IAsyncDisposable
/// <summary>
/// The list of tools exposed by the servers in this scope.
/// </summary>
public IList<AITool> Tools { get; private set; }
public IList<AITool> Tools { get; private set; } = [];
/// <summary>
/// The server instructions provided by the servers in this scope.
@ -84,7 +84,7 @@ public class McpSessionScope : IAsyncDisposable
return client;
}
/// </inheritdoc>
/// <inheritdoc/>
public async ValueTask DisposeAsync()
{
if (_disposed) return;