├── .github └── workflows │ └── swift.yml ├── HeavenGPT.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── swiftpm │ │ │ └── Package.resolved │ └── xcuserdata │ │ └── haseeb-mir.xcuserdatad │ │ └── Bookmarks │ │ └── bookmarks.plist └── xcuserdata │ └── haseeb-mir.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ └── xcschememanagement.plist ├── HeavenGPT ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ └── logo 1.png │ ├── Contents.json │ └── Logo.imageset │ │ ├── Contents.json │ │ └── logo.png ├── ContentView.swift ├── HeavenGPT.entitlements ├── HeavenGPTApp.swift ├── Logger.swift ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json ├── README.md └── logo.png ├── LICENSE ├── README.md └── resources ├── heavenGPT-save.png └── heavenGPT.png /.github/workflows/swift.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a Swift project 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift 3 | 4 | name: Swift 5 | 6 | on: 7 | push: 8 | branches: [ "main" ] 9 | pull_request: 10 | branches: [ "main" ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: macos-latest 16 | 17 | steps: 18 | - uses: actions/checkout@v3 19 | - name: Build 20 | run: swift build -v 21 | - name: Run tests 22 | run: swift test -v 23 | -------------------------------------------------------------------------------- /HeavenGPT.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 825FCFD02B253EB900574E2A /* HeavenGPTApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 825FCFCF2B253EB900574E2A /* HeavenGPTApp.swift */; }; 11 | 825FCFD22B253EB900574E2A /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 825FCFD12B253EB900574E2A /* ContentView.swift */; }; 12 | 825FCFD42B253EBB00574E2A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 825FCFD32B253EBB00574E2A /* Assets.xcassets */; }; 13 | 825FCFD72B253EBB00574E2A /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 825FCFD62B253EBB00574E2A /* Preview Assets.xcassets */; }; 14 | 826B604E2B267526009E2266 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 826B604D2B267526009E2266 /* Logger.swift */; }; 15 | 82E4EE762B258C4600EE5CB6 /* logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 82E4EE752B258C4600EE5CB6 /* logo.png */; }; 16 | 82E4EE792B26174300EE5CB6 /* Highlightr in Frameworks */ = {isa = PBXBuildFile; productRef = 82E4EE782B26174300EE5CB6 /* Highlightr */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | 825FCFCC2B253EB900574E2A /* HeavenGPT.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HeavenGPT.app; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | 825FCFCF2B253EB900574E2A /* HeavenGPTApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeavenGPTApp.swift; sourceTree = ""; }; 22 | 825FCFD12B253EB900574E2A /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 23 | 825FCFD32B253EBB00574E2A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 24 | 825FCFD62B253EBB00574E2A /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 25 | 825FCFD82B253EBB00574E2A /* HeavenGPT.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = HeavenGPT.entitlements; sourceTree = ""; }; 26 | 826B604D2B267526009E2266 /* Logger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = ""; }; 27 | 82E4EE752B258C4600EE5CB6 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = ""; }; 28 | /* End PBXFileReference section */ 29 | 30 | /* Begin PBXFrameworksBuildPhase section */ 31 | 825FCFC92B253EB900574E2A /* Frameworks */ = { 32 | isa = PBXFrameworksBuildPhase; 33 | buildActionMask = 2147483647; 34 | files = ( 35 | 82E4EE792B26174300EE5CB6 /* Highlightr in Frameworks */, 36 | ); 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXFrameworksBuildPhase section */ 40 | 41 | /* Begin PBXGroup section */ 42 | 825FCFC32B253EB900574E2A = { 43 | isa = PBXGroup; 44 | children = ( 45 | 825FCFCE2B253EB900574E2A /* HeavenGPT */, 46 | 825FCFCD2B253EB900574E2A /* Products */, 47 | ); 48 | sourceTree = ""; 49 | }; 50 | 825FCFCD2B253EB900574E2A /* Products */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | 825FCFCC2B253EB900574E2A /* HeavenGPT.app */, 54 | ); 55 | name = Products; 56 | sourceTree = ""; 57 | }; 58 | 825FCFCE2B253EB900574E2A /* HeavenGPT */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 825FCFCF2B253EB900574E2A /* HeavenGPTApp.swift */, 62 | 825FCFD12B253EB900574E2A /* ContentView.swift */, 63 | 826B604D2B267526009E2266 /* Logger.swift */, 64 | 82E4EE752B258C4600EE5CB6 /* logo.png */, 65 | 825FCFD32B253EBB00574E2A /* Assets.xcassets */, 66 | 825FCFD82B253EBB00574E2A /* HeavenGPT.entitlements */, 67 | 825FCFD52B253EBB00574E2A /* Preview Content */, 68 | ); 69 | path = HeavenGPT; 70 | sourceTree = ""; 71 | }; 72 | 825FCFD52B253EBB00574E2A /* Preview Content */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 825FCFD62B253EBB00574E2A /* Preview Assets.xcassets */, 76 | ); 77 | path = "Preview Content"; 78 | sourceTree = ""; 79 | }; 80 | /* End PBXGroup section */ 81 | 82 | /* Begin PBXNativeTarget section */ 83 | 825FCFCB2B253EB900574E2A /* HeavenGPT */ = { 84 | isa = PBXNativeTarget; 85 | buildConfigurationList = 825FCFDB2B253EBB00574E2A /* Build configuration list for PBXNativeTarget "HeavenGPT" */; 86 | buildPhases = ( 87 | 825FCFC82B253EB900574E2A /* Sources */, 88 | 825FCFC92B253EB900574E2A /* Frameworks */, 89 | 825FCFCA2B253EB900574E2A /* Resources */, 90 | ); 91 | buildRules = ( 92 | ); 93 | dependencies = ( 94 | ); 95 | name = HeavenGPT; 96 | packageProductDependencies = ( 97 | 82E4EE782B26174300EE5CB6 /* Highlightr */, 98 | ); 99 | productName = HeavenGPT; 100 | productReference = 825FCFCC2B253EB900574E2A /* HeavenGPT.app */; 101 | productType = "com.apple.product-type.application"; 102 | }; 103 | /* End PBXNativeTarget section */ 104 | 105 | /* Begin PBXProject section */ 106 | 825FCFC42B253EB900574E2A /* Project object */ = { 107 | isa = PBXProject; 108 | attributes = { 109 | BuildIndependentTargetsInParallel = 1; 110 | LastSwiftUpdateCheck = 1500; 111 | LastUpgradeCheck = 1500; 112 | TargetAttributes = { 113 | 825FCFCB2B253EB900574E2A = { 114 | CreatedOnToolsVersion = 15.0.1; 115 | }; 116 | }; 117 | }; 118 | buildConfigurationList = 825FCFC72B253EB900574E2A /* Build configuration list for PBXProject "HeavenGPT" */; 119 | compatibilityVersion = "Xcode 14.0"; 120 | developmentRegion = en; 121 | hasScannedForEncodings = 0; 122 | knownRegions = ( 123 | en, 124 | Base, 125 | ); 126 | mainGroup = 825FCFC32B253EB900574E2A; 127 | packageReferences = ( 128 | 825FCFDE2B253FB100574E2A /* XCRemoteSwiftPackageReference "OpenAISwift" */, 129 | 82E4EE772B26174200EE5CB6 /* XCRemoteSwiftPackageReference "Highlightr" */, 130 | ); 131 | productRefGroup = 825FCFCD2B253EB900574E2A /* Products */; 132 | projectDirPath = ""; 133 | projectRoot = ""; 134 | targets = ( 135 | 825FCFCB2B253EB900574E2A /* HeavenGPT */, 136 | ); 137 | }; 138 | /* End PBXProject section */ 139 | 140 | /* Begin PBXResourcesBuildPhase section */ 141 | 825FCFCA2B253EB900574E2A /* Resources */ = { 142 | isa = PBXResourcesBuildPhase; 143 | buildActionMask = 2147483647; 144 | files = ( 145 | 82E4EE762B258C4600EE5CB6 /* logo.png in Resources */, 146 | 825FCFD72B253EBB00574E2A /* Preview Assets.xcassets in Resources */, 147 | 825FCFD42B253EBB00574E2A /* Assets.xcassets in Resources */, 148 | ); 149 | runOnlyForDeploymentPostprocessing = 0; 150 | }; 151 | /* End PBXResourcesBuildPhase section */ 152 | 153 | /* Begin PBXSourcesBuildPhase section */ 154 | 825FCFC82B253EB900574E2A /* Sources */ = { 155 | isa = PBXSourcesBuildPhase; 156 | buildActionMask = 2147483647; 157 | files = ( 158 | 825FCFD22B253EB900574E2A /* ContentView.swift in Sources */, 159 | 826B604E2B267526009E2266 /* Logger.swift in Sources */, 160 | 825FCFD02B253EB900574E2A /* HeavenGPTApp.swift in Sources */, 161 | ); 162 | runOnlyForDeploymentPostprocessing = 0; 163 | }; 164 | /* End PBXSourcesBuildPhase section */ 165 | 166 | /* Begin XCBuildConfiguration section */ 167 | 825FCFD92B253EBB00574E2A /* Debug */ = { 168 | isa = XCBuildConfiguration; 169 | buildSettings = { 170 | ALWAYS_SEARCH_USER_PATHS = NO; 171 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 172 | CLANG_ANALYZER_NONNULL = YES; 173 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 174 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 175 | CLANG_ENABLE_MODULES = YES; 176 | CLANG_ENABLE_OBJC_ARC = YES; 177 | CLANG_ENABLE_OBJC_WEAK = YES; 178 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 179 | CLANG_WARN_BOOL_CONVERSION = YES; 180 | CLANG_WARN_COMMA = YES; 181 | CLANG_WARN_CONSTANT_CONVERSION = YES; 182 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 183 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 184 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 185 | CLANG_WARN_EMPTY_BODY = YES; 186 | CLANG_WARN_ENUM_CONVERSION = YES; 187 | CLANG_WARN_INFINITE_RECURSION = YES; 188 | CLANG_WARN_INT_CONVERSION = YES; 189 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 190 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 191 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 192 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 193 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 194 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 195 | CLANG_WARN_STRICT_PROTOTYPES = YES; 196 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 197 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 198 | CLANG_WARN_UNREACHABLE_CODE = YES; 199 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 200 | COPY_PHASE_STRIP = NO; 201 | DEBUG_INFORMATION_FORMAT = dwarf; 202 | ENABLE_STRICT_OBJC_MSGSEND = YES; 203 | ENABLE_TESTABILITY = YES; 204 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 205 | GCC_C_LANGUAGE_STANDARD = gnu17; 206 | GCC_DYNAMIC_NO_PIC = NO; 207 | GCC_NO_COMMON_BLOCKS = YES; 208 | GCC_OPTIMIZATION_LEVEL = 0; 209 | GCC_PREPROCESSOR_DEFINITIONS = ( 210 | "DEBUG=1", 211 | "$(inherited)", 212 | ); 213 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 214 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 215 | GCC_WARN_UNDECLARED_SELECTOR = YES; 216 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 217 | GCC_WARN_UNUSED_FUNCTION = YES; 218 | GCC_WARN_UNUSED_VARIABLE = YES; 219 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 220 | MACOSX_DEPLOYMENT_TARGET = 14.0; 221 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 222 | MTL_FAST_MATH = YES; 223 | ONLY_ACTIVE_ARCH = YES; 224 | SDKROOT = macosx; 225 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; 226 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 227 | }; 228 | name = Debug; 229 | }; 230 | 825FCFDA2B253EBB00574E2A /* Release */ = { 231 | isa = XCBuildConfiguration; 232 | buildSettings = { 233 | ALWAYS_SEARCH_USER_PATHS = NO; 234 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 235 | CLANG_ANALYZER_NONNULL = YES; 236 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 237 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 238 | CLANG_ENABLE_MODULES = YES; 239 | CLANG_ENABLE_OBJC_ARC = YES; 240 | CLANG_ENABLE_OBJC_WEAK = YES; 241 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 242 | CLANG_WARN_BOOL_CONVERSION = YES; 243 | CLANG_WARN_COMMA = YES; 244 | CLANG_WARN_CONSTANT_CONVERSION = YES; 245 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 246 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 247 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 248 | CLANG_WARN_EMPTY_BODY = YES; 249 | CLANG_WARN_ENUM_CONVERSION = YES; 250 | CLANG_WARN_INFINITE_RECURSION = YES; 251 | CLANG_WARN_INT_CONVERSION = YES; 252 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 253 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 254 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 255 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 256 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 258 | CLANG_WARN_STRICT_PROTOTYPES = YES; 259 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 260 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 261 | CLANG_WARN_UNREACHABLE_CODE = YES; 262 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 268 | GCC_C_LANGUAGE_STANDARD = gnu17; 269 | GCC_NO_COMMON_BLOCKS = YES; 270 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 271 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 272 | GCC_WARN_UNDECLARED_SELECTOR = YES; 273 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 274 | GCC_WARN_UNUSED_FUNCTION = YES; 275 | GCC_WARN_UNUSED_VARIABLE = YES; 276 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 277 | MACOSX_DEPLOYMENT_TARGET = 14.0; 278 | MTL_ENABLE_DEBUG_INFO = NO; 279 | MTL_FAST_MATH = YES; 280 | SDKROOT = macosx; 281 | SWIFT_COMPILATION_MODE = wholemodule; 282 | }; 283 | name = Release; 284 | }; 285 | 825FCFDC2B253EBB00574E2A /* Debug */ = { 286 | isa = XCBuildConfiguration; 287 | buildSettings = { 288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 289 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 290 | CODE_SIGN_ENTITLEMENTS = HeavenGPT/HeavenGPT.entitlements; 291 | CODE_SIGN_STYLE = Automatic; 292 | COMBINE_HIDPI_IMAGES = YES; 293 | CURRENT_PROJECT_VERSION = 1; 294 | DEVELOPMENT_ASSET_PATHS = "\"HeavenGPT/Preview Content\""; 295 | ENABLE_PREVIEWS = YES; 296 | GENERATE_INFOPLIST_FILE = YES; 297 | INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools"; 298 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 299 | LD_RUNPATH_SEARCH_PATHS = ( 300 | "$(inherited)", 301 | "@executable_path/../Frameworks", 302 | ); 303 | MARKETING_VERSION = 1.0; 304 | PRODUCT_BUNDLE_IDENTIFIER = com.hm.swiftuidemo.HeavenGPT; 305 | PRODUCT_NAME = "$(TARGET_NAME)"; 306 | SWIFT_EMIT_LOC_STRINGS = YES; 307 | SWIFT_VERSION = 5.0; 308 | }; 309 | name = Debug; 310 | }; 311 | 825FCFDD2B253EBB00574E2A /* Release */ = { 312 | isa = XCBuildConfiguration; 313 | buildSettings = { 314 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 315 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 316 | CODE_SIGN_ENTITLEMENTS = HeavenGPT/HeavenGPT.entitlements; 317 | CODE_SIGN_STYLE = Automatic; 318 | COMBINE_HIDPI_IMAGES = YES; 319 | CURRENT_PROJECT_VERSION = 1; 320 | DEVELOPMENT_ASSET_PATHS = "\"HeavenGPT/Preview Content\""; 321 | ENABLE_PREVIEWS = YES; 322 | GENERATE_INFOPLIST_FILE = YES; 323 | INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools"; 324 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 325 | LD_RUNPATH_SEARCH_PATHS = ( 326 | "$(inherited)", 327 | "@executable_path/../Frameworks", 328 | ); 329 | MARKETING_VERSION = 1.0; 330 | PRODUCT_BUNDLE_IDENTIFIER = com.hm.swiftuidemo.HeavenGPT; 331 | PRODUCT_NAME = "$(TARGET_NAME)"; 332 | SWIFT_EMIT_LOC_STRINGS = YES; 333 | SWIFT_VERSION = 5.0; 334 | }; 335 | name = Release; 336 | }; 337 | /* End XCBuildConfiguration section */ 338 | 339 | /* Begin XCConfigurationList section */ 340 | 825FCFC72B253EB900574E2A /* Build configuration list for PBXProject "HeavenGPT" */ = { 341 | isa = XCConfigurationList; 342 | buildConfigurations = ( 343 | 825FCFD92B253EBB00574E2A /* Debug */, 344 | 825FCFDA2B253EBB00574E2A /* Release */, 345 | ); 346 | defaultConfigurationIsVisible = 0; 347 | defaultConfigurationName = Release; 348 | }; 349 | 825FCFDB2B253EBB00574E2A /* Build configuration list for PBXNativeTarget "HeavenGPT" */ = { 350 | isa = XCConfigurationList; 351 | buildConfigurations = ( 352 | 825FCFDC2B253EBB00574E2A /* Debug */, 353 | 825FCFDD2B253EBB00574E2A /* Release */, 354 | ); 355 | defaultConfigurationIsVisible = 0; 356 | defaultConfigurationName = Release; 357 | }; 358 | /* End XCConfigurationList section */ 359 | 360 | /* Begin XCRemoteSwiftPackageReference section */ 361 | 825FCFDE2B253FB100574E2A /* XCRemoteSwiftPackageReference "OpenAISwift" */ = { 362 | isa = XCRemoteSwiftPackageReference; 363 | repositoryURL = "https://github.com/Swift-Almanac/OpenAISwift"; 364 | requirement = { 365 | kind = upToNextMajorVersion; 366 | minimumVersion = 1.4.1; 367 | }; 368 | }; 369 | 82E4EE772B26174200EE5CB6 /* XCRemoteSwiftPackageReference "Highlightr" */ = { 370 | isa = XCRemoteSwiftPackageReference; 371 | repositoryURL = "https://github.com/raspu/Highlightr.git"; 372 | requirement = { 373 | kind = upToNextMajorVersion; 374 | minimumVersion = 2.1.2; 375 | }; 376 | }; 377 | /* End XCRemoteSwiftPackageReference section */ 378 | 379 | /* Begin XCSwiftPackageProductDependency section */ 380 | 82E4EE782B26174300EE5CB6 /* Highlightr */ = { 381 | isa = XCSwiftPackageProductDependency; 382 | package = 82E4EE772B26174200EE5CB6 /* XCRemoteSwiftPackageReference "Highlightr" */; 383 | productName = Highlightr; 384 | }; 385 | /* End XCSwiftPackageProductDependency section */ 386 | }; 387 | rootObject = 825FCFC42B253EB900574E2A /* Project object */; 388 | } 389 | -------------------------------------------------------------------------------- /HeavenGPT.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HeavenGPT.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /HeavenGPT.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "pins" : [ 3 | { 4 | "identity" : "highlightr", 5 | "kind" : "remoteSourceControl", 6 | "location" : "https://github.com/raspu/Highlightr.git", 7 | "state" : { 8 | "revision" : "93199b9e434f04bda956a613af8f571933f9f037", 9 | "version" : "2.1.2" 10 | } 11 | }, 12 | { 13 | "identity" : "openaiswift", 14 | "kind" : "remoteSourceControl", 15 | "location" : "https://github.com/Swift-Almanac/OpenAISwift", 16 | "state" : { 17 | "revision" : "65371e08c871a3f3d0b78e8e02a3da5ce29a6708", 18 | "version" : "1.4.3" 19 | } 20 | } 21 | ], 22 | "version" : 2 23 | } 24 | -------------------------------------------------------------------------------- /HeavenGPT.xcodeproj/project.xcworkspace/xcuserdata/haseeb-mir.xcuserdatad/Bookmarks/bookmarks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | top-level-items 6 | 7 | 8 | query-specification 9 | 10 | query 11 | text 12 | term 13 | 14 | text 15 | Assets.xcassets 16 | 17 | 18 | type 19 | batch-find-query 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /HeavenGPT.xcodeproj/xcuserdata/haseeb-mir.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /HeavenGPT.xcodeproj/xcuserdata/haseeb-mir.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | HeavenGPT.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /HeavenGPT/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 | -------------------------------------------------------------------------------- /HeavenGPT/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "scale" : "1x", 6 | "size" : "16x16" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "scale" : "2x", 11 | "size" : "16x16" 12 | }, 13 | { 14 | "filename" : "logo 1.png", 15 | "idiom" : "mac", 16 | "scale" : "1x", 17 | "size" : "32x32" 18 | }, 19 | { 20 | "idiom" : "mac", 21 | "scale" : "2x", 22 | "size" : "32x32" 23 | }, 24 | { 25 | "idiom" : "mac", 26 | "scale" : "1x", 27 | "size" : "128x128" 28 | }, 29 | { 30 | "idiom" : "mac", 31 | "scale" : "2x", 32 | "size" : "128x128" 33 | }, 34 | { 35 | "idiom" : "mac", 36 | "scale" : "1x", 37 | "size" : "256x256" 38 | }, 39 | { 40 | "idiom" : "mac", 41 | "scale" : "2x", 42 | "size" : "256x256" 43 | }, 44 | { 45 | "idiom" : "mac", 46 | "scale" : "1x", 47 | "size" : "512x512" 48 | }, 49 | { 50 | "idiom" : "mac", 51 | "scale" : "2x", 52 | "size" : "512x512" 53 | } 54 | ], 55 | "info" : { 56 | "author" : "xcode", 57 | "version" : 1 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /HeavenGPT/Assets.xcassets/AppIcon.appiconset/logo 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haseeb-heaven/heavens-gpt/d5a67dd3fb96e540a9d759188489f007b2f239d5/HeavenGPT/Assets.xcassets/AppIcon.appiconset/logo 1.png -------------------------------------------------------------------------------- /HeavenGPT/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /HeavenGPT/Assets.xcassets/Logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "logo.png", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /HeavenGPT/Assets.xcassets/Logo.imageset/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haseeb-heaven/heavens-gpt/d5a67dd3fb96e540a9d759188489f007b2f239d5/HeavenGPT/Assets.xcassets/Logo.imageset/logo.png -------------------------------------------------------------------------------- /HeavenGPT/ContentView.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | import Combine 3 | import AppKit 4 | import Highlightr 5 | 6 | // MARK: - ServerResponse, Choice, Content, ChatRequest, Message 7 | 8 | struct ServerResponse: Codable { 9 | var choices: [Choice] 10 | } 11 | 12 | struct Choice: Codable { 13 | var message: Content 14 | } 15 | 16 | struct Content: Codable { 17 | var role: String 18 | var content: String 19 | } 20 | 21 | struct ChatRequest: Codable { 22 | var messages: [Message] 23 | var model: String 24 | var temperature: Double 25 | var maxTokens: Int 26 | var stream: Bool 27 | 28 | enum CodingKeys: String, CodingKey { 29 | case messages, model, temperature 30 | case maxTokens = "max_tokens" 31 | case stream 32 | } 33 | } 34 | 35 | struct Message: Codable { 36 | var role: String 37 | var content: String 38 | } 39 | 40 | struct MessageSegment: Hashable { 41 | let id = UUID() 42 | let text: String 43 | let isCode: Bool 44 | } 45 | 46 | 47 | // MARK: - ChatViewModel 48 | class ChatViewModel: ObservableObject { 49 | @Published var prompt: String = "" 50 | @Published var messages: [ChatMessage] = [] 51 | @Published var errorMessage: String? = nil 52 | @Published var isLoading: Bool = false 53 | 54 | private var logger: Logger? 55 | 56 | init() { 57 | setupLogger() 58 | } 59 | 60 | private func setupLogger() { 61 | let fileURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0].appendingPathComponent("heaven-gpt-logs.txt") 62 | logger = Logger(fileURL: fileURL) 63 | } 64 | 65 | func log(_ message: String) { 66 | logger?.log(message) 67 | } 68 | 69 | func getChatCompletion(textInput: String) { 70 | 71 | // Adding guard statements to check for empty input 72 | guard !textInput.isEmpty else { 73 | errorMessage = "Message is empty" 74 | log("Message is empty") 75 | return 76 | } 77 | 78 | log("Getting chat completion for message: \(textInput)") 79 | 80 | self.isLoading = true 81 | let messages: [Message] = [ 82 | Message(role: "system", content: "You are a senior software developer called HeavenHM, experienced in multiple programming languages and software architectures. You provide detailed, clear, and efficient solutions."), 83 | Message(role: "user", content: textInput) 84 | ] 85 | 86 | let chatRequest = ChatRequest( 87 | messages: messages, 88 | model: "gpt-3.5-turbo", 89 | temperature: 0.1, 90 | maxTokens: 2048, 91 | stream: false 92 | ) 93 | log("Chat request: \(chatRequest)") 94 | 95 | let baseUrl = "https://heaven-gpt.haseebmir.repl.co" // The Heaven-GPT API is hosted on Repl.it 96 | guard let url = URL(string: baseUrl.appending("/chat/completions")) else { 97 | errorMessage = "Invalid URL" 98 | log("Invalid URL") 99 | return 100 | } 101 | 102 | var request = URLRequest(url: url) 103 | request.httpMethod = "POST" 104 | request.addValue("application/json", forHTTPHeaderField: "Content-Type") 105 | log("Request headers: \(request.allHTTPHeaderFields ?? [:])") 106 | 107 | do { 108 | request.httpBody = try JSONEncoder().encode(chatRequest) 109 | log("Request body: \(String(data: request.httpBody!, encoding: .utf8) ?? "")") 110 | } catch { 111 | errorMessage = "Error encoding JSON: \(error.localizedDescription)" 112 | log("Error encoding JSON: \(error.localizedDescription)") 113 | return 114 | } 115 | 116 | URLSession.shared.dataTask(with: request) { [weak self] data, response, error in 117 | DispatchQueue.main.async { 118 | self?.isLoading = false 119 | if let error = error { 120 | self?.errorMessage = "Error making request: \(error.localizedDescription)" 121 | self?.log("Error making request: \(error.localizedDescription)") 122 | return 123 | } 124 | 125 | guard let data = data else { 126 | self?.errorMessage = "No data received" 127 | self?.log("No data received") 128 | return 129 | } 130 | 131 | do { 132 | guard let response = response as? HTTPURLResponse else { 133 | self?.errorMessage = "Invalid response" 134 | self?.log("Invalid response") 135 | return 136 | } 137 | 138 | guard response.statusCode == 200 else { 139 | self?.errorMessage = "Invalid response code: \(response.statusCode)" 140 | self?.log("Invalid response code: \(response.statusCode)") 141 | return 142 | } 143 | 144 | let serverResponse = try JSONDecoder().decode(ServerResponse.self, from: data) 145 | let newMessages = serverResponse.choices.map { ChatMessage(role: $0.message.role, content: $0.message.content) } 146 | self?.messages.append(contentsOf: newMessages) 147 | } catch { 148 | self?.errorMessage = "Error decoding JSON: \(error.localizedDescription)" 149 | self?.log("Error decoding JSON: \(error.localizedDescription)") 150 | } 151 | } 152 | }.resume() 153 | } 154 | 155 | func sendMessage() { 156 | 157 | // Adding guard statements to check for empty input 158 | guard !prompt.isEmpty else { 159 | errorMessage = "Message is empty" 160 | log("Message is empty") 161 | return 162 | } 163 | log("Sending message: \(prompt)") 164 | 165 | let newMessage = ChatMessage(role: "User", content: prompt) 166 | messages.append(newMessage) 167 | log("Message added: \(newMessage.content)") 168 | getChatCompletion(textInput: prompt) 169 | prompt = "" 170 | } 171 | 172 | func saveMessageToFile(_ message: ChatMessage, filename: String = "data.txt") { 173 | log("Saving message to file: \(message.content)") 174 | let fileURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0].appendingPathComponent(filename) 175 | log("File URL: \(fileURL)") 176 | do { 177 | try message.content.write(to: fileURL, atomically: true, encoding: .utf8) 178 | log("Saved to file: \(fileURL)") 179 | // open file in text editor. 180 | NSWorkspace.shared.open(fileURL) 181 | 182 | } catch { 183 | showAlertMessage(message: "Error saving to file: \(error.localizedDescription)", title: "Error") 184 | log("Error saving to file: \(error.localizedDescription)") 185 | } 186 | } 187 | 188 | func deleteMessage(_ message: ChatMessage) { 189 | log("Deleting message: \(message.content)") 190 | if let index = messages.firstIndex(where: { $0.id == message.id }) { 191 | messages.remove(at: index) 192 | log("Message deleted: \(message.content)") 193 | } 194 | } 195 | 196 | func showAlertMessage(message: String,title: String = "OK"){ 197 | let alert = NSAlert() 198 | alert.messageText = message 199 | alert.alertStyle = .informational 200 | alert.addButton(withTitle: title) 201 | alert.accessoryView = NSHostingView(rootView: ErrorView(errorMessage: errorMessage)) 202 | alert.runModal() 203 | } 204 | 205 | } 206 | 207 | // MARK: - ChatMessage Model 208 | 209 | struct ChatMessage: Identifiable { 210 | let id = UUID() 211 | var role: String 212 | var content: String 213 | } 214 | 215 | // MARK: - ErrorView 216 | 217 | struct ErrorView: View { 218 | var errorMessage: String? 219 | 220 | var body: some View { 221 | if let errorMessage = errorMessage { 222 | Text("Error: \(errorMessage)") 223 | .foregroundColor(.red) 224 | } 225 | } 226 | } 227 | 228 | // MARK: - ChatScrollView 229 | 230 | struct ChatScrollView: View { 231 | @Binding var messages: [ChatMessage] 232 | @ObservedObject var viewModel: ChatViewModel 233 | var deleteMessage: (ChatMessage) -> Void 234 | 235 | var body: some View { 236 | ScrollView { 237 | VStack(alignment: .leading, spacing: 10) { 238 | ForEach(messages) { message in 239 | ChatMessageView(message: message, 240 | deleteAction: { 241 | deleteMessage(message) 242 | }, 243 | copyAction: { 244 | let pasteboard = NSPasteboard.general 245 | pasteboard.clearContents() 246 | pasteboard.setString(message.content, forType: .string) 247 | viewModel.log("Message copied: \(message.content)") 248 | }, 249 | saveAction: { 250 | viewModel.saveMessageToFile(message) 251 | viewModel.log("Message saved to file: \(message.content)") 252 | }) 253 | } 254 | } 255 | } 256 | } 257 | } 258 | 259 | 260 | struct SyntaxHighlightingView: NSViewRepresentable { 261 | var code: String 262 | var language: String 263 | 264 | func makeNSView(context: Context) -> NSView { 265 | let highlightr = Highlightr()! 266 | highlightr.setTheme(to: "paraiso-dark") 267 | 268 | // Use Highlightr to highlight the code 269 | let highlightedAttributedString = highlightr.highlight(code, as: language) ?? NSAttributedString(string: code) 270 | 271 | let textView = NSTextView(frame: .zero, textContainer: NSTextContainer(size: CGSize(width: 500, height: 250))) 272 | textView.isEditable = false 273 | textView.backgroundColor = NSColor.clear 274 | 275 | // Set the highlighted code to the NSTextView 276 | textView.textStorage?.setAttributedString(highlightedAttributedString) 277 | 278 | return textView 279 | } 280 | 281 | func updateNSView(_ nsView: NSView, context: Context) { 282 | if let textView = nsView as? NSTextView { 283 | // Update the NSTextView with highlighted text if needed 284 | let highlightedAttributedString = Highlightr()!.highlight(code, as: language) ?? NSAttributedString(string: code) 285 | textView.textStorage?.setAttributedString(highlightedAttributedString) 286 | } 287 | } 288 | } 289 | 290 | 291 | struct ChatMessageView: View { 292 | var message: ChatMessage 293 | var deleteAction: () -> Void 294 | var copyAction: () -> Void 295 | var saveAction: () -> Void 296 | var viewModel = ChatViewModel() 297 | var parsedMessage: [MessageSegment] = [] 298 | 299 | init(message: ChatMessage, deleteAction: @escaping () -> Void, copyAction: @escaping () -> Void, saveAction: @escaping () -> Void) { 300 | self.message = message 301 | self.deleteAction = deleteAction 302 | self.copyAction = copyAction 303 | self.saveAction = saveAction 304 | self.parsedMessage = self.parseMessage(message.content) 305 | } 306 | 307 | var body: some View { 308 | VStack(alignment: .leading) { 309 | ForEach(parsedMessage, id: \.id) { segment in 310 | if segment.isCode { 311 | SyntaxHighlightingView(code: segment.text, language: "swift").frame(maxWidth: .infinity, alignment: .leading) 312 | } else { 313 | if segment.text.contains("```"){ 314 | SyntaxHighlightingView(code: segment.text, language: "swift").frame(maxWidth: .infinity, alignment: .leading) 315 | } 316 | else{ 317 | Text(segment.text) 318 | .foregroundColor(message.role == "User" ? .blue : .green) 319 | .frame(maxWidth: .infinity, alignment: .leading) 320 | } 321 | } 322 | } 323 | } 324 | HStack { 325 | Spacer() 326 | Button(action: copyAction) { 327 | Image(systemName: "doc.on.doc") 328 | } 329 | Button(action: saveAction) { 330 | Image(systemName: "square.and.arrow.down") 331 | } 332 | Button(action: deleteAction) { 333 | Image(systemName: "trash") 334 | .foregroundColor(.red) 335 | } 336 | } 337 | } 338 | 339 | func parseMessage(_ message: String) -> [MessageSegment] { 340 | var segments: [MessageSegment] = [] 341 | let components = message.components(separatedBy: "```") 342 | viewModel.log("Message components: \(components)") 343 | 344 | var isCode = false 345 | for component in components { 346 | if !component.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty { 347 | if isCode { 348 | // Split by new lines and ignore the first line if it's a language specifier. 349 | let lines = component.split(separator: "\n", omittingEmptySubsequences: false) 350 | let codeWithoutLanguage = lines.dropFirst().joined(separator: "\n") 351 | viewModel.log("Code without language: \(codeWithoutLanguage)") 352 | segments.append(MessageSegment(text: codeWithoutLanguage, isCode: true)) 353 | } else { 354 | segments.append(MessageSegment(text: component, isCode: false)) 355 | } 356 | } 357 | isCode.toggle() 358 | } 359 | viewModel.log("Parsed message: \(segments)") 360 | return segments 361 | } 362 | } 363 | 364 | // MARK: - MessageInputView 365 | 366 | struct MessageInputView: View { 367 | @Binding var prompt: String 368 | var sendAction: () -> Void 369 | 370 | var body: some View { 371 | HStack { 372 | TextEditor(text: $prompt) 373 | .textFieldStyle(RoundedBorderTextFieldStyle()) 374 | .frame(minHeight: 100, maxHeight: 100) 375 | .font(.body) 376 | .padding() 377 | 378 | Button("Send", action: { 379 | sendAction() 380 | }) 381 | } 382 | } 383 | } 384 | 385 | struct ContentView: View { 386 | @StateObject private var viewModel = ChatViewModel() 387 | var body: some View { 388 | VStack { 389 | 390 | HStack{ 391 | Image("logo") 392 | .resizable() 393 | .aspectRatio(contentMode: .fit) 394 | .padding() 395 | 396 | Text("Heaven GPT") 397 | .font(.largeTitle) 398 | .padding() 399 | } 400 | 401 | Text("Welcome, how can I help you today?") 402 | .font(.title) 403 | .padding() 404 | 405 | ScrollView { 406 | ForEach(viewModel.messages) { message in 407 | ChatMessageView(message: message, 408 | deleteAction: { 409 | viewModel.deleteMessage(message) 410 | viewModel.log("Message deleted: \(message.content)") 411 | }, 412 | copyAction: { 413 | let pasteboard = NSPasteboard.general 414 | pasteboard.clearContents() 415 | pasteboard.setString(message.content, forType: .string) 416 | viewModel.log("Message copied: \(message.content)") 417 | }, 418 | saveAction: { 419 | viewModel.saveMessageToFile(message) 420 | viewModel.log("Message saved to file: \(message.content)") 421 | }) 422 | } 423 | }.frame(width: 600, height: 300) 424 | .padding() 425 | 426 | MessageInputView(prompt: $viewModel.prompt, sendAction: { 427 | viewModel.sendMessage() 428 | viewModel.log("Message sent: \(viewModel.prompt)") 429 | }) 430 | } 431 | .frame(width: 600, height: 400) 432 | .padding() 433 | } 434 | } 435 | -------------------------------------------------------------------------------- /HeavenGPT/HeavenGPT.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 | -------------------------------------------------------------------------------- /HeavenGPT/HeavenGPTApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HeavenGPTApp.swift 3 | // HeavenGPT 4 | // 5 | // Created by Haseeb Mir on 10/12/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct HeavenGPTApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /HeavenGPT/Logger.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | class Logger { 4 | private let fileURL: URL 5 | 6 | init(fileURL: URL) { 7 | self.fileURL = fileURL 8 | } 9 | 10 | func log(_ message: String) { 11 | let dateFormatter = DateFormatter() 12 | dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss" 13 | let timestamp = dateFormatter.string(from: Date()) 14 | let logMessage = "\(timestamp): \(message)\n" 15 | 16 | do { 17 | if !FileManager.default.fileExists(atPath: fileURL.path) { 18 | try "".write(to: fileURL, atomically: true, encoding: .utf8) 19 | } 20 | 21 | let fileHandle = try FileHandle(forWritingTo: fileURL) 22 | fileHandle.seekToEndOfFile() 23 | fileHandle.write(logMessage.data(using: .utf8)!) 24 | fileHandle.closeFile() 25 | } catch { 26 | print("Error writing to log file: \(error.localizedDescription)") 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /HeavenGPT/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /HeavenGPT/README.md: -------------------------------------------------------------------------------- 1 | # HeavenGPT: ChatGPT for Coders ✨ 2 | 3 | HeavenGPT is **ChatGPT for coders**. It's free, secure, and created by Heaven. This tool is designed to assist developers with various coding tasks, including generating code documentation and more. In addition, it offers all the capabilities of ChatGPT. If you're using MacOS, you'll enjoy features like saving chat history, downloading generated code, and syntax highlighting. 4 | 5 | ![copilot](https://github.com/haseeb-heaven/HeavenGPT/blob/main/resources/main_ui.png?raw=true)
6 | 7 | ## Features 8 | * **Generate code documentation:** Save time and effort by automatically generating comprehensive documentation for your code. 9 | * **Code generation:** Generate code snippets based on your natural language descriptions. 10 | * **Other coding tasks:** Perform a variety of other coding tasks, such as debugging and code refactoring. 11 | * **ChatGPT features:** Enjoy all the popular features of ChatGPT, such as creative writing, translation, and question answering. 12 | 13 | **Available on macOS:** 14 | 15 | * **Native:** HeavenGPT runs natively on macOS, providing a smooth and responsive experience. 16 | * **Universal:** Supports both Intel and Arm-based Macs. 17 | * **Save & Download:** Save chat history and download generated code for future reference. 18 | * **Syntax Highlighting:** View your code with beautiful syntax highlighting for better readability. 19 | 20 | ## 🛠️ **Installation** 21 | 22 | You can install HeavenGPT by cloning the repository from [GitHub](https://github.com/haseeb-heaven/HeavenGPT). Follow these steps: 23 | 24 | 1. Clone the repo: `git clone https://github.com/haseeb-heaven/HeavenGPT` 25 | 2. Open in XCode. 26 | 3. Run the app natively on MacOS. 27 | 4. HeavenGPT supports both Arm and Intel chips. 28 | 29 | ## 🚀 **Usage** 30 | 31 | To use HeavenGPT, simply run the app on your MacOS after installation. Explore its features to generate code documentation, assist with coding tasks, and more. 32 | 33 | ## 🤝 **Contributing** 34 | 35 | We welcome contributions to make HeavenGPT even better! If you'd like to contribute, please follow these guidelines: 36 | 37 | - Fork the repository 38 | - Make your changes 39 | - Create a pull request 40 | 41 | ## 🏷️ **Versioning** 42 | 43 | HeavenGPT uses semantic versioning to keep track of releases. 44 | 45 | ## 📜 **License** 46 | 47 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. 48 | 49 | ## 👨‍💻 **Authors** 50 | 51 | - Heaven (@haseeb-heaven) - Creator of HeavenGPT 52 | 53 | Thank you for using HeavenGPT! We hope it enhances your coding experience. Feel free to reach out if you have any questions or feedback. 54 | -------------------------------------------------------------------------------- /HeavenGPT/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haseeb-heaven/heavens-gpt/d5a67dd3fb96e540a9d759188489f007b2f239d5/HeavenGPT/logo.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 HeavenHM 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HeavenGPT: ChatGPT for Coders ✨ 2 | 3 | HeavenGPT is **ChatGPT for coders**. It's free, secure, and created by Heaven. This tool is designed to assist developers with various coding tasks, including generating code documentation and more. In addition, it offers all the capabilities of ChatGPT. If you're using MacOS, you'll enjoy features like saving chat history, downloading generated code, and syntax highlighting. 4 | 5 | ![heavenGPT](https://i.ibb.co/QF7KzSW/heaven-GPT.png) 6 | 7 | ## Features 8 | * **Generate code documentation:** Save time and effort by automatically generating comprehensive documentation for your code. 9 | * **Code generation:** Generate code snippets based on your natural language descriptions. 10 | * **Other coding tasks:** Perform a variety of other coding tasks, such as debugging and code refactoring. 11 | * **ChatGPT features:** Enjoy all the popular features of ChatGPT, such as creative writing, translation, and question answering. 12 | 13 | **Available on macOS:** 14 | 15 | * **Native:** HeavenGPT runs natively on macOS, providing a smooth and responsive experience. 16 | * **Universal:** Supports both Intel and Arm-based Macs. 17 | * **Save & Download:** Save chat history and download generated code for future reference. 18 | * **Syntax Highlighting:** View your code with beautiful syntax highlighting for better readability. 19 | 20 | ## 🛠️ **Installation** 21 | 22 | You can install HeavenGPT by cloning the repository from [GitHub](https://github.com/haseeb-heaven/HeavenGPT). Follow these steps: 23 | 24 | 1. Clone the repo: `git clone https://github.com/haseeb-heaven/HeavenGPT` 25 | 2. Open in XCode. 26 | 3. Run the app natively on MacOS. 27 | 4. HeavenGPT supports both Arm and Intel chips. 28 | 29 | ## 🚀 **Usage** 30 | 31 | To use HeavenGPT, simply run the app on your MacOS after installation. Explore its features to generate code documentation, assist with coding tasks, and more. 32 | 33 | ## 🤝 **Contributing** 34 | 35 | We welcome contributions to make HeavenGPT even better! If you'd like to contribute, please follow these guidelines: 36 | 37 | - Fork the repository 38 | - Make your changes 39 | - Create a pull request 40 | 41 | ## 🏷️ **Versioning** 42 | 43 | - Version 1.0.0: Initial release 44 | 45 | ## 📜 **License** 46 | 47 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. 48 | 49 | ### GPT **LICENSE** 50 | - This app uses customised version of **ChatGPT** called **HeavenGPT** which has its own license. See [HeavenGPT-Licence](https://heaven-gpt.haseebmir.repl.co/privacy) for details, and make sure to comply with it and read it before using this app. 51 | - This doesn't require any **API_KEY** to work its free and secure version. 52 | 53 | ### GPT **Models Used** 54 | - This uses OpenAI **GPT-3.5 Turbo Model**. See [OpenAI](https://openai.com) for details, and make sure to comply with it and read it before using this app. 55 | 56 | 57 | ## 👨‍💻 **Authors** 58 | 59 | - Heaven (@haseeb-heaven) - Creator of HeavenGPT 60 | -------------------------------------------------------------------------------- /resources/heavenGPT-save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haseeb-heaven/heavens-gpt/d5a67dd3fb96e540a9d759188489f007b2f239d5/resources/heavenGPT-save.png -------------------------------------------------------------------------------- /resources/heavenGPT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haseeb-heaven/heavens-gpt/d5a67dd3fb96e540a9d759188489f007b2f239d5/resources/heavenGPT.png --------------------------------------------------------------------------------