Skip to content

Conversation

@Trynax
Copy link
Contributor

@Trynax Trynax commented Aug 14, 2025

Implements the feature request from #232 to allow creation of new chats using query parameters.

Usage

  • /new - Creates a new empty chat
  • /new?q=What%20is%20React%3F - Creates new chat with "What is React?" pre-filled and auto-executed

closes #232

@Trynax Trynax changed the title Implements the feature request from #232 to allow creation of new chats using query parameters. Feature request: Allow creation of new chats using query params #232 Aug 14, 2025
Copy link
Owner

@jasonhedman jasonhedman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments around extra code but otherwise LGTM

selectedChatModel: serverPreferences.selectedChatModel,
imageGenerationModel: serverPreferences.imageGenerationModel,
useNativeSearch: serverPreferences.useNativeSearch,
useNativeSearch: prefillQuery ? true : serverPreferences.useNativeSearch, // Enable web search when query is provided
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a need for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking back at it now, i think this might be redundant now too, since web search is auto enabled based on model capabilities, so no need to actually specify this.
I originally did this because the issue specifically requested enabling web search as well.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if web search is auto-enabled, that's correct yeah, this is redundant! I wasnt sure

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the need for this page?

Seems like we can keep the query param behavior in the index route

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can, but the route was requested, that's why I created it, also following the pattern of I think two out of the three examples that were provided uses it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was part of the scope for the issue #232, to give it parity with the other providers and to reduce confusion about landing page vs. authed route, but maybe we dont need a /new?

isNew,
workbench,
prefillQuery,
autoSubmitQuery,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is autoSubmitQuery ever used? Feels to me like if prefillQuery is defined it should autosubmit as the user has been linked into that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, without it the query just sits in the box. I included it last, it was the last request of the issue. #232

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.

Feature request: Allow creation of new chats using query params

3 participants