mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:40:44 +00:00
fix(memory): keep pre-compaction flush prompt out of user transcript (#73380)
This commit is contained in:
@@ -25,6 +25,7 @@ Docs: https://docs.openclaw.ai
|
||||
- Channels/LINE: persist inbound image, video, audio, and file downloads in `~/.openclaw/media/inbound/` instead of temporary files so agents can still read LINE media after `/tmp` cleanup. Fixes #73370. Thanks @hijirii and @wenxu007.
|
||||
- CLI/plugins: keep bundled plugin installs out of `plugins.load.paths` while preserving install records, so install/inspect/doctor loops no longer warn about the current bundled plugin directory. Thanks @vincentkoc.
|
||||
- Cron/Telegram: add `--thread-id` to `openclaw cron add` and `openclaw cron edit`, preserving Telegram forum topic delivery targets across scheduled announcements. Carries forward #51581, #60373, and #60890. Thanks @ChunHao-dev.
|
||||
- Memory/compaction: keep pre-compaction memory-flush prompts runtime-only so session transcripts and `chat.history` no longer expose them as normal user turns. Fixes #54408 and #58956; refs #43567. Thanks @markgong and @guoyuhang9.
|
||||
- Control UI/WebChat: keep large attachment payloads out of Lit state and optimistic chat messages, using object URL previews plus send-time payload serialization so PDF/image uploads no longer trigger `RangeError: Maximum call stack size exceeded`. Fixes #73360; refs #54378 and #63432. Thanks @hejunhui-73, @Ansub, and @christianhernandez3-afk.
|
||||
- Agents/Anthropic: cancel stalled Anthropic Messages SSE body reads when abort signals fire, so active-memory timeouts release transport resources instead of leaving hidden recall runs parked on `reader.read()`. Refs #72965 and #73120. Thanks @wdeveloper16.
|
||||
- Control UI/WebChat: keep pending run and typing state attached to the active client run, so unowned inject/announce/side-result finals no longer unlock unrelated active runs while completed owned runs still clear promptly. Fixes #57795; carries forward the narrow diagnosis from #57887. Thanks @haoyu-haoyu.
|
||||
|
||||
@@ -154,10 +154,12 @@ describe("runMemoryFlushIfNeeded", () => {
|
||||
expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);
|
||||
const flushCall = runEmbeddedPiAgentMock.mock.calls[0]?.[0] as {
|
||||
prompt?: string;
|
||||
transcriptPrompt?: string;
|
||||
memoryFlushWritePath?: string;
|
||||
silentExpected?: boolean;
|
||||
};
|
||||
expect(flushCall.prompt).toContain("Pre-compaction memory flush.");
|
||||
expect(flushCall.transcriptPrompt).toBe("");
|
||||
expect(flushCall.memoryFlushWritePath).toMatch(/^memory\/\d{4}-\d{2}-\d{2}\.md$/);
|
||||
expect(flushCall.silentExpected).toBe(true);
|
||||
expect(refreshQueuedFollowupSessionMock).toHaveBeenCalledWith({
|
||||
@@ -585,6 +587,7 @@ describe("runMemoryFlushIfNeeded", () => {
|
||||
|
||||
const flushCall = runEmbeddedPiAgentMock.mock.calls[0]?.[0] as {
|
||||
prompt?: string;
|
||||
transcriptPrompt?: string;
|
||||
extraSystemPrompt?: string;
|
||||
bootstrapPromptWarningSignaturesSeen?: string[];
|
||||
bootstrapPromptWarningSignature?: string;
|
||||
@@ -594,6 +597,7 @@ describe("runMemoryFlushIfNeeded", () => {
|
||||
expect(flushCall.prompt).toContain("Write notes.");
|
||||
expect(flushCall.prompt).toContain("NO_REPLY");
|
||||
expect(flushCall.prompt).toContain("MEMORY.md");
|
||||
expect(flushCall.transcriptPrompt).toBe("");
|
||||
expect(flushCall.extraSystemPrompt).toContain("extra system");
|
||||
expect(flushCall.extraSystemPrompt).toContain("Flush memory now.");
|
||||
expect(flushCall.memoryFlushWritePath).toBe("memory/2023-11-14.md");
|
||||
|
||||
@@ -854,6 +854,7 @@ export async function runMemoryFlushIfNeeded(params: {
|
||||
trigger: "memory",
|
||||
memoryFlushWritePath,
|
||||
prompt: activeMemoryFlushPlan.prompt,
|
||||
transcriptPrompt: "",
|
||||
extraSystemPrompt: flushSystemPrompt,
|
||||
bootstrapPromptWarningSignaturesSeen,
|
||||
bootstrapPromptWarningSignature:
|
||||
|
||||
Reference in New Issue
Block a user