You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(component,ai,gemini): unify InlineData processing and enable images in streaming responses (#1125)
Because
- InlineData wasn't properly cleaned up in streaming mode, causing
binary data exposure in JSON outputs
- Streaming responses didn't show images while non-streaming responses
did, creating an inconsistent user experience
- Image extraction and InlineData cleanup logic was duplicated across
different functions
This commit
- Creates a unified `processInlineDataInCandidates` function that
handles both image extraction and InlineData cleanup with configurable
behavior
- Fixes InlineData cleanup in streaming mode by ensuring binary data is
removed from all intermediate responses
- Enables image extraction in streaming responses, making the behavior
consistent with non-streaming mode
- Replaces duplicated cleanup logic in `renderFinal` and
`buildStreamOutput` with the unified approach
- Adds comprehensive tests covering streaming cleanup, image extraction,
and consistency between streaming and final modes
- Maintains backward compatibility while improving memory efficiency and
user experience
0 commit comments