cask "trae-cn" do arch arm: "arm64", intel: "x64" version "1.0.15131" sha256 arm: "e15691d0df439fa66da69ab0ba3a00bd3711e8454805cf807ea6ea7148b123c4", intel: "8c8eb90c24fc3a6d773086ca355be5ecbbe36b4553a6ad3c946cb04132d15e34" url "https://lf-cdn.trae.com.cn/obj/trae-com-cn/pkg/app/releases/stable/#{version}/darwin/Trae%20CN-darwin-#{arch}.dmg" name "Trae CN" desc "Adaptive AI IDE" homepage "https://www.trae.com.cn/" livecheck do url "https://api.trae.ai/icube/api/v1/native/version/trae/cn/latest" strategy :json do |json| json.dig("data", "manifest", "darwin", "version") end end auto_updates true depends_on macos: ">= :catalina" app "Trae CN.app" uninstall launchctl: "cn.trae.ShipIt", quit: "cn.trae.app" zap trash: [ "~/.trae-cn", "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/cn.trae.app.sfl*", "~/Library/Application Support/Trae CN", "~/Library/Caches/cn.trae.app", "~/Library/Caches/cn.trae.ShipIt", "~/Library/HTTPStorages/cn.trae.app", "~/Library/Preferences/ByHost/cn.trae.ShipIt.*.plist", "~/Library/Preferences/cn.trae.app.helper.plist", "~/Library/Preferences/cn.trae.app.plist", "~/Library/Saved Application State/cn.trae.app.savedState", ] end