jrb16 commited on
Commit
db5b579
·
1 Parent(s): ad7e80b

First commit

Browse files
PersonalGPT.xcodeproj/project.pbxproj CHANGED
@@ -7,6 +7,7 @@
7
  objects = {
8
 
9
  /* Begin PBXBuildFile section */
 
10
  48B929A829ED80EA00607E43 /* PersonalGPTApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48B929A729ED80EA00607E43 /* PersonalGPTApp.swift */; };
11
  48B929AA29ED80EA00607E43 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48B929A929ED80EA00607E43 /* ContentView.swift */; };
12
  48B929AC29ED80EC00607E43 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 48B929AB29ED80EC00607E43 /* Assets.xcassets */; };
@@ -14,6 +15,8 @@
14
  48B929BA29ED80EC00607E43 /* PersonalGPTTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48B929B929ED80EC00607E43 /* PersonalGPTTests.swift */; };
15
  48B929C429ED80ED00607E43 /* PersonalGPTUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48B929C329ED80ED00607E43 /* PersonalGPTUITests.swift */; };
16
  48B929C629ED80ED00607E43 /* PersonalGPTUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48B929C529ED80ED00607E43 /* PersonalGPTUITestsLaunchTests.swift */; };
 
 
17
  /* End PBXBuildFile section */
18
 
19
  /* Begin PBXContainerItemProxy section */
@@ -34,6 +37,7 @@
34
  /* End PBXContainerItemProxy section */
35
 
36
  /* Begin PBXFileReference section */
 
37
  48B929A429ED80EA00607E43 /* PersonalGPT.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PersonalGPT.app; sourceTree = BUILT_PRODUCTS_DIR; };
38
  48B929A729ED80EA00607E43 /* PersonalGPTApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonalGPTApp.swift; sourceTree = "<group>"; };
39
  48B929A929ED80EA00607E43 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
@@ -52,6 +56,8 @@
52
  isa = PBXFrameworksBuildPhase;
53
  buildActionMask = 2147483647;
54
  files = (
 
 
55
  );
56
  runOnlyForDeploymentPostprocessing = 0;
57
  };
@@ -98,6 +104,7 @@
98
  48B929A729ED80EA00607E43 /* PersonalGPTApp.swift */,
99
  48B929A929ED80EA00607E43 /* ContentView.swift */,
100
  48B929AB29ED80EC00607E43 /* Assets.xcassets */,
 
101
  48B929B029ED80EC00607E43 /* PersonalGPT.entitlements */,
102
  48B929AD29ED80EC00607E43 /* Preview Content */,
103
  );
@@ -145,6 +152,10 @@
145
  dependencies = (
146
  );
147
  name = PersonalGPT;
 
 
 
 
148
  productName = PersonalGPT;
149
  productReference = 48B929A429ED80EA00607E43 /* PersonalGPT.app */;
150
  productType = "com.apple.product-type.application";
@@ -217,6 +228,10 @@
217
  Base,
218
  );
219
  mainGroup = 48B9299B29ED80EA00607E43;
 
 
 
 
220
  productRefGroup = 48B929A529ED80EA00607E43 /* Products */;
221
  projectDirPath = "";
222
  projectRoot = "";
@@ -233,6 +248,7 @@
233
  isa = PBXResourcesBuildPhase;
234
  buildActionMask = 2147483647;
235
  files = (
 
236
  48B929AF29ED80EC00607E43 /* Preview Assets.xcassets in Resources */,
237
  48B929AC29ED80EC00607E43 /* Assets.xcassets in Resources */,
238
  );
