Do not return diff. Stick with opus

This commit is contained in:
Colin McDonnell
2025-12-22 18:22:35 -08:00
parent 7fb788a883
commit 8db0c40487
4 changed files with 6 additions and 13 deletions
+1 -2
View File
@@ -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 }),
},
+3 -4
View File
@@ -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
};
})
+1 -6
View File
@@ -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;
}),
+1 -1
View File
@@ -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.