Count the tokens used by a multi-turn conversation and see what share of the model context window they occupy, so you know when to trim or compress history.
接近上限时需截断或总结历史。