@@ -22,7 +22,7 @@ import { type NebulaContext, promptNebula } from "../api/chat";
2222import { createSession , updateSession } from "../api/session" ;
2323import type { SessionInfo } from "../api/types" ;
2424import { examplePrompts } from "../data/examplePrompts" ;
25- import { newChatPageUrlStore , newSessionsStore } from "../stores" ;
25+ import { newSessionsStore } from "../stores" ;
2626import { ChatBar , type WalletMeta } from "./ChatBar" ;
2727import { type ChatMessage , Chats } from "./Chats" ;
2828import { EmptyStateChatPageContent } from "./EmptyStateChatPageContent" ;
@@ -164,33 +164,14 @@ export function ChatPageContent(props: {
164164 props . initialParams ?. q ,
165165 ] ) ;
166166
167- const [ sessionId , _setSessionId ] = useState < string | undefined > (
167+ const [ sessionId , setSessionId ] = useState < string | undefined > (
168168 props . session ?. id ,
169169 ) ;
170170
171171 const [ chatAbortController , setChatAbortController ] = useState <
172172 AbortController | undefined
173173 > ( ) ;
174174
175- const setSessionId = useCallback (
176- ( sessionId : string ) => {
177- _setSessionId ( sessionId ) ;
178- // update page URL without reloading
179- // THIS DOES NOT WORK ANYMORE!! - NEXT JS IS MONKEY PATCHING THIS TOO
180- // Until we find a better solution, we are just not gonna update the URL
181- // window.history.replaceState({}, "", `/chat/${sessionId}`);
182-
183- // if the current page is landing page, link to /chat
184- // if current page is new /chat page, link to landing page
185- if ( props . type === "landing" ) {
186- newChatPageUrlStore . setValue ( "/chat" ) ;
187- } else {
188- newChatPageUrlStore . setValue ( "/" ) ;
189- }
190- } ,
191- [ props . type ] ,
192- ) ;
193-
194175 const [ isChatStreaming , setIsChatStreaming ] = useState ( false ) ;
195176 const [ enableAutoScroll , setEnableAutoScroll ] = useState ( false ) ;
196177 const [ showConnectModal , setShowConnectModal ] = useState ( false ) ;
@@ -202,7 +183,7 @@ export function ChatPageContent(props: {
202183 } ) ;
203184 setSessionId ( session . id ) ;
204185 return session ;
205- } , [ contextFilters , props . authToken , setSessionId ] ) ;
186+ } , [ contextFilters , props . authToken ] ) ;
206187
207188 const handleSendMessage = useCallback (
208189 async ( message : string ) => {
0 commit comments