From 47cd858185230cb3018a0b69f84f13b4a648078a Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Mon, 10 Feb 2025 10:04:42 -0800 Subject: [PATCH 1/6] black history sidebar --- web/src/app/chat/sessionSidebar/HistorySidebar.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/app/chat/sessionSidebar/HistorySidebar.tsx b/web/src/app/chat/sessionSidebar/HistorySidebar.tsx index 7685072e6af..b2cdaecde1d 100644 --- a/web/src/app/chat/sessionSidebar/HistorySidebar.tsx +++ b/web/src/app/chat/sessionSidebar/HistorySidebar.tsx @@ -273,6 +273,7 @@ export const HistorySidebar = forwardRef( border-r dark:border-none dark:text-[#D4D4D4] + dark:bg-[#000] border-sidebar-border flex flex-col relative From 616b02fff8ffa1bd8e39475ff2e06c5c294d9cbf Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Mon, 10 Feb 2025 10:29:46 -0800 Subject: [PATCH 2/6] misc improvements --- backend/onyx/db/persona.py | 1 + web/src/app/assistants/mine/AssistantCard.tsx | 126 +++++++----------- .../app/assistants/mine/AssistantModal.tsx | 6 +- web/src/app/chat/folders/FolderDropdown.tsx | 4 +- web/src/app/chat/sessionSidebar/PagesTab.tsx | 2 +- web/src/components/Spinner.tsx | 2 +- web/src/components/ui/popover.tsx | 2 +- 7 files changed, 55 insertions(+), 88 deletions(-) diff --git a/backend/onyx/db/persona.py b/backend/onyx/db/persona.py index 40667e02dca..e37cde55ddf 100644 --- a/backend/onyx/db/persona.py +++ b/backend/onyx/db/persona.py @@ -228,6 +228,7 @@ def create_update_persona( num_chunks=create_persona_request.num_chunks, llm_relevance_filter=create_persona_request.llm_relevance_filter, llm_filter_extraction=create_persona_request.llm_filter_extraction, + is_default_persona=create_persona_request.is_default_persona, ) versioned_make_persona_private = fetch_versioned_implementation( diff --git a/web/src/app/assistants/mine/AssistantCard.tsx b/web/src/app/assistants/mine/AssistantCard.tsx index be5d26320f9..d712f4e4051 100644 --- a/web/src/app/assistants/mine/AssistantCard.tsx +++ b/web/src/app/assistants/mine/AssistantCard.tsx @@ -150,13 +150,8 @@ const AssistantCard: React.FC<{ {isOwnedByUser && (
- - open ? setActivePopover(null) : setActivePopover(undefined) - } - > - + + + {isPaidEnterpriseFeaturesEnabled && isOwnedByUser && ( - {isPaidEnterpriseFeaturesEnabled && isOwnedByUser && ( - - )} - -
- )} - {activePopover === "visibility" && ( - { - await togglePersonaPublicStatus(persona.id, isPublic); - await refreshAssistants(); - }} - /> - )} - {activePopover === "delete" && ( - { - const success = await deletePersona(persona.id); - if (success) { - await refreshAssistants(); - } - closePopover(); - }} - /> - )} + )} + + diff --git a/web/src/app/assistants/mine/AssistantModal.tsx b/web/src/app/assistants/mine/AssistantModal.tsx index aa28ebbfced..a0dfba6e2c2 100644 --- a/web/src/app/assistants/mine/AssistantModal.tsx +++ b/web/src/app/assistants/mine/AssistantModal.tsx @@ -118,7 +118,7 @@ export function AssistantModal({ return ( !open && hideModal()}> -
+
@@ -205,7 +205,7 @@ export function AssistantModal({ Featured Assistants -
+
{featuredAssistants.length > 0 ? ( featuredAssistants.map((assistant, index) => (
diff --git a/web/src/app/chat/folders/FolderDropdown.tsx b/web/src/app/chat/folders/FolderDropdown.tsx index 830020d04b3..a729fb0c15f 100644 --- a/web/src/app/chat/folders/FolderDropdown.tsx +++ b/web/src/app/chat/folders/FolderDropdown.tsx @@ -162,12 +162,12 @@ export const FolderDropdown = forwardRef( onDrop={handleDrop} >
setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} diff --git a/web/src/app/chat/sessionSidebar/PagesTab.tsx b/web/src/app/chat/sessionSidebar/PagesTab.tsx index 9a85f3693c6..973f846baf4 100644 --- a/web/src/app/chat/sessionSidebar/PagesTab.tsx +++ b/web/src/app/chat/sessionSidebar/PagesTab.tsx @@ -317,7 +317,7 @@ export function PagesTab({ return (
{popup} -
+

Chats

-
- - - -
-

Share

- - !selectedUsers.map((u2) => u2.id).includes(u1.id) && - !sharedUsersWithoutOwner - .map((u2: MinimalUserSnapshot) => u2.id) - .includes(u1.id) && - u1.id !== user?.id - ) - .map((user) => ({ - name: user.email, - value: user.id, - }))} - onSelect={(option) => { - setSelectedUsers([ - ...Array.from( - new Set([ - ...selectedUsers, - { id: option.value as string, email: option.name }, - ]) - ), - ]); - }} - itemComponent={({ option }) => ( -
- - {option.name} - -
- )} - /> -
- - {selectedUsers.length > 0 && ( -
-

- Selected Users: -

-
- {selectedUsers.map((selectedUser) => ( -
{ - setSelectedUsers( - selectedUsers.filter( - (user) => user.id !== selectedUser.id - ) - ); - }} - className="flex items-center bg-blue-50 text-blue-700 rounded-full px-3 py-1 text-xs hover:bg-blue-100 transition-colors duration-200 cursor-pointer" - > - {selectedUser.email} - -
- ))} -
-
- )} - - {selectedUsers.length > 0 && ( - - )} - -
-

Currently Shared With

-
- -
-
-
- - ); -} diff --git a/web/src/app/assistants/mine/DeleteAssistantPopover.tsx b/web/src/app/assistants/mine/DeleteAssistantPopover.tsx deleted file mode 100644 index b85b337e572..00000000000 --- a/web/src/app/assistants/mine/DeleteAssistantPopover.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from "react"; -import { FiTrash } from "react-icons/fi"; -import { Button } from "@/components/ui/button"; - -interface DeleteAssistantPopoverProps { - entityName: string; - onClose: () => void; - onSubmit: () => void; -} - -export function DeleteAssistantPopover({ - entityName, - onClose, - onSubmit, -}: DeleteAssistantPopoverProps) { - return ( -
-

- Are you sure you want to delete assistant {entityName}? -

-
- - -
-
- ); -} From ed8bc1e63b8a520b5fe2849e84811df6f77d538d Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Mon, 10 Feb 2025 10:54:03 -0800 Subject: [PATCH 5/6] add nits --- web/src/app/chat/input/LLMPopover.tsx | 1 - web/src/lib/hooks.ts | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/app/chat/input/LLMPopover.tsx b/web/src/app/chat/input/LLMPopover.tsx index eface23004a..86d7697a471 100644 --- a/web/src/app/chat/input/LLMPopover.tsx +++ b/web/src/app/chat/input/LLMPopover.tsx @@ -161,7 +161,6 @@ export default function LLMPopover({ size: 16, className: "flex-none my-auto text-black", })} - asdfasdf {getDisplayNameForModel(name)} diff --git a/web/src/lib/hooks.ts b/web/src/lib/hooks.ts index 336b67598f7..8005b707fcc 100644 --- a/web/src/lib/hooks.ts +++ b/web/src/lib/hooks.ts @@ -647,6 +647,7 @@ export const useUserGroups = (): { const MODEL_DISPLAY_NAMES: { [key: string]: string } = { // OpenAI models + "o1-2025-12-17": "O1 (December 2025)", "o3-mini": "O3 Mini", "o1-mini": "O1 Mini", "o1-preview": "O1 Preview", From a672e94291996407049144feb48751b7edb17b08 Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Mon, 10 Feb 2025 11:35:21 -0800 Subject: [PATCH 6/6] quick nit --- web/src/app/assistants/mine/AssistantCard.tsx | 7 +++---- web/src/app/assistants/mine/AssistantModal.tsx | 2 +- web/src/components/Modal.tsx | 2 +- web/src/components/admin/ClientLayout.tsx | 2 +- web/src/components/ui/popover.tsx | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/web/src/app/assistants/mine/AssistantCard.tsx b/web/src/app/assistants/mine/AssistantCard.tsx index 6c6504c84b1..30abd4d30fc 100644 --- a/web/src/app/assistants/mine/AssistantCard.tsx +++ b/web/src/app/assistants/mine/AssistantCard.tsx @@ -147,8 +147,8 @@ const AssistantCard: React.FC<{ )}
{isOwnedByUser && ( -
- +
+
- {!hideDividerForTitle && } + {!hideDividerForTitle ? :
} )}
diff --git a/web/src/components/admin/ClientLayout.tsx b/web/src/components/admin/ClientLayout.tsx index 254413d26fa..63efa45dc74 100644 --- a/web/src/components/admin/ClientLayout.tsx +++ b/web/src/components/admin/ClientLayout.tsx @@ -75,7 +75,7 @@ export function ClientLayout({ /> )} -
+