From f68755edf8e93bfbbb394ab21bd7fd23601b29ee Mon Sep 17 00:00:00 2001 From: p Date: Fri, 14 Aug 2026 18:03:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20cockpit=20=E4=BC=9A=E8=AF=9D=E4=BC=A0?= =?UTF-8?q?=20pipeline=5Fid=EF=BC=8C=E6=94=AF=E6=8C=81=E4=BA=A7=E7=BA=BF?= =?UTF-8?q?=E7=BC=BA=E7=9C=81=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/api/cockpit_chat_v2.dspy | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wwwroot/api/cockpit_chat_v2.dspy b/wwwroot/api/cockpit_chat_v2.dspy index 43836fd..664cbb7 100644 --- a/wwwroot/api/cockpit_chat_v2.dspy +++ b/wwwroot/api/cockpit_chat_v2.dspy @@ -49,7 +49,7 @@ if action == 'send_message': uid = 'user-01' # 测试兼容 # ── 加载上下文 ── - ctx = {'pid': '', 'name': ''} + ctx = {'pid': '', 'name': '', 'pipeline_id': ''} async with DBPools().sqlorContext(dbname) as sor: recs = await sor.sqlExe( "SELECT current_project_id FROM pipeline_agent_settings WHERE user_id=${u}$", @@ -58,15 +58,16 @@ if action == 'send_message': ctx['pid'] = getattr(recs[0], 'current_project_id', '') or '' if ctx['pid']: proj_recs = await sor.sqlExe( - "SELECT name FROM sd_projects WHERE id=${p}$", {"p": ctx['pid']}) + "SELECT name, pipeline_id FROM sd_projects WHERE id=${p}$", {"p": ctx['pid']}) if proj_recs: ctx['name'] = getattr(proj_recs[0], 'name', '') + ctx['pipeline_id'] = getattr(proj_recs[0], 'pipeline_id', '') or '' # ── 加载 v2 引擎 ── from pipeline_core.agent_config import load_agent_config from pipeline_service.agent_loop_v2 import AgentExecutor - config = await load_agent_config(project_id=ctx['pid']) + config = await load_agent_config(pipeline_id=ctx['pipeline_id'], project_id=ctx['pid']) executor = AgentExecutor( config=config, project_id=ctx['pid'],