Preserve manually typed text when voice mode sends in a new chat#326035
Open
meganrogge with Copilot wants to merge 4 commits into
Open
Preserve manually typed text when voice mode sends in a new chat#326035meganrogge with Copilot wants to merge 4 commits into
meganrogge with Copilot wants to merge 4 commits into
Conversation
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix issue where manual text is dropped in voice mode
Preserve manually typed text when voice mode sends in a new chat
Jul 15, 2026
meganrogge
approved these changes
Jul 15, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Preserves manually entered draft text when voice input submits a new Agents window chat.
Changes:
- Appends dictated text to the existing draft.
- Retains the existing send guard and attachment handling.
Show a summary per file
| File | Description |
|---|---|
src/vs/sessions/contrib/chat/browser/newChatInput.ts |
Combines existing draft and voice text before submission. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 3
- Review effort level: Medium
Comment on lines
+911
to
+913
| // Preserve any manually typed text. Voice dictation only knows about the | ||
| // spoken phrase, so append it to whatever the user already typed instead | ||
| // of overwriting it, otherwise the typed portion is dropped from the query. |
| // spoken phrase, so append it to whatever the user already typed instead | ||
| // of overwriting it, otherwise the typed portion is dropped from the query. | ||
| const existing = model.getValue().trimEnd(); | ||
| const combined = existing ? `${existing} ${text}` : text; |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
roblourens
previously approved these changes
Jul 15, 2026
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
pwang347
approved these changes
Jul 15, 2026
rzhao271
approved these changes
Jul 15, 2026
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.
Description
In the Agents window, dictating into a new chat that already had manually typed text (plus an optional pasted image) sent a query containing only the voice-dictated portion — the typed text was dropped.
The backend voice LLM's
send_to_chattool routes the transcript through_chat.voice.acceptInput→NewChatInputWidget.sendQuery(text), which calledmodel.setValue(text), overwriting the input before_send()read it. Attachments survived (they live in_contextAttachments); the typed text did not. The backend only knows the spoken phrase, so the typed portion must be preserved client-side.newChatInput.ts–sendQuery: append the dictated text to any existing input instead of replacing it.Scoped to the composer path (the reported new-chat scenario); the existing-session
widget.acceptInputflow is untouched. The_sendingguard against double-submits from rapid transcripts is preserved.