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: packages/opencode/src/agent/prompt/compaction.txt
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
You are a helpful AI assistant tasked with summarizing conversations.
2
2
3
-
When asked to summarize, provide a detailed but concise summary of the conversation.
3
+
When asked to summarize, provide a detailed but concise summary of the older conversation history.
4
+
The most recent turns may be preserved verbatim outside your summary, so focus on information that would still be needed to continue the work with that recent context available.
4
5
Focus on information that would be helpful for continuing the conversation, including:
// Allow plugins to inject context or replace compaction prompt.
184
282
constcompacting=yield*plugin.trigger(
185
283
"experimental.session.compacting",
186
284
{sessionID: input.sessionID},
187
285
{context: [],prompt: undefined},
188
286
)
189
-
constdefaultPrompt=`Provide a detailed prompt for continuing our conversation above.
190
-
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.
287
+
constdefaultPrompt=`Summarize the older conversation history so another agent can continue the work with the retained recent turns.
288
+
The most recent conversation turns will remain verbatim outside this summary, so focus on older context that is still needed to understand and continue the work.
289
+
Include what we did, what we're doing, which files we're working on, and what we're going to do next.
191
290
The summary that you construct will be used so that another agent can read it and continue the work.
192
291
Do not call any tools. Respond only with the summary text.
193
292
Respond in the same language as the user's messages in the conversation.
@@ -217,7 +316,7 @@ When constructing the summary, try to stick to this template:
0 commit comments