Skip to content

Commit

Permalink
fix: update code with dev
Browse files Browse the repository at this point in the history
  • Loading branch information
tisfeng committed Feb 15, 2024
1 parent 3183a35 commit 9c94543
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions Easydict/App/Easydict-Bridging-Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,12 @@
#import "EZLocalStorage.h"

#import "NSString+EZConvenience.h"
#import "EZEnumTypes.h"
#import "EZWindowManager.h"
#import "NSViewController+EZWindow.h"
#import "EZLog.h"
#import "EZLanguageManager.h"
#import "DarkModeManager.h"
#import "EZScriptExecutor.h"
#import "EZOpenAIService.h"
#import "EZNiuTransTranslate.h"
#import "EZDeepLTranslate.h"
#import "EZBingService.h"


4 changes: 2 additions & 2 deletions Easydict/Feature/Service/OpenAI/OpenAIService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class OpenAIService: QueryService {
// easydict://writeKeyValue?EZOpenAIAPIKey=

var apiKey = UserDefaults.standard.string(forKey: EZOpenAIAPIKey) ?? ""
if apiKey.isEmpty, EZConfiguration.shared().isBeta {
if apiKey.isEmpty, Configuration.shared.beta {
apiKey = defaultAPIKey
}

Expand Down Expand Up @@ -125,7 +125,7 @@ public class OpenAIService: QueryService {
}

override public func intelligentQueryTextType() -> EZQueryTextType {
let type = EZConfiguration.shared().intelligentQueryTextType(forServiceType: serviceType())
let type = Configuration.shared.intelligentQueryTextTypeForServiceType(serviceType())
return type
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Foundation
import SwiftUI

@available(macOS 13.0, *)
extension EZOpenAIService: ConfigurableService {
extension OpenAIService: ConfigurableService {
func configurationListItems() -> some View {
ServiceConfigurationSecretSectionView(service: self, observeKeys: [.openAIAPIKey]) {
ServiceConfigurationSecureInputCell(
Expand Down

0 comments on commit 9c94543

Please sign in to comment.