mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 21:19:47 +00:00
Improved the coding assistant by adding a button to delete a context
This commit is contained in:
parent
aae5ad18db
commit
b2ed0b2619
@ -5,7 +5,8 @@
|
|||||||
@for (var contextIndex = 0; contextIndex < this.codingContexts.Count; contextIndex++)
|
@for (var contextIndex = 0; contextIndex < this.codingContexts.Count; contextIndex++)
|
||||||
{
|
{
|
||||||
var codingContext = this.codingContexts[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"/>
|
<CodingContextItem @bind-CodingContext="@codingContext"/>
|
||||||
</ExpansionPanel>
|
</ExpansionPanel>
|
||||||
}
|
}
|
||||||
|
@ -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()
|
private async Task GetSupport()
|
||||||
{
|
{
|
||||||
await this.form!.Validate();
|
await this.form!.Validate();
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# v0.8.12, build 174
|
# v0.8.12, build 174
|
||||||
- Added an e-mail writing assistant.
|
- Added an e-mail writing assistant.
|
||||||
- Added the possibility to preselect some e-mail writing assistant options.
|
- Added the possibility to preselect some e-mail writing assistant options.
|
||||||
|
- Improved the coding assistant by adding a button to delete a context.
|
||||||
- Improved chat page by scrolling to the bottom after loading (configurable; default is on).
|
- Improved chat page by scrolling to the bottom after loading (configurable; default is on).
|
||||||
- Improved all assistants to provide a button to copy their respective result to the clipboard.
|
- Improved all assistants to provide a button to copy their respective result to the clipboard.
|
||||||
- Improved the content validation for the agenda assistant.
|
- Improved the content validation for the agenda assistant.
|
||||||
|
Loading…
Reference in New Issue
Block a user