fix: Increase MethodGroup type precision

* Fixes stackoverflow when calling InMemoryRutnime.RegisterAgentFactoryAsync()
This commit is contained in:
Jacob Alber 2025-01-27 17:56:38 -05:00 committed by Jack Gerrits
parent d9e0013975
commit c930251ebc

View File

@ -176,7 +176,7 @@ public sealed class InProcessRuntime : IAgentRuntime
}
public ValueTask<AgentType> RegisterAgentFactoryAsync<TAgent>(AgentType type, Func<AgentId, IAgentRuntime, ValueTask<TAgent>> factoryFunc) where TAgent : IHostableAgent
=> this.RegisterAgentFactoryAsync(type, async (agentId, runtime) => await factoryFunc(agentId, runtime));
=> this.RegisterAgentFactoryAsync(type, async ValueTask<IHostableAgent> (agentId, runtime) => await factoryFunc(agentId, runtime));
public ValueTask<AgentType> RegisterAgentFactoryAsync(AgentType type, Func<AgentId, IAgentRuntime, ValueTask<IHostableAgent>> factoryFunc)
{