Download apps/ios/Sources/SessionKey.swift from quinnz/openclaw: direct link, hf CLI and curl.
- Browser
- Download file 533 Bytes
-
https://huggingface.co/spaces/quinnz/openclaw/resolve/main/apps/ios/Sources/SessionKey.swift
- Command line
-
hf download hf://spaces/quinnz/openclaw/apps/ios/Sources/SessionKey.swift
-
curl -L -o SessionKey.swift https://huggingface.co/spaces/quinnz/openclaw/resolve/main/apps/ios/Sources/SessionKey.swift
533 Bytes
| import Foundation | |
| enum SessionKey { | |
| static func normalizeMainKey(_ raw: String?) -> String { | |
| let trimmed = (raw ?? "").trimmingCharacters(in: .whitespacesAndNewlines) | |
| return trimmed.isEmpty ? "main" : trimmed | |
| } | |
| static func isCanonicalMainSessionKey(_ value: String?) -> Bool { | |
| let trimmed = (value ?? "").trimmingCharacters(in: .whitespacesAndNewlines) | |
| if trimmed.isEmpty { return false } | |
| if trimmed == "global" { return true } | |
| return trimmed.hasPrefix("agent:") | |
| } | |
| } | |