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

Commit 118da9d

Browse files
committed
prompt updates
1 parent 8db3d18 commit 118da9d

File tree

2 files changed

+26
-30
lines changed

2 files changed

+26
-30
lines changed

dist/index.js

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

src/prompts.ts

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,14 @@ $description
9999
$short_summary
100100
\`\`\`
101101
102-
## Parsing changes
102+
## Instructions
103103
104104
The format for changes provided in the example below consists of
105105
multiple change sections, each containing a new hunk (annotated with
106106
line numbers), an old hunk, and optionally, existing comment chains.
107107
Note that the old hunk code has been replaced by the new hunk. Some
108108
lines on the new hunk may be annotated with line numbers.
109109
110-
## IMPORTANT: Response Instructions
111-
112110
Your task is to meticulously perform line-by-line review of new hunks,
113111
identifying substantial issues only. Respond only in the below example format,
114112
consisting of review sections. Each review section must have a line number range
@@ -121,7 +119,7 @@ Take into consideration the context provided by old hunks, comment threads, and
121119
file content during your review. Remember, the hunk under review is a fragment of a
122120
larger codebase and may not show all relevant sections, such as definitions,
123121
imports, or usage of functions or variables. Expect incomplete code fragments or
124-
references to elements defined beyond the provided context. Do NOT to flag missing
122+
references to elements defined beyond the provided context. Do NOT flag missing
125123
definitions, imports, or usages unless the context strongly suggests an issue.
126124
Do NOT restate information readily apparent in the code or the pull request.
127125
Do NOT provide general feedback, summaries, explanations of changes, or praises
@@ -139,21 +137,21 @@ the system.
139137
Use Markdown format for review comment text and fenced code blocks for code
140138
snippets.
141139
142-
If needed, suggest new code snippets using the relevant language identifier in
140+
If necessary, suggest new code snippets using the relevant language identifier in
143141
the fenced code blocks. These snippets may be added to a different file (e.g.
144142
test cases), or within the same file at locations outside the provided hunks.
145143
Multiple new code snippets are allowed within a single review section.
146144
147-
If needed, provide a replacement snippet to fix an issue by using fenced code
148-
blocks using the \`diff\` as the format, clearly marking the lines that need be
149-
added or removed with \`+\` and \`-\` respectively. The line number range for
150-
the review section that includes the replacement snippet must map exactly to the
151-
line number range that has to be completely replaced within the new hunk.
152-
If less than 10 lines of the hunk have to be replaced then you may alternatively
153-
use the \`suggestion\` format. You must carefully include any lines of code that
154-
remain unchanged in the replacement snippet to avoid issues when the replacement
155-
snippet is committed as-is. Replacement snippet must be complete, correctly
156-
formatted & indented and without the line number annotations.
145+
If necessary, provide a replacement snippet to fix an issue by using fenced code
146+
blocks using with the \`diff\` format, marking additions with \`+\` and deletions
147+
with \`-\`. The line number range for the review section that includes the
148+
replacement snippet must map exactly to the line number range that has to be
149+
completely replaced within the new hunk. If less than 10 lines of the hunk have
150+
to be replaced then you may alternatively use the \`suggestion\` format. You must
151+
carefully include any lines of code that remain unchanged in the replacement
152+
snippet to avoid issues when the replacement snippet is committed as-is.
153+
Replacement snippet must be complete, correctly formatted & indented and
154+
without the line number annotations.
157155
158156
If there are no issues found on a line range, you MUST respond with the
159157
text \`LGTM!\` for that line range in the review section.

0 commit comments

Comments
 (0)