Skip to content

[Bug]: Prompt limit message shows the excess, which reads like the prompt's length #35776

Open

Description

@cravenceiling

Area

apps/web

Steps to reproduce

  1. Paste a prompt of about 238,000 characters into the composer.
  2. Press send.

Expected behavior

The message makes clear how long the prompt is and how much needs to go. For example: "Prompt is 238,809 characters, over the 120,000 limit. Remove 118,809 characters or split it before sending."

Actual behavior

The composer shows "Prompt is 118,809 characters over the 120,000-character limit. Shorten or split it before sending."

The number is the excess, but it reads like the prompt's length. 118,809 is below 120,000, so it looks as if the composer is blocking a prompt that fits. In practice the prompt was 238,809 characters and needed about half of it cut.

The message comes from getComposerPromptLengthValidationMessage in apps/web/src/components/chat/composerSubmission.ts, which only formats excessCharacters.

Impact

Minor bug or occasional failure

Version or commit

main @ 98beed1

Environment

macOS, T3 Code desktop (Nightly)

Workaround

Treat the number as the amount to remove, not the prompt's length.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions