Skip to content

voice: add voice.md, dictation.md customization - #327418

Merged
meganrogge merged 3 commits into
microsoft:mainfrom
meganrogge:agents/add-voice-md-for-dictation-mode
Jul 28, 2026
Merged

voice: add voice.md, dictation.md customization#327418
meganrogge merged 3 commits into
microsoft:mainfrom
meganrogge:agents/add-voice-md-for-dictation-mode

Conversation

@meganrogge

@meganrogge meganrogge commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator
dictation.md.mov

Summary

  • discover Voice Mode customization from ~/.copilot/voice.md and trusted workspace .github/voice.md files
  • discover Dictation customization separately from ~/.copilot/dictation.md and trusted workspace .github/dictation.md files
  • append Dictation guidance to the existing post-processing system prompt without replacing its safety and fidelity rules
  • send only the combined Voice Mode guidance to the backend as voice_instructions on session start and resume
  • provide separate create/open commands and discovery entry points for both customization files
  • cover instruction discovery, Dictation prompt composition, and websocket payload serialization

Adds commands to the command palette and to the context menus:
Screenshot 2026-07-28 at 12 09 31 PM

Voice Mode backend support

The Voice Mode backend must:

  • accept an optional voice_instructions string on both start_session and resume_session
  • apply the latest supplied value to the voice agent for that connection/session, including after reconnect
  • treat it as user-provided customization subordinate to the backend's system, safety, and tool-use policies
  • preserve backward compatibility when the field is absent; VS Code omits it when no non-empty voice.md files are found
  • not use voice_instructions for Dictation; dictation.md is consumed locally by VS Code's Dictation cleanup path

Fixes #327334

Use trusted workspace and user voice instructions for dictation post-processing and Voice Mode sessions.\n\nFixes microsoft#327334\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 24, 2026 23:24
benvillalobos
benvillalobos previously approved these changes Jul 24, 2026
@meganrogge meganrogge self-assigned this Jul 24, 2026
@meganrogge meganrogge added this to the 1.132.0 milestone Jul 24, 2026
@meganrogge
meganrogge marked this pull request as draft July 24, 2026 23:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds voice.md customization for dictation cleanup and Voice Mode.

Changes:

  • Discovers user and trusted-workspace voice instructions.
  • Applies instructions to dictation prompts and Voice Mode payloads.
  • Adds targeted tests and documentation.
Show a summary per file
File Description
promptsService.test.ts Tests instruction discovery and trust filtering.
voiceSessionController.test.ts Adds the prompts-service dependency.
voiceClientService.test.ts Tests start/resume serialization.
chatSpeechToTextService.test.ts Tests prompt composition.
common/voiceClientService.ts Extends voice session APIs.
promptsServiceImpl.ts Loads and combines voice.md files.
promptsService.ts Exposes voice-instruction discovery.
promptFileLocations.ts Defines the voice.md filename.
voiceSessionController.ts Supplies instructions during connections.
browser/voiceClientService.ts Serializes voice_instructions.
chatSpeechToTextService.ts Adds instructions to cleanup prompts.
AI_CUSTOMIZATIONS.md Documents voice customization behavior.

Review details

  • Files reviewed: 12/12 changed files
  • Comments generated: 4
  • Review effort level: Medium

Comment thread src/vs/workbench/contrib/chat/browser/speechToText/chatSpeechToTextService.ts Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 8e7dfb9e-dd5b-4c0a-b15c-0428a236e584
Use dictation.md for local dictation cleanup while keeping voice.md exclusive to Voice Mode, with dedicated discovery and configuration entry points.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 42d07485-994d-482e-9f78-862fc4e11d89
@meganrogge meganrogge changed the title voice: add voice.md customization voice: add voice.md, dictation.md customization Jul 28, 2026
@meganrogge
meganrogge marked this pull request as ready for review July 28, 2026 16:05
@meganrogge
meganrogge enabled auto-merge (squash) July 28, 2026 16:08
@meganrogge
meganrogge merged commit c1bc28b into microsoft:main Jul 28, 2026
29 checks passed
eli-w-king added a commit that referenced this pull request Jul 28, 2026
Three things the card was getting wrong.

It drew a *chart*. Each stroke was an independent FFT band, so neighbours
jumped independently and the row read as a spectrum analyser rather than
as a voice. Replace that with the instrument Voice Mode already uses: a
travelling sine composite under a centre taper, with the microphone
driving amplitude rather than per-band height. Dropping the spectrum
takes the logarithmic band mapping, the noise floor, the response curve
and the dB window with it - all of which only ever existed to make
`getByteFrequencyData` behave.

It was painted in an accent colour that ignored the theme. The strokes
now inherit `currentColor` at 1px with 2px gaps, matching both the
toolbar pill and Voice Mode's own card, and the row's opacity rides the
same level that drives its height - quiet at rest, brighter as you speak,
dimmer still when there is no microphone to read. The bar count follows
the measured width so that 1px/2px rhythm survives a resize.

It was a dead end. Neither `dictation.enabled` nor the `dictation.md`
customization added in #327418 was reachable from the one surface a
first-time user is actually looking at. The description now carries two
links, in the same `renderFormattedText` shape the Voice Mode card uses
so translators get a whole sentence rather than concatenated fragments.
Both anchors are promoted to real controls; the callback distinguishes
them by index, so the localization comment pins their order.

Voice Mode is no longer mentioned: it introduces itself.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add dictation.md

4 participants