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

@@ -5,7 +5,8 @@
@for (var contextIndex = 0; contextIndex < this.codingContexts.Count; contextIndex++)
{
var codingContext = this.codingContexts[contextIndex];
<ExpansionPanel HeaderText="@codingContext.Id" HeaderIcon="@Icons.Material.Filled.Code">
var index = contextIndex;
<ExpansionPanel HeaderText="@codingContext.Id" HeaderIcon="@Icons.Material.Filled.Code" ShowEndButton="@true" EndButtonColor="Color.Error" EndButtonIcon="@Icons.Material.Filled.Delete" EndButtonTooltip="Delete context" EndButtonClickAsync="@(() => this.DeleteContext(index))">
<CodingContextItem @bind-CodingContext="@codingContext"/>
</ExpansionPanel>
}