feat(agent): add pressure trend demo

This commit is contained in:
2026-06-30 20:01:34 +08:00
parent 123f79ce4d
commit ca075d718e
6 changed files with 431 additions and 19 deletions
+15
View File
@@ -21,6 +21,16 @@ data: {
## Envelope Types
Current `agent-ui@1` support is intentionally limited to three trusted shapes:
- `registered_component` for frontend-registered business panels.
- `chart` for the `echarts-safe-subset` chart grammar.
- `map_action` for the WebGIS map adapter.
The Agent must not return executable JS, JSX, HTML, CSS, or arbitrary component
source. The frontend renders only allowlisted components, chart specs, and map
actions.
```ts
type UISurface = "chat_inline" | "side_panel" | "canvas" | "map_overlay";
@@ -62,6 +72,11 @@ GET /api/v1/agent/chat/ui-registry
The registry returns the allowed chart grammar, registered components, and map
actions. Unknown components/actions should be rejected by the frontend.
`map_action` is a WebGIS-specific extension, not a general command channel. It
is valid only on `map_overlay`; every action and parameter set must be validated
by the frontend before it can affect MapLibre state. Invalid map actions should
fall back to `fallbackText`.
Initial mappings:
- `show_chart` -> `chart`