mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-27 15:39:47 +00:00
Handle issues when removing a provider (#387)
This commit is contained in:
parent
6185db733a
commit
be430766c5
@ -105,7 +105,23 @@ public partial class SettingsPanelProviders : SettingsPanelBase
|
|||||||
this.SettingsManager.ConfigurationData.Providers.Remove(provider);
|
this.SettingsManager.ConfigurationData.Providers.Remove(provider);
|
||||||
await this.SettingsManager.StoreSettings();
|
await this.SettingsManager.StoreSettings();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var issueDialogParameters = new DialogParameters
|
||||||
|
{
|
||||||
|
{ "Message", $"Couldn't delete the provider '{provider.InstanceName}'. The issue: {deleteSecretResponse.Issue}. We can ignore this issue and delete the provider anyway. Do you want to ignore it and delete this provider?" },
|
||||||
|
};
|
||||||
|
|
||||||
|
var issueDialogReference = await this.DialogService.ShowAsync<ConfirmDialog>("Delete LLM Provider", issueDialogParameters, DialogOptions.FULLSCREEN);
|
||||||
|
var issueDialogResult = await issueDialogReference.Result;
|
||||||
|
if (issueDialogResult is null || issueDialogResult.Canceled)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Case: The user wants to ignore the issue and delete the provider anyway:
|
||||||
|
this.SettingsManager.ConfigurationData.Providers.Remove(provider);
|
||||||
|
await this.SettingsManager.StoreSettings();
|
||||||
|
}
|
||||||
|
|
||||||
await this.UpdateProviders();
|
await this.UpdateProviders();
|
||||||
await this.MessageBus.SendMessage<bool>(this, Event.CONFIGURATION_CHANGED);
|
await this.MessageBus.SendMessage<bool>(this, Event.CONFIGURATION_CHANGED);
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
- Added the plugin overview page. This page shows all installed plugins and allows you to enable or disable them. It is only available when the plugin preview feature is enabled.
|
- Added the plugin overview page. This page shows all installed plugins and allows you to enable or disable them. It is only available when the plugin preview feature is enabled.
|
||||||
- Added hot reloading for plugins. When any plugin is changed, the app will automatically reload the plugin without needing to restart the app.
|
- Added hot reloading for plugins. When any plugin is changed, the app will automatically reload the plugin without needing to restart the app.
|
||||||
- Added an API for streaming arbitrary local files to the embedding process. Thanks Nils `nilskruthoff` for this great contribution.
|
- Added an API for streaming arbitrary local files to the embedding process. Thanks Nils `nilskruthoff` for this great contribution.
|
||||||
|
- Improved the provider deletion process: when there are issues, the user is notified and can choose to delete the provider anyway.
|
||||||
- Changed the update notification to use the default notification system at the bottom instead of the custom alert bar at the top.
|
- Changed the update notification to use the default notification system at the bottom instead of the custom alert bar at the top.
|
||||||
- Fixed the preview tooltip component not showing the correct position when used inside a scrollable container.
|
- Fixed the preview tooltip component not showing the correct position when used inside a scrollable container.
|
||||||
- Upgraded to Rust v1.86.0
|
- Upgraded to Rust v1.86.0
|
||||||
|
Loading…
Reference in New Issue
Block a user