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

Function formatRemoteExecutionMemoryContext

src/server.js:4427–4439  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4425}
4426
4427function formatRemoteExecutionMemoryContext() {
4428 const entries = Array.isArray(state.remoteExecution.memory.entries) ? state.remoteExecution.memory.entries : [];
4429 if (!entries.length) return "";
4430 const lines = entries.slice(-state.remoteExecution.memory.limit).map((entry) => {
4431 const speaker = entry.role === "assistant" ? assistantName : ownerLabel;
4432 return `${speaker}:${String(entry.text || "").trim()}`;
4433 }).filter((line) => !/:$/.test(line));
4434 if (!lines.length) return "";
4435 return [
4436 "以下是远程执行模式的独立滚动记忆,请自然参考,不要逐字复述:",
4437 ...lines
4438 ].join("\n");
4439}
4440
4441async function rememberRemoteExecutionTurn(userText, reply) {
4442 const entries = Array.isArray(state.remoteExecution.memory.entries) ? state.remoteExecution.memory.entries : [];

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected