feat: add Xiaomi MiMo ASR and explicit hotkey trigger modes - #2
Merged
Merged
Conversation
fish2lab
marked this pull request as ready for review
July 29, 2026 17:39
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.
Summary
/chat/completions, Base64-encoded WAV input, andasr_options.language.ProviderKind::Mimothroughout provider validation, registry construction, migrations, and the settings preset list.Hold to talk/Press to togglesetting.hold.Motivation
MiMo ASR does not use the multipart
/audio/transcriptionswire format used by OpenAI-compatible STT providers. It requires a dedicated JSON request shape, so treating it as a generic OpenAI-compatible endpoint would produce an invalid request.The previous hotkey state machine inferred hold versus toggle behavior from a 350 ms release boundary. This made short presses timing-sensitive and unreliable for page turners and third-party keyboards that emit brief down/up pulses instead of a stable held-key signal. Assistant toggle sessions also waited for the second release, creating an additional sticky interaction.
Behavior
hold: the first keydown starts recording and the matching keyup stops it.toggle: the first keydown starts recording, releases are ignored, and the second keydown stops recording immediately.hold; the obsoletehold_threshold_msfield is removed.Validation
cargo test --manifest-path src-tauri/Cargo.toml --no-default-features --lib orchestrator::session::tests— 32 passedpnpm gen:ipc— passedpnpm test— 160 passedpnpm tauri build --debug --bundles app -- --no-default-features— passed