buildClaudeSSE constructs a full SSE event for Claude streaming.
(eventType string, data map[string]any)
| 184 | |
| 185 | // buildClaudeSSE constructs a full SSE event for Claude streaming. |
| 186 | func 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. |
| 192 | func isClaudeMessageDelta(chunk []byte) bool { |
no outgoing calls
no test coverage detected