优化: 工具调用标识类型安全加固
This commit is contained in:
@@ -75,9 +75,11 @@ pub async fn restore_pending_approvals(state: &AppState) {
|
||||
}
|
||||
}
|
||||
session.pending_approvals.insert(
|
||||
rec.tool_call_id.clone(),
|
||||
// ToolCallId → String(AiSession pending_approvals 是 String HashMap,
|
||||
// 与 LLM provider draft.id 同形直接比较;DB 边界已 newtype 防误传)
|
||||
rec.tool_call_id.to_string(),
|
||||
PendingApproval {
|
||||
tool_call_id: rec.tool_call_id,
|
||||
tool_call_id: rec.tool_call_id.to_string(),
|
||||
tool_name: rec.tool_name,
|
||||
arguments: args,
|
||||
conversation_id: rec.conversation_id,
|
||||
|
||||
Reference in New Issue
Block a user