Skip to content

Commit 2e0ee03

Browse files
authored
Merge branch 'main' into bugfix-adk-sessions
2 parents 729718e + 6aacb21 commit 2e0ee03

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/lightspeed_agent/api/a2a/logging_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ async def before_run_callback(
5050
logger.info(
5151
"Agent run started (invocation_id=%s, agent=%s)",
5252
invocation_context.invocation_id,
53-
invocation_context.agent_name, # type: ignore[attr-defined]
53+
invocation_context.agent.name,
5454
)
5555
return None
5656

tests/test_logging_plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def plugin(self):
4444
async def test_before_run_logs_info(self, plugin, caplog):
4545
ctx = MagicMock()
4646
ctx.invocation_id = "inv-123"
47-
ctx.agent_name = "test_agent"
47+
ctx.agent = MagicMock(name="test_agent")
4848

4949
with caplog.at_level(logging.INFO):
5050
result = await plugin.before_run_callback(invocation_context=ctx)
@@ -270,7 +270,7 @@ def plugin(self):
270270
async def test_all_callbacks_return_none(self, plugin):
271271
ctx = MagicMock()
272272
ctx.invocation_id = "inv-1"
273-
ctx.agent_name = "agent"
273+
ctx.agent = MagicMock(name="agent")
274274

275275
tool = MagicMock()
276276
tool.name = "test_tool"

0 commit comments

Comments
 (0)