@@ -415,7 +431,9 @@
415
  buildSettings = {
416
  ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
417
  ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 
418
  CODE_SIGN_ENTITLEMENTS = PersonalGPT/PersonalGPT.entitlements;
 
419
  CODE_SIGN_STYLE = Automatic;
420
  COMBINE_HIDPI_IMAGES = YES;
421
  CURRENT_PROJECT_VERSION = 1;
@@ -424,13 +442,16 @@
424
  ENABLE_HARDENED_RUNTIME = YES;
425
  ENABLE_PREVIEWS = YES;
426
  GENERATE_INFOPLIST_FILE = YES;
 
 
427
  INFOPLIST_KEY_NSHumanReadableCopyright = "";
428
  LD_RUNPATH_SEARCH_PATHS = (
429
  "$(inherited)",
430
  "@executable_path/../Frameworks",
431
  );
 
432
  MARKETING_VERSION = 1.0;
433
- PRODUCT_BUNDLE_IDENTIFIER = ie.numen.PersonalGPT;
434
  PRODUCT_NAME = "$(TARGET_NAME)";
435
  SWIFT_EMIT_LOC_STRINGS = YES;
436
  SWIFT_VERSION = 5.0;
@@ -442,7 +463,9 @@
442
  buildSettings = {
443
  ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
444
  ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 
445
  CODE_SIGN_ENTITLEMENTS = PersonalGPT/PersonalGPT.entitlements;
 
446
  CODE_SIGN_STYLE = Automatic;
447
  COMBINE_HIDPI_IMAGES = YES;
448
  CURRENT_PROJECT_VERSION = 1;
@@ -451,13 +474,16 @@
451
  ENABLE_HARDENED_RUNTIME = YES;
452
  ENABLE_PREVIEWS = YES;
453
  GENERATE_INFOPLIST_FILE = YES;
 
 
454
  INFOPLIST_KEY_NSHumanReadableCopyright = "";
455
  LD_RUNPATH_SEARCH_PATHS = (
456
  "$(inherited)",
457
  "@executable_path/../Frameworks",
458
  );
 
459
  MARKETING_VERSION = 1.0;
460
- PRODUCT_BUNDLE_IDENTIFIER = ie.numen.PersonalGPT;
461
  PRODUCT_NAME = "$(TARGET_NAME)";
462
  SWIFT_EMIT_LOC_STRINGS = YES;
463
  SWIFT_VERSION = 5.0;
@@ -475,7 +501,7 @@
475
  GENERATE_INFOPLIST_FILE = YES;
476
  MACOSX_DEPLOYMENT_TARGET = 13.3;
477
  MARKETING_VERSION = 1.0;
478
- PRODUCT_BUNDLE_IDENTIFIER = ie.numen.PersonalGPTTests;
479
  PRODUCT_NAME = "$(TARGET_NAME)";
480
  SWIFT_EMIT_LOC_STRINGS = NO;
481
  SWIFT_VERSION = 5.0;
@@ -494,7 +520,7 @@
494
  GENERATE_INFOPLIST_FILE = YES;
495
  MACOSX_DEPLOYMENT_TARGET = 13.3;
496
  MARKETING_VERSION = 1.0;
497
- PRODUCT_BUNDLE_IDENTIFIER = ie.numen.PersonalGPTTests;
498
  PRODUCT_NAME = "$(TARGET_NAME)";
499
  SWIFT_EMIT_LOC_STRINGS = NO;
500
  SWIFT_VERSION = 5.0;
@@ -511,7 +537,7 @@
511
  DEVELOPMENT_TEAM = F8773MR9C7;
512
  GENERATE_INFOPLIST_FILE = YES;
513
  MARKETING_VERSION = 1.0;
514
- PRODUCT_BUNDLE_IDENTIFIER = ie.numen.PersonalGPTUITests;
515
  PRODUCT_NAME = "$(TARGET_NAME)";
516
  SWIFT_EMIT_LOC_STRINGS = NO;
517
  SWIFT_VERSION = 5.0;
@@ -528,7 +554,7 @@
528
  DEVELOPMENT_TEAM = F8773MR9C7;
529
  GENERATE_INFOPLIST_FILE = YES;
530
  MARKETING_VERSION = 1.0;
531
- PRODUCT_BUNDLE_IDENTIFIER = ie.numen.PersonalGPTUITests;
532
  PRODUCT_NAME = "$(TARGET_NAME)";
533
  SWIFT_EMIT_LOC_STRINGS = NO;
534
  SWIFT_VERSION = 5.0;
@@ -576,6 +602,38 @@
576
  defaultConfigurationName = Release;
577
  };
578
  /* End XCConfigurationList section */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
579
  };
580
  rootObject = 48B9299C29ED80EA00607E43 /* Project object */;
581
  }
 
