Skip to content

Commit 32ff143

Browse files
Added configuration for preview feature visibility (#222)
1 parent 90a1f68 commit 32ff143

File tree

6 files changed

+29
-1
lines changed

6 files changed

+29
-1
lines changed

app/MindWork AI Studio/Pages/Settings.razor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@
186186
<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." />
187187
<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?"/>
188188
<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."/>
189+
<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?"/>
189190
<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.")"/>
190191
<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."/>
191192
</ExpansionPanel>

app/MindWork AI Studio/Settings/ConfigurationSelectData.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ public static IEnumerable<ConfigurationSelectData<WorkspaceDisplayBehavior>> Get
7777
yield return new("Toggle the sidebar: show the workspaces next to the chat when desired", WorkspaceDisplayBehavior.TOGGLE_SIDEBAR);
7878
yield return new("Sidebar is always visible: show the workspaces next to the chat all the time", WorkspaceDisplayBehavior.SIDEBAR_ALWAYS_VISIBLE);
7979
}
80+
81+
public static IEnumerable<ConfigurationSelectData<PreviewVisibility>> GetPreviewVisibility()
82+
{
83+
yield return new("All preview features are hidden", PreviewVisibility.NONE);
84+
yield return new("Also show features ready for release; these should be stable", PreviewVisibility.RELEASE_CANDIDATE);
85+
yield return new("Also show features in beta: these are almost ready for release; expect some bugs", PreviewVisibility.BETA);
86+
yield return new("Also show features in alpha: these are in early development; expect bugs and missing features", PreviewVisibility.ALPHA);
87+
yield return new("Show also prototype features: these are works in progress; expect bugs and missing features", PreviewVisibility.PROTOTYPE);
88+
}
8089

8190
public static IEnumerable<ConfigurationSelectData<NavBehavior>> GetNavBehaviorData()
8291
{

app/MindWork AI Studio/Settings/DataModel/DataApp.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ public sealed class DataApp
2727
/// The navigation behavior.
2828
/// </summary>
2929
public NavBehavior NavigationBehavior { get; set; } = NavBehavior.NEVER_EXPAND_USE_TOOLTIPS;
30+
31+
/// <summary>
32+
/// The visibility setting for previews features.
33+
/// </summary>
34+
public PreviewVisibility PreviewVisibility { get; set; } = PreviewVisibility.NONE;
3035

3136
/// <summary>
3237
/// Should we preselect a provider for the entire app?
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace AIStudio.Settings.DataModel;
2+
3+
public enum PreviewVisibility
4+
{
5+
NONE = 0,
6+
7+
RELEASE_CANDIDATE,
8+
BETA,
9+
ALPHA,
10+
PROTOTYPE,
11+
}

app/MindWork AI Studio/packages.lock.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,6 @@
178178
"contentHash": "FHNOatmUq0sqJOkTx+UF/9YK1f180cnW5FVqnQMvYUN0elp6wFzbtPSiqbo1/ru8ICp43JM1i7kKkk6GsNGHlA=="
179179
}
180180
},
181-
"net8.0/osx-x64": {}
181+
"net8.0/osx-arm64": {}
182182
}
183183
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# v0.9.22, build 197 (2024-1x-xx xx:xx UTC)
2+
- 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.

0 commit comments

Comments
 (0)