From c7b14f17dd191aa13efab5bfb81e711040f05088 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 17 May 2026 00:07:04 +0800 Subject: [PATCH] fix: update WebSocket connection logic for better session handling - Modified connect() function to pass session as URL parameter - Fallback to cookie-based auth if session not available - Improves compatibility with httponly cookie settings --- wwwroot/reasoning_console.ui | 37 +++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/wwwroot/reasoning_console.ui b/wwwroot/reasoning_console.ui index 59a9640..cb2f5a3 100644 --- a/wwwroot/reasoning_console.ui +++ b/wwwroot/reasoning_console.ui @@ -41,11 +41,19 @@ }, "subwidgets": [ { - "widgettype": "Input", - "id": "reasoning_input", + "widgettype": "Form", + "id": "input_form", "options": { - "text": "", - "placeholder": "输入你的请求,AI 将自动推理、规划并执行..." + "layout": "vertical", + "fields": [ + { + "name": "user_input", + "label": "输入请求", + "uitype": "text", + "height": "120px", + "placeholder": "输入你的请求,AI 将自动推理、规划并执行..." + } + ] } }, { @@ -59,7 +67,8 @@ "widgettype": "Button", "id": "start_btn", "options": { - "text": "开始推理", + "label": "开始推理", + "variant": "primary", "bgcolor": "#2196F3" }, "binds": [ @@ -75,7 +84,8 @@ "widgettype": "Button", "id": "clear_btn", "options": { - "text": "清空日志", + "label": "清空日志", + "variant": "secondary", "bgcolor": "#607D8B" }, "binds": [ @@ -120,10 +130,11 @@ ] }, { - "widgettype": "Scroll", + "widgettype": "VBox", "options": { "width": "100%", - "height": "auto" + "height": "400px", + "style": "overflow-y: auto;" }, "subwidgets": [ { @@ -143,15 +154,7 @@ "widgettype": "Html", "id": "ws_logic", "options": { - "html": "" - } - }, - { - "widgettype": "WebSocket", - "id": "reasoning_ws", - "options": { - "ws_url": "{{entire_url('/wss/harnessed_reasoning/reasoning_console.wss')}}", - "with_session": true + "html": "" } } ]