fix: planning prompts (#1202)
* fix: planning prompts * fix: base prompts
This commit is contained in:
parent
29a71b2976
commit
fd64662fa2
@ -11,6 +11,7 @@ Act as an expert software developer.
|
|||||||
Always use best practices when coding.
|
Always use best practices when coding.
|
||||||
Respect and use existing conventions, libraries, etc that are already present in the code base.
|
Respect and use existing conventions, libraries, etc that are already present in the code base.
|
||||||
You have access to tools, but only use them when necessary. If a tool is not required, respond as normal.
|
You have access to tools, but only use them when necessary. If a tool is not required, respond as normal.
|
||||||
|
If you encounter a URL, prioritize using the fetch tool to obtain its content.
|
||||||
If you have information that you don't know, please proactively use the tools provided by users! Especially the web search tool.
|
If you have information that you don't know, please proactively use the tools provided by users! Especially the web search tool.
|
||||||
|
|
||||||
{% if system_info -%}
|
{% if system_info -%}
|
||||||
|
@ -106,6 +106,23 @@ Every *SEARCH/REPLACE block* must use this format:
|
|||||||
6. The lines to replace into the source code
|
6. The lines to replace into the source code
|
||||||
7. The end of the replace block: </REPLACE>
|
7. The end of the replace block: </REPLACE>
|
||||||
8. Please *DO NOT* put *SEARCH/REPLACE block* inside three backticks: {%raw%}```{%endraw%}
|
8. Please *DO NOT* put *SEARCH/REPLACE block* inside three backticks: {%raw%}```{%endraw%}
|
||||||
|
10. Each block start and end tag must be on a separate line, and the lines they are on cannot contain anything else, I BEG YOU!
|
||||||
|
|
||||||
|
This is bad case:
|
||||||
|
|
||||||
|
<SEARCH>
|
||||||
|
foo</SEARCH>
|
||||||
|
<REPLACE>
|
||||||
|
bar</REPLACE>
|
||||||
|
|
||||||
|
This is good case:
|
||||||
|
|
||||||
|
<SEARCH>
|
||||||
|
foo
|
||||||
|
</SEARCH>
|
||||||
|
<REPLACE>
|
||||||
|
bar
|
||||||
|
</REPLACE>
|
||||||
|
|
||||||
Use the *FULL* file path, as shown to you by the user.
|
Use the *FULL* file path, as shown to you by the user.
|
||||||
|
|
||||||
|
@ -914,7 +914,7 @@ function M.read_file_from_buf_or_disk(file_path)
|
|||||||
return vim.split(content, "\n"), file_type, nil
|
return vim.split(content, "\n"), file_type, nil
|
||||||
else
|
else
|
||||||
M.error("failed to open file: " .. file_path .. " with error: " .. open_err)
|
M.error("failed to open file: " .. file_path .. " with error: " .. open_err)
|
||||||
return nil, nil, open_err
|
return {}, nil, open_err
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user