From b6422d646e65722a8924a004a8bb601580b41da9 Mon Sep 17 00:00:00 2001 From: ymq Date: Mon, 10 Aug 2026 00:16:01 +0800 Subject: [PATCH] feat: push pending questions as first NDJSON line before LLM processes message --- wwwroot/api/cockpit_chat.dspy | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wwwroot/api/cockpit_chat.dspy b/wwwroot/api/cockpit_chat.dspy index 497a248..4054689 100644 --- a/wwwroot/api/cockpit_chat.dspy +++ b/wwwroot/api/cockpit_chat.dspy @@ -521,6 +521,10 @@ if action == 'send_message': await sor.C('pipeline_conversations',{'id':getID(),'role':'user','content':message_text,'msg_type':'text','org_id':org_id,'created_by':uid,'iteration_id':ctx['pid'] or ''}) agent_reply = '' + # Push active notifications before LLM processing + if pending_qs: + d = json.dumps(_w_text(f"📬 待回答问题({len(pending_qs)}个):\n" + '\n'.join(pending_qs)), ensure_ascii=False)+'\n' + yield d for turn in range(10): raw = await _call_llm(model, msgs, 0.4) act = _parse(raw)