Skip to content

feat: take initial prompt from URL query parameter#6

Open
Efe-Cal wants to merge 3 commits intoMostlime12195:mainfrom
Efe-Cal:main
Open

feat: take initial prompt from URL query parameter#6
Efe-Cal wants to merge 3 commits intoMostlime12195:mainfrom
Efe-Cal:main

Conversation

@Efe-Cal
Copy link

@Efe-Cal Efe-Cal commented Feb 28, 2026

Hi @Mostlime12195 ! I would love it if we could set the initial prompt from a redirect. With this PR, when a user visits the page with an initialPrompt parameter, the chat input is automatically pre-filled with its value.

@vercel
Copy link

vercel bot commented Feb 28, 2026

@Efe-Cal is attempting to deploy a commit to the Karo Roghzai's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Feb 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
libre-assistant Ready Ready Preview, Comment Mar 1, 2026 3:32pm

@Mostlime12195
Copy link
Owner

This is very cool! I can't believe I hadn't thunk of this sooner. Though, could make the tiniest change and change the name initialPrompt to just q for simplicity and to match other search engines?

Also, this is entirely your choice, could you make it so that it doesn't just fill out the input, but submits it too? This way people could effectively use the app as a search engine.

Again, much thanks for the PR! I wouldn't have thought of this idea in a million years.

@Efe-Cal
Copy link
Author

Efe-Cal commented Feb 28, 2026

The pleasure is mine! Thank you for building this amazing site.

could you make it so that it doesn't just fill out the input, but submits it too?

Maybe then also a model parameter would be useful (to set a desired model before starting the conversation)?

@Mostlime12195
Copy link
Owner

Maybe then also a model parameter would be useful (to set a desired model before starting the conversation)?

Yes! The idea crossed my mind but I didn't want to put too much work on your shoulders. Thank you for offering.

@Mostlime12195
Copy link
Owner

Hi! the model parameter isn't working in the latest commit. I assume it's because model IDs typically have slashes in them (i.e. minimax/minimax-m2.5) which may break it, even when you encode it into something like minimax%2Fminimax-m2.5.

Just my opinion, but perhaps we could filter the model IDs? Instead of minimax/minimax-m2.5, we could use minimax-minimax-m2.5. This way, when reading the parameter, we turn the first hyphen into a slash (the value minimax-minimax-m2.5 will be converted to minimax/minimax-m2.5 before being used). This is the simplest method I could think of.

@Efe-Cal
Copy link
Author

Efe-Cal commented Mar 1, 2026

This way, when reading the parameter, we turn the first hyphen into a slash

@Mostlime12195
This is genius! Implemented it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants