Files
openclaw/apps/ios/Sources/Voice/TalkGatewayPermissionState.swift
Colin Johnson 1ca6b6ff67 feat(ios): unify chat and voice experience (#107879)
* feat(ios): unify chat and voice experience

* refactor(ios): finish unified chat ownership

* fix(ios): unify chat and voice capture ownership

* fix(ios): serialize Talk permission hydration

* fix(ios): clear voice CI regressions

* fix(ios): clear remaining unified chat CI failures

* chore(i18n): sync native source inventory

* refactor(ios): defer provider-only realtime voice

* fix(ios): clean unified chat voice PR

* fix(ios): localize unified voice controls

* fix(ios): serialize composer audio controls

* fix(ios): isolate dictation preparation lifecycle

* fix(ios): key chat tab icons by appearance

* fix(ios): preserve talk upgrade handshakes

* fix(ios): refresh native i18n inventory

* fix(ios): reconcile shared locale artifacts

* fix(ios): satisfy chat view lint limit

* fix(ios): reconcile shared composer implementation

* test(apple): avoid XCTest actor deinit crash

* fix(ios): satisfy SwiftFormat scope spacing

* fix(ios): remove duplicate merged helper declarations
2026-07-18 14:30:10 -04:00

52 lines
1.3 KiB
Swift

import Foundation
enum TalkGatewayPermissionState: Equatable {
case unknown
case ready
case missingScope(String)
case requestingUpgrade
case upgradeRequested
case requestFailed(String)
case apiKeyMissing
case loadFailed(String)
var statusLabel: String {
switch self {
case .unknown:
String(localized: "Not checked")
case .ready:
String(localized: "Ready")
case let .missingScope(scope):
String(format: String(localized: "Missing %@"), scope)
case .requestingUpgrade:
String(localized: "Requesting approval")
case .upgradeRequested:
String(localized: "Approval requested")
case .requestFailed:
String(localized: "Request failed")
case .apiKeyMissing:
String(localized: "API key missing")
case .loadFailed:
String(localized: "Load failed")
}
}
var requiresTalkPermissionAction: Bool {
switch self {
case .missingScope, .requestingUpgrade, .upgradeRequested, .requestFailed:
true
default:
false
}
}
var isApprovalRequestInProgress: Bool {
switch self {
case .requestingUpgrade, .upgradeRequested:
true
default:
false
}
}
}