From 20395a78b6cc802401fcd3ecc27f5dd6f293f3c8 Mon Sep 17 00:00:00 2001 From: ymq Date: Tue, 18 Aug 2026 11:57:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20/task=20=E5=91=BD=E4=BB=A4=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E4=BB=BB=E5=8A=A1=E6=A0=91+=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E8=BE=93=E5=87=BA=20ResourceBrowser=20=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pipeline_service/sdlc_ability.py | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/pipeline_service/sdlc_ability.py b/pipeline_service/sdlc_ability.py index e089ebe..86bf83f 100644 --- a/pipeline_service/sdlc_ability.py +++ b/pipeline_service/sdlc_ability.py @@ -1475,6 +1475,39 @@ async def _slash_tasks(args, ctx): return r or "无任务" +async def _slash_task(args, ctx): + """任务树 + 输入输出(ResourceBrowser 弹窗)。返回 widget dict,前端 AgentOut 检测 widgettype 渲染。""" + return { + "widgettype": "PopupWindow", + "options": { + "title": "任务树 - 输入输出", + "width": "85%", + "height": "80%", + "auto_open": True, + }, + "subwidgets": [{ + "widgettype": "ResourceBrowser", + "id": "task_rb", + "options": { + "tree_options": { + "widgettype": "Tree", + "options": { + "dataurl": "/pipeline-sdlc/api/task_tree.dspy", + "textField": "label", + "idField": "id", + "cfontsize": 1.0, + }, + }, + "browser_options": { + "widgettype": "urlwidget", + "options": {"url": "/pipeline-sdlc/api/task_io.dspy"}, + }, + "tree_width": "300px", + }, + }], + } + + async def _slash_diagnose(args, ctx): ex = ctx.get("executor") r = await ex._execute_ability_tool("diagnose_project", {}) if ex else None @@ -1484,6 +1517,7 @@ async def _slash_diagnose(args, ctx): def register_sdlc_slash_commands(): for cmd in [ SlashCommand("tasks", "列出任务(可按角色筛选)", _slash_tasks, "pipeline", "sdlc_general"), + SlashCommand("task", "任务树+输入输出(弹窗)", _slash_task, "pipeline", "sdlc_general"), SlashCommand("diagnose", "诊断项目状态", _slash_diagnose, "pipeline", "sdlc_general"), ]: register_slash_command(cmd)