finalize_assistant_message


Description:

public void finalize_assistant_message (Chat? response = null)

Finalizes the current assistant message.

Ensures the final chunk is rendered and resets tracking state.

For streaming responses, performance metrics are now stored as "ui" messages in the messages array (see Session.finalize_streaming()). For backward compatibility, this method still displays metrics from response if provided, but metrics should already be in the messages array for history loading.

Since:

1.0