43 lines
1.2 KiB
Rust
43 lines
1.2 KiB
Rust
pub mod app_state;
|
|
pub mod audio;
|
|
pub mod error;
|
|
pub mod injection;
|
|
pub mod diagnostics;
|
|
pub mod models;
|
|
pub mod settings;
|
|
pub mod shortcuts;
|
|
pub mod transcription;
|
|
pub mod tray;
|
|
pub mod ui_commands;
|
|
|
|
use app_state::ManagedAppState;
|
|
|
|
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
|
pub fn run() {
|
|
tauri::Builder::default()
|
|
.plugin(tauri_plugin_opener::init())
|
|
.plugin(shortcuts::plugin())
|
|
.setup(|app| {
|
|
tray::setup(app)?;
|
|
shortcuts::setup(app)?;
|
|
Ok(())
|
|
})
|
|
.manage(ManagedAppState::default())
|
|
.invoke_handler(tauri::generate_handler![
|
|
ui_commands::get_app_snapshot,
|
|
ui_commands::start_recording,
|
|
ui_commands::stop_recording_and_transcribe,
|
|
ui_commands::copy_ready_text,
|
|
ui_commands::request_insert_text,
|
|
ui_commands::list_models,
|
|
ui_commands::download_default_model_command,
|
|
ui_commands::get_settings,
|
|
ui_commands::save_settings
|
|
])
|
|
.run(tauri::generate_context!())
|
|
.unwrap_or_else(|error| {
|
|
eprintln!("erro ao executar o aplicativo Tauri: {error}");
|
|
std::process::exit(1);
|
|
});
|
|
}
|