mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 00:07:21 +00:00
Added PowerPoint templates to the Slide Assistant (#1055)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
8c5cfa78b6
commit
6eb23ebbcb
136 files changed
+16535
-522
No files matched your search
@@ -1,16 +1,24 @@
|
||||
@using AIStudio.Settings
|
||||
@using AIStudio.Assistants.SlideBuilder
|
||||
@using AIStudio.Settings
|
||||
@using AIStudio.Tools.PowerPoint
|
||||
@using AIStudio.Tools.Rust
|
||||
@inherits SettingsDialogBase
|
||||
|
||||
<MudDialog>
|
||||
<TitleContent>
|
||||
<MudText Typo="Typo.h6" Class="d-flex align-center">
|
||||
<MudIcon Icon="@Icons.Material.Filled.Spellcheck" Class="mr-2" />
|
||||
@T("Assistant: Slide Planner Assistant Options")
|
||||
@T("Assistant: Slide Assistant Options")
|
||||
</MudText>
|
||||
</TitleContent>
|
||||
<DialogContent>
|
||||
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
||||
<ConfigurationOption OptionDescription="@T("Preselect Slide Planner Assistant options?")" LabelOn="@T("Slide Planner Assistant options are preselected")" LabelOff="@T("No Slide Planner Assistant options are preselected")" State="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions = updatedState)" OptionHelp="@T("When enabled, you can preselect slide builder options. This is might be useful when you prefer a specific language or LLM model.")"/>
|
||||
<ConfigurationOption OptionDescription="@T("Preselect Slide Assistant options?")" LabelOn="@T("Slide Assistant options are preselected")" LabelOff="@T("No Slide Assistant options are preselected")" State="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions = updatedState)" OptionHelp="@T("When enabled, you can preselect options of the Slide Assistant. This might be useful when you prefer a specific language or LLM model.")" IsLocked="() => ManagedConfiguration.TryGet(x => x.SlideBuilder, x => x.PreselectOptions, out var meta) && meta.IsLocked"/>
|
||||
|
||||
<MudText Typo="Typo.h6" Class="mb-3">@T("Content and audience")</MudText>
|
||||
<MudJustifiedText Typo="Typo.body2" Class="mb-3">
|
||||
@T("Preselect what the assistant starts with for each presentation: the aspects to emphasize, the language, the audience, and the occasion. You can still change them in the assistant.")
|
||||
</MudJustifiedText>
|
||||
<ConfigurationText OptionDescription="@T("Preselect important aspects")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" Text="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedImportantAspects)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedImportantAspects = updatedText)" NumLines="2" OptionHelp="@T("Preselect aspects for the LLM to focus on when generating slides, such as bullet points or specific topics to emphasize.")" Icon="@Icons.Material.Filled.List"/>
|
||||
<ConfigurationSelect OptionDescription="@T("Preselect the language")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedTargetLanguage)" Data="@ConfigurationSelectDataFactory.GetCommonLanguagesOptionalData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedTargetLanguage = selectedValue)" OptionHelp="@T("Which language should be preselected?")"/>
|
||||
@if (this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedTargetLanguage is CommonLanguages.OTHER)
|
||||
@@ -21,6 +29,74 @@
|
||||
<ConfigurationSelect OptionDescription="@T("Preselect the audience age group")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedAudienceAgeGroup)" Data="@ConfigurationSelectDataFactory.GetSlideBuilderAudienceAgeGroupData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedAudienceAgeGroup = selectedValue)" OptionHelp="@T("Which audience age group 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 occasion")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedOccasion)" Data="@ConfigurationSelectDataFactory.GetSlideBuilderOccasionData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedOccasion = selectedValue)" OptionHelp="@T("Which occasion of the presentation should be preselected?")"/>
|
||||
@if (this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedOccasion is PresentationOccasion.OTHER)
|
||||
{
|
||||
<ConfigurationText OptionDescription="@T("Preselect another occasion")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" Icon="@Icons.Material.Filled.Event" Text="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedOtherOccasion)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedOtherOccasion = updatedText)"/>
|
||||
}
|
||||
|
||||
<MudText Typo="Typo.h6" Class="mb-3 mt-6">@T("PowerPoint template")</MudText>
|
||||
<MudJustifiedText Typo="Typo.body2" Class="mb-3">
|
||||
@SlideAssistantTexts.WhatTheLLMKnowsOfLayouts
|
||||
</MudJustifiedText>
|
||||
<ConfigurationFile OptionDescription="@T("Preselect a PowerPoint template")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" Icon="@Icons.Material.Filled.Slideshow" Text="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.TemplatePath)" TextUpdate="@this.SetTemplatePath" FileDialogTitle="@T("Select a PowerPoint template")" Filter="@([FileTypes.POWER_POINT_TEMPLATE])" OptionHelp="@T("The slides use the layouts of this PowerPoint presentation or template (.pptx, .potx), and you can create a PowerPoint file (.pptx) from the result. OpenDocument presentations (.odp, .otp) cannot serve as a template yet. Leave it empty to plan an outline only.")" IsLocked="() => ManagedConfiguration.TryGet(x => x.SlideBuilder, x => x.TemplatePath, out var meta) && meta.IsLocked"/>
|
||||
<ConfigurationText OptionDescription="@T("Preselect the footer text")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" Icon="@Icons.Material.Filled.ShortText" Text="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedFooterText)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedFooterText = updatedText)" OptionHelp="@T("Shown on every slide whose layout has a footer, e.g., your name, organization, and date. Leave it empty for no footer.")" IsLocked="() => ManagedConfiguration.TryGet(x => x.SlideBuilder, x => x.PreselectedFooterText, out var meta) && meta.IsLocked"/>
|
||||
<ConfigurationSelect OptionDescription="@T("Preselect the maximum number of bullet points per slide")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedMaxBulletPointsPerSlide)" Data="@this.BulletPointMaximumOptions" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedMaxBulletPointsPerSlide = selectedValue)" OptionHelp="@T("A slide holds at most this many bullet points, in all of its text slots together. Match it to the room for text in the layouts of your template.")" IsLocked="() => ManagedConfiguration.TryGet(x => x.SlideBuilder, x => x.PreselectedMaxBulletPointsPerSlide, out var meta) && meta.IsLocked"/>
|
||||
<ConfigurationOption OptionDescription="@T("Preselect keeping empty picture placeholders?")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" LabelOn="@T("Empty picture placeholders are kept")" LabelOff="@T("Empty picture placeholders are left out")" State="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedKeepEmptyPicturePlaceholders)" StateUpdate="@(value => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedKeepEmptyPicturePlaceholders = value)" OptionHelp="@SlideAssistantTexts.WhatKeepingEmptyPicturePlaceholdersDoes" IsLocked="() => ManagedConfiguration.TryGet(x => x.SlideBuilder, x => x.PreselectedKeepEmptyPicturePlaceholders, out var meta) && meta.IsLocked"/>
|
||||
|
||||
<MudText Typo="Typo.h6" Class="mb-3 mt-6">@T("Layouts for kinds of slides")</MudText>
|
||||
<MudJustifiedText Typo="Typo.body2" Class="mb-3">
|
||||
@if (this.layoutOptions.Count > 0)
|
||||
{
|
||||
@SlideAssistantTexts.WhatALayoutChoiceDoes
|
||||
}
|
||||
else
|
||||
{
|
||||
@T("Preselect a readable template above to choose its layouts for kinds of slides.")
|
||||
}
|
||||
</MudJustifiedText>
|
||||
@if (this.layoutOptions.Count > 0)
|
||||
{
|
||||
<LayoutChoicePanels IsChosen="@(purpose => this.PreselectedLayoutOf(purpose).Length > 0)">
|
||||
<ChoiceContent Context="purpose">
|
||||
<ConfigurationSelect OptionDescription="@purpose.Label()" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" SelectedValue="@(() => this.PreselectedLayoutOf(purpose))" Data="@this.layoutOptions" SelectionUpdate="@(selectedValue => this.SetPreselectedLayout(purpose, selectedValue))" OptionHelp="@purpose.Help()" IsLocked="() => ManagedConfiguration.TryGet(x => x.SlideBuilder, x => x.PreselectedLayouts, out var meta) && meta.IsLocked"/>
|
||||
</ChoiceContent>
|
||||
</LayoutChoicePanels>
|
||||
}
|
||||
|
||||
<MudText Typo="Typo.h6" Class="mb-3 mt-6">@T("Slides of the template")</MudText>
|
||||
<MudJustifiedText Typo="Typo.body2" Class="mb-3">
|
||||
@if (this.template is { Slides.Count: > 0 })
|
||||
{
|
||||
@SlideAssistantTexts.WhatHappensToTemplateSlides
|
||||
}
|
||||
else if (this.template is not null)
|
||||
{
|
||||
@T("The preselected template contains no slides besides its layouts.")
|
||||
}
|
||||
else
|
||||
{
|
||||
@T("Preselect a readable template above to choose what the presentation does with its slides.")
|
||||
}
|
||||
</MudJustifiedText>
|
||||
@if (this.template is { } loadedTemplate)
|
||||
{
|
||||
@foreach (var templateSlide in loadedTemplate.Slides)
|
||||
{
|
||||
<ConfigurationSelect OptionDescription="@templateSlide.Label()" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" SelectedValue="@(() => this.PreselectedUseOf(templateSlide))" Data="@UseOptionsOf(templateSlide)" SelectionUpdate="@(selectedValue => this.SetPreselectedUse(templateSlide.Number, selectedValue))" IsLocked="@AreTemplateSlideUsesLocked"/>
|
||||
}
|
||||
}
|
||||
|
||||
<MudText Typo="Typo.h6" Class="mb-3 mt-6">@T("Visual elements")</MudText>
|
||||
<MudJustifiedText Typo="Typo.body2" Class="mb-3">
|
||||
@SlideAssistantTexts.WhatAPictureLibraryOffers
|
||||
</MudJustifiedText>
|
||||
<ConfigurationDirectory OptionDescription="@T("Preselect a picture library")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" Icon="@Icons.Material.Filled.PhotoLibrary" Text="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedPictureLibraryPath)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedPictureLibraryPath = updatedText)" DirectoryDialogTitle="@T("Select a picture library")" OptionHelp="@T("The LLM may choose pictures and icons for the slides from this folder. Leave it empty for no picture library.")" IsLocked="() => ManagedConfiguration.TryGet(x => x.SlideBuilder, x => x.PreselectedPictureLibraryPath, out var meta) && meta.IsLocked"/>
|
||||
|
||||
<MudText Typo="Typo.h6" Class="mb-3 mt-6">@T("AI selection")</MudText>
|
||||
<MudJustifiedText Typo="Typo.body2" Class="mb-3">
|
||||
@T("Preselect which LLM plans the slides and which profile it gets. A profile can, e.g., name your organization, which the LLM may use for the imprint.")
|
||||
</MudJustifiedText>
|
||||
<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)"/>
|
||||
<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.")"/>
|
||||
|
||||
Reference in new issue
Block a user