diff --git a/agents/claude.ts b/agents/claude.ts index 87209bd..c7e00bc 100644 --- a/agents/claude.ts +++ b/agents/claude.ts @@ -53,11 +53,10 @@ export const claude = agent({ // This ensures secrets are only available to Claude Code subprocess, not user code const queryInstance = query({ prompt, - options: { ...sandboxOptions, mcpServers, - + model: "claude-opus-4-5", pathToClaudeCodeExecutable: cliPath, env: createAgentEnv({ ANTHROPIC_API_KEY: apiKey }), }, diff --git a/entry b/entry index 8faec09..2919138 100755 --- a/entry +++ b/entry @@ -92629,7 +92629,7 @@ ${disableProgressComment ? "" : ` description: "Review code, PRs, or implementations; provide feedback or suggestions; identify issues; or check code quality, style, and correctness", prompt: `Follow these steps. THINK HARDER. -1. **CHECKOUT** - Use ${ghPullfrogMcpName}/checkout_pr with the PR number. This returns all PR metadata (title, base, head, fork status) AND a \`diffPath\` pointing to a file containing the formatted diff. +1. **CHECKOUT** - Call ${ghPullfrogMcpName}/checkout_pr with the PR number. This returns all PR metadata you need (title, base, head, fork status, url) - do not call get_pull_request separately. It also returns a \`diffPath\` - read this file to see the diff. 2. **UNDERSTAND CONTEXT** - Read the modified files to understand the changes in context. Don't just look at the diff - understand how the changes affect the overall codebase. @@ -93340,6 +93340,7 @@ var claude = agent({ options: { ...sandboxOptions, mcpServers, + model: "claude-opus-4-5", pathToClaudeCodeExecutable: cliPath, env: createAgentEnv({ ANTHROPIC_API_KEY: apiKey }) } @@ -123127,7 +123128,7 @@ async function checkoutPrBranch(params) { function CheckoutPrTool(ctx) { return tool({ name: "checkout_pr", - description: "Checkout a pull request branch locally. This fetches the PR branch and sets up push configuration for fork PRs. The PR diff is written to a file (diffPath) for grep access. For small diffs, it's also returned inline.", + description: "Checkout a pull request branch locally. This fetches the PR branch and sets up push configuration for fork PRs. Returns diffPath pointing to the formatted diff file.", parameters: CheckoutPr, execute: execute(async ({ pull_number }) => { const result = await checkoutPrBranch({ @@ -123166,7 +123167,6 @@ ${diffPreview}`); const diffPath = join8(tempDir, `pr-${pull_number}.diff`); writeFileSync4(diffPath, diffContent); log.debug(`wrote diff to ${diffPath} (${diffContent.length} bytes)`); - const diff = `Diff written to ${diffPath} (${(diffContent.length / 1024).toFixed(1)}KB). Use grep or read_file to explore.`; return { success: true, number: pr.data.number, @@ -123177,7 +123177,6 @@ ${diffPreview}`); maintainerCanModify: pr.data.maintainer_can_modify, url: pr.data.html_url, headRepo: headRepo.full_name, - diff, diffPath }; }) diff --git a/mcp/checkout.ts b/mcp/checkout.ts index dccdd72..2d249fe 100644 --- a/mcp/checkout.ts +++ b/mcp/checkout.ts @@ -94,7 +94,6 @@ export type CheckoutPrResult = { maintainerCanModify: boolean; url: string; headRepo: string; - diff: string; diffPath: string; }; @@ -217,7 +216,7 @@ export function CheckoutPrTool(ctx: ToolContext) { name: "checkout_pr", description: "Checkout a pull request branch locally. This fetches the PR branch and sets up push configuration for fork PRs. " + - "The PR diff is written to a file (diffPath) for grep access. For small diffs, it's also returned inline.", + "Returns diffPath pointing to the formatted diff file.", parameters: CheckoutPr, execute: execute(async ({ pull_number }) => { const result = await checkoutPrBranch({ @@ -263,9 +262,6 @@ export function CheckoutPrTool(ctx: ToolContext) { writeFileSync(diffPath, diffContent); log.debug(`wrote diff to ${diffPath} (${diffContent.length} bytes)`); - // don't inline diff - always point to file to reduce context size - const diff = `Diff written to ${diffPath} (${(diffContent.length / 1024).toFixed(1)}KB). Use grep or read_file to explore.`; - return { success: true, number: pr.data.number, @@ -276,7 +272,6 @@ export function CheckoutPrTool(ctx: ToolContext) { maintainerCanModify: pr.data.maintainer_can_modify, url: pr.data.html_url, headRepo: headRepo.full_name, - diff, diffPath, } satisfies CheckoutPrResult; }), diff --git a/modes.ts b/modes.ts index 6ea00ee..47c926e 100644 --- a/modes.ts +++ b/modes.ts @@ -101,7 +101,7 @@ ${ "Review code, PRs, or implementations; provide feedback or suggestions; identify issues; or check code quality, style, and correctness", prompt: `Follow these steps. THINK HARDER. -1. **CHECKOUT** - Use ${ghPullfrogMcpName}/checkout_pr with the PR number. This returns all PR metadata (title, base, head, fork status) AND a \`diffPath\` pointing to a file containing the formatted diff. +1. **CHECKOUT** - Call ${ghPullfrogMcpName}/checkout_pr with the PR number. This returns all PR metadata you need (title, base, head, fork status, url) - do not call get_pull_request separately. It also returns a \`diffPath\` - read this file to see the diff. 2. **UNDERSTAND CONTEXT** - Read the modified files to understand the changes in context. Don't just look at the diff - understand how the changes affect the overall codebase.