New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Better handle large amounts of pasted input text #2335
Comments
Thanks! I'll look into it |
If it helps, I'm guessing they're using the paste event and checking the clipboard length before deciding what to do. |
Great point, will have to think how to best to implement |
Also FYI and mostly a note for myself. The "delay" for long text only happens on chrome and I narrowed down exactly why. There would need to be a compromise for the current optimizations being handled for the textarea to fix it, but also may not address for a while. |
If you want a second pair of eyes to look at that slow code, just shout (and link the code). Would be happy to have a quick look if it helps. |
Speaking personally, I am quite often editing the pasted text, so I'm not sure the claude approach is ideal in all cases. Arguably it's better practise to get everything just right before pasting, but often enough I change my mind about what to include in the context as I'm drafting my query. I can see a case though for a pop out editor for larger prompts. But even ChatGPT doesn't have perfect UX on this, it seems like a hard problem. |
I figured out the root cause for this issue and I’ll be pushing a change today |
Unfortunately, this is still happening (not sure if the changes were pushed @danny-avila ) |
can you describe what is still happening? On both firefox/chrome, pasting large amounts of text does not incur a noticeable delay |
What features would you like to see added?
One of the useful things about the Claude Opus model is the large context window, that can be used to do things like summarise large blocks of text. Unfortunately though, Librechat responds quite sluggishly when a large block of text is pasted into the input box.
More details
The official Claude web UI handles this well, large amounts of text are displayed as a small "Pasted" icon instead and the app doesn't slow down. It would be nice if Librechat could do something similar.
Which components are impacted by your request?
No response
Pictures
Code of Conduct
The text was updated successfully, but these errors were encountered: