Skip to content

Commit 815b2e7

Browse files
authored
Update compaction.ts
reverted change to default compaction prompt
1 parent 68cb091 commit 815b2e7

1 file changed

Lines changed: 3 additions & 14 deletions

File tree

packages/opencode/src/session/compaction.ts

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -157,20 +157,9 @@ export namespace SessionCompaction {
157157
{ sessionID: input.sessionID },
158158
{ context: [], prompt: undefined },
159159
)
160-
const defaultPrompt =
161-
Flag.OPENCODE_EXPERIMENTAL_COMPACTION_PROMPT ??
162-
`
163-
Summarize this development session to continue work seamlessly. Include:
164-
165-
1. **Current state**: Which files are open/being edited (full paths)
166-
2. **Recent changes**: Code modifications made (additions/deletions per file)
167-
3. **Work context**: Current directory, git branch, any build/test status
168-
4. **Issues encountered**: Errors faced and how they were resolved
169-
5. **Next steps**: Specific actions planned, tools needed, remaining tasks
170-
6. **Critical decisions**: Architectural choices or implementation details to preserve
171-
172-
The summary must enable another developer to continue exactly where we left off.
173-
`
160+
const defaultPrompt = Flag.OPENCODE_EXPERIMENTAL_COMPACTION_PROMPT ??
161+
"Provide a detailed prompt for continuing 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 considering new session will not have access to our conversation."
162+
174163
const promptText = compacting.prompt ?? [defaultPrompt, ...compacting.context].join("\n\n")
175164
const result = await processor.process({
176165
user: userMessage,

0 commit comments

Comments
 (0)