Add a shared visiblePromptText helper and strip reference tokens,
image-generator directives, and model-selection lines from agent thread
summaries and the assistant panel header, so titles show the user's
actual prompt instead of internal directives. Covered by a server test.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>