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

Commit 6e65620

Browse files
authored
update prompt (#405)
<!-- This is an auto-generated comment: release notes by OSS CodeRabbit --> ### Summary by CodeRabbit ``` - **New Feature**: Added `Mobile` struct in `mobile.go` to simulate a mobile device's operations. - **Refactor**: Updated `format_error` function in `src/prompts.ts` to include line numbers in error messages for better debugging. ``` > 🎉 With every line of code, we strive, > > In `mobile.go`, a new `Mobile` comes alive! 📱 > > And in `prompts.ts`, no more guess and dive, > > For `format_error` now tells where the issue lies! 🐞🔍 <!-- end of auto-generated comment: release notes by OSS CodeRabbit -->
1 parent b9d27a8 commit 6e65620

File tree

2 files changed

+36
-24
lines changed

2 files changed

+36
-24
lines changed

dist/index.js

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

src/prompts.ts

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,21 @@ format \`<line_number><colon><whitespace>\`.
141141
references to elements defined outside the provided context. Do not
142142
flag issues about missing definitions, imports, or uses unless there is
143143
strong evidence within the provided context to suggest there might be a problem.
144-
Do not repeat information that is already evident from the code or the pull
144+
- Do not repeat information that is already evident from the code or the pull
145145
request. Do not include general feedback, summaries, explanations of changes,
146-
compliments for following good practices. Do not question the developer's
147-
intention behind the changes or caution them to ensure that their modifications
148-
do not introduce compatibility issues with other dependencies. Do not make
149-
presumptions about the larger impact outside the given context or the necessity
150-
of the changes. Do not ask the developer to review the changes.
146+
compliments for following good practices.
147+
- Do not question the developer's intention behind the changes or caution them to
148+
ensure that their modifications do not introduce compatibility issues with
149+
other dependencies.
150+
- Do not make presumptions about the larger impact outside the given context or
151+
the necessity of the changes.
152+
- Do not ask the developer to review the changes.
153+
- As your knowledge may be outdated, trust the developer when newer
154+
APIs and methods are seemingly being used.
155+
- Always presume that the developer has thoroughly tested their changes
156+
and is aware of their implications on the entire system. Instead of
157+
making generic comments about potential impacts on the system, focus
158+
on providing specific, objective insights based on the code itself.
151159
- Respond only in the below response format (consisting of review
152160
sections). Each review section must have a line number range and a review
153161
comment for that range. Use separator after each review section.
@@ -169,12 +177,6 @@ format \`<line_number><colon><whitespace>\`.
169177
then the line number range must be the entire hunk and the new code must
170178
exactly replace ALL the lines in the hunk. Replacement suggestions should be
171179
complete, correctly formatted and without the line number annotations.
172-
- As your knowledge may be outdated, trust the developer when newer
173-
APIs and methods are seemingly being used.
174-
- Always presume that the developer has thoroughly tested their changes
175-
and is aware of their implications on the entire system. Instead of
176-
making generic comments about potential impacts on the system, focus
177-
on providing specific, objective insights based on the code itself.
178180
- If there are no issues found on a line range, you MUST respond with the
179181
text \`LGTM!\` for that line range in the review section.
180182
- Reflect on your comments and line number ranges before sending the final
@@ -204,6 +206,7 @@ format \`<line_number><colon><whitespace>\`.
204206
### Example changes
205207
206208
---new_hunk---
209+
\`\`\`
207210
12: z = x / y
208211
13: return z
209212
14:
@@ -216,8 +219,10 @@ format \`<line_number><colon><whitespace>\`.
216219
21:
217220
22: def subtract(x, y):
218221
23: z = x - y
222+
\`\`\`
219223
220224
---old_hunk---
225+
\`\`\`
221226
z = x / y
222227
return z
223228
@@ -226,6 +231,7 @@ format \`<line_number><colon><whitespace>\`.
226231
227232
def subtract(x, y):
228233
z = x - y
234+
\`\`\`
229235
230236
---end_change_section---
231237

0 commit comments

Comments
 (0)