优化: 工具调用标识类型安全加固
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//! 数据模型定义 — 与数据库表对应的 Rust 结构体
|
||||
|
||||
use df_ai_core::model::{deserialize_model_configs, ModelConfig};
|
||||
use df_types::types::{IdeaStatus, LinkType, NodeType, ProjectStatus, TaskStatus};
|
||||
use df_types::types::{IdeaStatus, LinkType, NodeType, ProjectStatus, TaskStatus, ToolCallId};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
// ============================================================
|
||||
@@ -383,7 +383,9 @@ pub struct AiToolExecutionRecord {
|
||||
/// 升级后,audit 写入从 ContextManager 取当前 assistant 消息 id 填入。
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub message_id: Option<String>,
|
||||
pub tool_call_id: String,
|
||||
/// 工具调用关联键(跨 tool_calls / pending_approvals / ai_tool_executions)。
|
||||
/// branded newtype 防把 execution_id / conversation_id 等同形 String 误传。
|
||||
pub tool_call_id: ToolCallId,
|
||||
pub tool_name: String,
|
||||
pub arguments: String,
|
||||
pub result: Option<String>,
|
||||
|
||||
Reference in New Issue
Block a user