-
Notifications
You must be signed in to change notification settings - Fork 824
Description
Screen.Recording.2026-01-30.233048.mp4
When the agent fails to return data (e.g., no restaurants found, or max retries exhausted), the backend correctly sends a TextPart fallback message
Example backend log:
ERROR:agent:--- RestaurantAgent.stream: Max retries exhausted. Sending text-only error. ---
However, the frontend (A2UI) does not render this TextPart, and the UI appears to silently refresh or remain blank. Users never see the intended fallback message like:
Oops, I couldn’t find anything you requested.
Expected Behavior:
TextPart messages from the agent should be rendered in the UI, similar to how DataParts are displayed, so users see a clear error or fallback message.
Expected Behavior:
TextPart messages from the agent should be rendered in the UI, similar to how DataParts are displayed, so users see a clear error or fallback message.
Steps to Reproduce:
Query the agent with a request that triggers failure, e.g., “Chinese restaurants in Sydney” or any nonexistent location.
Observe the backend logs, which show a TextPart fallback message.
Observe the frontend: no message is displayed, and the page may refresh or remain blank.
Actual Behavior:
Backend sends the fallback TextPart.
Frontend fails to render it.
User sees no visible feedback.
Suggested Fix / Workaround:
Modify A2UI to handle TextPart messages and render them visibly. Example:
if (part.type === 'TextPart') {
const container = document.getElementById('fallback-container');
container.textContent = part.text;
container.style.display = 'block';
}
Metadata
Metadata
Assignees
Labels
Type
Projects
Status