Add query param new chat flow#257
Open
Chel-Tbl wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #232.
Summary
/newas an authenticated new-chat entry point with sign-in redirect support.qon both/new?q=...and/?q=...so external "Open in Toolkit" links can prefill a prompt.qis present, create the chat through the existing chat API, then replace the URL with the generated chat id./login?redirect=..., including when a signed-in user lands on the login page directly.Verification
node .\node_modules\prettier\bin\prettier.cjs --check 'src/app/(general)/page.tsx' 'src/app/(general)/new/page.tsx' 'src/app/(general)/login/page.tsx' 'src/app/(general)/_components/chat/index.tsx' 'src/app/(general)/_contexts/chat-context.tsx'.\node_modules\.bin\tsc.cmd --noEmit --pretty falseSKIP_ENV_VALIDATION=1 node .\node_modules\next\dist\bin\next buildhttp://127.0.0.1:3032/new?q=trace%20auditandhttp://127.0.0.1:3032/?q=trace%20auditconfirmed unauthenticated users are redirected to/loginwith the original query preserved inredirect.