feat: refine suggestion prompts (#1082)
This commit is contained in:
parent
25801daea8
commit
a874c2736a
@ -38,15 +38,18 @@ Your task is to suggest code modifications at the cursor position. Follow these
|
||||
|
||||
Guidelines:
|
||||
1. Make sure you have maintained the user's existing whitespace and indentation. This is REALLY IMPORTANT!
|
||||
2. Each segment in the returned list must be non-overlapping, and together they constitute this code modification.
|
||||
3. DO NOT include three backticks: {%raw%}```{%endraw%} in your suggestion. Treat the suggested code AS IS.
|
||||
4. Each element in the returned list is a COMPLETE code snippet.
|
||||
5. MUST be a valid JSON format. DO NOT be lazy!
|
||||
6. Only return the new code to be inserted. DO NOT be lazy!
|
||||
7. Please strictly check the code around the position and ensure that the complete code after insertion is correct. DO NOT be lazy!
|
||||
8. Do not return the entire file content or any surrounding code.
|
||||
9. Do not include any explanations, comments, or line numbers in your response.
|
||||
10. Ensure the suggested code fits seamlessly with the existing code structure and indentation.
|
||||
11. If there are no recommended modifications, return an empty list.
|
||||
12. Remember to ONLY RETURN the suggested code snippet, without any additional formatting or explanation.
|
||||
2. Each code snippet returned in the list must not overlap, and together they complete the same task.
|
||||
3. The more code snippets returned at once, the better.
|
||||
4. If there is incomplete code on the current line where the cursor is located, prioritize completing the code on the current line.
|
||||
5. DO NOT include three backticks: {%raw%}```{%endraw%} in your suggestion. Treat the suggested code AS IS.
|
||||
6. Each element in the returned list is a COMPLETE code snippet.
|
||||
7. MUST be a valid JSON format. DO NOT be lazy!
|
||||
8. Only return the new code to be inserted. DO NOT be lazy!
|
||||
9. Please strictly check the code around the position and ensure that the complete code after insertion is correct. DO NOT be lazy!
|
||||
10. Do not return the entire file content or any surrounding code.
|
||||
11. Do not include any explanations, comments, or line numbers in your response.
|
||||
12. Ensure the suggested code fits seamlessly with the existing code structure and indentation.
|
||||
13. If there are no recommended modifications, return an empty list.
|
||||
14. Remember to ONLY RETURN the suggested code snippet, without any additional formatting or explanation.
|
||||
15. The returned code must satisfy the context, especially the context where the current cursor is located.
|
||||
{% endblock %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user