@@ -1369,7 +1369,7 @@ const set_conversation = async (conversation_id) => {
13691369} ;
13701370
13711371const new_conversation = async ( private = false ) => {
1372- if ( window . location . search ) {
1372+ if ( window . location . hash ) {
13731373 history . pushState ( { } , null , `/chat/` ) ;
13741374 }
13751375 window . conversation_id = private ? null : generateUUID ( ) ;
@@ -2241,22 +2241,24 @@ async function on_load() {
22412241 await load_conversations ( ) ;
22422242 return ;
22432243 }
2244- const conversation_id = window . location . search . replace ( "? " , "" ) ;
2244+ const conversation_id = window . location . hash . replace ( "# " , "" ) ;
22452245 if ( conversation_id ) {
22462246 window . conversation_id = conversation_id ;
22472247 } else {
22482248 window . conversation_id = generateUUID ( ) ;
22492249 }
22502250 chatPrompt . value = document . getElementById ( "systemPrompt" ) ?. value || "" ;
22512251 chatPrompt . value = document . getElementById ( "systemPrompt" ) ?. value || "" ;
2252- let chat_params = new URLSearchParams ( window . location . search ) ;
2252+ let chat_params = new URLSearchParams ( window . location . query ) ;
22532253 if ( chat_params . get ( "prompt" ) ) {
22542254 userInput . value = chat_params . get ( "prompt" ) ;
22552255 userInput . style . height = "100%" ;
22562256 userInput . focus ( ) ;
22572257 await load_conversations ( ) ;
22582258 } else if ( ! conversation_id ) {
22592259 await new_conversation ( ) ;
2260+ } else {
2261+ await load_conversations ( ) ;
22602262 }
22612263 if ( window . hljs ) {
22622264 hljs . addPlugin ( new HtmlRenderPlugin ( ) )
0 commit comments