Phase 2 of the rebrand cascade. Renames all 9 workspace crates from magnotia-* to lumotia-* plus the src-tauri binary crate name: - magnotia-ai-formatting -> lumotia-ai-formatting - magnotia-audio -> lumotia-audio - magnotia-cloud-providers -> lumotia-cloud-providers - magnotia-core -> lumotia-core - magnotia-hotkey -> lumotia-hotkey - magnotia-llm -> lumotia-llm - magnotia-mcp -> lumotia-mcp - magnotia-storage -> lumotia-storage - magnotia-transcription -> lumotia-transcription - magnotia -> lumotia (src-tauri binary) - magnotia_lib -> lumotia_lib (src-tauri lib target) Crate directories (crates/audio/ etc.) stay as-is; only the Cargo.toml [package] name field changes plus all consumer module imports (magnotia_core -> lumotia_core, etc.). Remaining magnotia_* references at this point are intentional and scoped to later phases: tracing targets (Phase 4), DB setting keys magnotia_preferences/magnotia_history (Phase 5). cargo build --workspace passes. cargo test --workspace: 330 pass, 0 fail. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
51 lines
1.4 KiB
Rust
51 lines
1.4 KiB
Rust
//! Meeting auto-capture — the single-signal variant.
|
|
//!
|
|
//! The frontend polls `detect_meeting_processes` on an interval with the
|
|
//! user's app patterns. On a positive hit it surfaces a non-modal toast
|
|
//! that reminds the user to start recording with their hotkey. We do not
|
|
//! start recording from this signal — the user decides.
|
|
|
|
use std::sync::Mutex;
|
|
|
|
use lumotia_core::process_watch::{self, ProcessLister};
|
|
|
|
/// Tauri-managed state for the meeting poller. Holds a long-lived
|
|
/// `ProcessLister` so each poll refreshes the existing `sysinfo::System`
|
|
/// in place instead of allocating a fresh one — the previous implementation
|
|
/// rebuilt the process table from scratch every 15 s.
|
|
pub struct MeetingState {
|
|
lister: Mutex<ProcessLister>,
|
|
}
|
|
|
|
impl MeetingState {
|
|
pub fn new() -> Self {
|
|
Self {
|
|
lister: Mutex::new(ProcessLister::new()),
|
|
}
|
|
}
|
|
}
|
|
|
|
impl Default for MeetingState {
|
|
fn default() -> Self {
|
|
Self::new()
|
|
}
|
|
}
|
|
|
|
#[tauri::command]
|
|
pub fn detect_meeting_processes(
|
|
state: tauri::State<'_, MeetingState>,
|
|
patterns: Vec<String>,
|
|
) -> Result<Vec<String>, String> {
|
|
if patterns.is_empty() {
|
|
return Ok(Vec::new());
|
|
}
|
|
let processes = {
|
|
let mut lister = state
|
|
.lister
|
|
.lock()
|
|
.map_err(|e| format!("MeetingState lister poisoned: {e}"))?;
|
|
lister.snapshot()
|
|
};
|
|
Ok(process_watch::match_meeting_patterns(&processes, &patterns))
|
|
}
|