feat(ui): add RestoreDefaultAgentsAsync to WorkerClient

This commit is contained in:
mika kuns
2026-04-23 12:19:44 +02:00
parent 1a10e6fa09
commit 1830273a9d

View File

@@ -231,6 +231,18 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable
await _hub.InvokeAsync("RefreshAgents");
}
public async Task<SeedResultDto?> RestoreDefaultAgentsAsync()
{
try
{
return await _hub.InvokeAsync<SeedResultDto>("RestoreDefaultAgents");
}
catch
{
return null;
}
}
private async Task SeedActiveTasksAsync()
{
try
@@ -348,3 +360,4 @@ public sealed record UpdateListDto(string Id, string Name, string? WorkingDir, s
public sealed record UpdateListConfigDto(string ListId, string? Model, string? SystemPrompt, string? AgentPath);
public sealed record UpdateTaskAgentSettingsDto(string TaskId, string? Model, string? SystemPrompt, string? AgentPath);
public sealed record ListConfigDto(string? Model, string? SystemPrompt, string? AgentPath);
public sealed record SeedResultDto(int Copied, int Skipped);