Security: Clear clipboard if it was empty before dictation
- If clipboard was empty, clear it after paste (don't leave transcript) - If clipboard had content, restore original content - Prevents sensitive dictated text from remaining on clipboard Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -867,8 +867,14 @@ class AppDelegate: NSObject, NSApplicationDelegate, URLSessionDownloadDelegate {
|
||||
keyUp?.post(tap: .cghidEventTap)
|
||||
|
||||
// Restore original clipboard after a short delay
|
||||
// If clipboard was empty, clear it (don't leave transcript)
|
||||
// If clipboard had content, restore it
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
|
||||
self.restoreClipboard(savedItems)
|
||||
if savedItems.isEmpty {
|
||||
NSPasteboard.general.clearContents()
|
||||
} else {
|
||||
self.restoreClipboard(savedItems)
|
||||
}
|
||||
}
|
||||
|
||||
self.statusItem.button?.title = "🎤"
|
||||
|
||||
Reference in New Issue
Block a user