refactor: align GenerateSearchIndicatorEvents return type with other event builders

Change GenerateSearchIndicatorEvents to return [][]byte instead of []sseEvent
for consistency with BuildFallbackTextEvents and other event building functions.

Benefits:
- Consistent API across all event generation functions
- Eliminates intermediate sseEvent type conversion in caller
- Simplifies usage by returning ready-to-send SSE byte slices

This addresses the code quality feedback from PR #226 review.
This commit is contained in:
Skyuno
2026-02-13 02:36:11 +08:00
parent 5626637fbd
commit 632a2fd2f2
2 changed files with 45 additions and 50 deletions

View File

@@ -4487,7 +4487,7 @@ func (e *KiroExecutor) handleWebSearchStream(
select {
case <-ctx.Done():
return
case out <- cliproxyexecutor.StreamChunk{Payload: []byte(event.ToSSEString())}:
case out <- cliproxyexecutor.StreamChunk{Payload: event}:
}
}
contentBlockIndex += 2