Skip to content

Commit

Permalink
feat: support custom prompt for custom openai service (#679)
Browse files Browse the repository at this point in the history
* feat(UI): add custom prompt toggle and TextEditor

* feat: support custom prompt for custom openai service

* feat: add detailText for TextEditorCell and ToggleCell

* refactor: improve class and variable naming

* feat: support system prompt

* feat: set custom prompt alignment to leading

* refactor: rewrite by cursor claude-3.5-sonnet

* fix: update Localizable.xcstrings

* fix: add padding for SecureTextField

* fix: update Localizable.xcstrings

* fix: system prompt should be placed before user prompt

* fix: warning @unchecked Sendable

* fix: task qos warning

* feat: show custom prompt TextEditor only enabled

* fix: footnote will be stretched when selected

* fix: update Localizable.xcstrings

* fix: replace HStack with VStack in TextEditorCell
  • Loading branch information
tisfeng authored Sep 26, 2024
1 parent f03b436 commit 67dc0fe
Show file tree
Hide file tree
Showing 23 changed files with 599 additions and 124 deletions.
8 changes: 4 additions & 4 deletions Easydict.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
0AC8A83F2B689E68006DA5CC /* ServiceSecretConfigreValidatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AC8A83E2B689E68006DA5CC /* ServiceSecretConfigreValidatable.swift */; };
0AC8A8412B695480006DA5CC /* DeepLTranslate+ConfigurableService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AC8A8402B695480006DA5CC /* DeepLTranslate+ConfigurableService.swift */; };
0AC8A8432B6957B0006DA5CC /* BingService+ConfigurableService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AC8A8422B6957B0006DA5CC /* BingService+ConfigurableService.swift */; };
0AC8A8452B6A4D97006DA5CC /* ServiceConfigurationCells.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AC8A8442B6A4D97006DA5CC /* ServiceConfigurationCells.swift */; };
0AC8A8452B6A4D97006DA5CC /* ServiceCells.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AC8A8442B6A4D97006DA5CC /* ServiceCells.swift */; };
0AC8A8472B6A4E3F006DA5CC /* ServiceConfigurationSecretSectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AC8A8462B6A4E3F006DA5CC /* ServiceConfigurationSecretSectionView.swift */; };
0AC8A84F2B6DFDD4006DA5CC /* SettingsAccess in Frameworks */ = {isa = PBXBuildFile; productRef = 0AC8A84E2B6DFDD4006DA5CC /* SettingsAccess */; };
17BCAEF72B0DFF9000A7D372 /* EZNiuTransTranslateResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 17BCAEF52B0DFF9000A7D372 /* EZNiuTransTranslateResponse.m */; };
Expand Down Expand Up @@ -762,7 +762,7 @@
0AC8A83E2B689E68006DA5CC /* ServiceSecretConfigreValidatable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServiceSecretConfigreValidatable.swift; sourceTree = "<group>"; };
0AC8A8402B695480006DA5CC /* DeepLTranslate+ConfigurableService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "DeepLTranslate+ConfigurableService.swift"; sourceTree = "<group>"; };
0AC8A8422B6957B0006DA5CC /* BingService+ConfigurableService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BingService+ConfigurableService.swift"; sourceTree = "<group>"; };
0AC8A8442B6A4D97006DA5CC /* ServiceConfigurationCells.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServiceConfigurationCells.swift; sourceTree = "<group>"; };
0AC8A8442B6A4D97006DA5CC /* ServiceCells.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServiceCells.swift; sourceTree = "<group>"; };
0AC8A8462B6A4E3F006DA5CC /* ServiceConfigurationSecretSectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServiceConfigurationSecretSectionView.swift; sourceTree = "<group>"; };
17BCAEF32B0DFF9000A7D372 /* EZNiuTransTranslateResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZNiuTransTranslateResponse.h; sourceTree = "<group>"; };
17BCAEF42B0DFF9000A7D372 /* EZNiuTransTranslate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZNiuTransTranslate.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2520,7 +2520,7 @@
0AC8A83E2B689E68006DA5CC /* ServiceSecretConfigreValidatable.swift */,
0AC8A83C2B6685EE006DA5CC /* SecureTextField.swift */,
0AC8A8462B6A4E3F006DA5CC /* ServiceConfigurationSecretSectionView.swift */,
0AC8A8442B6A4D97006DA5CC /* ServiceConfigurationCells.swift */,
0AC8A8442B6A4D97006DA5CC /* ServiceCells.swift */,
0357B9592C04387D00A48CB0 /* TextEditorCell.swift */,
035F9CCE2C529A04005D1C9A /* ServiceAPIType.swift */,
);
Expand Down Expand Up @@ -3143,7 +3143,7 @@
DC46DF802B4417B900DEAE3E /* Configuration.swift in Sources */,
036E7D7B293F4FC8002675DF /* EZOpenLinkButton.m in Sources */,
03832F542B5F6BE200D0DC64 /* AdvancedTab.swift in Sources */,
0AC8A8452B6A4D97006DA5CC /* ServiceConfigurationCells.swift in Sources */,
0AC8A8452B6A4D97006DA5CC /* ServiceCells.swift in Sources */,
276742092B3DC230002A2C75 /* AboutTab.swift in Sources */,
03714B902C17FD9400BB4459 /* Notification.Name.swift in Sources */,
03008B2E2941956D0062B821 /* EZURLSchemeHandler.m in Sources */,
Expand Down
Loading

0 comments on commit 67dc0fe

Please sign in to comment.