A2UI
A2UI copied to clipboard
feat: Enable Rizzcharts sample and enhance client message handling
Summary
This PR enables the rizzcharts sample agent with improved map support and significantly hardens the Lit client's message handling capabilities. It addresses issues with MIME type definitions and improves the client's ability to handle various data formats.
Changes
Rizzcharts Agent
Map Support: Updated agent.py and map.json to support map images, allowing for either Google Maps API integration or fallback placeholders.
Lit Client Improvements
Robust Message Handling:
- Implemented a fallback mechanism to retrieve agent messages from history when needed.
- Added support for parsing string-encoded JSON data parts.
Configuration:
- Fixed the A2UI MIME type constant to
application/json+a2ui. - Added debug logging (
console.debug) for better traceability.
Demo Setup:
- Added rizzcharts demo scripts and configuration to
samples/client/lit/package.json.
Verification
- Python: Verified syntax and build configuration for rizzcharts agent.
- TypeScript: Successfully built the lit shell client (npm run build:tsc).