finalize_and_handle_response


Description:

public async void finalize_and_handle_response (Chat response)

Finalizes stream processing and handles response sending.

This should be called when message is completed. It finalizes any remaining content, sets message_completed flag, and handles response sending based on queue status. Line-based changes are applied serially after message completion. AST-based changes are handled by the queue.

Parameters:

response

The chat response object