Release 1.1: Pre-meeting models, Calendar improvements, Logs, Compact Recorder
This commit is contained in:
@@ -8,6 +8,7 @@ use tokio::time::sleep;
|
||||
mod audio_processor;
|
||||
use audio_processor::AudioProcessor;
|
||||
mod auth;
|
||||
mod email;
|
||||
|
||||
// State to hold the active recording stream
|
||||
struct AppState {
|
||||
@@ -625,9 +626,26 @@ async fn save_text_file(app: AppHandle, path: String, content: String) -> Result
|
||||
|
||||
|
||||
|
||||
#[tauri::command]
|
||||
async fn read_log_file(app: AppHandle) -> Result<String, String> {
|
||||
let log_path = app.path().app_log_dir().map_err(|e| e.to_string())?.join("hearbit-ai.log");
|
||||
if log_path.exists() {
|
||||
let content = std::fs::read_to_string(&log_path).map_err(|e| e.to_string())?;
|
||||
Ok(content)
|
||||
} else {
|
||||
Ok("No log file found yet.".to_string())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_log::Builder::default()
|
||||
.targets([
|
||||
tauri_plugin_log::Target::new(tauri_plugin_log::TargetKind::Stdout),
|
||||
tauri_plugin_log::Target::new(tauri_plugin_log::TargetKind::LogDir { file_name: Some("hearbit-ai.log".to_string()) }),
|
||||
])
|
||||
.build())
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.plugin(tauri_plugin_fs::init())
|
||||
@@ -650,7 +668,9 @@ pub fn run() {
|
||||
create_hearbit_audio_device,
|
||||
auth::start_auth_flow,
|
||||
auth::get_calendar_events,
|
||||
save_text_file
|
||||
save_text_file,
|
||||
read_log_file,
|
||||
email::send_smtp_email
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
|
||||
Reference in New Issue
Block a user