Refactor: use native st.expander for folding turns, optimize stream trigger, and adjust window width

This commit is contained in:
Liang Jiaqing
2026-04-03 11:47:07 +08:00
parent 5bc763d319
commit 4e2b806917
3 changed files with 39 additions and 20 deletions

View File

@@ -127,7 +127,7 @@ class GeneraticAgent:
for chunk in gen:
if self.stop_sig: break
full_resp += chunk
if len(full_resp) - last_pos > 50:
if len(full_resp) - last_pos > 50 or 'LLM Running' in chunk:
display_queue.put({'next': full_resp[last_pos:] if self.inc_out else full_resp, 'source': source})
last_pos = len(full_resp)
if self.inc_out and last_pos < len(full_resp): display_queue.put({'next': full_resp[last_pos:], 'source': source})