fix(ipad): ship iPad P0 layout/globe fixes, edit-last-input, drop clipboard commands
Adapt typing/voice surfaces for iPad width and height, add the system globe key and last-input editing flow, harden host-only Rime deployment, and remove clipboard voice commands. Bump build to 61.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
// FlowStartTransactionPolicy.swift
|
||||
// OSGKeyboard · Shared
|
||||
//
|
||||
// Pure gate for exactly-once side effects over at-least-once Flow commands.
|
||||
|
||||
import Foundation
|
||||
|
||||
public enum FlowHostUtteranceState: Equatable, Sendable {
|
||||
case idle
|
||||
case starting(UUID)
|
||||
case recording(UUID)
|
||||
case processing(UUID)
|
||||
}
|
||||
|
||||
public enum FlowStartDecision: Equatable, Sendable {
|
||||
case accept
|
||||
case idempotent
|
||||
case rejectBusy
|
||||
case rejectExpired
|
||||
}
|
||||
|
||||
public enum FlowStartTransactionPolicy {
|
||||
public static func decide(
|
||||
incomingUtteranceID: UUID,
|
||||
deadlineAt: TimeInterval?,
|
||||
now: TimeInterval = Date().timeIntervalSince1970,
|
||||
hostState: FlowHostUtteranceState
|
||||
) -> FlowStartDecision {
|
||||
if let deadlineAt, now >= deadlineAt {
|
||||
return .rejectExpired
|
||||
}
|
||||
switch hostState {
|
||||
case .idle:
|
||||
return .accept
|
||||
case .starting(let id), .recording(let id), .processing(let id):
|
||||
return id == incomingUtteranceID ? .idempotent : .rejectBusy
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user