File tree Expand file tree Collapse file tree 3 files changed +18
-6
lines changed
Expand file tree Collapse file tree 3 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -133,3 +133,4 @@ Python/site-packages/*
133133
134134Python /VERSIONS
135135Copilot for Xcode Plus.xcworkspace
136+ PLUS
Original file line number Diff line number Diff line change @@ -405,14 +405,18 @@ func isProIncluded(file: StaticString = #file) -> Bool {
405405 let rootURL = fileURL
406406 . deletingLastPathComponent ( )
407407 . deletingLastPathComponent ( )
408- let folderURL = rootURL. appendingPathComponent ( " Pro " )
409- if !FileManager. default. fileExists ( atPath: folderURL . path) {
408+ let confURL = rootURL. appendingPathComponent ( " PLUS " )
409+ if !FileManager. default. fileExists ( atPath: confURL . path) {
410410 return false
411411 }
412- let packageManifestURL = folderURL. appendingPathComponent ( " Package.swift " )
413- if !FileManager. default. fileExists ( atPath: packageManifestURL. path) {
412+ do {
413+ let content = String (
414+ data: try Data ( contentsOf: confURL) ,
415+ encoding: . utf8
416+ )
417+ return content? . hasPrefix ( " YES " ) ?? false
418+ } catch {
414419 return false
415420 }
416- return true
417421}
418422
Original file line number Diff line number Diff line change @@ -2,12 +2,19 @@ import ActiveDocumentChatContextCollector
22import ChatContextCollector
33import SystemInfoChatContextCollector
44import WebChatContextCollector
5+ #if canImport(ProChatContextCollectors)
56import ProChatContextCollectors
6-
77let allContextCollectors : [ any ChatContextCollector ] = [
88 SystemInfoChatContextCollector ( ) ,
99 ActiveDocumentChatContextCollector ( ) ,
1010 WebChatContextCollector ( ) ,
1111 ProChatContextCollectors ( ) ,
1212]
13+ #else
14+ let allContextCollectors : [ any ChatContextCollector ] = [
15+ SystemInfoChatContextCollector ( ) ,
16+ ActiveDocumentChatContextCollector ( ) ,
17+ WebChatContextCollector ( ) ,
18+ ]
19+ #endif
1320
You can’t perform that action at this time.
0 commit comments