7
  objects = {
8
 
9
  /* Begin PBXBuildFile section */
10
+ 4801BD5D29EDAE3700B08DE9 /* ui.html in Resources */ = {isa = PBXBuildFile; fileRef = 4801BD5C29EDAE3700B08DE9 /* ui.html */; };
11
  48B929A829ED80EA00607E43 /* PersonalGPTApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48B929A729ED80EA00607E43 /* PersonalGPTApp.swift */; };
12
  48B929AA29ED80EA00607E43 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48B929A929ED80EA00607E43 /* ContentView.swift */; };
13
  48B929AC29ED80EC00607E43 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 48B929AB29ED80EC00607E43 /* Assets.xcassets */; };
 
15
  48B929BA29ED80EC00607E43 /* PersonalGPTTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48B929B929ED80EC00607E43 /* PersonalGPTTests.swift */; };
16
  48B929C429ED80ED00607E43 /* PersonalGPTUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48B929C329ED80ED00607E43 /* PersonalGPTUITests.swift */; };
17
  48B929C629ED80ED00607E43 /* PersonalGPTUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48B929C529ED80ED00607E43 /* PersonalGPTUITestsLaunchTests.swift */; };
18
+ 48B929D429ED835800607E43 /* libzstd in Frameworks */ = {isa = PBXBuildFile; productRef = 48B929D329ED835800607E43 /* libzstd */; };
19
+ 48B929D729ED837E00607E43 /* Ink in Frameworks */ = {isa = PBXBuildFile; productRef = 48B929D629ED837E00607E43 /* Ink */; };
20
  /* End PBXBuildFile section */
21
 
22
  /* Begin PBXContainerItemProxy section */
 
37
  /* End PBXContainerItemProxy section */
38
 
39
  /* Begin PBXFileReference section */
40
+ 4801BD5C29EDAE3700B08DE9 /* ui.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = ui.html; sourceTree = "<group>"; };
41
  48B929A429ED80EA00607E43 /* PersonalGPT.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PersonalGPT.app; sourceTree = BUILT_PRODUCTS_DIR; };
42
  48B929A729ED80EA00607E43 /* PersonalGPTApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonalGPTApp.swift; sourceTree = "<group>"; };
43
  48B929A929ED80EA00607E43 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
 
56
  isa = PBXFrameworksBuildPhase;
57
  buildActionMask = 2147483647;
58
  files = (
59
+ 48B929D429ED835800607E43 /* libzstd in Frameworks */,
60
+ 48B929D729ED837E00607E43 /* Ink in Frameworks */,
61
  );
62
  runOnlyForDeploymentPostprocessing = 0;
63
  };
 
104
  48B929A729ED80EA00607E43 /* PersonalGPTApp.swift */,
105
  48B929A929ED80EA00607E43 /* ContentView.swift */,
106
  48B929AB29ED80EC00607E43 /* Assets.xcassets */,
107
+ 4801BD5C29EDAE3700B08DE9 /* ui.html */,
108
  48B929B029ED80EC00607E43 /* PersonalGPT.entitlements */,
109
  48B929AD29ED80EC00607E43 /* Preview Content */,
110
  );
 
152
  dependencies = (
153
  );
154
  name = PersonalGPT;
155
+ packageProductDependencies = (
156
+ 48B929D329ED835800607E43 /* libzstd */,
157
+ 48B929D629ED837E00607E43 /* Ink */,
158
+ );
159
  productName = PersonalGPT;
160
  productReference = 48B929A429ED80EA00607E43 /* PersonalGPT.app */;
161
  productType = "com.apple.product-type.application";
 
228
  Base,
229
  );
230
  mainGroup = 48B9299B29ED80EA00607E43;
231
+ packageReferences = (
232
+ 48B929D229ED835800607E43 /* XCRemoteSwiftPackageReference "zstd" */,
233
+ 48B929D529ED837E00607E43 /* XCRemoteSwiftPackageReference "Ink" */,
234
+ );
235
  productRefGroup = 48B929A529ED80EA00607E43 /* Products */;
236
  projectDirPath = "";
237
  projectRoot = "";
 
248
  isa = PBXResourcesBuildPhase;
249
  buildActionMask = 2147483647;
250
  files = (
251
+ 4801BD5D29EDAE3700B08DE9 /* ui.html in Resources */,
252
  48B929AF29ED80EC00607E43 /* Preview Assets.xcassets in Resources */,
253
  48B929AC29ED80EC00607E43 /* Assets.xcassets in Resources */,
254
  );
 
