You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lua/codecompanion/interactions/chat/init.lua
+5-7Lines changed: 5 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -103,14 +103,12 @@ Use Markdown formatting in your answers.
103
103
DO NOT use H1 or H2 headers in your response.
104
104
When suggesting code changes or new content, use Markdown code blocks.
105
105
To start a code block, use 4 backticks.
106
-
After the backticks, add the programming language name as the language ID.
106
+
After the backticks, add the programming language name as the language ID and the file path within curly braces if available.
107
107
To close a code block, use 4 backticks on a new line.
108
-
If the code modifies an existing file or should be placed at a specific location, add a line comment with 'filepath:' and the file path.
109
-
If you want the user to decide where to place the code, do not add the file path comment.
110
-
In the code block, use a line comment with '...existing code...' to indicate code that is already present in the file.
108
+
If you want the user to decide where to place the code, do not add the file path.
109
+
In the code block, use a line comment with '...existing code...' to indicate code that is already present in the file. Ensure this comment is specific to the programming language.
111
110
Code block example:
112
-
````languageId
113
-
// filepath: /path/to/file
111
+
````languageId {path/to/file}
114
112
// ...existing code...
115
113
{ changed code }
116
114
// ...existing code...
@@ -121,7 +119,7 @@ Ensure line comments use the correct syntax for the programming language (e.g. "
121
119
For code blocks use four backticks to start and end.
122
120
Avoid wrapping the whole response in triple backticks.
123
121
Do not include diff formatting unless explicitly asked.
124
-
Do not include line numbers in code blocks.
122
+
Do not include line numbers unless explicitly asked.
125
123
126
124
When given a task:
127
125
1. Think step-by-step and, unless the user requests otherwise or the task is very simple. For complex architectural changes, describe your plan in pseudocode first.
0 commit comments