Add Gitea commit lookup tools

This commit is contained in:
2026-06-10 11:07:27 +09:00
parent 75e85887b5
commit 060a6950a4
4 changed files with 172 additions and 6 deletions

View File

@@ -1331,7 +1331,7 @@ class TelegramCodexBot:
f"{runtime_settings}\n"
"Configured Gitea integration:\n"
f"{gitea_context}\n"
"If the user asks for repository, issue, branch, or pull-request metadata in Gitea, "
"If the user asks for repository, commit, issue, branch, or pull-request metadata in Gitea, "
"use the gitea_* MCP tools. Never reveal GITEA_TOKEN or print commands that embed it. "
"For HTTPS git clone/fetch/push, the container may provide GIT_ASKPASS from the "
"configured Gitea environment.\n"
@@ -1788,7 +1788,11 @@ def _scheduled_prompt(schedule: dict) -> str:
return (
"This is a scheduled Telegram bridge task. Run the task now and produce a concise "
"Telegram-ready response. Do not create another schedule unless the task explicitly "
"asks you to change scheduling.\n\n"
"asks you to change scheduling. If repository history is relevant, prefer the Gitea "
"commit tools. Do not describe a missing tool or unavailable detail as a permission "
"problem unless an API error explicitly says permission was denied. Only include a "
"commit summary when the task asks for repository history or a repository can be "
"identified from the task/context.\n\n"
f"Schedule: {format_schedule(schedule)}\n\n"
f"Task:\n{schedule.get('prompt') or ''}"
)