From 740f26523720cd5515efda5fbc3ae2254ad525ca Mon Sep 17 00:00:00 2001 From: ViperEkura <3081035982@qq.com> Date: Sat, 25 Apr 2026 16:58:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luxx/services/agentic_loop.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/luxx/services/agentic_loop.py b/luxx/services/agentic_loop.py index 324a888..92d55bb 100644 --- a/luxx/services/agentic_loop.py +++ b/luxx/services/agentic_loop.py @@ -155,12 +155,14 @@ class AgenticLoop: if 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)) ctx.finalize_step() if 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)) ctx.finalize_step()