- Redirect sys.stdout to stderr in Python sidecar so library print() calls don't corrupt the JSON-line IPC stream - Save real stdout fd for exclusive IPC use via init_ipc() - Skip non-JSON lines in Rust reader instead of failing with parse error - Set Tauri window background color to match dark theme (#0a0a23) - Add inline dark background on html/body to prevent white flash - Use Svelte tick() to ensure progress overlay renders before invoke - Improve ProgressOverlay with spinner, better styling, z-index 9999 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
54 lines
1.7 KiB
Rust
54 lines
1.7 KiB
Rust
pub mod commands;
|
|
pub mod db;
|
|
pub mod llama;
|
|
pub mod sidecar;
|
|
pub mod state;
|
|
|
|
use tauri::window::Color;
|
|
use tauri::Manager;
|
|
|
|
use commands::ai::{ai_chat, ai_configure, ai_list_providers};
|
|
use commands::export::export_transcript;
|
|
use commands::project::{create_project, get_project, list_projects};
|
|
use commands::settings::{load_settings, save_settings};
|
|
use commands::system::{get_data_dir, llama_list_models, llama_start, llama_status, llama_stop};
|
|
use commands::transcribe::{run_pipeline, transcribe_file};
|
|
use state::AppState;
|
|
|
|
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
|
pub fn run() {
|
|
let app_state = AppState::new().expect("Failed to initialize app state");
|
|
|
|
tauri::Builder::default()
|
|
.plugin(tauri_plugin_opener::init())
|
|
.plugin(tauri_plugin_dialog::init())
|
|
.manage(app_state)
|
|
.setup(|app| {
|
|
// Set the webview background to match the app's dark theme
|
|
if let Some(window) = app.get_webview_window("main") {
|
|
let _ = window.set_background_color(Some(Color(10, 10, 35, 255)));
|
|
}
|
|
Ok(())
|
|
})
|
|
.invoke_handler(tauri::generate_handler![
|
|
create_project,
|
|
get_project,
|
|
list_projects,
|
|
transcribe_file,
|
|
run_pipeline,
|
|
export_transcript,
|
|
ai_chat,
|
|
ai_list_providers,
|
|
ai_configure,
|
|
llama_start,
|
|
llama_stop,
|
|
llama_status,
|
|
llama_list_models,
|
|
get_data_dir,
|
|
load_settings,
|
|
save_settings,
|
|
])
|
|
.run(tauri::generate_context!())
|
|
.expect("error while running tauri application");
|
|
}
|