431
  buildSettings = {
432
  ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
433
  ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
434
+ ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
435
  CODE_SIGN_ENTITLEMENTS = PersonalGPT/PersonalGPT.entitlements;
436
+ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
437
  CODE_SIGN_STYLE = Automatic;
438
  COMBINE_HIDPI_IMAGES = YES;
439
  CURRENT_PROJECT_VERSION = 1;
 
442
  ENABLE_HARDENED_RUNTIME = YES;
443
  ENABLE_PREVIEWS = YES;
444
  GENERATE_INFOPLIST_FILE = YES;
445
+ INFOPLIST_KEY_CFBundleDisplayName = "Personal GPT";
446
+ INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
447
  INFOPLIST_KEY_NSHumanReadableCopyright = "";
448
  LD_RUNPATH_SEARCH_PATHS = (
449
  "$(inherited)",
450
  "@executable_path/../Frameworks",
451
  );
452
+ MACOSX_DEPLOYMENT_TARGET = 13.3;
453
  MARKETING_VERSION = 1.0;
454
+ PRODUCT_BUNDLE_IDENTIFIER = ie.jrb16.PrivateAIChat;
455
  PRODUCT_NAME = "$(TARGET_NAME)";
456
  SWIFT_EMIT_LOC_STRINGS = YES;
457
  SWIFT_VERSION = 5.0;
 
463
  buildSettings = {
464
  ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
465
  ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
466
+ ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
467
  CODE_SIGN_ENTITLEMENTS = PersonalGPT/PersonalGPT.entitlements;
468
+ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
469
  CODE_SIGN_STYLE = Automatic;
470
  COMBINE_HIDPI_IMAGES = YES;
471
  CURRENT_PROJECT_VERSION = 1;
 
474
  ENABLE_HARDENED_RUNTIME = YES;
475
  ENABLE_PREVIEWS = YES;
476
  GENERATE_INFOPLIST_FILE = YES;
477
+ INFOPLIST_KEY_CFBundleDisplayName = "Personal GPT";
478
+ INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
479
  INFOPLIST_KEY_NSHumanReadableCopyright = "";
480
  LD_RUNPATH_SEARCH_PATHS = (
481
  "$(inherited)",
482
  "@executable_path/../Frameworks",
483
  );
484
+ MACOSX_DEPLOYMENT_TARGET = 13.3;
485
  MARKETING_VERSION = 1.0;
486
+ PRODUCT_BUNDLE_IDENTIFIER = ie.jrb16.PrivateAIChat;
487
  PRODUCT_NAME = "$(TARGET_NAME)";
488
  SWIFT_EMIT_LOC_STRINGS = YES;
489
  SWIFT_VERSION = 5.0;
 
501
  GENERATE_INFOPLIST_FILE = YES;
502
  MACOSX_DEPLOYMENT_TARGET = 13.3;
503
  MARKETING_VERSION = 1.0;
504
+ PRODUCT_BUNDLE_IDENTIFIER = ie.jrb16.PrivateAIChatTests;
505
  PRODUCT_NAME = "$(TARGET_NAME)";
506
  SWIFT_EMIT_LOC_STRINGS = NO;
507
  SWIFT_VERSION = 5.0;
 
520
  GENERATE_INFOPLIST_FILE = YES;
521
  MACOSX_DEPLOYMENT_TARGET = 13.3;
522
  MARKETING_VERSION = 1.0;
523
+ PRODUCT_BUNDLE_IDENTIFIER = ie.jrb16.PrivateAIChatTests;
524
  PRODUCT_NAME = "$(TARGET_NAME)";
525
  SWIFT_EMIT_LOC_STRINGS = NO;
526
  SWIFT_VERSION = 5.0;
 
537
  DEVELOPMENT_TEAM = F8773MR9C7;
538
  GENERATE_INFOPLIST_FILE = YES;
539
  MARKETING_VERSION = 1.0;
540
+ PRODUCT_BUNDLE_IDENTIFIER = ie.jrb16.PrivateAIChatUITests;
541
  PRODUCT_NAME = "$(TARGET_NAME)";
542
  SWIFT_EMIT_LOC_STRINGS = NO;
543
  SWIFT_VERSION = 5.0;
 
554
  DEVELOPMENT_TEAM = F8773MR9C7;
555
  GENERATE_INFOPLIST_FILE = YES;
556
  MARKETING_VERSION = 1.0;
557
+ PRODUCT_BUNDLE_IDENTIFIER = ie.jrb16.PrivateAIChatUITests;
558
  PRODUCT_NAME = "$(TARGET_NAME)";
559
  SWIFT_EMIT_LOC_STRINGS = NO;
560
  SWIFT_VERSION = 5.0;
 
602
  defaultConfigurationName = Release;
603
  };
604
  /* End XCConfigurationList section */
605
+
606
+ /* Begin XCRemoteSwiftPackageReference section */
607
+ 48B929D229ED835800607E43 /* XCRemoteSwiftPackageReference "zstd" */ = {
608
+ isa = XCRemoteSwiftPackageReference;
609
+ repositoryURL = "https://github.com/facebook/zstd";
610
+ requirement = {
611
+ branch = dev;
612
+ kind = branch;
613
+ };
614
+ };
615
+ 48B929D529ED837E00607E43 /* XCRemoteSwiftPackageReference "Ink" */ = {
616
+ isa = XCRemoteSwiftPackageReference;
617
+ repositoryURL = "https://github.com/JohnSundell/Ink";
618
+ requirement = {
619
+ kind = upToNextMajorVersion;
620
+ minimumVersion = 0.6.0;
621
+ };
622
+ };
623
+ /* End XCRemoteSwiftPackageReference section */
624
+
625
+ /* Begin XCSwiftPackageProductDependency section */
626
+ 48B929D329ED835800607E43 /* libzstd */ = {
627
+ isa = XCSwiftPackageProductDependency;
628
+ package = 48B929D229ED835800607E43 /* XCRemoteSwiftPackageReference "zstd" */;
629
+ productName = libzstd;
630
+ };
631
+ 48B929D629ED837E00607E43 /* Ink */ = {
632
+ isa = XCSwiftPackageProductDependency;
633
+ package = 48B929D529ED837E00607E43 /* XCRemoteSwiftPackageReference "Ink" */;
634
+ productName = Ink;
635
+ };
636
+ /* End XCSwiftPackageProductDependency section */
637
  };
