feat(voice): add a mic button to the desktop and vs code composers - #48
Merged
Merged
Conversation
Adds aster dictate, which records until stdin gets a line and prints NDJSON events. The desktop app and the VS Code extension run it from a new composer mic button. The desktop bundle declares microphone use.
Owner
Author
|
Folded into #47, which now carries all of the voice work in one PR. |
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.
Stacked on #47. Part of #46.
What changes
aster dictatecommand. It records until stdin gets a line or closes, then prints NDJSON:listening,transcribing, thentranscript(text) orerror(message,detail). The TUI and this command share the plain-language error copy (crates/aster-cli/src/dictate.rs).start_dictation,stop_dictationandcancel_dictationrunaster dictateand forward its lines asaster://dictation. The bundle gains thecom.apple.security.device.audio-inputentitlement and anNSMicrophoneUsageDescription, without which the hardened runtime kills the process when it opens the mic.aster servebrowser page). The host runsaster dictateper webview, and a newdictationmessage pair is added toprotocol.ts.Why a separate command
The desktop app starts a new
aster chat --streamprocess per turn, and VS Code talks ACP. Neither has a channel open before the user sends a message, which is exactly when dictation happens. A standalone command leaves the stream and ACP contracts alone and adds a new surface rather than changing an existing one.Found along the way, not fixed here
desktop/src-tauri/src/lib.rs: thechatcommand takes the child's stdin into a local and never stores it, soanswer_approvalcan never find it and later approvals read as "no".Testing
make checkandmake desktop-checkpass. The VS Code host and webview typecheck, andvitestpasses, including newsrc/dictation.test.tscovering chunked lines, a CLI that exits without a result, and cancel.aster dictateran on macOS with the real microphone. It reported a missing key as expected, and with a key present it refused a 0.1 second clip before uploading anything.🤖 Generated with Claude Code