Improved the coding assistant by adding a button to delete a context (#90)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2024-08-23 11:23:36 +02:00
1 parent 3fd0d4d5c1
commit a6c5b3de23
5 files changed
+44 -1

No files matched your search

@@ -105,6 +105,18 @@ public partial class AssistantCoding : AssistantBaseCore
});
}
private ValueTask DeleteContext(int index)
{
if(this.codingContexts.Count < index + 1)
return ValueTask.CompletedTask;
this.codingContexts.RemoveAt(index);
this.form?.ResetValidation();
this.StateHasChanged();
return ValueTask.CompletedTask;
}
private async Task GetSupport()
{
await this.form!.Validate();