You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(web): add optional PR/MR summary comment to review agent
Adds REVIEW_AGENT_SUMMARY_ENABLED (default false) and REVIEW_AGENT_SUMMARY_MAX_LENGTH (default 250) env vars. When enabled, the review agent generates a concise markdown summary of the PR/MR changes and posts it as a top-level comment before pushing inline review comments.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
logger.warn(`REVIEW_AGENT_MODEL="${env.REVIEW_AGENT_MODEL}" did not match any configured model displayName. Falling back to the first configured model.`);
25
+
}
26
+
}
27
+
28
+
const{ model, providerOptions, temperature }=awaitgetAISDKLanguageModelAndOptions(selectedModel);
constprompt=`Summarize the following pull request changes in ${maxSummaryLength} characters or fewer. Be concise and focus on what changed and why. You may use inline markdown (e.g. \`code\`, **bold**) but avoid headers, bullet lists, and block-level formatting.
33
+
34
+
PR Title: ${prPayload.title}
35
+
PR Description: ${prPayload.description}
36
+
Files changed: ${filesChanged}
37
+
`;
38
+
39
+
constresult=awaitgenerateText({
40
+
model,
41
+
system: `You are a code review assistant. Generate a concise markdown-compatible summary of pull request changes. The summary must be ${maxSummaryLength} characters or fewer. Avoid headers, bullet lists, and block-level formatting.`,
0 commit comments