create_summary


Description:

protected ArrayList<Message> create_summary ()

Collect API messages since the latest summary boundary.

Each summary message clears the collected slice. Only user, assistant, and tool roles are kept. When a summary boundary exists, that summary row is the first element — callers pop it before building the outbound API request.

Returns:

messages since the latest summary, summary row first if any