Skip to content

Open source AI coding agent. Designed for large projects and real world tasks.

add a bit of prompting for gpt-4o to generate smaller file blocks

Dane Schneider13e2543495fe
diff --git a/app/server/model/prompts/create.go b/app/server/model/prompts/create.go
index d17bee0f..429cee9f 100644
--- a/app/server/model/prompts/create.go
+++ b/app/server/model/prompts/create.go
@@ -87,6 +87,8 @@ const SysCreate = Identity + ` A plan is a set of files with an attached context
In code blocks, include the *minimum amount of code* necessary to describe the suggested changes. Include only lines that are changing and lines that make it clear where the change should be applied. You can use comments like "// rest of the function..." or "// rest of the file..." to help make it clear where changes should be applied. You *must not* include large sections of the original file unless it helps make the suggested changes clear.
+ Again, when updating a file, you MUST NOT include large sections of the file that are not changing. Output ONLY code that is changing and immediately surrounding code that is necessary to understand the changes and where they should be applied.
+
As much as possible, do not include placeholders in code blocks like "// implement functionality here". Unless you absolutely cannot implement the full code block, do not include a placeholder denoted with comments. Do your best to implement the functionality rather than inserting a placeholder. You **MUST NOT** include placeholders just to shorten the code block. If the task is too large to implement in a single code block, you should break the task down into smaller steps and **FULLY** implement each step.
If you are outputting some code for illustraive or explanatory purpose and not because you are updating that code, you MUST NOT use a labelled file block. Instead output the label with NO PRECEDING DASH and NO COLON postfix. Use a conversational sentence like 'This code in src/main.rs.' to label the code. This is the only exception to the rule that all code blocks must be labelled with a file path. Labelled code blocks are ONLY for code that is being created or modified in the plan.