Wire dashboard context into Hearthkeeper

This commit is contained in:
2026-05-12 10:28:33 -05:00
parent c1d6032eb2
commit 74e3c0dcaa
7 changed files with 117 additions and 31 deletions

View File

@@ -47,6 +47,9 @@ class MarkdownExporter:
actions = await repo.get_session_actions(session_id)
clips = await repo.get_clip_candidates(session_id)
seeds = await repo.get_blog_seeds(session_id)
dashboard = await repo.get_dashboard(session_id)
dashboard_data = Repository.serialize_dashboard(dashboard)
# Build markdown
date = session.started_at.strftime("%Y-%m-%d")
@@ -59,7 +62,20 @@ class MarkdownExporter:
# Stream Theme
ledger += "## Stream Theme\n"
if session.theme:
if dashboard_data:
if dashboard_data.get("stream_title"):
ledger += f"**Title:** {dashboard_data['stream_title']}\n"
if dashboard_data.get("game"):
ledger += f"**Game:** {dashboard_data['game']}\n"
if dashboard_data.get("mood"):
ledger += f"**Mood:** {dashboard_data['mood']}\n"
if dashboard_data.get("content_angle"):
ledger += f"**Content Angle:** {dashboard_data['content_angle']}\n"
if dashboard_data.get("session_goals"):
ledger += "\n**Session Goals**\n"
for goal in dashboard_data["session_goals"]:
ledger += f"- {goal}\n"
elif session.theme:
ledger += f"{session.theme}\n"
else:
ledger += "*No theme recorded*\n"