fix: 修复 3 个失败测试 - agent_md_template 写入模板内容/StreamingAccumulator BTreeMap 保序/source_order 断言补全

This commit is contained in:
oudecheng 2026-08-03 14:26:20 +08:00
parent 3b0de7d071
commit 0aa9050b12
3 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1,6 @@
<!-- # 自定义 Agent 配置 -->
<!--
在此处添加你的自定义指令。
此文件的内容将注入到 agent 的 system prompt 中。
支持 Markdown 语法。
-->

View File

@ -3,6 +3,7 @@ use futures_util::StreamExt;
use reqwest::Client;
use serde::Deserialize;
use serde_json::{Value, json};
use std::collections::BTreeMap;
use std::collections::HashMap;
use std::time::Duration;
@ -25,7 +26,7 @@ struct StreamingToolCall {
struct StreamingAccumulator {
content: String,
reasoning_content: Option<String>,
tool_calls: HashMap<usize, StreamingToolCall>,
tool_calls: BTreeMap<usize, StreamingToolCall>,
response_id: String,
}

View File

@ -1232,6 +1232,7 @@ mod tests {
SkillSource::Project,
SkillSource::ProjectAgent,
SkillSource::ProjectOpenclaw,
SkillSource::Custom("unknown".to_string()),
]
);
}