-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Description
Command replacements configured in replacements.json are not being applied when generating TTS for Bash commands, resulting in incorrect pronunciation of commands like "gh", "uvx", etc.
Context
- Project Area: Core notification logic
- Complexity: 2/10 (Simple fix)
- User Impact: Commands are pronounced incorrectly in voice notifications
Current Behavior
When a Bash command like gh pr create is executed:
- The notification displays correctly
- The TTS says "gh" instead of "github CLI"
- Other configured replacements (uvx → "U V X", etc.) are also not applied
Technical Details
Affected File: src/ccnotify/notify.py
Root Cause: The apply_command_replacement() function exists (line 573) but is never called when processing Bash commands.
Location: Lines 762-885 in the PreToolUse handler for Bash commands
- Line 876:
audio_descis generated for the command - Line 885:
custom_ttsis created usingaudio_desc - Missing: Call to
apply_command_replacement()between these steps
Requirements
- Apply command replacements to the audio description before creating TTS message
- Ensure all command replacements from
replacements.jsonwork correctly - Maintain existing functionality for other notification types
Implementation Steps
- Add call to
apply_command_replacement(audio_desc, replacements)after line 876 - Test with various commands (gh, uvx, uv, npm, etc.)
- Verify pronunciations match replacements.json configuration
Acceptance Criteria
- Commands like "gh" pronounce as "github CLI" in TTS
- Commands like "uvx" pronounce as "U V X" in TTS
- All command replacements from replacements.json are applied
- No regression in other notification types
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers