We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f03f6a commit 3e230e4Copy full SHA for 3e230e4
1 file changed
Core/Sources/Service/Workspace.swift
@@ -401,6 +401,13 @@ extension Workspace {
401
refreshUpdateTime()
402
openedFileRecoverableStorage.openFile(fileURL: filespace.fileURL)
403
Task {
404
+ // check if file size is larger than 15MB, if so, return immediately
405
+ if let attrs = try? FileManager.default
406
+ .attributesOfItem(atPath: filespace.fileURL.path),
407
+ let fileSize = attrs[FileAttributeKey.size] as? UInt64,
408
+ fileSize > 15 * 1024 * 1024
409
+ { return }
410
+
411
try await suggestionService?.notifyOpenTextDocument(
412
fileURL: filespace.fileURL,
413
content: try String(contentsOf: filespace.fileURL, encoding: .utf8)
0 commit comments