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)