MCPcopy Create free account
hub / github.com/Roy3838/Observer / getIterationsForAgent

Method getIterationsForAgent

app/src/utils/IterationStore.ts:393–401  ·  view source on GitHub ↗
(agentId: string)

Source from the content-addressed store, hash-verified

391 }
392
393 public getIterationsForAgent(agentId: string): IterationData[] {
394 // Only return current session iterations (from memory)
395 const currentSessionId = this.currentSessions.get(agentId);
396 if (!currentSessionId) return [];
397
398 return Array.from(this.iterations.values())
399 .filter(iteration => iteration.agentId === agentId && iteration.sessionId === currentSessionId)
400 .sort((a, b) => a.sessionIterationNumber - b.sessionIterationNumber);
401 }
402
403 public getLastToolsForAgent(agentId: string, limit: number = 3): ToolCall[] {
404 const iterations = this.getIterationsForAgent(agentId);

Callers 9

getLastToolsForAgentMethod · 0.95
getStorageUsageMethod · 0.95
getRecentAgentRunsFunction · 0.80
registry.tsFile · 0.80
fetchIterationsFunction · 0.80
fetchCaptureFunction · 0.80
fetchCountFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected