mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-12-03 03:54:24 +00:00
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
24 lines
1.9 KiB
Plaintext
24 lines
1.9 KiB
Plaintext
@attribute [Route(Routes.ASSISTANT_REWRITE)]
|
|
@inherits DocumentAssistantBase<AIStudio.Dialogs.Settings.SettingsDialogRewrite>
|
|
|
|
@if (this.Mode is AssistantContentMode.UNDECIDED)
|
|
{
|
|
<AssistantModeChoice TMode="AssistantContentMode" Options="@this.ModeOptions" ModeChosen="@this.ChooseMode"/>
|
|
}
|
|
else
|
|
{
|
|
@if (this.Mode is AssistantContentMode.DOCUMENT)
|
|
{
|
|
<SelectDocument @bind-Document="@this.DocumentPath" DialogTitle="@this.DocumentDialogTitle" Disabled="@this.IsProcessing"/>
|
|
}
|
|
else
|
|
{
|
|
<ReadFileContent Text="@T("Load text from file")" @bind-FileContent="@this.inputText" EnableDragDrop="true" CatchAllDocuments="true"/>
|
|
<MudTextField T="string" @bind-Value="@this.inputText" Validation="@this.ValidateText" DebounceInterval="@TextFieldDefaults.VALIDATION_DEBOUNCE_MILLISECONDS" AdornmentIcon="@AppIcons.INPUT_TEXT" Adornment="Adornment.Start" Label="@TA("Your input to improve")" Variant="Variant.Outlined" Lines="6" Sizing="InputSizing.Auto" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
|
}
|
|
|
|
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelectingOptional)" @bind-Value="@this.selectedTargetLanguage" Icon="@AppIcons.LANGUAGE" Label="@T("Language")" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="@T("Custom language")" />
|
|
<EnumSelection T="WritingStyles" NameFunc="@(style => style.Name)" @bind-Value="@this.selectedWritingStyle" Icon="@AppIcons.WRITING_STYLE" Label="@T("Writing style")" AllowOther="@false" />
|
|
<EnumSelection T="SentenceStructure" NameFunc="@(voice => voice.Name)" @bind-Value="@this.selectedSentenceStructure" Icon="@AppIcons.SENTENCE_STRUCTURE" Label="@T("Sentence structure")" />
|
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
|
} |