├── .gitignore ├── Chatgpt.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── Chatgpt.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── Chatgpt ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── icon-128.png │ │ ├── icon-128@2x.png │ │ ├── icon-16.png │ │ ├── icon-16@2x.png │ │ ├── icon-256.png │ │ ├── icon-256@2x.png │ │ ├── icon-32.png │ │ ├── icon-32@2x.png │ │ ├── icon-512.png │ │ └── icon-512@2x.png │ ├── Chat │ │ ├── Chat.imageset │ │ │ ├── Chat@2x.png │ │ │ ├── Chat@3x.png │ │ │ └── Contents.json │ │ ├── Chatgpt.imageset │ │ │ ├── Chatgpt@2x.png │ │ │ ├── Chatgpt@3x.png │ │ │ └── Contents.json │ │ ├── ClearRecord.imageset │ │ │ ├── ClearRecord@2x.png │ │ │ ├── ClearRecord@3x.png │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── DisableInputColor.colorset │ │ │ └── Contents.json │ │ ├── EnableInputColor.colorset │ │ │ └── Contents.json │ │ ├── ListColor.colorset │ │ │ └── Contents.json │ │ ├── NameColor.colorset │ │ │ └── Contents.json │ │ └── NewChat.imageset │ │ │ ├── Contents.json │ │ │ ├── NewChat@2x.png │ │ │ └── NewChat@3x.png │ ├── Contents.json │ └── Mine │ │ ├── Avatar.imageset │ │ ├── Avatar@2x.png │ │ ├── Avatar@3x.png │ │ └── Contents.json │ │ └── Contents.json ├── Chatgpt.entitlements ├── ChatgptApp.swift ├── ContentView.swift ├── Home │ ├── Models │ │ ├── ChatModel.swift │ │ ├── Database │ │ │ ├── ChatDbModel.swift │ │ │ └── SessionDbModel.swift │ │ ├── SessionManager.swift │ │ └── SessionModel.swift │ └── Views │ │ ├── Cells │ │ ├── ChatCell.swift │ │ └── SessionCell.swift │ │ ├── ChatView.swift │ │ ├── SessionView.swift │ │ └── Widgets │ │ └── InputView.swift ├── Mine │ ├── MineListView.swift │ └── MineView.swift ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json └── Util │ └── QFileManage.swift ├── ChatgptTests └── ChatgptTests.swift ├── ChatgptUITests ├── ChatgptUITests.swift └── ChatgptUITestsLaunchTests.swift ├── LICENSE ├── Podfile ├── Podfile.lock ├── README.md ├── demo.gif └── 微信公众号.jpg /.gitignore: -------------------------------------------------------------------------------- 1 | # CocoaPods 2 | 3 | Pods/ 4 | 5 | # Xcode 6 | 7 | # 8 | 9 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore &Swift.gitignore 10 | 11 | # Mac OS X Finder and whatnot 12 | 13 | *.DS_Store 14 | 15 | ## Build generated 16 | 17 | build/DerivedData/ 18 | 19 | ## Various settings 20 | 21 | *.pbxuser!default.pbxuser 22 | 23 | *.mode1v3!default.mode1v3 24 | 25 | *.mode2v3!default.mode2v3 26 | 27 | *.perspectivev3!default.perspectivev3 28 | 29 | xcuserdata/ 30 | 31 | ## Other 32 | 33 | *.moved-aside 34 | 35 | *.xcuserstate 36 | 37 | *.xccheckout 38 | 39 | ## Obj-C/Swift specific 40 | 41 | *.hmap 42 | 43 | *.ipa 44 | 45 | *.dSYM.zip 46 | 47 | *.dSYM -------------------------------------------------------------------------------- /Chatgpt.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 55; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0D4CD387E255B773FCFC50D2 /* Pods_Chatgpt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 048DA17C5639FBF362F4DE99 /* Pods_Chatgpt.framework */; }; 11 | 5AE15923BA7C1D4183690405 /* Pods_ChatgptTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41E5CE7A45A282229C68E94F /* Pods_ChatgptTests.framework */; }; 12 | 8626331629A22EE30087F88B /* SessionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8626331529A22EE30087F88B /* SessionView.swift */; }; 13 | 8626331829A22EEF0087F88B /* SessionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8626331729A22EEF0087F88B /* SessionCell.swift */; }; 14 | 8626331A29A22EF60087F88B /* SessionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8626331929A22EF60087F88B /* SessionModel.swift */; }; 15 | 8626331D29A246560087F88B /* QFileManage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8626331C29A246560087F88B /* QFileManage.swift */; }; 16 | 86A2AA1429A2FFBD006E0FD4 /* SessionDbModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86A2AA1329A2FFBD006E0FD4 /* SessionDbModel.swift */; }; 17 | 86A2AA1629A2FFD0006E0FD4 /* ChatDbModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86A2AA1529A2FFD0006E0FD4 /* ChatDbModel.swift */; }; 18 | 86A2AA1D29A3168C006E0FD4 /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86A2AA1C29A3168C006E0FD4 /* SessionManager.swift */; }; 19 | 86A2AA1F29A3174E006E0FD4 /* ChatModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86A2AA1E29A3174E006E0FD4 /* ChatModel.swift */; }; 20 | 86BEB36C29A0B29D0050D90C /* InputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86BEB36B29A0B29D0050D90C /* InputView.swift */; }; 21 | 86C780BC299F0AC1005BF4F3 /* ChatgptApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86C780BB299F0AC1005BF4F3 /* ChatgptApp.swift */; }; 22 | 86C780C0299F0AC2005BF4F3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 86C780BF299F0AC2005BF4F3 /* Assets.xcassets */; }; 23 | 86C780C3299F0AC2005BF4F3 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 86C780C2299F0AC2005BF4F3 /* Preview Assets.xcassets */; }; 24 | 86C780CE299F0AC2005BF4F3 /* ChatgptTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86C780CD299F0AC2005BF4F3 /* ChatgptTests.swift */; }; 25 | 86C780D8299F0AC2005BF4F3 /* ChatgptUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86C780D7299F0AC2005BF4F3 /* ChatgptUITests.swift */; }; 26 | 86C780DA299F0AC2005BF4F3 /* ChatgptUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86C780D9299F0AC2005BF4F3 /* ChatgptUITestsLaunchTests.swift */; }; 27 | 86C780E9299F0B9C005BF4F3 /* ChatView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86C780E8299F0B9C005BF4F3 /* ChatView.swift */; }; 28 | 86C780F6299F158B005BF4F3 /* MineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86C780F5299F158B005BF4F3 /* MineView.swift */; }; 29 | 86C780F8299F2058005BF4F3 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86C780F7299F2058005BF4F3 /* ContentView.swift */; }; 30 | 86C78103299F26BA005BF4F3 /* MineListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86C78102299F26BA005BF4F3 /* MineListView.swift */; }; 31 | 86C7810D299F5775005BF4F3 /* ChatCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86C7810C299F5775005BF4F3 /* ChatCell.swift */; }; 32 | EE95B1B2D70E4A1ABDD2510F /* Pods_Chatgpt_ChatgptUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FBAFB5440B651AC51DC1479B /* Pods_Chatgpt_ChatgptUITests.framework */; }; 33 | /* End PBXBuildFile section */ 34 | 35 | /* Begin PBXContainerItemProxy section */ 36 | 86C780CA299F0AC2005BF4F3 /* PBXContainerItemProxy */ = { 37 | isa = PBXContainerItemProxy; 38 | containerPortal = 86C780B0299F0AC1005BF4F3 /* Project object */; 39 | proxyType = 1; 40 | remoteGlobalIDString = 86C780B7299F0AC1005BF4F3; 41 | remoteInfo = Chatgpt; 42 | }; 43 | 86C780D4299F0AC2005BF4F3 /* PBXContainerItemProxy */ = { 44 | isa = PBXContainerItemProxy; 45 | containerPortal = 86C780B0299F0AC1005BF4F3 /* Project object */; 46 | proxyType = 1; 47 | remoteGlobalIDString = 86C780B7299F0AC1005BF4F3; 48 | remoteInfo = Chatgpt; 49 | }; 50 | /* End PBXContainerItemProxy section */ 51 | 52 | /* Begin PBXFileReference section */ 53 | 048DA17C5639FBF362F4DE99 /* Pods_Chatgpt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Chatgpt.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 10049C8394B0249B9E478652 /* Pods-Chatgpt-ChatgptUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Chatgpt-ChatgptUITests.release.xcconfig"; path = "Target Support Files/Pods-Chatgpt-ChatgptUITests/Pods-Chatgpt-ChatgptUITests.release.xcconfig"; sourceTree = ""; }; 55 | 2E17272D1C8182B6108932B7 /* Pods-Chatgpt.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Chatgpt.debug.xcconfig"; path = "Target Support Files/Pods-Chatgpt/Pods-Chatgpt.debug.xcconfig"; sourceTree = ""; }; 56 | 347E003C424A3307E515ACA8 /* Pods-Chatgpt.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Chatgpt.release.xcconfig"; path = "Target Support Files/Pods-Chatgpt/Pods-Chatgpt.release.xcconfig"; sourceTree = ""; }; 57 | 3AB4EC76C9F8607FC1F62EF1 /* Pods-ChatgptTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ChatgptTests.debug.xcconfig"; path = "Target Support Files/Pods-ChatgptTests/Pods-ChatgptTests.debug.xcconfig"; sourceTree = ""; }; 58 | 41E5CE7A45A282229C68E94F /* Pods_ChatgptTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ChatgptTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | 68FCE08BA501A259FD8849CA /* Pods-Chatgpt-ChatgptUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Chatgpt-ChatgptUITests.debug.xcconfig"; path = "Target Support Files/Pods-Chatgpt-ChatgptUITests/Pods-Chatgpt-ChatgptUITests.debug.xcconfig"; sourceTree = ""; }; 60 | 8626331529A22EE30087F88B /* SessionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionView.swift; sourceTree = ""; }; 61 | 8626331729A22EEF0087F88B /* SessionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionCell.swift; sourceTree = ""; }; 62 | 8626331929A22EF60087F88B /* SessionModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionModel.swift; sourceTree = ""; }; 63 | 8626331C29A246560087F88B /* QFileManage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QFileManage.swift; sourceTree = ""; }; 64 | 86A2AA1329A2FFBD006E0FD4 /* SessionDbModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionDbModel.swift; sourceTree = ""; }; 65 | 86A2AA1529A2FFD0006E0FD4 /* ChatDbModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatDbModel.swift; sourceTree = ""; }; 66 | 86A2AA1C29A3168C006E0FD4 /* SessionManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionManager.swift; sourceTree = ""; }; 67 | 86A2AA1E29A3174E006E0FD4 /* ChatModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatModel.swift; sourceTree = ""; }; 68 | 86BEB36B29A0B29D0050D90C /* InputView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InputView.swift; sourceTree = ""; }; 69 | 86C780B8299F0AC1005BF4F3 /* Chatgpt.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Chatgpt.app; sourceTree = BUILT_PRODUCTS_DIR; }; 70 | 86C780BB299F0AC1005BF4F3 /* ChatgptApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatgptApp.swift; sourceTree = ""; }; 71 | 86C780BF299F0AC2005BF4F3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 72 | 86C780C2299F0AC2005BF4F3 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 73 | 86C780C4299F0AC2005BF4F3 /* Chatgpt.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Chatgpt.entitlements; sourceTree = ""; }; 74 | 86C780C9299F0AC2005BF4F3 /* ChatgptTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ChatgptTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 75 | 86C780CD299F0AC2005BF4F3 /* ChatgptTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatgptTests.swift; sourceTree = ""; }; 76 | 86C780D3299F0AC2005BF4F3 /* ChatgptUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ChatgptUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 77 | 86C780D7299F0AC2005BF4F3 /* ChatgptUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatgptUITests.swift; sourceTree = ""; }; 78 | 86C780D9299F0AC2005BF4F3 /* ChatgptUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatgptUITestsLaunchTests.swift; sourceTree = ""; }; 79 | 86C780E8299F0B9C005BF4F3 /* ChatView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatView.swift; sourceTree = ""; }; 80 | 86C780F5299F158B005BF4F3 /* MineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineView.swift; sourceTree = ""; }; 81 | 86C780F7299F2058005BF4F3 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 82 | 86C78102299F26BA005BF4F3 /* MineListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineListView.swift; sourceTree = ""; }; 83 | 86C7810C299F5775005BF4F3 /* ChatCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatCell.swift; sourceTree = ""; }; 84 | ECDD0B3D18A8B84E53FB88EE /* Pods-ChatgptTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ChatgptTests.release.xcconfig"; path = "Target Support Files/Pods-ChatgptTests/Pods-ChatgptTests.release.xcconfig"; sourceTree = ""; }; 85 | FBAFB5440B651AC51DC1479B /* Pods_Chatgpt_ChatgptUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Chatgpt_ChatgptUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 86 | /* End PBXFileReference section */ 87 | 88 | /* Begin PBXFrameworksBuildPhase section */ 89 | 86C780B5299F0AC1005BF4F3 /* Frameworks */ = { 90 | isa = PBXFrameworksBuildPhase; 91 | buildActionMask = 2147483647; 92 | files = ( 93 | 0D4CD387E255B773FCFC50D2 /* Pods_Chatgpt.framework in Frameworks */, 94 | ); 95 | runOnlyForDeploymentPostprocessing = 0; 96 | }; 97 | 86C780C6299F0AC2005BF4F3 /* Frameworks */ = { 98 | isa = PBXFrameworksBuildPhase; 99 | buildActionMask = 2147483647; 100 | files = ( 101 | 5AE15923BA7C1D4183690405 /* Pods_ChatgptTests.framework in Frameworks */, 102 | ); 103 | runOnlyForDeploymentPostprocessing = 0; 104 | }; 105 | 86C780D0299F0AC2005BF4F3 /* Frameworks */ = { 106 | isa = PBXFrameworksBuildPhase; 107 | buildActionMask = 2147483647; 108 | files = ( 109 | EE95B1B2D70E4A1ABDD2510F /* Pods_Chatgpt_ChatgptUITests.framework in Frameworks */, 110 | ); 111 | runOnlyForDeploymentPostprocessing = 0; 112 | }; 113 | /* End PBXFrameworksBuildPhase section */ 114 | 115 | /* Begin PBXGroup section */ 116 | 352530FBE4BE48C661F1F8CA /* Pods */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 2E17272D1C8182B6108932B7 /* Pods-Chatgpt.debug.xcconfig */, 120 | 347E003C424A3307E515ACA8 /* Pods-Chatgpt.release.xcconfig */, 121 | 68FCE08BA501A259FD8849CA /* Pods-Chatgpt-ChatgptUITests.debug.xcconfig */, 122 | 10049C8394B0249B9E478652 /* Pods-Chatgpt-ChatgptUITests.release.xcconfig */, 123 | 3AB4EC76C9F8607FC1F62EF1 /* Pods-ChatgptTests.debug.xcconfig */, 124 | ECDD0B3D18A8B84E53FB88EE /* Pods-ChatgptTests.release.xcconfig */, 125 | ); 126 | path = Pods; 127 | sourceTree = ""; 128 | }; 129 | 8626331B29A245DD0087F88B /* Util */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | 8626331C29A246560087F88B /* QFileManage.swift */, 133 | ); 134 | path = Util; 135 | sourceTree = ""; 136 | }; 137 | 86A2AA0F29A2FF6E006E0FD4 /* Home */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | 86A2AA1129A2FF95006E0FD4 /* Views */, 141 | 86A2AA1029A2FF8C006E0FD4 /* Models */, 142 | ); 143 | path = Home; 144 | sourceTree = ""; 145 | }; 146 | 86A2AA1029A2FF8C006E0FD4 /* Models */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | 86A2AA1E29A3174E006E0FD4 /* ChatModel.swift */, 150 | 8626331929A22EF60087F88B /* SessionModel.swift */, 151 | 86A2AA1C29A3168C006E0FD4 /* SessionManager.swift */, 152 | 86A2AA1229A2FFA3006E0FD4 /* Database */, 153 | ); 154 | path = Models; 155 | sourceTree = ""; 156 | }; 157 | 86A2AA1129A2FF95006E0FD4 /* Views */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | 86C780E8299F0B9C005BF4F3 /* ChatView.swift */, 161 | 8626331529A22EE30087F88B /* SessionView.swift */, 162 | 86A2AA1729A2FFF7006E0FD4 /* Cells */, 163 | 86A2AA2029A31887006E0FD4 /* Widgets */, 164 | ); 165 | path = Views; 166 | sourceTree = ""; 167 | }; 168 | 86A2AA1229A2FFA3006E0FD4 /* Database */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 86A2AA1329A2FFBD006E0FD4 /* SessionDbModel.swift */, 172 | 86A2AA1529A2FFD0006E0FD4 /* ChatDbModel.swift */, 173 | ); 174 | path = Database; 175 | sourceTree = ""; 176 | }; 177 | 86A2AA1729A2FFF7006E0FD4 /* Cells */ = { 178 | isa = PBXGroup; 179 | children = ( 180 | 86C7810C299F5775005BF4F3 /* ChatCell.swift */, 181 | 8626331729A22EEF0087F88B /* SessionCell.swift */, 182 | ); 183 | path = Cells; 184 | sourceTree = ""; 185 | }; 186 | 86A2AA2029A31887006E0FD4 /* Widgets */ = { 187 | isa = PBXGroup; 188 | children = ( 189 | 86BEB36B29A0B29D0050D90C /* InputView.swift */, 190 | ); 191 | path = Widgets; 192 | sourceTree = ""; 193 | }; 194 | 86C780AF299F0AC1005BF4F3 = { 195 | isa = PBXGroup; 196 | children = ( 197 | 86C780BA299F0AC1005BF4F3 /* Chatgpt */, 198 | 86C780CC299F0AC2005BF4F3 /* ChatgptTests */, 199 | 86C780D6299F0AC2005BF4F3 /* ChatgptUITests */, 200 | 86C780B9299F0AC1005BF4F3 /* Products */, 201 | 352530FBE4BE48C661F1F8CA /* Pods */, 202 | CE58CDD2807CBDFD307D7D0C /* Frameworks */, 203 | ); 204 | sourceTree = ""; 205 | }; 206 | 86C780B9299F0AC1005BF4F3 /* Products */ = { 207 | isa = PBXGroup; 208 | children = ( 209 | 86C780B8299F0AC1005BF4F3 /* Chatgpt.app */, 210 | 86C780C9299F0AC2005BF4F3 /* ChatgptTests.xctest */, 211 | 86C780D3299F0AC2005BF4F3 /* ChatgptUITests.xctest */, 212 | ); 213 | name = Products; 214 | sourceTree = ""; 215 | }; 216 | 86C780BA299F0AC1005BF4F3 /* Chatgpt */ = { 217 | isa = PBXGroup; 218 | children = ( 219 | 86C780BB299F0AC1005BF4F3 /* ChatgptApp.swift */, 220 | 86C780F7299F2058005BF4F3 /* ContentView.swift */, 221 | 86A2AA0F29A2FF6E006E0FD4 /* Home */, 222 | 86C780F1299F0D8E005BF4F3 /* Mine */, 223 | 8626331B29A245DD0087F88B /* Util */, 224 | 86C780E7299F0B3B005BF4F3 /* Supporting Files */, 225 | ); 226 | path = Chatgpt; 227 | sourceTree = ""; 228 | }; 229 | 86C780C1299F0AC2005BF4F3 /* Preview Content */ = { 230 | isa = PBXGroup; 231 | children = ( 232 | 86C780C2299F0AC2005BF4F3 /* Preview Assets.xcassets */, 233 | ); 234 | path = "Preview Content"; 235 | sourceTree = ""; 236 | }; 237 | 86C780CC299F0AC2005BF4F3 /* ChatgptTests */ = { 238 | isa = PBXGroup; 239 | children = ( 240 | 86C780CD299F0AC2005BF4F3 /* ChatgptTests.swift */, 241 | ); 242 | path = ChatgptTests; 243 | sourceTree = ""; 244 | }; 245 | 86C780D6299F0AC2005BF4F3 /* ChatgptUITests */ = { 246 | isa = PBXGroup; 247 | children = ( 248 | 86C780D7299F0AC2005BF4F3 /* ChatgptUITests.swift */, 249 | 86C780D9299F0AC2005BF4F3 /* ChatgptUITestsLaunchTests.swift */, 250 | ); 251 | path = ChatgptUITests; 252 | sourceTree = ""; 253 | }; 254 | 86C780E7299F0B3B005BF4F3 /* Supporting Files */ = { 255 | isa = PBXGroup; 256 | children = ( 257 | 86C780C4299F0AC2005BF4F3 /* Chatgpt.entitlements */, 258 | 86C780BF299F0AC2005BF4F3 /* Assets.xcassets */, 259 | 86C780C1299F0AC2005BF4F3 /* Preview Content */, 260 | ); 261 | name = "Supporting Files"; 262 | sourceTree = ""; 263 | }; 264 | 86C780F1299F0D8E005BF4F3 /* Mine */ = { 265 | isa = PBXGroup; 266 | children = ( 267 | 86C780F5299F158B005BF4F3 /* MineView.swift */, 268 | 86C78102299F26BA005BF4F3 /* MineListView.swift */, 269 | ); 270 | path = Mine; 271 | sourceTree = ""; 272 | }; 273 | CE58CDD2807CBDFD307D7D0C /* Frameworks */ = { 274 | isa = PBXGroup; 275 | children = ( 276 | 048DA17C5639FBF362F4DE99 /* Pods_Chatgpt.framework */, 277 | FBAFB5440B651AC51DC1479B /* Pods_Chatgpt_ChatgptUITests.framework */, 278 | 41E5CE7A45A282229C68E94F /* Pods_ChatgptTests.framework */, 279 | ); 280 | name = Frameworks; 281 | sourceTree = ""; 282 | }; 283 | /* End PBXGroup section */ 284 | 285 | /* Begin PBXNativeTarget section */ 286 | 86C780B7299F0AC1005BF4F3 /* Chatgpt */ = { 287 | isa = PBXNativeTarget; 288 | buildConfigurationList = 86C780DD299F0AC2005BF4F3 /* Build configuration list for PBXNativeTarget "Chatgpt" */; 289 | buildPhases = ( 290 | 0B8049FB0ACDB78E7037B1AE /* [CP] Check Pods Manifest.lock */, 291 | 86C780B4299F0AC1005BF4F3 /* Sources */, 292 | 86C780B5299F0AC1005BF4F3 /* Frameworks */, 293 | 86C780B6299F0AC1005BF4F3 /* Resources */, 294 | DD6751D39B7763E619314E88 /* [CP] Embed Pods Frameworks */, 295 | ); 296 | buildRules = ( 297 | ); 298 | dependencies = ( 299 | ); 300 | name = Chatgpt; 301 | productName = Chatgpt; 302 | productReference = 86C780B8299F0AC1005BF4F3 /* Chatgpt.app */; 303 | productType = "com.apple.product-type.application"; 304 | }; 305 | 86C780C8299F0AC2005BF4F3 /* ChatgptTests */ = { 306 | isa = PBXNativeTarget; 307 | buildConfigurationList = 86C780E0299F0AC2005BF4F3 /* Build configuration list for PBXNativeTarget "ChatgptTests" */; 308 | buildPhases = ( 309 | 3E1C2B1CA9A379B5B06AC3BE /* [CP] Check Pods Manifest.lock */, 310 | 86C780C5299F0AC2005BF4F3 /* Sources */, 311 | 86C780C6299F0AC2005BF4F3 /* Frameworks */, 312 | 86C780C7299F0AC2005BF4F3 /* Resources */, 313 | ); 314 | buildRules = ( 315 | ); 316 | dependencies = ( 317 | 86C780CB299F0AC2005BF4F3 /* PBXTargetDependency */, 318 | ); 319 | name = ChatgptTests; 320 | productName = ChatgptTests; 321 | productReference = 86C780C9299F0AC2005BF4F3 /* ChatgptTests.xctest */; 322 | productType = "com.apple.product-type.bundle.unit-test"; 323 | }; 324 | 86C780D2299F0AC2005BF4F3 /* ChatgptUITests */ = { 325 | isa = PBXNativeTarget; 326 | buildConfigurationList = 86C780E3299F0AC2005BF4F3 /* Build configuration list for PBXNativeTarget "ChatgptUITests" */; 327 | buildPhases = ( 328 | 92F811A861EFE5F58C2C81F6 /* [CP] Check Pods Manifest.lock */, 329 | 86C780CF299F0AC2005BF4F3 /* Sources */, 330 | 86C780D0299F0AC2005BF4F3 /* Frameworks */, 331 | 86C780D1299F0AC2005BF4F3 /* Resources */, 332 | E7AB326415885AE85ADF6B55 /* [CP] Embed Pods Frameworks */, 333 | ); 334 | buildRules = ( 335 | ); 336 | dependencies = ( 337 | 86C780D5299F0AC2005BF4F3 /* PBXTargetDependency */, 338 | ); 339 | name = ChatgptUITests; 340 | productName = ChatgptUITests; 341 | productReference = 86C780D3299F0AC2005BF4F3 /* ChatgptUITests.xctest */; 342 | productType = "com.apple.product-type.bundle.ui-testing"; 343 | }; 344 | /* End PBXNativeTarget section */ 345 | 346 | /* Begin PBXProject section */ 347 | 86C780B0299F0AC1005BF4F3 /* Project object */ = { 348 | isa = PBXProject; 349 | attributes = { 350 | BuildIndependentTargetsInParallel = 1; 351 | LastSwiftUpdateCheck = 1410; 352 | LastUpgradeCheck = 1410; 353 | TargetAttributes = { 354 | 86C780B7299F0AC1005BF4F3 = { 355 | CreatedOnToolsVersion = 14.1; 356 | }; 357 | 86C780C8299F0AC2005BF4F3 = { 358 | CreatedOnToolsVersion = 14.1; 359 | TestTargetID = 86C780B7299F0AC1005BF4F3; 360 | }; 361 | 86C780D2299F0AC2005BF4F3 = { 362 | CreatedOnToolsVersion = 14.1; 363 | TestTargetID = 86C780B7299F0AC1005BF4F3; 364 | }; 365 | }; 366 | }; 367 | buildConfigurationList = 86C780B3299F0AC1005BF4F3 /* Build configuration list for PBXProject "Chatgpt" */; 368 | compatibilityVersion = "Xcode 13.0"; 369 | developmentRegion = en; 370 | hasScannedForEncodings = 0; 371 | knownRegions = ( 372 | en, 373 | Base, 374 | ); 375 | mainGroup = 86C780AF299F0AC1005BF4F3; 376 | productRefGroup = 86C780B9299F0AC1005BF4F3 /* Products */; 377 | projectDirPath = ""; 378 | projectRoot = ""; 379 | targets = ( 380 | 86C780B7299F0AC1005BF4F3 /* Chatgpt */, 381 | 86C780C8299F0AC2005BF4F3 /* ChatgptTests */, 382 | 86C780D2299F0AC2005BF4F3 /* ChatgptUITests */, 383 | ); 384 | }; 385 | /* End PBXProject section */ 386 | 387 | /* Begin PBXResourcesBuildPhase section */ 388 | 86C780B6299F0AC1005BF4F3 /* Resources */ = { 389 | isa = PBXResourcesBuildPhase; 390 | buildActionMask = 2147483647; 391 | files = ( 392 | 86C780C3299F0AC2005BF4F3 /* Preview Assets.xcassets in Resources */, 393 | 86C780C0299F0AC2005BF4F3 /* Assets.xcassets in Resources */, 394 | ); 395 | runOnlyForDeploymentPostprocessing = 0; 396 | }; 397 | 86C780C7299F0AC2005BF4F3 /* Resources */ = { 398 | isa = PBXResourcesBuildPhase; 399 | buildActionMask = 2147483647; 400 | files = ( 401 | ); 402 | runOnlyForDeploymentPostprocessing = 0; 403 | }; 404 | 86C780D1299F0AC2005BF4F3 /* Resources */ = { 405 | isa = PBXResourcesBuildPhase; 406 | buildActionMask = 2147483647; 407 | files = ( 408 | ); 409 | runOnlyForDeploymentPostprocessing = 0; 410 | }; 411 | /* End PBXResourcesBuildPhase section */ 412 | 413 | /* Begin PBXShellScriptBuildPhase section */ 414 | 0B8049FB0ACDB78E7037B1AE /* [CP] Check Pods Manifest.lock */ = { 415 | isa = PBXShellScriptBuildPhase; 416 | buildActionMask = 2147483647; 417 | files = ( 418 | ); 419 | inputFileListPaths = ( 420 | ); 421 | inputPaths = ( 422 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 423 | "${PODS_ROOT}/Manifest.lock", 424 | ); 425 | name = "[CP] Check Pods Manifest.lock"; 426 | outputFileListPaths = ( 427 | ); 428 | outputPaths = ( 429 | "$(DERIVED_FILE_DIR)/Pods-Chatgpt-checkManifestLockResult.txt", 430 | ); 431 | runOnlyForDeploymentPostprocessing = 0; 432 | shellPath = /bin/sh; 433 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 434 | showEnvVarsInLog = 0; 435 | }; 436 | 3E1C2B1CA9A379B5B06AC3BE /* [CP] Check Pods Manifest.lock */ = { 437 | isa = PBXShellScriptBuildPhase; 438 | buildActionMask = 2147483647; 439 | files = ( 440 | ); 441 | inputFileListPaths = ( 442 | ); 443 | inputPaths = ( 444 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 445 | "${PODS_ROOT}/Manifest.lock", 446 | ); 447 | name = "[CP] Check Pods Manifest.lock"; 448 | outputFileListPaths = ( 449 | ); 450 | outputPaths = ( 451 | "$(DERIVED_FILE_DIR)/Pods-ChatgptTests-checkManifestLockResult.txt", 452 | ); 453 | runOnlyForDeploymentPostprocessing = 0; 454 | shellPath = /bin/sh; 455 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 456 | showEnvVarsInLog = 0; 457 | }; 458 | 92F811A861EFE5F58C2C81F6 /* [CP] Check Pods Manifest.lock */ = { 459 | isa = PBXShellScriptBuildPhase; 460 | buildActionMask = 2147483647; 461 | files = ( 462 | ); 463 | inputFileListPaths = ( 464 | ); 465 | inputPaths = ( 466 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 467 | "${PODS_ROOT}/Manifest.lock", 468 | ); 469 | name = "[CP] Check Pods Manifest.lock"; 470 | outputFileListPaths = ( 471 | ); 472 | outputPaths = ( 473 | "$(DERIVED_FILE_DIR)/Pods-Chatgpt-ChatgptUITests-checkManifestLockResult.txt", 474 | ); 475 | runOnlyForDeploymentPostprocessing = 0; 476 | shellPath = /bin/sh; 477 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 478 | showEnvVarsInLog = 0; 479 | }; 480 | DD6751D39B7763E619314E88 /* [CP] Embed Pods Frameworks */ = { 481 | isa = PBXShellScriptBuildPhase; 482 | buildActionMask = 2147483647; 483 | files = ( 484 | ); 485 | inputFileListPaths = ( 486 | "${PODS_ROOT}/Target Support Files/Pods-Chatgpt/Pods-Chatgpt-frameworks-${CONFIGURATION}-input-files.xcfilelist", 487 | ); 488 | name = "[CP] Embed Pods Frameworks"; 489 | outputFileListPaths = ( 490 | "${PODS_ROOT}/Target Support Files/Pods-Chatgpt/Pods-Chatgpt-frameworks-${CONFIGURATION}-output-files.xcfilelist", 491 | ); 492 | runOnlyForDeploymentPostprocessing = 0; 493 | shellPath = /bin/sh; 494 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Chatgpt/Pods-Chatgpt-frameworks.sh\"\n"; 495 | showEnvVarsInLog = 0; 496 | }; 497 | E7AB326415885AE85ADF6B55 /* [CP] Embed Pods Frameworks */ = { 498 | isa = PBXShellScriptBuildPhase; 499 | buildActionMask = 2147483647; 500 | files = ( 501 | ); 502 | inputFileListPaths = ( 503 | "${PODS_ROOT}/Target Support Files/Pods-Chatgpt-ChatgptUITests/Pods-Chatgpt-ChatgptUITests-frameworks-${CONFIGURATION}-input-files.xcfilelist", 504 | ); 505 | name = "[CP] Embed Pods Frameworks"; 506 | outputFileListPaths = ( 507 | "${PODS_ROOT}/Target Support Files/Pods-Chatgpt-ChatgptUITests/Pods-Chatgpt-ChatgptUITests-frameworks-${CONFIGURATION}-output-files.xcfilelist", 508 | ); 509 | runOnlyForDeploymentPostprocessing = 0; 510 | shellPath = /bin/sh; 511 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Chatgpt-ChatgptUITests/Pods-Chatgpt-ChatgptUITests-frameworks.sh\"\n"; 512 | showEnvVarsInLog = 0; 513 | }; 514 | /* End PBXShellScriptBuildPhase section */ 515 | 516 | /* Begin PBXSourcesBuildPhase section */ 517 | 86C780B4299F0AC1005BF4F3 /* Sources */ = { 518 | isa = PBXSourcesBuildPhase; 519 | buildActionMask = 2147483647; 520 | files = ( 521 | 86BEB36C29A0B29D0050D90C /* InputView.swift in Sources */, 522 | 8626331829A22EEF0087F88B /* SessionCell.swift in Sources */, 523 | 86C7810D299F5775005BF4F3 /* ChatCell.swift in Sources */, 524 | 86A2AA1F29A3174E006E0FD4 /* ChatModel.swift in Sources */, 525 | 86A2AA1429A2FFBD006E0FD4 /* SessionDbModel.swift in Sources */, 526 | 86C780F8299F2058005BF4F3 /* ContentView.swift in Sources */, 527 | 8626331629A22EE30087F88B /* SessionView.swift in Sources */, 528 | 8626331D29A246560087F88B /* QFileManage.swift in Sources */, 529 | 86C780F6299F158B005BF4F3 /* MineView.swift in Sources */, 530 | 86C780E9299F0B9C005BF4F3 /* ChatView.swift in Sources */, 531 | 86C78103299F26BA005BF4F3 /* MineListView.swift in Sources */, 532 | 86A2AA1629A2FFD0006E0FD4 /* ChatDbModel.swift in Sources */, 533 | 8626331A29A22EF60087F88B /* SessionModel.swift in Sources */, 534 | 86A2AA1D29A3168C006E0FD4 /* SessionManager.swift in Sources */, 535 | 86C780BC299F0AC1005BF4F3 /* ChatgptApp.swift in Sources */, 536 | ); 537 | runOnlyForDeploymentPostprocessing = 0; 538 | }; 539 | 86C780C5299F0AC2005BF4F3 /* Sources */ = { 540 | isa = PBXSourcesBuildPhase; 541 | buildActionMask = 2147483647; 542 | files = ( 543 | 86C780CE299F0AC2005BF4F3 /* ChatgptTests.swift in Sources */, 544 | ); 545 | runOnlyForDeploymentPostprocessing = 0; 546 | }; 547 | 86C780CF299F0AC2005BF4F3 /* Sources */ = { 548 | isa = PBXSourcesBuildPhase; 549 | buildActionMask = 2147483647; 550 | files = ( 551 | 86C780DA299F0AC2005BF4F3 /* ChatgptUITestsLaunchTests.swift in Sources */, 552 | 86C780D8299F0AC2005BF4F3 /* ChatgptUITests.swift in Sources */, 553 | ); 554 | runOnlyForDeploymentPostprocessing = 0; 555 | }; 556 | /* End PBXSourcesBuildPhase section */ 557 | 558 | /* Begin PBXTargetDependency section */ 559 | 86C780CB299F0AC2005BF4F3 /* PBXTargetDependency */ = { 560 | isa = PBXTargetDependency; 561 | target = 86C780B7299F0AC1005BF4F3 /* Chatgpt */; 562 | targetProxy = 86C780CA299F0AC2005BF4F3 /* PBXContainerItemProxy */; 563 | }; 564 | 86C780D5299F0AC2005BF4F3 /* PBXTargetDependency */ = { 565 | isa = PBXTargetDependency; 566 | target = 86C780B7299F0AC1005BF4F3 /* Chatgpt */; 567 | targetProxy = 86C780D4299F0AC2005BF4F3 /* PBXContainerItemProxy */; 568 | }; 569 | /* End PBXTargetDependency section */ 570 | 571 | /* Begin XCBuildConfiguration section */ 572 | 86C780DB299F0AC2005BF4F3 /* Debug */ = { 573 | isa = XCBuildConfiguration; 574 | buildSettings = { 575 | ALWAYS_SEARCH_USER_PATHS = NO; 576 | CLANG_ANALYZER_NONNULL = YES; 577 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 578 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 579 | CLANG_ENABLE_MODULES = YES; 580 | CLANG_ENABLE_OBJC_ARC = YES; 581 | CLANG_ENABLE_OBJC_WEAK = YES; 582 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 583 | CLANG_WARN_BOOL_CONVERSION = YES; 584 | CLANG_WARN_COMMA = YES; 585 | CLANG_WARN_CONSTANT_CONVERSION = YES; 586 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 587 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 588 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 589 | CLANG_WARN_EMPTY_BODY = YES; 590 | CLANG_WARN_ENUM_CONVERSION = YES; 591 | CLANG_WARN_INFINITE_RECURSION = YES; 592 | CLANG_WARN_INT_CONVERSION = YES; 593 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 594 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 595 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 596 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 597 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 598 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 599 | CLANG_WARN_STRICT_PROTOTYPES = YES; 600 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 601 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 602 | CLANG_WARN_UNREACHABLE_CODE = YES; 603 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 604 | COPY_PHASE_STRIP = NO; 605 | DEBUG_INFORMATION_FORMAT = dwarf; 606 | ENABLE_STRICT_OBJC_MSGSEND = YES; 607 | ENABLE_TESTABILITY = YES; 608 | GCC_C_LANGUAGE_STANDARD = gnu11; 609 | GCC_DYNAMIC_NO_PIC = NO; 610 | GCC_NO_COMMON_BLOCKS = YES; 611 | GCC_OPTIMIZATION_LEVEL = 0; 612 | GCC_PREPROCESSOR_DEFINITIONS = ( 613 | "DEBUG=1", 614 | "$(inherited)", 615 | ); 616 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 617 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 618 | GCC_WARN_UNDECLARED_SELECTOR = YES; 619 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 620 | GCC_WARN_UNUSED_FUNCTION = YES; 621 | GCC_WARN_UNUSED_VARIABLE = YES; 622 | MACOSX_DEPLOYMENT_TARGET = 13.0; 623 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 624 | MTL_FAST_MATH = YES; 625 | ONLY_ACTIVE_ARCH = YES; 626 | SDKROOT = macosx; 627 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 628 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 629 | }; 630 | name = Debug; 631 | }; 632 | 86C780DC299F0AC2005BF4F3 /* Release */ = { 633 | isa = XCBuildConfiguration; 634 | buildSettings = { 635 | ALWAYS_SEARCH_USER_PATHS = NO; 636 | CLANG_ANALYZER_NONNULL = YES; 637 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 638 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 639 | CLANG_ENABLE_MODULES = YES; 640 | CLANG_ENABLE_OBJC_ARC = YES; 641 | CLANG_ENABLE_OBJC_WEAK = YES; 642 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 643 | CLANG_WARN_BOOL_CONVERSION = YES; 644 | CLANG_WARN_COMMA = YES; 645 | CLANG_WARN_CONSTANT_CONVERSION = YES; 646 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 647 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 648 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 649 | CLANG_WARN_EMPTY_BODY = YES; 650 | CLANG_WARN_ENUM_CONVERSION = YES; 651 | CLANG_WARN_INFINITE_RECURSION = YES; 652 | CLANG_WARN_INT_CONVERSION = YES; 653 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 654 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 655 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 656 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 657 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 658 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 659 | CLANG_WARN_STRICT_PROTOTYPES = YES; 660 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 661 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 662 | CLANG_WARN_UNREACHABLE_CODE = YES; 663 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 664 | COPY_PHASE_STRIP = NO; 665 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 666 | ENABLE_NS_ASSERTIONS = NO; 667 | ENABLE_STRICT_OBJC_MSGSEND = YES; 668 | GCC_C_LANGUAGE_STANDARD = gnu11; 669 | GCC_NO_COMMON_BLOCKS = YES; 670 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 671 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 672 | GCC_WARN_UNDECLARED_SELECTOR = YES; 673 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 674 | GCC_WARN_UNUSED_FUNCTION = YES; 675 | GCC_WARN_UNUSED_VARIABLE = YES; 676 | MACOSX_DEPLOYMENT_TARGET = 13.0; 677 | MTL_ENABLE_DEBUG_INFO = NO; 678 | MTL_FAST_MATH = YES; 679 | SDKROOT = macosx; 680 | SWIFT_COMPILATION_MODE = wholemodule; 681 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 682 | }; 683 | name = Release; 684 | }; 685 | 86C780DE299F0AC2005BF4F3 /* Debug */ = { 686 | isa = XCBuildConfiguration; 687 | baseConfigurationReference = 2E17272D1C8182B6108932B7 /* Pods-Chatgpt.debug.xcconfig */; 688 | buildSettings = { 689 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 690 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 691 | CODE_SIGN_ENTITLEMENTS = Chatgpt/Chatgpt.entitlements; 692 | CODE_SIGN_STYLE = Automatic; 693 | COMBINE_HIDPI_IMAGES = YES; 694 | CURRENT_PROJECT_VERSION = 1; 695 | DEVELOPMENT_ASSET_PATHS = "\"Chatgpt/Preview Content\""; 696 | DEVELOPMENT_TEAM = YC55GKNCVZ; 697 | ENABLE_HARDENED_RUNTIME = YES; 698 | ENABLE_PREVIEWS = YES; 699 | GENERATE_INFOPLIST_FILE = YES; 700 | INFOPLIST_KEY_CFBundleDisplayName = ChatGPT; 701 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 702 | LD_RUNPATH_SEARCH_PATHS = ( 703 | "$(inherited)", 704 | "@executable_path/../Frameworks", 705 | ); 706 | MACOSX_DEPLOYMENT_TARGET = 13.0; 707 | MARKETING_VERSION = 1.0; 708 | PRODUCT_BUNDLE_IDENTIFIER = com.qwz.Chatgpt; 709 | PRODUCT_NAME = "$(TARGET_NAME)"; 710 | SWIFT_EMIT_LOC_STRINGS = YES; 711 | SWIFT_VERSION = 5.0; 712 | }; 713 | name = Debug; 714 | }; 715 | 86C780DF299F0AC2005BF4F3 /* Release */ = { 716 | isa = XCBuildConfiguration; 717 | baseConfigurationReference = 347E003C424A3307E515ACA8 /* Pods-Chatgpt.release.xcconfig */; 718 | buildSettings = { 719 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 720 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 721 | CODE_SIGN_ENTITLEMENTS = Chatgpt/Chatgpt.entitlements; 722 | CODE_SIGN_STYLE = Automatic; 723 | COMBINE_HIDPI_IMAGES = YES; 724 | CURRENT_PROJECT_VERSION = 1; 725 | DEVELOPMENT_ASSET_PATHS = "\"Chatgpt/Preview Content\""; 726 | DEVELOPMENT_TEAM = YC55GKNCVZ; 727 | ENABLE_HARDENED_RUNTIME = YES; 728 | ENABLE_PREVIEWS = YES; 729 | GENERATE_INFOPLIST_FILE = YES; 730 | INFOPLIST_KEY_CFBundleDisplayName = ChatGPT; 731 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 732 | LD_RUNPATH_SEARCH_PATHS = ( 733 | "$(inherited)", 734 | "@executable_path/../Frameworks", 735 | ); 736 | MACOSX_DEPLOYMENT_TARGET = 13.0; 737 | MARKETING_VERSION = 1.0; 738 | PRODUCT_BUNDLE_IDENTIFIER = com.qwz.Chatgpt; 739 | PRODUCT_NAME = "$(TARGET_NAME)"; 740 | SWIFT_EMIT_LOC_STRINGS = YES; 741 | SWIFT_VERSION = 5.0; 742 | }; 743 | name = Release; 744 | }; 745 | 86C780E1299F0AC2005BF4F3 /* Debug */ = { 746 | isa = XCBuildConfiguration; 747 | baseConfigurationReference = 3AB4EC76C9F8607FC1F62EF1 /* Pods-ChatgptTests.debug.xcconfig */; 748 | buildSettings = { 749 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 750 | BUNDLE_LOADER = "$(TEST_HOST)"; 751 | CODE_SIGN_STYLE = Automatic; 752 | CURRENT_PROJECT_VERSION = 1; 753 | DEVELOPMENT_TEAM = YC55GKNCVZ; 754 | GENERATE_INFOPLIST_FILE = YES; 755 | MACOSX_DEPLOYMENT_TARGET = 13.0; 756 | MARKETING_VERSION = 1.0; 757 | PRODUCT_BUNDLE_IDENTIFIER = com.qwz.ChatgptTests; 758 | PRODUCT_NAME = "$(TARGET_NAME)"; 759 | SWIFT_EMIT_LOC_STRINGS = NO; 760 | SWIFT_VERSION = 5.0; 761 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Chatgpt.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Chatgpt"; 762 | }; 763 | name = Debug; 764 | }; 765 | 86C780E2299F0AC2005BF4F3 /* Release */ = { 766 | isa = XCBuildConfiguration; 767 | baseConfigurationReference = ECDD0B3D18A8B84E53FB88EE /* Pods-ChatgptTests.release.xcconfig */; 768 | buildSettings = { 769 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 770 | BUNDLE_LOADER = "$(TEST_HOST)"; 771 | CODE_SIGN_STYLE = Automatic; 772 | CURRENT_PROJECT_VERSION = 1; 773 | DEVELOPMENT_TEAM = YC55GKNCVZ; 774 | GENERATE_INFOPLIST_FILE = YES; 775 | MACOSX_DEPLOYMENT_TARGET = 13.0; 776 | MARKETING_VERSION = 1.0; 777 | PRODUCT_BUNDLE_IDENTIFIER = com.qwz.ChatgptTests; 778 | PRODUCT_NAME = "$(TARGET_NAME)"; 779 | SWIFT_EMIT_LOC_STRINGS = NO; 780 | SWIFT_VERSION = 5.0; 781 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Chatgpt.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Chatgpt"; 782 | }; 783 | name = Release; 784 | }; 785 | 86C780E4299F0AC2005BF4F3 /* Debug */ = { 786 | isa = XCBuildConfiguration; 787 | baseConfigurationReference = 68FCE08BA501A259FD8849CA /* Pods-Chatgpt-ChatgptUITests.debug.xcconfig */; 788 | buildSettings = { 789 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 790 | CODE_SIGN_STYLE = Automatic; 791 | CURRENT_PROJECT_VERSION = 1; 792 | DEVELOPMENT_TEAM = YC55GKNCVZ; 793 | GENERATE_INFOPLIST_FILE = YES; 794 | MARKETING_VERSION = 1.0; 795 | PRODUCT_BUNDLE_IDENTIFIER = com.qwz.ChatgptUITests; 796 | PRODUCT_NAME = "$(TARGET_NAME)"; 797 | SWIFT_EMIT_LOC_STRINGS = NO; 798 | SWIFT_VERSION = 5.0; 799 | TEST_TARGET_NAME = Chatgpt; 800 | }; 801 | name = Debug; 802 | }; 803 | 86C780E5299F0AC2005BF4F3 /* Release */ = { 804 | isa = XCBuildConfiguration; 805 | baseConfigurationReference = 10049C8394B0249B9E478652 /* Pods-Chatgpt-ChatgptUITests.release.xcconfig */; 806 | buildSettings = { 807 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 808 | CODE_SIGN_STYLE = Automatic; 809 | CURRENT_PROJECT_VERSION = 1; 810 | DEVELOPMENT_TEAM = YC55GKNCVZ; 811 | GENERATE_INFOPLIST_FILE = YES; 812 | MARKETING_VERSION = 1.0; 813 | PRODUCT_BUNDLE_IDENTIFIER = com.qwz.ChatgptUITests; 814 | PRODUCT_NAME = "$(TARGET_NAME)"; 815 | SWIFT_EMIT_LOC_STRINGS = NO; 816 | SWIFT_VERSION = 5.0; 817 | TEST_TARGET_NAME = Chatgpt; 818 | }; 819 | name = Release; 820 | }; 821 | /* End XCBuildConfiguration section */ 822 | 823 | /* Begin XCConfigurationList section */ 824 | 86C780B3299F0AC1005BF4F3 /* Build configuration list for PBXProject "Chatgpt" */ = { 825 | isa = XCConfigurationList; 826 | buildConfigurations = ( 827 | 86C780DB299F0AC2005BF4F3 /* Debug */, 828 | 86C780DC299F0AC2005BF4F3 /* Release */, 829 | ); 830 | defaultConfigurationIsVisible = 0; 831 | defaultConfigurationName = Release; 832 | }; 833 | 86C780DD299F0AC2005BF4F3 /* Build configuration list for PBXNativeTarget "Chatgpt" */ = { 834 | isa = XCConfigurationList; 835 | buildConfigurations = ( 836 | 86C780DE299F0AC2005BF4F3 /* Debug */, 837 | 86C780DF299F0AC2005BF4F3 /* Release */, 838 | ); 839 | defaultConfigurationIsVisible = 0; 840 | defaultConfigurationName = Release; 841 | }; 842 | 86C780E0299F0AC2005BF4F3 /* Build configuration list for PBXNativeTarget "ChatgptTests" */ = { 843 | isa = XCConfigurationList; 844 | buildConfigurations = ( 845 | 86C780E1299F0AC2005BF4F3 /* Debug */, 846 | 86C780E2299F0AC2005BF4F3 /* Release */, 847 | ); 848 | defaultConfigurationIsVisible = 0; 849 | defaultConfigurationName = Release; 850 | }; 851 | 86C780E3299F0AC2005BF4F3 /* Build configuration list for PBXNativeTarget "ChatgptUITests" */ = { 852 | isa = XCConfigurationList; 853 | buildConfigurations = ( 854 | 86C780E4299F0AC2005BF4F3 /* Debug */, 855 | 86C780E5299F0AC2005BF4F3 /* Release */, 856 | ); 857 | defaultConfigurationIsVisible = 0; 858 | defaultConfigurationName = Release; 859 | }; 860 | /* End XCConfigurationList section */ 861 | }; 862 | rootObject = 86C780B0299F0AC1005BF4F3 /* Project object */; 863 | } 864 | -------------------------------------------------------------------------------- /Chatgpt.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Chatgpt.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Chatgpt.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Chatgpt.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon-16.png", 5 | "idiom" : "mac", 6 | "scale" : "1x", 7 | "size" : "16x16" 8 | }, 9 | { 10 | "filename" : "icon-16@2x.png", 11 | "idiom" : "mac", 12 | "scale" : "2x", 13 | "size" : "16x16" 14 | }, 15 | { 16 | "filename" : "icon-32.png", 17 | "idiom" : "mac", 18 | "scale" : "1x", 19 | "size" : "32x32" 20 | }, 21 | { 22 | "filename" : "icon-32@2x.png", 23 | "idiom" : "mac", 24 | "scale" : "2x", 25 | "size" : "32x32" 26 | }, 27 | { 28 | "filename" : "icon-128.png", 29 | "idiom" : "mac", 30 | "scale" : "1x", 31 | "size" : "128x128" 32 | }, 33 | { 34 | "filename" : "icon-128@2x.png", 35 | "idiom" : "mac", 36 | "scale" : "2x", 37 | "size" : "128x128" 38 | }, 39 | { 40 | "filename" : "icon-256.png", 41 | "idiom" : "mac", 42 | "scale" : "1x", 43 | "size" : "256x256" 44 | }, 45 | { 46 | "filename" : "icon-256@2x.png", 47 | "idiom" : "mac", 48 | "scale" : "2x", 49 | "size" : "256x256" 50 | }, 51 | { 52 | "filename" : "icon-512.png", 53 | "idiom" : "mac", 54 | "scale" : "1x", 55 | "size" : "512x512" 56 | }, 57 | { 58 | "filename" : "icon-512@2x.png", 59 | "idiom" : "mac", 60 | "scale" : "2x", 61 | "size" : "512x512" 62 | } 63 | ], 64 | "info" : { 65 | "author" : "xcode", 66 | "version" : 1 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-128.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-128@2x.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-16.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-16@2x.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-256.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-256@2x.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-32.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-32@2x.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-512.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/AppIcon.appiconset/icon-512@2x.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Chat/Chat.imageset/Chat@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/Chat/Chat.imageset/Chat@2x.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Chat/Chat.imageset/Chat@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/Chat/Chat.imageset/Chat@3x.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Chat/Chat.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "Chat@2x.png", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "filename" : "Chat@3x.png", 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "author" : "xcode", 20 | "version" : 1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Chat/Chatgpt.imageset/Chatgpt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/Chat/Chatgpt.imageset/Chatgpt@2x.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Chat/Chatgpt.imageset/Chatgpt@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/Chat/Chatgpt.imageset/Chatgpt@3x.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Chat/Chatgpt.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "Chatgpt@2x.png", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "filename" : "Chatgpt@3x.png", 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "author" : "xcode", 20 | "version" : 1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Chat/ClearRecord.imageset/ClearRecord@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/Chat/ClearRecord.imageset/ClearRecord@2x.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Chat/ClearRecord.imageset/ClearRecord@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/Chat/ClearRecord.imageset/ClearRecord@3x.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Chat/ClearRecord.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "ClearRecord@2x.png", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "filename" : "ClearRecord@3x.png", 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "author" : "xcode", 20 | "version" : 1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Chat/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Chat/DisableInputColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0xF8", 9 | "green" : "0xF8", 10 | "red" : "0xF8" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0x33", 27 | "green" : "0x33", 28 | "red" : "0x33" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Chat/EnableInputColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0xFF", 9 | "green" : "0xFF", 10 | "red" : "0xFF" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0xFF", 27 | "green" : "0xFF", 28 | "red" : "0xFF" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Chat/ListColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0xF0", 9 | "green" : "0xF0", 10 | "red" : "0xF0" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0x21", 27 | "green" : "0x21", 28 | "red" : "0x21" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Chat/NameColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x66", 9 | "green" : "0x66", 10 | "red" : "0x66" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0x66", 27 | "green" : "0x66", 28 | "red" : "0x66" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Chat/NewChat.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "NewChat@2x.png", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "filename" : "NewChat@3x.png", 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "author" : "xcode", 20 | "version" : 1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Chat/NewChat.imageset/NewChat@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/Chat/NewChat.imageset/NewChat@2x.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Chat/NewChat.imageset/NewChat@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/Chat/NewChat.imageset/NewChat@3x.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Mine/Avatar.imageset/Avatar@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/Mine/Avatar.imageset/Avatar@2x.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Mine/Avatar.imageset/Avatar@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/Chatgpt/Assets.xcassets/Mine/Avatar.imageset/Avatar@3x.png -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Mine/Avatar.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "Avatar@2x.png", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "filename" : "Avatar@3x.png", 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "author" : "xcode", 20 | "version" : 1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Chatgpt/Assets.xcassets/Mine/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Chatgpt/Chatgpt.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | com.apple.security.network.client 10 | 11 | com.apple.security.network.server 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Chatgpt/ChatgptApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatgptApp.swift 3 | // Chatgpt 4 | // 5 | // Created by qinwenzhou on 2023/2/17. 6 | // 7 | 8 | import SwiftUI 9 | import WCDBSwift 10 | 11 | var db: Database? 12 | 13 | @main 14 | struct ChatgptApp: App { 15 | var body: some Scene { 16 | WindowGroup { 17 | ContentView() 18 | } 19 | } 20 | 21 | init() { 22 | // 创建数据库 23 | let path = QFileManage.databaseDirectory() + "/chatgpt.db" 24 | debugPrint("数据库路径:\(path)") 25 | db = Database(withPath:path) 26 | do { 27 | // 建表 28 | try db?.run(transaction: { 29 | try db?.create(table: SessionDbModel.tableName, of: SessionDbModel.self) 30 | try db?.create(table: ChatDbModel.tableName, of: ChatDbModel.self) 31 | }) 32 | } catch let error { 33 | debugPrint("创建数据库失败!Error: \(error.localizedDescription)") 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Chatgpt/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Chatgpt 4 | // 5 | // Created by qinwenzhou on 2023/2/17. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | var manager = SessionManager() 12 | 13 | var body: some View { 14 | NavigationSplitView { 15 | SessionView(manager: manager) 16 | } detail: { 17 | ChatView(manager: manager) 18 | } 19 | } 20 | } 21 | 22 | struct ContentView_Previews: PreviewProvider { 23 | static var previews: some View { 24 | ContentView() 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Chatgpt/Home/Models/ChatModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatModel.swift 3 | // Chatgpt 4 | // 5 | // Created by qinwenzhou on 2023/2/20. 6 | // 7 | 8 | import Foundation 9 | import Alamofire 10 | import SwiftyJSON 11 | 12 | // https://platform.openai.com 13 | private let kOpenaiApiKey = "Your OpenAI API Key" 14 | private let kApiBaseUrl = "https://api.openai.com" 15 | 16 | struct ChatModel: Identifiable { 17 | var id: String 18 | var sessionId: Int64 = 0 19 | var name: String 20 | var avatar: String 21 | var content: String 22 | var isChatgpt: Bool 23 | var isThinking = false 24 | var createTime: Date 25 | } 26 | 27 | extension ChatModel { 28 | static func newAskModel(sessionId: Int64, prompt: String) -> ChatModel { 29 | return ChatModel(id: "\(UUID())", sessionId: sessionId, name: "我", avatar: "Avatar", content: prompt, isChatgpt: false, createTime: Date()) 30 | } 31 | 32 | static func newAnswerModel(sessionId: Int64, id: String, text: String) -> ChatModel { 33 | return ChatModel(id: id, sessionId: sessionId, name: "Chatgpt", avatar: "Chatgpt", content: text, isChatgpt: true, createTime: Date()) 34 | } 35 | 36 | static func newThinkingModel(sessionId: Int64) -> ChatModel { 37 | return ChatModel(id: "\(UUID())", sessionId: sessionId, name: "Chatgpt", avatar: "Chatgpt", content: "···", isChatgpt: true, isThinking: true, createTime: Date()) 38 | } 39 | } 40 | 41 | // Network 42 | extension ChatModel { 43 | /// chatgpt 请求接口 44 | /// - Parameters: 45 | /// - prompt: 关键字 46 | /// - success: 成功 47 | /// - failure: 失败 48 | static func ask(prompt: String, success: @escaping (_ id: String, _ text: String) -> Void, failure: @escaping (Error?) -> Void) { 49 | if prompt.count == 0 { 50 | return 51 | } 52 | let parameters: [String: Any] = [ 53 | "model": "text-davinci-003", 54 | "prompt": prompt, 55 | "max_tokens": 2048, 56 | ] 57 | let headers: HTTPHeaders = [ 58 | "Authorization": "Bearer " + kOpenaiApiKey, 59 | "Content-Type": "application/json" 60 | ] 61 | let api = "/v1/completions" 62 | AF.request(kApiBaseUrl + api, method: .post, parameters: parameters, encoding: JSONEncoding.default, headers: headers) { request in 63 | request.timeoutInterval = 60 64 | request.allowsConstrainedNetworkAccess = false 65 | }.responseData { response in 66 | switch response.result { 67 | case .success(let data): 68 | do { 69 | let json = try JSON(data: data) 70 | debugPrint("请求成功:\n\(json)") 71 | if let choice = json["choices"].array?.first { 72 | success( 73 | json["id"].stringValue, 74 | format(text: choice["text"].stringValue) 75 | ) 76 | } else { 77 | debugPrint("解析失败!choices数组为空") 78 | failure(nil) 79 | } 80 | } catch let error { 81 | debugPrint("解析失败:\n\(error)") 82 | failure(nil) 83 | } 84 | case .failure(let error): 85 | debugPrint("请求失败:\n\(error)") 86 | failure(nil) 87 | } 88 | } 89 | } 90 | 91 | /// 格式化chatgpt回答的内容 92 | /// - Parameter text: chatgpt回答的文本 93 | /// - Returns: 格式化后的文本 94 | static func format(text: String) -> String { 95 | var str = removeHeader(char: "?", in: text) 96 | str = removeHeader(char: "?", in: text) 97 | str = removeHeader(char: "\n", in: text) 98 | return str 99 | } 100 | 101 | /// 递归删除首部指定字符,如问号、换行 102 | /// - Parameter text: 文本 103 | /// - Returns: 结果 104 | static func removeHeader(char: String, in text: String) -> String { 105 | let str = text as NSString 106 | let range = str.range(of: char) 107 | if range.length > 0 && range.location == 0 { 108 | let subStr = str.replacingOccurrences(of: char, with: "", range: range) 109 | return removeHeader(char:char, in: subStr) 110 | } else { 111 | return text 112 | } 113 | } 114 | } 115 | 116 | extension ChatModel { 117 | /// 向本地数据库插入聊天项 118 | /// - Parameters: 119 | /// - chats: 聊天项 120 | /// - completion: 完成 121 | static func insert(chats: [ChatModel], completion: (() -> Void)? = nil) { 122 | DispatchQueue.global().async { 123 | let objects = chats.map { 124 | ChatDbModel(sessionId: $0.sessionId, chatId: $0.id, content: $0.content, isChatgpt: $0.isChatgpt, createTime: $0.createTime) 125 | } 126 | ChatDbModel.insert(objects: objects) 127 | DispatchQueue.main.async { 128 | completion?() 129 | } 130 | } 131 | } 132 | 133 | /// 根据会话编号从本地数据库载入聊天项 134 | /// - Parameters: 135 | /// - sessionId: 会话编号 136 | /// - completion: 完成 137 | static func chats(for sessionId: Int64, completion: @escaping ([ChatModel]?) -> Void) { 138 | DispatchQueue.global().async { 139 | let records = ChatDbModel.records(for: sessionId)?.map { 140 | let name = $0.isChatgpt ? "Chatgpt" : "我" 141 | let avatar = $0.isChatgpt ? "Chatgpt" : "Avatar" 142 | return ChatModel(id: $0.chatId, name: name, avatar: avatar, content: $0.content, isChatgpt: $0.isChatgpt, createTime: $0.createTime ?? Date()) 143 | } 144 | DispatchQueue.main.async { 145 | completion(records) 146 | } 147 | } 148 | } 149 | 150 | /// 根据会话编号删除本地数据库所有聊天项 151 | /// - Parameters: 152 | /// - sessionId: 会话id 153 | /// - completion: 完成 154 | static func removeChats(for sessionId: Int64, completion: (() -> Void)? = nil) { 155 | DispatchQueue.global().async { 156 | ChatDbModel.removeRecords(for: sessionId) 157 | 158 | DispatchQueue.main.async { 159 | completion?() 160 | } 161 | } 162 | } 163 | 164 | /// 删除本地数据库所有聊天项 165 | /// - Parameters: 166 | /// - completion: 完成 167 | static func removeAllChats(completion: (() -> Void)? = nil) { 168 | DispatchQueue.global().async { 169 | ChatDbModel.removeAllRecords() 170 | 171 | DispatchQueue.main.async { 172 | completion?() 173 | } 174 | } 175 | } 176 | } 177 | -------------------------------------------------------------------------------- /Chatgpt/Home/Models/Database/ChatDbModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatDbModel.swift 3 | // Chatgpt 4 | // 5 | // Created by qinwenzhou on 2023/2/20. 6 | // 7 | 8 | import Foundation 9 | import WCDBSwift 10 | 11 | final class ChatDbModel: TableCodable { 12 | static var tableName: String { "chat" } 13 | 14 | var sessionId: Int64 = 0 15 | var chatId: String = "" 16 | var content: String = "" 17 | var isChatgpt: Bool = false 18 | var createTime: Date? = nil 19 | 20 | enum CodingKeys: String, CodingTableKey { 21 | typealias Root = ChatDbModel 22 | static let objectRelationalMapping = TableBinding(CodingKeys.self) 23 | 24 | case sessionId 25 | case chatId 26 | case content 27 | case isChatgpt 28 | case createTime 29 | } 30 | 31 | init(sessionId: Int64, chatId: String, content: String, isChatgpt: Bool, createTime: Date) { 32 | self.sessionId = sessionId 33 | self.chatId = chatId 34 | self.content = content 35 | self.isChatgpt = isChatgpt 36 | self.createTime = createTime 37 | } 38 | } 39 | 40 | extension ChatDbModel { 41 | static func insert(objects: [ChatDbModel]) { 42 | do { 43 | try db?.insert(objects: objects, intoTable: ChatDbModel.tableName) 44 | } catch let error { 45 | debugPrint("插入chat失败 ->\n\(error.localizedDescription)") 46 | } 47 | } 48 | 49 | static func records(for sessionId: Int64) -> [ChatDbModel]? { 50 | do { 51 | return try db?.getObjects(fromTable: ChatDbModel.tableName, where: ChatDbModel.Properties.sessionId == sessionId, orderBy: [ChatDbModel.Properties.createTime.asOrder(by: .ascending)]) 52 | } catch let error { 53 | debugPrint("获取chat失败, session id -> \(sessionId)\n\(error.localizedDescription)") 54 | return nil 55 | } 56 | } 57 | 58 | static func removeRecords(for sessionId: Int64) { 59 | do { 60 | try db?.delete(fromTable: ChatDbModel.tableName, where: ChatDbModel.Properties.sessionId == sessionId) 61 | } catch let error { 62 | debugPrint("删除chat失败, session id -> \(sessionId)\n\(error.localizedDescription)") 63 | } 64 | } 65 | 66 | static func removeAllRecords() { 67 | do { 68 | try db?.delete(fromTable: ChatDbModel.tableName) 69 | } catch let error { 70 | debugPrint("删除所有chat失败 -> \n\(error.localizedDescription)") 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Chatgpt/Home/Models/Database/SessionDbModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SessionDbModel.swift 3 | // Chatgpt 4 | // 5 | // Created by qinwenzhou on 2023/2/20. 6 | // 7 | 8 | import Foundation 9 | import WCDBSwift 10 | 11 | final class SessionDbModel: TableCodable { 12 | static var tableName: String { "session" } 13 | 14 | var sessionId: Int64 = 0 15 | var title: String? = nil 16 | var createTime: Date? = nil 17 | 18 | enum CodingKeys: String, CodingTableKey { 19 | typealias Root = SessionDbModel 20 | static let objectRelationalMapping = TableBinding(CodingKeys.self) 21 | case sessionId 22 | case title 23 | case createTime 24 | } 25 | 26 | init(sessionId: Int64, title: String? = nil, createTime: Date? = nil) { 27 | self.sessionId = sessionId 28 | self.title = title 29 | self.createTime = createTime 30 | } 31 | } 32 | 33 | extension SessionDbModel { 34 | static func maxSessionId() -> Int64? { 35 | do { 36 | return try db?.getValue(on: SessionDbModel.Properties.sessionId.max(), fromTable: SessionDbModel.tableName).int64Value 37 | } catch let error { 38 | debugPrint("获取最大session id失败 ->\n\(error.localizedDescription)") 39 | return nil 40 | } 41 | } 42 | 43 | static func insert(objects: [SessionDbModel]) { 44 | do { 45 | try db?.insert(objects: objects, intoTable: SessionDbModel.tableName) 46 | } catch let error { 47 | debugPrint("插入session失败 ->\n\(error.localizedDescription)") 48 | } 49 | } 50 | 51 | static func allRecords() -> [SessionDbModel]? { 52 | do { 53 | return try db?.getObjects(fromTable: SessionDbModel.tableName, orderBy: [SessionDbModel.Properties.createTime.asOrder(by: .descending)]) 54 | } catch let error { 55 | debugPrint("获取所有session失败 ->\n\(error.localizedDescription)") 56 | return nil 57 | } 58 | } 59 | 60 | static func removeAllRecords() { 61 | do { 62 | try db?.delete(fromTable: SessionDbModel.tableName) 63 | } catch let error { 64 | debugPrint("删除所有session失败 ->\n\(error.localizedDescription)") 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Chatgpt/Home/Models/SessionManager.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SessionManager.swift 3 | // Chatgpt 4 | // 5 | // Created by qinwenzhou on 2023/2/20. 6 | // 7 | 8 | import SwiftUI 9 | 10 | class SessionManager: ObservableObject { 11 | @Published var sessionId: Int64 = 0 { 12 | willSet { 13 | if sessionId != newValue { 14 | ChatModel.chats(for: newValue) { chats in 15 | self.chats = chats ?? [ChatModel]() 16 | } 17 | } 18 | } 19 | } 20 | @Published var sessions = [SessionModel]() 21 | @Published var chats = [ChatModel]() 22 | 23 | 24 | init() { 25 | sessionId = SessionDbModel.maxSessionId() ?? 0 26 | 27 | SessionModel.allSessions { sessions in 28 | self.sessions = sessions ?? [SessionModel]() 29 | self.createNewSession() 30 | } 31 | } 32 | 33 | func createNewSession() { 34 | if let newSession = sessions.filter({$0.isNewSession}).first { 35 | sessionId = newSession.id 36 | 37 | } else { 38 | sessionId = sessionId + 1 39 | 40 | let sessionModel = SessionModel(id: sessionId, title: "", createTime: Date(), isNewSession: true) 41 | sessions.insert(sessionModel, at: 0) 42 | } 43 | } 44 | 45 | func removeAllSessions() { 46 | chats.removeAll() 47 | ChatModel.removeAllChats() 48 | 49 | sessions.removeAll() 50 | SessionModel.removeAllSessions() 51 | 52 | createNewSession() 53 | } 54 | 55 | func ask(prompt: String, success: @escaping (ChatModel) -> Void, failure: @escaping (Error?) -> Void) { 56 | guard !prompt.isEmpty else { 57 | failure(nil) 58 | return 59 | } 60 | 61 | // 保存新会话 62 | if let session = sessions.filter({$0.id == sessionId}).first, session.isNewSession { 63 | let sessionModel = SessionModel(id: sessionId, title: prompt, createTime: Date()) 64 | var tempSessions = sessions.filter({!$0.isNewSession}) 65 | tempSessions.insert(sessionModel, at: 0) 66 | sessions = tempSessions 67 | SessionModel.insert(sessions: [sessionModel]) 68 | } 69 | 70 | // 在会话中插入聊天项 71 | let askModel = ChatModel.newAskModel(sessionId: sessionId, prompt: prompt) 72 | let thinkingModel = ChatModel.newThinkingModel(sessionId: sessionId) 73 | chats.append(contentsOf: [askModel, thinkingModel]) 74 | ChatModel.insert(chats: [askModel]) 75 | 76 | // 发起Api请求 77 | ChatModel.ask(prompt: prompt, success: { id, text in 78 | let answerModel = ChatModel.newAnswerModel(sessionId: self.sessionId, id: id, text: text) 79 | var tempChats = self.chats.filter({!$0.isThinking}) 80 | tempChats.append(answerModel) 81 | self.chats = tempChats 82 | ChatModel.insert(chats: [answerModel]) 83 | success(answerModel) 84 | }, failure: failure) 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /Chatgpt/Home/Models/SessionModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SessionModel.swift 3 | // Chatgpt 4 | // 5 | // Created by qinwenzhou on 2023/2/19. 6 | // 7 | 8 | import Foundation 9 | import WCDBSwift 10 | 11 | struct SessionModel: Identifiable { 12 | var id: Int64 13 | var title: String 14 | var createTime: Date 15 | var isNewSession = false 16 | } 17 | 18 | // Database 19 | extension SessionModel { 20 | /// 向本地数据库插入会话项 21 | /// - Parameters: 22 | /// - sessions: 会话项 23 | /// - completion: 完成 24 | static func insert(sessions: [SessionModel], completion: (() -> Void)? = nil) { 25 | DispatchQueue.global().async { 26 | let objects = sessions.map { 27 | SessionDbModel(sessionId: $0.id, title: $0.title, createTime: $0.createTime) 28 | } 29 | SessionDbModel.insert(objects: objects) 30 | DispatchQueue.main.async { 31 | completion?() 32 | } 33 | } 34 | } 35 | 36 | /// 从本地数据库载入所有会话项 37 | /// - Parameters: 38 | /// - completion: 完成 39 | static func allSessions(completion: @escaping ([SessionModel]?) -> Void) { 40 | DispatchQueue.global().async { 41 | let records = SessionDbModel.allRecords()?.map { 42 | SessionModel(id: $0.sessionId, title: $0.title ?? "", createTime: $0.createTime ?? Date()) 43 | } 44 | DispatchQueue.main.async { 45 | completion(records) 46 | } 47 | } 48 | } 49 | 50 | /// 删除本地数据库所有会话项 51 | /// - Parameters: 52 | /// - completion: 完成 53 | static func removeAllSessions(completion: (() -> Void)? = nil) { 54 | DispatchQueue.global().async { 55 | SessionDbModel.removeAllRecords() 56 | 57 | DispatchQueue.main.async { 58 | completion?() 59 | } 60 | } 61 | } 62 | } 63 | 64 | 65 | -------------------------------------------------------------------------------- /Chatgpt/Home/Views/Cells/ChatCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatCell.swift 3 | // Chatgpt 4 | // 5 | // Created by qinwenzhou on 2023/2/17. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ChatCell: View { 11 | var model: ChatModel 12 | 13 | var body: some View { 14 | VStack(alignment: .leading) { 15 | HStack(spacing: 4) { 16 | Image(model.avatar) 17 | .padding(.leading, 16) 18 | Text(model.name) 19 | .foregroundColor(Color("NameColor")) 20 | } 21 | Text(model.content) 22 | .textSelection(.enabled) 23 | .font(.title3) 24 | .padding(.leading, 16) 25 | Spacer() 26 | .frame(height: 24) 27 | } 28 | } 29 | } 30 | 31 | struct ChatCell_Previews: PreviewProvider { 32 | static var previews: some View { 33 | let model = ChatModel(id: "0", sessionId: 0, name: "我", avatar: "Avatar", content: "你好,Chatgpt!", isChatgpt: false, createTime: Date()) 34 | return ChatCell(model: model) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Chatgpt/Home/Views/Cells/SessionCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SessionCell.swift 3 | // Chatgpt 4 | // 5 | // Created by qinwenzhou on 2023/2/19. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct SessionCell: View { 11 | var model: SessionModel 12 | 13 | var body: some View { 14 | HStack { 15 | Image("Chat") 16 | .resizable() 17 | .frame(width: 14, height: 14) 18 | 19 | Text(model.title) 20 | .font(.system(size: 14)) 21 | 22 | Spacer() 23 | } 24 | .padding(.vertical, 12) 25 | } 26 | } 27 | 28 | struct SessionCell_Previews: PreviewProvider { 29 | static var previews: some View { 30 | let model = SessionModel(id: 0, title: "你好,ChatGPT!", createTime: Date()) 31 | return SessionCell(model: model) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Chatgpt/Home/Views/ChatView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatView.swift 3 | // Chatgpt 4 | // 5 | // Created by qinwenzhou on 2023/2/17. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ChatView: View { 11 | @ObservedObject var manager: SessionManager 12 | @State private var showAlert = false 13 | 14 | @State private var inputText = "" 15 | @State private var isInputEnable = true 16 | @FocusState private var isInputFocused: Bool 17 | 18 | var body: some View { 19 | // 聊天列表 20 | List(manager.chats) { model in 21 | ChatCell(model: model) 22 | } 23 | .background( 24 | Color("ListColor") 25 | ) 26 | .scrollContentBackground(.hidden) 27 | .safeAreaInset(edge: .bottom) { 28 | // 输入框 29 | InputView( 30 | text: $inputText, 31 | isEnable: $isInputEnable, 32 | isFocused: $isInputFocused) { 33 | manager.ask(prompt: inputText) { _ in 34 | isInputEnable = true 35 | } failure: { _ in 36 | isInputEnable = true 37 | } 38 | inputText = "" 39 | isInputFocused = false 40 | isInputEnable = false 41 | } 42 | } 43 | .toolbar { 44 | Button { 45 | showAlert = true 46 | } label: { 47 | Image("Avatar") 48 | .resizable() 49 | .frame(width: 24, height: 24) 50 | } 51 | .buttonStyle(.plain) 52 | } 53 | .alert("您今天最棒了", isPresented: $showAlert) { 54 | Button("好的", role: .cancel) { 55 | 56 | } 57 | } 58 | } 59 | } 60 | 61 | struct ChatView_Previews: PreviewProvider { 62 | static var previews: some View { 63 | ChatView(manager: SessionManager()) 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Chatgpt/Home/Views/SessionView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SessionView.swift 3 | // Chatgpt 4 | // 5 | // Created by qinwenzhou on 2023/2/19. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct SessionView: View { 11 | @ObservedObject var manager: SessionManager 12 | @State private var showAlert = false 13 | 14 | var body: some View { 15 | VStack { 16 | // 新建聊天 17 | Button { 18 | manager.createNewSession() 19 | } label: { 20 | Image("NewChat") 21 | .resizable() 22 | .frame(width: 12, height: 12) 23 | Spacer() 24 | .frame(width: 8) 25 | Text("新建聊天") 26 | .font(.system(size: 14)) 27 | } 28 | .buttonStyle(.plain) 29 | .frame(height: 24) 30 | .keyboardShortcut("n", modifiers: .command) 31 | 32 | Spacer() 33 | .frame(height: 16) 34 | 35 | // 列表 36 | List(manager.sessions) { model in 37 | SessionCell(model: model) 38 | .contentShape(Rectangle()) 39 | .onTapGesture { 40 | manager.sessionId = model.id 41 | } 42 | .listRowBackground(manager.sessionId == model.id ? Color("ListColor") : Color.clear) 43 | } 44 | .background(.clear) 45 | .scrollContentBackground(.hidden) 46 | 47 | Spacer() 48 | .frame(height: 16) 49 | 50 | // 清除记录 51 | Button { 52 | showAlert = true 53 | } label: { 54 | Image("ClearRecord") 55 | .resizable() 56 | .frame(width: 12, height: 12) 57 | Spacer() 58 | .frame(width: 8) 59 | Text("清除记录") 60 | .font(.system(size: 14)) 61 | } 62 | .frame(maxWidth: .infinity, maxHeight: 56) 63 | .buttonStyle(.plain) 64 | .background(Color("ListColor")) 65 | } 66 | .alert("您确定要清除所有会话记录吗", isPresented: $showAlert) { 67 | Button("清除", role: .destructive) { 68 | manager.removeAllSessions() 69 | } 70 | Button("取消", role: .cancel) { 71 | 72 | } 73 | } 74 | } 75 | } 76 | 77 | struct SessionView_Previews: PreviewProvider { 78 | static var previews: some View { 79 | SessionView(manager: SessionManager()) 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /Chatgpt/Home/Views/Widgets/InputView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InputView.swift 3 | // Chatgpt 4 | // 5 | // Created by qinwenzhou on 2023/2/18. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct InputView: View { 11 | @Binding var text: String 12 | @Binding var isEnable: Bool 13 | var isFocused: FocusState.Binding 14 | var onSubmit: () -> Void 15 | 16 | @State private var height: CGFloat = 64 17 | 18 | private let kFontSize: CGFloat = 16 19 | 20 | var body: some View { 21 | GeometryReader { proxy in 22 | ZStack { 23 | // 换行键 24 | Button("") { 25 | text = text + "\n" 26 | } 27 | .hidden() 28 | .keyboardShortcut(.return) 29 | 30 | Rectangle() 31 | .fill(Color("ListColor")) 32 | 33 | Rectangle() 34 | .fill(fillColor()) 35 | .cornerRadius(24) 36 | .padding(EdgeInsets(top: 12, leading: 16, bottom: 12, trailing: 16)) 37 | .overlay { 38 | TextField("", text: $text, axis: .vertical) 39 | .lineLimit(20) 40 | .font(.system(size: kFontSize)) 41 | .textFieldStyle(.plain) 42 | .disableAutocorrection(true) 43 | .disabled(!isEnable) 44 | .focused(isFocused) 45 | .background(fillColor()) 46 | .padding(.horizontal, 36) 47 | .onChange(of: text, perform: { newValue in 48 | let paddingOffset = CGFloat(36 + 16*2) // TextField is 36, Rectangle is 16*2 (leading & trailing). 49 | let size = CGSize(width: proxy.size.width - paddingOffset, height: .infinity) 50 | let h = sizeToFit(with: text, in: size) 51 | height = max(h + 44, 64) 52 | }) 53 | .onSubmit { 54 | onSubmit() 55 | } 56 | } 57 | } 58 | } 59 | .frame(height: height) 60 | } 61 | 62 | private func fillColor() -> Color { 63 | return isEnable ? Color("EnableInputColor") : Color("DisableInputColor") 64 | } 65 | 66 | private func sizeToFit(with string: String, in limitSize: CGSize) -> CGFloat { 67 | let range = NSMakeRange(0, string.count) 68 | let attributeString = NSMutableAttributedString(string: string) 69 | // 字体 70 | let font = NSFont.systemFont(ofSize: kFontSize) 71 | attributeString.addAttribute(.font, value: font, range: range) 72 | // 行距 73 | // let style = NSMutableParagraphStyle() 74 | // style.lineSpacing = 4 75 | // attributeString.addAttribute(.paragraphStyle, value: style, range: range) 76 | // 字距 77 | // attributeString.addAttribute(.kern, value: 4, range: range) 78 | // 计算高度 79 | return attributeString.boundingRect(with: limitSize, options: [.usesFontLeading, .usesLineFragmentOrigin], context: nil).height 80 | } 81 | } 82 | 83 | struct InputView_Previews: PreviewProvider { 84 | @State static var text = "" 85 | @State static var isEnable = true 86 | @FocusState static var isFocused 87 | 88 | static var previews: some View { 89 | InputView(text: $text, isEnable: $isEnable, isFocused: $isFocused) {} 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /Chatgpt/Mine/MineListView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MineListView.swift 3 | // Chatgpt 4 | // 5 | // Created by qinwenzhou on 2023/2/17. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct MineListView: View { 11 | var body: some View { 12 | Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) 13 | } 14 | } 15 | 16 | struct MineListView_Previews: PreviewProvider { 17 | static var previews: some View { 18 | MineListView() 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Chatgpt/Mine/MineView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MineView.swift 3 | // Chatgpt 4 | // 5 | // Created by qinwenzhou on 2023/2/17. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct MineView: View { 11 | var body: some View { 12 | Text("我的") 13 | .navigationTitle("我的") 14 | } 15 | } 16 | 17 | struct MineView_Previews: PreviewProvider { 18 | static var previews: some View { 19 | MineView() 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Chatgpt/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Chatgpt/Util/QFileManage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // QFileManage.swift 3 | // Chatgpt 4 | // 5 | // Created by qinwenzhou on 2023/2/19. 6 | // 7 | 8 | import Foundation 9 | 10 | struct QFileManage { 11 | /// 创建文件夹 12 | static func createDirectory(at path: String) { 13 | let isExisted = FileManager.default.fileExists(atPath: path) 14 | guard !isExisted else { return } 15 | let url = URL(fileURLWithPath: path) 16 | do { 17 | try FileManager.default.createDirectory(at: url, withIntermediateDirectories: true, attributes: nil) 18 | } catch let error { 19 | debugPrint("创建文件夹失败!Path: \(path), Error: \(error.localizedDescription)") 20 | } 21 | } 22 | } 23 | 24 | extension QFileManage { 25 | /// 库目录 26 | static func libraryDirectory() -> String { 27 | return NSSearchPathForDirectoriesInDomains(.libraryDirectory, .userDomainMask, true).last! 28 | } 29 | 30 | /// 数据库目录 31 | static func databaseDirectory() -> String { 32 | let path = libraryDirectory() + "/database" 33 | createDirectory(at: path) 34 | return path 35 | } 36 | 37 | /// 文档目录 38 | static func documentsDirectory() -> String { 39 | return NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).last! 40 | } 41 | 42 | /// 图片目录 43 | static func imagesDirectory() -> String { 44 | let path = documentsDirectory() + "/images" 45 | createDirectory(at: path) 46 | return path 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /ChatgptTests/ChatgptTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatgptTests.swift 3 | // ChatgptTests 4 | // 5 | // Created by qinwenzhou on 2023/2/17. 6 | // 7 | 8 | import XCTest 9 | @testable import Chatgpt 10 | 11 | final class ChatgptTests: XCTestCase { 12 | 13 | override func setUpWithError() throws { 14 | // Put setup code here. This method is called before the invocation of each test method in the class. 15 | } 16 | 17 | override func tearDownWithError() throws { 18 | // Put teardown code here. This method is called after the invocation of each test method in the class. 19 | } 20 | 21 | func testExample() throws { 22 | // This is an example of a functional test case. 23 | // Use XCTAssert and related functions to verify your tests produce the correct results. 24 | // Any test you write for XCTest can be annotated as throws and async. 25 | // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. 26 | // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. 27 | } 28 | 29 | func testPerformanceExample() throws { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /ChatgptUITests/ChatgptUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatgptUITests.swift 3 | // ChatgptUITests 4 | // 5 | // Created by qinwenzhou on 2023/2/17. 6 | // 7 | 8 | import XCTest 9 | 10 | final class ChatgptUITests: XCTestCase { 11 | 12 | override func setUpWithError() throws { 13 | // Put setup code here. This method is called before the invocation of each test method in the class. 14 | 15 | // In UI tests it is usually best to stop immediately when a failure occurs. 16 | continueAfterFailure = false 17 | 18 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 19 | } 20 | 21 | override func tearDownWithError() throws { 22 | // Put teardown code here. This method is called after the invocation of each test method in the class. 23 | } 24 | 25 | func testExample() throws { 26 | // UI tests must launch the application that they test. 27 | let app = XCUIApplication() 28 | app.launch() 29 | 30 | // Use XCTAssert and related functions to verify your tests produce the correct results. 31 | } 32 | 33 | func testLaunchPerformance() throws { 34 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { 35 | // This measures how long it takes to launch your application. 36 | measure(metrics: [XCTApplicationLaunchMetric()]) { 37 | XCUIApplication().launch() 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /ChatgptUITests/ChatgptUITestsLaunchTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatgptUITestsLaunchTests.swift 3 | // ChatgptUITests 4 | // 5 | // Created by qinwenzhou on 2023/2/17. 6 | // 7 | 8 | import XCTest 9 | 10 | final class ChatgptUITestsLaunchTests: XCTestCase { 11 | 12 | override class var runsForEachTargetApplicationUIConfiguration: Bool { 13 | true 14 | } 15 | 16 | override func setUpWithError() throws { 17 | continueAfterFailure = false 18 | } 19 | 20 | func testLaunch() throws { 21 | let app = XCUIApplication() 22 | app.launch() 23 | 24 | // Insert steps here to perform after app launch but before taking a screenshot, 25 | // such as logging into a test account or navigating somewhere in the app 26 | 27 | let attachment = XCTAttachment(screenshot: app.screenshot()) 28 | attachment.name = "Launch Screen" 29 | attachment.lifetime = .keepAlways 30 | add(attachment) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 oldedcoder 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | platform :osx, '13.0' 3 | inhibit_all_warnings! # 消除第三方库警告 4 | source 'https://github.com/CocoaPods/Specs.git' 5 | 6 | target 'Chatgpt' do 7 | # Comment the next line if you don't want to use dynamic frameworks 8 | use_frameworks! 9 | 10 | # Pods for Chatgpt 11 | pod 'Alamofire' 12 | pod 'SwiftyJSON', '~> 4.0' 13 | pod 'WCDB.swift' 14 | 15 | target 'ChatgptTests' do 16 | inherit! :search_paths 17 | # Pods for testing 18 | end 19 | 20 | target 'ChatgptUITests' do 21 | # Pods for testing 22 | end 23 | 24 | end 25 | 26 | post_install do |installer| 27 | installer.pods_project.targets.each do |target| 28 | target.build_configurations.each do |config| 29 | config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '13.0' 30 | config.build_settings['SWIFT_SUPPRESS_WARNINGS'] = 'YES' # 消除警告 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Alamofire (5.6.2) 3 | - SQLiteRepairKit (1.2.2): 4 | - WCDBOptimizedSQLCipher (~> 1.2.0) 5 | - SwiftyJSON (4.3.0) 6 | - WCDB.swift (1.0.8.2): 7 | - SQLiteRepairKit (~> 1.2.0) 8 | - WCDBOptimizedSQLCipher (~> 1.2.0) 9 | - WCDBOptimizedSQLCipher (1.2.1) 10 | 11 | DEPENDENCIES: 12 | - Alamofire 13 | - SwiftyJSON (~> 4.0) 14 | - WCDB.swift 15 | 16 | SPEC REPOS: 17 | https://github.com/CocoaPods/Specs.git: 18 | - SQLiteRepairKit 19 | - SwiftyJSON 20 | - WCDB.swift 21 | - WCDBOptimizedSQLCipher 22 | trunk: 23 | - Alamofire 24 | 25 | SPEC CHECKSUMS: 26 | Alamofire: d368e1ff8a298e6dde360e35a3e68e6c610e7204 27 | SQLiteRepairKit: 35aaae5a8838adb85f5b1eb4d796055be6060a4b 28 | SwiftyJSON: 6faa0040f8b59dead0ee07436cbf76b73c08fd08 29 | WCDB.swift: 05d509d7a0e60fb6e11c34eb7e4027c0fab5849f 30 | WCDBOptimizedSQLCipher: baf44493b0c7a3d49e97bc5b64a3856f6428ddd1 31 | 32 | PODFILE CHECKSUM: e41a75e6a2aca05c99e678c387252d26dce6c2d6 33 | 34 | COCOAPODS: 1.11.3 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SwiftChatGPT 2 | A macOS client for ChatGPT writed by SwiftUI 4.0. 3 | 4 | 5 | ![image](https://github.com/oldedcoder/SwiftChatGPT/blob/main/demo.gif) 6 | 7 |
8 | 欢迎关注我的微信公众号:老了的程序员 9 | 10 | ![image](https://github.com/oldedcoder/SwiftChatGPT/blob/main/%E5%BE%AE%E4%BF%A1%E5%85%AC%E4%BC%97%E5%8F%B7.jpg) 11 | -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/demo.gif -------------------------------------------------------------------------------- /微信公众号.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldedcoder/SwiftChatGPT/77630a62b4fa34018f3470c9ba2fa59ecc77dd51/微信公众号.jpg --------------------------------------------------------------------------------