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:
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user