MCPcopy Create free account
hub / github.com/coder/agentapi / GetAll

Method GetAll

lib/screentracker/ringbuffer.go:31–37  ·  view source on GitHub ↗

GetAll returns all items in the buffer, oldest first

()

Source from the content-addressed store, hash-verified

29
30// GetAll returns all items in the buffer, oldest first
31func (b *RingBuffer[T]) GetAll() []T {
32 result := make([]T, b.count)
33 for i := 0; i < b.count; i++ {
34 result[i] = b.items[(b.nextIndex-b.count+i+len(b.items))%len(b.items)]
35 }
36 return result
37}
38
39// Capacity returns the capacity of the ring buffer
40func (b *RingBuffer[T]) Capacity() int {

Callers 3

isScreenStableLockedMethod · 0.80
statusLockedMethod · 0.80
TextMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected