fix(quick-qa): distinguish web and knowledge base retrieval in pipeline UI

Emit search_source metadata from RAG progress events so quick-answer steps,
summaries, and IM labels no longer mislabel web-only results as knowledge base search.
This commit is contained in:
wizardchen
2026-07-07 18:12:28 +08:00
committed by lyingbug
parent 77cf6a5789
commit 45eab4a95f
15 changed files with 402 additions and 35 deletions
+11
View File
@@ -81,6 +81,17 @@ func TestFormatIMRagPipelineLine_searchWithQuery(t *testing.T) {
}
}
func TestFormatIMRagPipelineLine_webSearchWithQuery(t *testing.T) {
line := FormatIMRagPipelineLine(IMToolStep{
ToolName: "knowledge_search",
Pending: true,
Arguments: map[string]any{"query": "任素汐演唱会", "search_source": "web"},
})
if line != "正在检索网络:「任素汐演唱会」" {
t.Fatalf("line = %q", line)
}
}
func TestIMGetQueryText_joinsUniqueQueries(t *testing.T) {
got := imGetQueryText(map[string]any{
"query": "foo",