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

Function parseClaudeRequest

cmd/inject-cli/main.go:941–957  ·  view source on GitHub ↗
(raw string)

Source from the content-addressed store, hash-verified

939}
940
941func parseClaudeRequest(raw string) {
942 messages := gjson.Get(raw,"messages")
943 if !messages.Exists() || !messages.IsArray() {
944 printTruncated(raw, 500)
945 return
946 }
947 arr := messages.Array()
948 // Show last 3 messages
949 start := len(arr) - 3
950 if start < 0 {
951 start = 0
952 }
953 for _, msg := range arr[start:] {
954 role := msg.Get("role").String()
955 printMessageSummary(role, msg)
956 }
957}
958
959func parseClaudeResponse(raw string) {
960 // For streaming responses, raw is accumulated SSE chunks — try to extract content blocks

Callers 1

printObserveEventFunction · 0.70

Calls 4

printTruncatedFunction · 0.85
printMessageSummaryFunction · 0.85
GetMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected