Handle __status tokens for instant thinking box feedback
__status tokens show immediately in the thinking box but do not accumulate in thinking_acc. When real content (__meta/__thinking) arrives it overwrites the status message naturally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -116,6 +116,12 @@ async def respond(message, history, show_thinking, user_id, use_tts, run_ids):
|
|||||||
collected_run_id = run_id
|
collected_run_id = run_id
|
||||||
break
|
break
|
||||||
|
|
||||||
|
# 즉시 상태 표시 — thinking_acc에 누적하지 않음 (임시 메시지)
|
||||||
|
if isinstance(token, dict) and "__status" in token:
|
||||||
|
status_text = (thinking_acc + "\n\n" + token["__status"]) if thinking_acc else token["__status"]
|
||||||
|
yield history, "", None, run_ids, _thinking_html(status_text)
|
||||||
|
continue
|
||||||
|
|
||||||
# 사고 과정(LLM thinking) — 박스에 추가
|
# 사고 과정(LLM thinking) — 박스에 추가
|
||||||
if isinstance(token, dict) and "__thinking" in token:
|
if isinstance(token, dict) and "__thinking" in token:
|
||||||
thinking_acc += token["__thinking"]
|
thinking_acc += token["__thinking"]
|
||||||
|
|||||||
Reference in New Issue
Block a user