MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / countExistingInjections

Function countExistingInjections

internal/toolinjection/injection.go:161–167  ·  view source on GitHub ↗

countExistingInjections counts how many injected tool call IDs already exist in the conversation messages.

(rawJSON []byte, format string)

Source from the content-addressed store, hash-verified

159// countExistingInjections counts how many injected tool call IDs already exist
160// in the conversation messages.
161func countExistingInjections(rawJSON []byte, format string) int {
162 f := GetFormat(format)
163 if f == nil {
164 return 0
165 }
166 return f.CountExistingInjections(rawJSON)
167}
168
169// countExistingInjectionsOpenAI counts injected tool_call IDs in OpenAI messages.
170func countExistingInjectionsOpenAI(rawJSON []byte) int {

Callers 1

ShouldInjectFunction · 0.85

Calls 2

GetFormatFunction · 0.85

Tested by

no test coverage detected