mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-15 11:48:27 +00:00
Moved the chats of the BeyondFacts Lab to the embedded chat of assistants (#1203)
This commit is contained in:
1 parent
dc97db256e
commit
cb54ad297d
27 files changed
+1023
-743
No files matched your search
@@ -1,15 +1,30 @@
|
||||
@using AIStudio.Chat
|
||||
@using AIStudio.Chat.Embedded
|
||||
@inherits MSGComponentBase
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(this.Heading))
|
||||
{
|
||||
<MudText Typo="Typo.h6" Class="mt-6 mb-2">@this.Heading</MudText>
|
||||
}
|
||||
@if (this.conversation is null)
|
||||
{
|
||||
<MudProgressLinear Color="Color.Primary" Indeterminate="true" Class="mb-3"/>
|
||||
}
|
||||
else if (this.conversation.Thread is not { } thread)
|
||||
{
|
||||
<MudAlert Severity="Severity.Error" Variant="Variant.Outlined" Class="mb-3">
|
||||
@T("AI Studio cannot open this conversation. Its file may be damaged, or a newer version of AI Studio stored it.")
|
||||
</MudAlert>
|
||||
@if (this.CanReset)
|
||||
{
|
||||
<MudAlert Severity="Severity.Error" Variant="Variant.Outlined" Class="mb-3">
|
||||
@TA("AI Studio cannot open this conversation. Its file may be damaged, or a newer version of AI Studio stored it. You can start the conversation over, which deletes it.")
|
||||
</MudAlert>
|
||||
<MudButton StartIcon="@AppIcons.RESET" Color="Color.Error" OnClick="@this.ResetAsync">@T("Start over")</MudButton>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudAlert Severity="Severity.Error" Variant="Variant.Outlined" Class="mb-3">
|
||||
@T("AI Studio cannot open this conversation. Its file may be damaged, or a newer version of AI Studio stored it.")
|
||||
</MudAlert>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -18,6 +33,15 @@ else
|
||||
<MudText Typo="Typo.body2" Class="mb-3">@this.Introduction</MudText>
|
||||
}
|
||||
|
||||
@if (!this.IsReadOnly && EmbeddedChatOpening.OffersStart(this.StartRequest, this.conversation))
|
||||
{
|
||||
<div class="mb-4">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@AppIcons.CHAT" OnClick="@this.StartAsync" Disabled="@(!this.CanSend)">
|
||||
@T("Start the conversation")
|
||||
</MudButton>
|
||||
</div>
|
||||
}
|
||||
|
||||
@foreach (var block in thread.Blocks)
|
||||
{
|
||||
@if (block is { HideFromUser: false, Content: not null })
|
||||
@@ -50,7 +74,7 @@ else
|
||||
OnKeyUp="@this.InputKeyEventAsync"
|
||||
UserAttributes="@this.inputAttributes"
|
||||
HelperText="@this.TokenText"
|
||||
Class="mt-2"
|
||||
Class="@this.InputClass"
|
||||
Disabled="@(!this.CanSend)"/>
|
||||
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1" Class="mt-2">
|
||||
@@ -62,6 +86,10 @@ else
|
||||
{
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Error" StartIcon="@AppIcons.STOP" OnClick="@this.CancelAsync">@T("Stop")</MudButton>
|
||||
}
|
||||
@if (this.CanReset && this.conversation.HasVisibleMessages)
|
||||
{
|
||||
<MudButton StartIcon="@AppIcons.RESET" OnClick="@this.ResetAsync" Disabled="@this.IsRunning">@T("Start over")</MudButton>
|
||||
}
|
||||
</MudStack>
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user