mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-10-22 19:52:14 +08:00
* refactor(ipc): generate bindings with Specta * fix(profile): project IPC inputs to consumed fields * fix(events): remove unused refresh payloads * fix(webdav): return only consumed backup metadata * fix(network): trim unused interface metadata * fix(sysinfo): return only displayed system fields * chore(knip): check generated runtime exports * fix(proxy): confirm runtime chain updates before UI changes * fix(clipboard): propagate proxy environment copy failures * refactor(dns): remove ignored runtime patch * refactor(core): trim unused upgrade response fields * refactor(ipc): avoid redundant response copies * refactor(proxy): clarify automatic proxy query naming * chore(tests): remove added IPC regression tests * refactor(ipc): enforce typed command boundaries * chore(contract): check generated bindings before push * refactor(ipc): remove unused proxy liveness payloads
18 lines
481 B
Rust
18 lines
481 B
Rust
use crate::core::{
|
|
notification::{self, PendingFailure},
|
|
runstate::{RUN_STATE, RunStateView},
|
|
};
|
|
|
|
/// Returns one coherent core/service snapshot instead of independently refreshed state.
|
|
#[tauri::command]
|
|
#[specta::specta]
|
|
pub async fn get_runtime_state() -> Result<RunStateView, String> {
|
|
Ok(RUN_STATE.settled().await.to_view())
|
|
}
|
|
|
|
#[tauri::command]
|
|
#[specta::specta]
|
|
pub async fn get_pending_failures() -> Vec<PendingFailure> {
|
|
notification::pending_failures()
|
|
}
|