From 36483e92b84a14904da249e141c270b898cd218e Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Sun, 19 Jan 2025 09:19:24 -0800 Subject: [PATCH] quick nit --- backend/onyx/auth/noauth_user.py | 1 - web/src/app/assistants/mine/AssistantCard.tsx | 21 +++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/backend/onyx/auth/noauth_user.py b/backend/onyx/auth/noauth_user.py index 9a40e0cae49..e17694894e0 100644 --- a/backend/onyx/auth/noauth_user.py +++ b/backend/onyx/auth/noauth_user.py @@ -23,7 +23,6 @@ def load_no_auth_user_preferences(store: KeyValueStore) -> UserPreferences: preferences_data = cast( Mapping[str, Any], store.load(KV_NO_AUTH_USER_PREFERENCES_KEY) ) - print("preferences_data", preferences_data) return UserPreferences(**preferences_data) except KvKeyNotFoundError: return UserPreferences( diff --git a/web/src/app/assistants/mine/AssistantCard.tsx b/web/src/app/assistants/mine/AssistantCard.tsx index 7be3992bcd9..57017cfcdac 100644 --- a/web/src/app/assistants/mine/AssistantCard.tsx +++ b/web/src/app/assistants/mine/AssistantCard.tsx @@ -35,19 +35,24 @@ import { import { PencilIcon } from "lucide-react"; import { SettingsContext } from "@/components/settings/SettingsProvider"; import { usePaidEnterpriseFeaturesEnabled } from "@/components/settings/usePaidEnterpriseFeaturesEnabled"; +import { truncateString } from "@/lib/utils"; export const AssistantBadge = ({ text, className, + maxLength, }: { text: string; className?: string; + maxLength?: number; }) => { return (
-
{text}
+
+ {maxLength ? truncateString(text, maxLength) : text} +
); }; @@ -109,7 +114,7 @@ const AssistantCard: React.FC<{

{persona.name}

@@ -128,12 +133,16 @@ const AssistantCard: React.FC<{ {persona.labels && persona.labels.length > 0 && ( <> - {persona.labels.slice(0, 3).map((label, index) => ( - + {persona.labels.slice(0, 2).map((label, index) => ( + ))} - {persona.labels.length > 3 && ( + {persona.labels.length > 2 && ( )}