AI-Studio/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogChat.razor
Peer Schütt 5ae8d7e2a7 Merge branch 'main' into tool_calling_v2
# Conflicts:
#	app/MindWork AI Studio/Assistants/AssistantBase.razor.cs
#	app/MindWork AI Studio/Assistants/I18N/allTexts.lua
#	app/MindWork AI Studio/Components/ChatComponent.razor.cs
#	app/MindWork AI Studio/Plugins/configuration/plugin.lua
#	app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua
#	app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua
#	app/MindWork AI Studio/Provider/AlibabaCloud/ProviderAlibabaCloud.cs
#	app/MindWork AI Studio/Provider/BaseProvider.cs
#	app/MindWork AI Studio/Provider/DeepSeek/ProviderDeepSeek.cs
#	app/MindWork AI Studio/Provider/Fireworks/ProviderFireworks.cs
#	app/MindWork AI Studio/Provider/GWDG/ProviderGWDG.cs
#	app/MindWork AI Studio/Provider/Google/ProviderGoogle.cs
#	app/MindWork AI Studio/Provider/Groq/ProviderGroq.cs
#	app/MindWork AI Studio/Provider/Helmholtz/ProviderHelmholtz.cs
#	app/MindWork AI Studio/Provider/HuggingFace/ProviderHuggingFace.cs
#	app/MindWork AI Studio/Provider/Mistral/ProviderMistral.cs
#	app/MindWork AI Studio/Provider/OpenAI/ProviderOpenAI.cs
#	app/MindWork AI Studio/Provider/OpenAI/ResponsesAPIRequest.cs
#	app/MindWork AI Studio/Provider/OpenRouter/ProviderOpenRouter.cs
#	app/MindWork AI Studio/Provider/Perplexity/ProviderPerplexity.cs
#	app/MindWork AI Studio/Provider/SelfHosted/ProviderSelfHosted.cs
#	app/MindWork AI Studio/Provider/X/ProviderX.cs
#	app/MindWork AI Studio/Settings/DataModel/Data.cs
#	app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs
#	app/MindWork AI Studio/Tools/PluginSystem/PluginFactory.Loading.cs
#	app/MindWork AI Studio/wwwroot/changelog/v26.4.1.md
2026-06-03 15:19:52 +02:00

39 lines
5.7 KiB
Plaintext

@using AIStudio.Settings
@using AIStudio.Settings.DataModel
@inherits SettingsDialogBase
<MudDialog>
<TitleContent>
<MudText Typo="Typo.h6" Class="d-flex align-center">
<MudIcon Icon="@Icons.Material.Filled.Chat" Class="mr-2" />
@T("Chat Options")
</MudText>
</TitleContent>
<DialogContent>
<ConfigurationSelect OptionDescription="@T("Shortcut to send input")" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Chat.ShortcutSendBehavior)" Data="@ConfigurationSelectDataFactory.GetSendBehaviorData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Chat.ShortcutSendBehavior = selectedValue)" OptionHelp="@T("Do you want to use any shortcut to send your input?")"/>
<ConfigurationOption OptionDescription="@T("Show the latest message after loading?")" LabelOn="@T("Latest message is shown, after loading a chat")" LabelOff="@T("First (oldest) message is shown, after loading a chat")" State="@(() => this.SettingsManager.ConfigurationData.Chat.ShowLatestMessageAfterLoading)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.Chat.ShowLatestMessageAfterLoading = updatedState)" OptionHelp="@T("When enabled, the latest message is shown after loading a chat. When disabled, the first (oldest) message is shown.")"/>
<ConfigurationSelect OptionDescription="@T("Provider selection when creating new chats")" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Chat.AddChatProviderBehavior)" Data="@ConfigurationSelectDataFactory.GetAddChatProviderBehavior()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Chat.AddChatProviderBehavior = selectedValue)" OptionHelp="@T("Control how the LLM provider for added chats is selected.")"/>
<ConfigurationSelect OptionDescription="@T("Provider selection when loading a chat and sending assistant results to chat")" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Chat.LoadingProviderBehavior)" Data="@ConfigurationSelectDataFactory.GetLoadingChatProviderBehavior()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Chat.LoadingProviderBehavior = selectedValue)" OptionHelp="@T("Control how the LLM provider for loaded chats is selected and when assistant results are sent to chat.")"/>
<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.")"/>
<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 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>
<ToolDefaultsConfiguration Component="Components.CHAT" IncludeVisibilityToggle="@false" />
@if (PreviewFeatures.PRE_RAG_2024.IsEnabled(this.SettingsManager))
{
<DataSourceSelection SelectionMode="DataSourceSelectionMode.CONFIGURATION_MODE" AutoSaveAppSettings="@true" @bind-DataSourceOptions="@this.SettingsManager.ConfigurationData.Chat.PreselectedDataSourceOptions" ConfigurationHeaderMessage="@T("You can set default data sources and options for new chats. You can change these settings later for each individual chat.")"/>
<ConfigurationSelect OptionDescription="@T("Apply default data source option when sending assistant results to chat")" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Chat.SendToChatDataSourceBehavior)" Data="@ConfigurationSelectDataFactory.GetSendToChatDataSourceBehaviorData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Chat.SendToChatDataSourceBehavior = selectedValue)" OptionHelp="@T("Do you want to apply the default data source options when sending assistant results to chat?")"/>
}
</DialogContent>
<DialogActions>
<MudButton OnClick="@this.Close" Variant="Variant.Filled">
@T("Close")
</MudButton>
</DialogActions>
</MudDialog>