mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +01:00
update
Signed-off-by: Shawn Yuan (from Dev Box) <shuaiyuan@microsoft.com>
This commit is contained in:
@@ -187,8 +187,12 @@ namespace AdvancedPaste.Settings
|
||||
|
||||
bool configurationUpdated = false;
|
||||
|
||||
PasteAIProviderDefinition openAIProvider = null;
|
||||
if (legacyCredential is not null || legacyAdvancedAIConsumed)
|
||||
const string openAIServiceType = "OpenAI";
|
||||
PasteAIProviderDefinition openAIProvider = configuration?.Providers?.FirstOrDefault(
|
||||
provider => string.Equals(provider.ServiceType, openAIServiceType, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
bool shouldEnsureOpenAIProvider = legacyCredential is not null;
|
||||
if (shouldEnsureOpenAIProvider)
|
||||
{
|
||||
var ensureResult = AdvancedPasteMigrationHelper.EnsureOpenAIProvider(configuration);
|
||||
openAIProvider = ensureResult.Provider;
|
||||
|
||||
@@ -207,8 +207,12 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
|
||||
bool configurationUpdated = false;
|
||||
|
||||
PasteAIProviderDefinition openAIProvider = null;
|
||||
if (legacyCredential is not null || legacyAdvancedAIConsumed)
|
||||
const string openAIServiceType = "OpenAI";
|
||||
PasteAIProviderDefinition openAIProvider = configuration?.Providers?.FirstOrDefault(
|
||||
provider => string.Equals(provider.ServiceType, openAIServiceType, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
bool shouldEnsureOpenAIProvider = legacyCredential is not null;
|
||||
if (shouldEnsureOpenAIProvider)
|
||||
{
|
||||
var ensureResult = AdvancedPasteMigrationHelper.EnsureOpenAIProvider(configuration);
|
||||
openAIProvider = ensureResult.Provider;
|
||||
|
||||
Reference in New Issue
Block a user