Remove unneeded CliPath prop

This commit is contained in:
Sipke Schoorstra 2026-06-08 23:35:31 +02:00
parent c66f9aed45
commit 20c1064ca5
No known key found for this signature in database
GPG key ID: 5C10502B28A4268F
4 changed files with 11 additions and 9 deletions

View file

@ -11,6 +11,10 @@
<PackageReference Include="OpenTelemetry.Instrumentation.Http" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\modules\Elsa.AI.Abstractions\Elsa.AI.Abstractions.csproj" />
<ProjectReference Include="..\..\modules\Elsa.AI.Copilot\Elsa.AI.Copilot.csproj" />
<ProjectReference Include="..\..\modules\Elsa.AI.Host\Elsa.AI.Host.csproj" />
<ProjectReference Include="..\..\modules\Elsa.AI.Persistence.EFCore\Elsa.AI.Persistence.EFCore.csproj" />
<ProjectReference Include="..\..\modules\Elsa.Dashboard.Api\Elsa.Dashboard.Api.csproj" />
<ProjectReference Include="..\..\modules\Elsa.Diagnostics.ConsoleLogs.Dashboard\Elsa.Diagnostics.ConsoleLogs.Dashboard.csproj" />
<ProjectReference Include="..\..\modules\Elsa.Diagnostics.ConsoleLogs\Elsa.Diagnostics.ConsoleLogs.csproj" />

View file

@ -63,6 +63,9 @@
"WorkflowRuntimeDashboard": {},
"ConsoleLogsDashboard": {},
"StructuredLogsDashboard": {},
"CopilotAI": {},
"AI": {},
"AIPersistence": {},
"SqliteAlterationsPersistence": {
"ConnectionString": "Data Source=elsa_workflows.db;Cache=Shared"
},

View file

@ -15,10 +15,4 @@ public class CopilotOptions
public string? Model { get; set; }
public string? ReasoningEffort { get; set; }
public string? ProviderName { get; set; } = "copilot";
public string CliPath
{
get => RuntimePath ?? "copilot";
set => RuntimePath = value;
}
}

View file

@ -16,10 +16,10 @@ namespace Elsa.AI.Copilot.ShellFeatures;
public class CopilotAIFeature : IShellFeature
{
private static readonly CopilotOptions DefaultOptions = new();
public string CliPath { get; set; } = DefaultOptions.CliPath;
public string? RuntimePath { get; set; } = DefaultOptions.RuntimePath;
public string? RuntimeUrl { get; set; } = DefaultOptions.RuntimeUrl;
public ICollection<string> RuntimeArguments { get; set; } = [];
public string? WorkingDirectory { get; set; } = DefaultOptions.WorkingDirectory;
public string? BaseDirectory { get; set; } = DefaultOptions.BaseDirectory;
public string? GitHubToken { get; set; } = DefaultOptions.GitHubToken;
@ -35,8 +35,9 @@ public class CopilotAIFeature : IShellFeature
private void ConfigureOptions(CopilotOptions options)
{
options.RuntimePath = RuntimePath ?? CliPath;
options.RuntimePath = RuntimePath;
options.RuntimeUrl = RuntimeUrl;
options.RuntimeArguments = RuntimeArguments;
options.WorkingDirectory = WorkingDirectory;
options.BaseDirectory = BaseDirectory;
options.GitHubToken = GitHubToken;