fix: add compaction headroom for memory writes

This commit is contained in:
Peter Steinberger
2026-01-11 10:46:20 +00:00
parent 96e4fdb443
commit a3747b1ee3
6 changed files with 90 additions and 1 deletions

View File

@@ -164,6 +164,25 @@ describe("runReplyAgent typing (heartbeat)", () => {
expect(typing.startTypingLoop).not.toHaveBeenCalled();
});
it("suppresses partial streaming for NO_REPLY", async () => {
const onPartialReply = vi.fn();
runEmbeddedPiAgentMock.mockImplementationOnce(
async (params: EmbeddedPiAgentParams) => {
await params.onPartialReply?.({ text: "NO_REPLY" });
return { payloads: [{ text: "NO_REPLY" }], meta: {} };
},
);
const { run, typing } = createMinimalRun({
opts: { isHeartbeat: false, onPartialReply },
});
await run();
expect(onPartialReply).not.toHaveBeenCalled();
expect(typing.startTypingOnText).not.toHaveBeenCalled();
expect(typing.startTypingLoop).not.toHaveBeenCalled();
});
it("starts typing only on deltas in message mode", async () => {
runEmbeddedPiAgentMock.mockImplementationOnce(async () => ({
payloads: [{ text: "final" }],