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