mirror of
https://github.com/MervinPraison/PraisonAIUI.git
synced 2026-11-09 17:31:55 -10:00
- index.html: add anti-flicker CSS in head, remove 300ms delay, call notify() immediately - homepage.js: move setHomepageMode(true) after article creation, use opacity not display:none - content-loader.js: move setContentMode(true) after article creation, use opacity/absolute - topnav.js: URL-based sidebar highlighting via highlightActiveSidebarItem() - server.py: update anti-flicker CSS to match index.html pattern
21 lines
646 B
Python
21 lines
646 B
Python
"""Dashboard with PraisonAI Agent — no @aiui.reply override.
|
|
|
|
When no @aiui.reply callback is registered, PraisonAIProvider
|
|
falls through to direct mode and creates a praisonaiagents.Agent()
|
|
per session with memory=True.
|
|
|
|
Run:
|
|
aiui run app_agent.py --style dashboard --port 8082
|
|
"""
|
|
import praisonaiui as aiui
|
|
|
|
# Only register pages — no @aiui.reply so the real Agent() is used
|
|
@aiui.page("metrics", title="My Metrics", icon="📊", group="Analytics",
|
|
description="Custom analytics dashboard")
|
|
async def metrics_page():
|
|
return {
|
|
"total_users": 1_234,
|
|
"active_today": 42,
|
|
"revenue": "$12,345",
|
|
}
|