Make assistant feature visible globally (#756)
Browse files* Make assistant feature visible globally
* Remove flag also here
src/lib/components/NavMenu.svelte
CHANGED
@@ -9,7 +9,6 @@
|
|
9 |
import type { LayoutData } from "../../routes/$types";
|
10 |
import type { ConvSidebar } from "$lib/types/ConvSidebar";
|
11 |
import { page } from "$app/stores";
|
12 |
-
import { isHuggingChat } from "$lib/utils/isHuggingChat";
|
13 |
|
14 |
export let conversations: ConvSidebar[] = [];
|
15 |
export let canLogin: boolean;
|
@@ -109,7 +108,7 @@
|
|
109 |
>
|
110 |
Theme
|
111 |
</button>
|
112 |
-
{#if $page.data.enableAssistants
|
113 |
<a
|
114 |
href="{base}/assistants"
|
115 |
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"
|
|
|
9 |
import type { LayoutData } from "../../routes/$types";
|
10 |
import type { ConvSidebar } from "$lib/types/ConvSidebar";
|
11 |
import { page } from "$app/stores";
|
|
|
12 |
|
13 |
export let conversations: ConvSidebar[] = [];
|
14 |
export let canLogin: boolean;
|
|
|
108 |
>
|
109 |
Theme
|
110 |
</button>
|
111 |
+
{#if $page.data.enableAssistants}
|
112 |
<a
|
113 |
href="{base}/assistants"
|
114 |
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
CHANGED
@@ -12,7 +12,6 @@
|
|
12 |
|
13 |
import UserIcon from "~icons/carbon/user";
|
14 |
import { fade, fly } from "svelte/transition";
|
15 |
-
import { isHuggingChat } from "$lib/utils/isHuggingChat";
|
16 |
export let data;
|
17 |
|
18 |
let previousPage: string = base;
|
@@ -78,11 +77,10 @@
|
|
78 |
</a>
|
79 |
{/each}
|
80 |
<!-- if its huggingchat, the number of assistants owned by the user must be non-zero to show the UI -->
|
81 |
-
{#if data.enableAssistants
|
82 |
<h3 bind:this={assistantsSection} class="pb-3 pl-3 pt-5 text-[.8rem] text-gray-800 sm:pl-1">
|
83 |
Assistants
|
84 |
</h3>
|
85 |
-
|
86 |
{#if !data.loginEnabled || (data.loginEnabled && !!data.user)}
|
87 |
<a
|
88 |
href="{base}/settings/assistants/new"
|
|
|
12 |
|
13 |
import UserIcon from "~icons/carbon/user";
|
14 |
import { fade, fly } from "svelte/transition";
|
|
|
15 |
export let data;
|
16 |
|
17 |
let previousPage: string = base;
|
|
|
77 |
</a>
|
78 |
{/each}
|
79 |
<!-- if its huggingchat, the number of assistants owned by the user must be non-zero to show the UI -->
|
80 |
+
{#if data.enableAssistants}
|
81 |
<h3 bind:this={assistantsSection} class="pb-3 pl-3 pt-5 text-[.8rem] text-gray-800 sm:pl-1">
|
82 |
Assistants
|
83 |
</h3>
|
|
|
84 |
{#if !data.loginEnabled || (data.loginEnabled && !!data.user)}
|
85 |
<a
|
86 |
href="{base}/settings/assistants/new"
|