From 6f0aaee7270177f811cd4c05f1690cbb90d29276 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sat, 29 Aug 2026 08:28:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=95=86=E6=9C=BA=E4=BA=A7=E7=BA=BFage?= =?UTF-8?q?nt=E4=BC=9A=E8=AF=9D=E5=85=A5=E5=8F=A3=E9=A1=B5(=E5=8F=82?= =?UTF-8?q?=E7=85=A7=E6=8A=95=E6=A0=87=E4=BA=A7=E7=BA=BF)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/agent/index.ui | 65 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 wwwroot/agent/index.ui diff --git a/wwwroot/agent/index.ui b/wwwroot/agent/index.ui new file mode 100644 index 0000000..b367f48 --- /dev/null +++ b/wwwroot/agent/index.ui @@ -0,0 +1,65 @@ +{ + "widgettype": "VBox", + "options": {"width": "100%", "height": "100%", "padding": "0"}, + "subwidgets": [ + { + "widgettype": "HBox", + "options": {"width": "100%", "alignItems": "center", "padding": "16px 24px 8px 24px", "cheight": 6, "gap": "12px"}, + "subwidgets": [ + {"widgettype": "Title2", "options": {"text": "商机产线"}}, + {"widgettype": "Text", "options": {"text": "热点软件 → 今日AI招标 → 检索 → 编写研发报告 → 人工确认 → 研发审批", "cfontsize": 0.9, "color": "#94a3b8"}}, + {"widgettype": "Filler"}, + { + "widgettype": "Button", + "id": "new_session_btn", + "options": {"label": "+ 新建会话", "css": "small"}, + "binds": [{ + "wid": "self", + "event": "click", + "actiontype": "script", + "target": "self", + "script": "var tp=bricks.getWidgetById('session_tabs',bricks.app);if(!tp)return;var sid='s'+Date.now()+'_'+Math.floor(Math.random()*100000);var n=tp.opts.items.length+1;tp.open_tab({name:'session_'+sid,label:'会话 '+n,removable:true,content:{widgettype:'VBox',options:{css:'filler',width:'100%',height:'100%'},subwidgets:[{widgettype:'urlwidget',options:{url:'/pipeline_core/api/agent_menus.dspy?session_id='+sid+'&pipeline_id=opportunity_general',method:'GET'}},{widgettype:'AgentIO',options:{css:'filler',margin:'0 24px 24px 24px',url:'/pipeline_core/api/agent_chat.dspy?session_id='+sid+'&pipeline_id=opportunity_general',model_dataurl:'/pipeline_core/api/agent_model_options.dspy?session_id='+sid,model_cwidth:14,placeholder:'输入你的需求...'}}]}});" + }] + } + ] + }, + { + "widgettype": "TabPanel", + "id": "session_tabs", + "options": { + "css": "filler", + "width": "100%", + "height": "100%", + "tab_pos": "top", + "items": [ + { + "name": "session_default", + "label": "会话 1", + "removable": false, + "content": { + "widgettype": "VBox", + "options": {"css": "filler", "width": "100%", "height": "100%"}, + "subwidgets": [ + { + "widgettype": "urlwidget", + "options": {"url": "{{entire_url('/pipeline_core/api/agent_menus.dspy')}}?session_id=default&pipeline_id=opportunity_general", "method": "GET"} + }, + { + "widgettype": "AgentIO", + "options": { + "css": "filler", + "margin": "0 24px 24px 24px", + "url": "/pipeline_core/api/agent_chat.dspy?session_id=default&pipeline_id=opportunity_general", + "model_dataurl": "/pipeline_core/api/agent_model_options.dspy?session_id=default", + "model_cwidth": 14, + "placeholder": "输入你的需求..." + } + } + ] + } + } + ] + } + } + ] +} \ No newline at end of file