fixed injection watcher
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user