Mobile live mode
The mobile assistant now has two distinct interaction modes:- Standard chat is the default assistant surface. Typed turns continue to use the normal text-model selection in the mobile shell.
- Live mode is a dedicated fullscreen Gemini Live experience. It is entered from the assistant mic control or the assistant chrome action and binds the session to
gemini-3.1-flash-live-preview.
Mobile cache warmup
The mobile assistant shell restores core metadata fromAssistantRepository
cache helpers before revalidating: personal workspace resolution, Mira soul,
task and calendar insight, workspace credits, model catalog, recent chat
history, and restored chat detail. The assistant_metadata warmup task should
remain the entry point for preloading this data after boot, home resume, or
workspace changes.
What fullscreen live mode does
- Immediately switches the assistant route into a live-first surface instead of silently preparing a background session.
- Auto-starts the microphone when the user enters live mode, so the transition feels responsive.
- Shows large voice-activity blobs for both the user and the assistant, plus a live transcript lane for drafts and synced turns.
- Shows the current live-session status detail inline in the fullscreen header, plus a contextual status panel with recovery actions for reconnecting and failure states.
- Keeps voice, camera, and typed turns inside the same assistant thread, so persisted live turns still appear in the standard chat history after leaving fullscreen live mode.
Model split
- Mobile typed chat keeps the normal text-model path managed by
AssistantChatCubitand the workspace-selected shell model. - Mobile live mode always uses Gemini 3.1 Flash Live. Restoring a live-backed chat must not overwrite the normal text-model selection.
Backend dependencies
The mobile app still uses the existing internal APIs for Live sessions:/api/v1/assistant/live/token/api/v1/live/session/api/v1/live/tools/execute/api/v1/assistant/live/turns
AUDIO response modality for the live session config. The mobile UI relies on input/output audio transcription streams for inline text instead of requesting simultaneous TEXT and AUDIO outputs.
The ephemeral token request should match Google’s current v1alpha auth-token shape: send httpOptions.apiVersion = 'v1alpha' on the token request itself, keep uses aligned with the default single-session flow, and prefer lockAdditionalFields: [] so only the explicitly constrained setup fields are locked while client-side setup details like history/session resumption can still merge at connect time. When bootstrapping a fresh live assistant chat, omit ai_chats.id entirely unless a specific chat id is being resumed so Postgres can apply the default UUID.
Browser AI chat surfaces that use the shared /api/ai/chat streaming route must
create a durable ai_chats row through /api/ai/chat/new before the first
streaming turn. Chat identifiers are UUID database identifiers, not local UI
session keys; the streaming route verifies requested chat ownership before model
invocation so persistence, observability, and AI-credit deduction stay coupled.
Web Chat and Live modes
The web dashboard presents Chat and Live as one assistant surface. Chat is the default and remains mounted while Live is selected so draft text is preserved. Entering Live requests microphone access and connects automatically; switching back to Chat or pressing Escape closes media and returns focus to the composer. Web Live access is credit-gated on every product tier./api/v1/live/token
reserves the active Chat credit source and returns a single-use Gemini token
that expires after five minutes. The browser reports cumulative provider usage
to /api/v1/live/usage; private database functions reject regressing snapshots,
price each modality against the effective Gemini rate, and release unused held
credits when the session closes or expires. Keep provider prices versioned so
historical transactions remain auditable when Google changes its rates.
Verification
For mobile-only live-mode changes, the required verification path is:- Update both ARB files when live-mode copy changes.
- Run
flutter gen-l10n. - Run
bun check:mobile.