2024-12-03 14:32:38 +00:00
|
|
|
@attribute [Route(Routes.WRITER)]
|
|
|
|
@inherits MSGComponentBase
|
|
|
|
|
2025-01-21 12:40:47 +00:00
|
|
|
<div class="inner-scrolling-context">
|
2025-03-29 17:40:17 +00:00
|
|
|
<MudText Typo="Typo.h3" Class="mb-2">
|
2025-01-21 12:40:47 +00:00
|
|
|
Writer
|
|
|
|
</MudText>
|
2025-03-29 17:40:17 +00:00
|
|
|
<PreviewExperimental ApplyInnerScrollingFix="true"/>
|
2024-12-03 14:52:45 +00:00
|
|
|
|
2025-01-21 12:40:47 +00:00
|
|
|
<ProviderSelection @bind-ProviderSettings="@this.providerSettings"/>
|
2025-03-29 17:55:30 +00:00
|
|
|
<MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Download" OnClick="@(() => this.LoadTextFile())" Color="Color.Primary" Class="mb-2">
|
|
|
|
Load a text file
|
|
|
|
</MudButton>
|
2025-01-21 12:40:47 +00:00
|
|
|
<InnerScrolling>
|
|
|
|
<ChildContent>
|
2025-03-29 20:07:17 +00:00
|
|
|
@foreach (var chunk in this.chunks)
|
|
|
|
{
|
|
|
|
<MudJustifiedText Typo="Typo.body1" Class="ma-3 write-mode-chunk">
|
|
|
|
@chunk.Content
|
|
|
|
</MudJustifiedText>
|
|
|
|
}
|
2025-01-21 12:40:47 +00:00
|
|
|
</ChildContent>
|
|
|
|
<FooterContent>
|
|
|
|
@if (this.isStreaming)
|
|
|
|
{
|
|
|
|
<MudProgressLinear Color="Color.Primary" Indeterminate="true" Class="mb-6" />
|
|
|
|
}
|
|
|
|
</FooterContent>
|
|
|
|
</InnerScrolling>
|
|
|
|
</div>
|