feat(prime): carry the action kind through the hub and validate custom prompts
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using ClaudeDo.Data.Models;
|
||||
|
||||
namespace ClaudeDo.Worker.Prime;
|
||||
|
||||
public static class PrimeScheduleValidation
|
||||
{
|
||||
/// <summary>Returns an error message, or null when the schedule is safe to persist.</summary>
|
||||
public static string? Validate(PrimeScheduleDto dto)
|
||||
{
|
||||
if (dto.Kind == PrimeActionKind.Custom && string.IsNullOrWhiteSpace(dto.PromptOverride))
|
||||
return "A custom Prime schedule needs a prompt.";
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user