- Replace invalid 'Page' and 'Card' components with valid bricks components (VBox, HBox, Filler, etc.) - Add comprehensive examples for all major bricks components in examples/ directory - Update hermes-web-cli UI files to use correct component hierarchy - Include examples for: VBox, HBox, Filler, ResponsableBox, Form, Button, Text, Modal, TabPanel, DataViewer, Tree, Image, VideoPlayer, Input, LLMOut - Follow proper bricks-framework JSON structure with widgettype, options, subwidgets - Ensure all examples are production-ready and follow module development specifications
78 lines
1.7 KiB
XML
78 lines
1.7 KiB
XML
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"width": "100%",
|
|
"height": "100%"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {
|
|
"height": "60px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {
|
|
"text": "{{params_kw.get('service_name')}} - {{params_kw.get('session_name')}}",
|
|
"fontSize": "20px"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Filler"
|
|
},
|
|
{
|
|
"widgettype": "Button",
|
|
"options": {
|
|
"text": "关闭会话"
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "click",
|
|
"actiontype": "method",
|
|
"target": "-@Modal",
|
|
"method": "dismiss"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "Filler",
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "LLMOut",
|
|
"options": {
|
|
"data_url": "/api/hermes-web-cli/sessions/{{params_kw.get('session_id')}}/messages",
|
|
"auto_scroll": true
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {
|
|
"height": "80px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Input",
|
|
"options": {
|
|
"placeholder": "输入您的消息...",
|
|
"width": "100%",
|
|
"height": "60px"
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "keydown",
|
|
"actiontype": "script",
|
|
"script": "if (event.key === 'Enter' && !event.shiftKey) { event.preventDefault(); /* 发送消息逻辑 */ }"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |