@@ -436,7 +436,7 @@ const Chat = ({ type = ChatType.Browse }: Props) => {
436436 let conversation
437437 if ( conversationId ) {
438438 conversation = appStateContext ?. state ?. chatHistory ?. find ( conv => conv . id === conversationId )
439- if ( ! conversation ) {
439+ if ( ! conversation ) {
440440 conversation = appStateContext ?. state ?. currentChat
441441 }
442442 if ( ! conversation ) {
@@ -477,7 +477,7 @@ const Chat = ({ type = ChatType.Browse }: Props) => {
477477 let resultConversation
478478 if ( conversationId ) {
479479 resultConversation = appStateContext ?. state ?. chatHistory ?. find ( conv => conv . id === conversationId )
480- if ( ! resultConversation ) {
480+ if ( ! resultConversation ) {
481481 resultConversation = appStateContext ?. state ?. currentChat
482482 }
483483 if ( ! resultConversation ) {
@@ -550,7 +550,7 @@ const Chat = ({ type = ChatType.Browse }: Props) => {
550550 let resultConversation
551551 if ( conversationId ) {
552552 resultConversation = appStateContext ?. state ?. chatHistory ?. find ( conv => conv . id === conversationId )
553- if ( ! resultConversation ) {
553+ if ( ! resultConversation ) {
554554 resultConversation = appStateContext ?. state ?. currentChat
555555 }
556556 if ( ! resultConversation ) {
@@ -608,7 +608,7 @@ const Chat = ({ type = ChatType.Browse }: Props) => {
608608 let resultConversation
609609 if ( conversationId ) {
610610 resultConversation = appStateContext ?. state ?. chatHistory ?. find ( conv => conv . id === conversationId )
611- if ( ! resultConversation ) {
611+ if ( ! resultConversation ) {
612612 resultConversation = appStateContext ?. state ?. currentChat
613613 }
614614 if ( ! resultConversation ) {
@@ -808,7 +808,6 @@ const Chat = ({ type = ChatType.Browse }: Props) => {
808808 } , [ messages ] )
809809
810810 const onShowCitation = ( citation : Citation ) => {
811- console . log ( 'onShowCitation url' , citation . url )
812811 const url = citation . url
813812 setModalUrl ( url ?? '' )
814813 setIsModalOpen ( true )
@@ -843,15 +842,15 @@ const Chat = ({ type = ChatType.Browse }: Props) => {
843842 ) : (
844843 < Stack horizontal className = { styles . chatRoot } >
845844 < div className = { styles . chatContainer } >
846- { loadingState ? (
847- < Stack horizontalAlign = "center" verticalAlign = "center" className = { styles . chatLoadingState } style = { { padding : 250 , paddingBottom : 150 } } >
848- < Spinner label = "Loading your chat..." size = { SpinnerSize . large } />
849- </ Stack >
850- ) : ! messages || messages . length < 1 ? (
851- < Stack className = { styles . chatEmptyState } >
852- < h1 className = { styles . chatEmptyStateTitle } > { ui ?. chat_title } </ h1 >
853- </ Stack >
854- ) : (
845+ { loadingState ? (
846+ < Stack horizontalAlign = "center" verticalAlign = "center" className = { styles . chatLoadingState } style = { { padding : 250 , paddingBottom : 150 } } >
847+ < Spinner label = "Loading your chat..." size = { SpinnerSize . large } />
848+ </ Stack >
849+ ) : ! messages || messages . length < 1 ? (
850+ < Stack className = { styles . chatEmptyState } >
851+ < h1 className = { styles . chatEmptyStateTitle } > { ui ?. chat_title } </ h1 >
852+ </ Stack >
853+ ) : (
855854 // Show chat messages while loading continues in the background
856855 < ChatMessageContainer
857856 messages = { messages }
0 commit comments