MCPcopy Index your code
hub / github.com/simstudioai/sim / applyWindow

Method applyWindow

apps/sim/executor/handlers/agent/memory.ts:149–151  ·  view source on GitHub ↗
(messages: Message[], limit: number)

Source from the content-addressed store, hash-verified

147 }
148
149 private applyWindow(messages: Message[], limit: number): Message[] {
150 return messages.slice(-limit)
151 }
152
153 private sanitizeMessageForStorage(message: Message): Message {
154 const { files: _files, ...messageWithoutFiles } = message

Callers 3

fetchMemoryMessagesMethod · 0.95
seedMemoryMethod · 0.95
memory.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected