droppingLowestPriorityContextItem
Returns a copy without its least-important context item, plus the item dropped.
Re-read prompt after each drop until the request fits:
var request = request
while (tooLong(request.prompt())) {
request = request.droppingLowestPriorityContextItem()?.first ?: break
}Content copied to clipboard
Return
The trimmed request and the dropped item, or null when the context is already empty.