Added the choice between formal and informal address to the whole app (#1200)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-13 10:16:56 +01:00
1 parent 382db4b8d0
commit c9a376f742
342 files changed
+14378 -1893

No files matched your search

@@ -10,7 +10,7 @@
are listed in a table, whose rows would otherwise ask for the same name. *@
<PathDropZone IsArea="@true" Context="isDropTarget">
<MudJustifiedText Class="mb-3" Typo="Typo.body1">
@T("Create your custom chat template to tailor the LLM's behavior for specific tasks or domains. Define a custom system prompt and provide an example conversation to design an AI experience perfectly suited to your requirements.")
@TA("Create your custom chat template to tailor the LLM's behavior for specific tasks or domains. Define a custom system prompt and provide an example conversation to design an AI experience perfectly suited to your requirements.")
</MudJustifiedText>
<MudJustifiedText Class="mb-3" Typo="Typo.body1">
@@ -46,22 +46,22 @@
AdornmentIcon="@AppIcons.PROMPT"
Adornment="Adornment.Start"
Immediate="@true"
Label="@T("What system prompt do you want to use?")"
Label="@TA("What system prompt do you want to use?")"
Variant="Variant.Outlined"
Lines="6"
MaxLines="12"
Sizing="InputSizing.Auto"
Class="mb-3"
UserAttributes="@SPELLCHECK_ATTRIBUTES"
HelperText="@T("Tell the AI your system prompt.")"
HelperText="@TA("Tell the AI your system prompt.")"
ReadOnly="@this.IsReadOnly"
/>
<MudJustifiedText Class="mb-3" Typo="Typo.body1">
@T("Are you unsure which system prompt to use? You might start with the default system prompt that AI Studio uses for all chats.")
@TA("Are you unsure which system prompt to use? You might start with the default system prompt that AI Studio uses for all chats.")
</MudJustifiedText>
<MudButton Class="mb-3" Color="Color.Default" OnClick="@this.UseDefaultSystemPrompt" StartIcon="@AppIcons.PROMPT" Variant="Variant.Filled" Disabled="@this.IsReadOnly">
@T("Use the default system prompt")
@TA("Use the default system prompt")
</MudButton>
<ReadFileContent Text="@T("Load system prompt from file")" @bind-FileContent="@this.DataSystemPrompt" EnableDragDrop="true" Disabled="@this.IsReadOnly"/>
@@ -69,7 +69,7 @@
@T("Predefined User Input")
</MudText>
<MudJustifiedText Class="mb-3" Typo="Typo.body1">
@T("You might want to predefine a first message that will be copied into the user prompt, when you use this chat template. This message could for example be a blueprint for a structured message that this chat template is defined to work with.")
@TA("You might want to predefine a first message that will be copied into the user prompt when you use this chat template. This message could, for example, be a blueprint for a structured message that this chat template is defined to work with.")
</MudJustifiedText>
<MudTextField
T="string"
@@ -77,14 +77,14 @@
AdornmentIcon="@AppIcons.PROMPT"
Adornment="Adornment.Start"
Immediate="@true"
Label="@T("What predefined user input do you want to use?")"
Label="@TA("What predefined user input do you want to use?")"
Variant="Variant.Outlined"
Lines="4"
MaxLines="12"
Sizing="InputSizing.Auto"
Class="mb-3"
UserAttributes="@SPELLCHECK_ATTRIBUTES"
HelperText="@T("Tell the AI your predefined user input.")"
HelperText="@TA("Tell the AI your predefined user input.")"
ReadOnly="@this.IsReadOnly"
/>
<ReadFileContent Text="@T("Load predefined user input from file")" @bind-FileContent="@this.PredefinedUserPrompt" EnableDragDrop="true" Disabled="@this.IsReadOnly"/>
@@ -93,14 +93,14 @@
@T("File Attachments")
</MudText>
<MudJustifiedText Class="mb-3" Typo="Typo.body1">
@T("You can attach files that will be automatically included when using this chat template. These files will be added to the first message sent in any chat using this template.")
@TA("You can attach files that will be automatically included when using this chat template. These files will be added to the first message sent in any chat using this template.")
</MudJustifiedText>
@if (!this.IsEditing && !this.IsReadOnly)
{
@if (this.HasUnresolvedAttachments)
{
<MudAlert Severity="Severity.Warning" Variant="Variant.Filled" Icon="@AppIcons.WARNING" Class="mb-3">
@T("Some attachments of this chat template are not on this computer. Please relink or remove them before you add the template.")
@TA("Some attachments of this chat template are not on this computer. Please relink or remove them before you add the template.")
</MudAlert>
}
@if (!string.IsNullOrWhiteSpace(this.relinkIssue))
@@ -115,7 +115,7 @@
<MudTextField T="string" Value="@attachment.ReplacementPath"
ValueChanged="@(value => this.UpdateRelinkPath(currentIndex, value))"
Label="@string.Format(T("Relink attachment: {0}"), attachment.OriginalPath)"
HelperText="@T("Enter the full path of a file on this computer, or remove the attachment.")" Variant="Variant.Outlined" Immediate="@true" />
HelperText="@TA("Enter the full path of a file on this computer, or remove the attachment.")" Variant="Variant.Outlined" Immediate="@true" />
<MudTooltip Text="@T("Remove this attachment")">
<MudIconButton Icon="@AppIcons.DELETE" Color="Color.Error" OnClick="@(() => this.RemoveAttachmentToRelink(currentIndex))" />
</MudTooltip>
@@ -134,9 +134,9 @@
@T("Profile Usage")
</MudText>
<MudJustifiedText Class="mb-3" Typo="Typo.body1">
@T("Using some chat templates in tandem with profiles might cause issues. Therefore, you might prohibit the usage of profiles here.")
@TA("Using some chat templates in tandem with profiles might cause issues. Therefore, you might prohibit the usage of profiles here.")
</MudJustifiedText>
<MudTextSwitch @bind-Value="@this.AllowProfileUsage" Color="Color.Primary" Label="@T("Allow the use of profiles together with this chat template?")" LabelOn="@T("Yes, allow profiles when using this template")" LabelOff="@T("No, prohibit profile use for this template")" Disabled="@this.IsReadOnly" />
<MudTextSwitch @bind-Value="@this.AllowProfileUsage" Color="Color.Primary" Label="@TA("Allow the use of profiles together with this chat template?")" LabelOn="@T("Yes, allow profiles when using this template")" LabelOff="@T("No, prohibit profile use for this template")" Disabled="@this.IsReadOnly" />
@if (this.AllowProfileUsage)
{
<MudJustifiedText Class="mb-3 mt-3" Typo="Typo.body1">
@@ -190,28 +190,28 @@
@T("Workspace")
</MudText>
<MudJustifiedText Class="mb-3" Typo="Typo.body1">
@T("A chat template may keep its chats in a workspace of its own, which is created when it does not exist yet. This applies whenever a chat would otherwise be a disappearing chat, for example, when you start a new chat outside the workspaces or pick this template in a new chat. A chat you start in a workspace on purpose, for example, from the workspace list, stays in that workspace.")
@TA("A chat template may keep its chats in a workspace of its own, which is created when it does not exist yet. This applies whenever a chat would otherwise be a disappearing chat, for example, when you start a new chat outside the workspaces or pick this template in a new chat. A chat you start in a workspace on purpose, for example, from the workspace list, stays in that workspace.")
</MudJustifiedText>
@* While workspaces are off, nothing goes into a workspace, so choosing one here would promise what no chat does: *@
@if (this.AreWorkspacesDisabled)
{
<MudAlert Severity="Severity.Warning" Class="mb-3">
@T("Workspaces are switched off in your workspace settings. While they are off, chats with this template belong to no workspace, and they do not move into a workspace when you switch workspaces on again. You can change this choice once workspaces are on.")
@TA("Workspaces are switched off in your workspace settings. While they are off, chats with this template belong to no workspace, and they do not move into a workspace when you switch workspaces on again. You can change this choice once workspaces are on.")
</MudAlert>
}
<MudTextSwitch @bind-Value="@this.preselectWorkspace" Color="Color.Primary" Label="@T("Does this chat template keep its chats in a workspace?")" LabelOn="@T("Yes, chats with this template go into a workspace")" LabelOff="@T("No, chats go where they would go anyway")" Disabled="@this.IsWorkspaceChoiceLocked"/>
@if (this.preselectWorkspace)
{
<WorkspaceNameField @bind-WorkspaceName="@this.selectedWorkspaceName" SelectLabel="@T("Existing workspace (Optional)")" Label="@T("Workspace name")" HelperText="@T("Choose an existing workspace or enter a name that should be created when a chat with this template starts.")" Validation="@this.ValidateWorkspaceName" Immediate="@true" ReadOnly="@this.IsWorkspaceChoiceLocked" SelectClass="mb-3 mt-3 rounded-lg" TextFieldClass="mb-3 mt-3"/>
<WorkspaceNameField @bind-WorkspaceName="@this.selectedWorkspaceName" SelectLabel="@T("Existing workspace (Optional)")" Label="@T("Workspace name")" HelperText="@TA("Choose an existing workspace or enter a name that should be created when a chat with this template starts.")" Validation="@this.ValidateWorkspaceName" Immediate="@true" ReadOnly="@this.IsWorkspaceChoiceLocked" SelectClass="mb-3 mt-3 rounded-lg" TextFieldClass="mb-3 mt-3"/>
}
<MudText Typo="Typo.h6" Class="mb-3 mt-6">
@T("Tools")
</MudText>
<MudJustifiedText Class="mb-3" Typo="Typo.body1">
@T("A chat template may decide which tools a chat starts with. Without such a decision, those chats start with the tools you chose as your default in the chat options. Deciding and then picking nothing is a different statement: such chats start with no tool at all, no matter what your default says.")
@TA("A chat template may decide which tools a chat starts with. Without such a decision, those chats start with the tools you chose as your default in the chat options. Deciding and then picking nothing is a different statement: such chats start with no tool at all, no matter what your default says.")
</MudJustifiedText>
<MudTextSwitch @bind-Value="@this.preselectTools" Color="Color.Primary" Label="@T("Does this chat template preselect tools?")" LabelOn="@T("Yes, this template decides which tools a chat starts with")" LabelOff="@T("No, chats keep the tools from your chat options")" Disabled="@this.IsReadOnly"/>
<MudTextSwitch @bind-Value="@this.preselectTools" Color="Color.Primary" Label="@T("Does this chat template preselect tools?")" LabelOn="@T("Yes, this template decides which tools a chat starts with")" LabelOff="@TA("No, chats keep the tools from your chat options")" Disabled="@this.IsReadOnly"/>
@if (this.preselectTools)
{
<MudPaper Class="pa-3 mb-8 mt-3 border-dashed border rounded-lg">
@@ -225,9 +225,9 @@
@T("Data Sources")
</MudText>
<MudJustifiedText Class="mb-3" Typo="Typo.body1">
@T("The same goes for your data. A chat template may bring its own data source options, which includes leaving the choice of sources to the AI. Without them, those chats start with the data source options from your chat options.")
@TA("The same goes for your data. A chat template may bring its own data source options, which includes leaving the choice of sources to the AI. Without them, those chats start with the data source options from your chat options.")
</MudJustifiedText>
<MudTextSwitch @bind-Value="@this.preselectDataSources" Color="Color.Primary" Label="@T("Does this chat template preselect data sources?")" LabelOn="@T("Yes, this template decides which data a chat starts with")" LabelOff="@T("No, chats keep the data source options from your chat options")" Disabled="@this.IsReadOnly"/>
<MudTextSwitch @bind-Value="@this.preselectDataSources" Color="Color.Primary" Label="@T("Does this chat template preselect data sources?")" LabelOn="@T("Yes, this template decides which data a chat starts with")" LabelOff="@TA("No, chats keep the data source options from your chat options")" Disabled="@this.IsReadOnly"/>
@if (this.preselectDataSources)
{
<DataSourceSelection SelectionMode="DataSourceSelectionMode.CONFIGURATION_MODE" AutoSaveAppSettings="@false" ConfiguresChatDefaults="@false" ReadOnly="@this.IsReadOnly" @bind-DataSourceOptions="@this.templateDataSourceOptions" ConfigurationHeaderMessage="@T("A chat started with this template begins with these data sources and options. All of it stays changeable in the chat itself.")"/>
@@ -238,7 +238,7 @@
@T("Example Conversation")
</MudText>
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
@T("Add messages of an example conversation (user prompt followed by assistant prompt) to demonstrate the desired interaction pattern. These examples help the AI understand your expectations by showing it the correct format, style, and content of responses before it receives actual user inputs.")
@TA("Add messages of an example conversation (user prompt followed by assistant prompt) to demonstrate the desired interaction pattern. These examples help the AI understand your expectations by showing it the correct format, style, and content of responses before it receives actual user inputs.")
</MudJustifiedText>
<MudTable Items="@this.dataExampleConversation" FixedHeader="true" Hover="true" Class="mt-3 mb-3" CanCancelEdit="true" CancelEditTooltip="@T("Cancel")" CommitEditTooltip="@T("Commit Changes")" Outlined="true" RowEditCancel="@this.ResetItem" RowEditPreview="@this.BackupItem" EditTrigger="TableEditTrigger.RowClick" IsEditRowSwitchingBlocked="false" RowEditCommit="@this.CommitInlineEdit">
<ColGroup>