diff --git a/external.ts b/external.ts index b1b3d6a..ac5daa0 100644 --- a/external.ts +++ b/external.ts @@ -12,6 +12,7 @@ export const ghPullfrogMcpName = "gh_pullfrog"; export interface AgentManifest { displayName: string; apiKeyNames: string[]; + url: string; } // agent manifest - static metadata about available agents @@ -19,18 +20,22 @@ export const agentsManifest = { claude: { displayName: "Claude Code", apiKeyNames: ["anthropic_api_key"], + url: "https://claude.com/claude-code", }, codex: { displayName: "Codex CLI", apiKeyNames: ["openai_api_key"], + url: "https://platform.openai.com/docs/guides/codex", }, cursor: { displayName: "Cursor CLI", apiKeyNames: ["cursor_api_key"], + url: "https://cursor.com/", }, gemini: { displayName: "Gemini CLI", apiKeyNames: ["google_api_key", "gemini_api_key"], + url: "https://ai.google.dev/gemini-api/docs", }, } as const satisfies Record; diff --git a/mcp/comment.ts b/mcp/comment.ts index 7aedf2b..45f82ac 100644 --- a/mcp/comment.ts +++ b/mcp/comment.ts @@ -11,18 +11,7 @@ function buildCommentFooter(payload: Payload): string { const agentName = payload.agent; const agentInfo = agentName ? agentsManifest[agentName] : null; const agentDisplayName = agentInfo?.displayName || "Unknown Agent"; - - // agent URLs based on manifest - const agentUrls: Record = { - claude: "https://claude.com/claude-code", - codex: "https://platform.openai.com/docs/guides/codex", - cursor: "https://cursor.com/", - gemini: "https://ai.google.dev/gemini-api/docs", - }; - - const agentUrl = agentName - ? agentUrls[agentName] || "https://pullfrog.ai" - : "https://pullfrog.ai"; + const agentUrl = agentInfo?.url || "https://pullfrog.ai"; // build workflow run URL const workflowRunUrl = runId