87 lines
2.7 KiB
XML
87 lines
2.7 KiB
XML
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"width": "100%",
|
|
"height": "100%",
|
|
"padding": "16px",
|
|
"spacing": "16px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {
|
|
"text": "推理控制台",
|
|
"fontSize": "20px",
|
|
"fontWeight": "bold",
|
|
"color": "#1E40AF"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Form",
|
|
"id": "reasoning_form",
|
|
"options": {
|
|
"submit_url": "{{entire_url('api/reasoning_submit.dspy')}}",
|
|
"method": "POST",
|
|
"layout": "vertical",
|
|
"fields": [
|
|
{
|
|
"name": "request",
|
|
"label": "推理请求",
|
|
"uitype": "textarea",
|
|
"required": true,
|
|
"rows": 4,
|
|
"placeholder": "请输入您的请求,例如:分析当前项目的安全问题并生成修复方案"
|
|
},
|
|
{
|
|
"name": "execute_immediately",
|
|
"label": "提交后立即执行(否则仅生成计划)",
|
|
"uitype": "check",
|
|
"checked": true
|
|
}
|
|
],
|
|
"buttons": [
|
|
{
|
|
"type": "submit",
|
|
"label": "开始推理",
|
|
"variant": "primary"
|
|
}
|
|
],
|
|
"maxWidth": "700px"
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "submited",
|
|
"actiontype": "script",
|
|
"script": "await bricks.show_resp_message_or_error(event.params)"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"width": "100%",
|
|
"padding": "16px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {
|
|
"text": "历史推理记录",
|
|
"fontSize": "16px",
|
|
"fontWeight": "bold",
|
|
"color": "#374151",
|
|
"marginBottom": "8px"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "urlwidget",
|
|
"options": {
|
|
"url": "{{entire_url('harnessed_reasoning_sessions_crud')}}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|