fn shorten_page_content(content: String) -> StringExpand description
Truncates page content until its estimated token count fits the budget we are willing to hand to the LLM. Scaling the byte length by the token ratio always shrinks the content, so this terminates in a pass or two.