Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def get_a2ui_datapart(part: Part) -> Optional[DataPart]:

def get_a2ui_agent_extension(
accepts_inline_catalogs: bool = False,
supported_catalog_ids: List[str] = [],
supported_catalog_ids: Optional[List[str]] = None,
) -> AgentExtension:
"""Creates the A2UI AgentExtension configuration.

Expand All @@ -100,6 +100,8 @@ def get_a2ui_agent_extension(
Returns:
The configured A2UI AgentExtension.
"""
if supported_catalog_ids is None:
supported_catalog_ids = []
params = {}
if accepts_inline_catalogs:
params[AGENT_EXTENSION_ACCEPTS_INLINE_CATALOGS_KEY] = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ def convert_send_a2ui_to_client_genai_part_to_a2a_part(
return []

final_parts = []
logger.info(f"Found {len(json_data)} messages. Creating individual DataParts.")
for message in json_data:
logger.info(f"Found {len(json_data)} messages. Creating individual DataParts.")
final_parts.append(create_a2ui_part(message))

return final_parts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ def _build_0_9_validator(self) -> Draft202012Validator:
# these resolve to https://a2ui.org/specification/v0_9/catalog.json.
# We must register them using these absolute URIs.
base_uri = self._catalog.s2c_schema.get("$id", BASE_SCHEMA_URL)
import os
from urllib.parse import urljoin

def get_sibling_uri(uri, filename):
return os.path.join(os.path.dirname(uri), filename)
return urljoin(uri, filename)

catalog_uri = get_sibling_uri(base_uri, "catalog.json")
common_types_uri = get_sibling_uri(base_uri, "common_types.json")
Expand Down
2 changes: 1 addition & 1 deletion renderers/lit/src/0.8/ui/root.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export class Root extends SignalWatcher(LitElement) {
.surfaceId=${this.surfaceId}
.dataContextPath=${node.dataContextPath ?? ""}
.action=${node.properties.action}
.childComponents=${[node.properties.child]}
.childComponents=${node.properties.child ? [node.properties.child] : []}
.enableCustomElements=${this.enableCustomElements}
></a2ui-button>`;
}
Expand Down
4 changes: 2 additions & 2 deletions samples/agent/adk/contact_lookup/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __init__(self, base_url: str, use_ui: bool = False):
def get_agent_card(self) -> AgentCard:
capabilities = AgentCapabilities(
streaming=True,
extensions=[self._schema_manager.get_agent_extension()],
extensions=[self._schema_manager.get_agent_extension()] if self._schema_manager else [],
)
skill = AgentSkill(
id="find_contact",
Expand Down Expand Up @@ -196,7 +196,7 @@ async def stream(self, query, session_id) -> AsyncIterable[dict[str, Any]]:
)
if attempt <= max_retries:
current_query_text = (
"I received no response. Please try again."
"I received no response. Please try again. "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an error? why the space after the period?

f"Please retry the original request: '{query}'"
)
continue # Go to next retry
Expand Down
Loading