mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-03 05:29:12 +00:00
Make loading message, styling configurable. Do not show agent when no data
- Pass Loading message, class name via props to both inline and normal loading spinners - Pass loading conversation message to loading spinner when chat history is being fetched
This commit is contained in:
@@ -247,7 +247,7 @@ export default function ChatHistory(props: ChatHistoryProps) {
|
||||
<div ref={ref}>
|
||||
<div className={styles.chatHistory} ref={chatHistoryRef}>
|
||||
<div ref={sentinelRef} style={{ height: '1px' }}>
|
||||
{fetchingData && <InlineLoading />}
|
||||
{fetchingData && <InlineLoading message="Loading Conversation" className='opacity-50'/>}
|
||||
</div>
|
||||
{(data && data.chat) && data.chat.map((chatMessage, index) => (
|
||||
<ChatMessage
|
||||
@@ -328,16 +328,18 @@ export default function ChatHistory(props: ChatHistoryProps) {
|
||||
isLastMessage={true}
|
||||
/>
|
||||
}
|
||||
<div className={`${styles.agentIndicator} pb-4`}>
|
||||
<div className="relative group mx-2 cursor-pointer">
|
||||
<ProfileCard
|
||||
name={constructAgentName()}
|
||||
link={constructAgentLink()}
|
||||
avatar={<Lightbulb color='orange' weight='fill' className="mt-1 mx-1" />}
|
||||
description={constructAgentPersona()}
|
||||
/>
|
||||
{data &&
|
||||
<div className={`${styles.agentIndicator} pb-4`}>
|
||||
<div className="relative group mx-2 cursor-pointer">
|
||||
<ProfileCard
|
||||
name={constructAgentName()}
|
||||
link={constructAgentLink()}
|
||||
avatar={<Lightbulb color='orange' weight='fill' className="mt-1 mx-1" />}
|
||||
description={constructAgentPersona()}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</ScrollArea>
|
||||
|
||||
Reference in New Issue
Block a user