fix: preserve project scope during draft hydration

This commit is contained in:
Danny Avila 2026-06-02 22:19:17 -04:00
parent a696882c0c
commit 06a5fc36b4

View file

@ -93,6 +93,9 @@ const conversationByIndex = atomFamily<TConversation | null, string | number>({
if (shouldUpdateParams) {
const newParams = createChatSearchParams(newValue);
if (newValue.chatProjectId) {
newParams.set('projectId', newValue.chatProjectId);
}
const searchParams = createSearchParams(newParams);
const url = `${window.location.pathname}?${searchParams.toString()}`;
window.history.pushState({}, '', url);