fix: print编码防崩 + 未知工具时自动重注入tool schema

This commit is contained in:
Liang Jiaqing
2026-02-16 20:15:46 +08:00
parent 32ad26f4ce
commit dbc28fbc35
3 changed files with 6 additions and 2 deletions

View File

@@ -78,6 +78,7 @@ def agent_runner_loop(client, system_prompt, user_input, handler, tools_schema,
if outcome.next_prompt is None: return {'result': 'CURRENT_TASK_DONE', 'data': outcome.data}
if outcome.should_exit: return {'result': 'EXITED', 'data': outcome.data}
if outcome.next_prompt.startswith('未知工具'): client.last_tools = ''
next_prompt = ""
if outcome.data is not None: