cmux NEXT: say when a voice recording is left out, and cap its size
Merged
TE
19d ago+385+385+012345678901234567890123456789-20-20-01234567890123456789
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:
DictationAudioRecordingalready stops keeping audio at 2 minutes (3.84 MB of 16 kHz PCM) or for input below 16 kHz. It now says which:Omission.tooLongor.narrowband. The session's last update carries it asDictationUpdate.audioOmitted, and the pane payload sends it asaudioOmitted. - 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).
audioAttachmentalso refuses anything overMAX_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:
AgentPaneDictationAudioTestscovers why a recording was omitted and the payload'saudioOmitted. - Web:
test/dictation-audio.test.tsxchecks 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