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:
parent
436cd39d14
commit
b44bc0ad07
4 changed files with 39 additions and 63 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue