97 lines
2.5 KiB
XML
97 lines
2.5 KiB
XML
{
|
|
"widgettype": "VBox",
|
|
"id": "new-session-container",
|
|
"options": {
|
|
"width": "100%",
|
|
"height": "100%",
|
|
"padding": "20px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {
|
|
"text": "Create New Session",
|
|
"fontSize": "24px",
|
|
"fontWeight": "bold",
|
|
"color": "#F8FAFC",
|
|
"marginBottom": "20px"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Form",
|
|
"id": "new-session-form",
|
|
"options": {
|
|
"width": "100%",
|
|
"maxWidth": "600px",
|
|
"fields": [
|
|
{
|
|
"uitype": "select",
|
|
"name": "service_id",
|
|
"label": "Select Service",
|
|
"required": true,
|
|
"placeholder": "Choose a Hermes service",
|
|
"options": {
|
|
"url": "/hermes-web-cli/hermes_services/options"
|
|
}
|
|
},
|
|
{
|
|
"uitype": "text",
|
|
"name": "initial-prompt",
|
|
"label": "Initial Prompt (Optional)",
|
|
"placeholder": "Enter initial context or instructions...",
|
|
"width": "100%",
|
|
"height": "100px",
|
|
"marginBottom": "24px"
|
|
}
|
|
],
|
|
"toolbar": {
|
|
"tools": [
|
|
{
|
|
"label": "Create Session",
|
|
"bgcolor": "#22C55E",
|
|
"color": "#FFFFFF",
|
|
"border": "none",
|
|
"borderRadius": "6px",
|
|
"padding": "10px 20px",
|
|
"fontWeight": "600",
|
|
"action": "submit"
|
|
},
|
|
{
|
|
"label": "Cancel",
|
|
"bgcolor": "#64748B",
|
|
"color": "#FFFFFF",
|
|
"border": "none",
|
|
"borderRadius": "6px",
|
|
"padding": "10px 20px",
|
|
"action": "cancel"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "submit",
|
|
"actiontype": "urlwidget",
|
|
"target": "app.main-content",
|
|
"options": {
|
|
"url": "{{entire_url('hermes-web-cli/sessions/create_session.dspy')}}",
|
|
"method": "POST",
|
|
"data": "{{ 'new-session-form'.data }}"
|
|
},
|
|
"mode": "replace"
|
|
},
|
|
{
|
|
"wid": "self",
|
|
"event": "cancel",
|
|
"actiontype": "urlwidget",
|
|
"target": "app.main-content",
|
|
"options": {
|
|
"url": "{{entire_url('index.ui')}}"
|
|
},
|
|
"mode": "replace"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |