refactor(agent-streaming): Use Genkit beta client library#128
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the streaming flow implementation to use the Genkit Beta Client library. On the frontend, manual SSE stream parsing is replaced with the streamFlow helper. On the backend, the /api/chat endpoint is updated to match the expected protocol by accepting data instead of prompt, wrapping chunks in a { message: chunk } structure, and appending the final result. Feedback suggests checking res.writable before writing error details to the response stream to prevent potential unhandled exceptions if the client aborts the connection.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
97cb2f7 to
792fbe1
Compare
Replace Fetch API with Genkit Beta Client library to call Genkit flows