fix: 添加Serde序列化支持以修复Tauri IPC错误

- 为 comfyui_sdk::ValidationResult 和 ValidationError 添加序列化支持
- 为 ConfigStats 和 Environment 类型添加序列化支持
- 为 ExecutionStats、MonitorStats、CacheStats 添加序列化支持
- 修复 Tauri 命令返回类型不满足 IpcResponse trait 的问题
This commit is contained in:
imeepos
2025-08-08 15:02:41 +08:00
parent 8223061aea
commit eb81f106dd
4 changed files with 5 additions and 5 deletions

View File

@@ -10,7 +10,7 @@ use crate::config::{AppConfig, ComfyUISettings};
use crate::data::models::comfyui::{ComfyUIConfig, ValidationResult};
/// 环境类型
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub enum Environment {
/// 开发环境
Development,
@@ -285,7 +285,7 @@ impl ConfigManager {
}
/// 配置统计信息
#[derive(Debug, Clone)]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct ConfigStats {
pub environment: Environment,
pub config_path: Option<String>,