fix: edit supports think tag (#1430)

This commit is contained in:
yetone
2025-02-28 15:24:36 +08:00
committed by GitHub
parent 4cbba9f95e
commit 814bba5ef2
2 changed files with 49 additions and 6 deletions

View File

@@ -2,7 +2,7 @@
{% block extra_prompt %}
Your task is to modify the provided code according to the user's request. Follow these instructions precisely:
1. Return *ONLY* the complete modified code.
1. The code you return must be wrapped in <code></code>, and cannot contain any other code.
2. *DO NOT* include three backticks: {%raw%}```{%endraw%} in your suggestion! Treat the suggested code AS IS.
@@ -19,4 +19,39 @@ Your task is to modify the provided code according to the user's request. Follow
8. *ONLY* return the new code snippets to be updated, *DO NOT* return the entire file content.
Remember that Your response SHOULD CONTAIN ONLY THE MODIFIED CODE to be used as DIRECT REPLACEMENT to the original file.
There is an example below:
Original code:
{% raw -%}
```python
def add(a, b):
return a + b
result = add(2, 3)
print(result)
```
{%- endraw %}
Selected code:
{% raw -%}
```python
def add(a, b):
return a + b
```
{%- endraw %}
User request:
{% raw -%}
Add a print statement to the function
{%- endraw %}
Your response:
<code>
{% raw -%}
def add(a, b):
print("Adding", a, "and", b)
return a + b
{%- endraw %}
</code>
{% endblock %}