File tree Expand file tree Collapse file tree
WorkspaceSuggestionService Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,7 +88,9 @@ public final class Filespace {
8888
8989 // MARK: Git Ignore
9090
91+ @WorkspaceActor
9192 private var gitIgnoreStatus : GitIgnoreStatus ?
93+ @WorkspaceActor
9294 public var isGitIgnored : Bool {
9395 get async {
9496 @Dependency ( \. gitIgnoredChecker) var gitIgnoredChecker
Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ public final class SuggestionServiceWorkspacePlugin: WorkspacePlugin {
8888 workspace? . refreshUpdateTime ( )
8989 workspace? . openedFileRecoverableStorage. openFile ( fileURL: filespace. fileURL)
9090 Task {
91+ guard !( await filespace. isGitIgnored) else { return }
9192 // check if file size is larger than 15MB, if so, return immediately
9293 if let attrs = try ? FileManager . default
9394 . attributesOfItem ( atPath: filespace. fileURL. path) ,
@@ -106,6 +107,7 @@ public final class SuggestionServiceWorkspacePlugin: WorkspacePlugin {
106107 filespace. refreshUpdateTime ( )
107108 workspace? . refreshUpdateTime ( )
108109 Task {
110+ guard !( await filespace. isGitIgnored) else { return }
109111 try await suggestionService? . notifyChangeTextDocument (
110112 fileURL: filespace. fileURL,
111113 content: content
@@ -117,6 +119,7 @@ public final class SuggestionServiceWorkspacePlugin: WorkspacePlugin {
117119 filespace. refreshUpdateTime ( )
118120 workspace? . refreshUpdateTime ( )
119121 Task {
122+ guard !( await filespace. isGitIgnored) else { return }
120123 try await suggestionService? . notifySaveTextDocument ( fileURL: filespace. fileURL)
121124 }
122125 }
You can’t perform that action at this time.
0 commit comments