(agentId: string)
| 194 | // ---- Sync reads (current session, from memory; the UI polls these) ----------- |
| 195 | |
| 196 | public getIterationsForAgent(agentId: string): IterationData[] { |
| 197 | const sessionId = this.sessions.get(agentId)?.id; |
| 198 | if (!sessionId) return []; |
| 199 | return [...this.live.values()] |
| 200 | .filter(it => it.sessionId === sessionId) |
| 201 | .sort((a, b) => a.sessionIterationNumber - b.sessionIterationNumber); |
| 202 | } |
| 203 | |
| 204 | public getToolsFromLastIteration(agentId: string): ToolCall[] { |
| 205 | return [...(this.getIterationsForAgent(agentId).at(-1)?.tools ?? [])]; |
no test coverage detected