< Summary

Information
Class: NexusLabs.Needlr.AgentFramework.AgentFrameworkConfigureOptions
Assembly: NexusLabs.Needlr.AgentFramework
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework/AgentFrameworkConfigureOptions.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 29
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_ServiceProvider()100%11100%
get_ChatClientFactory()100%11100%
get_DefaultInstructions()100%11100%

File(s)

/home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework/AgentFrameworkConfigureOptions.cs

#LineLine coverage
 1using Microsoft.Extensions.AI;
 2
 3namespace NexusLabs.Needlr.AgentFramework;
 4
 5/// <summary>
 6/// Factory-level configuration options passed to
 7/// <see cref="AgentFrameworkSyringeExtensions.Configure"/> callbacks.
 8/// </summary>
 9public sealed class AgentFrameworkConfigureOptions
 10{
 11    /// <summary>
 12    /// Gets the service provider from the DI container.
 13    /// Use this to resolve configuration or services needed to create the <see cref="IChatClient"/>.
 14    /// </summary>
 5415    public required IServiceProvider ServiceProvider { get; init; }
 16
 17    /// <summary>
 18    /// Gets or sets a factory that creates the <see cref="IChatClient"/> used by all agents
 19    /// built from this factory. When <see langword="null"/>,
 20    /// <see cref="IChatClient"/> is resolved from the DI container.
 21    /// </summary>
 15722    public Func<IServiceProvider, IChatClient>? ChatClientFactory { get; set; }
 23
 24    /// <summary>
 25    /// Gets or sets the default system instructions applied to all agents
 26    /// unless overridden via <see cref="AgentFactoryOptions.Instructions"/>.
 27    /// </summary>
 4028    public string? DefaultInstructions { get; set; }
 29}