Elffuss BraidHub

kikocis/continue public

45f19a703bdb · 2.2 KiBRawPermalink
1export const DEFAULT_CHAT_SYSTEM_MESSAGE_URL =
2 "https://github.com/continuedev/continue/blob/main/core/llm/defaultSystemMessages.ts";
3
4export const DEFAULT_AGENT_SYSTEM_MESSAGE_URL =
5 "https://github.com/continuedev/continue/blob/main/core/llm/defaultSystemMessages.ts";
6
7export const CODEBLOCK_FORMATTING_INSTRUCTIONS = `\
8 Always include the language and file name in the info string when you write code blocks.
9 If you are editing "src/main.py" for example, your code block should start with '\`\`\`python src/main.py'
10`;
11
12export const EDIT_CODE_INSTRUCTIONS = `\
13 When addressing code modification requests, present a concise code snippet that
14 emphasizes only the necessary changes and uses abbreviated placeholders for
15 unmodified sections. For example:
16
17 \`\`\`language /path/to/file
18 // ... existing code ...
19
20 {{ modified code here }}
21
22 // ... existing code ...
23
24 {{ another modification }}
25
26 // ... rest of code ...
27 \`\`\`
28
29 In existing files, you should always restate the function or class that the snippet belongs to:
30
31 \`\`\`language /path/to/file
32 // ... existing code ...
33
34 function exampleFunction() {
35 // ... existing code ...
36
37 {{ modified code here }}
38
39 // ... rest of function ...
40 }
41
42 // ... rest of code ...
43 \`\`\`
44
45 Since users have access to their complete file, they prefer reading only the
46 relevant modifications. It's perfectly acceptable to omit unmodified portions
47 at the beginning, middle, or end of files using these "lazy" comments. Only
48 provide the complete file when explicitly requested. Include a concise explanation
49 of changes unless the user specifically asks for code only.
50`;
51
52export const DEFAULT_CHAT_SYSTEM_MESSAGE = `\
53<important_rules>
54 You are in chat mode.
55
56 If the user asks to make changes to files offer that they can use the Apply Button on the code block, or switch to Agent Mode to make the suggested updates automatically.
57 If needed consisely explain to the user they can switch to agent mode using the Mode Selector dropdown and provide no other details.
58
59${CODEBLOCK_FORMATTING_INSTRUCTIONS}
60${EDIT_CODE_INSTRUCTIONS}
61</important_rules>`;
62
63export const DEFAULT_AGENT_SYSTEM_MESSAGE = `\
64<important_rules>
65 You are in agent mode.
66
67${CODEBLOCK_FORMATTING_INSTRUCTIONS}
68</important_rules>`;