Added possibility to show the entire chat thread

This commit is contained in:
Thorsten Sommer 2024-12-31 19:31:00 +01:00
parent 45ca0cdb23
commit 3828e2ad96
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 14 additions and 1 deletions

View File

@ -35,11 +35,22 @@
<div id="@BEFORE_RESULT_DIV_ID" class="mt-3">
</div>
@if (this.ShowResult && this.resultingContentBlock is not null)
@if (this.ShowResult && !this.ShowEntireChatThread && this.resultingContentBlock is not null)
{
<ContentBlockComponent Role="@(this.resultingContentBlock.Role)" Type="@(this.resultingContentBlock.ContentType)" Time="@(this.resultingContentBlock.Time)" Content="@(this.resultingContentBlock.Content)"/>
}
@if(this.ShowResult && this.ShowEntireChatThread && this.chatThread is not null)
{
foreach (var block in this.chatThread.Blocks.OrderBy(n => n.Time))
{
@if (!block.HideFromUser)
{
<ContentBlockComponent Role="@block.Role" Type="@block.ContentType" Time="@block.Time" Content="@block.Content"/>
}
}
}
<div id="@AFTER_RESULT_DIV_ID" class="mt-3">
</div>
</ChildContent>

View File

@ -72,6 +72,8 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
protected virtual bool ShowResult => true;
protected virtual bool ShowEntireChatThread => false;
protected virtual bool AllowProfiles => true;
protected virtual bool ShowProfileSelection => true;