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,9 +867,15 @@ class AppDelegate: NSObject, NSApplicationDelegate, URLSessionDownloadDelegate {
|
|||||||
keyUp?.post(tap: .cghidEventTap)
|
keyUp?.post(tap: .cghidEventTap)
|
||||||
|
|
||||||
// Restore original clipboard after a short delay
|
// 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) {
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
|
||||||
|
if savedItems.isEmpty {
|
||||||
|
NSPasteboard.general.clearContents()
|
||||||
|
} else {
|
||||||
self.restoreClipboard(savedItems)
|
self.restoreClipboard(savedItems)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
self.statusItem.button?.title = "🎤"
|
self.statusItem.button?.title = "🎤"
|
||||||
self.updateStatus("Ready")
|
self.updateStatus("Ready")
|
||||||
|
|||||||
Reference in New Issue
Block a user