mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-04-17 16:21:37 +00:00
Refactored property and field casing for consistency (#740)
This commit is contained in:
parent
312b3cf79d
commit
8d1d04cb0a
@ -52,4 +52,4 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelecting())" @bind-Value="@this.selectedTargetLanguage" ValidateSelection="@this.ValidateTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="@T("Target language")" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="@T("Custom target language")" />
|
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelecting())" @bind-Value="@this.selectedTargetLanguage" ValidateSelection="@this.ValidateTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="@T("Target language")" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="@T("Custom target language")" />
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
@ -323,8 +323,8 @@ public partial class AssistantAgenda : AssistantBaseCore<SettingsDialogAgenda>
|
|||||||
|
|
||||||
private async Task CreateAgenda()
|
private async Task CreateAgenda()
|
||||||
{
|
{
|
||||||
await this.form!.Validate();
|
await this.Form!.Validate();
|
||||||
if (!this.inputIsValid)
|
if (!this.InputIsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.CreateChatThread();
|
this.CreateChatThread();
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
<InnerScrolling>
|
<InnerScrolling>
|
||||||
<ChildContent>
|
<ChildContent>
|
||||||
<MudForm @ref="@(this.form)" @bind-IsValid="@(this.inputIsValid)" @bind-Errors="@(this.inputIssues)" FieldChanged="@this.TriggerFormChange" Class="pr-2">
|
<MudForm @ref="@(this.Form)" @bind-IsValid="@(this.InputIsValid)" @bind-Errors="@(this.inputIssues)" FieldChanged="@this.TriggerFormChange" Class="pr-2">
|
||||||
<MudText Typo="Typo.body1" Align="Align.Justify" Class="mb-2">
|
<MudText Typo="Typo.body1" Align="Align.Justify" Class="mb-2">
|
||||||
@this.Description
|
@this.Description
|
||||||
</MudText>
|
</MudText>
|
||||||
@ -41,7 +41,7 @@
|
|||||||
<MudButton Disabled="@(this.SubmitDisabled || this.isProcessing)" Variant="Variant.Filled" OnClick="@(async () => await this.Start())" Style="@this.SubmitButtonStyle">
|
<MudButton Disabled="@(this.SubmitDisabled || this.isProcessing)" Variant="Variant.Filled" OnClick="@(async () => await this.Start())" Style="@this.SubmitButtonStyle">
|
||||||
@this.SubmitText
|
@this.SubmitText
|
||||||
</MudButton>
|
</MudButton>
|
||||||
@if (this.isProcessing && this.cancellationTokenSource is not null)
|
@if (this.isProcessing && this.CancellationTokenSource is not null)
|
||||||
{
|
{
|
||||||
<MudTooltip Text="@TB("Stop generation")">
|
<MudTooltip Text="@TB("Stop generation")">
|
||||||
<MudIconButton Variant="Variant.Filled" Icon="@Icons.Material.Filled.Stop" Color="Color.Error" OnClick="@(async () => await this.CancelStreaming())"/>
|
<MudIconButton Variant="Variant.Filled" Icon="@Icons.Material.Filled.Stop" Color="Color.Error" OnClick="@(async () => await this.CancelStreaming())"/>
|
||||||
@ -68,9 +68,9 @@
|
|||||||
<ContentBlockComponent Role="@(this.resultingContentBlock.Role)" Type="@(this.resultingContentBlock.ContentType)" Time="@(this.resultingContentBlock.Time)" Content="@this.resultingContentBlock.Content"/>
|
<ContentBlockComponent Role="@(this.resultingContentBlock.Role)" Type="@(this.resultingContentBlock.ContentType)" Time="@(this.resultingContentBlock.Time)" Content="@this.resultingContentBlock.Content"/>
|
||||||
}
|
}
|
||||||
|
|
||||||
@if(this.ShowResult && this.ShowEntireChatThread && this.chatThread is not null)
|
@if(this.ShowResult && this.ShowEntireChatThread && this.ChatThread is not null)
|
||||||
{
|
{
|
||||||
foreach (var block in this.chatThread.Blocks.OrderBy(n => n.Time))
|
foreach (var block in this.ChatThread.Blocks.OrderBy(n => n.Time))
|
||||||
{
|
{
|
||||||
@if (block is { HideFromUser: false, Content: not null })
|
@if (block is { HideFromUser: false, Content: not null })
|
||||||
{
|
{
|
||||||
@ -155,12 +155,12 @@
|
|||||||
|
|
||||||
@if (this.SettingsManager.ConfigurationData.LLMProviders.ShowProviderConfidence)
|
@if (this.SettingsManager.ConfigurationData.LLMProviders.ShowProviderConfidence)
|
||||||
{
|
{
|
||||||
<ConfidenceInfo Mode="PopoverTriggerMode.BUTTON" LLMProvider="@this.providerSettings.UsedLLMProvider"/>
|
<ConfidenceInfo Mode="PopoverTriggerMode.BUTTON" LLMProvider="@this.ProviderSettings.UsedLLMProvider"/>
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (this.AllowProfiles && this.ShowProfileSelection)
|
@if (this.AllowProfiles && this.ShowProfileSelection)
|
||||||
{
|
{
|
||||||
<ProfileSelection MarginLeft="" @bind-CurrentProfile="@this.currentProfile"/>
|
<ProfileSelection MarginLeft="" @bind-CurrentProfile="@this.CurrentProfile"/>
|
||||||
}
|
}
|
||||||
|
|
||||||
<MudSpacer />
|
<MudSpacer />
|
||||||
|
|||||||
@ -111,14 +111,14 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
|
|
||||||
protected virtual bool HasSettingsPanel => typeof(TSettings) != typeof(NoSettingsPanel);
|
protected virtual bool HasSettingsPanel => typeof(TSettings) != typeof(NoSettingsPanel);
|
||||||
|
|
||||||
protected AIStudio.Settings.Provider providerSettings = Settings.Provider.NONE;
|
protected AIStudio.Settings.Provider ProviderSettings = Settings.Provider.NONE;
|
||||||
protected MudForm? form;
|
protected MudForm? Form;
|
||||||
protected bool inputIsValid;
|
protected bool InputIsValid;
|
||||||
protected Profile currentProfile = Profile.NO_PROFILE;
|
protected Profile CurrentProfile = Profile.NO_PROFILE;
|
||||||
protected ChatTemplate currentChatTemplate = ChatTemplate.NO_CHAT_TEMPLATE;
|
protected ChatTemplate CurrentChatTemplate = ChatTemplate.NO_CHAT_TEMPLATE;
|
||||||
protected ChatThread? chatThread;
|
protected ChatThread? ChatThread;
|
||||||
protected IContent? lastUserPrompt;
|
protected IContent? LastUserPrompt;
|
||||||
protected CancellationTokenSource? cancellationTokenSource;
|
protected CancellationTokenSource? CancellationTokenSource;
|
||||||
|
|
||||||
private readonly Timer formChangeTimer = new(TimeSpan.FromSeconds(1.6));
|
private readonly Timer formChangeTimer = new(TimeSpan.FromSeconds(1.6));
|
||||||
|
|
||||||
@ -147,9 +147,9 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.MightPreselectValues();
|
this.MightPreselectValues();
|
||||||
this.providerSettings = this.SettingsManager.GetPreselectedProvider(this.Component);
|
this.ProviderSettings = this.SettingsManager.GetPreselectedProvider(this.Component);
|
||||||
this.currentProfile = this.SettingsManager.GetPreselectedProfile(this.Component);
|
this.CurrentProfile = this.SettingsManager.GetPreselectedProfile(this.Component);
|
||||||
this.currentChatTemplate = this.SettingsManager.GetPreselectedChatTemplate(this.Component);
|
this.CurrentChatTemplate = this.SettingsManager.GetPreselectedChatTemplate(this.Component);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async Task OnParametersSetAsync()
|
protected override async Task OnParametersSetAsync()
|
||||||
@ -165,7 +165,7 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
// Reset the validation when not editing and on the first render.
|
// Reset the validation when not editing and on the first render.
|
||||||
// We don't want to show validation errors when the user opens the dialog.
|
// We don't want to show validation errors when the user opens the dialog.
|
||||||
if(firstRender)
|
if(firstRender)
|
||||||
this.form?.ResetValidation();
|
this.Form?.ResetValidation();
|
||||||
|
|
||||||
await base.OnAfterRenderAsync(firstRender);
|
await base.OnAfterRenderAsync(firstRender);
|
||||||
}
|
}
|
||||||
@ -174,7 +174,7 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
|
|
||||||
private string TB(string fallbackEN) => this.T(fallbackEN, typeof(AssistantBase<TSettings>).Namespace, nameof(AssistantBase<TSettings>));
|
private string TB(string fallbackEN) => this.T(fallbackEN, typeof(AssistantBase<TSettings>).Namespace, nameof(AssistantBase<TSettings>));
|
||||||
|
|
||||||
private string SubmitButtonStyle => this.SettingsManager.ConfigurationData.LLMProviders.ShowProviderConfidence ? this.providerSettings.UsedLLMProvider.GetConfidence(this.SettingsManager).StyleBorder(this.SettingsManager) : string.Empty;
|
private string SubmitButtonStyle => this.SettingsManager.ConfigurationData.LLMProviders.ShowProviderConfidence ? this.ProviderSettings.UsedLLMProvider.GetConfidence(this.SettingsManager).StyleBorder(this.SettingsManager) : string.Empty;
|
||||||
|
|
||||||
private IReadOnlyList<Tools.Components> VisibleSendToAssistants => Enum.GetValues<AIStudio.Tools.Components>()
|
private IReadOnlyList<Tools.Components> VisibleSendToAssistants => Enum.GetValues<AIStudio.Tools.Components>()
|
||||||
.Where(this.CanSendToAssistant)
|
.Where(this.CanSendToAssistant)
|
||||||
@ -191,12 +191,12 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
|
|
||||||
private async Task Start()
|
private async Task Start()
|
||||||
{
|
{
|
||||||
using (this.cancellationTokenSource = new())
|
using (this.CancellationTokenSource = new())
|
||||||
{
|
{
|
||||||
await this.SubmitAction();
|
await this.SubmitAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.cancellationTokenSource = null;
|
this.CancellationTokenSource = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TriggerFormChange(FormFieldChangedEventArgs _)
|
private void TriggerFormChange(FormFieldChangedEventArgs _)
|
||||||
@ -223,7 +223,7 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
{
|
{
|
||||||
Array.Resize(ref this.inputIssues, this.inputIssues.Length + 1);
|
Array.Resize(ref this.inputIssues, this.inputIssues.Length + 1);
|
||||||
this.inputIssues[^1] = issue;
|
this.inputIssues[^1] = issue;
|
||||||
this.inputIsValid = false;
|
this.InputIsValid = false;
|
||||||
this.StateHasChanged();
|
this.StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -233,17 +233,17 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
protected void ClearInputIssues()
|
protected void ClearInputIssues()
|
||||||
{
|
{
|
||||||
this.inputIssues = [];
|
this.inputIssues = [];
|
||||||
this.inputIsValid = true;
|
this.InputIsValid = true;
|
||||||
this.StateHasChanged();
|
this.StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void CreateChatThread()
|
protected void CreateChatThread()
|
||||||
{
|
{
|
||||||
this.chatThread = new()
|
this.ChatThread = new()
|
||||||
{
|
{
|
||||||
IncludeDateTime = false,
|
IncludeDateTime = false,
|
||||||
SelectedProvider = this.providerSettings.Id,
|
SelectedProvider = this.ProviderSettings.Id,
|
||||||
SelectedProfile = this.AllowProfiles ? this.currentProfile.Id : Profile.NO_PROFILE.Id,
|
SelectedProfile = this.AllowProfiles ? this.CurrentProfile.Id : Profile.NO_PROFILE.Id,
|
||||||
SystemPrompt = this.SystemPrompt,
|
SystemPrompt = this.SystemPrompt,
|
||||||
WorkspaceId = Guid.Empty,
|
WorkspaceId = Guid.Empty,
|
||||||
ChatId = Guid.NewGuid(),
|
ChatId = Guid.NewGuid(),
|
||||||
@ -255,11 +255,11 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
protected Guid CreateChatThread(Guid workspaceId, string name)
|
protected Guid CreateChatThread(Guid workspaceId, string name)
|
||||||
{
|
{
|
||||||
var chatId = Guid.NewGuid();
|
var chatId = Guid.NewGuid();
|
||||||
this.chatThread = new()
|
this.ChatThread = new()
|
||||||
{
|
{
|
||||||
IncludeDateTime = false,
|
IncludeDateTime = false,
|
||||||
SelectedProvider = this.providerSettings.Id,
|
SelectedProvider = this.ProviderSettings.Id,
|
||||||
SelectedProfile = this.AllowProfiles ? this.currentProfile.Id : Profile.NO_PROFILE.Id,
|
SelectedProfile = this.AllowProfiles ? this.CurrentProfile.Id : Profile.NO_PROFILE.Id,
|
||||||
SystemPrompt = this.SystemPrompt,
|
SystemPrompt = this.SystemPrompt,
|
||||||
WorkspaceId = workspaceId,
|
WorkspaceId = workspaceId,
|
||||||
ChatId = chatId,
|
ChatId = chatId,
|
||||||
@ -272,27 +272,27 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
|
|
||||||
protected virtual void ResetProviderAndProfileSelection()
|
protected virtual void ResetProviderAndProfileSelection()
|
||||||
{
|
{
|
||||||
this.providerSettings = this.SettingsManager.GetPreselectedProvider(this.Component);
|
this.ProviderSettings = this.SettingsManager.GetPreselectedProvider(this.Component);
|
||||||
this.currentProfile = this.SettingsManager.GetPreselectedProfile(this.Component);
|
this.CurrentProfile = this.SettingsManager.GetPreselectedProfile(this.Component);
|
||||||
this.currentChatTemplate = this.SettingsManager.GetPreselectedChatTemplate(this.Component);
|
this.CurrentChatTemplate = this.SettingsManager.GetPreselectedChatTemplate(this.Component);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected DateTimeOffset AddUserRequest(string request, bool hideContentFromUser = false, params List<FileAttachment> attachments)
|
protected DateTimeOffset AddUserRequest(string request, bool hideContentFromUser = false, params List<FileAttachment> attachments)
|
||||||
{
|
{
|
||||||
var time = DateTimeOffset.Now;
|
var time = DateTimeOffset.Now;
|
||||||
this.lastUserPrompt = new ContentText
|
this.LastUserPrompt = new ContentText
|
||||||
{
|
{
|
||||||
Text = request,
|
Text = request,
|
||||||
FileAttachments = attachments,
|
FileAttachments = attachments,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.chatThread!.Blocks.Add(new ContentBlock
|
this.ChatThread!.Blocks.Add(new ContentBlock
|
||||||
{
|
{
|
||||||
Time = time,
|
Time = time,
|
||||||
ContentType = ContentType.TEXT,
|
ContentType = ContentType.TEXT,
|
||||||
HideFromUser = hideContentFromUser,
|
HideFromUser = hideContentFromUser,
|
||||||
Role = ChatRole.USER,
|
Role = ChatRole.USER,
|
||||||
Content = this.lastUserPrompt,
|
Content = this.LastUserPrompt,
|
||||||
});
|
});
|
||||||
|
|
||||||
return time;
|
return time;
|
||||||
@ -300,8 +300,8 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
|
|
||||||
protected async Task<string> AddAIResponseAsync(DateTimeOffset time, bool hideContentFromUser = false)
|
protected async Task<string> AddAIResponseAsync(DateTimeOffset time, bool hideContentFromUser = false)
|
||||||
{
|
{
|
||||||
var manageCancellationLocally = this.cancellationTokenSource is null;
|
var manageCancellationLocally = this.CancellationTokenSource is null;
|
||||||
this.cancellationTokenSource ??= new CancellationTokenSource();
|
this.CancellationTokenSource ??= new CancellationTokenSource();
|
||||||
|
|
||||||
var aiText = new ContentText
|
var aiText = new ContentText
|
||||||
{
|
{
|
||||||
@ -319,10 +319,10 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
HideFromUser = hideContentFromUser,
|
HideFromUser = hideContentFromUser,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.chatThread is not null)
|
if (this.ChatThread is not null)
|
||||||
{
|
{
|
||||||
this.chatThread.Blocks.Add(this.resultingContentBlock);
|
this.ChatThread.Blocks.Add(this.resultingContentBlock);
|
||||||
this.chatThread.SelectedProvider = this.providerSettings.Id;
|
this.ChatThread.SelectedProvider = this.ProviderSettings.Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.isProcessing = true;
|
this.isProcessing = true;
|
||||||
@ -331,15 +331,15 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
// Use the selected provider to get the AI response.
|
// Use the selected provider to get the AI response.
|
||||||
// By awaiting this line, we wait for the entire
|
// By awaiting this line, we wait for the entire
|
||||||
// content to be streamed.
|
// content to be streamed.
|
||||||
this.chatThread = await aiText.CreateFromProviderAsync(this.providerSettings.CreateProvider(), this.providerSettings.Model, this.lastUserPrompt, this.chatThread, this.cancellationTokenSource!.Token);
|
this.ChatThread = await aiText.CreateFromProviderAsync(this.ProviderSettings.CreateProvider(), this.ProviderSettings.Model, this.LastUserPrompt, this.ChatThread, this.CancellationTokenSource!.Token);
|
||||||
|
|
||||||
this.isProcessing = false;
|
this.isProcessing = false;
|
||||||
this.StateHasChanged();
|
this.StateHasChanged();
|
||||||
|
|
||||||
if(manageCancellationLocally)
|
if(manageCancellationLocally)
|
||||||
{
|
{
|
||||||
this.cancellationTokenSource.Dispose();
|
this.CancellationTokenSource.Dispose();
|
||||||
this.cancellationTokenSource = null;
|
this.CancellationTokenSource = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the AI response:
|
// Return the AI response:
|
||||||
@ -348,9 +348,9 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
|
|
||||||
private async Task CancelStreaming()
|
private async Task CancelStreaming()
|
||||||
{
|
{
|
||||||
if (this.cancellationTokenSource is not null)
|
if (this.CancellationTokenSource is not null)
|
||||||
if(!this.cancellationTokenSource.IsCancellationRequested)
|
if(!this.CancellationTokenSource.IsCancellationRequested)
|
||||||
await this.cancellationTokenSource.CancelAsync();
|
await this.CancellationTokenSource.CancelAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async Task CopyToClipboard()
|
protected async Task CopyToClipboard()
|
||||||
@ -360,7 +360,7 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
|
|
||||||
private ChatThread CreateSendToChatThread()
|
private ChatThread CreateSendToChatThread()
|
||||||
{
|
{
|
||||||
var originalChatThread = this.chatThread ?? new ChatThread();
|
var originalChatThread = this.ChatThread ?? new ChatThread();
|
||||||
if (string.IsNullOrWhiteSpace(this.SendToChatVisibleUserPromptText))
|
if (string.IsNullOrWhiteSpace(this.SendToChatVisibleUserPromptText))
|
||||||
return originalChatThread with
|
return originalChatThread with
|
||||||
{
|
{
|
||||||
@ -440,7 +440,7 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
var convertedChatThread = this.ConvertToChatThread;
|
var convertedChatThread = this.ConvertToChatThread;
|
||||||
convertedChatThread = convertedChatThread with { SelectedProvider = this.providerSettings.Id };
|
convertedChatThread = convertedChatThread with { SelectedProvider = this.ProviderSettings.Id };
|
||||||
MessageBus.INSTANCE.DeferMessage(this, sendToData.Event, convertedChatThread);
|
MessageBus.INSTANCE.DeferMessage(this, sendToData.Event, convertedChatThread);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -465,7 +465,7 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
private async Task InnerResetForm()
|
private async Task InnerResetForm()
|
||||||
{
|
{
|
||||||
this.resultingContentBlock = null;
|
this.resultingContentBlock = null;
|
||||||
this.providerSettings = Settings.Provider.NONE;
|
this.ProviderSettings = Settings.Provider.NONE;
|
||||||
|
|
||||||
await this.JsRuntime.ClearDiv(RESULT_DIV_ID);
|
await this.JsRuntime.ClearDiv(RESULT_DIV_ID);
|
||||||
await this.JsRuntime.ClearDiv(AFTER_RESULT_DIV_ID);
|
await this.JsRuntime.ClearDiv(AFTER_RESULT_DIV_ID);
|
||||||
@ -473,12 +473,12 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
this.ResetForm();
|
this.ResetForm();
|
||||||
this.ResetProviderAndProfileSelection();
|
this.ResetProviderAndProfileSelection();
|
||||||
|
|
||||||
this.inputIsValid = false;
|
this.InputIsValid = false;
|
||||||
this.inputIssues = [];
|
this.inputIssues = [];
|
||||||
|
|
||||||
this.form?.ResetValidation();
|
this.Form?.ResetValidation();
|
||||||
this.StateHasChanged();
|
this.StateHasChanged();
|
||||||
this.form?.ResetValidation();
|
this.Form?.ResetValidation();
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetResetColor() => this.SettingsManager.IsDarkMode switch
|
private string GetResetColor() => this.SettingsManager.IsDarkMode switch
|
||||||
|
|||||||
@ -11,4 +11,4 @@
|
|||||||
</MudList>
|
</MudList>
|
||||||
|
|
||||||
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelecting())" @bind-Value="@this.selectedTargetLanguage" ValidateSelection="@this.ValidateTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="@T("Target language")" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="@T("Custom target language")" />
|
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelecting())" @bind-Value="@this.selectedTargetLanguage" ValidateSelection="@this.ValidateTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="@T("Target language")" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="@T("Custom target language")" />
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
@ -131,8 +131,8 @@ public partial class BiasOfTheDayAssistant : AssistantBaseCore<SettingsDialogAss
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.form!.Validate();
|
await this.Form!.Validate();
|
||||||
if (!this.inputIsValid)
|
if (!this.InputIsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.biasOfTheDay = useDrawnBias ?
|
this.biasOfTheDay = useDrawnBias ?
|
||||||
|
|||||||
@ -24,4 +24,4 @@
|
|||||||
</MudStack>
|
</MudStack>
|
||||||
|
|
||||||
<MudTextField T="string" @bind-Text="@this.questions" Validation="@this.ValidateQuestions" AdornmentIcon="@Icons.Material.Filled.QuestionMark" Adornment="Adornment.Start" Label="@T("Your question(s)")" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
<MudTextField T="string" @bind-Text="@this.questions" Validation="@this.ValidateQuestions" AdornmentIcon="@Icons.Material.Filled.QuestionMark" Adornment="Adornment.Start" Label="@T("Your question(s)")" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
@ -108,7 +108,7 @@ public partial class AssistantCoding : AssistantBaseCore<SettingsDialogCoding>
|
|||||||
return ValueTask.CompletedTask;
|
return ValueTask.CompletedTask;
|
||||||
|
|
||||||
this.codingContexts.RemoveAt(index);
|
this.codingContexts.RemoveAt(index);
|
||||||
this.form?.ResetValidation();
|
this.Form?.ResetValidation();
|
||||||
|
|
||||||
this.StateHasChanged();
|
this.StateHasChanged();
|
||||||
return ValueTask.CompletedTask;
|
return ValueTask.CompletedTask;
|
||||||
@ -116,8 +116,8 @@ public partial class AssistantCoding : AssistantBaseCore<SettingsDialogCoding>
|
|||||||
|
|
||||||
private async Task GetSupport()
|
private async Task GetSupport()
|
||||||
{
|
{
|
||||||
await this.form!.Validate();
|
await this.Form!.Validate();
|
||||||
if (!this.inputIsValid)
|
if (!this.InputIsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var sbContext = new StringBuilder();
|
var sbContext = new StringBuilder();
|
||||||
|
|||||||
@ -74,7 +74,7 @@ else
|
|||||||
@T("Documents for the analysis")
|
@T("Documents for the analysis")
|
||||||
</MudText>
|
</MudText>
|
||||||
|
|
||||||
<AttachDocuments Name="Document Analysis Files" Layer="@DropLayers.ASSISTANTS" @bind-DocumentPaths="@this.loadedDocumentPaths" CatchAllDocuments="true" UseSmallForm="false" Provider="@this.providerSettings"/>
|
<AttachDocuments Name="Document Analysis Files" Layer="@DropLayers.ASSISTANTS" @bind-DocumentPaths="@this.loadedDocumentPaths" CatchAllDocuments="true" UseSmallForm="false" Provider="@this.ProviderSettings"/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -164,10 +164,10 @@ else
|
|||||||
@T("Documents for the analysis")
|
@T("Documents for the analysis")
|
||||||
</MudText>
|
</MudText>
|
||||||
|
|
||||||
<AttachDocuments Name="Document Analysis Files" Layer="@DropLayers.ASSISTANTS" @bind-DocumentPaths="@this.loadedDocumentPaths" CatchAllDocuments="true" UseSmallForm="false" Provider="@this.providerSettings"/>
|
<AttachDocuments Name="Document Analysis Files" Layer="@DropLayers.ASSISTANTS" @bind-DocumentPaths="@this.loadedDocumentPaths" CatchAllDocuments="true" UseSmallForm="false" Provider="@this.ProviderSettings"/>
|
||||||
|
|
||||||
</ExpansionPanel>
|
</ExpansionPanel>
|
||||||
</MudExpansionPanels>
|
</MudExpansionPanels>
|
||||||
}
|
}
|
||||||
|
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider" ExplicitMinimumConfidence="@this.GetPolicyMinimumConfidenceLevel()"/>
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider" ExplicitMinimumConfidence="@this.GetPolicyMinimumConfidenceLevel()"/>
|
||||||
|
|||||||
@ -125,7 +125,7 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<NoSettingsPan
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (this.chatThread is null || this.chatThread.Blocks.Count < 2)
|
if (this.ChatThread is null || this.ChatThread.Blocks.Count < 2)
|
||||||
{
|
{
|
||||||
return new ChatThread
|
return new ChatThread
|
||||||
{
|
{
|
||||||
@ -144,7 +144,7 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<NoSettingsPan
|
|||||||
// that includes the loaded document paths and a standard message about the previous analysis session:
|
// that includes the loaded document paths and a standard message about the previous analysis session:
|
||||||
new ContentBlock
|
new ContentBlock
|
||||||
{
|
{
|
||||||
Time = this.chatThread.Blocks.First().Time,
|
Time = this.ChatThread.Blocks.First().Time,
|
||||||
Role = ChatRole.USER,
|
Role = ChatRole.USER,
|
||||||
HideFromUser = false,
|
HideFromUser = false,
|
||||||
ContentType = ContentType.TEXT,
|
ContentType = ContentType.TEXT,
|
||||||
@ -157,7 +157,7 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<NoSettingsPan
|
|||||||
|
|
||||||
// Then, append the last block of the current chat thread
|
// Then, append the last block of the current chat thread
|
||||||
// (which is expected to be the AI response):
|
// (which is expected to be the AI response):
|
||||||
this.chatThread.Blocks.Last(),
|
this.ChatThread.Blocks.Last(),
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -289,7 +289,7 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<NoSettingsPan
|
|||||||
this.policyDefinitionExpanded = !this.selectedPolicy?.IsProtected ?? true;
|
this.policyDefinitionExpanded = !this.selectedPolicy?.IsProtected ?? true;
|
||||||
this.ApplyPolicyPreselection(preferPolicyPreselection: true);
|
this.ApplyPolicyPreselection(preferPolicyPreselection: true);
|
||||||
|
|
||||||
this.form?.ResetValidation();
|
this.Form?.ResetValidation();
|
||||||
this.ClearInputIssues();
|
this.ClearInputIssues();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -345,7 +345,7 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<NoSettingsPan
|
|||||||
this.ResetForm();
|
this.ResetForm();
|
||||||
|
|
||||||
await this.SettingsManager.StoreSettings();
|
await this.SettingsManager.StoreSettings();
|
||||||
this.form?.ResetValidation();
|
this.Form?.ResetValidation();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -408,10 +408,10 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<NoSettingsPan
|
|||||||
if (!preferPolicyPreselection)
|
if (!preferPolicyPreselection)
|
||||||
{
|
{
|
||||||
// Keep the current provider if it still satisfies the minimum confidence:
|
// Keep the current provider if it still satisfies the minimum confidence:
|
||||||
if (this.providerSettings != Settings.Provider.NONE &&
|
if (this.ProviderSettings != Settings.Provider.NONE &&
|
||||||
this.providerSettings.UsedLLMProvider.GetConfidence(this.SettingsManager).Level >= minimumLevel)
|
this.ProviderSettings.UsedLLMProvider.GetConfidence(this.SettingsManager).Level >= minimumLevel)
|
||||||
{
|
{
|
||||||
this.currentProfile = this.ResolveProfileSelection();
|
this.CurrentProfile = this.ResolveProfileSelection();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -420,18 +420,18 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<NoSettingsPan
|
|||||||
var policyProvider = this.SettingsManager.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.selectedPolicy.PreselectedProvider);
|
var policyProvider = this.SettingsManager.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.selectedPolicy.PreselectedProvider);
|
||||||
if (policyProvider is not null && policyProvider.UsedLLMProvider.GetConfidence(this.SettingsManager).Level >= minimumLevel)
|
if (policyProvider is not null && policyProvider.UsedLLMProvider.GetConfidence(this.SettingsManager).Level >= minimumLevel)
|
||||||
{
|
{
|
||||||
this.providerSettings = policyProvider;
|
this.ProviderSettings = policyProvider;
|
||||||
this.currentProfile = this.ResolveProfileSelection();
|
this.CurrentProfile = this.ResolveProfileSelection();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var fallbackProvider = this.SettingsManager.GetPreselectedProvider(this.Component, this.providerSettings.Id);
|
var fallbackProvider = this.SettingsManager.GetPreselectedProvider(this.Component, this.ProviderSettings.Id);
|
||||||
if (fallbackProvider != Settings.Provider.NONE &&
|
if (fallbackProvider != Settings.Provider.NONE &&
|
||||||
fallbackProvider.UsedLLMProvider.GetConfidence(this.SettingsManager).Level < minimumLevel)
|
fallbackProvider.UsedLLMProvider.GetConfidence(this.SettingsManager).Level < minimumLevel)
|
||||||
fallbackProvider = Settings.Provider.NONE;
|
fallbackProvider = Settings.Provider.NONE;
|
||||||
|
|
||||||
this.providerSettings = fallbackProvider;
|
this.ProviderSettings = fallbackProvider;
|
||||||
this.currentProfile = this.ResolveProfileSelection();
|
this.CurrentProfile = this.ResolveProfileSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
private ConfidenceLevel GetPolicyMinimumConfidenceLevel()
|
private ConfidenceLevel GetPolicyMinimumConfidenceLevel()
|
||||||
@ -482,7 +482,7 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<NoSettingsPan
|
|||||||
|
|
||||||
this.policyPreselectedProviderId = providerId;
|
this.policyPreselectedProviderId = providerId;
|
||||||
this.selectedPolicy.PreselectedProvider = providerId;
|
this.selectedPolicy.PreselectedProvider = providerId;
|
||||||
this.providerSettings = Settings.Provider.NONE;
|
this.ProviderSettings = Settings.Provider.NONE;
|
||||||
this.ApplyPolicyPreselection();
|
this.ApplyPolicyPreselection();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -492,7 +492,7 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<NoSettingsPan
|
|||||||
if (this.selectedPolicy is not null)
|
if (this.selectedPolicy is not null)
|
||||||
this.selectedPolicy.PreselectedProfile = this.policyPreselectedProfile;
|
this.selectedPolicy.PreselectedProfile = this.policyPreselectedProfile;
|
||||||
|
|
||||||
this.currentProfile = this.ResolveProfileSelection();
|
this.CurrentProfile = this.ResolveProfileSelection();
|
||||||
await this.AutoSave();
|
await this.AutoSave();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -557,7 +557,7 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<NoSettingsPan
|
|||||||
this.ApplyPolicyPreselection(preferPolicyPreselection: true);
|
this.ApplyPolicyPreselection(preferPolicyPreselection: true);
|
||||||
|
|
||||||
// Reset validation state:
|
// Reset validation state:
|
||||||
this.form?.ResetValidation();
|
this.Form?.ResetValidation();
|
||||||
this.ClearInputIssues();
|
this.ClearInputIssues();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -700,12 +700,12 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<NoSettingsPan
|
|||||||
private async Task Analyze()
|
private async Task Analyze()
|
||||||
{
|
{
|
||||||
await this.AutoSave();
|
await this.AutoSave();
|
||||||
await this.form!.Validate();
|
await this.Form!.Validate();
|
||||||
if (!this.inputIsValid)
|
if (!this.InputIsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.CreateChatThread();
|
this.CreateChatThread();
|
||||||
this.chatThread!.IncludeDateTime = true;
|
this.ChatThread!.IncludeDateTime = true;
|
||||||
|
|
||||||
var userRequest = this.AddUserRequest(
|
var userRequest = this.AddUserRequest(
|
||||||
await this.PromptLoadDocumentsContent(),
|
await this.PromptLoadDocumentsContent(),
|
||||||
@ -724,8 +724,8 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<NoSettingsPan
|
|||||||
}
|
}
|
||||||
|
|
||||||
await this.AutoSave();
|
await this.AutoSave();
|
||||||
await this.form!.Validate();
|
await this.Form!.Validate();
|
||||||
if (!this.inputIsValid)
|
if (!this.InputIsValid)
|
||||||
{
|
{
|
||||||
await this.MessageBus.SendError(new (Icons.Material.Filled.Policy, this.T("The selected policy contains invalid data. Please fix the issues before exporting the policy.")));
|
await this.MessageBus.SendError(new (Icons.Material.Filled.Policy, this.T("The selected policy contains invalid data. Please fix the issues before exporting the policy.")));
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -120,7 +120,7 @@ else
|
|||||||
var webState = this.assistantState.WebContent[webContent.Name];
|
var webState = this.assistantState.WebContent[webContent.Name];
|
||||||
<div class="@webContent.Class" style="@GetOptionalStyle(webContent.Style)">
|
<div class="@webContent.Class" style="@GetOptionalStyle(webContent.Style)">
|
||||||
<ReadWebContent @bind-Content="@webState.Content"
|
<ReadWebContent @bind-Content="@webState.Content"
|
||||||
ProviderSettings="@this.providerSettings"
|
ProviderSettings="@this.ProviderSettings"
|
||||||
@bind-AgentIsRunning="@webState.AgentIsRunning"
|
@bind-AgentIsRunning="@webState.AgentIsRunning"
|
||||||
@bind-Preselect="@webState.Preselect"
|
@bind-Preselect="@webState.Preselect"
|
||||||
@bind-PreselectContentCleanerAgent="@webState.PreselectContentCleanerAgent" />
|
@bind-PreselectContentCleanerAgent="@webState.PreselectContentCleanerAgent" />
|
||||||
@ -349,7 +349,7 @@ else
|
|||||||
if (component is AssistantProviderSelection providerSelection)
|
if (component is AssistantProviderSelection providerSelection)
|
||||||
{
|
{
|
||||||
<div class="@providerSelection.Class" style="@GetOptionalStyle(providerSelection.Style)">
|
<div class="@providerSelection.Class" style="@GetOptionalStyle(providerSelection.Style)">
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider" />
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider" />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -359,7 +359,7 @@ else
|
|||||||
{
|
{
|
||||||
var selection = profileSelection;
|
var selection = profileSelection;
|
||||||
<div class="@selection.Class" style="@GetOptionalStyle(selection.Style)">
|
<div class="@selection.Class" style="@GetOptionalStyle(selection.Style)">
|
||||||
<ProfileFormSelection Validation="@(profile => this.ValidateProfileSelection(selection, profile))" @bind-Profile="@this.currentProfile" />
|
<ProfileFormSelection Validation="@(profile => this.ValidateProfileSelection(selection, profile))" @bind-Profile="@this.CurrentProfile" />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -165,7 +165,7 @@ public partial class AssistantDynamic : AssistantBaseCore<NoSettingsPanel>
|
|||||||
if (this.assistantPlugin?.HasCustomPromptBuilder != true) return this.CollectUserPromptFallback();
|
if (this.assistantPlugin?.HasCustomPromptBuilder != true) return this.CollectUserPromptFallback();
|
||||||
|
|
||||||
var input = this.BuildPromptInput();
|
var input = this.BuildPromptInput();
|
||||||
var prompt = await this.assistantPlugin.TryBuildPromptAsync(input, this.cancellationTokenSource?.Token ?? CancellationToken.None);
|
var prompt = await this.assistantPlugin.TryBuildPromptAsync(input, this.CancellationTokenSource?.Token ?? CancellationToken.None);
|
||||||
return !string.IsNullOrWhiteSpace(prompt) ? prompt : this.CollectUserPromptFallback();
|
return !string.IsNullOrWhiteSpace(prompt) ? prompt : this.CollectUserPromptFallback();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,10 +178,10 @@ public partial class AssistantDynamic : AssistantBaseCore<NoSettingsPanel>
|
|||||||
|
|
||||||
var profile = new LuaTable
|
var profile = new LuaTable
|
||||||
{
|
{
|
||||||
["Name"] = this.currentProfile.Name,
|
["Name"] = this.CurrentProfile.Name,
|
||||||
["NeedToKnow"] = this.currentProfile.NeedToKnow,
|
["NeedToKnow"] = this.CurrentProfile.NeedToKnow,
|
||||||
["Actions"] = this.currentProfile.Actions,
|
["Actions"] = this.CurrentProfile.Actions,
|
||||||
["Num"] = this.currentProfile.Num,
|
["Num"] = this.CurrentProfile.Num,
|
||||||
};
|
};
|
||||||
|
|
||||||
state["profile"] = profile;
|
state["profile"] = profile;
|
||||||
@ -233,7 +233,7 @@ public partial class AssistantDynamic : AssistantBaseCore<NoSettingsPanel>
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var input = this.BuildPromptInput();
|
var input = this.BuildPromptInput();
|
||||||
var cancellationToken = this.cancellationTokenSource?.Token ?? CancellationToken.None;
|
var cancellationToken = this.CancellationTokenSource?.Token ?? CancellationToken.None;
|
||||||
var result = await this.assistantPlugin.TryInvokeButtonActionAsync(button, input, cancellationToken);
|
var result = await this.assistantPlugin.TryInvokeButtonActionAsync(button, input, cancellationToken);
|
||||||
if (result is not null)
|
if (result is not null)
|
||||||
this.ApplyActionResult(result, AssistantComponentType.BUTTON);
|
this.ApplyActionResult(result, AssistantComponentType.BUTTON);
|
||||||
@ -264,7 +264,7 @@ public partial class AssistantDynamic : AssistantBaseCore<NoSettingsPanel>
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var input = this.BuildPromptInput();
|
var input = this.BuildPromptInput();
|
||||||
var cancellationToken = this.cancellationTokenSource?.Token ?? CancellationToken.None;
|
var cancellationToken = this.CancellationTokenSource?.Token ?? CancellationToken.None;
|
||||||
var result = await this.assistantPlugin.TryInvokeSwitchChangedAsync(switchComponent, input, cancellationToken);
|
var result = await this.assistantPlugin.TryInvokeSwitchChangedAsync(switchComponent, input, cancellationToken);
|
||||||
if (result is not null)
|
if (result is not null)
|
||||||
this.ApplyActionResult(result, AssistantComponentType.SWITCH);
|
this.ApplyActionResult(result, AssistantComponentType.SWITCH);
|
||||||
|
|||||||
@ -22,4 +22,4 @@
|
|||||||
<MudTextField T="string" @bind-Text="@this.inputName" Label="@T("(Optional) Your name for the closing salutation")" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Person" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="@T("Your name for the closing salutation of your e-mail.")" Class="mb-3"/>
|
<MudTextField T="string" @bind-Text="@this.inputName" Label="@T("(Optional) Your name for the closing salutation")" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Person" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="@T("Your name for the closing salutation of your e-mail.")" Class="mb-3"/>
|
||||||
<EnumSelection T="WritingStyles" NameFunc="@(style => style.Name())" @bind-Value="@this.selectedWritingStyle" Icon="@Icons.Material.Filled.Edit" Label="@T("Select the writing style")" ValidateSelection="@this.ValidateWritingStyle"/>
|
<EnumSelection T="WritingStyles" NameFunc="@(style => style.Name())" @bind-Value="@this.selectedWritingStyle" Icon="@Icons.Material.Filled.Edit" Label="@T("Select the writing style")" ValidateSelection="@this.ValidateWritingStyle"/>
|
||||||
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelecting())" @bind-Value="@this.selectedTargetLanguage" ValidateSelection="@this.ValidateTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="@T("Target language")" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="@T("Custom target language")" />
|
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelecting())" @bind-Value="@this.selectedTargetLanguage" ValidateSelection="@this.ValidateTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="@T("Target language")" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="@T("Custom target language")" />
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
@ -224,8 +224,8 @@ public partial class AssistantEMail : AssistantBaseCore<SettingsDialogWritingEMa
|
|||||||
|
|
||||||
private async Task CreateMail()
|
private async Task CreateMail()
|
||||||
{
|
{
|
||||||
await this.form!.Validate();
|
await this.Form!.Validate();
|
||||||
if (!this.inputIsValid)
|
if (!this.InputIsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.CreateChatThread();
|
this.CreateChatThread();
|
||||||
|
|||||||
@ -330,7 +330,7 @@ else
|
|||||||
<b>@T("Important:")</b> @T("The LLM may need to generate many files. This reaches the request limit of most providers. Typically, only a certain number of requests can be made per minute, and only a maximum number of tokens can be generated per minute. AI Studio automatically considers this.") <b>@T("However, generating all the files takes a certain amount of time.")</b> @T("Local or self-hosted models may work without these limitations and can generate responses faster. AI Studio dynamically adapts its behavior and always tries to achieve the fastest possible data processing.")
|
<b>@T("Important:")</b> @T("The LLM may need to generate many files. This reaches the request limit of most providers. Typically, only a certain number of requests can be made per minute, and only a maximum number of tokens can be generated per minute. AI Studio automatically considers this.") <b>@T("However, generating all the files takes a certain amount of time.")</b> @T("Local or self-hosted models may work without these limitations and can generate responses faster. AI Studio dynamically adapts its behavior and always tries to achieve the fastest possible data processing.")
|
||||||
</MudJustifiedText>
|
</MudJustifiedText>
|
||||||
|
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
|
|
||||||
<MudText Typo="Typo.h4" Class="mt-9 mb-1">
|
<MudText Typo="Typo.h4" Class="mt-9 mb-1">
|
||||||
@T("Write code to file system")
|
@T("Write code to file system")
|
||||||
|
|||||||
@ -303,7 +303,7 @@ public partial class AssistantERI : AssistantBaseCore<SettingsDialogERIServer>
|
|||||||
|
|
||||||
protected override bool SubmitDisabled => this.IsNoneERIServerSelected;
|
protected override bool SubmitDisabled => this.IsNoneERIServerSelected;
|
||||||
|
|
||||||
protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
|
protected override ChatThread ConvertToChatThread => (this.ChatThread ?? new()) with
|
||||||
{
|
{
|
||||||
SystemPrompt = this.SystemPrompt,
|
SystemPrompt = this.SystemPrompt,
|
||||||
};
|
};
|
||||||
@ -400,7 +400,7 @@ public partial class AssistantERI : AssistantBaseCore<SettingsDialogERIServer>
|
|||||||
if(this.selectedERIServer is null)
|
if(this.selectedERIServer is null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.SettingsManager.ConfigurationData.ERI.PreselectedProvider = this.providerSettings.Id;
|
this.SettingsManager.ConfigurationData.ERI.PreselectedProvider = this.ProviderSettings.Id;
|
||||||
this.selectedERIServer.ServerName = this.serverName;
|
this.selectedERIServer.ServerName = this.serverName;
|
||||||
this.selectedERIServer.ServerDescription = this.serverDescription;
|
this.selectedERIServer.ServerDescription = this.serverDescription;
|
||||||
this.selectedERIServer.ERIVersion = this.selectedERIVersion;
|
this.selectedERIServer.ERIVersion = this.selectedERIVersion;
|
||||||
@ -488,7 +488,7 @@ public partial class AssistantERI : AssistantBaseCore<SettingsDialogERIServer>
|
|||||||
this.ResetForm();
|
this.ResetForm();
|
||||||
|
|
||||||
await this.SettingsManager.StoreSettings();
|
await this.SettingsManager.StoreSettings();
|
||||||
this.form?.ResetValidation();
|
this.Form?.ResetValidation();
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool IsNoneERIServerSelected => this.selectedERIServer is null;
|
private bool IsNoneERIServerSelected => this.selectedERIServer is null;
|
||||||
@ -940,8 +940,8 @@ public partial class AssistantERI : AssistantBaseCore<SettingsDialogERIServer>
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
await this.AutoSave();
|
await this.AutoSave();
|
||||||
await this.form!.Validate();
|
await this.Form!.Validate();
|
||||||
if (!this.inputIsValid)
|
if (!this.InputIsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(this.retrievalProcesses.Count == 0)
|
if(this.retrievalProcesses.Count == 0)
|
||||||
|
|||||||
@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
<MudTextField T="string" @bind-Text="@this.inputText" Validation="@this.ValidateText" AdornmentIcon="@Icons.Material.Filled.DocumentScanner" Adornment="Adornment.Start" Label="@T("Your input to check")" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
<MudTextField T="string" @bind-Text="@this.inputText" Validation="@this.ValidateText" AdornmentIcon="@Icons.Material.Filled.DocumentScanner" Adornment="Adornment.Start" Label="@T("Your input to check")" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||||
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelectingOptional())" @bind-Value="@this.selectedTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="@T("Language")" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="@T("Custom language")" />
|
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelectingOptional())" @bind-Value="@this.selectedTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="@T("Language")" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="@T("Custom language")" />
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
@ -119,8 +119,8 @@ public partial class AssistantGrammarSpelling : AssistantBaseCore<SettingsDialog
|
|||||||
|
|
||||||
private async Task ProofreadText()
|
private async Task ProofreadText()
|
||||||
{
|
{
|
||||||
await this.form!.Validate();
|
await this.Form!.Validate();
|
||||||
if (!this.inputIsValid)
|
if (!this.InputIsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.CreateChatThread();
|
this.CreateChatThread();
|
||||||
|
|||||||
@ -85,7 +85,7 @@ else if (!this.isLoading && string.IsNullOrWhiteSpace(this.loadingIssue))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (this.localizedContent.Count > 0)
|
@if (this.localizedContent.Count > 0)
|
||||||
|
|||||||
@ -269,8 +269,8 @@ public partial class AssistantI18N : AssistantBaseCore<SettingsDialogI18N>
|
|||||||
|
|
||||||
private async Task LocalizeTextContent()
|
private async Task LocalizeTextContent()
|
||||||
{
|
{
|
||||||
await this.form!.Validate();
|
await this.Form!.Validate();
|
||||||
if (!this.inputIsValid)
|
if (!this.InputIsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(this.selectedLanguagePlugin is null)
|
if(this.selectedLanguagePlugin is null)
|
||||||
@ -291,7 +291,7 @@ public partial class AssistantI18N : AssistantBaseCore<SettingsDialogI18N>
|
|||||||
this.localizedContent = this.addedContent.ToDictionary();
|
this.localizedContent = this.addedContent.ToDictionary();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.cancellationTokenSource!.IsCancellationRequested)
|
if(this.CancellationTokenSource!.IsCancellationRequested)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -302,7 +302,7 @@ public partial class AssistantI18N : AssistantBaseCore<SettingsDialogI18N>
|
|||||||
//
|
//
|
||||||
foreach (var keyValuePair in this.selectedLanguagePlugin.Content)
|
foreach (var keyValuePair in this.selectedLanguagePlugin.Content)
|
||||||
{
|
{
|
||||||
if (this.cancellationTokenSource!.IsCancellationRequested)
|
if (this.CancellationTokenSource!.IsCancellationRequested)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (this.localizedContent.ContainsKey(keyValuePair.Key))
|
if (this.localizedContent.ContainsKey(keyValuePair.Key))
|
||||||
@ -314,7 +314,7 @@ public partial class AssistantI18N : AssistantBaseCore<SettingsDialogI18N>
|
|||||||
this.localizedContent.Add(keyValuePair.Key, keyValuePair.Value);
|
this.localizedContent.Add(keyValuePair.Key, keyValuePair.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.cancellationTokenSource!.IsCancellationRequested)
|
if(this.CancellationTokenSource!.IsCancellationRequested)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -324,7 +324,7 @@ public partial class AssistantI18N : AssistantBaseCore<SettingsDialogI18N>
|
|||||||
var commentContent = new Dictionary<string, string>(this.addedContent);
|
var commentContent = new Dictionary<string, string>(this.addedContent);
|
||||||
foreach (var keyValuePair in PluginFactory.BaseLanguage.Content)
|
foreach (var keyValuePair in PluginFactory.BaseLanguage.Content)
|
||||||
{
|
{
|
||||||
if (this.cancellationTokenSource!.IsCancellationRequested)
|
if (this.CancellationTokenSource!.IsCancellationRequested)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (this.removedContent.ContainsKey(keyValuePair.Key))
|
if (this.removedContent.ContainsKey(keyValuePair.Key))
|
||||||
@ -342,7 +342,7 @@ public partial class AssistantI18N : AssistantBaseCore<SettingsDialogI18N>
|
|||||||
var minimumTime = TimeSpan.FromMilliseconds(500);
|
var minimumTime = TimeSpan.FromMilliseconds(500);
|
||||||
foreach (var keyValuePair in this.addedContent)
|
foreach (var keyValuePair in this.addedContent)
|
||||||
{
|
{
|
||||||
if(this.cancellationTokenSource!.IsCancellationRequested)
|
if(this.CancellationTokenSource!.IsCancellationRequested)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -360,7 +360,7 @@ public partial class AssistantI18N : AssistantBaseCore<SettingsDialogI18N>
|
|||||||
var time = this.AddUserRequest(keyValuePair.Value);
|
var time = this.AddUserRequest(keyValuePair.Value);
|
||||||
this.localizedContent.Add(keyValuePair.Key, await this.AddAIResponseAsync(time));
|
this.localizedContent.Add(keyValuePair.Key, await this.AddAIResponseAsync(time));
|
||||||
|
|
||||||
if (this.cancellationTokenSource!.IsCancellationRequested)
|
if (this.CancellationTokenSource!.IsCancellationRequested)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -375,7 +375,7 @@ public partial class AssistantI18N : AssistantBaseCore<SettingsDialogI18N>
|
|||||||
private void Phase2CreateLuaCode(IReadOnlyDictionary<string, string> commentContent)
|
private void Phase2CreateLuaCode(IReadOnlyDictionary<string, string> commentContent)
|
||||||
{
|
{
|
||||||
this.finalLuaCode.Clear();
|
this.finalLuaCode.Clear();
|
||||||
LuaTable.Create(ref this.finalLuaCode, "UI_TEXT_CONTENT", this.localizedContent, commentContent, this.cancellationTokenSource!.Token);
|
LuaTable.Create(ref this.finalLuaCode, "UI_TEXT_CONTENT", this.localizedContent, commentContent, this.CancellationTokenSource!.Token);
|
||||||
|
|
||||||
// Next, we must remove the `root::` prefix from the keys:
|
// Next, we must remove the `root::` prefix from the keys:
|
||||||
this.finalLuaCode.Replace("""UI_TEXT_CONTENT["root::""", """
|
this.finalLuaCode.Replace("""UI_TEXT_CONTENT["root::""", """
|
||||||
|
|||||||
@ -19,4 +19,4 @@
|
|||||||
</MudButton>
|
</MudButton>
|
||||||
}
|
}
|
||||||
</MudStack>
|
</MudStack>
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
@ -80,8 +80,8 @@ public partial class AssistantIconFinder : AssistantBaseCore<SettingsDialogIconF
|
|||||||
|
|
||||||
private async Task FindIcon()
|
private async Task FindIcon()
|
||||||
{
|
{
|
||||||
await this.form!.Validate();
|
await this.Form!.Validate();
|
||||||
if (!this.inputIsValid)
|
if (!this.InputIsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.CreateChatThread();
|
this.CreateChatThread();
|
||||||
|
|||||||
@ -12,4 +12,4 @@
|
|||||||
<MudTextField T="string" @bind-Text="@this.inputValidUntil" Label="@T("(Optional) Provide the date until the job posting is valid")" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.DateRange" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" Class="mb-3"/>
|
<MudTextField T="string" @bind-Text="@this.inputValidUntil" Label="@T("(Optional) Provide the date until the job posting is valid")" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.DateRange" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" Class="mb-3"/>
|
||||||
|
|
||||||
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelectingOptional())" @bind-Value="@this.selectedTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="@T("Target language")" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="@T("Custom target language")" />
|
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelectingOptional())" @bind-Value="@this.selectedTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="@T("Target language")" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="@T("Custom target language")" />
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
@ -287,8 +287,8 @@ public partial class AssistantJobPostings : AssistantBaseCore<SettingsDialogJobP
|
|||||||
|
|
||||||
private async Task CreateJobPosting()
|
private async Task CreateJobPosting()
|
||||||
{
|
{
|
||||||
await this.form!.Validate();
|
await this.Form!.Validate();
|
||||||
if (!this.inputIsValid)
|
if (!this.InputIsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.CreateChatThread();
|
this.CreateChatThread();
|
||||||
|
|||||||
@ -3,10 +3,10 @@
|
|||||||
|
|
||||||
@if (!this.SettingsManager.ConfigurationData.LegalCheck.HideWebContentReader)
|
@if (!this.SettingsManager.ConfigurationData.LegalCheck.HideWebContentReader)
|
||||||
{
|
{
|
||||||
<ReadWebContent @bind-Content="@this.inputLegalDocument" ProviderSettings="@this.providerSettings" @bind-AgentIsRunning="@this.isAgentRunning" @bind-Preselect="@this.showWebContentReader" @bind-PreselectContentCleanerAgent="@this.useContentCleanerAgent"/>
|
<ReadWebContent @bind-Content="@this.inputLegalDocument" ProviderSettings="@this.ProviderSettings" @bind-AgentIsRunning="@this.isAgentRunning" @bind-Preselect="@this.showWebContentReader" @bind-PreselectContentCleanerAgent="@this.useContentCleanerAgent"/>
|
||||||
}
|
}
|
||||||
|
|
||||||
<ReadFileContent @bind-FileContent="@this.inputLegalDocument"/>
|
<ReadFileContent @bind-FileContent="@this.inputLegalDocument"/>
|
||||||
<MudTextField T="string" Disabled="@this.isAgentRunning" @bind-Text="@this.inputLegalDocument" Validation="@this.ValidatingLegalDocument" AdornmentIcon="@Icons.Material.Filled.DocumentScanner" Adornment="Adornment.Start" Label="@T("Legal document")" Variant="Variant.Outlined" Lines="12" AutoGrow="@true" MaxLines="24" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
<MudTextField T="string" Disabled="@this.isAgentRunning" @bind-Text="@this.inputLegalDocument" Validation="@this.ValidatingLegalDocument" AdornmentIcon="@Icons.Material.Filled.DocumentScanner" Adornment="Adornment.Start" Label="@T("Legal document")" Variant="Variant.Outlined" Lines="12" AutoGrow="@true" MaxLines="24" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||||
<MudTextField T="string" Disabled="@this.isAgentRunning" @bind-Text="@this.inputQuestions" Validation="@this.ValidatingQuestions" AdornmentIcon="@Icons.Material.Filled.QuestionAnswer" Adornment="Adornment.Start" Label="@T("Your questions")" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
<MudTextField T="string" Disabled="@this.isAgentRunning" @bind-Text="@this.inputQuestions" Validation="@this.ValidatingQuestions" AdornmentIcon="@Icons.Material.Filled.QuestionAnswer" Adornment="Adornment.Start" Label="@T("Your questions")" Variant="Variant.Outlined" Lines="6" AutoGrow="@true" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
@ -91,8 +91,8 @@ public partial class AssistantLegalCheck : AssistantBaseCore<SettingsDialogLegal
|
|||||||
|
|
||||||
private async Task AksQuestions()
|
private async Task AksQuestions()
|
||||||
{
|
{
|
||||||
await this.form!.Validate();
|
await this.Form!.Validate();
|
||||||
if (!this.inputIsValid)
|
if (!this.InputIsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.CreateChatThread();
|
this.CreateChatThread();
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
@attribute [Route(Routes.ASSISTANT_MY_TASKS)]
|
@attribute [Route(Routes.ASSISTANT_MY_TASKS)]
|
||||||
@inherits AssistantBaseCore<AIStudio.Dialogs.Settings.SettingsDialogMyTasks>
|
@inherits AssistantBaseCore<AIStudio.Dialogs.Settings.SettingsDialogMyTasks>
|
||||||
|
|
||||||
<ProfileFormSelection Validation="@this.ValidateProfile" @bind-Profile="@this.currentProfile"/>
|
<ProfileFormSelection Validation="@this.ValidateProfile" @bind-Profile="@this.CurrentProfile"/>
|
||||||
<MudTextField T="string" @bind-Text="@this.inputText" Validation="@this.ValidatingText" AdornmentIcon="@Icons.Material.Filled.DocumentScanner" Adornment="Adornment.Start" Label="@T("Text or email")" Variant="Variant.Outlined" Lines="12" AutoGrow="@true" MaxLines="24" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
<MudTextField T="string" @bind-Text="@this.inputText" Validation="@this.ValidatingText" AdornmentIcon="@Icons.Material.Filled.DocumentScanner" Adornment="Adornment.Start" Label="@T("Text or email")" Variant="Variant.Outlined" Lines="12" AutoGrow="@true" MaxLines="24" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||||
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelectingOptional())" @bind-Value="@this.selectedTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="@T("Target language")" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="@T("Custom target language")" />
|
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelectingOptional())" @bind-Value="@this.selectedTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="@T("Target language")" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="@T("Custom target language")" />
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
@ -110,8 +110,8 @@ public partial class AssistantMyTasks : AssistantBaseCore<SettingsDialogMyTasks>
|
|||||||
|
|
||||||
private async Task AnalyzeText()
|
private async Task AnalyzeText()
|
||||||
{
|
{
|
||||||
await this.form!.Validate();
|
await this.Form!.Validate();
|
||||||
if (!this.inputIsValid)
|
if (!this.InputIsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.CreateChatThread();
|
this.CreateChatThread();
|
||||||
|
|||||||
@ -101,7 +101,7 @@
|
|||||||
CatchAllDocuments="false"
|
CatchAllDocuments="false"
|
||||||
UseSmallForm="true"
|
UseSmallForm="true"
|
||||||
ValidateMediaFileTypes="false"
|
ValidateMediaFileTypes="false"
|
||||||
Provider="@this.providerSettings"/>
|
Provider="@this.ProviderSettings"/>
|
||||||
}
|
}
|
||||||
|
|
||||||
<MudTextField T="string"
|
<MudTextField T="string"
|
||||||
@ -121,4 +121,4 @@
|
|||||||
</MudButton>
|
</MudButton>
|
||||||
</MudStack>
|
</MudStack>
|
||||||
|
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
|
|||||||
@ -111,7 +111,7 @@ public partial class AssistantPromptOptimizer : AssistantBaseCore<SettingsDialog
|
|||||||
|
|
||||||
protected override bool SubmitDisabled => this.useCustomPromptGuide && this.customPromptGuideFiles.Count == 0;
|
protected override bool SubmitDisabled => this.useCustomPromptGuide && this.customPromptGuideFiles.Count == 0;
|
||||||
|
|
||||||
protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
|
protected override ChatThread ConvertToChatThread => (this.ChatThread ?? new()) with
|
||||||
{
|
{
|
||||||
SystemPrompt = SystemPrompts.DEFAULT,
|
SystemPrompt = SystemPrompts.DEFAULT,
|
||||||
};
|
};
|
||||||
@ -218,8 +218,8 @@ public partial class AssistantPromptOptimizer : AssistantBaseCore<SettingsDialog
|
|||||||
|
|
||||||
private async Task OptimizePromptAsync()
|
private async Task OptimizePromptAsync()
|
||||||
{
|
{
|
||||||
await this.form!.Validate();
|
await this.Form!.Validate();
|
||||||
if (!this.inputIsValid)
|
if (!this.InputIsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.ClearInputIssues();
|
this.ClearInputIssues();
|
||||||
@ -341,7 +341,6 @@ public partial class AssistantPromptOptimizer : AssistantBaseCore<SettingsDialog
|
|||||||
if (probe is null || string.IsNullOrWhiteSpace(probe.OptimizedPrompt))
|
if (probe is null || string.IsNullOrWhiteSpace(probe.OptimizedPrompt))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
probe.Recommendations ??= new PromptOptimizationRecommendations();
|
|
||||||
parsedResult = probe;
|
parsedResult = probe;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -414,7 +413,7 @@ public partial class AssistantPromptOptimizer : AssistantBaseCore<SettingsDialog
|
|||||||
if (string.IsNullOrWhiteSpace(this.optimizedPrompt))
|
if (string.IsNullOrWhiteSpace(this.optimizedPrompt))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (this.chatThread is null)
|
if (this.ChatThread is null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var visibleResponseContent = new ContentText
|
var visibleResponseContent = new ContentText
|
||||||
@ -422,7 +421,7 @@ public partial class AssistantPromptOptimizer : AssistantBaseCore<SettingsDialog
|
|||||||
Text = this.optimizedPrompt,
|
Text = this.optimizedPrompt,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.chatThread.Blocks.Add(new ContentBlock
|
this.ChatThread.Blocks.Add(new ContentBlock
|
||||||
{
|
{
|
||||||
Time = DateTimeOffset.Now,
|
Time = DateTimeOffset.Now,
|
||||||
ContentType = ContentType.TEXT,
|
ContentType = ContentType.TEXT,
|
||||||
@ -548,7 +547,7 @@ public partial class AssistantPromptOptimizer : AssistantBaseCore<SettingsDialog
|
|||||||
{ x => x.GuidelineMarkdown, promptingGuideline }
|
{ x => x.GuidelineMarkdown, promptingGuideline }
|
||||||
};
|
};
|
||||||
|
|
||||||
var dialogReference = await this.DialogService.ShowAsync<PromptingGuidelineDialog>(T("Prompting Guideline"), dialogParameters, AIStudio.Dialogs.DialogOptions.FULLSCREEN);
|
var dialogReference = await this.DialogService.ShowAsync<PromptingGuidelineDialog>(T("Prompting Guideline"), dialogParameters, Dialogs.DialogOptions.FULLSCREEN);
|
||||||
await dialogReference.Result;
|
await dialogReference.Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -567,6 +566,6 @@ public partial class AssistantPromptOptimizer : AssistantBaseCore<SettingsDialog
|
|||||||
{ x => x.FileContent, this.customPromptingGuidelineContent },
|
{ x => x.FileContent, this.customPromptingGuidelineContent },
|
||||||
};
|
};
|
||||||
|
|
||||||
await this.DialogService.ShowAsync<DocumentCheckDialog>(T("Custom Prompt Guide Preview"), dialogParameters, AIStudio.Dialogs.DialogOptions.FULLSCREEN);
|
await this.DialogService.ShowAsync<DocumentCheckDialog>(T("Custom Prompt Guide Preview"), dialogParameters, Dialogs.DialogOptions.FULLSCREEN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,4 +5,4 @@
|
|||||||
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelectingOptional())" @bind-Value="@this.selectedTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="@T("Language")" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="@T("Custom language")" />
|
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelectingOptional())" @bind-Value="@this.selectedTargetLanguage" Icon="@Icons.Material.Filled.Translate" 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="@Icons.Material.Filled.Edit" Label="@T("Writing style")" AllowOther="@false" />
|
<EnumSelection T="WritingStyles" NameFunc="@(style => style.Name())" @bind-Value="@this.selectedWritingStyle" Icon="@Icons.Material.Filled.Edit" Label="@T("Writing style")" AllowOther="@false" />
|
||||||
<EnumSelection T="SentenceStructure" NameFunc="@(voice => voice.Name())" @bind-Value="@this.selectedSentenceStructure" Icon="@Icons.Material.Filled.Person4" Label="@T("Sentence structure")" />
|
<EnumSelection T="SentenceStructure" NameFunc="@(voice => voice.Name())" @bind-Value="@this.selectedSentenceStructure" Icon="@Icons.Material.Filled.Person4" Label="@T("Sentence structure")" />
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
@ -1,4 +1,3 @@
|
|||||||
using AIStudio.Chat;
|
|
||||||
using AIStudio.Dialogs.Settings;
|
using AIStudio.Dialogs.Settings;
|
||||||
|
|
||||||
namespace AIStudio.Assistants.RewriteImprove;
|
namespace AIStudio.Assistants.RewriteImprove;
|
||||||
@ -127,8 +126,8 @@ public partial class AssistantRewriteImprove : AssistantBaseCore<SettingsDialogR
|
|||||||
|
|
||||||
private async Task RewriteText()
|
private async Task RewriteText()
|
||||||
{
|
{
|
||||||
await this.form!.Validate();
|
await this.Form!.Validate();
|
||||||
if (!this.inputIsValid)
|
if (!this.InputIsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.CreateChatThread();
|
this.CreateChatThread();
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
<MudTextField T="string" @bind-Text="@this.inputContent" Validation="@this.ValidatingContext" Adornment="Adornment.Start" Lines="6" MaxLines="12" AutoGrow="@false" Label="@T("Text content")" Variant="Variant.Outlined" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
<MudTextField T="string" @bind-Text="@this.inputContent" Validation="@this.ValidatingContext" Adornment="Adornment.Start" Lines="6" MaxLines="12" AutoGrow="@false" Label="@T("Text content")" Variant="Variant.Outlined" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||||
|
|
||||||
<MudText Typo="Typo.h6" Class="mb-1 mt-1"> @T("Attach documents")</MudText>
|
<MudText Typo="Typo.h6" Class="mb-1 mt-1"> @T("Attach documents")</MudText>
|
||||||
<AttachDocuments Name="Documents for input" Layer="@DropLayers.ASSISTANTS" @bind-DocumentPaths="@this.loadedDocumentPaths" OnChange="@this.OnDocumentsChanged" CatchAllDocuments="true" UseSmallForm="false" Provider="@this.providerSettings"/>
|
<AttachDocuments Name="Documents for input" Layer="@DropLayers.ASSISTANTS" @bind-DocumentPaths="@this.loadedDocumentPaths" OnChange="@this.OnDocumentsChanged" CatchAllDocuments="true" UseSmallForm="false" Provider="@this.ProviderSettings"/>
|
||||||
|
|
||||||
<MudText Typo="Typo.h5" Class="mb-3 mt-6"> @T("Details about the desired presentation")</MudText>
|
<MudText Typo="Typo.h5" Class="mb-3 mt-6"> @T("Details about the desired presentation")</MudText>
|
||||||
|
|
||||||
@ -66,4 +66,4 @@
|
|||||||
<EnumSelection T="AudienceAgeGroup" NameFunc="@(ageGroup => ageGroup.Name())" @bind-Value="@this.selectedAudienceAgeGroup" Icon="@Icons.Material.Filled.Cake" Label="@T("Audience age group")" />
|
<EnumSelection T="AudienceAgeGroup" NameFunc="@(ageGroup => ageGroup.Name())" @bind-Value="@this.selectedAudienceAgeGroup" Icon="@Icons.Material.Filled.Cake" Label="@T("Audience age group")" />
|
||||||
<EnumSelection T="AudienceOrganizationalLevel" NameFunc="@(level => level.Name())" @bind-Value="@this.selectedAudienceOrganizationalLevel" Icon="@Icons.Material.Filled.AccountTree" Label="@T("Audience organizational level")" />
|
<EnumSelection T="AudienceOrganizationalLevel" NameFunc="@(level => level.Name())" @bind-Value="@this.selectedAudienceOrganizationalLevel" Icon="@Icons.Material.Filled.AccountTree" Label="@T("Audience organizational level")" />
|
||||||
<EnumSelection T="AudienceExpertise" NameFunc="@(expertise => expertise.Name())" @bind-Value="@this.selectedAudienceExpertise" Icon="@Icons.Material.Filled.School" Label="@T("Audience expertise")" />
|
<EnumSelection T="AudienceExpertise" NameFunc="@(expertise => expertise.Name())" @bind-Value="@this.selectedAudienceExpertise" Icon="@Icons.Material.Filled.School" Label="@T("Audience expertise")" />
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
|
|||||||
@ -82,7 +82,7 @@ public partial class SlideAssistant : AssistantBaseCore<SettingsDialogSlideBuild
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (this.chatThread is null || this.chatThread.Blocks.Count < 2)
|
if (this.ChatThread is null || this.ChatThread.Blocks.Count < 2)
|
||||||
{
|
{
|
||||||
return new ChatThread
|
return new ChatThread
|
||||||
{
|
{
|
||||||
@ -100,7 +100,7 @@ public partial class SlideAssistant : AssistantBaseCore<SettingsDialogSlideBuild
|
|||||||
// Visible user block:
|
// Visible user block:
|
||||||
new ContentBlock
|
new ContentBlock
|
||||||
{
|
{
|
||||||
Time = this.chatThread.Blocks.First().Time,
|
Time = this.ChatThread.Blocks.First().Time,
|
||||||
Role = ChatRole.USER,
|
Role = ChatRole.USER,
|
||||||
HideFromUser = false,
|
HideFromUser = false,
|
||||||
ContentType = ContentType.TEXT,
|
ContentType = ContentType.TEXT,
|
||||||
@ -114,7 +114,7 @@ public partial class SlideAssistant : AssistantBaseCore<SettingsDialogSlideBuild
|
|||||||
// Hidden user block with inputContent data:
|
// Hidden user block with inputContent data:
|
||||||
new ContentBlock
|
new ContentBlock
|
||||||
{
|
{
|
||||||
Time = this.chatThread.Blocks.First().Time,
|
Time = this.ChatThread.Blocks.First().Time,
|
||||||
Role = ChatRole.USER,
|
Role = ChatRole.USER,
|
||||||
HideFromUser = true,
|
HideFromUser = true,
|
||||||
ContentType = ContentType.TEXT,
|
ContentType = ContentType.TEXT,
|
||||||
@ -144,7 +144,7 @@ public partial class SlideAssistant : AssistantBaseCore<SettingsDialogSlideBuild
|
|||||||
|
|
||||||
// Then, append the last block of the current chat thread
|
// Then, append the last block of the current chat thread
|
||||||
// (which is expected to be the AI response):
|
// (which is expected to be the AI response):
|
||||||
this.chatThread.Blocks.Last(),
|
this.ChatThread.Blocks.Last(),
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -230,8 +230,8 @@ public partial class SlideAssistant : AssistantBaseCore<SettingsDialogSlideBuild
|
|||||||
|
|
||||||
private async Task OnDocumentsChanged(HashSet<FileAttachment> _)
|
private async Task OnDocumentsChanged(HashSet<FileAttachment> _)
|
||||||
{
|
{
|
||||||
if(this.form is not null)
|
if(this.Form is not null)
|
||||||
await this.form.Validate();
|
await this.Form.Validate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private string? ValidateCustomLanguage(string language)
|
private string? ValidateCustomLanguage(string language)
|
||||||
@ -375,8 +375,8 @@ public partial class SlideAssistant : AssistantBaseCore<SettingsDialogSlideBuild
|
|||||||
|
|
||||||
private async Task CreateSlideBuilder()
|
private async Task CreateSlideBuilder()
|
||||||
{
|
{
|
||||||
await this.form!.Validate();
|
await this.Form!.Validate();
|
||||||
if (!this.inputIsValid)
|
if (!this.InputIsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.calculatedNumberOfSlides = this.timeSpecification > 0 ? this.CalculateNumberOfSlides() : 0;
|
this.calculatedNumberOfSlides = this.timeSpecification > 0 ? this.CalculateNumberOfSlides() : 0;
|
||||||
|
|||||||
@ -5,4 +5,4 @@
|
|||||||
<MudTextField T="string" @bind-Text="@this.inputContext" AdornmentIcon="@Icons.Material.Filled.Description" Adornment="Adornment.Start" Lines="2" AutoGrow="@false" Label="@T("(Optional) The context for the given word or phrase")" Variant="Variant.Outlined" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
<MudTextField T="string" @bind-Text="@this.inputContext" AdornmentIcon="@Icons.Material.Filled.Description" Adornment="Adornment.Start" Lines="2" AutoGrow="@false" Label="@T("(Optional) The context for the given word or phrase")" Variant="Variant.Outlined" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||||
|
|
||||||
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelectingOptional())" @bind-Value="@this.selectedLanguage" Icon="@Icons.Material.Filled.Translate" Label="@T("Language")" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="@T("Custom target language")" />
|
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelectingOptional())" @bind-Value="@this.selectedLanguage" Icon="@Icons.Material.Filled.Translate" Label="@T("Language")" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="@T("Custom target language")" />
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
using AIStudio.Chat;
|
|
||||||
using AIStudio.Dialogs.Settings;
|
using AIStudio.Dialogs.Settings;
|
||||||
|
|
||||||
namespace AIStudio.Assistants.Synonym;
|
namespace AIStudio.Assistants.Synonym;
|
||||||
@ -167,8 +166,8 @@ public partial class AssistantSynonyms : AssistantBaseCore<SettingsDialogSynonym
|
|||||||
|
|
||||||
private async Task FindSynonyms()
|
private async Task FindSynonyms()
|
||||||
{
|
{
|
||||||
await this.form!.Validate();
|
await this.Form!.Validate();
|
||||||
if (!this.inputIsValid)
|
if (!this.InputIsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.CreateChatThread();
|
this.CreateChatThread();
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
@if (!this.SettingsManager.ConfigurationData.TextSummarizer.HideWebContentReader)
|
@if (!this.SettingsManager.ConfigurationData.TextSummarizer.HideWebContentReader)
|
||||||
{
|
{
|
||||||
<ReadWebContent @bind-Content="@this.inputText" ProviderSettings="@this.providerSettings" @bind-AgentIsRunning="@this.isAgentRunning" @bind-Preselect="@this.showWebContentReader" @bind-PreselectContentCleanerAgent="@this.useContentCleanerAgent"/>
|
<ReadWebContent @bind-Content="@this.inputText" ProviderSettings="@this.ProviderSettings" @bind-AgentIsRunning="@this.isAgentRunning" @bind-Preselect="@this.showWebContentReader" @bind-PreselectContentCleanerAgent="@this.useContentCleanerAgent"/>
|
||||||
}
|
}
|
||||||
|
|
||||||
<ReadFileContent @bind-FileContent="@this.inputText"/>
|
<ReadFileContent @bind-FileContent="@this.inputText"/>
|
||||||
@ -11,4 +11,4 @@
|
|||||||
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.Name())" @bind-Value="@this.selectedTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="@T("Target language")" AllowOther="@true" @bind-OtherInput="@this.customTargetLanguage" OtherValue="CommonLanguages.OTHER" LabelOther="@T("Custom target language")" ValidateOther="@this.ValidateCustomLanguage" />
|
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.Name())" @bind-Value="@this.selectedTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="@T("Target language")" AllowOther="@true" @bind-OtherInput="@this.customTargetLanguage" OtherValue="CommonLanguages.OTHER" LabelOther="@T("Custom target language")" ValidateOther="@this.ValidateCustomLanguage" />
|
||||||
<EnumSelection T="Complexity" NameFunc="@(complexity => complexity.Name())" @bind-Value="@this.selectedComplexity" Icon="@Icons.Material.Filled.Layers" Label="@T("Target complexity")" AllowOther="@true" @bind-OtherInput="@this.expertInField" OtherValue="Complexity.SCIENTIFIC_LANGUAGE_OTHER_EXPERTS" LabelOther="@T("Your expertise")" ValidateOther="@this.ValidateExpertInField" />
|
<EnumSelection T="Complexity" NameFunc="@(complexity => complexity.Name())" @bind-Value="@this.selectedComplexity" Icon="@Icons.Material.Filled.Layers" Label="@T("Target complexity")" AllowOther="@true" @bind-OtherInput="@this.expertInField" OtherValue="Complexity.SCIENTIFIC_LANGUAGE_OTHER_EXPERTS" LabelOther="@T("Your expertise")" ValidateOther="@this.ValidateExpertInField" />
|
||||||
<MudTextField T="string" AutoGrow="true" Lines="2" @bind-Text="@this.importantAspects" class="mb-3" Label="@T("(Optional) Important Aspects")" HelperText="@T("(Optional) Specify aspects for the LLM to focus on when generating a summary, such as summary length or specific topics to emphasize.")" ShrinkLabel="true" Variant="Variant.Outlined" AdornmentIcon="@Icons.Material.Filled.List" Adornment="Adornment.Start"/>
|
<MudTextField T="string" AutoGrow="true" Lines="2" @bind-Text="@this.importantAspects" class="mb-3" Label="@T("(Optional) Important Aspects")" HelperText="@T("(Optional) Specify aspects for the LLM to focus on when generating a summary, such as summary length or specific topics to emphasize.")" ShrinkLabel="true" Variant="Variant.Outlined" AdornmentIcon="@Icons.Material.Filled.List" Adornment="Adornment.Start"/>
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
@ -123,8 +123,8 @@ public partial class AssistantTextSummarizer : AssistantBaseCore<SettingsDialogT
|
|||||||
|
|
||||||
private async Task SummarizeText()
|
private async Task SummarizeText()
|
||||||
{
|
{
|
||||||
await this.form!.Validate();
|
await this.Form!.Validate();
|
||||||
if (!this.inputIsValid)
|
if (!this.InputIsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.CreateChatThread();
|
this.CreateChatThread();
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
@if (!this.SettingsManager.ConfigurationData.Translation.HideWebContentReader)
|
@if (!this.SettingsManager.ConfigurationData.Translation.HideWebContentReader)
|
||||||
{
|
{
|
||||||
<ReadWebContent @bind-Content="@this.inputText" ProviderSettings="@this.providerSettings" @bind-AgentIsRunning="@this.isAgentRunning" @bind-Preselect="@this.showWebContentReader" @bind-PreselectContentCleanerAgent="@this.useContentCleanerAgent"/>
|
<ReadWebContent @bind-Content="@this.inputText" ProviderSettings="@this.ProviderSettings" @bind-AgentIsRunning="@this.isAgentRunning" @bind-Preselect="@this.showWebContentReader" @bind-PreselectContentCleanerAgent="@this.useContentCleanerAgent"/>
|
||||||
}
|
}
|
||||||
|
|
||||||
<ReadFileContent @bind-FileContent="@this.inputText"/>
|
<ReadFileContent @bind-FileContent="@this.inputText"/>
|
||||||
@ -19,4 +19,4 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelecting())" @bind-Value="@this.selectedTargetLanguage" ValidateSelection="@this.ValidatingTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="@T("Target language")" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="@T("Custom target language")" />
|
<EnumSelection T="CommonLanguages" NameFunc="@(language => language.NameSelecting())" @bind-Value="@this.selectedTargetLanguage" ValidateSelection="@this.ValidatingTargetLanguage" Icon="@Icons.Material.Filled.Translate" Label="@T("Target language")" AllowOther="@true" OtherValue="CommonLanguages.OTHER" @bind-OtherInput="@this.customTargetLanguage" ValidateOther="@this.ValidateCustomLanguage" LabelOther="@T("Custom target language")" />
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
@ -1,4 +1,3 @@
|
|||||||
using AIStudio.Chat;
|
|
||||||
using AIStudio.Dialogs.Settings;
|
using AIStudio.Dialogs.Settings;
|
||||||
|
|
||||||
namespace AIStudio.Assistants.Translation;
|
namespace AIStudio.Assistants.Translation;
|
||||||
@ -120,8 +119,8 @@ public partial class AssistantTranslation : AssistantBaseCore<SettingsDialogTran
|
|||||||
|
|
||||||
private async Task TranslateText(bool force)
|
private async Task TranslateText(bool force)
|
||||||
{
|
{
|
||||||
await this.form!.Validate();
|
await this.Form!.Validate();
|
||||||
if (!this.inputIsValid)
|
if (!this.InputIsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(!force && this.inputText == this.inputTextLastTranslation)
|
if(!force && this.inputText == this.inputTextLastTranslation)
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
<ConfigurationText OptionDescription="@T("Preselect another agenda language")" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" Icon="@Icons.Material.Filled.Translate" Text="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectedOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.Agenda.PreselectedOtherLanguage = updatedText)"/>
|
<ConfigurationText OptionDescription="@T("Preselect another agenda language")" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" Icon="@Icons.Material.Filled.Translate" Text="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectedOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.Agenda.PreselectedOtherLanguage = updatedText)"/>
|
||||||
}
|
}
|
||||||
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Agenda.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Agenda.MinimumProviderConfidence = selectedValue)"/>
|
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Agenda.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Agenda.MinimumProviderConfidence = selectedValue)"/>
|
||||||
<ConfigurationProviderSelection Component="Components.AGENDA_ASSISTANT" Data="@this.availableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Agenda.PreselectedProvider = selectedValue)"/>
|
<ConfigurationProviderSelection Component="Components.AGENDA_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Agenda.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Agenda.PreselectedProvider = selectedValue)"/>
|
||||||
<ConfigurationSelect OptionDescription="@T("Preselect a profile")" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" SelectedValue="@(() => ProfilePreselection.FromStoredValue(this.SettingsManager.ConfigurationData.Agenda.PreselectedProfile))" Data="@ConfigurationSelectDataFactory.GetComponentProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Agenda.PreselectedProfile = selectedValue)" OptionHelp="@T("Choose whether the assistant should use the app default profile, no profile, or a specific profile.")"/>
|
<ConfigurationSelect OptionDescription="@T("Preselect a profile")" Disabled="@(() => !this.SettingsManager.ConfigurationData.Agenda.PreselectOptions)" SelectedValue="@(() => ProfilePreselection.FromStoredValue(this.SettingsManager.ConfigurationData.Agenda.PreselectedProfile))" Data="@ConfigurationSelectDataFactory.GetComponentProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Agenda.PreselectedProfile = selectedValue)" OptionHelp="@T("Choose whether the assistant should use the app default profile, no profile, or a specific profile.")"/>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
}
|
}
|
||||||
<ConfigurationSelect OptionDescription="@T("Preselect a profile")" Disabled="@(() => !this.SettingsManager.ConfigurationData.BiasOfTheDay.PreselectOptions)" SelectedValue="@(() => ProfilePreselection.FromStoredValue(this.SettingsManager.ConfigurationData.BiasOfTheDay.PreselectedProfile))" Data="@ConfigurationSelectDataFactory.GetComponentProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.BiasOfTheDay.PreselectedProfile = selectedValue)" OptionHelp="@T("Choose whether the assistant should use the app default profile, no profile, or a specific profile.")"/>
|
<ConfigurationSelect OptionDescription="@T("Preselect a profile")" Disabled="@(() => !this.SettingsManager.ConfigurationData.BiasOfTheDay.PreselectOptions)" SelectedValue="@(() => ProfilePreselection.FromStoredValue(this.SettingsManager.ConfigurationData.BiasOfTheDay.PreselectedProfile))" Data="@ConfigurationSelectDataFactory.GetComponentProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.BiasOfTheDay.PreselectedProfile = selectedValue)" OptionHelp="@T("Choose whether the assistant should use the app default profile, no profile, or a specific profile.")"/>
|
||||||
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.BiasOfTheDay.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.BiasOfTheDay.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.BiasOfTheDay.MinimumProviderConfidence = selectedValue)"/>
|
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.BiasOfTheDay.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.BiasOfTheDay.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.BiasOfTheDay.MinimumProviderConfidence = selectedValue)"/>
|
||||||
<ConfigurationProviderSelection Component="Components.BIAS_DAY_ASSISTANT" Data="@this.availableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.BiasOfTheDay.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.BiasOfTheDay.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.BiasOfTheDay.PreselectedProvider = selectedValue)"/>
|
<ConfigurationProviderSelection Component="Components.BIAS_DAY_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.BiasOfTheDay.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.BiasOfTheDay.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.BiasOfTheDay.PreselectedProvider = selectedValue)"/>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
</MudField>
|
</MudField>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|||||||
@ -19,8 +19,8 @@ public abstract class SettingsDialogBase : MSGComponentBase
|
|||||||
[Inject]
|
[Inject]
|
||||||
protected RustService RustService { get; init; } = null!;
|
protected RustService RustService { get; init; } = null!;
|
||||||
|
|
||||||
protected readonly List<ConfigurationSelectData<string>> availableLLMProviders = new();
|
protected readonly List<ConfigurationSelectData<string>> AvailableLLMProviders = new();
|
||||||
protected readonly List<ConfigurationSelectData<string>> availableEmbeddingProviders = new();
|
protected readonly List<ConfigurationSelectData<string>> AvailableEmbeddingProviders = new();
|
||||||
|
|
||||||
#region Overrides of ComponentBase
|
#region Overrides of ComponentBase
|
||||||
|
|
||||||
@ -43,16 +43,16 @@ public abstract class SettingsDialogBase : MSGComponentBase
|
|||||||
[SuppressMessage("Usage", "MWAIS0001:Direct access to `Providers` is not allowed")]
|
[SuppressMessage("Usage", "MWAIS0001:Direct access to `Providers` is not allowed")]
|
||||||
private void UpdateProviders()
|
private void UpdateProviders()
|
||||||
{
|
{
|
||||||
this.availableLLMProviders.Clear();
|
this.AvailableLLMProviders.Clear();
|
||||||
foreach (var provider in this.SettingsManager.ConfigurationData.Providers)
|
foreach (var provider in this.SettingsManager.ConfigurationData.Providers)
|
||||||
this.availableLLMProviders.Add(new (provider.InstanceName, provider.Id));
|
this.AvailableLLMProviders.Add(new (provider.InstanceName, provider.Id));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateEmbeddingProviders()
|
private void UpdateEmbeddingProviders()
|
||||||
{
|
{
|
||||||
this.availableEmbeddingProviders.Clear();
|
this.AvailableEmbeddingProviders.Clear();
|
||||||
foreach (var provider in this.SettingsManager.ConfigurationData.EmbeddingProviders)
|
foreach (var provider in this.SettingsManager.ConfigurationData.EmbeddingProviders)
|
||||||
this.availableEmbeddingProviders.Add(new (provider.Name, provider.Id));
|
this.AvailableEmbeddingProviders.Add(new (provider.Name, provider.Id));
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Overrides of MSGComponentBase
|
#region Overrides of MSGComponentBase
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
||||||
<ConfigurationOption OptionDescription="@T("Preselect chat options?")" LabelOn="@T("Chat options are preselected")" LabelOff="@T("No chat options are preselected")" State="@(() => this.SettingsManager.ConfigurationData.Chat.PreselectOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.Chat.PreselectOptions = updatedState)" OptionHelp="@T("When enabled, you can preselect chat options. This is might be useful when you prefer a specific provider.")"/>
|
<ConfigurationOption OptionDescription="@T("Preselect chat options?")" LabelOn="@T("Chat options are preselected")" LabelOff="@T("No chat options are preselected")" State="@(() => this.SettingsManager.ConfigurationData.Chat.PreselectOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.Chat.PreselectOptions = updatedState)" OptionHelp="@T("When enabled, you can preselect chat options. This is might be useful when you prefer a specific provider.")"/>
|
||||||
<ConfigurationProviderSelection Component="Components.CHAT" Data="@this.availableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.Chat.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Chat.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Chat.PreselectedProvider = selectedValue)"/>
|
<ConfigurationProviderSelection Component="Components.CHAT" Data="@this.AvailableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.Chat.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Chat.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Chat.PreselectedProvider = selectedValue)"/>
|
||||||
<ConfigurationSelect OptionDescription="@T("Preselect a profile")" Disabled="@(() => !this.SettingsManager.ConfigurationData.Chat.PreselectOptions)" SelectedValue="@(() => ProfilePreselection.FromStoredValue(this.SettingsManager.ConfigurationData.Chat.PreselectedProfile))" Data="@ConfigurationSelectDataFactory.GetComponentProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Chat.PreselectedProfile = selectedValue)" OptionHelp="@T("Choose whether chats should use the app default profile, no profile, or a specific profile.")"/>
|
<ConfigurationSelect OptionDescription="@T("Preselect a profile")" Disabled="@(() => !this.SettingsManager.ConfigurationData.Chat.PreselectOptions)" SelectedValue="@(() => ProfilePreselection.FromStoredValue(this.SettingsManager.ConfigurationData.Chat.PreselectedProfile))" Data="@ConfigurationSelectDataFactory.GetComponentProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Chat.PreselectedProfile = selectedValue)" OptionHelp="@T("Choose whether chats should use the app default profile, no profile, or a specific profile.")"/>
|
||||||
<ConfigurationSelect OptionDescription="@T("Preselect one of your chat templates?")" Disabled="@(() => !this.SettingsManager.ConfigurationData.Chat.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Chat.PreselectedChatTemplate)" Data="@ConfigurationSelectDataFactory.GetChatTemplatesData(this.SettingsManager.ConfigurationData.ChatTemplates)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Chat.PreselectedChatTemplate = selectedValue)" OptionHelp="@T("Would you like to set one of your chat templates as the default for chats?")"/>
|
<ConfigurationSelect OptionDescription="@T("Preselect one of your chat templates?")" Disabled="@(() => !this.SettingsManager.ConfigurationData.Chat.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Chat.PreselectedChatTemplate)" Data="@ConfigurationSelectDataFactory.GetChatTemplatesData(this.SettingsManager.ConfigurationData.ChatTemplates)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Chat.PreselectedChatTemplate = selectedValue)" OptionHelp="@T("Would you like to set one of your chat templates as the default for chats?")"/>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
<ConfigurationText OptionDescription="@T("Preselect another programming language")" Disabled="@(() => !this.SettingsManager.ConfigurationData.Coding.PreselectOptions)" Icon="@Icons.Material.Filled.Code" Text="@(() => this.SettingsManager.ConfigurationData.Coding.PreselectedOtherProgrammingLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.Coding.PreselectedOtherProgrammingLanguage = updatedText)"/>
|
<ConfigurationText OptionDescription="@T("Preselect another programming language")" Disabled="@(() => !this.SettingsManager.ConfigurationData.Coding.PreselectOptions)" Icon="@Icons.Material.Filled.Code" Text="@(() => this.SettingsManager.ConfigurationData.Coding.PreselectedOtherProgrammingLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.Coding.PreselectedOtherProgrammingLanguage = updatedText)"/>
|
||||||
}
|
}
|
||||||
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.Coding.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Coding.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Coding.MinimumProviderConfidence = selectedValue)"/>
|
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.Coding.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Coding.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Coding.MinimumProviderConfidence = selectedValue)"/>
|
||||||
<ConfigurationProviderSelection Component="Components.CODING_ASSISTANT" Data="@this.availableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.Coding.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Coding.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Coding.PreselectedProvider = selectedValue)"/>
|
<ConfigurationProviderSelection Component="Components.CODING_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.Coding.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Coding.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Coding.PreselectedProvider = selectedValue)"/>
|
||||||
<ConfigurationSelect OptionDescription="@T("Preselect a profile")" Disabled="@(() => !this.SettingsManager.ConfigurationData.Coding.PreselectOptions)" SelectedValue="@(() => ProfilePreselection.FromStoredValue(this.SettingsManager.ConfigurationData.Coding.PreselectedProfile))" Data="@ConfigurationSelectDataFactory.GetComponentProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Coding.PreselectedProfile = selectedValue)" OptionHelp="@T("Choose whether the assistant should use the app default profile, no profile, or a specific profile.")"/>
|
<ConfigurationSelect OptionDescription="@T("Preselect a profile")" Disabled="@(() => !this.SettingsManager.ConfigurationData.Coding.PreselectOptions)" SelectedValue="@(() => ProfilePreselection.FromStoredValue(this.SettingsManager.ConfigurationData.Coding.PreselectedProfile))" Data="@ConfigurationSelectDataFactory.GetComponentProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Coding.PreselectedProfile = selectedValue)" OptionHelp="@T("Choose whether the assistant should use the app default profile, no profile, or a specific profile.")"/>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|||||||
@ -32,7 +32,7 @@ public partial class SettingsDialogDataSources : SettingsDialogBase
|
|||||||
var localFileDialogParameters = new DialogParameters<DataSourceLocalFileDialog>
|
var localFileDialogParameters = new DialogParameters<DataSourceLocalFileDialog>
|
||||||
{
|
{
|
||||||
{ x => x.IsEditing, false },
|
{ x => x.IsEditing, false },
|
||||||
{ x => x.AvailableEmbeddings, this.availableEmbeddingProviders }
|
{ x => x.AvailableEmbeddings, this.AvailableEmbeddingProviders }
|
||||||
};
|
};
|
||||||
|
|
||||||
var localFileDialogReference = await this.DialogService.ShowAsync<DataSourceLocalFileDialog>(T("Add Local File as Data Source"), localFileDialogParameters, DialogOptions.FULLSCREEN);
|
var localFileDialogReference = await this.DialogService.ShowAsync<DataSourceLocalFileDialog>(T("Add Local File as Data Source"), localFileDialogParameters, DialogOptions.FULLSCREEN);
|
||||||
@ -49,7 +49,7 @@ public partial class SettingsDialogDataSources : SettingsDialogBase
|
|||||||
var localDirectoryDialogParameters = new DialogParameters<DataSourceLocalDirectoryDialog>
|
var localDirectoryDialogParameters = new DialogParameters<DataSourceLocalDirectoryDialog>
|
||||||
{
|
{
|
||||||
{ x => x.IsEditing, false },
|
{ x => x.IsEditing, false },
|
||||||
{ x => x.AvailableEmbeddings, this.availableEmbeddingProviders }
|
{ x => x.AvailableEmbeddings, this.AvailableEmbeddingProviders }
|
||||||
};
|
};
|
||||||
|
|
||||||
var localDirectoryDialogReference = await this.DialogService.ShowAsync<DataSourceLocalDirectoryDialog>(T("Add Local Directory as Data Source"), localDirectoryDialogParameters, DialogOptions.FULLSCREEN);
|
var localDirectoryDialogReference = await this.DialogService.ShowAsync<DataSourceLocalDirectoryDialog>(T("Add Local Directory as Data Source"), localDirectoryDialogParameters, DialogOptions.FULLSCREEN);
|
||||||
@ -97,7 +97,7 @@ public partial class SettingsDialogDataSources : SettingsDialogBase
|
|||||||
{
|
{
|
||||||
{ x => x.IsEditing, true },
|
{ x => x.IsEditing, true },
|
||||||
{ x => x.DataSource, localFile },
|
{ x => x.DataSource, localFile },
|
||||||
{ x => x.AvailableEmbeddings, this.availableEmbeddingProviders }
|
{ x => x.AvailableEmbeddings, this.AvailableEmbeddingProviders }
|
||||||
};
|
};
|
||||||
|
|
||||||
var localFileDialogReference = await this.DialogService.ShowAsync<DataSourceLocalFileDialog>(T("Edit Local File Data Source"), localFileDialogParameters, DialogOptions.FULLSCREEN);
|
var localFileDialogReference = await this.DialogService.ShowAsync<DataSourceLocalFileDialog>(T("Edit Local File Data Source"), localFileDialogParameters, DialogOptions.FULLSCREEN);
|
||||||
@ -113,7 +113,7 @@ public partial class SettingsDialogDataSources : SettingsDialogBase
|
|||||||
{
|
{
|
||||||
{ x => x.IsEditing, true },
|
{ x => x.IsEditing, true },
|
||||||
{ x => x.DataSource, localDirectory },
|
{ x => x.DataSource, localDirectory },
|
||||||
{ x => x.AvailableEmbeddings, this.availableEmbeddingProviders }
|
{ x => x.AvailableEmbeddings, this.AvailableEmbeddingProviders }
|
||||||
};
|
};
|
||||||
|
|
||||||
var localDirectoryDialogReference = await this.DialogService.ShowAsync<DataSourceLocalDirectoryDialog>(T("Edit Local Directory Data Source"), localDirectoryDialogParameters, DialogOptions.FULLSCREEN);
|
var localDirectoryDialogReference = await this.DialogService.ShowAsync<DataSourceLocalDirectoryDialog>(T("Edit Local Directory Data Source"), localDirectoryDialogParameters, DialogOptions.FULLSCREEN);
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
<ConfigurationText OptionDescription="@T("Preselect another target language")" Disabled="@(() => !this.SettingsManager.ConfigurationData.GrammarSpelling.PreselectOptions)" Icon="@Icons.Material.Filled.Translate" Text="@(() => this.SettingsManager.ConfigurationData.GrammarSpelling.PreselectedOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.GrammarSpelling.PreselectedOtherLanguage = updatedText)"/>
|
<ConfigurationText OptionDescription="@T("Preselect another target language")" Disabled="@(() => !this.SettingsManager.ConfigurationData.GrammarSpelling.PreselectOptions)" Icon="@Icons.Material.Filled.Translate" Text="@(() => this.SettingsManager.ConfigurationData.GrammarSpelling.PreselectedOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.GrammarSpelling.PreselectedOtherLanguage = updatedText)"/>
|
||||||
}
|
}
|
||||||
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.GrammarSpelling.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.GrammarSpelling.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.GrammarSpelling.MinimumProviderConfidence = selectedValue)"/>
|
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.GrammarSpelling.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.GrammarSpelling.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.GrammarSpelling.MinimumProviderConfidence = selectedValue)"/>
|
||||||
<ConfigurationProviderSelection Component="Components.GRAMMAR_SPELLING_ASSISTANT" Data="@this.availableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.GrammarSpelling.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.GrammarSpelling.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.GrammarSpelling.PreselectedProvider = selectedValue)"/>
|
<ConfigurationProviderSelection Component="Components.GRAMMAR_SPELLING_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.GrammarSpelling.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.GrammarSpelling.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.GrammarSpelling.PreselectedProvider = selectedValue)"/>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
<ConfigurationText OptionDescription="@T("Preselect another target language")" Disabled="@(() => !this.SettingsManager.ConfigurationData.I18N.PreselectOptions)" Icon="@Icons.Material.Filled.Translate" Text="@(() => this.SettingsManager.ConfigurationData.I18N.PreselectOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.I18N.PreselectOtherLanguage = updatedText)"/>
|
<ConfigurationText OptionDescription="@T("Preselect another target language")" Disabled="@(() => !this.SettingsManager.ConfigurationData.I18N.PreselectOptions)" Icon="@Icons.Material.Filled.Translate" Text="@(() => this.SettingsManager.ConfigurationData.I18N.PreselectOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.I18N.PreselectOtherLanguage = updatedText)"/>
|
||||||
}
|
}
|
||||||
<ConfigurationSelect OptionDescription="@T("Language plugin used for comparision")" SelectedValue="@(() => this.SettingsManager.ConfigurationData.I18N.PreselectedLanguagePluginId)" Data="@ConfigurationSelectDataFactory.GetLanguagesData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.I18N.PreselectedLanguagePluginId = selectedValue)" OptionHelp="@T("Select the language plugin used for comparision.")"/>
|
<ConfigurationSelect OptionDescription="@T("Language plugin used for comparision")" SelectedValue="@(() => this.SettingsManager.ConfigurationData.I18N.PreselectedLanguagePluginId)" Data="@ConfigurationSelectDataFactory.GetLanguagesData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.I18N.PreselectedLanguagePluginId = selectedValue)" OptionHelp="@T("Select the language plugin used for comparision.")"/>
|
||||||
<ConfigurationProviderSelection Component="Components.I18N_ASSISTANT" Data="@this.availableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.I18N.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.I18N.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.I18N.PreselectedProvider = selectedValue)"/>
|
<ConfigurationProviderSelection Component="Components.I18N_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.I18N.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.I18N.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.I18N.PreselectedProvider = selectedValue)"/>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
<ConfigurationOption OptionDescription="@T("Preselect icon options?")" LabelOn="@T("Icon options are preselected")" LabelOff="@T("No icon options are preselected")" State="@(() => this.SettingsManager.ConfigurationData.IconFinder.PreselectOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.IconFinder.PreselectOptions = updatedState)" OptionHelp="When enabled, you can preselect the icon options. This is might be useful when you prefer a specific icon source or LLM model."/>
|
<ConfigurationOption OptionDescription="@T("Preselect icon options?")" LabelOn="@T("Icon options are preselected")" LabelOff="@T("No icon options are preselected")" State="@(() => this.SettingsManager.ConfigurationData.IconFinder.PreselectOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.IconFinder.PreselectOptions = updatedState)" OptionHelp="When enabled, you can preselect the icon options. This is might be useful when you prefer a specific icon source or LLM model."/>
|
||||||
<ConfigurationSelect OptionDescription="@T("Preselect the icon source")" Disabled="@(() => !this.SettingsManager.ConfigurationData.IconFinder.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.IconFinder.PreselectedSource)" Data="@ConfigurationSelectDataFactory.GetIconSourcesData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.IconFinder.PreselectedSource = selectedValue)" OptionHelp="Which icon source should be preselected?"/>
|
<ConfigurationSelect OptionDescription="@T("Preselect the icon source")" Disabled="@(() => !this.SettingsManager.ConfigurationData.IconFinder.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.IconFinder.PreselectedSource)" Data="@ConfigurationSelectDataFactory.GetIconSourcesData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.IconFinder.PreselectedSource = selectedValue)" OptionHelp="Which icon source should be preselected?"/>
|
||||||
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.IconFinder.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.IconFinder.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.IconFinder.MinimumProviderConfidence = selectedValue)"/>
|
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.IconFinder.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.IconFinder.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.IconFinder.MinimumProviderConfidence = selectedValue)"/>
|
||||||
<ConfigurationProviderSelection Component="Components.ICON_FINDER_ASSISTANT" Data="@this.availableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.IconFinder.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.IconFinder.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.IconFinder.PreselectedProvider = selectedValue)"/>
|
<ConfigurationProviderSelection Component="Components.ICON_FINDER_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.IconFinder.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.IconFinder.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.IconFinder.PreselectedProvider = selectedValue)"/>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
<ConfigurationText OptionDescription="@T("Preselect another target language")" Disabled="@(() => !this.SettingsManager.ConfigurationData.JobPostings.PreselectOptions)" Icon="@Icons.Material.Filled.Translate" Text="@(() => this.SettingsManager.ConfigurationData.JobPostings.PreselectOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.JobPostings.PreselectOtherLanguage = updatedText)"/>
|
<ConfigurationText OptionDescription="@T("Preselect another target language")" Disabled="@(() => !this.SettingsManager.ConfigurationData.JobPostings.PreselectOptions)" Icon="@Icons.Material.Filled.Translate" Text="@(() => this.SettingsManager.ConfigurationData.JobPostings.PreselectOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.JobPostings.PreselectOtherLanguage = updatedText)"/>
|
||||||
}
|
}
|
||||||
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.JobPostings.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.JobPostings.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.JobPostings.MinimumProviderConfidence = selectedValue)"/>
|
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.JobPostings.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.JobPostings.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.JobPostings.MinimumProviderConfidence = selectedValue)"/>
|
||||||
<ConfigurationProviderSelection Component="Components.JOB_POSTING_ASSISTANT" Data="@this.availableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.JobPostings.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.JobPostings.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.JobPostings.PreselectedProvider = selectedValue)"/>
|
<ConfigurationProviderSelection Component="Components.JOB_POSTING_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.JobPostings.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.JobPostings.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.JobPostings.PreselectedProvider = selectedValue)"/>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
<ConfigurationOption OptionDescription="@T("Preselect the web content reader?")" Disabled="@(() => !this.SettingsManager.ConfigurationData.LegalCheck.PreselectOptions || this.SettingsManager.ConfigurationData.LegalCheck.HideWebContentReader)" LabelOn="@T("Web content reader is preselected")" LabelOff="@T("Web content reader is not preselected")" State="@(() => this.SettingsManager.ConfigurationData.LegalCheck.PreselectWebContentReader)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.LegalCheck.PreselectWebContentReader = updatedState)" OptionHelp="@T("When enabled, the web content reader is preselected. This is might be useful when you prefer to load legal content from the web very often.")"/>
|
<ConfigurationOption OptionDescription="@T("Preselect the web content reader?")" Disabled="@(() => !this.SettingsManager.ConfigurationData.LegalCheck.PreselectOptions || this.SettingsManager.ConfigurationData.LegalCheck.HideWebContentReader)" LabelOn="@T("Web content reader is preselected")" LabelOff="@T("Web content reader is not preselected")" State="@(() => this.SettingsManager.ConfigurationData.LegalCheck.PreselectWebContentReader)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.LegalCheck.PreselectWebContentReader = updatedState)" OptionHelp="@T("When enabled, the web content reader is preselected. This is might be useful when you prefer to load legal content from the web very often.")"/>
|
||||||
<ConfigurationOption OptionDescription="@T("Preselect the content cleaner agent?")" Disabled="@(() => !this.SettingsManager.ConfigurationData.LegalCheck.PreselectOptions || this.SettingsManager.ConfigurationData.LegalCheck.HideWebContentReader)" LabelOn="@T("Content cleaner agent is preselected")" LabelOff="@T("Content cleaner agent is not preselected")" State="@(() => this.SettingsManager.ConfigurationData.LegalCheck.PreselectContentCleanerAgent)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.LegalCheck.PreselectContentCleanerAgent = updatedState)" OptionHelp="@T("When enabled, the content cleaner agent is preselected. This is might be useful when you prefer to clean up the legal content before translating it.")"/>
|
<ConfigurationOption OptionDescription="@T("Preselect the content cleaner agent?")" Disabled="@(() => !this.SettingsManager.ConfigurationData.LegalCheck.PreselectOptions || this.SettingsManager.ConfigurationData.LegalCheck.HideWebContentReader)" LabelOn="@T("Content cleaner agent is preselected")" LabelOff="@T("Content cleaner agent is not preselected")" State="@(() => this.SettingsManager.ConfigurationData.LegalCheck.PreselectContentCleanerAgent)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.LegalCheck.PreselectContentCleanerAgent = updatedState)" OptionHelp="@T("When enabled, the content cleaner agent is preselected. This is might be useful when you prefer to clean up the legal content before translating it.")"/>
|
||||||
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.LegalCheck.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.LegalCheck.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.LegalCheck.MinimumProviderConfidence = selectedValue)"/>
|
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.LegalCheck.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.LegalCheck.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.LegalCheck.MinimumProviderConfidence = selectedValue)"/>
|
||||||
<ConfigurationProviderSelection Component="Components.LEGAL_CHECK_ASSISTANT" Data="@this.availableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.LegalCheck.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.LegalCheck.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.LegalCheck.PreselectedProvider = selectedValue)"/>
|
<ConfigurationProviderSelection Component="Components.LEGAL_CHECK_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.LegalCheck.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.LegalCheck.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.LegalCheck.PreselectedProvider = selectedValue)"/>
|
||||||
<ConfigurationSelect OptionDescription="@T("Preselect a profile")" Disabled="@(() => !this.SettingsManager.ConfigurationData.LegalCheck.PreselectOptions)" SelectedValue="@(() => ProfilePreselection.FromStoredValue(this.SettingsManager.ConfigurationData.LegalCheck.PreselectedProfile))" Data="@ConfigurationSelectDataFactory.GetComponentProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.LegalCheck.PreselectedProfile = selectedValue)" OptionHelp="@T("Choose whether the assistant should use the app default profile, no profile, or a specific profile.")"/>
|
<ConfigurationSelect OptionDescription="@T("Preselect a profile")" Disabled="@(() => !this.SettingsManager.ConfigurationData.LegalCheck.PreselectOptions)" SelectedValue="@(() => ProfilePreselection.FromStoredValue(this.SettingsManager.ConfigurationData.LegalCheck.PreselectedProfile))" Data="@ConfigurationSelectDataFactory.GetComponentProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.LegalCheck.PreselectedProfile = selectedValue)" OptionHelp="@T("Choose whether the assistant should use the app default profile, no profile, or a specific profile.")"/>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
}
|
}
|
||||||
<ConfigurationSelect OptionDescription="@T("Preselect a profile")" Disabled="@(() => !this.SettingsManager.ConfigurationData.MyTasks.PreselectOptions)" SelectedValue="@(() => ProfilePreselection.FromStoredValue(this.SettingsManager.ConfigurationData.MyTasks.PreselectedProfile))" Data="@ConfigurationSelectDataFactory.GetComponentProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.MyTasks.PreselectedProfile = selectedValue)" OptionHelp="@T("Choose whether the assistant should use the app default profile, no profile, or a specific profile.")"/>
|
<ConfigurationSelect OptionDescription="@T("Preselect a profile")" Disabled="@(() => !this.SettingsManager.ConfigurationData.MyTasks.PreselectOptions)" SelectedValue="@(() => ProfilePreselection.FromStoredValue(this.SettingsManager.ConfigurationData.MyTasks.PreselectedProfile))" Data="@ConfigurationSelectDataFactory.GetComponentProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.MyTasks.PreselectedProfile = selectedValue)" OptionHelp="@T("Choose whether the assistant should use the app default profile, no profile, or a specific profile.")"/>
|
||||||
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.MyTasks.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.MyTasks.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.MyTasks.MinimumProviderConfidence = selectedValue)"/>
|
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.MyTasks.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.MyTasks.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.MyTasks.MinimumProviderConfidence = selectedValue)"/>
|
||||||
<ConfigurationProviderSelection Component="Components.MY_TASKS_ASSISTANT" Data="@this.availableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.MyTasks.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.MyTasks.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.MyTasks.PreselectedProvider = selectedValue)"/>
|
<ConfigurationProviderSelection Component="Components.MY_TASKS_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.MyTasks.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.MyTasks.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.MyTasks.PreselectedProvider = selectedValue)"/>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
}
|
}
|
||||||
<ConfigurationText OptionDescription="@T("Preselect important aspects")" Disabled="@(() => !this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions)" Text="@(() => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedImportantAspects)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedImportantAspects = updatedText)" NumLines="2" OptionHelp="@T("Preselect aspects the optimizer should emphasize, such as role clarity, structure, or output constraints.")" Icon="@Icons.Material.Filled.List"/>
|
<ConfigurationText OptionDescription="@T("Preselect important aspects")" Disabled="@(() => !this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions)" Text="@(() => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedImportantAspects)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedImportantAspects = updatedText)" NumLines="2" OptionHelp="@T("Preselect aspects the optimizer should emphasize, such as role clarity, structure, or output constraints.")" Icon="@Icons.Material.Filled.List"/>
|
||||||
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PromptOptimizer.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PromptOptimizer.MinimumProviderConfidence = selectedValue)"/>
|
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PromptOptimizer.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PromptOptimizer.MinimumProviderConfidence = selectedValue)"/>
|
||||||
<ConfigurationProviderSelection Component="Components.PROMPT_OPTIMIZER_ASSISTANT" Data="@this.availableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedProvider = selectedValue)"/>
|
<ConfigurationProviderSelection Component="Components.PROMPT_OPTIMIZER_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedProvider = selectedValue)"/>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
<ConfigurationSelect OptionDescription="@T("Preselect a writing style")" Disabled="@(() => !this.SettingsManager.ConfigurationData.RewriteImprove.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.RewriteImprove.PreselectedWritingStyle)" Data="@ConfigurationSelectDataFactory.GetWritingStyles4RewriteData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.RewriteImprove.PreselectedWritingStyle = selectedValue)" OptionHelp="@T("Which writing style should be preselected?")"/>
|
<ConfigurationSelect OptionDescription="@T("Preselect a writing style")" Disabled="@(() => !this.SettingsManager.ConfigurationData.RewriteImprove.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.RewriteImprove.PreselectedWritingStyle)" Data="@ConfigurationSelectDataFactory.GetWritingStyles4RewriteData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.RewriteImprove.PreselectedWritingStyle = selectedValue)" OptionHelp="@T("Which writing style should be preselected?")"/>
|
||||||
<ConfigurationSelect OptionDescription="@T("Preselect a sentence structure")" Disabled="@(() => !this.SettingsManager.ConfigurationData.RewriteImprove.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.RewriteImprove.PreselectedSentenceStructure)" Data="@ConfigurationSelectDataFactory.GetSentenceStructureData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.RewriteImprove.PreselectedSentenceStructure = selectedValue)" OptionHelp="@T("Which voice should be preselected for the sentence structure?")"/>
|
<ConfigurationSelect OptionDescription="@T("Preselect a sentence structure")" Disabled="@(() => !this.SettingsManager.ConfigurationData.RewriteImprove.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.RewriteImprove.PreselectedSentenceStructure)" Data="@ConfigurationSelectDataFactory.GetSentenceStructureData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.RewriteImprove.PreselectedSentenceStructure = selectedValue)" OptionHelp="@T("Which voice should be preselected for the sentence structure?")"/>
|
||||||
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.RewriteImprove.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.RewriteImprove.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.RewriteImprove.MinimumProviderConfidence = selectedValue)"/>
|
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.RewriteImprove.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.RewriteImprove.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.RewriteImprove.MinimumProviderConfidence = selectedValue)"/>
|
||||||
<ConfigurationProviderSelection Component="Components.REWRITE_ASSISTANT" Data="@this.availableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.RewriteImprove.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.RewriteImprove.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.RewriteImprove.PreselectedProvider = selectedValue)"/>
|
<ConfigurationProviderSelection Component="Components.REWRITE_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.RewriteImprove.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.RewriteImprove.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.RewriteImprove.PreselectedProvider = selectedValue)"/>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<ConfigurationSelect OptionDescription="@T("Preselect the audience organizational level")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedAudienceOrganizationalLevel)" Data="@ConfigurationSelectDataFactory.GetSlideBuilderAudienceOrganizationalLevelData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedAudienceOrganizationalLevel = selectedValue)" OptionHelp="@T("Which audience organizational level should be preselected?")"/>
|
<ConfigurationSelect OptionDescription="@T("Preselect the audience organizational level")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedAudienceOrganizationalLevel)" Data="@ConfigurationSelectDataFactory.GetSlideBuilderAudienceOrganizationalLevelData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedAudienceOrganizationalLevel = selectedValue)" OptionHelp="@T("Which audience organizational level should be preselected?")"/>
|
||||||
<ConfigurationSelect OptionDescription="@T("Preselect the audience expertise")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedAudienceExpertise)" Data="@ConfigurationSelectDataFactory.GetSlideBuilderAudienceExpertiseData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedAudienceExpertise = selectedValue)" OptionHelp="@T("Which audience expertise should be preselected?")"/>
|
<ConfigurationSelect OptionDescription="@T("Preselect the audience expertise")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedAudienceExpertise)" Data="@ConfigurationSelectDataFactory.GetSlideBuilderAudienceExpertiseData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedAudienceExpertise = selectedValue)" OptionHelp="@T("Which audience expertise should be preselected?")"/>
|
||||||
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.SlideBuilder.MinimumProviderConfidence = selectedValue)"/>
|
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.SlideBuilder.MinimumProviderConfidence = selectedValue)"/>
|
||||||
<ConfigurationProviderSelection Component="Components.SLIDE_BUILDER_ASSISTANT" Data="@this.availableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedProvider = selectedValue)"/>
|
<ConfigurationProviderSelection Component="Components.SLIDE_BUILDER_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedProvider = selectedValue)"/>
|
||||||
<ConfigurationSelect OptionDescription="@T("Preselect a profile")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" SelectedValue="@(() => ProfilePreselection.FromStoredValue(this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedProfile))" Data="@ConfigurationSelectDataFactory.GetComponentProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedProfile = selectedValue)" OptionHelp="@T("Choose whether the assistant should use the app default profile, no profile, or a specific profile.")"/>
|
<ConfigurationSelect OptionDescription="@T("Preselect a profile")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" SelectedValue="@(() => ProfilePreselection.FromStoredValue(this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedProfile))" Data="@ConfigurationSelectDataFactory.GetComponentProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedProfile = selectedValue)" OptionHelp="@T("Choose whether the assistant should use the app default profile, no profile, or a specific profile.")"/>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
<ConfigurationText OptionDescription="@T("Preselect another language")" Disabled="@(() => !this.SettingsManager.ConfigurationData.Synonyms.PreselectOptions)" Icon="@Icons.Material.Filled.Translate" Text="@(() => this.SettingsManager.ConfigurationData.Synonyms.PreselectedOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.Synonyms.PreselectedOtherLanguage = updatedText)"/>
|
<ConfigurationText OptionDescription="@T("Preselect another language")" Disabled="@(() => !this.SettingsManager.ConfigurationData.Synonyms.PreselectOptions)" Icon="@Icons.Material.Filled.Translate" Text="@(() => this.SettingsManager.ConfigurationData.Synonyms.PreselectedOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.Synonyms.PreselectedOtherLanguage = updatedText)"/>
|
||||||
}
|
}
|
||||||
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.Synonyms.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Synonyms.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Synonyms.MinimumProviderConfidence = selectedValue)"/>
|
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.Synonyms.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Synonyms.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Synonyms.MinimumProviderConfidence = selectedValue)"/>
|
||||||
<ConfigurationProviderSelection Component="Components.SYNONYMS_ASSISTANT" Data="@this.availableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.Synonyms.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Synonyms.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Synonyms.PreselectedProvider = selectedValue)"/>
|
<ConfigurationProviderSelection Component="Components.SYNONYMS_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.Synonyms.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Synonyms.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Synonyms.PreselectedProvider = selectedValue)"/>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
}
|
}
|
||||||
<ConfigurationText OptionDescription="@T("Preselect important aspects")" Disabled="@(() => !this.SettingsManager.ConfigurationData.TextSummarizer.PreselectOptions)" Text="@(() => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedImportantAspects)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedImportantAspects = updatedText)" NumLines="2" OptionHelp="@T("Preselect aspects for the LLM to focus on when generating a summary, such as summary length or specific topics to emphasize.")" Icon="@Icons.Material.Filled.List"/>
|
<ConfigurationText OptionDescription="@T("Preselect important aspects")" Disabled="@(() => !this.SettingsManager.ConfigurationData.TextSummarizer.PreselectOptions)" Text="@(() => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedImportantAspects)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedImportantAspects = updatedText)" NumLines="2" OptionHelp="@T("Preselect aspects for the LLM to focus on when generating a summary, such as summary length or specific topics to emphasize.")" Icon="@Icons.Material.Filled.List"/>
|
||||||
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.TextSummarizer.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.TextSummarizer.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.TextSummarizer.MinimumProviderConfidence = selectedValue)"/>
|
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.TextSummarizer.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.TextSummarizer.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.TextSummarizer.MinimumProviderConfidence = selectedValue)"/>
|
||||||
<ConfigurationProviderSelection Component="Components.TEXT_SUMMARIZER_ASSISTANT" Data="@this.availableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.TextSummarizer.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedProvider = selectedValue)"/>
|
<ConfigurationProviderSelection Component="Components.TEXT_SUMMARIZER_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.TextSummarizer.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedProvider = selectedValue)"/>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<ConfigurationText OptionDescription="@T("Preselect another target language")" Disabled="@(() => !this.SettingsManager.ConfigurationData.Translation.PreselectOptions)" Icon="@Icons.Material.Filled.Translate" Text="@(() => this.SettingsManager.ConfigurationData.Translation.PreselectOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.Translation.PreselectOtherLanguage = updatedText)"/>
|
<ConfigurationText OptionDescription="@T("Preselect another target language")" Disabled="@(() => !this.SettingsManager.ConfigurationData.Translation.PreselectOptions)" Icon="@Icons.Material.Filled.Translate" Text="@(() => this.SettingsManager.ConfigurationData.Translation.PreselectOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.Translation.PreselectOtherLanguage = updatedText)"/>
|
||||||
}
|
}
|
||||||
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.Translation.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Translation.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Translation.MinimumProviderConfidence = selectedValue)"/>
|
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.Translation.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Translation.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Translation.MinimumProviderConfidence = selectedValue)"/>
|
||||||
<ConfigurationProviderSelection Component="Components.TRANSLATION_ASSISTANT" Data="@this.availableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.Translation.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Translation.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Translation.PreselectedProvider = selectedValue)"/>
|
<ConfigurationProviderSelection Component="Components.TRANSLATION_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.Translation.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Translation.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Translation.PreselectedProvider = selectedValue)"/>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
}
|
}
|
||||||
<ConfigurationSelect OptionDescription="@T("Preselect a writing style")" Disabled="@(() => !this.SettingsManager.ConfigurationData.EMail.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.EMail.PreselectedWritingStyle)" Data="@ConfigurationSelectDataFactory.GetWritingStyles4EMailData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.EMail.PreselectedWritingStyle = selectedValue)" OptionHelp="@T("Which writing style should be preselected?")"/>
|
<ConfigurationSelect OptionDescription="@T("Preselect a writing style")" Disabled="@(() => !this.SettingsManager.ConfigurationData.EMail.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.EMail.PreselectedWritingStyle)" Data="@ConfigurationSelectDataFactory.GetWritingStyles4EMailData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.EMail.PreselectedWritingStyle = selectedValue)" OptionHelp="@T("Which writing style should be preselected?")"/>
|
||||||
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.EMail.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.EMail.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.EMail.MinimumProviderConfidence = selectedValue)"/>
|
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.EMail.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.EMail.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.EMail.MinimumProviderConfidence = selectedValue)"/>
|
||||||
<ConfigurationProviderSelection Component="Components.EMAIL_ASSISTANT" Data="@this.availableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.EMail.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.EMail.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.EMail.PreselectedProvider = selectedValue)"/>
|
<ConfigurationProviderSelection Component="Components.EMAIL_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.EMail.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.EMail.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.EMail.PreselectedProvider = selectedValue)"/>
|
||||||
<ConfigurationSelect OptionDescription="@T("Preselect a profile")" Disabled="@(() => !this.SettingsManager.ConfigurationData.EMail.PreselectOptions)" SelectedValue="@(() => ProfilePreselection.FromStoredValue(this.SettingsManager.ConfigurationData.EMail.PreselectedProfile))" Data="@ConfigurationSelectDataFactory.GetComponentProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.EMail.PreselectedProfile = selectedValue)" OptionHelp="@T("Choose whether the assistant should use the app default profile, no profile, or a specific profile.")"/>
|
<ConfigurationSelect OptionDescription="@T("Preselect a profile")" Disabled="@(() => !this.SettingsManager.ConfigurationData.EMail.PreselectOptions)" SelectedValue="@(() => ProfilePreselection.FromStoredValue(this.SettingsManager.ConfigurationData.EMail.PreselectedProfile))" Data="@ConfigurationSelectDataFactory.GetComponentProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.EMail.PreselectedProfile = selectedValue)" OptionHelp="@T("Choose whether the assistant should use the app default profile, no profile, or a specific profile.")"/>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|||||||
@ -7,7 +7,7 @@ namespace AIStudio.Tools.ERIClient;
|
|||||||
|
|
||||||
public abstract class ERIClientBase(IERIDataSource dataSource) : IDisposable
|
public abstract class ERIClientBase(IERIDataSource dataSource) : IDisposable
|
||||||
{
|
{
|
||||||
protected readonly IERIDataSource dataSource = dataSource;
|
protected readonly IERIDataSource DataSource = dataSource;
|
||||||
|
|
||||||
protected static readonly JsonSerializerOptions JSON_OPTIONS = new()
|
protected static readonly JsonSerializerOptions JSON_OPTIONS = new()
|
||||||
{
|
{
|
||||||
@ -23,18 +23,18 @@ public abstract class ERIClientBase(IERIDataSource dataSource) : IDisposable
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
protected readonly HttpClient httpClient = new()
|
protected readonly HttpClient HttpClient = new()
|
||||||
{
|
{
|
||||||
BaseAddress = new Uri($"{dataSource.Hostname}:{dataSource.Port}"),
|
BaseAddress = new Uri($"{dataSource.Hostname}:{dataSource.Port}"),
|
||||||
};
|
};
|
||||||
|
|
||||||
protected string securityToken = string.Empty;
|
protected string SecurityToken = string.Empty;
|
||||||
|
|
||||||
#region Implementation of IDisposable
|
#region Implementation of IDisposable
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
this.httpClient.Dispose();
|
this.HttpClient.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@ -18,7 +18,7 @@ public class ERIClientV1(IERIDataSource dataSource) : ERIClientBase(dataSource),
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using var response = await this.httpClient.GetAsync("/auth/methods", cancellationToken);
|
using var response = await this.HttpClient.GetAsync("/auth/methods", cancellationToken);
|
||||||
if (!response.IsSuccessStatusCode)
|
if (!response.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
return new()
|
return new()
|
||||||
@ -66,14 +66,14 @@ public class ERIClientV1(IERIDataSource dataSource) : ERIClientBase(dataSource),
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var authMethod = this.dataSource.AuthMethod;
|
var authMethod = this.DataSource.AuthMethod;
|
||||||
var username = this.dataSource.Username;
|
var username = this.DataSource.Username;
|
||||||
switch (this.dataSource.AuthMethod)
|
switch (this.DataSource.AuthMethod)
|
||||||
{
|
{
|
||||||
case AuthMethod.NONE:
|
case AuthMethod.NONE:
|
||||||
using (var request = new HttpRequestMessage(HttpMethod.Post, $"auth?authMethod={authMethod}"))
|
using (var request = new HttpRequestMessage(HttpMethod.Post, $"auth?authMethod={authMethod}"))
|
||||||
{
|
{
|
||||||
using var noneAuthResponse = await this.httpClient.SendAsync(request, cancellationToken);
|
using var noneAuthResponse = await this.HttpClient.SendAsync(request, cancellationToken);
|
||||||
if(!noneAuthResponse.IsSuccessStatusCode)
|
if(!noneAuthResponse.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
return new()
|
return new()
|
||||||
@ -93,7 +93,7 @@ public class ERIClientV1(IERIDataSource dataSource) : ERIClientBase(dataSource),
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
this.securityToken = noneAuthResult.Token ?? string.Empty;
|
this.SecurityToken = noneAuthResult.Token ?? string.Empty;
|
||||||
return new()
|
return new()
|
||||||
{
|
{
|
||||||
Successful = true,
|
Successful = true,
|
||||||
@ -105,7 +105,7 @@ public class ERIClientV1(IERIDataSource dataSource) : ERIClientBase(dataSource),
|
|||||||
string password;
|
string password;
|
||||||
if (string.IsNullOrWhiteSpace(temporarySecret))
|
if (string.IsNullOrWhiteSpace(temporarySecret))
|
||||||
{
|
{
|
||||||
var passwordResponse = await rustService.GetSecret(this.dataSource);
|
var passwordResponse = await rustService.GetSecret(this.DataSource);
|
||||||
if (!passwordResponse.Success)
|
if (!passwordResponse.Success)
|
||||||
{
|
{
|
||||||
return new()
|
return new()
|
||||||
@ -127,7 +127,7 @@ public class ERIClientV1(IERIDataSource dataSource) : ERIClientBase(dataSource),
|
|||||||
request.Headers.Add("user", username);
|
request.Headers.Add("user", username);
|
||||||
request.Headers.Add("password", password);
|
request.Headers.Add("password", password);
|
||||||
|
|
||||||
using var usernamePasswordAuthResponse = await this.httpClient.SendAsync(request, cancellationToken);
|
using var usernamePasswordAuthResponse = await this.HttpClient.SendAsync(request, cancellationToken);
|
||||||
if(!usernamePasswordAuthResponse.IsSuccessStatusCode)
|
if(!usernamePasswordAuthResponse.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
return new()
|
return new()
|
||||||
@ -147,7 +147,7 @@ public class ERIClientV1(IERIDataSource dataSource) : ERIClientBase(dataSource),
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
this.securityToken = usernamePasswordAuthResult.Token ?? string.Empty;
|
this.SecurityToken = usernamePasswordAuthResult.Token ?? string.Empty;
|
||||||
return new()
|
return new()
|
||||||
{
|
{
|
||||||
Successful = true,
|
Successful = true,
|
||||||
@ -159,7 +159,7 @@ public class ERIClientV1(IERIDataSource dataSource) : ERIClientBase(dataSource),
|
|||||||
string token;
|
string token;
|
||||||
if (string.IsNullOrWhiteSpace(temporarySecret))
|
if (string.IsNullOrWhiteSpace(temporarySecret))
|
||||||
{
|
{
|
||||||
var tokenResponse = await rustService.GetSecret(this.dataSource);
|
var tokenResponse = await rustService.GetSecret(this.DataSource);
|
||||||
if (!tokenResponse.Success)
|
if (!tokenResponse.Success)
|
||||||
{
|
{
|
||||||
return new()
|
return new()
|
||||||
@ -178,7 +178,7 @@ public class ERIClientV1(IERIDataSource dataSource) : ERIClientBase(dataSource),
|
|||||||
{
|
{
|
||||||
request.Headers.Add("Authorization", $"Bearer {token}");
|
request.Headers.Add("Authorization", $"Bearer {token}");
|
||||||
|
|
||||||
using var tokenAuthResponse = await this.httpClient.SendAsync(request, cancellationToken);
|
using var tokenAuthResponse = await this.HttpClient.SendAsync(request, cancellationToken);
|
||||||
if(!tokenAuthResponse.IsSuccessStatusCode)
|
if(!tokenAuthResponse.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
return new()
|
return new()
|
||||||
@ -198,7 +198,7 @@ public class ERIClientV1(IERIDataSource dataSource) : ERIClientBase(dataSource),
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
this.securityToken = tokenAuthResult.Token ?? string.Empty;
|
this.SecurityToken = tokenAuthResult.Token ?? string.Empty;
|
||||||
return new()
|
return new()
|
||||||
{
|
{
|
||||||
Successful = true,
|
Successful = true,
|
||||||
@ -207,7 +207,7 @@ public class ERIClientV1(IERIDataSource dataSource) : ERIClientBase(dataSource),
|
|||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
this.securityToken = string.Empty;
|
this.SecurityToken = string.Empty;
|
||||||
return new()
|
return new()
|
||||||
{
|
{
|
||||||
Successful = false,
|
Successful = false,
|
||||||
@ -238,9 +238,9 @@ public class ERIClientV1(IERIDataSource dataSource) : ERIClientBase(dataSource),
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
using var request = new HttpRequestMessage(HttpMethod.Get, "/dataSource");
|
using var request = new HttpRequestMessage(HttpMethod.Get, "/dataSource");
|
||||||
request.Headers.Add("token", this.securityToken);
|
request.Headers.Add("token", this.SecurityToken);
|
||||||
|
|
||||||
using var response = await this.httpClient.SendAsync(request, cancellationToken);
|
using var response = await this.HttpClient.SendAsync(request, cancellationToken);
|
||||||
if(!response.IsSuccessStatusCode)
|
if(!response.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
return new()
|
return new()
|
||||||
@ -289,9 +289,9 @@ public class ERIClientV1(IERIDataSource dataSource) : ERIClientBase(dataSource),
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
using var request = new HttpRequestMessage(HttpMethod.Get, "/embedding/info");
|
using var request = new HttpRequestMessage(HttpMethod.Get, "/embedding/info");
|
||||||
request.Headers.Add("token", this.securityToken);
|
request.Headers.Add("token", this.SecurityToken);
|
||||||
|
|
||||||
using var response = await this.httpClient.SendAsync(request, cancellationToken);
|
using var response = await this.HttpClient.SendAsync(request, cancellationToken);
|
||||||
if(!response.IsSuccessStatusCode)
|
if(!response.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
return new()
|
return new()
|
||||||
@ -340,9 +340,9 @@ public class ERIClientV1(IERIDataSource dataSource) : ERIClientBase(dataSource),
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
using var request = new HttpRequestMessage(HttpMethod.Get, "/retrieval/info");
|
using var request = new HttpRequestMessage(HttpMethod.Get, "/retrieval/info");
|
||||||
request.Headers.Add("token", this.securityToken);
|
request.Headers.Add("token", this.SecurityToken);
|
||||||
|
|
||||||
using var response = await this.httpClient.SendAsync(request, cancellationToken);
|
using var response = await this.HttpClient.SendAsync(request, cancellationToken);
|
||||||
if(!response.IsSuccessStatusCode)
|
if(!response.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
return new()
|
return new()
|
||||||
@ -391,12 +391,12 @@ public class ERIClientV1(IERIDataSource dataSource) : ERIClientBase(dataSource),
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
using var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/retrieval");
|
using var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/retrieval");
|
||||||
requestMessage.Headers.Add("token", this.securityToken);
|
requestMessage.Headers.Add("token", this.SecurityToken);
|
||||||
|
|
||||||
using var content = new StringContent(JsonSerializer.Serialize(request, JSON_OPTIONS), Encoding.UTF8, "application/json");
|
using var content = new StringContent(JsonSerializer.Serialize(request, JSON_OPTIONS), Encoding.UTF8, "application/json");
|
||||||
requestMessage.Content = content;
|
requestMessage.Content = content;
|
||||||
|
|
||||||
using var response = await this.httpClient.SendAsync(requestMessage, cancellationToken);
|
using var response = await this.HttpClient.SendAsync(requestMessage, cancellationToken);
|
||||||
if(!response.IsSuccessStatusCode)
|
if(!response.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
return new()
|
return new()
|
||||||
@ -445,9 +445,9 @@ public class ERIClientV1(IERIDataSource dataSource) : ERIClientBase(dataSource),
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
using var request = new HttpRequestMessage(HttpMethod.Get, "/security/requirements");
|
using var request = new HttpRequestMessage(HttpMethod.Get, "/security/requirements");
|
||||||
request.Headers.Add("token", this.securityToken);
|
request.Headers.Add("token", this.SecurityToken);
|
||||||
|
|
||||||
using var response = await this.httpClient.SendAsync(request, cancellationToken);
|
using var response = await this.HttpClient.SendAsync(request, cancellationToken);
|
||||||
if(!response.IsSuccessStatusCode)
|
if(!response.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
return new()
|
return new()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user