File tree Expand file tree Collapse file tree 14 files changed +20
-19
lines changed Expand file tree Collapse file tree 14 files changed +20
-19
lines changed Original file line number Diff line number Diff line change 6464 searchQuery = ' ' ;
6565 }
6666
67- await goto (` /chat/${id } ` );
67+ await goto (` # /chat/${id }` );
6868 }
6969 </script >
7070
Original file line number Diff line number Diff line change 5151 {:else }
5252 <Button
5353 class =" w-full justify-between hover:[& >kbd]:opacity-100"
54- href =" / ?new_chat=true"
54+ href =" ?new_chat=true#/ "
5555 onclick ={handleMobileSidebarItemClick }
5656 variant =" ghost"
5757 >
Original file line number Diff line number Diff line change 6464 updateConfig (' apiKey' , apiKeyInput .trim ());
6565
6666 // Test the API key by making a real request to the server
67- const response = await fetch (' /props' , {
67+ const response = await fetch (' . /props' , {
6868 headers: {
6969 ' Content-Type' : ' application/json' ,
7070 Authorization: ` Bearer ${apiKeyInput .trim ()} `
7777
7878 // Show success state briefly, then navigate to home
7979 setTimeout (() => {
80- goto (' / ' );
80+ goto (` #/ ` );
8181 }, 1000 );
8282 } else {
8383 // API key is invalid - User Story A
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ export class ChatService {
164164 const currentConfig = config ( ) ;
165165 const apiKey = currentConfig . apiKey ?. toString ( ) . trim ( ) ;
166166
167- const response = await fetch ( `/v1/chat/completions` , {
167+ const response = await fetch ( `. /v1/chat/completions` , {
168168 method : 'POST' ,
169169 headers : {
170170 'Content-Type' : 'application/json' ,
@@ -531,7 +531,7 @@ export class ChatService {
531531 const currentConfig = config ( ) ;
532532 const apiKey = currentConfig . apiKey ?. toString ( ) . trim ( ) ;
533533
534- const response = await fetch ( `/props` , {
534+ const response = await fetch ( `. /props` , {
535535 headers : {
536536 'Content-Type' : 'application/json' ,
537537 ...( apiKey ? { Authorization : `Bearer ${ apiKey } ` } : { } )
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ export class SlotsService {
138138 const currentConfig = config ( ) ;
139139 const apiKey = currentConfig . apiKey ?. toString ( ) . trim ( ) ;
140140
141- const response = await fetch ( ' /slots' , {
141+ const response = await fetch ( `. /slots` , {
142142 headers : {
143143 ...( apiKey ? { Authorization : `Bearer ${ apiKey } ` } : { } )
144144 }
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ class ChatStore {
100100
101101 this . maxContextError = null ;
102102
103- await goto ( `/chat/${ conversation . id } ` ) ;
103+ await goto ( `# /chat/${ conversation . id } ` ) ;
104104
105105 return conversation . id ;
106106 }
@@ -910,7 +910,7 @@ class ChatStore {
910910 if ( this . activeConversation ?. id === convId ) {
911911 this . activeConversation = null ;
912912 this . activeMessages = [ ] ;
913- await goto ( '/ ?new_chat=true' ) ;
913+ await goto ( ` ?new_chat=true#/` ) ;
914914 }
915915 } catch ( error ) {
916916 console . error ( 'Failed to delete conversation:' , error ) ;
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ class ServerStore {
9898 const currentConfig = config ( ) ;
9999 const apiKey = currentConfig . apiKey ?. toString ( ) . trim ( ) ;
100100
101- const response = await fetch ( ' /slots' , {
101+ const response = await fetch ( `. /slots` , {
102102 headers : {
103103 ...( apiKey ? { Authorization : `Bearer ${ apiKey } ` } : { } )
104104 }
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export async function validateApiKey(fetch: typeof globalThis.fetch): Promise<vo
2222 headers . Authorization = `Bearer ${ apiKey } ` ;
2323 }
2424
25- const response = await fetch ( ' /props' , { headers } ) ;
25+ const response = await fetch ( `. /props` , { headers } ) ;
2626
2727 if ( ! response . ok ) {
2828 if ( response . status === 401 || response . status === 403 ) {
Original file line number Diff line number Diff line change 1717
1818 function handleRetry() {
1919 // Navigate back to home page after successful API key validation
20- goto (' /' );
20+ goto (' # /' );
2121 }
2222 </script >
2323
6060 </p >
6161 </div >
6262 <button
63- onclick ={() => goto (' /' )}
63+ onclick ={() => goto (' # /' )}
6464 class =" rounded-md bg-primary px-4 py-2 text-primary-foreground hover:bg-primary/90"
6565 >
6666 Go Home
You can’t perform that action at this time.
0 commit comments