Hi @ariaebrahimpoor ,
Welcome to Google Cloud Community!
This issue is actually listed in the known issues for Gemini Code Assist. The chat responses can get cut off when they involve an updated version of a large open file.
As a workaround, try selecting a smaller section of your code and include a clear instruction in your prompt like “only output the selected code.” That usually helps avoid the truncation.
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.