diff --git a/core/llm/defaultSystemMessages.ts b/core/llm/defaultSystemMessages.ts index eebcc8510..c8f0997aa 100644 --- a/core/llm/defaultSystemMessages.ts +++ b/core/llm/defaultSystemMessages.ts @@ -46,6 +46,8 @@ export const EDIT_CODE_INSTRUCTIONS = `\ of changes unless the user specifically asks for code only. `; +const BRIEF_LAZY_INSTRUCTIONS = `For larger codeblocks, use brief language-appropriate placeholders for unmodified sections, e.g. '// ... existing code ...'";`; + export const DEFAULT_CHAT_SYSTEM_MESSAGE = `\ You are in chat mode. @@ -64,6 +66,11 @@ export const DEFAULT_AGENT_SYSTEM_MESSAGE = `\ If you need to use multiple tools, you can call multiple read only tools simultaneously. ${CODEBLOCK_FORMATTING_INSTRUCTIONS} + +${BRIEF_LAZY_INSTRUCTIONS} + +However, only output codeblocks for suggestion and planning purposes. For making changes, use the edit tools + `; // The note about read-only tools is for MCP servers @@ -75,7 +82,10 @@ export const DEFAULT_PLAN_SYSTEM_MESSAGE = `\ If the user wants to make changes, offer that they can switch to Agent mode to give you access to write tools to make the suggested updates. ${CODEBLOCK_FORMATTING_INSTRUCTIONS} -${EDIT_CODE_INSTRUCTIONS} + +${BRIEF_LAZY_INSTRUCTIONS} + +However, only output codeblocks for suggestion and planning purposes. For making changes, request to switch to Agent mode. In plan mode, only write code when directly suggesting changes. Prioritize understanding and developing a plan. `;