refac
This commit is contained in:
1 parent
7a9928ef17
commit
263bbc77d8
16 files changed
+98
-82
No files matched your search
@@ -24,11 +24,9 @@
|
||||
import Integrations from './Settings/Integrations.svelte';
|
||||
import Subagents from './Settings/Subagents.svelte';
|
||||
|
||||
import ChartBar from '../icons/ChartBar.svelte';
|
||||
import DocumentChartBar from '../icons/DocumentChartBar.svelte';
|
||||
import Search from '../icons/Search.svelte';
|
||||
import User from '../icons/User.svelte';
|
||||
import XMark from '../icons/XMark.svelte';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
@@ -310,6 +308,15 @@
|
||||
}, 100);
|
||||
};
|
||||
|
||||
$: selectedTabTitle = allSettings.find((tab) => tab.id === selectedTab)?.title ?? 'Settings';
|
||||
|
||||
const tabButtonClass = (active) =>
|
||||
`flex items-center gap-1.5 h-7 px-2 lg:w-full shrink-0 rounded-lg text-xs text-left transition-colors duration-75 select-none ${
|
||||
active
|
||||
? 'font-medium text-gray-900 dark:text-white bg-gray-100 dark:bg-white/6'
|
||||
: 'text-gray-500 hover:text-gray-700 dark:hover:text-gray-300'
|
||||
}`;
|
||||
|
||||
onMount(() => {
|
||||
const containerElement = document.getElementById('admin-settings-tabs-container');
|
||||
|
||||
@@ -328,28 +335,37 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col lg:flex-row w-full h-full pb-2 lg:space-x-4">
|
||||
<div
|
||||
<div class="flex flex-col lg:flex-row w-full h-full min-h-0 pb-2">
|
||||
<nav
|
||||
id="admin-settings-tabs-container"
|
||||
class="tabs mx-[16px] lg:mx-0 lg:px-[16px] flex flex-row overflow-x-auto gap-2.5 max-w-full lg:gap-1 lg:flex-col lg:flex-none lg:w-50 dark:text-gray-200 text-sm font-normal text-left scrollbar-none"
|
||||
class="shrink-0 min-w-0 lg:min-h-0 flex lg:block border-b lg:border-b-0 lg:border-r border-gray-200 dark:border-white/6 lg:w-[15rem]"
|
||||
>
|
||||
<div
|
||||
class="hidden lg:flex w-full rounded-full px-2.5 gap-2 bg-gray-100/80 dark:bg-gray-850/80 backdrop-blur-2xl my-1 -mx-1 mt-1.5"
|
||||
class="tabs flex min-w-0 flex-1 overflow-x-auto lg:overflow-x-hidden lg:overflow-y-auto lg:flex-col p-1 gap-px"
|
||||
>
|
||||
<div
|
||||
class="hidden lg:flex items-center gap-1.5 h-7 px-2 lg:w-full shrink-0 rounded-lg text-xs bg-gray-50/70 dark:bg-white/[0.03] mb-2"
|
||||
id="settings-search"
|
||||
>
|
||||
<div class="self-center rounded-l-xl bg-transparent">
|
||||
<Search className="size-3.5" strokeWidth="1.5" />
|
||||
</div>
|
||||
<label class="sr-only" for="search-input-settings-modal">{$i18n.t('Search')}</label>
|
||||
<label class="sr-only" for="search-input-admin-settings">{$i18n.t('Search')}</label>
|
||||
<input
|
||||
class="w-full py-1 text-sm bg-transparent dark:text-gray-300 outline-hidden"
|
||||
class="w-full py-1 text-xs bg-transparent dark:text-gray-300 outline-hidden"
|
||||
bind:value={search}
|
||||
id="search-input-settings-modal"
|
||||
id="search-input-admin-settings"
|
||||
on:input={searchDebounceHandler}
|
||||
placeholder={$i18n.t('Search')}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<span
|
||||
class="hidden lg:block text-[0.625rem] text-gray-400 dark:text-gray-600 px-2 mt-1.5 mb-0.5"
|
||||
>
|
||||
{$i18n.t('Admin')}
|
||||
</span>
|
||||
|
||||
<!-- {$i18n.t('General')} -->
|
||||
<!-- {$i18n.t('Authentication')} -->
|
||||
<!-- {$i18n.t('Connections')} -->
|
||||
@@ -370,12 +386,9 @@
|
||||
id={tab.id}
|
||||
href={tab.route}
|
||||
draggable="false"
|
||||
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 lg:flex-none flex text-right transition select-none {selectedTab ===
|
||||
tab.id
|
||||
? ''
|
||||
: ' text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'}"
|
||||
class={tabButtonClass(selectedTab === tab.id)}
|
||||
>
|
||||
<div class=" self-center mr-2">
|
||||
<div class="self-center">
|
||||
{#if tab.id === 'general'}
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
@@ -558,14 +571,18 @@
|
||||
</svg>
|
||||
{/if}
|
||||
</div>
|
||||
<div class=" self-center">{$i18n.t(tab.title)}</div>
|
||||
<div class="self-center truncate">{$i18n.t(tab.title)}</div>
|
||||
</a>
|
||||
{/each}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div
|
||||
class="flex-1 mt-3 lg:mt-1 px-[16px] lg:pr-[16px] lg:pl-0 overflow-y-scroll scrollbar-hidden"
|
||||
>
|
||||
<div class="flex-1 min-h-0 p-4 lg:px-5 flex flex-col">
|
||||
<h2 class="text-sm font-medium text-gray-900 dark:text-white mb-4">
|
||||
{$i18n.t(selectedTabTitle)}
|
||||
</h2>
|
||||
|
||||
<div class="flex-1 min-h-0 overflow-hidden">
|
||||
{#if selectedTab === 'general'}
|
||||
<General
|
||||
saveHandler={async () => {
|
||||
@@ -651,3 +668,4 @@
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -233,10 +233,10 @@
|
||||
dispatch('save');
|
||||
}}
|
||||
>
|
||||
<div class=" space-y-3 overflow-y-scroll scrollbar-hidden h-full">
|
||||
<div class=" space-y-3 flex-1 min-h-0 overflow-y-auto scrollbar-hover pr-1.5 -mr-1.5">
|
||||
<div class="flex flex-col gap-3">
|
||||
<div>
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('Speech-to-Text')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('Speech-to-Text')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
@@ -539,7 +539,7 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('Text-to-Speech')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('Text-to-Speech')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
|
||||
@@ -111,10 +111,10 @@
|
||||
class="flex flex-col h-full justify-between space-y-3 text-sm"
|
||||
on:submit|preventDefault={submitHandler}
|
||||
>
|
||||
<div class="space-y-3 overflow-y-scroll scrollbar-hidden h-full">
|
||||
<div class="space-y-3 flex-1 min-h-0 overflow-y-auto scrollbar-hover pr-1.5 -mr-1.5">
|
||||
{#if adminConfig !== null}
|
||||
<div class="mb-3">
|
||||
<div class="mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('User Access')}</div>
|
||||
<div class="mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('User Access')}</div>
|
||||
|
||||
<hr class="border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('Pending Accounts')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('Pending Accounts')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
@@ -502,7 +502,7 @@
|
||||
</div>
|
||||
{#if oauthConfig}
|
||||
<div class="mb-3">
|
||||
<div class="mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('OAuth / OIDC')}</div>
|
||||
<div class="mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('OAuth / OIDC')}</div>
|
||||
|
||||
<hr class="border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
saveHandler();
|
||||
}}
|
||||
>
|
||||
<div class=" space-y-3 overflow-y-scroll scrollbar-hidden h-full">
|
||||
<div class=" space-y-3 flex-1 min-h-0 overflow-y-auto scrollbar-hover pr-1.5 -mr-1.5">
|
||||
{#if config}
|
||||
<div>
|
||||
<div class="mb-3.5">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('Code Execution')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('Code Execution')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
</div>
|
||||
|
||||
<div class="mb-3.5">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('Code Interpreter')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('Code Interpreter')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
|
||||
@@ -216,10 +216,10 @@
|
||||
/>
|
||||
|
||||
<form class="flex flex-col h-full justify-between text-sm" on:submit|preventDefault={submitHandler}>
|
||||
<div class=" overflow-y-scroll scrollbar-hidden h-full">
|
||||
<div class=" flex-1 min-h-0 overflow-y-auto scrollbar-hover pr-1.5 -mr-1.5">
|
||||
{#if ENABLE_OPENAI_API !== null && ENABLE_OLLAMA_API !== null && connectionsConfig !== null}
|
||||
<div class="mb-3.5">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('General')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('General')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col h-full justify-between text-sm">
|
||||
<div class="space-y-3 overflow-y-scroll scrollbar-hidden h-full">
|
||||
<div class="space-y-3 flex-1 min-h-0 overflow-y-auto scrollbar-hover pr-1.5 -mr-1.5">
|
||||
<input
|
||||
id="config-json-input"
|
||||
hidden
|
||||
|
||||
@@ -373,10 +373,10 @@
|
||||
}}
|
||||
>
|
||||
{#if RAGConfig}
|
||||
<div class=" space-y-2.5 overflow-y-scroll scrollbar-hidden h-full pr-1.5">
|
||||
<div class=" space-y-2.5 flex-1 min-h-0 overflow-y-auto scrollbar-hover pr-1.5 -mr-1.5">
|
||||
<div class="">
|
||||
<div class="mb-3">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('General')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('General')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
@@ -1036,7 +1036,7 @@
|
||||
|
||||
{#if !RAGConfig.BYPASS_EMBEDDING_AND_RETRIEVAL}
|
||||
<div class="mb-3">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('Embedding')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('Embedding')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
@@ -1250,7 +1250,7 @@
|
||||
{/if}
|
||||
|
||||
<div class="mb-3">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('Retrieval')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('Retrieval')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
@@ -1532,7 +1532,7 @@
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('Files')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('Files')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
@@ -1644,7 +1644,7 @@
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('Integration')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('Integration')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
@@ -1664,7 +1664,7 @@
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('Danger Zone')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('Danger Zone')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
|
||||
@@ -100,11 +100,11 @@
|
||||
dispatch('save');
|
||||
}}
|
||||
>
|
||||
<div class="overflow-y-scroll scrollbar-hidden h-full">
|
||||
<div class="flex-1 min-h-0 overflow-y-auto scrollbar-hover pr-1.5 -mr-1.5">
|
||||
{#if evaluationConfig !== null}
|
||||
<div class="">
|
||||
<div class="mb-3">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('General')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('General')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
{#if evaluationConfig.ENABLE_EVALUATION_ARENA_MODELS}
|
||||
<div class="mb-3">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal flex justify-between items-center">
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600 flex justify-between items-center">
|
||||
<div>
|
||||
{$i18n.t('Manage')}
|
||||
</div>
|
||||
|
||||
@@ -77,11 +77,11 @@
|
||||
updateHandler();
|
||||
}}
|
||||
>
|
||||
<div class="space-y-3 overflow-y-scroll scrollbar-hidden h-full">
|
||||
<div class="space-y-3 flex-1 min-h-0 overflow-y-auto scrollbar-hover pr-1.5 -mr-1.5">
|
||||
{#if adminConfig !== null}
|
||||
<div class="">
|
||||
<div class="mb-3.5">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('General')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('General')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('Features')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('Features')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
@@ -390,7 +390,7 @@
|
||||
<Events />
|
||||
|
||||
<div class="mb-3.5">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('UI')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('UI')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
|
||||
@@ -293,7 +293,7 @@
|
||||
{#if config}
|
||||
<div>
|
||||
<div class="mb-3">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('General')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('General')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('Create Image')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('Create Image')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
@@ -884,7 +884,7 @@
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('Edit Image')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('Edit Image')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
|
||||
@@ -160,11 +160,11 @@
|
||||
updateHandler();
|
||||
}}
|
||||
>
|
||||
<div class=" overflow-y-scroll scrollbar-hidden h-full">
|
||||
<div class=" flex-1 min-h-0 overflow-y-auto scrollbar-hover pr-1.5 -mr-1.5">
|
||||
{#if servers !== null}
|
||||
<div class="">
|
||||
<div class="mb-3">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('Tools')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('Tools')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
@@ -309,7 +309,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-8 mb-2.5 text-base font-normal">{$i18n.t('Knowledge')}</div>
|
||||
<div class="mt-8 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('Knowledge')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
|
||||
@@ -106,9 +106,9 @@
|
||||
dispatch('save');
|
||||
}}
|
||||
>
|
||||
<div class=" overflow-y-scroll scrollbar-hidden h-full pr-1.5">
|
||||
<div class=" flex-1 min-h-0 overflow-y-auto scrollbar-hover pr-1.5 -mr-1.5">
|
||||
<div class="mb-3.5">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('Tasks')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('Tasks')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
updateHandler();
|
||||
}}
|
||||
>
|
||||
<div class="overflow-y-scroll scrollbar-hidden h-full">
|
||||
<div class="flex-1 min-h-0 overflow-y-auto scrollbar-hover pr-1.5 -mr-1.5">
|
||||
{#if PIPELINES_LIST !== null}
|
||||
<div class="flex w-full justify-between mb-2">
|
||||
<div class=" self-center text-sm font-normal">
|
||||
|
||||
@@ -57,8 +57,8 @@
|
||||
</script>
|
||||
|
||||
<form class="flex h-full flex-col justify-between text-sm" on:submit|preventDefault={save}>
|
||||
<div class="h-full overflow-y-auto scrollbar-hidden">
|
||||
<div class="mt-0.5 mb-4 text-base font-normal">{$i18n.t('Sub-agents')}</div>
|
||||
<div class="flex-1 min-h-0 overflow-y-auto scrollbar-hover pr-1.5 -mr-1.5">
|
||||
<div class="mt-0.5 mb-4 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('Sub-agents')}</div>
|
||||
|
||||
{#if loading}
|
||||
<div class="flex justify-center py-8"><Spinner className="size-6" /></div>
|
||||
|
||||
@@ -150,11 +150,11 @@
|
||||
saveHandler();
|
||||
}}
|
||||
>
|
||||
<div class=" space-y-3 overflow-y-scroll scrollbar-hidden h-full">
|
||||
<div class=" space-y-3 flex-1 min-h-0 overflow-y-auto scrollbar-hover pr-1.5 -mr-1.5">
|
||||
{#if webConfig}
|
||||
<div class="">
|
||||
<div class="mb-3">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('General')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('General')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
@@ -1137,7 +1137,7 @@
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<div class=" mt-0.5 mb-2.5 text-base font-normal">{$i18n.t('Loader')}</div>
|
||||
<div class=" mt-0.5 mb-2.5 text-xs text-gray-400 dark:text-gray-600">{$i18n.t('Loader')}</div>
|
||||
|
||||
<hr class=" border-gray-100/30 dark:border-gray-850/30 my-2" />
|
||||
|
||||
|
||||
@@ -1403,22 +1403,28 @@
|
||||
{/if}
|
||||
|
||||
{#if showStatusPanel}
|
||||
<div class="relative mx-2">
|
||||
<div
|
||||
class="mx-1 mb-1 rounded-2xl border border-gray-50 bg-white text-xs dark:border-gray-850 dark:bg-gray-900"
|
||||
>
|
||||
<div class="flex items-center justify-between px-3 py-1.5">
|
||||
<div class="flex items-center gap-1.5 text-xs text-gray-700 dark:text-gray-300">
|
||||
<span>Status</span>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="fixed inset-0 z-40 cursor-default bg-transparent"
|
||||
aria-label={$i18n.t('Close')}
|
||||
class="text-xs text-gray-400 transition-colors hover:text-gray-600 dark:hover:text-gray-300"
|
||||
on:click={() => {
|
||||
showStatusPanel = false;
|
||||
}}
|
||||
/>
|
||||
<div
|
||||
class="absolute bottom-full right-0 z-50 mb-1 w-80 max-w-[calc(100vw-1.5rem)] rounded-xl border border-gray-100 bg-white p-0.5 text-xs shadow-lg dark:border-gray-800 dark:bg-gray-850 dark:text-white"
|
||||
>
|
||||
<div class="max-h-[70dvh] overflow-y-auto px-1 py-0.5 text-xs">
|
||||
<section>
|
||||
<div class="rounded-xl px-1.5 py-1.5 text-gray-600 dark:text-gray-400">
|
||||
<div class="flex h-5 items-center gap-3">
|
||||
Close
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="space-y-0.5 px-3 pb-2">
|
||||
<div class="rounded-xl py-0.5 text-gray-600 dark:text-gray-400">
|
||||
<div class="flex min-h-4 items-center gap-3">
|
||||
<span class="min-w-0 flex-1 truncate">Context usage</span>
|
||||
<span
|
||||
class="shrink-0 font-mono text-[0.625rem] text-gray-400 dark:text-gray-600"
|
||||
@@ -1427,7 +1433,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="mt-2 h-px overflow-hidden rounded-full bg-gray-100 dark:bg-white/8"
|
||||
class="mt-1.5 h-0.5 overflow-hidden rounded-full bg-gray-100 dark:bg-white/8"
|
||||
>
|
||||
<div
|
||||
class="h-full rounded-full bg-gray-300 dark:bg-white/20"
|
||||
@@ -1437,9 +1443,7 @@
|
||||
</div>
|
||||
|
||||
{#if messageQueue.length}
|
||||
<div
|
||||
class="flex h-7 items-center gap-3 rounded-xl px-1.5 text-gray-600 dark:text-gray-400"
|
||||
>
|
||||
<div class="flex min-h-5 items-center gap-3 text-gray-600 dark:text-gray-400">
|
||||
<span class="min-w-0 flex-1 truncate">Queued messages</span>
|
||||
<span class="font-mono text-[0.625rem] text-gray-400 dark:text-gray-600">
|
||||
{messageQueue.length}
|
||||
@@ -1448,9 +1452,7 @@
|
||||
{/if}
|
||||
|
||||
{#if chatTasks.length}
|
||||
<div
|
||||
class="flex h-7 items-center gap-3 rounded-xl px-1.5 text-gray-600 dark:text-gray-400"
|
||||
>
|
||||
<div class="flex min-h-5 items-center gap-3 text-gray-600 dark:text-gray-400">
|
||||
<span class="min-w-0 flex-1 truncate">Tasks</span>
|
||||
<span class="font-mono text-[0.625rem] text-gray-400 dark:text-gray-600">
|
||||
{chatTasks.length}
|
||||
@@ -1458,14 +1460,12 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div
|
||||
class="flex h-7 items-center gap-3 rounded-xl px-1.5 text-gray-600 dark:text-gray-400"
|
||||
>
|
||||
<div class="flex min-h-5 items-center gap-3 text-gray-600 dark:text-gray-400">
|
||||
<span class="min-w-0 flex-1 truncate">Chat ID</span>
|
||||
{#if chatId}
|
||||
<button
|
||||
type="button"
|
||||
class="min-w-0 max-w-[11rem] truncate font-mono text-[0.625rem] text-gray-400 underline-offset-2 transition-colors duration-75 hover:text-gray-700 hover:underline dark:text-gray-600 dark:hover:text-gray-200"
|
||||
class="min-w-0 max-w-[18rem] truncate font-mono text-[0.625rem] text-gray-400 underline-offset-2 transition-colors duration-75 hover:text-gray-700 hover:underline dark:text-gray-600 dark:hover:text-gray-200"
|
||||
on:click={copyStatusChatId}
|
||||
>
|
||||
{copiedStatusChatId ? $i18n.t('Copied') : chatId}
|
||||
@@ -1476,8 +1476,6 @@
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
Reference in new issue
Block a user