cmux NEXT: say when a voice recording is left out, and cap its size

Merged
TE
19d ago
+385-20

Follow-up to #21682 (voice through the picked model). Rebased onto feat-cmux-next after #21682 merged. It now carries only its own commit.

Nothing capped recording size end to end. Codex's 1M input cap counts only text, so a long clip would go out as one huge JSON line and fail at the model API.

  • Host: DictationAudioRecording already stops keeping audio at 2 minutes (3.84 MB of 16 kHz PCM) or for input below 16 kHz. It now says which: Omission.tooLong or .narrowband. The session's last update carries it as DictationUpdate.audioOmitted, and the pane payload sends it as audioOmitted.
  • Composer: when a harness takes audio and the recording was left out, a notice in the chat says why ("The voice recording ran past 2 minutes, so the prompt gets the transcript only.", plus a narrowband version). audioAttachment also refuses anything over MAX_AUDIO_BYTES (4 MB) and shows the same notice. That is a backstop for the host's cap.
  • Two new strings, in all 21 locales.

Tests:

  • Swift: AgentPaneDictationAudioTests covers why a recording was omitted and the payload's audioOmitted.
  • Web: test/dictation-audio.test.tsx checks that the notice reaches only a harness that takes audio, and that the byte cap holds.
  • bun tests and typecheck pass locally. Swift compiles in CI.

🤖 Generated with Claude Code