fix(im): address stream display review feedback

Wait for agent complete without a short timeout, unify Telegram stream
parse mode, remove obsolete FinalAnswer handling, isolate per-section
newline tracking, add lifecycle tests, and update IM streaming docs.
This commit is contained in:
wizardchen
2026-06-23 23:45:47 +08:00
committed by lyingbug
parent c3b036cb00
commit da3d65c6f2
8 changed files with 284 additions and 84 deletions
+1 -3
View File
@@ -55,7 +55,6 @@ type IMStreamParts struct {
Mode IMStreamMode
// Quick-QA (RagPipelineProgress on Web):
PipelineInner string // non-tool pipeline narrative (if any)
PipelineToolSteps []IMToolStep // query_understand / knowledge_search rows
ReasoningInner string // model reasoning_content — separate "思考" section
@@ -73,8 +72,7 @@ func agentThinkContent(parts IMStreamParts) string {
}
func quickQAPipelineContent(parts IMStreamParts) string {
toolLines := renderIMToolSteps(parts.PipelineToolSteps, FormatIMRagPipelineLine)
return mergeIMNarrativeAndTools(parts.PipelineInner, toolLines)
return renderIMToolSteps(parts.PipelineToolSteps, FormatIMRagPipelineLine)
}
// RAGThinkingStyle matches Web RagPipelineProgress thinking row (agent.think).