Improve the provider deletion process by notifying the user of issues and allowing them to delete anyway

This commit is contained in:
Thorsten Sommer 2025-04-06 11:44:24 +02:00
parent b412b41f59
commit 239a1fe734
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 16 additions and 1 deletions

View File

@ -106,7 +106,21 @@ public partial class SettingsPanelProviders : SettingsPanelBase
await this.SettingsManager.StoreSettings(); await this.SettingsManager.StoreSettings();
} }
else else
await this.MessageBus.SendError(new(Icons.Material.Filled.Error, deleteSecretResponse.Issue)); {
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);

View File

@ -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