Skip to content

webui: Disable pasteLongTextToFileLen by default#14041

Closed
mashdragon wants to merge 2 commits into
ggml-org:masterfrom
mashdragon:patch-1
Closed

webui: Disable pasteLongTextToFileLen by default#14041
mashdragon wants to merge 2 commits into
ggml-org:masterfrom
mashdragon:patch-1

Conversation

@mashdragon

@mashdragon mashdragon commented Jun 6, 2025

Copy link
Copy Markdown
Contributor

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

ngxson commented Jun 6, 2025

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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.

@jerkstorecaller

Copy link
Copy Markdown

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.

To be honest, I hate it to hell and back, I'm just glad it's configurable.

I've never seen a text input user interface that doesn't give you complete control over text input. It's modifying your prompt and inserting "File pasted".

Let's not take any further design ideas from the random ML juniors vibe-coding the Claude Code UI, please. 😆

@woof-dog

woof-dog commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

@jerkstorecaller Thank you for sharing your sentiment (which I certainly agree with). Fortunately you can now do:

webui-config.json

{"pasteLongTextToFileLen": 0}

And then tell llama.cpp to use it:

export LLAMA_ARG_WEBUI_CONFIG_FILE=webui-config.json
# Run llama.cpp etc

and now you are no longer bothered and do not have to manually configure it! You can alternatively pass --webui-config or --webui-config-file to override the web UI config.

Not allowing me to edit a text input is definitely an anti-pattern. I often format my prompts with large code blocks in specific places. So I am very glad I now have this full control once again. This is because of #17940

@deadpipe

deadpipe commented Jul 3, 2026

Copy link
Copy Markdown

This is really annoying. Should be disabled by default, or implement @mashdragon's idea of using Ctrl+Shift+V to paste normally

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.

6 participants