Skip to content

webui: Disable pasteLongTextToFileLen by default #14041

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

Closed
wants to merge 2 commits into from

Conversation

mashdragon
Copy link
Contributor

@mashdragon mashdragon commented Jun 6, 2025

This PR disables the pasteLongTextToFileLen feature by default in the hope that someone can design a better interface for using it.

Discussion: #14042

@mashdragon mashdragon changed the title Disable pasteLongTextToFileLen by default webui: Disable pasteLongTextToFileLen by default Jun 6, 2025
@ngxson
Copy link
Collaborator

ngxson commented Jun 6, 2025

People have been using it and no one complain except for you. I don't see why this should be disabled by default. This is the same behavior on claude/chatgpt and it make sense for most users.

@ngxson ngxson closed this Jun 6, 2025
@mashdragon
Copy link
Contributor Author

The main reason (#14042) is that the defaults make it impossible to construct large prompts either inside the textarea or by pasting them in from outside, and we can make the UX better by using keyboard shortcuts instead of modifying the paste functionality based on an arbitrary character count.

Which gives me an idea you might be on board with: why don't we create a keyboard shortcut that disables the file paste? That way, I can still use the textarea as an editor or paste in prompts from an external editor, and it would only cost me an additional meta key: we can have Ctrl/Cmd+V/context paste continue to use the current logic and Ctrl/Cmd+Shift+V pastes directly. What do you think of that?

@woof-dog
Copy link
Contributor

I also have a problem with this. I did not report it before because it's annoying but tolerable enough that I didn't log into github until now. The feature definitely needs UX improvement. Whenever I use a new browser or device I have to go into the settings and disable it. There needs to be some default settings configuration at the llama-server binary level to alleviate this contention

@bughunter2
Copy link

Hmm. Perhaps this could be configurable in the UI settings? I've rebuilt llama recently and wasn't used to this behavior either. I often construct prompts with one or two long pieces of text, which I want to paste inline at a specific position in the prompt, but this is much more challenging when large pieces are automatically pasted as files, as it means I have to break up the larger pieces into smaller pieces before pasting.

@bughunter2
Copy link

I also really like @mashdragon's idea of using Ctrl+Shift+V to force text to be pasted inline, rather than as a file. I even tried that before knowing about the root cause of the problem, as I intuitively expected that to work. Such a feature would make the llama web UI even better. 🙂

@mashdragon
Copy link
Contributor Author

@bughunter2 Thank you for reminding me about this. Whenever I launch a new session, my local storage is wiped and I have to go in the settings every time and set it back to 0.

This particular feature is configurable in the UI settings, but on every new device/new session you have to set it again, so it has been a real pain point for me and others. @woof-dog has a PR that lets you override the default client settings but that has gotten no recent attention from the maintainers. I think the main webui maintainer is overloaded and frankly I think there should be a second person to be responsive and help review proposed changes.

Yes, the keyboard shortcut would be nice too 🙂 if I got clear feedback from the maintainers about what changes to make, I would contribute, but it is an uncertain environment for webui contributions these days.

All the recent webui PRs have been ignored mostly due to this new change affecting the backend: #14839 and few contributors know about that

@bughunter2
Copy link

Cheers @mashdragon. For now I've just modified tools/server/public/index.html.gz to set pasteLongTextToFileLen to 0 as you suggested in the PR.

Sometimes I also think about contributing code/bugfixes to the web UI, because of issues like #13999 and #13552 as well as the one we're discussing right now, but I'm consumed by other activities at the moment.

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

Successfully merging this pull request may close these issues.

4 participants