Add privacy: hide exact words in dictation notifications
- Replace exact text preview with word count in notifications - Change 'Speaking' notification to show 'Dictating... (X words)' instead of text - Change 'Dictation' notification to show 'Text typed successfully (X words)' instead of preview - Improves privacy by not displaying sensitive dictation content in notifications
This commit is contained in:
parent
73a15d03cd
commit
cf2ebc9afa
@ -370,10 +370,11 @@ def process_partial_text(text):
|
||||
|
||||
if app_state == AppState.DICTATION:
|
||||
logging.info(f"💭 {text}")
|
||||
# Show brief notification for longer partial text
|
||||
# Show brief notification without revealing exact words (privacy)
|
||||
if len(text) > 3:
|
||||
word_count = len(text.split())
|
||||
send_notification(
|
||||
"🎤 Speaking", text[:50] + "..." if len(text) > 50 else text, 1000
|
||||
"🎤 Listening", f"Dictating... ({word_count} words)", 1000
|
||||
)
|
||||
elif app_state == AppState.CONVERSATION:
|
||||
logging.info(f"💭 [Conversation] {text}")
|
||||
@ -429,9 +430,10 @@ async def process_final_text(text):
|
||||
|
||||
if app_state == AppState.DICTATION:
|
||||
logging.info(f"✅ {formatted}")
|
||||
word_count = len(formatted.split())
|
||||
send_notification(
|
||||
"🎤 Dictation",
|
||||
f"Typed: {formatted[:30]}{'...' if len(formatted) > 30 else ''}",
|
||||
"🎤 Dictation Complete",
|
||||
f"Text typed successfully ({word_count} words)",
|
||||
2000,
|
||||
)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user