mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-13 16:27:21 +00:00
Added the choice between formal and informal address to the whole app (#1200)
This commit is contained in:
1 parent
382db4b8d0
commit
c9a376f742
342 files changed
+14378
-1893
No files matched your search
@@ -1,10 +1,10 @@
|
||||
@attribute [Route(Routes.ASSISTANT_AGENDA)]
|
||||
@inherits AssistantBaseCore<AIStudio.Dialogs.Settings.SettingsDialogAgenda>
|
||||
|
||||
<MudTextField T="string" @bind-Text="@this.inputName" Validation="@this.ValidateName" Label="@T("Meeting Name")" Adornment="Adornment.Start" AdornmentIcon="@AppIcons.NAME" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="@T("Name the meeting, seminar, etc.")" Placeholder="@T("Weekly jour fixe")" Class="mb-3"/>
|
||||
<MudTextField T="string" @bind-Text="@this.inputTopic" Validation="@this.ValidateTopic" Label="@T("Topic")" Adornment="Adornment.Start" AdornmentIcon="@AppIcons.MEETING_TOPIC" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="@T("Describe the topic of the meeting, seminar, etc. Is it about quantum computing, software engineering, or is it a general business meeting?")" Placeholder="@T("Project meeting")" Class="mb-3"/>
|
||||
<MudTextField T="string" @bind-Text="@this.inputName" Validation="@this.ValidateName" Label="@T("Meeting Name")" Adornment="Adornment.Start" AdornmentIcon="@AppIcons.NAME" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="@TA("Name the meeting, seminar, etc.")" Placeholder="@T("Weekly jour fixe")" Class="mb-3"/>
|
||||
<MudTextField T="string" @bind-Text="@this.inputTopic" Validation="@this.ValidateTopic" Label="@T("Topic")" Adornment="Adornment.Start" AdornmentIcon="@AppIcons.MEETING_TOPIC" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="@TA("Describe the topic of the meeting, seminar, etc. Is it about quantum computing, software engineering, or is it a general business meeting?")" Placeholder="@T("Project meeting")" Class="mb-3"/>
|
||||
<ReadFileContent Text="@T("Load the content list from file")" FileContent="@this.inputContent" FileContentChanged="@this.ContentLoadedFromFile" EnableDragDrop="true"/>
|
||||
<DebouncedTextField @bind-Text="@this.inputContent" ValidationFunc="@this.ValidateContent" DebounceTime="TimeSpan.FromSeconds(1)" Label="@T("Content list")" Lines="6" Attributes="@USER_INPUT_ATTRIBUTES" HelpText="@T("Bullet list the content of the meeting, seminar, etc. roughly. Use dashes (-) to separate the items.")" Placeholder="@PLACEHOLDER_CONTENT" WhenTextCanged="@this.OnContentChanged" Icon="@AppIcons.LIST"/>
|
||||
<DebouncedTextField @bind-Text="@this.inputContent" ValidationFunc="@this.ValidateContent" DebounceTime="TimeSpan.FromSeconds(1)" Label="@T("Content list")" Lines="6" Attributes="@USER_INPUT_ATTRIBUTES" HelpText="@TA("Bullet list the content of the meeting, seminar, etc. roughly. Use dashes (-) to separate the items.")" Placeholder="@PLACEHOLDER_CONTENT" WhenTextCanged="@this.OnContentChanged" Icon="@AppIcons.LIST"/>
|
||||
<MudSelect T="string" Label="@T("(Optional) What topics should be the focus?")" MultiSelection="@true" @bind-SelectedValues="@this.selectedFoci" Variant="Variant.Outlined" Class="mb-3" Adornment="Adornment.Start" AdornmentIcon="@AppIcons.LIST">
|
||||
@foreach (var contentLine in this.contentLines)
|
||||
{
|
||||
@@ -29,11 +29,11 @@
|
||||
}
|
||||
</MudSelect>
|
||||
|
||||
<MudTextField T="string" @bind-Text="@this.inputObjective" Validation="@this.ValidateObjective" Label="@T("Objective")" Adornment="Adornment.Start" AdornmentIcon="@AppIcons.OBJECTIVE" Variant="Variant.Outlined" Lines="3" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="@T("Describe the objective(s) of the meeting, seminar, etc. What should be achieved?")" Placeholder="@T("Discuss the current project status and plan the next steps.")" Class="mb-3"/>
|
||||
<MudTextField T="string" @bind-Text="@this.inputObjective" Validation="@this.ValidateObjective" Label="@T("Objective")" Adornment="Adornment.Start" AdornmentIcon="@AppIcons.OBJECTIVE" Variant="Variant.Outlined" Lines="3" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="@TA("Describe the objective(s) of the meeting, seminar, etc. What should be achieved?")" Placeholder="@TA("Discuss the current project status and plan the next steps.")" Class="mb-3"/>
|
||||
<MudTextField T="string" @bind-Text="@this.inputModerator" Validation="@this.ValidateModerator" Label="@T("Moderator")" Adornment="Adornment.Start" AdornmentIcon="@AppIcons.MODERATOR" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="@T("Who will moderate the meeting, seminar, etc.?")" Placeholder="Jane Doe" Class="mb-3" />
|
||||
<MudTextField T="string" @bind-Text="@this.inputDuration" Validation="@this.ValidateDuration" Label="@T("Duration")" Adornment="Adornment.Start" AdornmentIcon="@AppIcons.TIME" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="@T("How long will the meeting, seminar, etc. last? E.g., '2 hours', or '2 days (first day 8 hours, then 4 hours)', etc.")" Placeholder="@T("2 hours")" Class="mb-3"/>
|
||||
<MudTextField T="string" @bind-Text="@this.inputStartTime" Validation="@this.ValidateStartTime" Label="Start time" Adornment="Adornment.Start" AdornmentIcon="@AppIcons.TIME" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="@T("When will the meeting, seminar, etc. start? E.g., '9:00 AM', or '9:00 AM (CET)', etc. When the meeting is a multi-day event, specify the start time for each day.")" Placeholder="@T("9:00 AM")" Class="mb-3"/>
|
||||
<MudTextField T="string" @bind-Text="@this.inputWhoIsPresenting" Label="@T("(Optional) Who is presenting?")" Variant="Variant.Outlined" Lines="6" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="@T("(Optional) List the persons who will present at the meeting, seminar, etc. Use dashes (-) to separate the items.")" Placeholder="@PLACEHOLDER_WHO_IS_PRESENTING" Class="mb-3"/>
|
||||
<MudTextField T="string" @bind-Text="@this.inputStartTime" Validation="@this.ValidateStartTime" Label="@T("Start time")" Adornment="Adornment.Start" AdornmentIcon="@AppIcons.TIME" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="@TA("When will the meeting, seminar, etc. start? E.g., '9:00 AM', or '9:00 AM (CET)', etc. When the meeting is a multi-day event, specify the start time for each day.")" Placeholder="@T("9:00 AM")" Class="mb-3"/>
|
||||
<MudTextField T="string" @bind-Text="@this.inputWhoIsPresenting" Label="@T("(Optional) Who is presenting?")" Variant="Variant.Outlined" Lines="6" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" HelperText="@TA("(Optional) List the persons who will present at the meeting, seminar, etc. Use dashes (-) to separate the items.")" Placeholder="@PLACEHOLDER_WHO_IS_PRESENTING" Class="mb-3"/>
|
||||
<MudTextSwitch Label="@T("Do the participants need to get to know each other first?")" @bind-Value="@this.introduceParticipants" LabelOn="@T("Yes, introduce participants")" LabelOff="@T("No, participants know each other")" />
|
||||
<EnumSelection T="NumberParticipants" @bind-Value="@this.numberParticipants" NameFunc="@(participants => participants.Name)" Icon="@AppIcons.PARTICIPANTS" Label="@T("Number of participants")" ValidateSelection="@this.ValidateNumberParticipants"/>
|
||||
<MudTextSwitch Label="@T("Should the participants be involved passively or actively?")" @bind-Value="@this.activeParticipation" LabelOn="@T("Active participation, like world café, discussions, etc.")" LabelOff="@T("Passive participation, like presentations, lectures, etc.")" />
|
||||
|
||||
@@ -12,7 +12,7 @@ public partial class AssistantAgenda : AssistantBaseCore<SettingsDialogAgenda>
|
||||
|
||||
protected override string Title => T("Agenda Planner");
|
||||
|
||||
protected override string Description => T("This agenda planner helps you create a structured agenda for your meeting or seminar. Just provide some basic information about the event, and the assistant will generate an agenda for you. You can also specify the duration, the start time, the location, the target language, and other details.");
|
||||
protected override string Description => TA("This agenda planner helps you create a structured agenda for your meeting or seminar. Just provide some basic information about the event, and the assistant will generate an agenda for you. You can also specify the duration, the start time, the location, the target language, and other details.");
|
||||
|
||||
// The prompt of this assistant demands the agenda in a fixed format, so the chat gets a prompt of its own, which keeps the knowledge and the language:
|
||||
protected override ChatSystemPromptChoice ChatSystemPrompt => ChatSystemPromptChoice.Custom(this.CreateChatSystemPrompt);
|
||||
@@ -352,7 +352,7 @@ public partial class AssistantAgenda : AssistantBaseCore<SettingsDialogAgenda>
|
||||
private string? ValidateLocation(string location)
|
||||
{
|
||||
if(!this.isMeetingVirtual && string.IsNullOrWhiteSpace(location))
|
||||
return T("Please provide a location for the meeting or the seminar.");
|
||||
return TA("Please provide a location for the meeting or the seminar.");
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -360,7 +360,7 @@ public partial class AssistantAgenda : AssistantBaseCore<SettingsDialogAgenda>
|
||||
private string? ValidateNumberParticipants(NumberParticipants selectedSize)
|
||||
{
|
||||
if(selectedSize is NumberParticipants.NOT_SPECIFIED)
|
||||
return T("Please select the number of participants.");
|
||||
return TA("Please select the number of participants.");
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -368,7 +368,7 @@ public partial class AssistantAgenda : AssistantBaseCore<SettingsDialogAgenda>
|
||||
private string? ValidateTargetLanguage(CommonLanguages language)
|
||||
{
|
||||
if(language is CommonLanguages.AS_IS)
|
||||
return T("Please select a target language for the agenda.");
|
||||
return TA("Please select a target language for the agenda.");
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -376,7 +376,7 @@ public partial class AssistantAgenda : AssistantBaseCore<SettingsDialogAgenda>
|
||||
private string? ValidateDuration(string duration)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(duration))
|
||||
return T("Please provide a duration for the meeting or the seminar, e.g. '2 hours', or '2 days (8 hours and 4 hours)', etc.");
|
||||
return TA("Please provide a duration for the meeting or the seminar, e.g. '2 hours', or '2 days (8 hours and 4 hours)', etc.");
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -384,7 +384,7 @@ public partial class AssistantAgenda : AssistantBaseCore<SettingsDialogAgenda>
|
||||
private string? ValidateStartTime(string startTime)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(startTime))
|
||||
return T("Please provide a start time for the meeting or the seminar. When the meeting is a multi-day event, specify the start time for each day, e.g. '9:00 AM, 10:00 AM', etc.");
|
||||
return TA("Please provide a start time for the meeting or the seminar. When the meeting is a multi-day event, specify the start time for each day, e.g. '9:00 AM, 10:00 AM', etc.");
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -392,7 +392,7 @@ public partial class AssistantAgenda : AssistantBaseCore<SettingsDialogAgenda>
|
||||
private string? ValidateCustomLanguage(string language)
|
||||
{
|
||||
if(this.selectedTargetLanguage == CommonLanguages.OTHER && string.IsNullOrWhiteSpace(language))
|
||||
return T("Please provide a custom language.");
|
||||
return TA("Please provide a custom language.");
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -400,7 +400,7 @@ public partial class AssistantAgenda : AssistantBaseCore<SettingsDialogAgenda>
|
||||
private string? ValidateTopic(string topic)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(topic))
|
||||
return T("Please provide a topic for the agenda. What is the meeting or the seminar about?");
|
||||
return TA("Please provide a topic for the agenda. What is the meeting or the seminar about?");
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -408,7 +408,7 @@ public partial class AssistantAgenda : AssistantBaseCore<SettingsDialogAgenda>
|
||||
private string? ValidateName(string name)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(name))
|
||||
return T("Please provide a name for the meeting or the seminar.");
|
||||
return TA("Please provide a name for the meeting or the seminar.");
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -416,12 +416,12 @@ public partial class AssistantAgenda : AssistantBaseCore<SettingsDialogAgenda>
|
||||
private string? ValidateContent(string content)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(content))
|
||||
return T("Please provide some content for the agenda. What are the main points of the meeting or the seminar?");
|
||||
return TA("Please provide some content for the agenda. What are the main points of the meeting or the seminar?");
|
||||
|
||||
var lines = content.Split('\n', StringSplitOptions.RemoveEmptyEntries);
|
||||
foreach (var line in lines)
|
||||
if(!line.TrimStart().StartsWith('-'))
|
||||
return T("Please start each line of your content list with a dash (-) to create a bullet point list.");
|
||||
return TA("Please start each line of your content list with a dash (-) to create a bullet point list.");
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -429,7 +429,7 @@ public partial class AssistantAgenda : AssistantBaseCore<SettingsDialogAgenda>
|
||||
private string? ValidateObjective(string objective)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(objective))
|
||||
return T("Please provide an objective for the meeting or the seminar. What do you want to achieve?");
|
||||
return TA("Please provide an objective for the meeting or the seminar. What do you want to achieve?");
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -437,7 +437,7 @@ public partial class AssistantAgenda : AssistantBaseCore<SettingsDialogAgenda>
|
||||
private string? ValidateModerator(string moderator)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(moderator))
|
||||
return T("Please provide a moderator for the meeting or the seminar. Who will lead the discussion?");
|
||||
return TA("Please provide a moderator for the meeting or the seminar. Who will lead the discussion?");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ namespace AIStudio.Assistants.Agenda;
|
||||
public static class NumberParticipantsExtensions
|
||||
{
|
||||
private static string TB(string fallbackEN) => Tools.PluginSystem.I18N.I.T(fallbackEN, typeof(NumberParticipantsExtensions).Namespace, nameof(NumberParticipantsExtensions));
|
||||
|
||||
private static string TA(string fallbackEN) => Tools.PluginSystem.I18N.I.TA(fallbackEN, typeof(NumberParticipantsExtensions).Namespace, nameof(NumberParticipantsExtensions));
|
||||
|
||||
extension(NumberParticipants numberParticipants)
|
||||
{
|
||||
public string Name => numberParticipants switch
|
||||
{
|
||||
NumberParticipants.NOT_SPECIFIED => TB("Please select how many participants are expected"),
|
||||
NumberParticipants.NOT_SPECIFIED => TA("Please select how many participants are expected"),
|
||||
|
||||
NumberParticipants.PEER_TO_PEER => TB("2 (peer to peer)"),
|
||||
|
||||
|
||||
Reference in new issue
Block a user