refactor: replace image sub-agent with direct tool calling

This commit is contained in:
loveuer committed 2026-11-18 11:39:15 +08:00
1 parent 975352c7d6
commit fd3dcbe104
11 files changed
+108 -180

No files matched your search

+2 -2
View File
@@ -100,12 +100,12 @@ func TestDefaultImageCapability(t *testing.T) {
}
hasImage := false
for _, tool := range request.Tools {
if tool.Function.Name == imageAgentName {
if tool.Function.Name == "generate_image" {
hasImage = true
}
}
if hasImage != enabled {
t.Errorf("生图 Agent 注册状态 = %v,期望 %v", hasImage, enabled)
t.Errorf("生图工具 注册状态 = %v,期望 %v", hasImage, enabled)
}
if enabled && !strings.Contains(request.Messages[0].Content.(string), "用户只询问能否生图") {
t.Error("应区分能力问答与实际生图请求")