Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration for preview feature visibility #222

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/MindWork AI Studio/Pages/Settings.razor
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
<ConfigurationOption OptionDescription="Enable spellchecking?" LabelOn="Spellchecking is enabled" LabelOff="Spellchecking is disabled" State="@(() => this.SettingsManager.ConfigurationData.App.EnableSpellchecking)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.App.EnableSpellchecking = updatedState)" OptionHelp="When enabled, spellchecking will be active in all input fields. Depending on your operating system, errors may not be visually highlighted, but right-clicking may still offer possible corrections." />
<ConfigurationSelect OptionDescription="Check for updates" SelectedValue="@(() => this.SettingsManager.ConfigurationData.App.UpdateBehavior)" Data="@ConfigurationSelectDataFactory.GetUpdateBehaviorData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.App.UpdateBehavior = selectedValue)" OptionHelp="How often should we check for app updates?"/>
<ConfigurationSelect OptionDescription="Navigation bar behavior" SelectedValue="@(() => this.SettingsManager.ConfigurationData.App.NavigationBehavior)" Data="@ConfigurationSelectDataFactory.GetNavBehaviorData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.App.NavigationBehavior = selectedValue)" OptionHelp="Select the desired behavior for the navigation bar."/>
<ConfigurationSelect OptionDescription="Preview feature visibility" SelectedValue="@(() => this.SettingsManager.ConfigurationData.App.PreviewVisibility)" Data="@ConfigurationSelectDataFactory.GetPreviewVisibility()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.App.PreviewVisibility = selectedValue)" OptionHelp="Do you want to show preview features in the app?"/>
<ConfigurationProviderSelection Data="@this.availableProviders" SelectedValue="@(() => this.SettingsManager.ConfigurationData.App.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.App.PreselectedProvider = selectedValue)" HelpText="@(() => "Would you like to set one provider as the default for the entire app? When you configure a different provider for an assistant, it will always take precedence.")"/>
<ConfigurationSelect OptionDescription="Preselect one of your profiles?" SelectedValue="@(() => this.SettingsManager.ConfigurationData.App.PreselectedProfile)" Data="@ConfigurationSelectDataFactory.GetProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.App.PreselectedProfile = selectedValue)" OptionHelp="Would you like to set one of your profiles as the default for the entire app? When you configure a different profile for an assistant, it will always take precedence."/>
</ExpansionPanel>
Expand Down
9 changes: 9 additions & 0 deletions app/MindWork AI Studio/Settings/ConfigurationSelectData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ public static IEnumerable<ConfigurationSelectData<WorkspaceDisplayBehavior>> Get
yield return new("Toggle the sidebar: show the workspaces next to the chat when desired", WorkspaceDisplayBehavior.TOGGLE_SIDEBAR);
yield return new("Sidebar is always visible: show the workspaces next to the chat all the time", WorkspaceDisplayBehavior.SIDEBAR_ALWAYS_VISIBLE);
}

public static IEnumerable<ConfigurationSelectData<PreviewVisibility>> GetPreviewVisibility()
{
yield return new("All preview features are hidden", PreviewVisibility.NONE);
yield return new("Also show features ready for release; these should be stable", PreviewVisibility.RELEASE_CANDIDATE);
yield return new("Also show features in beta: these are almost ready for release; expect some bugs", PreviewVisibility.BETA);
yield return new("Also show features in alpha: these are in early development; expect bugs and missing features", PreviewVisibility.ALPHA);
yield return new("Show also prototype features: these are works in progress; expect bugs and missing features", PreviewVisibility.PROTOTYPE);
}

public static IEnumerable<ConfigurationSelectData<NavBehavior>> GetNavBehaviorData()
{
Expand Down
5 changes: 5 additions & 0 deletions app/MindWork AI Studio/Settings/DataModel/DataApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ public sealed class DataApp
/// The navigation behavior.
/// </summary>
public NavBehavior NavigationBehavior { get; set; } = NavBehavior.NEVER_EXPAND_USE_TOOLTIPS;

/// <summary>
/// The visibility setting for previews features.
/// </summary>
public PreviewVisibility PreviewVisibility { get; set; } = PreviewVisibility.NONE;

/// <summary>
/// Should we preselect a provider for the entire app?
Expand Down
11 changes: 11 additions & 0 deletions app/MindWork AI Studio/Settings/DataModel/PreviewVisibility.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace AIStudio.Settings.DataModel;

public enum PreviewVisibility
{
NONE = 0,

RELEASE_CANDIDATE,
BETA,
ALPHA,
PROTOTYPE,
}
2 changes: 1 addition & 1 deletion app/MindWork AI Studio/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,6 @@
"contentHash": "FHNOatmUq0sqJOkTx+UF/9YK1f180cnW5FVqnQMvYUN0elp6wFzbtPSiqbo1/ru8ICp43JM1i7kKkk6GsNGHlA=="
}
},
"net8.0/osx-x64": {}
"net8.0/osx-arm64": {}
}
}
2 changes: 2 additions & 0 deletions app/MindWork AI Studio/wwwroot/changelog/v0.9.22.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# v0.9.22, build 197 (2024-1x-xx xx:xx UTC)
- Added the possibility to configure preview feature visibility in the app settings. This is useful for users who want to test new features before they are officially released.