feat: add voice status widget showing Claude Code voice input state#357
Open
t-benoit wants to merge 1 commit intosirmalloc:mainfrom
Open
feat: add voice status widget showing Claude Code voice input state#357t-benoit wants to merge 1 commit intosirmalloc:mainfrom
t-benoit wants to merge 1 commit intosirmalloc:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
voice-statuswidget that shows whether Claude Code's voice input feature is enabled, read from the user's Claude settings.icon,icon-text,text,word) plus an optional Nerd Font toggle, modeled on the existingvim-modewidget.voice.enabledvalue from Claude Code's full layered settings stack (project-local → project → user-local → user-global), so the widget reflects the same state Claude Code itselfuses.
Display
Standard rendering uses a constant 🎤 emoji plus an ASCII state indicator to keep widget width stable:
icon(default)🎤 ○🎤 ◉icon-text🎤 off🎤 ontextoffonwordvoice offvoice onWith Nerd Font enabled (
nin the editor), renders themicrophone(U+F130) andmicrophone-slash(U+F131) glyphs from FontAwesome, providing a natively-differentiated icon for ON vs OFF.Implementation notes
getVoiceConfig(cwd)insrc/utils/claude-settings.tsreads up to four candidate files in priority order — project-local first, user-global last — and short-circuits on the first one thatdefines
voice.enabled. Typical case is a single read; layers without the field don't clobber lower-priority defined values; malformed JSON on a layer is silently skipped (treated as "no override on thatlayer").
render()returnsnull) when no candidate file exists at all, so users without a Claude installation see nothing rather than a misleading "off".voice.modefield (hold/toggle) is intentionally not exposed — kept available for a possible follow-up widget.Test plan
bun test— full suite green (1195 tests; 17 new ongetVoiceConfigcovering layer precedence, malformed files, missing fields, andCLAUDE_CONFIG_DIR; 31 new on the widget covering all formats ×states × Nerd Font modes plus preview / raw value / null-config paths)
bun run lint— cleanbun run start): add the Voice Status widget, cycle formats withf, toggle Nerd Font withn, verify preview rendering/voicein Claude Code with the widget visible in the statusline; confirm the rendered state flips between ON/OFF without restart~/.claude/settings.jsonis absent or malformed (widget hides, no crash)voice.enabledcorrectly overrides a user-global value (manual: write<cwd>/.claude/settings.local.jsonwith{"voice":{"enabled":false}}while user-global hastrue,confirm widget shows OFF)