mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
[AdvancedPaste]Check "Paste with AI" enabled state for enabling custom actions (#35026)
* [AdvancedPaste] Check OpenAI enabled state for custom actions * Add some more explanations to the expected exception * Add description saying that it requires Paste with AI to be enabled * Check openAI enabled only if we have custom actions --------- Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
This commit is contained in:
@@ -397,6 +397,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
PasswordCredential cred = vault.Retrieve("https://platform.openai.com/api-keys", "PowerToys_AdvancedPaste_OpenAIKey");
|
||||
vault.Remove(cred);
|
||||
OnPropertyChanged(nameof(IsOpenAIEnabled));
|
||||
NotifySettingsChanged();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
@@ -411,6 +412,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
PasswordCredential cred = new PasswordCredential("https://platform.openai.com/api-keys", "PowerToys_AdvancedPaste_OpenAIKey", password);
|
||||
vault.Add(cred);
|
||||
OnPropertyChanged(nameof(IsOpenAIEnabled));
|
||||
NotifySettingsChanged();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user