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

Function buildClaudeSSE

internal/toolinjection/inject_stream.go:186–189  ·  view source on GitHub ↗

buildClaudeSSE constructs a full SSE event for Claude streaming.

(eventType string, data map[string]any)

Source from the content-addressed store, hash-verified

184
185// buildClaudeSSE constructs a full SSE event for Claude streaming.
186func buildClaudeSSE(eventType string, data map[string]any) []byte {
187 dataJSON, _ := json.Marshal(data)
188 return []byte(fmt.Sprintf("event: %s\ndata: %s\n\n", eventType, dataJSON))
189}
190
191// isClaudeMessageDelta returns true if the chunk contains a message_delta event.
192func isClaudeMessageDelta(chunk []byte) bool {

Callers 1

InjectClaudeStreamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected