Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

595 B
Raw Blame
import Observation
import Synchronization

/// Translation lookups participate in SwiftUI observation without recreating screens or losing drafts.
final class LanguageUpdates: Observable, Sendable {
    static let shared = LanguageUpdates()
    private let registrar = ObservationRegistrar()
    private let counter = Mutex(0)

    var revision: Int {
        registrar.access(self, keyPath: \.revision)
        return counter.withLock { $0 }
    }

    func changed() {
        registrar.withMutation(of: self, keyPath: \.revision) {
            counter.withLock { $0 &+= 1 }
        }
    }
}