Strengthen workflow automation diagnostics

This commit is contained in:
2026-05-27 12:55:19 +02:00
parent b114071957
commit 2422236ef7
8 changed files with 629 additions and 6 deletions
+18
View File
@@ -199,6 +199,22 @@ static async Task<IResult> MergeSpeakerIdentitiesAsync(
: profileOptions.SpeakerIdentification.MergeRecentIdentityAge;
return Results.Ok(await mergeService.MergeRecentIdentitiesAsync(recentAge, cancellationToken));
}
app.MapPost("/diagnostics/workflow/reload", (IConfiguration configuration) =>
Results.Ok(ReloadWorkflowConfiguration(configuration)));
static WorkflowConfigurationReloadResponse ReloadWorkflowConfiguration(IConfiguration configuration)
{
if (configuration is not IConfigurationRoot root)
{
throw new InvalidOperationException("Application configuration does not support reload.");
}
root.Reload();
var options = new MeetingAssistantOptions();
configuration.GetSection("MeetingAssistant").Bind(options);
return new WorkflowConfigurationReloadResponse(options.Automation.RulesPath);
}
app.MapPost("/recording/toggle", async (MeetingRecordingCoordinator coordinator, CancellationToken cancellationToken) =>
Results.Ok(await coordinator.ToggleAsync(cancellationToken)));
app.MapPost("/profiles/{launchProfile}/recording/toggle", async (
@@ -456,3 +472,5 @@ public sealed record AsrDiagnosticRequest(string Path, int? NumSpeakers = null);
public sealed record SummaryRetryRequest(string SummaryPath);
public sealed record SpeakerIdentityMergeDiagnosticRequest(double? RecentDays = null);
public sealed record WorkflowConfigurationReloadResponse(string? RulesPath);