yumoqing d229138adc fix: Complete hermes-web-cli module with all required fixes
- Add load_hermes_web_cli function to fix ImportError
- Update data_url paths to use /hermes-web-cli/... instead of /api/...
- Add missing renew.dspy file with complete business logic
- Update all .ui files with correct endpoint references
- Ensure module is fully functional for Sage integration
2026-04-21 15:37:20 +08:00

64 lines
1.7 KiB
XML

{
"widgettype": "PopupWindow",
"options": {
"title": "Hermes Chat",
"width": "800px",
"height": "600px",
"resizable": true,
"draggable": true
},
"subwidgets": [
{
"widgettype": "VBox",
"options": {
"width": "100%",
"height": "100%"
},
"subwidgets": [
{
"widgettype": "LLMOut",
"options": {
"data_url": "/hermes-web-cli/sessions/{session_id}/messages",
"height": "400px"
}
},
{
"widgettype": "HBox",
"options": {
"width": "100%"
},
"subwidgets": [
{
"widgettype": "Input",
"options": {
"placeholder": "输入消息...",
"width": "100%"
}
},
{
"widgettype": "Filler",
"options": {
"width": "10px"
}
},
{
"widgettype": "Button",
"options": {
"text": "发送",
"width": "80px"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "script",
"script": "const input = bricks.findWidget('input'); const message = input.getValue(); if (message) { fetch('/hermes-web-cli/sessions/{session_id}/messages', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ message: message }) }).then(r => r.json()).then(data => { input.setValue(''); }); }"
}
]
}
]
}
]
}
]
}