mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-04-20 01:26:47 +00:00
remove duplicate deletion and addition signs
This commit is contained in:
parent
6293b88dcd
commit
30597b305c
3 changed files with 19 additions and 13 deletions
11
src/main.ts
11
src/main.ts
|
@ -80,8 +80,7 @@ async function analyzeCode(
|
|||
}
|
||||
|
||||
function createPrompt(file: File, chunk: Chunk, prDetails: PRDetails): string {
|
||||
return `
|
||||
Review the following code diff in the file "${
|
||||
return `Review the following code diff in the file "${
|
||||
file.to
|
||||
}" and take the pull request title and description into account when writing the response.
|
||||
|
||||
|
@ -97,12 +96,10 @@ Please provide comments and suggestions ONLY if there is something to improve, w
|
|||
|
||||
Diff to review:
|
||||
|
||||
---
|
||||
\`\`\`diff
|
||||
${chunk.content}
|
||||
${chunk.changes
|
||||
.map((c) => (c.type === "add" ? "+" : "-") + " " + c.content)
|
||||
.join("\n")}
|
||||
---
|
||||
${chunk.changes.map((c) => c.content).join("\n")}
|
||||
\`\`\`
|
||||
|
||||
Give the answer in following TSV format:
|
||||
line_number\treview_comment
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue