MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / recent

Function recent

ui/src/api/agentStatus.ts:23–32  ·  view source on GitHub ↗
(opts: { afterSeq?: number; limit?: number; name?: string } = {})

Source from the content-addressed store, hash-verified

21 },
22
23 async recent(opts: { afterSeq?: number; limit?: number; name?: string } = {}): Promise<{ entries: ToolCallRecord[]; lastSeq: number }> {
24 const params = new URLSearchParams()
25 if (opts.afterSeq) params.set('afterSeq', String(opts.afterSeq))
26 if (opts.limit) params.set('limit', String(opts.limit))
27 if (opts.name) params.set('name', opts.name)
28 const qs = params.toString()
29 const res = await fetch(`/api/agent-status/recent${qs ? `?${qs}` : ''}`)
30 if (!res.ok) throw new Error('Failed to load tool calls')
31 return res.json()
32 },
33}

Callers

nothing calls this directly

Calls 3

setMethod · 0.65
fetchFunction · 0.50
toStringMethod · 0.45

Tested by

no test coverage detected