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:
|
Guidelines:
|
||||||
1. Make sure you have maintained the user's existing whitespace and indentation. This is REALLY IMPORTANT!
|
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.
|
2. Each code snippet returned in the list must not overlap, and together they complete the same task.
|
||||||
3. DO NOT include three backticks: {%raw%}```{%endraw%} in your suggestion. Treat the suggested code AS IS.
|
3. The more code snippets returned at once, the better.
|
||||||
4. Each element in the returned list is a COMPLETE code snippet.
|
4. If there is incomplete code on the current line where the cursor is located, prioritize completing the code on the current line.
|
||||||
5. MUST be a valid JSON format. DO NOT be lazy!
|
5. DO NOT include three backticks: {%raw%}```{%endraw%} in your suggestion. Treat the suggested code AS IS.
|
||||||
6. Only return the new code to be inserted. DO NOT be lazy!
|
6. Each element in the returned list is a COMPLETE code snippet.
|
||||||
7. Please strictly check the code around the position and ensure that the complete code after insertion is correct. DO NOT be lazy!
|
7. MUST be a valid JSON format. DO NOT be lazy!
|
||||||
8. Do not return the entire file content or any surrounding code.
|
8. Only return the new code to be inserted. DO NOT be lazy!
|
||||||
9. Do not include any explanations, comments, or line numbers in your response.
|
9. Please strictly check the code around the position and ensure that the complete code after insertion is correct. DO NOT be lazy!
|
||||||
10. Ensure the suggested code fits seamlessly with the existing code structure and indentation.
|
10. Do not return the entire file content or any surrounding code.
|
||||||
11. If there are no recommended modifications, return an empty list.
|
11. Do not include any explanations, comments, or line numbers in your response.
|
||||||
12. Remember to ONLY RETURN the suggested code snippet, without any additional formatting or explanation.
|
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 %}
|
{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user