mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-10-08 19:40:21 +00:00
Renamed UpdateBehaviour
to UpdateInstallation
This commit is contained in:
parent
06db007b1b
commit
fc173725bf
@ -14,7 +14,7 @@
|
||||
<ConfigurationOption OptionDescription="@T("Save energy?")" LabelOn="@T("Energy saving is enabled")" LabelOff="@T("Energy saving is disabled")" State="@(() => this.SettingsManager.ConfigurationData.App.IsSavingEnergy)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.App.IsSavingEnergy = updatedState)" OptionHelp="@T("When enabled, streamed content from the AI is updated once every third second. When disabled, streamed content will be updated as soon as it is available.")"/>
|
||||
<ConfigurationOption OptionDescription="@T("Enable spellchecking?")" LabelOn="@T("Spellchecking is enabled")" LabelOff="@T("Spellchecking is disabled")" State="@(() => this.SettingsManager.ConfigurationData.App.EnableSpellchecking)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.App.EnableSpellchecking = updatedState)" OptionHelp="@T("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="@T("Check for updates")" SelectedValue="@(() => this.SettingsManager.ConfigurationData.App.UpdateInterval)" Data="@ConfigurationSelectDataFactory.GetUpdateIntervalData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.App.UpdateInterval = selectedValue)" OptionHelp="@T("How often should we check for app updates?")" IsLocked="() => ManagedConfiguration.TryGet(x => x.App, x => x.UpdateInterval, out var meta) && meta.IsLocked"/>
|
||||
<ConfigurationSelect OptionDescription="@T("Update installation method")" SelectedValue="@(() => this.SettingsManager.ConfigurationData.App.UpdateBehaviour)" Data="@ConfigurationSelectDataFactory.GetUpdateBehaviourData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.App.UpdateBehaviour = selectedValue)" OptionHelp="@T("Should updates be installed automatically or manually?")" IsLocked="() => ManagedConfiguration.TryGet(x => x.App, x => x.UpdateBehaviour, out var meta) && meta.IsLocked"/>
|
||||
<ConfigurationSelect OptionDescription="@T("Update installation method")" SelectedValue="@(() => this.SettingsManager.ConfigurationData.App.UpdateInstallation)" Data="@ConfigurationSelectDataFactory.GetUpdateBehaviourData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.App.UpdateInstallation = selectedValue)" OptionHelp="@T("Should updates be installed automatically or manually?")" IsLocked="() => ManagedConfiguration.TryGet(x => x.App, x => x.UpdateInstallation, out var meta) && meta.IsLocked"/>
|
||||
<ConfigurationSelect OptionDescription="@T("Navigation bar behavior")" SelectedValue="@(() => this.SettingsManager.ConfigurationData.App.NavigationBehavior)" Data="@ConfigurationSelectDataFactory.GetNavBehaviorData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.App.NavigationBehavior = selectedValue)" OptionHelp="@T("Select the desired behavior for the navigation bar.")"/>
|
||||
<ConfigurationSelect OptionDescription="@T("Preview feature visibility")" SelectedValue="@(() => this.SettingsManager.ConfigurationData.App.PreviewVisibility)" Data="@ConfigurationSelectDataFactory.GetPreviewVisibility()" SelectionUpdate="@this.UpdatePreviewFeatures" OptionHelp="@T("Do you want to show preview features in the app?")"/>
|
||||
|
||||
|
@ -62,9 +62,13 @@ CONFIG["LLM_PROVIDERS"][#CONFIG["LLM_PROVIDERS"]+1] = {
|
||||
|
||||
CONFIG["SETTINGS"] = {}
|
||||
|
||||
-- Configure the update behavior:
|
||||
-- Configure the update check interval:
|
||||
-- Allowed values are: NO_CHECK, ONCE_STARTUP, HOURLY, DAILY, WEEKLY
|
||||
-- CONFIG["SETTINGS"]["DataApp.UpdateBehavior"] = "NO_CHECK"
|
||||
-- CONFIG["SETTINGS"]["DataApp.UpdateInterval"] = "NO_CHECK"
|
||||
|
||||
-- Configure how updates are installed:
|
||||
-- Allowed values are: MANUAL, AUTOMATIC
|
||||
-- CONFIG["SETTINGS"]["DataApp.UpdateInstallation"] = "MANUAL"
|
||||
|
||||
-- Configure the user permission to add providers:
|
||||
-- Allowed values are: true, false
|
||||
|
@ -72,10 +72,10 @@ public static class ConfigurationSelectDataFactory
|
||||
yield return new (TB("Check every week"), UpdateInterval.WEEKLY);
|
||||
}
|
||||
|
||||
public static IEnumerable<ConfigurationSelectData<UpdateBehaviour>> GetUpdateBehaviourData()
|
||||
public static IEnumerable<ConfigurationSelectData<UpdateInstallation>> GetUpdateBehaviourData()
|
||||
{
|
||||
yield return new(TB("Install updates manually"), UpdateBehaviour.MANUAL);
|
||||
yield return new(TB("Install updates automatically"), UpdateBehaviour.AUTOMATIC);
|
||||
yield return new(TB("Install updates manually"), UpdateInstallation.MANUAL);
|
||||
yield return new(TB("Install updates automatically"), UpdateInstallation.AUTOMATIC);
|
||||
}
|
||||
|
||||
public static IEnumerable<ConfigurationSelectData<WorkspaceStorageBehavior>> GetWorkspaceStorageBehaviorData()
|
||||
|
@ -45,7 +45,7 @@ public sealed class DataApp(Expression<Func<Data, DataApp>>? configSelection = n
|
||||
/// <summary>
|
||||
/// How updates should be installed.
|
||||
/// </summary>
|
||||
public UpdateBehaviour UpdateBehaviour { get; set; } = ManagedConfiguration.Register(configSelection, n => n.UpdateBehaviour, UpdateBehaviour.MANUAL);
|
||||
public UpdateInstallation UpdateInstallation { get; set; } = ManagedConfiguration.Register(configSelection, n => n.UpdateInstallation, UpdateInstallation.MANUAL);
|
||||
|
||||
/// <summary>
|
||||
/// The navigation behavior.
|
||||
|
@ -1,6 +1,6 @@
|
||||
namespace AIStudio.Settings.DataModel;
|
||||
|
||||
public enum UpdateBehaviour
|
||||
public enum UpdateInstallation
|
||||
{
|
||||
MANUAL,
|
||||
AUTOMATIC,
|
@ -56,7 +56,7 @@ public sealed class PluginConfiguration(bool isInternal, LuaState state, PluginT
|
||||
ManagedConfiguration.TryProcessConfiguration(x => x.App, x => x.UpdateInterval, this.Id, settingsTable, dryRun);
|
||||
|
||||
// Config: how should updates be installed?
|
||||
ManagedConfiguration.TryProcessConfiguration(x => x.App, x => x.UpdateBehaviour, this.Id, settingsTable, dryRun);
|
||||
ManagedConfiguration.TryProcessConfiguration(x => x.App, x => x.UpdateInstallation, this.Id, settingsTable, dryRun);
|
||||
|
||||
// Config: allow the user to add providers?
|
||||
ManagedConfiguration.TryProcessConfiguration(x => x.App, x => x.AllowUserToAddProvider, this.Id, settingsTable, dryRun);
|
||||
|
@ -115,7 +115,7 @@ public sealed class UpdateService : BackgroundService, IMessageBusReceiver
|
||||
var response = await this.rust.CheckForUpdate();
|
||||
if (response.UpdateIsAvailable)
|
||||
{
|
||||
if (this.settingsManager.ConfigurationData.App.UpdateBehaviour is UpdateBehaviour.AUTOMATIC)
|
||||
if (this.settingsManager.ConfigurationData.App.UpdateInstallation is UpdateInstallation.AUTOMATIC)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -1,5 +1,8 @@
|
||||
# v0.9.51, build 226 (2025-08-xx xx:xx UTC)
|
||||
- Added support for predefined chat templates in configuration plugins to help enterprises roll out consistent templates across the organization.
|
||||
- Added the ability to choose between automatic and manual update installation to the app settings (default is manual).
|
||||
- Added the ability to control the update installation behavior by configuration plugins.
|
||||
- Improved memory usage in several areas of the app.
|
||||
- Improved plugin management for configuration plugins so that hot reload detects when a provider or chat template has been removed.
|
||||
- Changed the configuration plugin setting name for how often to check for updates from `UpdateBehavior` to `UpdateInterval`.
|
||||
- Fixed a bug in various assistants where some text fields were not reset when resetting.
|
||||
|
Loading…
Reference in New Issue
Block a user