diff --git a/app/ChatMasterMind.xcodeproj/project.pbxproj b/app/ChatMasterMind.xcodeproj/project.pbxproj deleted file mode 100644 index 7d2e974..0000000 --- a/app/ChatMasterMind.xcodeproj/project.pbxproj +++ /dev/null @@ -1,680 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 56; - objects = { - -/* Begin PBXBuildFile section */ - 4F50EF442A49CE31009BD94E /* MarkdownView in Frameworks */ = {isa = PBXBuildFile; productRef = 4F50EF432A49CE31009BD94E /* MarkdownView */; }; - 4F50EF472A49D012009BD94E /* Highlightr in Frameworks */ = {isa = PBXBuildFile; productRef = 4F50EF462A49D012009BD94E /* Highlightr */; }; - 4F772B052A4706F600D3266B /* ChatMasterMindApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F772B042A4706F600D3266B /* ChatMasterMindApp.swift */; }; - 4F772B072A4706F600D3266B /* ChatData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F772B062A4706F600D3266B /* ChatData.swift */; }; - 4F772B092A4706F600D3266B /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F772B082A4706F600D3266B /* ContentView.swift */; }; - 4F772B0B2A4706F800D3266B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4F772B0A2A4706F800D3266B /* Assets.xcassets */; }; - 4F772B0F2A4706F800D3266B /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4F772B0E2A4706F800D3266B /* Preview Assets.xcassets */; }; - 4F772B1A2A4706F900D3266B /* ChatMasterMindTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F772B192A4706F900D3266B /* ChatMasterMindTests.swift */; }; - 4F772B242A4706F900D3266B /* ChatMasterMindUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F772B232A4706F900D3266B /* ChatMasterMindUITests.swift */; }; - 4F772B262A4706F900D3266B /* ChatMasterMindUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F772B252A4706F900D3266B /* ChatMasterMindUITestsLaunchTests.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 4F772B162A4706F900D3266B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 4F772AF92A4706F600D3266B /* Project object */; - proxyType = 1; - remoteGlobalIDString = 4F772B002A4706F600D3266B; - remoteInfo = ChatMasterMind; - }; - 4F772B202A4706F900D3266B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 4F772AF92A4706F600D3266B /* Project object */; - proxyType = 1; - remoteGlobalIDString = 4F772B002A4706F600D3266B; - remoteInfo = ChatMasterMind; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 4F772B012A4706F600D3266B /* ChatMasterMind.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChatMasterMind.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 4F772B042A4706F600D3266B /* ChatMasterMindApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatMasterMindApp.swift; sourceTree = ""; }; - 4F772B062A4706F600D3266B /* ChatData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatData.swift; sourceTree = ""; }; - 4F772B082A4706F600D3266B /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; - 4F772B0A2A4706F800D3266B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 4F772B0C2A4706F800D3266B /* ChatMasterMind.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ChatMasterMind.entitlements; sourceTree = ""; }; - 4F772B0E2A4706F800D3266B /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - 4F772B102A4706F800D3266B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 4F772B152A4706F900D3266B /* ChatMasterMindTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ChatMasterMindTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 4F772B192A4706F900D3266B /* ChatMasterMindTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatMasterMindTests.swift; sourceTree = ""; }; - 4F772B1F2A4706F900D3266B /* ChatMasterMindUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ChatMasterMindUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 4F772B232A4706F900D3266B /* ChatMasterMindUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatMasterMindUITests.swift; sourceTree = ""; }; - 4F772B252A4706F900D3266B /* ChatMasterMindUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatMasterMindUITestsLaunchTests.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 4F772AFE2A4706F600D3266B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 4F50EF442A49CE31009BD94E /* MarkdownView in Frameworks */, - 4F50EF472A49D012009BD94E /* Highlightr in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4F772B122A4706F900D3266B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4F772B1C2A4706F900D3266B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 4F772AF82A4706F600D3266B = { - isa = PBXGroup; - children = ( - 4F772B032A4706F600D3266B /* ChatMasterMind */, - 4F772B182A4706F900D3266B /* ChatMasterMindTests */, - 4F772B222A4706F900D3266B /* ChatMasterMindUITests */, - 4F772B022A4706F600D3266B /* Products */, - ); - sourceTree = ""; - }; - 4F772B022A4706F600D3266B /* Products */ = { - isa = PBXGroup; - children = ( - 4F772B012A4706F600D3266B /* ChatMasterMind.app */, - 4F772B152A4706F900D3266B /* ChatMasterMindTests.xctest */, - 4F772B1F2A4706F900D3266B /* ChatMasterMindUITests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 4F772B032A4706F600D3266B /* ChatMasterMind */ = { - isa = PBXGroup; - children = ( - 4F772B042A4706F600D3266B /* ChatMasterMindApp.swift */, - 4F772B062A4706F600D3266B /* ChatData.swift */, - 4F772B082A4706F600D3266B /* ContentView.swift */, - 4F772B0A2A4706F800D3266B /* Assets.xcassets */, - 4F772B0C2A4706F800D3266B /* ChatMasterMind.entitlements */, - 4F772B102A4706F800D3266B /* Info.plist */, - 4F772B0D2A4706F800D3266B /* Preview Content */, - ); - path = ChatMasterMind; - sourceTree = ""; - }; - 4F772B0D2A4706F800D3266B /* Preview Content */ = { - isa = PBXGroup; - children = ( - 4F772B0E2A4706F800D3266B /* Preview Assets.xcassets */, - ); - path = "Preview Content"; - sourceTree = ""; - }; - 4F772B182A4706F900D3266B /* ChatMasterMindTests */ = { - isa = PBXGroup; - children = ( - 4F772B192A4706F900D3266B /* ChatMasterMindTests.swift */, - ); - path = ChatMasterMindTests; - sourceTree = ""; - }; - 4F772B222A4706F900D3266B /* ChatMasterMindUITests */ = { - isa = PBXGroup; - children = ( - 4F772B232A4706F900D3266B /* ChatMasterMindUITests.swift */, - 4F772B252A4706F900D3266B /* ChatMasterMindUITestsLaunchTests.swift */, - ); - path = ChatMasterMindUITests; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 4F772B002A4706F600D3266B /* ChatMasterMind */ = { - isa = PBXNativeTarget; - buildConfigurationList = 4F772B292A4706F900D3266B /* Build configuration list for PBXNativeTarget "ChatMasterMind" */; - buildPhases = ( - 4F772AFD2A4706F600D3266B /* Sources */, - 4F772AFE2A4706F600D3266B /* Frameworks */, - 4F772AFF2A4706F600D3266B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = ChatMasterMind; - packageProductDependencies = ( - 4F50EF432A49CE31009BD94E /* MarkdownView */, - 4F50EF462A49D012009BD94E /* Highlightr */, - ); - productName = ChatMasterMind; - productReference = 4F772B012A4706F600D3266B /* ChatMasterMind.app */; - productType = "com.apple.product-type.application"; - }; - 4F772B142A4706F900D3266B /* ChatMasterMindTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 4F772B2C2A4706F900D3266B /* Build configuration list for PBXNativeTarget "ChatMasterMindTests" */; - buildPhases = ( - 4F772B112A4706F900D3266B /* Sources */, - 4F772B122A4706F900D3266B /* Frameworks */, - 4F772B132A4706F900D3266B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 4F772B172A4706F900D3266B /* PBXTargetDependency */, - ); - name = ChatMasterMindTests; - productName = ChatMasterMindTests; - productReference = 4F772B152A4706F900D3266B /* ChatMasterMindTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 4F772B1E2A4706F900D3266B /* ChatMasterMindUITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 4F772B2F2A4706F900D3266B /* Build configuration list for PBXNativeTarget "ChatMasterMindUITests" */; - buildPhases = ( - 4F772B1B2A4706F900D3266B /* Sources */, - 4F772B1C2A4706F900D3266B /* Frameworks */, - 4F772B1D2A4706F900D3266B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 4F772B212A4706F900D3266B /* PBXTargetDependency */, - ); - name = ChatMasterMindUITests; - productName = ChatMasterMindUITests; - productReference = 4F772B1F2A4706F900D3266B /* ChatMasterMindUITests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 4F772AF92A4706F600D3266B /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1500; - LastUpgradeCheck = 1500; - TargetAttributes = { - 4F772B002A4706F600D3266B = { - CreatedOnToolsVersion = 15.0; - }; - 4F772B142A4706F900D3266B = { - CreatedOnToolsVersion = 15.0; - TestTargetID = 4F772B002A4706F600D3266B; - }; - 4F772B1E2A4706F900D3266B = { - CreatedOnToolsVersion = 15.0; - TestTargetID = 4F772B002A4706F600D3266B; - }; - }; - }; - buildConfigurationList = 4F772AFC2A4706F600D3266B /* Build configuration list for PBXProject "ChatMasterMind" */; - compatibilityVersion = "Xcode 14.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 4F772AF82A4706F600D3266B; - packageReferences = ( - 4F50EF422A49CE31009BD94E /* XCRemoteSwiftPackageReference "MarkdownView" */, - 4F50EF452A49D012009BD94E /* XCRemoteSwiftPackageReference "Highlightr" */, - ); - productRefGroup = 4F772B022A4706F600D3266B /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 4F772B002A4706F600D3266B /* ChatMasterMind */, - 4F772B142A4706F900D3266B /* ChatMasterMindTests */, - 4F772B1E2A4706F900D3266B /* ChatMasterMindUITests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 4F772AFF2A4706F600D3266B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 4F772B0F2A4706F800D3266B /* Preview Assets.xcassets in Resources */, - 4F772B0B2A4706F800D3266B /* Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4F772B132A4706F900D3266B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4F772B1D2A4706F900D3266B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 4F772AFD2A4706F600D3266B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 4F772B072A4706F600D3266B /* ChatData.swift in Sources */, - 4F772B052A4706F600D3266B /* ChatMasterMindApp.swift in Sources */, - 4F772B092A4706F600D3266B /* ContentView.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4F772B112A4706F900D3266B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 4F772B1A2A4706F900D3266B /* ChatMasterMindTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4F772B1B2A4706F900D3266B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 4F772B262A4706F900D3266B /* ChatMasterMindUITestsLaunchTests.swift in Sources */, - 4F772B242A4706F900D3266B /* ChatMasterMindUITests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 4F772B172A4706F900D3266B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 4F772B002A4706F600D3266B /* ChatMasterMind */; - targetProxy = 4F772B162A4706F900D3266B /* PBXContainerItemProxy */; - }; - 4F772B212A4706F900D3266B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 4F772B002A4706F600D3266B /* ChatMasterMind */; - targetProxy = 4F772B202A4706F900D3266B /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 4F772B272A4706F900D3266B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 4F772B282A4706F900D3266B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SWIFT_COMPILATION_MODE = wholemodule; - }; - name = Release; - }; - 4F772B2A2A4706F900D3266B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_ENTITLEMENTS = ChatMasterMind/ChatMasterMind.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"ChatMasterMind/Preview Content\""; - DEVELOPMENT_TEAM = 8KC3NAN2CJ; - ENABLE_HARDENED_RUNTIME = YES; - ENABLE_PREVIEWS = YES; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = ChatMasterMind/Info.plist; - INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; - "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 14.0; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = no.fjerkroa.ChatMasterMind; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; - SUPPORTS_MACCATALYST = YES; - SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,6"; - }; - name = Debug; - }; - 4F772B2B2A4706F900D3266B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_ENTITLEMENTS = ChatMasterMind/ChatMasterMind.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"ChatMasterMind/Preview Content\""; - DEVELOPMENT_TEAM = 8KC3NAN2CJ; - ENABLE_HARDENED_RUNTIME = YES; - ENABLE_PREVIEWS = YES; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = ChatMasterMind/Info.plist; - INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; - "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 14.0; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = no.fjerkroa.ChatMasterMind; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; - SUPPORTS_MACCATALYST = YES; - SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,6"; - }; - name = Release; - }; - 4F772B2D2A4706F900D3266B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 8KC3NAN2CJ; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; - MACOSX_DEPLOYMENT_TARGET = 14.0; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = no.fjerkroa.ChatMasterMindTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ChatMasterMind.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/ChatMasterMind"; - }; - name = Debug; - }; - 4F772B2E2A4706F900D3266B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 8KC3NAN2CJ; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; - MACOSX_DEPLOYMENT_TARGET = 14.0; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = no.fjerkroa.ChatMasterMindTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ChatMasterMind.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/ChatMasterMind"; - }; - name = Release; - }; - 4F772B302A4706F900D3266B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 8KC3NAN2CJ; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; - MACOSX_DEPLOYMENT_TARGET = 14.0; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = no.fjerkroa.ChatMasterMindUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = ChatMasterMind; - }; - name = Debug; - }; - 4F772B312A4706F900D3266B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 8KC3NAN2CJ; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; - MACOSX_DEPLOYMENT_TARGET = 14.0; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = no.fjerkroa.ChatMasterMindUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = ChatMasterMind; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 4F772AFC2A4706F600D3266B /* Build configuration list for PBXProject "ChatMasterMind" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4F772B272A4706F900D3266B /* Debug */, - 4F772B282A4706F900D3266B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4F772B292A4706F900D3266B /* Build configuration list for PBXNativeTarget "ChatMasterMind" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4F772B2A2A4706F900D3266B /* Debug */, - 4F772B2B2A4706F900D3266B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4F772B2C2A4706F900D3266B /* Build configuration list for PBXNativeTarget "ChatMasterMindTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4F772B2D2A4706F900D3266B /* Debug */, - 4F772B2E2A4706F900D3266B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4F772B2F2A4706F900D3266B /* Build configuration list for PBXNativeTarget "ChatMasterMindUITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4F772B302A4706F900D3266B /* Debug */, - 4F772B312A4706F900D3266B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - -/* Begin XCRemoteSwiftPackageReference section */ - 4F50EF422A49CE31009BD94E /* XCRemoteSwiftPackageReference "MarkdownView" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/LiYanan2004/MarkdownView.git"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 1.3.0; - }; - }; - 4F50EF452A49D012009BD94E /* XCRemoteSwiftPackageReference "Highlightr" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/raspu/Highlightr.git"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 2.1.2; - }; - }; -/* End XCRemoteSwiftPackageReference section */ - -/* Begin XCSwiftPackageProductDependency section */ - 4F50EF432A49CE31009BD94E /* MarkdownView */ = { - isa = XCSwiftPackageProductDependency; - package = 4F50EF422A49CE31009BD94E /* XCRemoteSwiftPackageReference "MarkdownView" */; - productName = MarkdownView; - }; - 4F50EF462A49D012009BD94E /* Highlightr */ = { - isa = XCSwiftPackageProductDependency; - package = 4F50EF452A49D012009BD94E /* XCRemoteSwiftPackageReference "Highlightr" */; - productName = Highlightr; - }; -/* End XCSwiftPackageProductDependency section */ - }; - rootObject = 4F772AF92A4706F600D3266B /* Project object */; -} diff --git a/app/ChatMasterMind.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/app/ChatMasterMind.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a..0000000 --- a/app/ChatMasterMind.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/app/ChatMasterMind.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/app/ChatMasterMind.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/app/ChatMasterMind.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/app/ChatMasterMind.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/app/ChatMasterMind.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 0c67376..0000000 --- a/app/ChatMasterMind.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/app/ChatMasterMind.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/app/ChatMasterMind.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 29a051f..0000000 --- a/app/ChatMasterMind.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,41 +0,0 @@ -{ - "pins" : [ - { - "identity" : "highlightr", - "kind" : "remoteSourceControl", - "location" : "https://github.com/raspu/Highlightr.git", - "state" : { - "revision" : "93199b9e434f04bda956a613af8f571933f9f037", - "version" : "2.1.2" - } - }, - { - "identity" : "markdownview", - "kind" : "remoteSourceControl", - "location" : "https://github.com/LiYanan2004/MarkdownView.git", - "state" : { - "revision" : "e2dfc286ffbc2297c3654699843473bb6152ab20", - "version" : "1.3.0" - } - }, - { - "identity" : "swift-cmark", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-cmark.git", - "state" : { - "revision" : "29d9c97e6310b87c4799268eaa2fc76164b2dbd8", - "version" : "0.2.0" - } - }, - { - "identity" : "swift-markdown", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-markdown.git", - "state" : { - "revision" : "68b2fed9fb12fb71ac81e537f08bed430b189e35", - "version" : "0.2.0" - } - } - ], - "version" : 2 -} diff --git a/app/ChatMasterMind.xcodeproj/project.xcworkspace/xcuserdata/ok.xcuserdatad/UserInterfaceState.xcuserstate b/app/ChatMasterMind.xcodeproj/project.xcworkspace/xcuserdata/ok.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index d658991..0000000 Binary files a/app/ChatMasterMind.xcodeproj/project.xcworkspace/xcuserdata/ok.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/app/ChatMasterMind.xcodeproj/project.xcworkspace/xcuserdata/ok.xcuserdatad/WorkspaceSettings.xcsettings b/app/ChatMasterMind.xcodeproj/project.xcworkspace/xcuserdata/ok.xcuserdatad/WorkspaceSettings.xcsettings deleted file mode 100644 index bbfef02..0000000 --- a/app/ChatMasterMind.xcodeproj/project.xcworkspace/xcuserdata/ok.xcuserdatad/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,14 +0,0 @@ - - - - - BuildLocationStyle - UseAppPreferences - CustomBuildLocationType - RelativeToDerivedData - DerivedDataLocationStyle - Default - ShowSharedSchemesAutomaticallyEnabled - - - diff --git a/app/ChatMasterMind.xcodeproj/xcuserdata/ok.xcuserdatad/xcschemes/xcschememanagement.plist b/app/ChatMasterMind.xcodeproj/xcuserdata/ok.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 848d2c2..0000000 --- a/app/ChatMasterMind.xcodeproj/xcuserdata/ok.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,14 +0,0 @@ - - - - - SchemeUserState - - ChatMasterMind.xcscheme_^#shared#^_ - - orderHint - 0 - - - - diff --git a/app/ChatMasterMind/Assets.xcassets/AccentColor.colorset/Contents.json b/app/ChatMasterMind/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb87897..0000000 --- a/app/ChatMasterMind/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/app/ChatMasterMind/Assets.xcassets/AppIcon.appiconset/Contents.json b/app/ChatMasterMind/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 532cd72..0000000 --- a/app/ChatMasterMind/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "16x16" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "16x16" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "32x32" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "32x32" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "128x128" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "128x128" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "256x256" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "256x256" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "512x512" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "512x512" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/app/ChatMasterMind/Assets.xcassets/Contents.json b/app/ChatMasterMind/Assets.xcassets/Contents.json deleted file mode 100644 index 73c0059..0000000 --- a/app/ChatMasterMind/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/app/ChatMasterMind/ChatData.swift b/app/ChatMasterMind/ChatData.swift deleted file mode 100644 index 09c90e5..0000000 --- a/app/ChatMasterMind/ChatData.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// Item.swift -// ChatMasterMind -// -// Created by Oleksandr Kozachuk on 2023-06-24. -// - -import Foundation -import SwiftData - -@Model -final class ChatPair { - var timestamp: Date - var question: String - var answer: String? - var disabled: Bool - - init(question: String, answer: String? = nil, timestamp: Date = Date(), disabled: Bool = false) { - self.question = question - self.answer = answer - self.timestamp = timestamp - self.disabled = disabled - } -} - -@Model -final class ChatHistory { - var name: String - var chatPairs: [ChatPair] - - init(name: String, chatPairs: [ChatPair] = []) { - self.name = name - self.chatPairs = chatPairs - } - - func addChatPair(question: String, answer: String? = nil, timestamp: Date = Date()) { - let newPair = ChatPair(question: question, answer: answer, timestamp: timestamp) - chatPairs.append(newPair) - } - - func editChatPair(withId id: PersistentIdentifier, question: String? = nil, answer: String? = nil) { - guard let index = chatPairs.firstIndex(where: { $0.id == id }) else { return } - let newChatPair = chatPairs[index] - newChatPair.previousVersions.append(chatPairs[index]) - if let question = question { - newChatPair.question = question - } - if let answer = answer { - newChatPair.answer = answer - } - newChatPair.timestamp = Date() - chatPairs[index] = newChatPair - } - - func moveChatPair(from source: IndexSet, to destination: Int) { - chatPairs.move(fromOffsets: source, toOffset: destination) - } -} diff --git a/app/ChatMasterMind/ChatMasterMind.entitlements b/app/ChatMasterMind/ChatMasterMind.entitlements deleted file mode 100644 index 068b8e8..0000000 --- a/app/ChatMasterMind/ChatMasterMind.entitlements +++ /dev/null @@ -1,22 +0,0 @@ - - - - - aps-environment - development - com.apple.developer.aps-environment - development - com.apple.developer.icloud-container-identifiers - - com.apple.developer.icloud-services - - CloudKit - - com.apple.security.app-sandbox - - com.apple.security.files.user-selected.read-only - - com.apple.security.network.client - - - diff --git a/app/ChatMasterMind/ChatMasterMindApp.swift b/app/ChatMasterMind/ChatMasterMindApp.swift deleted file mode 100644 index b3bfc36..0000000 --- a/app/ChatMasterMind/ChatMasterMindApp.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// ChatMasterMindApp.swift -// ChatMasterMind -// -// Created by Oleksandr Kozachuk on 2023-06-24. -// - -import SwiftUI -import SwiftData - -@main -struct ChatMasterMindApp: App { - - var body: some Scene { - WindowGroup { - ContentView() - } - .modelContainer(for: ChatHistory.self) - } -} diff --git a/app/ChatMasterMind/ContentView.swift b/app/ChatMasterMind/ContentView.swift deleted file mode 100644 index 4518c64..0000000 --- a/app/ChatMasterMind/ContentView.swift +++ /dev/null @@ -1,246 +0,0 @@ -// -// ContentView.swift -// ChatMasterMind -// -// Created by Oleksandr Kozachuk on 2023-06-24. -// - -import SwiftUI -import SwiftData -import MarkdownView - -struct ContentView: View { - @Environment(\.modelContext) private var modelContext - @Query private var chatHistoryList: [ChatHistory] - - var body: some View { - NavigationView { - List { - ForEach(chatHistoryList) { chatHistory in - NavigationLink(destination: ChatHistoryDetailView(chatHistory: chatHistory)) { - Text(chatHistory.name) - } - } - .onDelete(perform: deleteItems) - } - .toolbar { -#if os(iOS) - ToolbarItem(placement: .navigationBarTrailing) { - EditButton() - } -#endif - ToolbarItem { - Button(action: newChat) { - Label("New chat", systemImage: "plus") - } - } - } - Text("Select an chat") - } - } - - private func newChat() { - withAnimation { - let newChatHistory = ChatHistory(name: "test1") - modelContext.insert(newChatHistory) - } - } - - private func deleteItems(offsets: IndexSet) { - withAnimation { - for index in offsets { - modelContext.delete(chatHistoryList[index]) - } - } - } -} - -struct ChatPairView: View { - let chatPair: ChatPair - let editAction: () -> Void - let toggleAction: (Bool) -> Void - let dateFormatter: DateFormatter - - var body: some View { - VStack(alignment: .leading) { - GroupBox { - VStack(alignment: .leading) { - MarkdownView(text: chatPair.question) - Divider() - if let answer = chatPair.answer { - MarkdownView(text: answer) - } - } - } - .onTapGesture { - editAction() - } - .opacity(chatPair.disabled ? 0.5 : 1) - HStack { - Toggle("", isOn: Binding( - get: { !chatPair.disabled }, - set: { toggleAction($0) })) - .toggleStyle(CheckboxToggleStyle()) - .labelsHidden() - Text("\(chatPair.timestamp, formatter: dateFormatter)") - .foregroundColor(.secondary) - .font(.footnote) - } - } - .padding(.vertical) - } -} - -struct ChatPairEditor: View { - @Binding var chatPair: ChatPair? - @Binding var question: String - @Binding var answer: String - let saveAction: () -> Void - let cancelAction: () -> Void - - var body: some View { - VStack { - TextEditor(text: $question) - .overlay(RoundedRectangle(cornerRadius: 5).stroke(Color.gray)) - .frame(maxHeight: .infinity) - TextEditor(text: $answer) - .overlay(RoundedRectangle(cornerRadius: 5).stroke(Color.gray)) - .frame(maxHeight: .infinity) - HStack { - Button(action: cancelAction) { - Image(systemName: "xmark.circle.fill") - } - Button(action: saveAction) { - Image(systemName: "checkmark.circle.fill") - } - } - } - .padding() - } -} - -struct ChatHistoryDetailView: View { - @Environment(\.modelContext) private var modelContext - @State var chatHistory: ChatHistory - @State private var newQuestion: String = "" - @State private var pairToEdit: ChatPair? = nil - @State private var newAnswer: String = "" - - var body: some View { - VStack { - List { - ForEach(Array(chatHistory.chatPairs.enumerated()), id: \.element) { index, chatPair in - ChatPairView(chatPair: chatPair, - editAction: { - pairToEdit = chatPair - newQuestion = chatPair.question - newAnswer = chatPair.answer ?? "" - }, - toggleAction: { isEnabled in - chatPair.disabled = !isEnabled - saveContext() - }, - dateFormatter: itemFormatter) - } - .onDelete(perform: deleteChatPair) - .onMove(perform: moveChatPair) - } - HStack { - TextEditor(text: $newQuestion) - .frame(height: 50) - .overlay(RoundedRectangle(cornerRadius: 5).stroke(Color.gray)) - Button(action: { - addChatPair() - }) { - Image(systemName: "plus.circle.fill") - } - } - .padding() - } - .navigationTitle(chatHistory.name) - .sheet(item: $pairToEdit) { pairToEdit in - ChatPairEditor(chatPair: $pairToEdit, - question: $newQuestion, - answer: $newAnswer, - saveAction: { editChatPair(pairToEdit) }, - cancelAction: cancelEdit) - } - } - - private func saveContext() { - do { - try modelContext.save() - } catch { - print("Error saving model context: \(error)") - } - } - - private func deleteChatPair(at offsets: IndexSet) { - withAnimation { - offsets.forEach { index in - let chatPair = chatHistory.chatPairs[index] - modelContext.delete(chatPair) - } - saveContext() - } - } - - func moveChatPair(from source: IndexSet, to destination: Int) { - withAnimation { - chatHistory.moveChatPair(from: source, to: destination) - saveContext() - } - } - - private var itemFormatter: DateFormatter { - let formatter = DateFormatter() - formatter.dateStyle = .medium - formatter.timeStyle = .short - return formatter - } - - private func addChatPair() { - guard !newQuestion.isEmpty else { return } - withAnimation { - let newPair = ChatPair(question: newQuestion) - chatHistory.chatPairs.append(newPair) - newQuestion = "" - saveContext() - } - } - - private func editChatPair(_ chatPair: ChatPair) { - guard !newAnswer.isEmpty else { return } - withAnimation { - chatHistory.editChatPair(withId: chatPair.id, question: newQuestion, answer: newAnswer) - newAnswer = "" - pairToEdit = nil - saveContext() - } - } - - private func cancelEdit() { - newQuestion = "" - newAnswer = "" - pairToEdit = nil - } -} - - - -struct CheckboxToggleStyle: ToggleStyle { - func makeBody(configuration: Configuration) -> some View { - HStack { - configuration.label - Spacer() - Image(systemName: configuration.isOn ? "eye" : "eye.slash") - .foregroundColor(configuration.isOn ? .blue : .gray) - .onTapGesture { configuration.isOn.toggle() } - } - } -} - -#Preview { - ContentView() - .modelContainer(for: ChatHistory.self, inMemory: true) -} diff --git a/app/ChatMasterMind/Info.plist b/app/ChatMasterMind/Info.plist deleted file mode 100644 index ca9a074..0000000 --- a/app/ChatMasterMind/Info.plist +++ /dev/null @@ -1,10 +0,0 @@ - - - - - UIBackgroundModes - - remote-notification - - - diff --git a/app/ChatMasterMind/Preview Content/Preview Assets.xcassets/Contents.json b/app/ChatMasterMind/Preview Content/Preview Assets.xcassets/Contents.json deleted file mode 100644 index 73c0059..0000000 --- a/app/ChatMasterMind/Preview Content/Preview Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/app/ChatMasterMindTests/ChatMasterMindTests.swift b/app/ChatMasterMindTests/ChatMasterMindTests.swift deleted file mode 100644 index fcb7c03..0000000 --- a/app/ChatMasterMindTests/ChatMasterMindTests.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// ChatMasterMindTests.swift -// ChatMasterMindTests -// -// Created by Oleksandr Kozachuk on 2023-06-24. -// - -import XCTest - -final class ChatMasterMindTests: XCTestCase { - - override func setUpWithError() throws { - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDownWithError() throws { - // Put teardown code here. This method is called after the invocation of each test method in the class. - } - - func testExample() throws { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - // Any test you write for XCTest can be annotated as throws and async. - // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. - // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. - } - - func testPerformanceExample() throws { - // This is an example of a performance test case. - measure { - // Put the code you want to measure the time of here. - } - } - -} diff --git a/app/ChatMasterMindUITests/ChatMasterMindUITests.swift b/app/ChatMasterMindUITests/ChatMasterMindUITests.swift deleted file mode 100644 index 70b8e26..0000000 --- a/app/ChatMasterMindUITests/ChatMasterMindUITests.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// ChatMasterMindUITests.swift -// ChatMasterMindUITests -// -// Created by Oleksandr Kozachuk on 2023-06-24. -// - -import XCTest - -final class ChatMasterMindUITests: XCTestCase { - - override func setUpWithError() throws { - // Put setup code here. This method is called before the invocation of each test method in the class. - - // In UI tests it is usually best to stop immediately when a failure occurs. - continueAfterFailure = false - - // 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. - } - - override func tearDownWithError() throws { - // Put teardown code here. This method is called after the invocation of each test method in the class. - } - - func testExample() throws { - // UI tests must launch the application that they test. - let app = XCUIApplication() - app.launch() - - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testLaunchPerformance() throws { - if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { - // This measures how long it takes to launch your application. - measure(metrics: [XCTApplicationLaunchMetric()]) { - XCUIApplication().launch() - } - } - } -} diff --git a/app/ChatMasterMindUITests/ChatMasterMindUITestsLaunchTests.swift b/app/ChatMasterMindUITests/ChatMasterMindUITestsLaunchTests.swift deleted file mode 100644 index 1c4d924..0000000 --- a/app/ChatMasterMindUITests/ChatMasterMindUITestsLaunchTests.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// ChatMasterMindUITestsLaunchTests.swift -// ChatMasterMindUITests -// -// Created by Oleksandr Kozachuk on 2023-06-24. -// - -import XCTest - -final class ChatMasterMindUITestsLaunchTests: XCTestCase { - - override class var runsForEachTargetApplicationUIConfiguration: Bool { - true - } - - override func setUpWithError() throws { - continueAfterFailure = false - } - - func testLaunch() throws { - let app = XCUIApplication() - app.launch() - - // Insert steps here to perform after app launch but before taking a screenshot, - // such as logging into a test account or navigating somewhere in the app - - let attachment = XCTAttachment(screenshot: app.screenshot()) - attachment.name = "Launch Screen" - attachment.lifetime = .keepAlways - add(attachment) - } -}