(raw string)
| 939 | } |
| 940 | |
| 941 | func 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 | |
| 959 | func parseClaudeResponse(raw string) { |
| 960 | // For streaming responses, raw is accumulated SSE chunks — try to extract content blocks |
no test coverage detected