@using AIStudio.Chat
@inherits MSGComponentBase
@T("Conversation")
@if (this.conversation is null)
{
}
else if (this.conversation.Thread is not { } thread)
{
@TA("AI Studio cannot open the conversation of this step. Its file may be damaged, or a newer version of AI Studio stored it. You can start the conversation over, which deletes it.")
@T("Start over")
}
else
{
@if (!this.conversation.HasVisibleMessages && !this.IsRunning)
{
@TA("The lab opens the conversation of this step with what your details already say, and asks for what is missing. You can also write first.")
@T("Start the conversation")
}
else
{
@foreach (var block in thread.Blocks)
{
@if (block is { HideFromUser: false, Content: not null })
{
}
}
}
@if (this.ProviderIssue is { } issue)
{
@issue
}
@* Laid out like the input of the chat page: sending through the icon in the field, and the tokens as its helper text. *@
@if (this.IsRunning || this.conversation.HasVisibleMessages)
{
@if (this.IsRunning)
{
@T("Stop")
}
@if (this.conversation.HasVisibleMessages)
{
@T("Start over")
}
}
}