Skip to content
Merged
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
8 changes: 2 additions & 6 deletions src/a2a/server/agent_execution/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ def context_id(self) -> str | None:
@property
def configuration(self) -> MessageSendConfiguration | None:
"""The `MessageSendConfiguration` from the request, if available."""
if not self._params:
return None
return self._params.configuration
return self._params.configuration if self._params else None

@property
def call_context(self) -> ServerCallContext | None:
Expand All @@ -139,9 +137,7 @@ def call_context(self) -> ServerCallContext | None:
@property
def metadata(self) -> dict[str, Any]:
"""Metadata associated with the request, if available."""
if not self._params:
return {}
return self._params.metadata or {}
return self._params.metadata or {} if self._params else {}

def add_activated_extension(self, uri: str) -> None:
"""Add an extension to the set of activated extensions for this request.
Expand Down
Loading