Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix issue with system_prompt replace not using correct value and fix …
…naming of USER_ prompts
  • Loading branch information
deathbeam committed Feb 27, 2024
commit 7c400db41e616e60fcbb259f39eb22aee0b7e572
2 changes: 1 addition & 1 deletion lua/CopilotChat/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ local function update_prompts(prompt)
if found.kind == 'user' then
return found.prompt
elseif found.kind == 'system' then
system_prompt = match
system_prompt = found.prompt
end
end

Expand Down
4 changes: 2 additions & 2 deletions lua/CopilotChat/prompts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ Response:
To read a file, you can use a [`FileReader`](src/fs/fileReader.ts) class from [src/fs/fileReader.ts](src/fs/fileReader.ts).
]]

M.USER_TEST = 'Write a set of detailed unit test functions for the code above.'
M.USER_EXPLAIN = 'Write a explanation for the code above as paragraphs of text.'
M.USER_TESTS = 'Write a set of detailed unit test functions for the code above.'
M.USER_FIX = 'There is a problem in this code. Rewrite the code to show it with the bug fixed.'
M.USER_DOC = [[Write documentation for the selected code.
M.USER_DOCS = [[Write documentation for the selected code.
The reply should be a codeblock containing the original code with the documentation added as comments.
Use the most appropriate documentation style for the programming language used (e.g. JSDoc for JavaScript, docstrings for Python etc.)
]]
Expand Down