fixed injection watcher

This commit is contained in:
2026-06-11 07:18:19 +03:00
parent 827f9016cd
commit 06e09cd728
7 changed files with 93 additions and 84 deletions
+5 -1
View File
@@ -234,6 +234,7 @@ class ChatService:
reasoning_json=reasoning_json,
)
round_notices: list[str] = []
for tool_call in tool_calls:
fn = tool_call["function"]
args = LLMClient.parse_tool_arguments(fn.get("arguments", ""))
@@ -251,7 +252,7 @@ class ChatService:
notice = format_tool_notice(fn["name"], result)
if notice:
self._save_message(session_id, "notice", notice)
yield self._sse("notice", {"content": notice})
round_notices.append(notice)
if fn["name"] in POMODORO_TOOL_NAMES:
yield self._sse(
@@ -259,6 +260,9 @@ class ChatService:
{"name": fn["name"], "result": json.loads(result)},
)
for notice in round_notices:
yield self._sse("notice", {"content": notice})
continue
final_content = "".join(content_parts).strip()