sendProcessStep 发送处理步骤的流式数据
(c *gin.Context, requestId string, step ProcessStep)
| 125 | |
| 126 | // sendProcessStep 发送处理步骤的流式数据 |
| 127 | func sendProcessStep(c *gin.Context, requestId string, step ProcessStep) error { |
| 128 | if shouldSkipProcessStepInCompact(step) { |
| 129 | return nil |
| 130 | } |
| 131 | hashedStep := normalizeProcessStep(step) |
| 132 | |
| 133 | if !isMessageIDFirstFrameSent(c) { |
| 134 | enqueuePendingProcessStep(c, requestId, hashedStep) |
| 135 | return nil |
| 136 | } |
| 137 | |
| 138 | return sendProcessStepRaw(c, requestId, hashedStep) |
| 139 | } |
| 140 | |
| 141 | func sendProcessStepRaw(c *gin.Context, requestId string, hashedStep ProcessStep) error { |
| 142 | if streamDone, exists := c.Get("stream_response_done"); exists { |
no test coverage detected