feat(driver-store): add storage usage breakdown

This commit is contained in:
t8y2 committed 2026-05-22 18:05:59 +08:00
1 parent b2324aea29
commit d7dc4c959a
9 files changed
+231 -25

No files matched your search

+7 -1
View File
@@ -3,7 +3,8 @@ use std::sync::Arc;
use tauri::{Emitter, State};
use dbx_core::agent_manager::{
AgentDriverInfo, AgentManager, InstalledDriver, JavaRuntimeConfig, JavaRuntimeMode, DEFAULT_JRE_KEY,
AgentDriverInfo, AgentManager, DriverStoreUsage, InstalledDriver, JavaRuntimeConfig, JavaRuntimeMode,
DEFAULT_JRE_KEY,
};
use dbx_core::agent_service::{
build_agent_list, download_temp_path, fetch_registry, find_local_agent_jar, github_url_to_r2_path,
@@ -23,6 +24,11 @@ pub async fn list_installed_agents(state: State<'_, Arc<AppState>>) -> Result<Ve
Ok(build_agent_list(&state.agent_manager, registry.as_ref()))
}
#[tauri::command]
pub async fn get_driver_store_usage(state: State<'_, Arc<AppState>>) -> Result<DriverStoreUsage, String> {
Ok(state.agent_manager.collect_driver_store_usage(state.plugins.root_dir()))
}
#[tauri::command]
pub async fn install_agent(
app: tauri::AppHandle,