638
  rootObject = 48B9299C29ED80EA00607E43 /* Project object */;
639
  }
PersonalGPT/Assets.xcassets/AppIcon.appiconset/1024x1024.png ADDED
PersonalGPT/Assets.xcassets/AppIcon.appiconset/128x128.png ADDED
PersonalGPT/Assets.xcassets/AppIcon.appiconset/16x16.png ADDED
PersonalGPT/Assets.xcassets/AppIcon.appiconset/256x256 1.png ADDED
PersonalGPT/Assets.xcassets/AppIcon.appiconset/256x256.png ADDED
PersonalGPT/Assets.xcassets/AppIcon.appiconset/32x32 1.png ADDED
PersonalGPT/Assets.xcassets/AppIcon.appiconset/32x32.png ADDED
PersonalGPT/Assets.xcassets/AppIcon.appiconset/512x512 1.png ADDED
PersonalGPT/Assets.xcassets/AppIcon.appiconset/512x512.png ADDED
PersonalGPT/Assets.xcassets/AppIcon.appiconset/64x64.png ADDED
PersonalGPT/Assets.xcassets/AppIcon.appiconset/Contents.json CHANGED
@@ -1,51 +1,61 @@
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
  "idiom" : "mac",
15
  "scale" : "1x",
16
  "size" : "32x32"
17
  },
18
  {
 
19
  "idiom" : "mac",
20
  "scale" : "2x",
21
  "size" : "32x32"
22
  },
23
  {
 
24
  "idiom" : "mac",
25
  "scale" : "1x",
26
  "size" : "128x128"
27
  },
28
  {
 
29
  "idiom" : "mac",
30
  "scale" : "2x",
31
  "size" : "128x128"
32
  },
33
  {
 
34
  "idiom" : "mac",
35
  "scale" : "1x",
36
  "size" : "256x256"
37
  },
38
  {
 
39
  "idiom" : "mac",
40
  "scale" : "2x",
41
  "size" : "256x256"
42
  },
