diff --git a/frontend/src/assets/emptystateIcons/agent.png b/frontend/src/assets/emptystateIcons/agent.png new file mode 100644 index 000000000..0bcc8cc0f Binary files /dev/null and b/frontend/src/assets/emptystateIcons/agent.png differ diff --git a/frontend/src/assets/emptystateIcons/kb.png b/frontend/src/assets/emptystateIcons/kb.png new file mode 100644 index 000000000..eecb73f80 Binary files /dev/null and b/frontend/src/assets/emptystateIcons/kb.png differ diff --git a/frontend/src/routes/_authenticated/agent.tsx b/frontend/src/routes/_authenticated/agent.tsx index f0b7f2692..0e396f9d1 100644 --- a/frontend/src/routes/_authenticated/agent.tsx +++ b/frontend/src/routes/_authenticated/agent.tsx @@ -78,6 +78,7 @@ import { textToCitationIndex } from "@/utils/chatUtils.tsx" import { GoogleDriveNavigation } from "@/components/GoogleDriveNavigation" import { CollectionNavigation } from "@/components/CollectionNavigation" import ViewAgent from "@/components/ViewAgent" +import agentEmptyStateIcon from "@/assets/emptystateIcons/agent.png" type CurrentResp = { resp: string @@ -2751,22 +2752,36 @@ function AgentComponent() { AGENTS
-
- - -
- + {(() => { + // Calculate whether current tab has agents + const agentLists: Record = { + "all": allAgentsList, + "made-by-me": madeByMeAgentsList, + "shared-to-me": sharedToMeAgentsList, + } + const currentTabHasAgents = (agentLists[activeTab]?.length ?? 0) > 0 + + return currentTabHasAgents && ( + <> +
+ + +
+ + + ) + })()}
@@ -2820,46 +2835,42 @@ function AgentComponent() { ) })()} - {(allAgentsList.length > 0 || - madeByMeAgentsList.length > 0 || - sharedToMeAgentsList.length > 0) && ( // Only show tabs if there are agents in any list -
-
- handleTabChange("all")} - icon="asterisk" - label="ALL" - /> - handleTabChange("shared-to-me")} - icon="users" - label="SHARED-WITH-ME" - /> - handleTabChange("made-by-me")} - icon="user" - label="MADE-BY-ME" +
+
+ handleTabChange("all")} + icon="asterisk" + label="ALL" + /> + handleTabChange("shared-to-me")} + icon="users" + label="SHARED-WITH-ME" + /> + handleTabChange("made-by-me")} + icon="user" + label="MADE-BY-ME" + /> +
+
+
-
- -
+
- )} +
{(() => { let currentListToDisplay: SelectPublicAgent[] = [] @@ -2910,13 +2921,36 @@ function AgentComponent() { } if (currentListToDisplay.length === 0 && !listSearchQuery) { + const isSharedTab = activeTab === "shared-to-me" + const title = isSharedTab + ? "No agents shared with you yet" + : "No agents created yet" + const description = isSharedTab + ? null + : "Click 'Create Agent' to add your first agent" + return ( -
-

- No agents in this category yet. +

+ No agents +

+ {title}

- {activeTab === "all" && ( -

Click "CREATE" to get started.

+ {description && ( +

+ {description} +

+ )} + {!isSharedTab && ( + )}
) diff --git a/frontend/src/routes/_authenticated/knowledgeManagement.tsx b/frontend/src/routes/_authenticated/knowledgeManagement.tsx index b7938336f..8a5920ce3 100644 --- a/frontend/src/routes/_authenticated/knowledgeManagement.tsx +++ b/frontend/src/routes/_authenticated/knowledgeManagement.tsx @@ -61,6 +61,7 @@ import CsvViewer from "@/components/CsvViewer" import TxtViewer from "@/components/TxtViewer" import { useUploadProgress } from "@/store/useUploadProgressStore" import { DebugDocModal } from "@/components/DebugDocModal" +import kbEmptyStateIcon from "@/assets/emptystateIcons/kb.png" // Persistent storage for documentId -> tempChatId mapping using sessionStorage const DOCUMENT_CHAT_MAP_KEY = "documentToTempChatMap" @@ -1774,21 +1775,50 @@ function KnowledgeManagementContent() {

KNOWLEDGE MANAGEMENT

-
- {/* */} + {(collections.length > 0 || isUploading) && ( +
+ {/* */} + +
+ )} +
+ + {collections.length === 0 && !isUploading ? ( + // Empty state - centered layout +
+ No collections +

+ No collections available yet +

+

+ Add your first collection to structure and manage information +

-
-
+ ) : ( +
{/* Show skeleton loader when uploading to NEW collection */} {isUploading && batchProgress.total > 0 && isNewCollectionUpload && (
@@ -2070,7 +2100,8 @@ function KnowledgeManagementContent() { )}
))} -
+
+ )}
)}