fn safe_thinking_emit_len(buf: &str) -> usize
Return how many bytes from the start of buf are safe to emit as thinking content — i.e. bytes that cannot be part of a </think> tag.
buf
</think>