< Summary

Information
Class: Elsa.Extensions.ServiceCollectionExtensions
Assembly: Elsa.AI.Copilot
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.AI.Copilot/Extensions/ServiceCollectionExtensions.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 5
Coverable lines: 5
Total lines: 22
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
AddCopilotAIProvider(...)0%620%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.AI.Copilot/Extensions/ServiceCollectionExtensions.cs

#LineLine coverage
 1using Elsa.AI.Abstractions.Contracts;
 2using Elsa.AI.Copilot.Adapters;
 3using Elsa.AI.Copilot.Options;
 4using Microsoft.Extensions.DependencyInjection;
 5using Microsoft.Extensions.DependencyInjection.Extensions;
 6
 7// ReSharper disable once CheckNamespace
 8namespace Elsa.Extensions;
 9
 10public static class ServiceCollectionExtensions
 11{
 12    public static IServiceCollection AddCopilotAIProvider(this IServiceCollection services, Action<CopilotOptions>? conf
 13    {
 014        if (configureOptions != null)
 015            services.Configure(configureOptions);
 16
 017        services.AddOptions<CopilotOptions>();
 018        services.TryAddEnumerable(ServiceDescriptor.Singleton<IAIProvider, CopilotProvider>());
 19
 020        return services;
 21    }
 22}