From 8ab4279b04b0b64510590b75fecd23e5431124f3 Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 13 Oct 2026 14:39:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(bioflow):=20sendCardResult=20=E4=BB=8E=20ra?= =?UTF-8?q?w.bioflow=20=E8=AF=BB=20active=5Fjob=5Fid(BFF=20=E5=BD=92?= =?UTF-8?q?=E4=B8=80=E5=8C=96=E5=89=A5=E7=A6=BB=E9=A1=B6=E5=B1=82=20bioflo?= =?UTF-8?q?w=20=E5=AF=BC=E8=87=B4=E8=AE=A2=E9=98=85=E6=B2=A1=E5=BB=BA?= =?UTF-8?q?=E7=AB=8B)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/stores/chat.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/src/stores/chat.js b/ui/src/stores/chat.js index db2a5dd..c261dc5 100644 --- a/ui/src/stores/chat.js +++ b/ui/src/stores/chat.js @@ -506,6 +506,7 @@ export function patchBioflowGuidance(aMsg, text) { // 自然语言引导气泡(方案:自然语言主通道,卡片辅助)——弹卡片前先插入一条 text 块。 if (!text) return null; const html = renderMarkdown(String(text)); + console.log('[bioflow-guidance] text=', String(text).slice(0, 40), 'html非空=', Boolean(html)); if ((aMsg.blocks || []).some((b) => b && b.type === 'text' && b.html === html)) return null; aMsg.blocks.push({ type: 'text', html }); return true; @@ -2565,7 +2566,8 @@ export const useChatStore = defineStore('chat', { aMsg.status = 'done'; }); // session↔job 绑定持久化:complete 的 bioflow.active_job_id → meta.bioflow - const bf = p.bioflow || {}; + // BFF 归一化剥离了顶层 bioflow,active_job_id 在 raw.bioflow 里 + const bf = p.bioflow || (p.raw && p.raw.bioflow) || {}; if (bf.active_job_id) { updateSessionQuiet(sessionId, { meta: { bioflow: { active_job_id: bf.active_job_id, chain: bf.chain || '' } }, @@ -2576,6 +2578,7 @@ export const useChatStore = defineStore('chat', { try { const bioflow = useBioflowStore(); const jobId = bf.active_job_id; + console.log('[bioflow-guidance] sendCardResult 建立订阅 jobId=', jobId); bioflow.connectJobEvents(jobId, sessionId, { onEvent: (type, data, seq) => { const frame = patchBioflowEvent(aMsg, { type, data }); @@ -2585,6 +2588,7 @@ export const useChatStore = defineStore('chat', { patchBioflowForm(aMsg, data); this.scrollSeq++; } else if (type === 'stage_await_files' && data) { + console.log('[bioflow-guidance] stage_await_files data=', JSON.stringify(data).slice(0, 200)); patchBioflowGuidance(aMsg, data.guidance || data.message); patchBioflowFile(aMsg, data); this.scrollSeq++;