yumoqing 526151b901 feat(hermes-web-cli): redesign index.ui with complete user interaction features
- Replace service-only management interface with full AI agent dashboard
- Implement modern dark theme UI using UI/UX Pro Max design principles
- Add comprehensive navigation with sidebar and main content area
- Create complete page suite: new_session, sessions, services, session_chat, settings
- Integrate all user interaction functions into unified interface
- Follow bricks-framework best practices and production-ready standards
2026-04-21 17:16:13 +08:00

405 lines
12 KiB
XML

{
"widgettype": "VBox",
"options": {
"width": "100%",
"height": "100%",
"style": {
"backgroundColor": "#020617",
"color": "#F8FAFC"
}
},
"subwidgets": [
{
"widgettype": "HBox",
"options": {
"width": "100%",
"height": "60px",
"style": {
"backgroundColor": "#0F172A",
"borderBottom": "1px solid #334155",
"padding": "0 20px",
"alignItems": "center"
}
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "Hermes Web CLI",
"fontSize": "24px",
"fontWeight": "bold",
"style": {
"color": "#F8FAFC"
}
}
},
{
"widgettype": "Filler"
},
{
"widgettype": "Button",
"options": {
"text": "New Session",
"icon": "fa fa-plus",
"style": {
"backgroundColor": "#22C55E",
"color": "#FFFFFF",
"border": "none",
"borderRadius": "6px",
"padding": "8px 16px"
}
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "main-content",
"options": {
"url": "{{entire_url('new_session.ui')}}"
},
"mode": "replace"
}
]
}
]
},
{
"widgettype": "HBox",
"options": {
"width": "100%",
"height": "calc(100% - 60px)"
},
"subwidgets": [
{
"widgettype": "VBox",
"options": {
"width": "250px",
"height": "100%",
"style": {
"backgroundColor": "#1A1E2F",
"borderRight": "1px solid #334155"
}
},
"subwidgets": [
{
"widgettype": "Button",
"options": {
"text": "Active Sessions",
"icon": "fa fa-comments",
"style": {
"width": "100%",
"textAlign": "left",
"padding": "12px 20px",
"border": "none",
"backgroundColor": "transparent",
"color": "#F8FAFC",
"fontSize": "14px"
}
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "main-content",
"options": {
"url": "{{entire_url('sessions.ui')}}"
},
"mode": "replace"
}
]
},
{
"widgettype": "Button",
"options": {
"text": "Services",
"icon": "fa fa-server",
"style": {
"width": "100%",
"textAlign": "left",
"padding": "12px 20px",
"border": "none",
"backgroundColor": "transparent",
"color": "#F8FAFC",
"fontSize": "14px"
}
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "main-content",
"options": {
"url": "{{entire_url('services.ui')}}"
},
"mode": "replace"
}
]
},
{
"widgettype": "Button",
"options": {
"text": "Settings",
"icon": "fa fa-cog",
"style": {
"width": "100%",
"textAlign": "left",
"padding": "12px 20px",
"border": "none",
"backgroundColor": "transparent",
"color": "#F8FAFC",
"fontSize": "14px"
}
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "main-content",
"options": {
"url": "{{entire_url('settings.ui')}}"
},
"mode": "replace"
}
]
}
]
},
{
"widgettype": "VBox",
"id": "main-content",
"options": {
"width": "calc(100% - 250px)",
"height": "100%",
"style": {
"padding": "20px"
}
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "Welcome to Hermes Web CLI",
"fontSize": "28px",
"fontWeight": "bold",
"style": {
"marginBottom": "16px",
"color": "#F8FAFC"
}
}
},
{
"widgettype": "Text",
"options": {
"text": "Interact with your AI agents through natural language conversations. Create new sessions, manage connected services, and configure your workspace.",
"fontSize": "16px",
"style": {
"marginBottom": "24px",
"color": "#CBD5E1"
}
}
},
{
"widgettype": "HBox",
"options": {
"width": "100%",
"height": "auto",
"style": {
"gap": "20px"
}
},
"subwidgets": [
{
"widgettype": "VBox",
"options": {
"width": "33%",
"height": "120px",
"style": {
"backgroundColor": "#1E293B",
"borderRadius": "8px",
"padding": "20px",
"border": "1px solid #334155"
}
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "Quick Start",
"fontSize": "18px",
"fontWeight": "600",
"style": {
"color": "#F8FAFC",
"marginBottom": "8px"
}
}
},
{
"widgettype": "Text",
"options": {
"text": "Create your first session and start chatting with your AI agent.",
"fontSize": "14px",
"style": {
"color": "#94A3B8"
}
}
}
]
},
{
"widgettype": "VBox",
"options": {
"width": "33%",
"height": "120px",
"style": {
"backgroundColor": "#1E293B",
"borderRadius": "8px",
"padding": "20px",
"border": "1px solid #334155"
}
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "Service Management",
"fontSize": "18px",
"fontWeight": "600",
"style": {
"color": "#F8FAFC",
"marginBottom": "8px"
}
}
},
{
"widgettype": "Text",
"options": {
"text": "Connect and manage multiple Hermes services for distributed AI processing.",
"fontSize": "14px",
"style": {
"color": "#94A3B8"
}
}
}
]
},
{
"widgettype": "VBox",
"options": {
"width": "33%",
"height": "120px",
"style": {
"backgroundColor": "#1E293B",
"borderRadius": "8px",
"padding": "20px",
"border": "1px solid #334155"
}
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "Session History",
"fontSize": "18px",
"fontWeight": "600",
"style": {
"color": "#F8FAFC",
"marginBottom": "8px"
}
}
},
{
"widgettype": "Text",
"options": {
"text": "Access your conversation history and continue previous sessions.",
"fontSize": "14px",
"style": {
"color": "#94A3B8"
}
}
}
]
}
]
},
{
"widgettype": "Text",
"options": {
"text": "Recent Sessions",
"fontSize": "20px",
"fontWeight": "600",
"style": {
"marginTop": "32px",
"marginBottom": "16px",
"color": "#F8FAFC"
}
}
},
{
"widgettype": "DataViewer",
"options": {
"data_url": "/hermes-web-cli/sessions/recent",
"page_rows": 5,
"row_options": {
"fields": [
{
"name": "session_id",
"label": "Session ID",
"uitype": "str"
},
{
"name": "service_name",
"label": "Service",
"uitype": "str"
},
{
"name": "last_message",
"label": "Last Message",
"uitype": "str"
},
{
"name": "updated_at",
"label": "Last Active",
"uitype": "date"
}
]
},
"toolbar": {
"tools": [
{
"name": "open_session",
"text": "Open",
"icon": "fa fa-folder-open"
},
{
"name": "delete_session",
"text": "Delete",
"icon": "fa fa-trash"
}
]
}
},
"binds": [
{
"wid": "self",
"event": "open_session",
"actiontype": "script",
"script": "const selectedRow = event.params; if (selectedRow) { const url = `{{entire_url('session_detail.ui')}}?session_id=${selectedRow.session_id}`; bricks.app.load_widget(url, 'main-content', 'replace'); }"
},
{
"wid": "self",
"event": "delete_session",
"actiontype": "script",
"script": "const selectedRow = event.params; if (selectedRow) { fetch(`/hermes-web-cli/sessions/${selectedRow.session_id}`, { method: 'DELETE' }).then(() => { this.refresh(); }); }"
}
]
}
]
}
]
}
]
}