Do not return diff. Stick with opus
This commit is contained in:
+1
-2
@@ -53,11 +53,10 @@ export const claude = agent({
|
|||||||
// This ensures secrets are only available to Claude Code subprocess, not user code
|
// This ensures secrets are only available to Claude Code subprocess, not user code
|
||||||
const queryInstance = query({
|
const queryInstance = query({
|
||||||
prompt,
|
prompt,
|
||||||
|
|
||||||
options: {
|
options: {
|
||||||
...sandboxOptions,
|
...sandboxOptions,
|
||||||
mcpServers,
|
mcpServers,
|
||||||
|
model: "claude-opus-4-5",
|
||||||
pathToClaudeCodeExecutable: cliPath,
|
pathToClaudeCodeExecutable: cliPath,
|
||||||
env: createAgentEnv({ ANTHROPIC_API_KEY: apiKey }),
|
env: createAgentEnv({ ANTHROPIC_API_KEY: apiKey }),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -92629,7 +92629,7 @@ ${disableProgressComment ? "" : `
|
|||||||
description: "Review code, PRs, or implementations; provide feedback or suggestions; identify issues; or check code quality, style, and correctness",
|
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.
|
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.
|
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: {
|
options: {
|
||||||
...sandboxOptions,
|
...sandboxOptions,
|
||||||
mcpServers,
|
mcpServers,
|
||||||
|
model: "claude-opus-4-5",
|
||||||
pathToClaudeCodeExecutable: cliPath,
|
pathToClaudeCodeExecutable: cliPath,
|
||||||
env: createAgentEnv({ ANTHROPIC_API_KEY: apiKey })
|
env: createAgentEnv({ ANTHROPIC_API_KEY: apiKey })
|
||||||
}
|
}
|
||||||
@@ -123127,7 +123128,7 @@ async function checkoutPrBranch(params) {
|
|||||||
function CheckoutPrTool(ctx) {
|
function CheckoutPrTool(ctx) {
|
||||||
return tool({
|
return tool({
|
||||||
name: "checkout_pr",
|
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,
|
parameters: CheckoutPr,
|
||||||
execute: execute(async ({ pull_number }) => {
|
execute: execute(async ({ pull_number }) => {
|
||||||
const result = await checkoutPrBranch({
|
const result = await checkoutPrBranch({
|
||||||
@@ -123166,7 +123167,6 @@ ${diffPreview}`);
|
|||||||
const diffPath = join8(tempDir, `pr-${pull_number}.diff`);
|
const diffPath = join8(tempDir, `pr-${pull_number}.diff`);
|
||||||
writeFileSync4(diffPath, diffContent);
|
writeFileSync4(diffPath, diffContent);
|
||||||
log.debug(`wrote diff to ${diffPath} (${diffContent.length} bytes)`);
|
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 {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
number: pr.data.number,
|
number: pr.data.number,
|
||||||
@@ -123177,7 +123177,6 @@ ${diffPreview}`);
|
|||||||
maintainerCanModify: pr.data.maintainer_can_modify,
|
maintainerCanModify: pr.data.maintainer_can_modify,
|
||||||
url: pr.data.html_url,
|
url: pr.data.html_url,
|
||||||
headRepo: headRepo.full_name,
|
headRepo: headRepo.full_name,
|
||||||
diff,
|
|
||||||
diffPath
|
diffPath
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|||||||
+1
-6
@@ -94,7 +94,6 @@ export type CheckoutPrResult = {
|
|||||||
maintainerCanModify: boolean;
|
maintainerCanModify: boolean;
|
||||||
url: string;
|
url: string;
|
||||||
headRepo: string;
|
headRepo: string;
|
||||||
diff: string;
|
|
||||||
diffPath: string;
|
diffPath: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -217,7 +216,7 @@ export function CheckoutPrTool(ctx: ToolContext) {
|
|||||||
name: "checkout_pr",
|
name: "checkout_pr",
|
||||||
description:
|
description:
|
||||||
"Checkout a pull request branch locally. This fetches the PR branch and sets up push configuration for fork PRs. " +
|
"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,
|
parameters: CheckoutPr,
|
||||||
execute: execute(async ({ pull_number }) => {
|
execute: execute(async ({ pull_number }) => {
|
||||||
const result = await checkoutPrBranch({
|
const result = await checkoutPrBranch({
|
||||||
@@ -263,9 +262,6 @@ export function CheckoutPrTool(ctx: ToolContext) {
|
|||||||
writeFileSync(diffPath, diffContent);
|
writeFileSync(diffPath, diffContent);
|
||||||
log.debug(`wrote diff to ${diffPath} (${diffContent.length} bytes)`);
|
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 {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
number: pr.data.number,
|
number: pr.data.number,
|
||||||
@@ -276,7 +272,6 @@ export function CheckoutPrTool(ctx: ToolContext) {
|
|||||||
maintainerCanModify: pr.data.maintainer_can_modify,
|
maintainerCanModify: pr.data.maintainer_can_modify,
|
||||||
url: pr.data.html_url,
|
url: pr.data.html_url,
|
||||||
headRepo: headRepo.full_name,
|
headRepo: headRepo.full_name,
|
||||||
diff,
|
|
||||||
diffPath,
|
diffPath,
|
||||||
} satisfies CheckoutPrResult;
|
} satisfies CheckoutPrResult;
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ ${
|
|||||||
"Review code, PRs, or implementations; provide feedback or suggestions; identify issues; or check code quality, style, and correctness",
|
"Review code, PRs, or implementations; provide feedback or suggestions; identify issues; or check code quality, style, and correctness",
|
||||||
prompt: `Follow these steps. THINK HARDER.
|
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.
|
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.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user