Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion desktop/scripts/check-file-sizes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,10 @@ const overrides = new Map([
// transition lock doc broadened to cover all protected-PID transitions, and
// clear_agent_session_caches (per-pubkey retain) added alongside the
// per-key clear. Load-bearing identity-contract change; queued to split.
["src-tauri/src/app_state.rs", 1081],
// +4 (1081 -> 1085): message read-aloud experiment — the app-scoped
// MessageTtsState field (doc + init) added beside huddle_state. The state
// itself lives in message_tts.rs; only the wiring lands here.
["src-tauri/src/app_state.rs", 1085],
// multi-slot splitting + no-op suppression (#1309): the ReadStateManager
// class grew from ~700 lines to ~1019 with the addition of
// splitContextsIntoBudgetedSlots (pure fn + 5 tests), publishSplitSlots,
Expand Down
4 changes: 4 additions & 0 deletions desktop/src-tauri/src/app_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ pub struct AppState {
pub channel_templates_store_lock: Mutex<()>,
pub managed_agent_processes: Mutex<HashMap<ManagedAgentRuntimeKey, ManagedAgentPairRuntime>>,
pub huddle_state: Mutex<HuddleState>,
/// App-scoped message read-aloud state (independent of huddle speech).
/// See `message_tts.rs` for the lifecycle contract.
pub message_tts: crate::message_tts::MessageTtsState,
/// Tauri app handle — stored after setup so huddle commands can emit
/// `huddle-state-changed` events without needing the handle threaded
/// through every call site.
Expand Down Expand Up @@ -211,6 +214,7 @@ pub fn build_app_state() -> AppState {
managed_agent_processes: Mutex::new(HashMap::new()),
session_config_cache: Mutex::new(HashMap::new()),
huddle_state: Mutex::new(HuddleState::default()),
message_tts: crate::message_tts::MessageTtsState::default(),
app_handle: Mutex::new(None),
audio_output_device: Mutex::new(None),
media_proxy_port: AtomicU16::new(0),
Expand Down
4 changes: 4 additions & 0 deletions desktop/src-tauri/src/huddle/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ pub async fn start_huddle(
hs.phase = HuddlePhase::Creating;
hs.parent_channel_id = Some(parent_channel_id.clone());
}
// The huddle owns the audio device now — end any message read-aloud.
crate::message_tts::stop_message_playback(&state);

let ephemeral_uuid = Uuid::new_v4();
let ephemeral_channel_id = ephemeral_uuid.to_string();
Expand Down Expand Up @@ -357,6 +359,8 @@ pub async fn join_huddle(
hs.parent_channel_id = Some(parent_channel_id.clone());
hs.ephemeral_channel_id = Some(ephemeral_channel_id.clone());
}
// The huddle owns the audio device now — end any message read-aloud.
crate::message_tts::stop_message_playback(&state);

// Seed participant list with own pubkey as a fallback until relay responds.
let own_pubkey = state
Expand Down
3 changes: 3 additions & 0 deletions desktop/src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ mod media_proxy;
mod mesh_llm;
#[cfg(not(feature = "mesh-llm"))]
mod mesh_llm_stubs;
mod message_tts;
mod migration;
#[cfg(test)]
mod model_tests;
Expand Down Expand Up @@ -857,6 +858,8 @@ pub fn run() {
get_model_status,
set_tts_enabled,
speak_agent_message,
message_tts::speak_chat_message,
message_tts::stop_chat_message_speech,
add_agent_to_huddle,
check_pipeline_hotstart,
confirm_huddle_active,
Expand Down
Loading
Loading