diff --git a/backend/onyx/db/persona.py b/backend/onyx/db/persona.py index 20b721ec4f3..a1821e3b7ca 100644 --- a/backend/onyx/db/persona.py +++ b/backend/onyx/db/persona.py @@ -521,6 +521,7 @@ def upsert_persona( existing_persona.llm_model_provider_override = llm_model_provider_override existing_persona.llm_model_version_override = llm_model_version_override existing_persona.starter_messages = starter_messages + existing_persona.display_priority = display_priority existing_persona.deleted = False # Un-delete if previously deleted existing_persona.is_public = is_public existing_persona.icon_color = icon_color diff --git a/backend/onyx/seeding/load_yamls.py b/backend/onyx/seeding/load_yamls.py index a9e6cd01d3b..5edf5d318c5 100644 --- a/backend/onyx/seeding/load_yamls.py +++ b/backend/onyx/seeding/load_yamls.py @@ -48,6 +48,7 @@ def load_personas_from_yaml( data = yaml.safe_load(file) all_personas = data.get("personas", []) + for persona in all_personas: doc_set_names = persona["document_sets"] doc_sets: list[DocumentSetDBModel] = [ @@ -127,6 +128,7 @@ def load_personas_from_yaml( display_priority=( existing_persona.display_priority if existing_persona is not None + and persona.get("display_priority") is None else persona.get("display_priority") ), is_visible=( diff --git a/backend/onyx/seeding/personas.yaml b/backend/onyx/seeding/personas.yaml index 37e055f8087..cd9542db5ed 100644 --- a/backend/onyx/seeding/personas.yaml +++ b/backend/onyx/seeding/personas.yaml @@ -39,7 +39,7 @@ personas: document_sets: [] icon_shape: 23013 icon_color: "#6FB1FF" - display_priority: 1 + display_priority: 0 is_visible: true starter_messages: - name: "Give me an overview of what's here" @@ -64,7 +64,7 @@ personas: document_sets: [] icon_shape: 50910 icon_color: "#FF6F6F" - display_priority: 0 + display_priority: 1 is_visible: true starter_messages: - name: "Summarize a document" diff --git a/web/src/lib/assistants/utils.ts b/web/src/lib/assistants/utils.ts index 214cc2c0f9e..40953ee1ad1 100644 --- a/web/src/lib/assistants/utils.ts +++ b/web/src/lib/assistants/utils.ts @@ -114,9 +114,11 @@ export function getUserCreatedAssistants( user: User | null, assistants: Persona[] ) { - return assistants.filter((assistant) => + const result = assistants.filter((assistant) => checkUserOwnsAssistant(user, assistant) ); + console.log("Output - user created assistants:", result); + return result; } // Filter assistants based on connector status, image compatibility and visibility