Added generate method to trigger validation

This commit is contained in:
Thorsten Sommer 2024-12-04 21:23:02 +01:00
parent 4781fc68fe
commit 898d1a0477
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -26,7 +26,7 @@ public partial class AssistantEDI : AssistantBaseCore
protected override string SubmitText => "Create the EDI server";
protected override Func<Task> SubmitAction => () => Task.CompletedTask;
protected override Func<Task> SubmitAction => this.GenerateServer;
protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
{
@ -124,4 +124,11 @@ public partial class AssistantEDI : AssistantBaseCore
return $"You have selected {selectedValues.Count} authentication methods";
}
private async Task GenerateServer()
{
await this.form!.Validate();
if (!this.inputIsValid)
return;
}
}