- {loadingNewConversation || isConversationsLoading ? (
-
- Loading...
-
+ {/* Show skeleton loaders when loading and no conversations exist */}
+ {isConversationsLoading && conversations.length === 0 ? (
+
+ [0,1].map((skeletonIndex) => (
+
+ ))
) : (
<>
- {/* Show placeholder conversation if it exists */}
- {placeholderConversation && (
-
- )}
{/* Show regular conversations */}
- {conversations.length === 0 && !placeholderConversation ? (
+ {conversations.length === 0 && !isConversationsLoading ? (
No conversations yet
@@ -469,7 +456,7 @@ export function Navigation({
key={conversation.response_id}
type="button"
className={`w-full px-3 h-11 rounded-lg group relative text-left ${
- loading
+ loading || isConversationsLoading
? "opacity-50 cursor-not-allowed"
: "hover:bg-accent cursor-pointer"
} ${
@@ -478,11 +465,11 @@ export function Navigation({
: ""
}`}
onClick={() => {
- if (loading) return;
+ if (loading || isConversationsLoading) return;
loadConversation(conversation);
refreshConversations();
}}
- disabled={loading}
+ disabled={loading || isConversationsLoading}
>
@@ -493,7 +480,7 @@ export function Navigation({
@@ -543,51 +530,6 @@ export function Navigation({
>
)}
-
- {/* Conversation Knowledge Section - appears right after last conversation
-
-
-
- Conversation knowledge
-
-
-
-
-
- {conversationDocs.length === 0 ? (
-
- No documents yet
-
- ) : (
- conversationDocs.map(doc => (
-
- ))
- )}
-
-
*/}
@@ -595,7 +537,7 @@ export function Navigation({
- {newConversationFiles?.length === 0 ? (
+ {(newConversationFiles?.length ?? 0) === 0 ? (
No documents yet