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:
Rocky
2026-08-10 13:50:50 +08:00
parent 53abad2050
commit 2bc8c1b87d
85 changed files with 5703 additions and 3997 deletions
@@ -0,0 +1,65 @@
// FlowUtteranceRequest.swift
// OSGKeyboard · Shared
//
// One keyboard-side start contract for dictation and explicit editing.
import Foundation
public struct FlowUtteranceRequest: Equatable, Sendable {
public let mode: FlowUtteranceMode
public let editSourceText: String?
public let sourceHistoryEntryID: UUID?
public let sourceHistoryEntryRevision: Int64?
public static let dictation = FlowUtteranceRequest(mode: .dictation)
public init(
mode: FlowUtteranceMode,
editSourceText: String? = nil,
sourceHistoryEntryID: UUID? = nil,
sourceHistoryEntryRevision: Int64? = nil
) {
self.mode = mode
self.editSourceText = editSourceText
self.sourceHistoryEntryID = sourceHistoryEntryID
self.sourceHistoryEntryRevision = sourceHistoryEntryRevision
}
public static func editLastInput(
_ reference: EditableInputReference
) -> FlowUtteranceRequest {
FlowUtteranceRequest(
mode: .editLastInput,
editSourceText: reference.displayText,
sourceHistoryEntryID: reference.historyEntryID,
sourceHistoryEntryRevision: reference.historyEntryRevision
)
}
public var isEdit: Bool { mode == .editLastInput }
}
public enum FlowUtteranceStartRejection: Equatable, Sendable {
case pipelineBusy
case onboardingIncomplete
case missingAPIKey
case noFullAccess
case appGroupUnavailable
case hostUnavailable
}
public enum FlowUtteranceStartDisposition: Equatable, Sendable {
case issued(UUID)
case waitingForHost(UUID)
case alreadyInFlight(UUID)
case rejected(FlowUtteranceStartRejection)
public var utteranceID: UUID? {
switch self {
case .issued(let id), .waitingForHost(let id), .alreadyInFlight(let id):
return id
case .rejected:
return nil
}
}
}