refac
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
import { fly } from 'svelte/transition';
|
import { fly } from 'svelte/transition';
|
||||||
import { flyAndScale } from '$lib/utils/transitions';
|
import { flyAndScale } from '$lib/utils/transitions';
|
||||||
|
|
||||||
import { config, user, tools as _tools, mobile, knowledge, chats } from '$lib/stores';
|
import { config, user, tools as _tools, mobile, knowledge } from '$lib/stores';
|
||||||
import { getKnowledgeBases } from '$lib/apis/knowledge';
|
import { getKnowledgeBases } from '$lib/apis/knowledge';
|
||||||
|
|
||||||
import { createPicker } from '$lib/utils/google-drive-picker';
|
import { createPicker } from '$lib/utils/google-drive-picker';
|
||||||
@@ -269,37 +269,35 @@
|
|||||||
</button>
|
</button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
{#if ($chats ?? []).length > 0}
|
<Tooltip
|
||||||
<Tooltip
|
content={fileUploadCapableModels.length !== selectedModels.length
|
||||||
content={fileUploadCapableModels.length !== selectedModels.length
|
? $i18n.t('Model(s) do not support file upload')
|
||||||
? $i18n.t('Model(s) do not support file upload')
|
: !fileUploadEnabled
|
||||||
: !fileUploadEnabled
|
? $i18n.t('You do not have permission to upload files.')
|
||||||
? $i18n.t('You do not have permission to upload files.')
|
: ''}
|
||||||
: ''}
|
className="w-full"
|
||||||
className="w-full"
|
>
|
||||||
|
<button
|
||||||
|
class="flex gap-2 w-full items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800/50 rounded-xl {!fileUploadEnabled
|
||||||
|
? 'opacity-50'
|
||||||
|
: ''}"
|
||||||
|
on:click={() => {
|
||||||
|
tab = 'chats';
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<button
|
<ClockRotateRight />
|
||||||
class="flex gap-2 w-full items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800/50 rounded-xl {!fileUploadEnabled
|
|
||||||
? 'opacity-50'
|
|
||||||
: ''}"
|
|
||||||
on:click={() => {
|
|
||||||
tab = 'chats';
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<ClockRotateRight />
|
|
||||||
|
|
||||||
<div class="flex items-center w-full justify-between">
|
<div class="flex items-center w-full justify-between">
|
||||||
<div class=" line-clamp-1">
|
<div class=" line-clamp-1">
|
||||||
{$i18n.t('Reference Chats')}
|
{$i18n.t('Reference Chats')}
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="text-gray-500">
|
|
||||||
<ChevronRight />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</button>
|
|
||||||
</Tooltip>
|
<div class="text-gray-500">
|
||||||
{/if}
|
<ChevronRight />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
</Tooltip>
|
||||||
|
|
||||||
{#if fileUploadEnabled}
|
{#if fileUploadEnabled}
|
||||||
{#if $config?.features?.enable_google_drive_integration}
|
{#if $config?.features?.enable_google_drive_integration}
|
||||||
|
|||||||
Reference in New Issue
Block a user