diff --git a/openless-all/app/src-tauri/Cargo.lock b/openless-all/app/src-tauri/Cargo.lock index b2b0a751..779ccff0 100644 --- a/openless-all/app/src-tauri/Cargo.lock +++ b/openless-all/app/src-tauri/Cargo.lock @@ -3965,6 +3965,7 @@ dependencies = [ "tauri-nspanel", "tauri-plugin-autostart", "tauri-plugin-dialog", + "tauri-plugin-fs", "tauri-plugin-shell", "tauri-plugin-single-instance", "tauri-plugin-updater", diff --git a/openless-all/app/src-tauri/Cargo.toml b/openless-all/app/src-tauri/Cargo.toml index 62ee2c64..760cfc39 100644 --- a/openless-all/app/src-tauri/Cargo.toml +++ b/openless-all/app/src-tauri/Cargo.toml @@ -59,6 +59,9 @@ ferrous-opencc = "0.4" # Audio capture — shared across desktop and mobile. cpal = "0.15" +[target.'cfg(any(target_os = "android", target_os = "ios"))'.dependencies] +tauri-plugin-fs = "2.5.1" + # Desktop-only plugins, hotkey/insertion helpers, and tray-icon (not built for mobile). [target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies] reqwest = { version = "0.12", default-features = false, features = ["native-tls"] } diff --git a/openless-all/app/src-tauri/src/commands/history.rs b/openless-all/app/src-tauri/src/commands/history.rs index 642d4cf2..d48aa2e6 100644 --- a/openless-all/app/src-tauri/src/commands/history.rs +++ b/openless-all/app/src-tauri/src/commands/history.rs @@ -1,4 +1,5 @@ use super::*; +use tauri_plugin_dialog::{DialogExt, FilePath}; #[tauri::command] pub fn list_history(coord: CoordinatorState<'_>) -> Result, String> { @@ -37,28 +38,164 @@ pub fn get_activity_stats(coord: CoordinatorState<'_>) -> Vec { /// session_id 在仓库内由 `Uuid::new_v4()` 生成 (`dictation.rs:1531`),前端只会回传 /// 自己列出的合法 id,但 IPC = boundary,按 boundary 规则严格校验。 /// -/// async fs:单条 5 分钟 wav 约 9.6MB,同步 `std::fs::read` 会阻塞 Tauri IPC 主循环。 -/// 改 `tokio::fs::read` 后让出线程给其它 IPC。 +/// 读取录音文件的 data URL(base64),前端 `