mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-17 04:01:05 +00:00
fix(ci): drop silent history before truncation
This commit is contained in:
@@ -745,6 +745,10 @@ export function sanitizeChatHistoryMessages(messages: unknown[], maxChars: numbe
|
||||
let changed = false;
|
||||
const next: unknown[] = [];
|
||||
for (const message of messages) {
|
||||
if (shouldDropAssistantHistoryMessage(message)) {
|
||||
changed = true;
|
||||
continue;
|
||||
}
|
||||
const res = sanitizeChatHistoryMessage(message, maxChars);
|
||||
changed ||= res.changed;
|
||||
// Drop assistant commentary-only entries and exact control replies, but
|
||||
|
||||
Reference in New Issue
Block a user