fix: 添加Serde序列化支持以修复Tauri IPC错误
- 为 comfyui_sdk::ValidationResult 和 ValidationError 添加序列化支持 - 为 ConfigStats 和 Environment 类型添加序列化支持 - 为 ExecutionStats、MonitorStats、CacheStats 添加序列化支持 - 修复 Tauri 命令返回类型不满足 IpcResponse trait 的问题
This commit is contained in:
parent
8223061aea
commit
eb81f106dd
|
|
@ -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>,
|
||||
|
|
|
|||
|
|
@ -368,7 +368,7 @@ impl ExecutionEngine {
|
|||
}
|
||||
|
||||
/// 执行统计信息
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
pub struct ExecutionStats {
|
||||
pub running_count: usize,
|
||||
pub running_executions: Vec<String>,
|
||||
|
|
|
|||
|
|
@ -444,7 +444,7 @@ impl RealtimeMonitor {
|
|||
}
|
||||
|
||||
/// 监控统计信息
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
pub struct MonitorStats {
|
||||
pub is_running: bool,
|
||||
pub websocket_connected: bool,
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ impl TemplateEngine {
|
|||
}
|
||||
|
||||
/// 缓存统计信息
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
pub struct CacheStats {
|
||||
pub cached_templates: usize,
|
||||
pub cache_keys: Vec<String>,
|
||||
|
|
|
|||
Loading…
Reference in New Issue