Files
DevFlow/src-tauri/src/commands/mod.rs
T
lxy 1d9c511b84 清理: 删除后端 ci_status 死命令与悬挂冲突类型
- ci_status.rs 单命令文件随前端 CIStatus 组件删除(get_commit_status 零消费)
- types.ts 删 ConflictInfo(ConflictResolver 死组件连带,全仓零引用)
- lib.rs 注册行删除随其他在途改动另行入库
2026-10-25 22:33:05 +08:00

30 lines
965 B
Rust

//! Tauri IPC 命令层 — 按业务域拆分模块
//!
//! 所有 command 统一返回 `Result<T, String>`,错误经 `to_string()` 传给前端。
pub mod ai;
pub mod events;
pub mod idea;
pub mod knowledge;
pub mod knowledge_timeline;
pub mod module;
pub mod project;
pub mod services;
pub mod settings;
pub mod task;
pub mod update;
pub mod workflow;
/// 当前时间戳(毫秒字符串)— 与 df-storage 内部的时间格式保持一致
///
/// 转发 df_types::now_millis(DRY:时间获取统一入口在此 crate,避免 commands 层与 df-storage 各写一份 SystemTime 调用)。
pub(crate) fn now_millis() -> String {
df_types::now_millis().to_string()
}
/// .map_err 错误格式化统一入口 — 当前行为零变化(仅 e.to_string()),
/// 集中收敛为后续加日志/分类/类型名等扩展留点,替代各处散落的 .map_err(|e| e.to_string())。
pub fn err_str<E: std::string::ToString>(e: E) -> String {
e.to_string()
}