From 28820a0b2969a8dc454a6c3e1f3eeae59437f4dd Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 2 Aug 2026 17:56:06 +0800 Subject: [PATCH] fix: bypass pipeline_submit, create tasks directly in cockpit --- wwwroot/api/cockpit_chat.dspy | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/wwwroot/api/cockpit_chat.dspy b/wwwroot/api/cockpit_chat.dspy index f13b969..5c3ef74 100644 --- a/wwwroot/api/cockpit_chat.dspy +++ b/wwwroot/api/cockpit_chat.dspy @@ -358,14 +358,15 @@ if action == 'send_message': title = intent.get('title', '') or message_text[:100] task_params = {'description': intent.get('description', ''), 'input_text': message_text} try: - result = await pipeline_submit(org_id, 'sdlc_general', uid, title, task_params) - rd = json.loads(result) - if rd.get('success'): - task_id = rd.get('task_id', '') - await _save_context(sor, uid, pid, iid) - agent_reply = f"✅ 任务「{title}」已提交({task_id}),产线开始执行。" - else: - agent_reply = f"任务提交失败:{rd.get('message', '未知错误')}" + # Direct task creation (bypass pipeline_submit to avoid executor issues) + task_id = getID() + await sor.C('pipeline_tasks', { + 'id': task_id, 'tenant_id': org_id, 'pipeline_id': 'sdlc_general', + 'owner_id': uid, 'title': title, 'state': 'submitted', + 'params': json.dumps(task_params, ensure_ascii=False) + }) + await _save_context(sor, uid, pid, iid) + agent_reply = f"✅ 任务「{title}」已提交({task_id})。" except Exception as e: agent_reply = f"任务提交失败:{str(e)[:200]}" elif intent_type == 'add_bug':