(userText, reply)
| 4439 | } |
| 4440 | |
| 4441 | async function rememberRemoteExecutionTurn(userText, reply) { |
| 4442 | const entries = Array.isArray(state.remoteExecution.memory.entries) ? state.remoteExecution.memory.entries : []; |
| 4443 | const now = new Date().toISOString(); |
| 4444 | entries.push( |
| 4445 | { |
| 4446 | role: "user", |
| 4447 | text: String(userText || "").trim().slice(0, 4000), |
| 4448 | at: now |
| 4449 | }, |
| 4450 | { |
| 4451 | role: "assistant", |
| 4452 | text: String(reply || "").trim().slice(0, 4000), |
| 4453 | at: now |
| 4454 | } |
| 4455 | ); |
| 4456 | state.remoteExecution.memory.entries = entries.slice(-state.remoteExecution.memory.limit); |
| 4457 | await saveRemoteExecutionMemory(); |
| 4458 | } |
| 4459 | |
| 4460 | async function rememberUnifiedMemoryFromRemoteExecution(userText, reply) { |
| 4461 | const text = String(userText || "").trim(); |
no test coverage detected