diff --git a/agents/project_monitor.py b/agents/project_monitor.py index 90d83ad..d3124ae 100644 --- a/agents/project_monitor.py +++ b/agents/project_monitor.py @@ -333,13 +333,28 @@ def run(config, user_id=None, instance_id=None): print(f" LLM: {model}, {tokens_in}+{tokens_out} tokens") + # Build quick links + app_url = config.get("app_url", "") + gitea_repo = config.get("gitea_repo", "") + wiki_collection = config.get("wiki_collection_id", "") + links = [] + if app_url: + links.append(f"[Live App]({app_url})") + if wiki_collection: + links.append(f"[Wiki](https://wiki.jfamily.io/collection/{wiki_collection})") + if gitea_repo: + links.append(f"[Gitea](http://192.168.1.204:3000/{gitea_repo})") + links_md = " | ".join(links) if links else "" + # Post full report to wiki - report_collection = config.get("report_collection_id", "") or config.get("wiki_collection_id", "") + report_collection = config.get("report_collection_id", "") or wiki_collection doc_id = None if report_collection: now = datetime.now(MT) full_report = f"# Project Status — {project_name}\n\n" full_report += f"**{now.strftime('%A, %B %d, %Y')}** | Generated by Project Monitor Agent\n\n" + if links_md: + full_report += f"{links_md}\n\n" full_report += f"---\n\n{report_md}\n\n" full_report += f"---\n*Model: {model} | Tokens: {tokens_in} in, {tokens_out} out*\n" doc_id = post_report_to_wiki(full_report, project_name, report_collection) @@ -359,8 +374,10 @@ def run(config, user_id=None, instance_id=None): summary_lines.append(line.strip()) summary = " ".join(summary_lines)[:200] if summary_lines else report_md[:200] - # Briefing section + # Briefing section with links section = f"### {project_name}\n\n{summary}\n" + if links_md: + section += f"\n{links_md}\n" log_run(AGENT_ID, "success", output=f"{project_name}: {summary[:100]}", instance_id=instance_id, metadata={ "project": project_name,