mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-05 03:49:40 +00:00
Added a button to regenerate the last AI response (#247)
This commit is contained in:
1 parent
5e445f09fa
commit
b2ca49ab92
6 files changed
+109
-31
No files matched your search
@@ -7,11 +7,14 @@
|
||||
<ChildContent>
|
||||
@if (this.ChatThread is not null)
|
||||
{
|
||||
@foreach (var block in this.ChatThread.Blocks.OrderBy(n => n.Time))
|
||||
var blocks = this.ChatThread.Blocks.OrderBy(n => n.Time).ToList();
|
||||
for (var i = 0; i < blocks.Count; i++)
|
||||
{
|
||||
var block = blocks[i];
|
||||
var isLastBlock = i == blocks.Count - 1;
|
||||
@if (!block.HideFromUser)
|
||||
{
|
||||
<ContentBlockComponent Role="@block.Role" Type="@block.ContentType" Time="@block.Time" Content="@block.Content" RemoveBlockFunc="@this.RemoveBlock"/>
|
||||
<ContentBlockComponent Role="@block.Role" Type="@block.ContentType" Time="@block.Time" Content="@block.Content" RemoveBlockFunc="@this.RemoveBlock" IsLastContentBlock="@isLastBlock" RegenerateFunc="@this.RegenerateBlock" RegenerateEnabled="@(() => this.IsProviderSelected)"/>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user