fix: restore stop signal detection broken by render_segments cache optimization

- stapp.py: add st.empty() after render_segments to force Streamlit StopException check on every iteration (incl. heartbeat)
- agentmain.py: fix nround type check, fix timeout comment
This commit is contained in:
Liang Jiaqing
2026-04-11 16:25:19 +08:00
parent de8adf76a9
commit 3531146792
3 changed files with 4 additions and 3 deletions

2
ga.py
View File

@@ -251,7 +251,7 @@ def smart_format(data, max_str_len=100, omit_str=' ... '):
class GenericAgentHandler(BaseHandler):
'''Generic Agent 工具库,包含多种工具的实现。工具函数自动加上了 do_ 前缀。实际工具名没有前缀。'''
def __init__(self, parent, last_history=None, cwd='./'):
def __init__(self, parent, last_history=None, cwd='./temp'):
self.parent = parent
self.working = {}
self.cwd = cwd; self.current_turn = 0