promptdojo_

Write total_tokens(messages) that returns the total token count across a list of message strings (using the word-split stand-in: each message's tokens = number of words). This is how you'd size a multi-message prompt against the context window.

full-screen editor opens — close anytime to keep reading.