MCPcopy
hub / github.com/docker/docker-agent / LastIs

Method LastIs

pkg/tui/components/transcript/transcript.go:171–174  ·  view source on GitHub ↗

LastIs reports whether the most recent message has the given type.

(typ types.MessageType)

Source from the content-addressed store, hash-verified

169
170// LastIs reports whether the most recent message has the given type.
171func (t *Transcript) LastIs(typ types.MessageType) bool {
172 n := len(t.msgs)
173 return n > 0 && t.msgs[n-1].Type == typ
174}
175
176// RemoveLast drops the most recent message when it has the given type,
177// stopping its animation subscription (mirrors the message list's

Callers 2

TestRemoveLastFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestRemoveLastFunction · 0.64