清理表情

This commit is contained in:
2026-01-31 18:00:05 +08:00
parent 674f48c74b
commit 5eb13324c2
15 changed files with 394 additions and 156 deletions

View File

@@ -410,17 +410,17 @@ from IPython.display import display
try:
# 尝试保存
fig.savefig(auto_filepath, bbox_inches='tight')
print(f"💾 [Auto-Save] 检测到未闭合图表,已安全保存至: {auto_filepath}")
print(f"[CACHE] [Auto-Save] 检测到未闭合图表,已安全保存至: {auto_filepath}")
# 添加到输出中告知Agent
output += f"\n[Auto-Save] ⚠️ 检测到Figure {fig_num}未关闭,系统已自动保存为: {auto_filename}"
output += f"\n[Auto-Save] [WARN] 检测到Figure {fig_num}未关闭,系统已自动保存为: {auto_filename}"
self.image_counter += 1
except Exception as e:
print(f"⚠️ [Auto-Save] 保存失败: {e}")
print(f"[WARN] [Auto-Save] 保存失败: {e}")
finally:
plt.close(fig_num)
except Exception as e:
print(f"⚠️ [Auto-Save Global] 异常: {e}")
print(f"[WARN] [Auto-Save Global] 异常: {e}")
# --- 自动保存机制 end ---
return {