1 Commits
Author SHA1 Message Date
CatoandClaude 8dcb62b0e6 feat(input): fit prompt text instead of refusing it; actionable validation messages (#119)
A pasted chat in OrangeCat's article brief returned "Invalid request": the
route capped the topic at 300 characters and answered with a bare phrase.

- fitPromptText: keeps a brief whole up to PROMPT_TEXT_MAX_CHARS (12k),
  otherwise keeps start and end around a "characters left out" marker.
- explainInputIssues: turns zod-shaped issues into sentences that name the
  field, its length, the limit and the fix; never a bare "Invalid request".


Claude-Session: https://claude.ai/code/session_019MDtmsN9mz8QfGDCrNhY9p

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 12:49:27 +01:00