fix: 修复重复显示的bug
This commit is contained in:
parent
3e5c76cd83
commit
740f265237
|
|
@ -155,11 +155,13 @@ class AgenticLoop:
|
|||
|
||||
if thinking:
|
||||
ctx.full_thinking += thinking
|
||||
if ctx.current_step_type != StepType.THINKING:
|
||||
ctx.start_step(StepType.THINKING)
|
||||
events.append(StreamRenderer.render_thinking(ctx))
|
||||
ctx.finalize_step()
|
||||
if text:
|
||||
ctx.full_content += text
|
||||
if ctx.current_step_type != StepType.TEXT:
|
||||
ctx.start_step(StepType.TEXT)
|
||||
events.append(StreamRenderer.render_text(ctx))
|
||||
ctx.finalize_step()
|
||||
|
|
|
|||
Loading…
Reference in New Issue