feat(keyboard): add clipboard voice command mode

Long-press mic runs ASR as an instruction over eligible clipboard text,
with host-confirm recording UI, min-record gate, and light ASR prewarm.
Bump CURRENT_PROJECT_VERSION to 53.
This commit is contained in:
Rocky
2026-08-07 16:08:42 +08:00
parent 98ae211b3d
commit f197b68573
22 changed files with 1362 additions and 124 deletions
@@ -0,0 +1,17 @@
// ClipboardPasteboardReader.swift
// OSGKeyboard · Keyboard Extension
//
// Opportunity-read of UIPasteboard for clipboard-command eligibility.
import UIKit
import OSGKeyboardShared
enum ClipboardPasteboardReader {
static func sample() -> (changeCount: Int, text: String?) {
let board = UIPasteboard.general
let changeCount = board.changeCount
// Prefer plain strings; avoid forcing non-text pasteboard items.
let text = board.hasStrings ? board.string : nil
return (changeCount, text)
}
}