harnessed_reasoning/wwwroot/reasoning_console.ui
yumoqing 8108e86ab5 refactor: replace mock reasoning with real LLM-based engine
- Rewrite core.py: all mock implementations replaced with real calls
  * _generate_plan() uses llm_chat from harnessed_agent for LLM-based planning
  * _execute_tool() calls harnessed_execute_tool for real tool execution
  * _get_memory_context() calls harnessed_get_intelligent_memory_context
  * _safety_check() with configurable strict/moderate/lenient modes
  * _try_recovery() for auto-recovery on common failures
  * All session persistence uses real database operations

- Fix reasoning_console.ui: uitype 'textarea' -> 'text' per bricks spec
- Add .gitignore

The reasoning module now:
1. Calls LLM to analyze user request and generate execution plan
2. Safety-checks the plan before execution
3. Executes tools via harnessed_agent's tool system
4. Recovers from common errors automatically
5. Stores session history in database
2026-05-07 12:15:23 +08:00

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": "text",
"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')}}"
}
}
]
}
]
}