MCPcopy Create free account
hub / github.com/Epic0522/Codex-Remote-Contact / formatUnifiedMemoryForIMessage

Function formatUnifiedMemoryForIMessage

src/server.js:3596–3608  ·  view source on GitHub ↗
(snapshot)

Source from the content-addressed store, hash-verified

3594}
3595
3596function formatUnifiedMemoryForIMessage(snapshot) {
3597 const lines = [];
3598 if (snapshot.latestHandoff?.summary) {
3599 lines.push(`最近交接:${snapshot.latestHandoff.summary}`);
3600 }
3601 const stateParts = formatUnifiedMemoryStateParts(snapshot.currentState);
3602 if (stateParts.length) lines.push(`近期状态:${stateParts.join(";")}`);
3603 for (const entry of snapshot.entries || []) {
3604 lines.push(`${entry.summary}`);
3605 }
3606 if (!lines.length) return "统一记忆现在还是空的。";
3607 return [`统一记忆:`, ...[...new Set(lines)].slice(0, 8)].join("\n");
3608}
3609
3610function formatUnifiedMemoryStatus(status) {
3611 const counts = status.counts || {};

Callers 1

Calls 1

Tested by

no test coverage detected