Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.

Commit 9ac6a1f

Browse files
authored
remove conflicting instruction (#261)
<!-- This is an auto-generated comment: release notes by openai --> ### Summary by OpenAI ### Release Notes - Documentation: Clarified the format for line number annotations and replacement suggestions, and added guidelines for suggesting new code snippets. > "Code quality improved, > Bugs and errors removed. > With each change we grow, > Our codebase starts to glow." <!-- end of auto-generated comment: release notes by openai -->
1 parent f994f20 commit 9ac6a1f

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

dist/index.js

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/prompts.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,14 @@ Instructions:
9494
an old hunk, and optionally, existing comment chains. Note that the
9595
old hunk code has been replaced by the new hunk. The line number
9696
annotation on each line in the new hunk is of the format
97-
\`<line_number><colon><whitespace>\`.
97+
\`<line_number><colon><whitespace>\` , i.e. \`^*(\\d+): \`.
9898
- Your task is to review ONLY the new hunks line by line, ONLY pointing out
9999
substantive issues within line number ranges. Provide the exact line
100100
number range (inclusive) for each issue. Take into account any supplementary
101101
context from the old hunks, comment threads, and file contents during your
102102
review process. Concentrate on pinpointing particular problems, and refrain
103103
from offering summaries of changes, general feedback, or praise for
104-
exceptional work. Additionally, avoid reiterating the provided code in your
105-
review comments.
104+
exceptional work.
106105
- IMPORTANT: Respond only in the response format (consisting of review
107106
sections). Each review section must have a line number range and a review
108107
comment for that range. Do not include general feedback or summaries. You
@@ -115,20 +114,21 @@ Instructions:
115114
your comment to the code changes in the GitHub pull request.
116115
- Use Markdown format for review comment text and fenced code blocks for
117116
code snippets. Do not annotate code snippets with line numbers.
118-
- If needed, provide replacement suggestions using fenced code blocks with the
119-
\`suggestion\` language identifier. The line number range must map exactly
120-
to the range (inclusive) that needs to be replaced within a new hunk. For
121-
instance, if 2 lines of code in a hunk need to be replaced with 15 lines
122-
of code, the line number range must be those exact 2 lines. If an entire
123-
hunk need to be replaced with new code, then the line number range must
124-
be the entire hunk.
117+
- If needed, provide replacement code suggestions to fix the issue by using
118+
fenced code blocks with the \`suggestion\` as the language identifier. The
119+
line number range must map exactly to the range (inclusive) that needs to
120+
be replaced within a new hunk. For instance, if 2 lines of code in a hunk
121+
need to be replaced with 15 lines of code, the line number range must be
122+
those exact 2 lines. If an entire hunk need to be replaced with new code,
123+
then the line number range must be the entire hunk and the new code must
124+
exactly replace all the lines in the hunk.
125125
- Replacement suggestions should be complete, correctly formatted and without
126126
the line number annotations. Each suggestion must be provided as a separate
127127
review section with relevant line number ranges.
128-
- If needed, suggest new code using the correct language identifier in the
129-
fenced code blocks. These snippets may be added to a different file,
130-
such as test cases. Multiple new code snippets are allowed within a single
131-
review section.
128+
- If needed, suggest new code snippets using the correct language identifier in the
129+
fenced code blocks. These snippets may be added to a different file
130+
(e.g. test cases), or within the same file at locations outside the provided
131+
hunks. Multiple new code snippets are allowed within a single review section.
132132
- If there are no substantive issues detected at a line range and/or the
133133
implementation looks good, you must respond with the comment "LGTM!" and
134134
nothing else for the respective line range in a review section.

0 commit comments

Comments
 (0)