mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 19:44:30 +00:00
fix(memory/qmd): throttle embed + citations auto + restore --force
This commit is contained in:
@@ -2,6 +2,7 @@ import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { resolveSessionTranscriptsDirForAgent } from "../config/sessions/paths.js";
|
||||
import { createSubsystemLogger } from "../logging/subsystem.js";
|
||||
import { redactSensitiveText } from "../logging/redact.js";
|
||||
import { hashText } from "./internal.js";
|
||||
|
||||
const log = createSubsystemLogger("memory");
|
||||
@@ -104,8 +105,9 @@ export async function buildSessionEntry(absPath: string): Promise<SessionFileEnt
|
||||
if (!text) {
|
||||
continue;
|
||||
}
|
||||
const safe = redactSensitiveText(text, { mode: "tools" });
|
||||
const label = message.role === "user" ? "User" : "Assistant";
|
||||
collected.push(`${label}: ${text}`);
|
||||
collected.push(`${label}: ${safe}`);
|
||||
}
|
||||
const content = collected.join("\n");
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user