{ "widgettype": "VBox", "options": { "width": "100%", "height": "100%", "padding": "0" }, "subwidgets": [ { "widgettype": "HBox", "options": { "width": "100%", "alignItems": "center", "padding": "20px 24px 12px 24px", "cheight": 6, "gap": "12px" }, "subwidgets": [ { "widgettype": "Title2", "options": { "text": "开发产线驾驶舱" } }, { "widgettype": "Text", "options": { "text": "Cockpit", "cfontsize": 0.9, "color": "#94a3b8" } }, { "widgettype": "Filler" }, { "widgettype": "Button", "options": { "name": "refresh_btn", "label": "刷新", "css": "small" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "script", "target": "self", "script": "var p=bricks.getWidgetById('cockpit_timeline');if(p)p.render({});var c=bricks.getWidgetById('cockpit_chat');if(c)c.render({});var d=bricks.getWidgetById('cockpit_dashboard');if(d)d.render({});" } ] } ] }, { "widgettype": "HBox", "options": { "width": "100%", "padding": "12px 24px 12px 24px", "cheight": 18, "gap": "16px" }, "subwidgets": [ { "widgettype": "urlwidget", "id": "cockpit_dashboard", "options": { "url": "{{entire_url('/pipeline-sdlc/api/cockpit_stats.dspy')}}", "method": "GET" } } ] }, { "widgettype": "HBox", "options": { "css": "filler", "width": "100%", "height": "100%", "padding": "12px 24px 24px 24px", "gap": "16px" }, "subwidgets": [ { "widgettype": "VBox", "options": { "cwidth": 35, "height": "100%", "gap": "8px" }, "subwidgets": [ { "widgettype": "HBox", "options": { "alignItems": "center", "padding": "0 0 8px 0", "gap": "8px" }, "subwidgets": [ { "widgettype": "Title3", "options": { "text": "产线时间线" } }, { "widgettype": "Text", "options": { "text": "选择一个迭代查看", "cfontsize": 0.8, "color": "#94a3b8" } } ] }, { "widgettype": "VScrollPanel", "id": "cockpit_timeline", "options": { "css": "filler", "width": "100%", "height": "100%", "bgcolor": "#f8fafc", "border": "1px solid #e2e8f0", "borderRadius": "8px", "padding": "12px" }, "subwidgets": [ { "widgettype": "Text", "options": { "text": "请先在项目管理中创建迭代,或从工具栏选择一个迭代来查看产线进度。", "cfontsize": 0.9, "color": "#64748b", "padding": "20px" } } ] } ] }, { "widgettype": "VBox", "options": { "cwidth": 65, "height": "100%", "gap": "8px" }, "subwidgets": [ { "widgettype": "HBox", "options": { "alignItems": "center", "padding": "0 0 8px 0", "gap": "8px" }, "subwidgets": [ { "widgettype": "Title3", "options": { "text": "对话" } }, { "widgettype": "Filler" }, { "widgettype": "Text", "options": { "text": "像和大模型对话一样驱动开发", "cfontsize": 0.8, "color": "#94a3b8" } } ] }, { "widgettype": "VScrollPanel", "id": "cockpit_chat", "options": { "css": "filler", "width": "100%", "height": "100%", "bgcolor": "#f8fafc", "border": "1px solid #e2e8f0", "borderRadius": "8px", "padding": "12px" }, "subwidgets": [ { "widgettype": "Text", "options": { "text": "选择一个迭代后,这里将显示对话记录。\n在下方输入框中描述你的需求,Agent 将自动分析并驱动产线执行。", "cfontsize": 0.9, "color": "#64748b", "padding": "20px" } } ] }, { "widgettype": "Form", "id": "chat_form", "options": { "name": "chat_form", "submit_url": "{{entire_url('/pipeline-sdlc/api/cockpit_chat.dspy')}}", "fields": [ {"name": "iteration_id", "uitype": "hide", "value": ""}, {"name": "task_id", "uitype": "hide", "value": ""}, {"name": "message_text", "uitype": "textarea", "placeholder": "描述你的需求或回复Agent...", "rows": 3, "cwidth": 60}, {"name": "action", "uitype": "hide", "value": "send_message"} ] }, "subwidgets": [ { "widgettype": "HBox", "options": { "padding": "8px 0 0 0", "gap": "8px", "justifyContent": "flex-end" }, "subwidgets": [ { "widgettype": "Button", "options": { "name": "send_btn", "label": "发送", "type": "submit", "css": "primary" } } ] } ], "binds": [ { "wid": "self", "event": "beforesubmit", "actiontype": "script", "target": "self", "script": "var iter_id=bricks.getWidgetById('current_iteration_id');if(!iter_id||!iter_id.options.value){bricks.show_error({title:'提示',message:'请先在迭代管理中选择一个迭代'});return false;}var msg=this.getValue('message_text');if(!msg||!msg.trim()){bricks.show_error({title:'提示',message:'请输入内容'});return false;}return true;" }, { "wid": "self", "event": "submited", "actiontype": "script", "target": "self", "script": "this.setValue('message_text','');var c=bricks.getWidgetById('cockpit_chat');if(c)c.render({});var t=bricks.getWidgetById('cockpit_timeline');if(t)t.render({});" } ] } ] } ] } ] }