From 620b12dee0578b4fb6ee7c37d889bc576d4d16f1 Mon Sep 17 00:00:00 2001 From: ymq Date: Sat, 8 Aug 2026 21:12:57 +0800 Subject: [PATCH] debug: show full yield content (remove 80-char truncation) --- wwwroot/api/cockpit_chat.dspy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wwwroot/api/cockpit_chat.dspy b/wwwroot/api/cockpit_chat.dspy index 28834a0..6cf01e2 100644 --- a/wwwroot/api/cockpit_chat.dspy +++ b/wwwroot/api/cockpit_chat.dspy @@ -200,7 +200,7 @@ if action == 'send_message': model = await _sel_model(sor, user_model_id) if not model: d = json.dumps({"type":"widget","widget":_w_card("❌ 错误",_w_text("无可用LLM"),"error")},ensure_ascii=False)+chr(10) - debug(f"AGENT_STREAM yield error: {d[:80]}") + debug(f"AGENT_STREAM yield error: {d}") yield d return @@ -226,12 +226,12 @@ if action == 'send_message': tool = act.get('tool','') label = _tool_labels.get(tool,tool) d = json.dumps({"type":"widget","widget":_w_progress(f"🔄 {label}")},ensure_ascii=False)+chr(10) - debug(f"AGENT_STREAM yield: {d[:80]}") + debug(f"AGENT_STREAM yield: {d}") yield d result = await _exec_tool(sor, tool, act.get('params',{}), ctx, uid, org_id) ok = result.startswith("OK:") d = json.dumps({"type":"widget","widget":_w_card(f"{'✅' if ok else '❌'} {label}",_w_text(result),"success" if ok else "error")},ensure_ascii=False)+chr(10) - debug(f"AGENT_STREAM yield: {d[:80]}") + debug(f"AGENT_STREAM yield: {d}") yield d msgs.append({"role":"assistant","content":raw}) msgs.append({"role":"user","content":f"工具 {tool} 结果:\n{result}"}) @@ -240,7 +240,7 @@ if action == 'send_message': if not agent_reply: agent_reply = "处理超时,请简化需求。" d = json.dumps({"type":"widget","widget":_w_card("🤖 驾驶舱 Agent",_w_text(agent_reply),"reply")},ensure_ascii=False)+chr(10) - debug(f"AGENT_STREAM yield final: {d[:80]}") + debug(f"AGENT_STREAM yield final: {d}") yield d await sor.C('pipeline_conversations',{'id':getID(),'role':'agent','content':agent_reply,'msg_type':'text','org_id':org_id,'created_by':'system'})