Tweak flushing

This commit is contained in:
Cyber MacGeddon 2025-12-04 20:40:39 +00:00
parent f511b8db50
commit a89005768b

View file

@ -161,6 +161,11 @@ def question(
# Output the chunk
if current_outputter:
current_outputter.output(content)
# Flush word buffer after each chunk to avoid delay
if current_outputter.word_buffer:
print(current_outputter.word_buffer, end="", flush=True)
current_outputter.column += len(current_outputter.word_buffer)
current_outputter.word_buffer = ""
elif chunk_type == "final-answer":
print(content, end="", flush=True)