Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rewrite OpenAI service with Swift #473

Merged
merged 22 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e9e0e66
docs: update sponsor list
tisfeng Mar 25, 2024
e36c72b
refactor: rewrite OpenAI service with Swift
tisfeng Mar 26, 2024
4974405
perf: move swift services to swift file group
tisfeng Mar 26, 2024
f037f1c
perf: remove all #import "Easydict-Swift.h", since it has been added …
tisfeng Mar 26, 2024
36ab3ba
refactor: replace hardcode apikey with plist apikey
tisfeng Mar 26, 2024
2e6aa13
perf: improve file structure and naming
tisfeng Mar 26, 2024
ff37c43
perf: remove unused var defaultModel
tisfeng Mar 26, 2024
eda8d99
fix: try to fix ci error
tisfeng Mar 26, 2024
179c1f8
fix: custom OpenAI service cannot directly inherit from OpenAI #473
tisfeng Mar 28, 2024
8f17b32
Merge branch 'dev' into swift-openai
tisfeng Mar 30, 2024
03071f8
perf: replace UserDefaults with Defaults
tisfeng Apr 1, 2024
c10332d
perf: remove deprecated key EZOpenAIDomainKey
tisfeng Apr 1, 2024
80855ab
perf: remove reverted EZTableTipsCell files
tisfeng Apr 1, 2024
63bfa33
docs: remove EZOpenAIDomainKey
tisfeng Apr 1, 2024
df2c86a
chore: update issue templates
tisfeng Apr 1, 2024
e4ad7a4
Update Easydict/Swift/Service/OpenAI/BaseOpenAIService.swift
tisfeng Apr 1, 2024
325b89c
Merge branch 'dev' into swift-openai
tisfeng Apr 1, 2024
c8b8b30
perf: replace EZOpenAIService with EZBaseOpenAIService
tisfeng Apr 1, 2024
97da4e8
Update Easydict/objc/ViewController/View/ResultView/EZResultView.m
tisfeng Apr 1, 2024
36ac7c2
Update Easydict/objc/ViewController/View/ResultView/EZResultView.m
tisfeng Apr 1, 2024
0c4a60c
Merge branch 'dev' into swift-openai
tisfeng Apr 1, 2024
a9f464a
Merge branch 'dev' into swift-openai
tisfeng Apr 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/cn_feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 功能建议
description: 功能建议
title: "🚀 功能建议:{{请填写标题,不要留空}}"
title: "🚀 功能建议:请填写标题,不要留空"
labels: ["enhancement"]

body:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/en_feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Feature request
description: Request a new feature
title: "🚀 Feature Request: {{Please fill in the title, don't leave it blank}}"
title: "🚀 Feature Request: Please fill in the title, don't leave it blank"
labels: ["enhancement"]

body:
Expand Down
21 changes: 0 additions & 21 deletions .github/ISSUE_TEMPLATE/others.md

This file was deleted.

157 changes: 104 additions & 53 deletions Easydict.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions Easydict.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"originHash" : "ca4d31aa1a70fb6a354fe9e139a2e74a189e4fcff55ed959a3adc71522905fc4",
"pins" : [
{
"identity" : "abseil-cpp-binary",
Expand Down Expand Up @@ -189,6 +190,15 @@
"version" : "2.30909.0"
}
},
{
"identity" : "openai",
"kind" : "remoteSourceControl",
"location" : "https://github.com/tisfeng/OpenAI",
"state" : {
"branch" : "dev",
"revision" : "9490fa07602cef2979715dc0ee80877e78dc3872"
}
},
{
"identity" : "plcrashreporter",
"kind" : "remoteSourceControl",
Expand Down
1 change: 0 additions & 1 deletion Easydict/App/AppDelegate+EZURLScheme.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#import <JLRoutes.h>
#import "EZWindowManager.h"
#import "EZSchemeParser.h"
#import "Easydict-Swift.h"

@implementation AppDelegate (EZURLScheme)

Expand Down
1 change: 0 additions & 1 deletion Easydict/App/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#import "EZShortcut.h"
#import "MMCrash.h"
#import "AppDelegate+EZURLScheme.h"
#import "Easydict-Swift.h"

@interface AppDelegate ()

Expand Down
3 changes: 1 addition & 2 deletions Easydict/App/Easydict-Bridging-Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@
#import "EZLanguageManager.h"
#import "DarkModeManager.h"
#import "EZScriptExecutor.h"
#import "EZOpenAILikeService.h"
#import "EZNiuTransTranslate.h"
#import "EZDeepLTranslate.h"
#import "EZBingService.h"

#import "NSString+EZUtils.h"

File renamed without changes.
1 change: 0 additions & 1 deletion Easydict/App/entry.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#import <Cocoa/Cocoa.h>
#import "EZWindowManager.h"
#import "Easydict-Swift.h"
#import "XPMArguments.h"
#include <stdio.h>
#include <sys/ioctl.h>
Expand Down
107 changes: 0 additions & 107 deletions Easydict/Feature/Service/OpenAI/EZOpenAIChatResponse.h

This file was deleted.

62 changes: 0 additions & 62 deletions Easydict/Feature/Service/OpenAI/EZOpenAIChatResponse.m

This file was deleted.

This file was deleted.

Loading