From d475cb91748585fddbbf4b53ee79b1e7cd964d93 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 14 Jul 2026 03:10:12 -0400 Subject: [PATCH] refac --- .../components/chat/ChatPlaceholder.svelte | 4 +- .../components/chat/Controls/Controls.svelte | 20 +- .../components/chat/Controls/Valves.svelte | 4 +- src/lib/components/chat/MessageInput.svelte | 2 +- src/lib/components/chat/Navbar.svelte | 171 +++++++----------- src/lib/components/chat/Placeholder.svelte | 4 +- src/lib/components/common/Collapsible.svelte | 10 +- src/lib/components/layout/Navbar/Menu.svelte | 2 +- 8 files changed, 97 insertions(+), 120 deletions(-) diff --git a/src/lib/components/chat/ChatPlaceholder.svelte b/src/lib/components/chat/ChatPlaceholder.svelte index af38981cf2..c02ad0fc68 100644 --- a/src/lib/components/chat/ChatPlaceholder.svelte +++ b/src/lib/components/chat/ChatPlaceholder.svelte @@ -76,8 +76,8 @@ className="w-full flex justify-start mb-0.5" placement="top" > -
- {$i18n.t('Temporary Chat')} +
+ {$i18n.t('Temporary Chat')}
{/if} diff --git a/src/lib/components/chat/Controls/Controls.svelte b/src/lib/components/chat/Controls/Controls.svelte index b611e4e17a..aa7d355260 100644 --- a/src/lib/components/chat/Controls/Controls.svelte +++ b/src/lib/components/chat/Controls/Controls.svelte @@ -30,7 +30,7 @@ let showAdvancedParams = getOpen('advancedParams'); const compactSectionButtonClass = - 'w-full h-8 px-2.5 rounded-xl text-[13px] font-normal text-gray-600 hover:bg-gray-50/40 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-gray-800/40 dark:hover:text-gray-100 transition cursor-pointer select-none'; + 'w-full py-1 text-xs font-medium text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100 transition cursor-pointer select-none';
@@ -50,13 +50,15 @@ {/if} {#if $user?.role === 'admin' || ($user?.permissions.chat?.controls ?? true)} -
+
{#if chatFiles.length > 0}
{#each chatFiles as file, fileIdx} @@ -91,8 +93,10 @@ onChange={setOpen('valves')} title={$i18n.t('Valves')} buttonClassName={compactSectionButtonClass} + chevronClassName="size-2.5" + chevronStrokeWidth="2" > -
+
@@ -104,11 +108,13 @@ bind:open={showSystemPrompt} onChange={setOpen('systemPrompt')} buttonClassName={compactSectionButtonClass} + chevronClassName="size-2.5" + chevronStrokeWidth="2" > -
+