mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-23 06:53:48 +00:00
24 lines
2.0 KiB
Plaintext
24 lines
2.0 KiB
Plaintext
@inherits MSGComponentBase
|
|
<MudPaper Class="pa-3 mb-3 border-dashed border rounded-lg">
|
|
<MudTextSwitch Label="@T("Read content from web?")" Disabled="@this.AgentIsRunning" Value="@this.Preselect" ValueChanged="@this.ShowWebContentReaderChanged" LabelOn="@T("Show web content options")" LabelOff="@T("Hide web content options")" />
|
|
@if (this.Preselect)
|
|
{
|
|
<MudTextSwitch Label="@T("Clean up the content with AI?")" Value="@this.PreselectContentCleanerAgent" ValueChanged="@this.UseContentCleanerAgentChanged" Disabled="@this.AgentIsRunning" LabelOn="@T("The text content cleaner, an AI task, extracts the main content, tries to remove advertisements and other clutter, and tries to turn relative links into absolute ones, so that they work.")" LabelOff="@T("No content cleaning")" />
|
|
@if (this.ContentCleanerHint is { } contentCleanerHint)
|
|
{
|
|
<MudText Typo="Typo.body2" Color="Color.Error" Class="mb-3">
|
|
@contentCleanerHint
|
|
</MudText>
|
|
}
|
|
<MudStack Row="@true" AlignItems="@AlignItems.Baseline" Class="mb-3">
|
|
<MudTextField T="string" Label="@T("URL from which to load the content")" Value="@this.URL" ValueChanged="@this.URLValueChanged" Validation="@this.ValidateURL" Adornment="Adornment.Start" AdornmentIcon="@AppIcons.LINK" Placeholder="https://..." HelperText="@TA("Loads the content from your URL. Does not work when the content is hidden behind a paywall.")" Variant="Variant.Outlined" Immediate="@true" Disabled="@this.AgentIsRunning"/>
|
|
<MudButton Disabled="@(!this.IsReady || this.AgentIsRunning)" Variant="Variant.Filled" Size="Size.Large" Color="Color.Primary" StartIcon="@AppIcons.DOWNLOAD" OnClick="@this.LoadFromWeb">
|
|
@T("Fetch")
|
|
</MudButton>
|
|
</MudStack>
|
|
@if (this.AgentIsRunning)
|
|
{
|
|
<ProcessComponent T="ReadWebContentSteps" StepValue="@this.processStep" ShowProgressAnimation="@true"/>
|
|
}
|
|
}
|
|
</MudPaper> |