fix(core): correctly consolidate multi-part text content
Merged·Fixes:
This PR fixes an issue where multi-part text content in streaming responses was incorrectly consolidated by ensuring new text is appended to the last existing text part and improving the identification of pure text content.
GeminiChat to correctly handle multi-part streaming responses.isFirstPartText and isLastPartText helper methods to precisely check if the first or last content part is pure text.isLastPartText to validate only model-generated content and explicitly exclude non-text content types like functionCall, inlineData, or thought.isFirstPartText to also explicitly exclude non-text content types for accurate identification.packages/core/src/core/geminiChat.ts.consolidatedOutputContents and lastHistoryEntry are modified to append text to parts[parts.length - 1] instead of parts[0].isFirstPartText and isLastPartText were added and refined to ensure strict validation of pure text parts, filtering out other content types.