43
  {
 
44
  "idiom" : "mac",
45
  "scale" : "1x",
46
  "size" : "512x512"
47
  },
48
  {
 
49
  "idiom" : "mac",
50
  "scale" : "2x",
51
  "size" : "512x512"
 
1
  {
2
  "images" : [
3
  {
4
+ "filename" : "16x16.png",
5
  "idiom" : "mac",
6
  "scale" : "1x",
7
  "size" : "16x16"
8
  },
9
  {
10
+ "filename" : "32x32.png",
11
  "idiom" : "mac",
12
  "scale" : "2x",
13
  "size" : "16x16"
14
  },
15
  {
16
+ "filename" : "32x32 1.png",
17
  "idiom" : "mac",
18
  "scale" : "1x",
19
  "size" : "32x32"
20
  },
21
  {
22
+ "filename" : "64x64.png",
23
  "idiom" : "mac",
24
  "scale" : "2x",
25
  "size" : "32x32"
26
  },
27
  {
28
+ "filename" : "128x128.png",
29
  "idiom" : "mac",
30
  "scale" : "1x",
31
  "size" : "128x128"
32
  },
33
  {
34
+ "filename" : "256x256.png",
35
  "idiom" : "mac",
36
  "scale" : "2x",
37
  "size" : "128x128"
38
  },
39
  {
40
+ "filename" : "256x256 1.png",
41
  "idiom" : "mac",
42
  "scale" : "1x",
43
  "size" : "256x256"
44
  },
45
  {
46
+ "filename" : "512x512.png",
47
  "idiom" : "mac",
48
  "scale" : "2x",
49
  "size" : "256x256"
50
  },
51
  {
52
+ "filename" : "512x512 1.png",
53
  "idiom" : "mac",
54
  "scale" : "1x",
55
  "size" : "512x512"
56
  },
57
  {
58
+ "filename" : "1024x1024.png",
59
  "idiom" : "mac",
60
  "scale" : "2x",
61
  "size" : "512x512"
PersonalGPT/ContentView.swift CHANGED
@@ -1,21 +1,89 @@
1
  //
2
  // ContentView.swift
3
- // PersonalGPT
4
  //
5
- // Created by Jeethu Rao on 17/04/2023.
6
  //
7
 
8
  import SwiftUI
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
  struct ContentView: View {
 
 
 
 
 
11
  var body: some View {
12
  VStack {
13
- Image(systemName: "globe")
14
- .imageScale(.large)
15
- .foregroundColor(.accentColor)
16
- Text("Hello, world!")
17
- }
18
- .padding()
 
 
 
 
 
 
 
 
 
 
 
19
  }
20
  }
21
 
 
1
  //
2
  // ContentView.swift
3
+ // PrivateAIChat
4
  //
5
+ // Created by jrb16 on 17/04/2023.
6
  //
7
 
8
  import SwiftUI
9
+ import WebKit
10
+ import Combine
11
+
12
+ #if canImport(UIKit)
13
+ extension View {
14
+ func hideKeyboard() {
15
+ UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
16
+ }
17
+ }
18
+ #else
19
+ extension View {
20
+ func hideKeyboard() {
21
+ print("Hiding keyboard")
22
+ }
23
+ }
24
+ #endif
25
+
26
+ class DataSource: ObservableObject {
27
+ @Published var stringList: [String] = []
28
+ }
29
+
30
+ struct WebView: NSViewRepresentable {
31
+ @Binding var webView: WKWebView?
32
+ let htmlFile: String
33
+
34
+ func makeCoordinator() -> Coordinator {
35
+ Coordinator(self)
36
+ }
37
+
38
+ func makeNSView(context: Context) -> WKWebView {
39
+ let webView = WKWebView()
40
+ webView.navigationDelegate = context.coordinator
41
+ self.webView = webView
42
+ return webView
43
+ }
44
+
45
+ func updateNSView(_ nsView: WKWebView, context: Context) {
46
+ if let fileURL = Bundle.main.url(forResource: htmlFile, withExtension: "html") {
47
+ let request = URLRequest(url: fileURL)
48
+ nsView.load(request)
49
+ }
50
+ }
51
+
52
+ class Coordinator: NSObject, WKNavigationDelegate {
53
+ var parent: WebView
54
+
55
+ init(_ parent: WebView) {
56
+ self.parent = parent
57
+ }
58
+ }
59
+ }
60
+
61
 
62
  struct ContentView: View {
63
+ @State private var webView: WKWebView?
64
+ @StateObject private var dataSource = DataSource()
65
+ @State private var userString = ""
66
+ @State private var userMessages: [String] = []
67
+
68
  var body: some View {
69
  VStack {
70
+ WebView(webView: $webView, htmlFile: "ui")
71
+ TextField("", text: $userString, onCommit: {
72
+ dataSource.stringList.append(userString)
73
+ hideKeyboard()
74
+ })
75
+ .textFieldStyle(RoundedBorderTextFieldStyle())
76
+ }.padding()
77
+ .onReceive(dataSource.$stringList) { newList in
78
+ if let lastElement = newList.last {
79
+ userString = ""
80
+ webView?.evaluateJavaScript("addUserMessage('\(lastElement)');", completionHandler: { result, error in
81
+ if let error = error {
82
+ print("Error calling JavaScript function: \(error.localizedDescription)")
83
+ }
84
+ })
85
+ }
86
+ }
87
  }
88
  }
89
 
PersonalGPT/PersonalGPT.entitlements CHANGED
@@ -2,9 +2,11 @@
2
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
  <plist version="1.0">
4
  <dict>
5
- <key>com.apple.security.app-sandbox</key>
6
- <true/>
7
- <key>com.apple.security.files.user-selected.read-only</key>
8
- <true/>
 
 
9
  </dict>
10
  </plist>
 
2
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
  <plist version="1.0">
4
  <dict>
5
+ <key>com.apple.security.app-sandbox</key>
6
+ <true/>
7
+ <key>com.apple.security.files.user-selected.read-only</key>
8
+ <true/>
9
+ <key>com.apple.security.network.client</key>
10
+ <true/>
11
  </dict>
12
  </plist>
PersonalGPT/PersonalGPTApp.swift CHANGED
@@ -1,17 +1,25 @@
1
  //
2
- // PersonalGPTApp.swift
3
- // PersonalGPT
4
  //
5
- // Created by Jeethu Rao on 17/04/2023.
6
  //
7
 
8
  import SwiftUI
9
 
10
  @main
11
- struct PersonalGPTApp: App {
 
 
12
  var body: some Scene {
13
  WindowGroup {
14
  ContentView()
15
  }
16
  }
17
  }
 
 
 
 
 
 
 
1
  //
2
+ // PrivateAIChatApp.swift
3
+ // PrivateAIChat
4
  //
5
+ // Created by jrb16 on 17/04/2023.
6
  //
7
 
8
  import SwiftUI
9
 
10
  @main
11
+ struct PrivateAIChatApp: App {
12
+ @NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
13
+
14
  var body: some Scene {
15
  WindowGroup {
16
  ContentView()
17
  }
18
  }
19
  }
20
+
21
+ class AppDelegate: NSObject, NSApplicationDelegate {
22
+ func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
23
+ return true
24
+ }
25
+ }
PersonalGPT/ui.html ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>iMessage-style Bubbles</title>
7
+ <style>
8
+ body {
9
+ font-family: 'Helvetica', 'Arial', sans-serif;
10
+ font-size: 16px;
11
+ line-height: 1.4;
12
+ padding: 20px;
13
+ }
14
+
15
+ .message-container {
16
+ width: 100%;
17
+ margin: 0 auto;
18
+ display: flex;
19
+ flex-direction: column;
20
+ }
21
+
22
+ .message {
23
+ max-width: 80%;
24
+ padding: 10px 15px;
25
+ margin-bottom: 10px;
26
+ border-radius: 18px;
27
+ position: relative;
28
+ }
29
+
30
+ .message p {
31
+ margin: 0;
32
+ }
33
+
34
+ .incoming {
35
+ background-color: #e9e9eb;
36
+ color: #000000;
37
+ align-self: flex-start;
38
+ text-align: left;
39
+ margin-right: auto;
40
+ border-bottom-left-radius: 5px;
41
+ }
42
+
43
+ .outgoing {
44
+ background-color: #a77fde;
45
+ color: #FFFFFF;
46
+ align-self: flex-end;
47
+ text-align: left;
48
+ margin-left: auto;
49
+ border-bottom-right-radius: 5px;
50
+ }
51
+ </style>
52
+ <script type="text/javascript">
53
+ function addUserMessage(message) {
54
+ const messageContainer = document.querySelector('.message-container');
55
+ const messageDiv = document.createElement('div');
56
+ messageDiv.classList.add('message', 'outgoing');
57
+ const messageContent = document.createElement('p');
58
+ messageContent.textContent = message;
59
+ messageDiv.appendChild(messageContent);
60
+ messageContainer.appendChild(messageDiv);
61
+ // Scroll to the bottom of the message container
62
+ messageContainer.scrollTop = messageContainer.scrollHeight;
63
+ }
64
+ window.addUserMessage = addUserMessage;
65
+ </script>
66
+ </head>
67
+ <body>
68
+ <div class="message-container">
69
+ <div class="message incoming">
70
+ <p>Hello, how are you?</p>
71
+ </div>
72
+ <div class="message outgoing">
73
+ <p>I'm doing great, thanks! How about you?</p>
74
+ </div>
75
+ <!-- Add more message bubbles as needed -->
76
+ </div>
77
+ </body>
78
+ </html>
PersonalGPTTests/PersonalGPTTests.swift CHANGED
@@ -1,14 +1,14 @@
1
  //
2
- // PersonalGPTTests.swift
3
- // PersonalGPTTests
4
  //
5
- // Created by Jeethu Rao on 17/04/2023.
6
  //
7
 
8
  import XCTest
9
- @testable import PersonalGPT
10
 
11
- final class PersonalGPTTests: XCTestCase {
12
 
13
  override func setUpWithError() throws {
14
  // Put setup code here. This method is called before the invocation of each test method in the class.
 
1
  //
2
+ // PrivateAIChatTests.swift
3
+ // PrivateAIChatTests
4
  //
5
+ // Created by jrb16 on 17/04/2023.
6
  //
7
 
8
  import XCTest
9
+ @testable import PrivateAIChat
10
 
11
+ final class PrivateAIChatTests: XCTestCase {
12
 
13
  override func setUpWithError() throws {
14
  // Put setup code here. This method is called before the invocation of each test method in the class.
PersonalGPTUITests/PersonalGPTUITests.swift CHANGED
@@ -1,13 +1,13 @@
1
  //
2
- // PersonalGPTUITests.swift
3
- // PersonalGPTUITests
4
  //
5
- // Created by Jeethu Rao on 17/04/2023.
6
  //
7
 
8
  import XCTest
9
 
10
- final class PersonalGPTUITests: XCTestCase {
11
 
12
  override func setUpWithError() throws {
13
  // Put setup code here. This method is called before the invocation of each test method in the class.
 
1
  //
2
+ // PrivateAIChatUITests.swift
3
+ // PrivateAIChatUITests
4
  //
5
+ // Created by jrb16 on 17/04/2023.
6
  //
7
 
8
  import XCTest
9
 
10
+ final class PrivateAIChatUITests: XCTestCase {
11
 
12
  override func setUpWithError() throws {
13
  // Put setup code here. This method is called before the invocation of each test method in the class.
PersonalGPTUITests/PersonalGPTUITestsLaunchTests.swift CHANGED
@@ -1,13 +1,13 @@
1
  //
2
- // PersonalGPTUITestsLaunchTests.swift
3
- // PersonalGPTUITests
4
  //
5
- // Created by Jeethu Rao on 17/04/2023.
6
  //
7
 
8
  import XCTest
9
 
10
- final class PersonalGPTUITestsLaunchTests: XCTestCase {
11
 
12
  override class var runsForEachTargetApplicationUIConfiguration: Bool {
13
  true
 
1
  //
2
+ // PrivateAIChatUITestsLaunchTests.swift
3
+ // PrivateAIChatUITests
4
  //
5
+ // Created by jrb16 on 17/04/2023.
6
  //
7
 
8
  import XCTest
9
 
10
+ final class PrivateAIChatUITestsLaunchTests: XCTestCase {
11
 
12
  override class var runsForEachTargetApplicationUIConfiguration: Bool {
13
  true