Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/utils/agents/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Agent helpers."""
5 changes: 4 additions & 1 deletion src/utils/agents/streaming.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Agent streaming helpers for the streaming_query flow."""

# pylint: disable=R0913,R0914, R0917

from __future__ import annotations

import asyncio
Expand Down Expand Up @@ -403,7 +405,7 @@ def _process_token(


@singledispatch
def dispatch_stream_event(
def dispatch_stream_event( # pylint: disable=useless-return
event: AgentDispatchEvent,
_state: AgentTurnAccumulator,
) -> Optional[StreamEventPayload]:
Expand All @@ -417,6 +419,7 @@ def dispatch_stream_event(
None when the event does not map to an SSE payload.
"""
logger.debug("Ignoring event kind=%s", event.event_kind)

return None


Expand Down
4 changes: 2 additions & 2 deletions src/utils/agents/tool_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def summarize_native_tool_call(
type="mcp_call",
)
case _:
logger.warning(f"Unknown tool name: {part.tool_name}")
logger.warning("Unknown tool name: %s", part.tool_name)
return None


Expand Down Expand Up @@ -184,7 +184,7 @@ def process_native_tool_result(
case tool_name if tool_name.startswith(_MCP_SERVER_TOOL_PREFIX):
tool_result = summarize_mcp_tool_result(part, state.tool_round)
case _:
logger.warning(f"Unknown tool name: {part.tool_name}")
logger.warning("Unknown tool name: %s", part.tool_name)
return None

state.emitted_tool_result_ids.add(tool_result.id)
Expand Down
Loading