cleanup: tweak compaction prompt (#35220)

Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot] 2026-07-03 15:26:03 -05:00 committed by GitHub
commit b44bc0ad07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 39 additions and 63 deletions

View file

@ -1556,33 +1556,21 @@ const scenarios: Scenario[] = [
const session = yield* ctx.session({ title: "Summarize session" })
yield* ctx.message(session.id, { text: "summarize this work" })
const summary = [
"## Goal",
"## Objective",
"- Exercise session summarize.",
"",
"## Constraints & Preferences",
"## Important Details",
"- Use fake LLM.",
"",
"## Progress",
"### Done",
"- Summary generated.",
"",
"### In Progress",
"- (none)",
"",
"### Blocked",
"- (none)",
"",
"## Key Decisions",
"- Keep route local.",
"- Test fixture: test/server/httpapi-exercise/index.ts.",
"",
"## Next Steps",
"- (none)",
"## Work State",
"- Completed: Summary generated.",
"- Active: (none)",
"- Blocked: (none)",
"",
"## Critical Context",
"- Test fixture.",
"",
"## Relevant Files",
"- test/server/httpapi-exercise/index.ts: scenario",
"## Next Move",
"1. (none)",
].join("\n")
yield* ctx.llmText(summary)
yield* ctx.llmText(summary)

View file

@ -1430,8 +1430,8 @@ describe("session.compaction.process", () => {
expect(captured).toContain("<previous-summary>")
expect(captured).toContain("summary one")
expect(captured.match(/summary one/g)?.length).toBe(1)
expect(captured).toContain("## Constraints & Preferences")
expect(captured).toContain("## Progress")
expect(captured).toContain("## Important Details")
expect(captured).toContain("## Work State")
}).pipe(withCompaction({ llm: stub.llmLayer }))
},
{ git: true },