up
This commit is contained in:
@@ -377,9 +377,10 @@ const BASE_BOOKMARK_PROMPT_FALLBACK =
|
||||
"Review the code changes against the base bookmark '{bookmark}'. Start by finding the merge-base revision between the working copy and {bookmark}, then run `jj diff --from <merge-base> --to @` to see what changes would land on the {bookmark} bookmark. Provide prioritized, actionable findings.";
|
||||
|
||||
const CHANGE_PROMPT_WITH_TITLE =
|
||||
'Review the code changes introduced by change {changeId} ("{title}"). Provide prioritized, actionable findings.';
|
||||
'Review the code changes introduced by change {changeId} ("{title}"). Run `jj diff --from {changeId}- --to {changeId}` to inspect the changes introduced by this change. Provide prioritized, actionable findings.';
|
||||
|
||||
const CHANGE_PROMPT = "Review the code changes introduced by change {changeId}. Provide prioritized, actionable findings.";
|
||||
const CHANGE_PROMPT =
|
||||
"Review the code changes introduced by change {changeId}. Run `jj diff --from {changeId}- --to {changeId}` to inspect the changes introduced by this change. Provide prioritized, actionable findings.";
|
||||
|
||||
const PULL_REQUEST_PROMPT =
|
||||
'Review pull request #{prNumber} ("{title}") against the base bookmark \'{baseBookmark}\'. The merge-base revision for this comparison is {mergeBaseSha}. Run `jj diff --from {mergeBaseSha} --to @` to inspect the changes that would be merged. Provide prioritized, actionable findings.';
|
||||
@@ -979,9 +980,9 @@ async function buildReviewPrompt(
|
||||
|
||||
case "change":
|
||||
if (target.title) {
|
||||
return CHANGE_PROMPT_WITH_TITLE.replace("{changeId}", target.changeId).replace("{title}", target.title);
|
||||
return CHANGE_PROMPT_WITH_TITLE.replace(/{changeId}/g, target.changeId).replace("{title}", target.title);
|
||||
}
|
||||
return CHANGE_PROMPT.replace("{changeId}", target.changeId);
|
||||
return CHANGE_PROMPT.replace(/{changeId}/g, target.changeId);
|
||||
|
||||
case "pullRequest": {
|
||||
const baseBookmarkLabel = bookmarkRefToLabel({ name: target.baseBookmark, remote: target.baseRemote });
|
||||
|
||||
Reference in New Issue
Block a user