fix: journal detail contrast and unify AI review journal format across four exchanges

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-05 13:09:59 +08:00
parent 934e48b9a8
commit 1b51f73ecd
11 changed files with 138 additions and 150 deletions
+7 -18
View File
@@ -35,7 +35,11 @@ import sys
if _REPO_ROOT not in sys.path:
sys.path.insert(0, _REPO_ROOT)
from ai_client import ai_generate, ai_review, ai_short_advice
from ai_review_lib import build_journal_ai_chart_path, collect_images_for_ai_review
from ai_review_lib import (
build_journal_ai_chart_path,
collect_images_for_ai_review,
journal_row_lines_for_ai,
)
from form_submit_lib import check_duplicate_submit, submit_scope_add_key, submit_scope_add_order
from fib_key_monitor_lib import (
FIB_KEY_MONITOR_TYPES,
@@ -7752,15 +7756,7 @@ def ai_daily_review():
text = f"【每日交易记录】{date}\n总笔数:{len(rows)}\n\n"
for idx, row in enumerate(rows, 1):
issues = row["mood_issues"] or ""
exit_one = (row["exit_reason"] or "").strip() or ""
text += (
f"{idx}. {row['coin']} {row['tf']} | 盈亏:{row['pnl']}U | RR:{row['real_rr']}\n"
f" 开仓类型:{row['entry_reason'] or ''}\n"
f" 心态标签:{issues}\n"
f" 平仓/离场:{exit_one}\n"
f" 问题:{issues}\n\n"
)
text += journal_row_lines_for_ai(idx, row)
image_paths = collect_images_for_ai_review(
rows,
@@ -7795,14 +7791,7 @@ def ai_weekly_review():
text = f"【周交易记录】{start_date}~{end_date}\n总笔数:{len(rows)}\n\n"
for idx, row in enumerate(rows, 1):
issues = row["mood_issues"] or ""
exit_one = (row["exit_reason"] or "").strip() or ""
text += (
f"{idx}. {row['coin']} {row['tf']} | 盈亏:{row['pnl']}U | RR:{row['real_rr']}\n"
f" 开仓类型:{row['entry_reason'] or ''}\n"
f" 平仓/离场:{exit_one}\n"
f" 心态标签:{issues} | 持仓:{row['hold_duration']}\n\n"
)
text += journal_row_lines_for_ai(idx, row)
image_paths = collect_images_for_ai_review(
rows,