Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.
Swift cache-cleanercleanerclideveloper-toolsdisk-cleanupdisk-spaceduplicate-finderhomebrewliquid-glassmac-cleanermacosmacos-appmacos-golden-gatemacos-tahoemacos-tweaksswiftswiftuiterminal-themesuninstalluninstaller
Say in Space how much Apple Intelligence may keep on this Mac
Țugui Dragoșe30c121b0550
diff --git a/Localization/Peel/Localizable.xcstrings b/Localization/Peel/Localizable.xcstringsindex c86017e4..383bc6c1 100644--- a/Localization/Peel/Localizable.xcstrings+++ b/Localization/Peel/Localizable.xcstrings@@ -16179,6 +16179,112 @@}}},+ "Apple Intelligence can keep up to %@ on this Mac, by Apple’s figure." : {+ "localizations" : {+ "cs" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Apple Intelligence může podle údajů společnosti Apple zabírat v tomto Macu až %@."+ }+ },+ "de" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Apple Intelligence kann laut Apple auf diesem Mac bis zu %@ belegen."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Apple Intelligence puede ocupar hasta %@ en este Mac, según Apple."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Apple Intelligence peut occuper jusqu’à %@ sur ce Mac, selon les chiffres d’Apple."+ }+ },+ "it" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Apple Intelligence può occupare fino a %@ su questo Mac, secondo i dati di Apple."+ }+ },+ "ja" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Appleによると、Apple IntelligenceはこのMacに最大%@のデータを保存する場合があります。"+ }+ },+ "ko" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Apple에 따르면 Apple Intelligence는 이 Mac에서 최대 %@의 저장 공간을 차지할 수 있습니다."+ }+ },+ "nl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Apple Intelligence kan volgens Apple tot %@ op deze Mac innemen."+ }+ },+ "pl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Apple Intelligence może zajmować do %@ na tym Macu, według danych Apple."+ }+ },+ "pt" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "A Apple Intelligence pode ocupar até %@ neste Mac, segundo a Apple."+ }+ },+ "ro" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Apple Intelligence poate păstra până la %@ pe acest Mac, conform cifrei date de Apple."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Apple Intelligence может занимать на этом Mac до %@, по данным Apple."+ }+ },+ "sv" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Apple Intelligence kan ta upp till %@ på den här datorn, enligt Apple."+ }+ },+ "tr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Apple’ın verdiği rakama göre Apple Intelligence bu Mac’te en fazla %@ yer kaplayabilir."+ }+ },+ "uk" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Apple Intelligence може займати на цьому Mac до %@, за даними Apple."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Apple智能在这台Mac上最多可占用%@,此数字来自Apple。"+ }+ },+ "zh-Hant" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "根據Apple提供的數字,Apple Intelligence在這部Mac上最多可佔用%@。"+ }+ }+ }+ },"Application" : {"localizations" : {"cs" : {@@ -167257,6 +167363,112 @@}}},+ "Turn Off Apple Intelligence Features" : {+ "localizations" : {+ "cs" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Vypnout funkce Apple Intelligence"+ }+ },+ "de" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Apple Intelligence-Funktionen deaktivieren"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Desactivar las funciones de Apple Intelligence"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Désactiver les fonctionnalités d’Apple Intelligence"+ }+ },+ "it" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Disattiva le funzionalità di Apple Intelligence"+ }+ },+ "ja" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Apple Intelligence機能をオフにする"+ }+ },+ "ko" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Apple Intelligence 기능 끄기"+ }+ },+ "nl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Schakel Apple Intelligence-functies uit"+ }+ },+ "pl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Wyłącz funkcje Apple Intelligence"+ }+ },+ "pt" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Desativar Recursos da Apple Intelligence"+ }+ },+ "ro" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Dezactivați funcționalitățile Apple Intelligence"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Выключить функции Apple Intelligence"+ }+ },+ "sv" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Stäng av Apple Intelligence-funktioner"+ }+ },+ "tr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Apple Intelligence Özelliklerini Kapat"+ }+ },+ "uk" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Вимкнути функції Apple Intelligence"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "关闭Apple智能功能"+ }+ },+ "zh-Hant" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "關閉Apple Intelligence功能"+ }+ }+ }+ },"Turn On" : {"localizations" : {"cs" : {diff --git a/Packages/PeelCore/Sources/PeelCore/Home/AppleIntelligence.swift b/Packages/PeelCore/Sources/PeelCore/Home/AppleIntelligence.swiftnew file mode 100644index 00000000..958722da--- /dev/null+++ b/Packages/PeelCore/Sources/PeelCore/Home/AppleIntelligence.swift@@ -0,0 +1,17 @@+import Foundation++/// What Apple says Apple Intelligence can keep on a Mac with macOS 27 (support.apple.com/121115): up to 14 GB on a Mac+/// with M3 or later and at least 12 GB of unified memory, up to 8 GB on any other Mac with M1 or later.+public enum AppleIntelligence {+ public static let onThisMac = storage(+ chip: DeviceInfo.sysctl("machdep.cpu.brand_string") ?? "", memory: Int64(ProcessInfo.processInfo.physicalMemory)+ )++ static func storage(chip: String, memory: Int64) -> Int64? {+ let name = "Apple M"+ guard chip.hasPrefix(name),+ let generation = Int(chip.dropFirst(name.count).prefix { $0.isASCII && $0.isNumber }), generation >= 1+ else { return nil }+ return generation >= 3 && memory >= 12 * 1_073_741_824 ? 14_000_000_000 : 8_000_000_000+ }+}diff --git a/Packages/PeelCore/Tests/PeelCoreTests/AppleIntelligenceTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/AppleIntelligenceTests.swiftnew file mode 100644index 00000000..90704d3b--- /dev/null+++ b/Packages/PeelCore/Tests/PeelCoreTests/AppleIntelligenceTests.swift@@ -0,0 +1,18 @@+import Foundation+@testable import PeelCore+import Testing++struct AppleIntelligenceTests {+ @Test func figuresWhatAppleSaysForEachMac() {+ let gibibyte: Int64 = 1_073_741_824+ #expect(AppleIntelligence.storage(chip: "Apple M1", memory: 8 * gibibyte) == 8_000_000_000)+ #expect(AppleIntelligence.storage(chip: "Apple M2 Pro", memory: 32 * gibibyte) == 8_000_000_000)+ #expect(AppleIntelligence.storage(chip: "Apple M3", memory: 8 * gibibyte) == 8_000_000_000)+ #expect(AppleIntelligence.storage(chip: "Apple M3", memory: 16 * gibibyte) == 14_000_000_000)+ #expect(AppleIntelligence.storage(chip: "Apple M4 Max", memory: 12 * gibibyte) == 14_000_000_000)+ #expect(AppleIntelligence.storage(chip: "Apple M10", memory: 24 * gibibyte) == 14_000_000_000)+ #expect(AppleIntelligence.storage(chip: "Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz", memory: 16 * gibibyte) == nil)+ #expect(AppleIntelligence.storage(chip: "Apple Mystery", memory: 16 * gibibyte) == nil)+ #expect(AppleIntelligence.storage(chip: "", memory: 16 * gibibyte) == nil)+ }+}diff --git a/Peel/Navigation/Links.swift b/Peel/Navigation/Links.swiftindex 8ff4a568..a5f3b87b 100644--- a/Peel/Navigation/Links.swift+++ b/Peel/Navigation/Links.swift@@ -9,6 +9,7 @@ enum Links {static let argumentParser = URL(string: "https://github.com/apple/swift-argument-parser")!static let blobatar = URL(string: "https://github.com/Alain00/blobatar")!static let sparkle = URL(string: "https://github.com/sparkle-project/Sparkle")!+ static let appleIntelligenceGuide = URL(string: "https://support.apple.com/guide/mac-help/mchlb2e44f94/mac")!/// A vulnerability's page on OSV.dev, which shows every record its API returns, under any of its identifiers.static func vulnerability(_ identifier: String) -> URL {diff --git a/Peel/Views/Space/SpaceList.swift b/Peel/Views/Space/SpaceList.swiftindex 26fc8b49..2824d03b 100644--- a/Peel/Views/Space/SpaceList.swift+++ b/Peel/Views/Space/SpaceList.swift@@ -119,6 +119,18 @@ struct SpaceList: View {.font(.caption).foregroundStyle(.secondary)}+ if #available(macOS 27, *), let size = AppleIntelligence.onThisMac {+ VStack(alignment: .leading, spacing: 2) {+ Text("Apple Intelligence can keep up to \(size.byteCount) on this Mac, by Apple’s figure.")+ .font(.caption)+ .foregroundStyle(.secondary)+ Link(destination: Links.appleIntelligenceGuide) {+ Text("Turn Off Apple Intelligence Features")+ .minimumTarget()+ }+ .font(.caption)+ }+ }}.padding(.vertical, 6)}