feat: push pending questions as first NDJSON line before LLM processes message

This commit is contained in:
ymq 2026-08-10 00:16:01 +08:00
parent 22f76e71b9
commit b6422d646e

View File

@ -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)