Skip to content

Add query param new chat flow#257

Open
Chel-Tbl wants to merge 1 commit into
jasonhedman:mainfrom
Chel-Tbl:bounty/new-chat-query-params
Open

Add query param new chat flow#257
Chel-Tbl wants to merge 1 commit into
jasonhedman:mainfrom
Chel-Tbl:bounty/new-chat-query-params

Conversation

@Chel-Tbl
Copy link
Copy Markdown

Closes #232.

Summary

  • Add /new as an authenticated new-chat entry point with sign-in redirect support.
  • Support q on both /new?q=... and /?q=... so external "Open in Toolkit" links can prefill a prompt.
  • Auto-submit the prompt when q is present, create the chat through the existing chat API, then replace the URL with the generated chat id.
  • Preserve the original destination through /login?redirect=..., including when a signed-in user lands on the login page directly.
  • Enable native web search from the initial render when the selected model supports web search.

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 false
  • SKIP_ENV_VALIDATION=1 node .\node_modules\next\dist\bin\next build
  • Browser check against http://127.0.0.1:3032/new?q=trace%20audit and http://127.0.0.1:3032/?q=trace%20audit confirmed unauthenticated users are redirected to /login with the original query preserved in redirect.

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

1 participant