fix: skip checkpoint transcripts in memory dreaming · openclaw/openclaw@650dc59
steipete
·
2026-04-26
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -91,6 +91,7 @@ const SESSION_INGESTION_MAX_MESSAGES_PER_FILE = 80;
|
91 | 91 | const SESSION_INGESTION_MIN_MESSAGES_PER_FILE = 12; |
92 | 92 | const SESSION_INGESTION_MAX_TRACKED_MESSAGES_PER_SESSION = 4096; |
93 | 93 | const SESSION_INGESTION_MAX_TRACKED_SCOPES = 2048; |
| 94 | +const SESSION_CHECKPOINT_TRANSCRIPT_FILENAME_RE = /\.checkpoint\..+\.jsonl$/i; |
94 | 95 | const GENERIC_DAY_HEADING_RE = |
95 | 96 | /^(?:(?:mon|monday|tue|tues|tuesday|wed|wednesday|thu|thur|thurs|thursday|fri|friday|sat|saturday|sun|sunday)(?:,\s+)?)?(?:(?:jan|january|feb|february|mar|march|apr|april|may|jun|june|jul|july|aug|august|sep|sept|september|oct|october|nov|november|dec|december)\s+\d{1,2}(?:st|nd|rd|th)?(?:,\s*\d{4})?|\d{1,2}[/-]\d{1,2}(?:[/-]\d{2,4})?|\d{4}[/-]\d{2}[/-]\d{2})$/i; |
96 | 97 | const MANAGED_DAILY_DREAMING_BLOCKS = [ |
@@ -613,6 +614,10 @@ function buildSessionStateKey(agentId: string, absolutePath: string): string {
|
613 | 614 | return `${agentId}:${sessionPathForFile(absolutePath)}`; |
614 | 615 | } |
615 | 616 | |
| 617 | +function isCheckpointSessionTranscriptPath(absolutePath: string): boolean { |
| 618 | +return SESSION_CHECKPOINT_TRANSCRIPT_FILENAME_RE.test(path.basename(absolutePath)); |
| 619 | +} |
| 620 | + |
616 | 621 | function buildSessionRenderedLine(params: { |
617 | 622 | agentId: string; |
618 | 623 | sessionPath: string; |
@@ -726,6 +731,9 @@ async function collectSessionIngestionBatches(params: {
|
726 | 731 | cronRunTranscriptPaths: new Set<string>(), |
727 | 732 | }; |
728 | 733 | for (const absolutePath of files) { |
| 734 | +if (isCheckpointSessionTranscriptPath(absolutePath)) { |
| 735 | +continue; |
| 736 | +} |
729 | 737 | const normalizedPath = normalizeSessionTranscriptPathForComparison(absolutePath); |
730 | 738 | sessionFiles.push({ |
731 | 739 | agentId, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。