Strip inline image tokens and reference directive URLs before deciding
whether a prompt carries real user text, so a reference-only prompt is
still treated as empty while text around references counts.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>