fix(core): simplify compaction semantics (#36267)
This commit is contained in:
parent
41d0a9f010
commit
cf5e0adf02
4 changed files with 192 additions and 196 deletions
|
|
@ -147,10 +147,11 @@ it.effect("manual compaction summarizes short context instead of no-op", () =>
|
|||
messages: [userMessage],
|
||||
inputID: SessionMessage.ID.make("msg_manual_compaction"),
|
||||
}),
|
||||
).toBe(true)
|
||||
).toEqual({ status: "completed" })
|
||||
expect(Array.from(yield* Fiber.join(delta)).map((event) => event.data.text)).toEqual(["manual summary"])
|
||||
|
||||
expect(requests).toHaveLength(1)
|
||||
expect(requests[0]?.generation).toBeUndefined()
|
||||
expect(JSON.stringify(requests[0]?.messages)).toContain("Manual compaction should include this short conversation.")
|
||||
expect(yield* store.context(sessionID)).toMatchObject([
|
||||
{ type: "compaction", reason: "manual", summary: "manual summary", recent: "" },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue