review: append todo list to review body, always delete progress comment
- in Review mode, stop the todo tracker and append the completed task list as a collapsible section to the review body before submitting - always delete the progress comment after a review is submitted, regardless of whether the agent called report_progress Made-with: Cursor
This commit is contained in:
committed by
pullfrog[bot]
parent
8f7145e716
commit
426ef8c0d8
@@ -147426,6 +147426,16 @@ function CreatePullRequestReviewTool(ctx) {
|
||||
parameters: CreatePullRequestReview,
|
||||
execute: execute(async ({ pull_number, body, approved, commit_id, comments = [] }) => {
|
||||
if (body) body = fixDoubleEscapedString(body);
|
||||
if (body && ctx.toolState.selectedMode === "Review" && ctx.toolState.todoTracker) {
|
||||
ctx.toolState.todoTracker.cancel();
|
||||
await ctx.toolState.todoTracker.settled();
|
||||
const collapsible = ctx.toolState.todoTracker.renderCollapsible();
|
||||
if (collapsible) {
|
||||
body = `${body}
|
||||
|
||||
${collapsible}`;
|
||||
}
|
||||
}
|
||||
ctx.toolState.issueNumber = pull_number;
|
||||
if (!approved && !body && comments.length === 0) {
|
||||
log.info(
|
||||
@@ -151495,6 +151505,11 @@ ${instructions.user}` : null,
|
||||
log.debug(`post-review cleanup failed: ${error49}`);
|
||||
});
|
||||
}
|
||||
if (toolContext && toolState.review && toolState.progressCommentId) {
|
||||
await deleteProgressComment(toolContext).catch((error49) => {
|
||||
log.debug(`review progress comment cleanup failed: ${error49}`);
|
||||
});
|
||||
}
|
||||
const trackerWasLastWriter = todoTracker?.hasPublished && !toolState.finalSummaryWritten;
|
||||
if (toolContext && toolState.progressCommentId && (!toolState.wasUpdated || trackerWasLastWriter)) {
|
||||
await deleteProgressComment(toolContext).catch((error49) => {
|
||||
|
||||
Reference in New Issue
Block a user