MCPcopy Index your code
hub / github.com/docker/docker-agent / hasAssistantMessage

Function hasAssistantMessage

pkg/runtime/cache_test.go:253–261  ·  view source on GitHub ↗
(sess *session.Session, content string)

Source from the content-addressed store, hash-verified

251}
252
253func hasAssistantMessage(sess *session.Session, content string) bool {
254 for _, item := range sess.Messages {
255 if item.IsMessage() && item.Message.Message.Role == chat.MessageRoleAssistant &&
256 strings.Contains(item.Message.Message.Content, content) {
257 return true
258 }
259 }
260 return false
261}

Callers 3

TestCache_TrimSpacesFunction · 0.85

Calls 1

IsMessageMethod · 0.80

Tested by

no test coverage detected