Skip to content

Commit 5e2108d

Browse files
authored
Make assistant feature visible globally (#756)
* Make assistant feature visible globally * Remove flag also here
1 parent 91ec91f commit 5e2108d

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/lib/components/NavMenu.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import type { LayoutData } from "../../routes/$types";
1010
import type { ConvSidebar } from "$lib/types/ConvSidebar";
1111
import { page } from "$app/stores";
12-
import { isHuggingChat } from "$lib/utils/isHuggingChat";
1312
1413
export let conversations: ConvSidebar[] = [];
1514
export let canLogin: boolean;
@@ -109,7 +108,7 @@
109108
>
110109
Theme
111110
</button>
112-
{#if $page.data.enableAssistants && (!isHuggingChat || $page.data.settings.assistants?.length >= 1)}
111+
{#if $page.data.enableAssistants}
113112
<a
114113
href="{base}/assistants"
115114
class="flex h-9 flex-none items-center gap-1.5 rounded-lg pl-2.5 pr-2 text-gray-500 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700"

src/routes/settings/+layout.svelte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
1313
import UserIcon from "~icons/carbon/user";
1414
import { fade, fly } from "svelte/transition";
15-
import { isHuggingChat } from "$lib/utils/isHuggingChat";
1615
export let data;
1716
1817
let previousPage: string = base;
@@ -78,11 +77,10 @@
7877
</a>
7978
{/each}
8079
<!-- if its huggingchat, the number of assistants owned by the user must be non-zero to show the UI -->
81-
{#if data.enableAssistants && (!isHuggingChat || data.assistants.length >= 1)}
80+
{#if data.enableAssistants}
8281
<h3 bind:this={assistantsSection} class="pb-3 pl-3 pt-5 text-[.8rem] text-gray-800 sm:pl-1">
8382
Assistants
8483
</h3>
85-
8684
{#if !data.loginEnabled || (data.loginEnabled && !!data.user)}
8785
<a
8886
href="{base}/settings/assistants/new"

0 commit comments

Comments
 (0)