-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...ility/Extensions/QueryService+ConfigurableService/GeminiService+ConfigurableService.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// GeminiService+ConfigurableService.swift | ||
// Easydict | ||
// | ||
// Created by phlpsong on 2024/1/31. | ||
// Copyright © 2024 izual. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import SwiftUI | ||
|
||
@available(macOS 13.0, *) | ||
extension GeminiService: ConfigurableService { | ||
func configurationListItems() -> some View { | ||
ServiceConfigurationSecretSectionView(service: self, observeKeys: [.geminiAPIKey]) { | ||
ServiceConfigurationSecureInputCell( | ||
textFieldTitleKey: "service.configuration.gemini.api_key.title", | ||
key: .geminiAPIKey | ||
) | ||
} | ||
} | ||
} |