myagent-ai 1.15.41 → 1.15.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -646,6 +646,16 @@ class MainAgent(BaseAgent):
646
646
  # 仅在块不完整且解析未提取到任何有效内容时才触发修正
647
647
  # 如果解析器已经从非完整块中提取到有效内容(response/tools等),则正常继续
648
648
  if not parsed.output_block_complete and not parsed.parse_success:
649
+ # 打印完整消息列表(系统提示词+对话历史),便于分析模型为何输出不完整
650
+ logger.warning(
651
+ f"[{task_id}] <output> 块不完整且未提取到有效内容\n"
652
+ f"====== 发送给LLM的完整消息列表(共{len(messages)}条)======\n"
653
+ + "\n".join(
654
+ f"--- [{i}] role={m.role} ---\n{m.content[:8000]}{'...(截断)' if len(m.content)>8000 else ''}"
655
+ for i, m in enumerate(messages)
656
+ )
657
+ + f"\n====== 消息列表结束 ======"
658
+ )
649
659
  logger.warning(
650
660
  f"[{task_id}] <output> 块不完整且未提取到有效内容,"
651
661
  f"跳过本轮输出和工具执行"
@@ -431,9 +431,12 @@ def _custom_parse(raw_text: str) -> ParsedOutput:
431
431
  conservative = not parsed.output_block_complete
432
432
 
433
433
  if conservative:
434
- logger.info(
434
+ logger.warning(
435
435
  "XML <output> 块不完整(缺少 </output> 闭合标签),"
436
- "启用保守解析模式(仅提取完整闭合的标签)"
436
+ "启用保守解析模式(仅提取完整闭合的标签)\n"
437
+ "====== LLM 完整输出开始 ======\n"
438
+ f"{raw_text}\n"
439
+ "====== LLM 完整输出结束 ======"
437
440
  )
438
441
 
439
442
  # ── Step 1: Strip non-XML noise (text before/after <output>) ──
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myagent-ai",
3
- "version": "1.15.41",
3
+ "version": "1.15.42",
4
4
  "description": "本地桌面端执行型AI助手 - Open Interpreter 风格 | Local Desktop Execution-Oriented AI Assistant",
5
5
  "main": "main.py",
6
6
  "bin": {