Browse Source

tweak: compaction prompt (#4838)

Co-authored-by: Aiden Cline <[email protected]>
Shantur Rathore 2 months ago
parent
commit
aaa31f02af

+ 1 - 1
packages/opencode/src/session/compaction.ts

@@ -178,7 +178,7 @@ export namespace SessionCompaction {
             content: [
               {
                 type: "text",
-                text: "Provide a detailed but concise summary of our conversation above. Focus on information that would be helpful for continuing the conversation, including what we did, what we're doing, which files we're working on, and what we're going to do next.",
+                text: "Summarize our conversation above. This summary will be the only context available when the conversation continues, so preserve critical information including: what was accomplished, current work in progress, files involved, next steps, and any key user requests or constraints. Be concise but detailed enough that work can continue seamlessly.",
               },
             ],
           },

+ 2 - 0
packages/opencode/src/session/prompt/compaction.txt

@@ -6,5 +6,7 @@ Focus on information that would be helpful for continuing the conversation, incl
 - What is currently being worked on
 - Which files are being modified
 - What needs to be done next
+- Key user requests, constraints, or preferences that should persist
+- Important technical decisions and why they were made
 
 Your summary should be comprehensive enough to provide context but concise enough to be quickly understood.