myagent-ai 1.15.40 → 1.15.41
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.
- package/agents/main_agent.py +10 -3
- package/package.json +2 -2
package/agents/main_agent.py
CHANGED
|
@@ -642,10 +642,12 @@ class MainAgent(BaseAgent):
|
|
|
642
642
|
stream_callback,
|
|
643
643
|
)
|
|
644
644
|
|
|
645
|
-
# Step 4.2: <output> 块完整性检查
|
|
646
|
-
|
|
645
|
+
# Step 4.2: <output> 块完整性检查
|
|
646
|
+
# 仅在块不完整且解析未提取到任何有效内容时才触发修正
|
|
647
|
+
# 如果解析器已经从非完整块中提取到有效内容(response/tools等),则正常继续
|
|
648
|
+
if not parsed.output_block_complete and not parsed.parse_success:
|
|
647
649
|
logger.warning(
|
|
648
|
-
f"[{task_id}] <output>
|
|
650
|
+
f"[{task_id}] <output> 块不完整且未提取到有效内容,"
|
|
649
651
|
f"跳过本轮输出和工具执行"
|
|
650
652
|
)
|
|
651
653
|
if _xml_correction_retries < 1:
|
|
@@ -679,6 +681,11 @@ class MainAgent(BaseAgent):
|
|
|
679
681
|
stream_callback,
|
|
680
682
|
)
|
|
681
683
|
break
|
|
684
|
+
elif not parsed.output_block_complete and parsed.parse_success:
|
|
685
|
+
# 块不完整但已提取到有效内容,记录日志但正常继续
|
|
686
|
+
logger.info(
|
|
687
|
+
f"[{task_id}] <output> 块不完整但已提取到有效内容,跳过修正直接处理"
|
|
688
|
+
)
|
|
682
689
|
|
|
683
690
|
# Step 4.5: 解析失败处理 — 回退给 LLM 修正或提取周边文本
|
|
684
691
|
if not parsed.parse_success:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "myagent-ai",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.41",
|
|
4
4
|
"description": "本地桌面端执行型AI助手 - Open Interpreter 风格 | Local Desktop Execution-Oriented AI Assistant",
|
|
5
5
|
"main": "main.py",
|
|
6
6
|
"bin": {
|
|
@@ -65,4 +65,4 @@
|
|
|
65
65
|
"departments/",
|
|
66
66
|
"web/"
|
|
67
67
|
]
|
|
68
|
-
}
|
|
68
|
+
}
|