agent: lumotia-rebrand — rust workspace crates magnotia-* -> lumotia-*
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>
This commit is contained in:
@@ -9,9 +9,9 @@ use crate::commands::build_initial_prompt;
|
||||
use crate::commands::models::{default_model_id_for_engine, ensure_model_loaded};
|
||||
use crate::commands::security::ensure_main_window;
|
||||
use crate::AppState;
|
||||
use magnotia_ai_formatting::{post_process_segments, FormatMode, PostProcessOptions};
|
||||
use magnotia_core::constants::WHISPER_SAMPLE_RATE;
|
||||
use magnotia_core::types::{AudioSamples, Segment, Transcript, TranscriptionOptions};
|
||||
use lumotia_ai_formatting::{post_process_segments, FormatMode, PostProcessOptions};
|
||||
use lumotia_core::constants::WHISPER_SAMPLE_RATE;
|
||||
use lumotia_core::types::{AudioSamples, Segment, Transcript, TranscriptionOptions};
|
||||
|
||||
const PARAKEET_CHUNK_THRESHOLD_SECS: usize = 18;
|
||||
const PARAKEET_CHUNK_SECS: usize = 15;
|
||||
@@ -29,7 +29,7 @@ struct ChunkingStrategy {
|
||||
fn pick_engine(
|
||||
state: &AppState,
|
||||
engine: &str,
|
||||
) -> Result<Arc<magnotia_transcription::LocalEngine>, String> {
|
||||
) -> Result<Arc<lumotia_transcription::LocalEngine>, String> {
|
||||
match engine {
|
||||
"whisper" => Ok(state.whisper_engine.clone()),
|
||||
"parakeet" => Ok(state.parakeet_engine.clone()),
|
||||
@@ -70,11 +70,11 @@ fn trim_overlap_segments(segments: &mut Vec<Segment>, trim_before_secs: f64) {
|
||||
}
|
||||
|
||||
fn transcribe_samples_sync(
|
||||
engine: Arc<magnotia_transcription::LocalEngine>,
|
||||
engine: Arc<lumotia_transcription::LocalEngine>,
|
||||
engine_name: &str,
|
||||
samples: Vec<f32>,
|
||||
options: TranscriptionOptions,
|
||||
) -> Result<magnotia_transcription::TimedTranscript, String> {
|
||||
) -> Result<lumotia_transcription::TimedTranscript, String> {
|
||||
let Some(strategy) = pick_chunking_strategy(engine_name, samples.len()) else {
|
||||
let audio = AudioSamples::mono_16khz(samples);
|
||||
return engine
|
||||
@@ -128,7 +128,7 @@ fn transcribe_samples_sync(
|
||||
chunk_start = chunk_end.saturating_sub(strategy.overlap_samples);
|
||||
}
|
||||
|
||||
Ok(magnotia_transcription::TimedTranscript {
|
||||
Ok(lumotia_transcription::TimedTranscript {
|
||||
transcript: Transcript::new(
|
||||
all_segments,
|
||||
options.language.clone().unwrap_or_else(|| "en".to_string()),
|
||||
@@ -165,15 +165,15 @@ pub async fn transcribe_file(
|
||||
) -> Result<serde_json::Value, String> {
|
||||
ensure_main_window(&window)?;
|
||||
let resolved_profile_id =
|
||||
profile_id.unwrap_or_else(|| magnotia_storage::DEFAULT_PROFILE_ID.to_string());
|
||||
profile_id.unwrap_or_else(|| lumotia_storage::DEFAULT_PROFILE_ID.to_string());
|
||||
|
||||
let profile = magnotia_storage::database::get_profile(&state.db, &resolved_profile_id)
|
||||
let profile = lumotia_storage::database::get_profile(&state.db, &resolved_profile_id)
|
||||
.await
|
||||
.map_err(|e| e.to_string())?
|
||||
.ok_or_else(|| format!("Profile {resolved_profile_id} not found"))?;
|
||||
|
||||
let profile_terms: Vec<String> =
|
||||
magnotia_storage::database::list_profile_terms(&state.db, &resolved_profile_id)
|
||||
lumotia_storage::database::list_profile_terms(&state.db, &resolved_profile_id)
|
||||
.await
|
||||
.map_err(|e| e.to_string())?
|
||||
.into_iter()
|
||||
@@ -199,7 +199,7 @@ pub async fn transcribe_file(
|
||||
let engine_name_for_worker = engine_name.clone();
|
||||
let path_for_probe = Path::new(&path);
|
||||
if let Some(duration_secs) =
|
||||
magnotia_audio::probe_audio_duration_secs(path_for_probe).map_err(|e| e.to_string())?
|
||||
lumotia_audio::probe_audio_duration_secs(path_for_probe).map_err(|e| e.to_string())?
|
||||
{
|
||||
if duration_secs > MAX_FILE_TRANSCRIPTION_SECS {
|
||||
return Err(format!(
|
||||
@@ -210,12 +210,12 @@ pub async fn transcribe_file(
|
||||
}
|
||||
|
||||
let timed = tokio::task::spawn_blocking(move || {
|
||||
let audio = magnotia_audio::decode_audio_file_limited(
|
||||
let audio = lumotia_audio::decode_audio_file_limited(
|
||||
Path::new(&path),
|
||||
Some(MAX_FILE_TRANSCRIPTION_SECS),
|
||||
)
|
||||
.map_err(|e| e.to_string())?;
|
||||
let resampled = magnotia_audio::resample_to_16khz(&audio).map_err(|e| e.to_string())?;
|
||||
let resampled = lumotia_audio::resample_to_16khz(&audio).map_err(|e| e.to_string())?;
|
||||
transcribe_samples_sync(
|
||||
engine,
|
||||
&engine_name_for_worker,
|
||||
|
||||
Reference in New Issue
Block a user