chore: format

This commit is contained in:
Timothy Jaeryang Baek committed 2026-03-02 17:07:53 -06:00
1 parent 3de14a53c2
commit 10baa6e781
7 files changed
+48 -33

No files matched your search

-2
View File
@@ -146,8 +146,6 @@
let webSearchEnabled = false; let webSearchEnabled = false;
let codeInterpreterEnabled = false; let codeInterpreterEnabled = false;
let showCommands = false; let showCommands = false;
let generating = false; let generating = false;
+15 -7
View File
@@ -60,7 +60,9 @@
// Tab state for Controls+Files panel // Tab state for Controls+Files panel
let activeTab = savedTab; let activeTab = savedTab;
// svelte-ignore reactive_declaration_module_script_dependency // svelte-ignore reactive_declaration_module_script_dependency
$: { savedTab = activeTab }; $: {
savedTab = activeTab;
}
$: hasMessages = history?.messages && Object.keys(history.messages).length > 0; $: hasMessages = history?.messages && Object.keys(history.messages).length > 0;
@@ -285,7 +287,8 @@
<div class="flex gap-1 min-w-0 overflow-x-auto scrollbar-hidden"> <div class="flex gap-1 min-w-0 overflow-x-auto scrollbar-hidden">
{#if showControlsTab} {#if showControlsTab}
<button <button
class="px-2.5 py-1 text-sm rounded-lg transition whitespace-nowrap {activeTab === 'controls' class="px-2.5 py-1 text-sm rounded-lg transition whitespace-nowrap {activeTab ===
'controls'
? 'bg-gray-100 dark:bg-gray-800 font-medium text-gray-900 dark:text-white' ? 'bg-gray-100 dark:bg-gray-800 font-medium text-gray-900 dark:text-white'
: 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300'}" : 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300'}"
on:click={() => (activeTab = 'controls')} on:click={() => (activeTab = 'controls')}
@@ -295,7 +298,8 @@
{/if} {/if}
{#if showFilesTab} {#if showFilesTab}
<button <button
class="px-2.5 py-1 text-sm rounded-lg transition whitespace-nowrap {activeTab === 'files' class="px-2.5 py-1 text-sm rounded-lg transition whitespace-nowrap {activeTab ===
'files'
? 'bg-gray-100 dark:bg-gray-800 font-medium text-gray-900 dark:text-white' ? 'bg-gray-100 dark:bg-gray-800 font-medium text-gray-900 dark:text-white'
: 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300'}" : 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300'}"
on:click={() => (activeTab = 'files')} on:click={() => (activeTab = 'files')}
@@ -305,7 +309,8 @@
{/if} {/if}
{#if showOverviewTab} {#if showOverviewTab}
<button <button
class="px-2.5 py-1 text-sm rounded-lg transition whitespace-nowrap {activeTab === 'overview' class="px-2.5 py-1 text-sm rounded-lg transition whitespace-nowrap {activeTab ===
'overview'
? 'bg-gray-100 dark:bg-gray-800 font-medium text-gray-900 dark:text-white' ? 'bg-gray-100 dark:bg-gray-800 font-medium text-gray-900 dark:text-white'
: 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300'}" : 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300'}"
on:click={() => (activeTab = 'overview')} on:click={() => (activeTab = 'overview')}
@@ -423,7 +428,8 @@
<div class="flex gap-1 min-w-0 overflow-x-auto scrollbar-hidden"> <div class="flex gap-1 min-w-0 overflow-x-auto scrollbar-hidden">
{#if showControlsTab} {#if showControlsTab}
<button <button
class="px-2.5 py-1 text-sm rounded-lg transition whitespace-nowrap {activeTab === 'controls' class="px-2.5 py-1 text-sm rounded-lg transition whitespace-nowrap {activeTab ===
'controls'
? 'bg-gray-100 dark:bg-gray-800 font-medium text-gray-900 dark:text-white' ? 'bg-gray-100 dark:bg-gray-800 font-medium text-gray-900 dark:text-white'
: 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300'}" : 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300'}"
on:click={() => (activeTab = 'controls')} on:click={() => (activeTab = 'controls')}
@@ -433,7 +439,8 @@
{/if} {/if}
{#if showFilesTab} {#if showFilesTab}
<button <button
class="px-2.5 py-1 text-sm rounded-lg transition whitespace-nowrap {activeTab === 'files' class="px-2.5 py-1 text-sm rounded-lg transition whitespace-nowrap {activeTab ===
'files'
? 'bg-gray-100 dark:bg-gray-800 font-medium text-gray-900 dark:text-white' ? 'bg-gray-100 dark:bg-gray-800 font-medium text-gray-900 dark:text-white'
: 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300'}" : 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300'}"
on:click={() => (activeTab = 'files')} on:click={() => (activeTab = 'files')}
@@ -443,7 +450,8 @@
{/if} {/if}
{#if showOverviewTab} {#if showOverviewTab}
<button <button
class="px-2.5 py-1 text-sm rounded-lg transition whitespace-nowrap {activeTab === 'overview' class="px-2.5 py-1 text-sm rounded-lg transition whitespace-nowrap {activeTab ===
'overview'
? 'bg-gray-100 dark:bg-gray-800 font-medium text-gray-900 dark:text-white' ? 'bg-gray-100 dark:bg-gray-800 font-medium text-gray-900 dark:text-white'
: 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300'}" : 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300'}"
on:click={() => (activeTab = 'overview')} on:click={() => (activeTab = 'overview')}
+21 -4
View File
@@ -816,8 +816,17 @@
class="w-full flex items-center gap-2 px-3 py-1.5 text-xs text-gray-500 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-800/50 transition" class="w-full flex items-center gap-2 px-3 py-1.5 text-xs text-gray-500 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-800/50 transition"
on:click={toggleTerminal} on:click={toggleTerminal}
> >
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="size-3.5"> <svg
<path fill-rule="evenodd" d="M3.25 3A2.25 2.25 0 0 0 1 5.25v9.5A2.25 2.25 0 0 0 3.25 17h13.5A2.25 2.25 0 0 0 19 14.75v-9.5A2.25 2.25 0 0 0 16.75 3H3.25Zm.943 8.752a.75.75 0 0 1 .055-1.06L6.128 9l-1.88-1.693a.75.75 0 1 1 1.004-1.114l2.5 2.25a.75.75 0 0 1 0 1.114l-2.5 2.25a.75.75 0 0 1-1.06-.055ZM9.75 10.25a.75.75 0 0 0 0 1.5h2.5a.75.75 0 0 0 0-1.5h-2.5Z" clip-rule="evenodd" /> xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
class="size-3.5"
>
<path
fill-rule="evenodd"
d="M3.25 3A2.25 2.25 0 0 0 1 5.25v9.5A2.25 2.25 0 0 0 3.25 17h13.5A2.25 2.25 0 0 0 19 14.75v-9.5A2.25 2.25 0 0 0 16.75 3H3.25Zm.943 8.752a.75.75 0 0 1 .055-1.06L6.128 9l-1.88-1.693a.75.75 0 1 1 1.004-1.114l2.5 2.25a.75.75 0 0 1 0 1.114l-2.5 2.25a.75.75 0 0 1-1.06-.055ZM9.75 10.25a.75.75 0 0 0 0 1.5h2.5a.75.75 0 0 0 0-1.5h-2.5Z"
clip-rule="evenodd"
/>
</svg> </svg>
<span class="font-medium">{$i18n.t('Terminal')}</span> <span class="font-medium">{$i18n.t('Terminal')}</span>
@@ -837,13 +846,21 @@
fill="currentColor" fill="currentColor"
class="size-3 ml-auto transition-transform {terminalExpanded ? 'rotate-180' : ''}" class="size-3 ml-auto transition-transform {terminalExpanded ? 'rotate-180' : ''}"
> >
<path fill-rule="evenodd" d="M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z" clip-rule="evenodd" /> <path
fill-rule="evenodd"
d="M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z"
clip-rule="evenodd"
/>
</svg> </svg>
</button> </button>
{#if terminalExpanded} {#if terminalExpanded}
<div style="height: {terminalHeight}px" class="min-h-0"> <div style="height: {terminalHeight}px" class="min-h-0">
<XTerminal {overlay} bind:connected={terminalConnected} bind:connecting={terminalConnecting} /> <XTerminal
{overlay}
bind:connected={terminalConnected}
bind:connecting={terminalConnecting}
/>
</div> </div>
{/if} {/if}
</div> </div>
@@ -26,7 +26,9 @@
<li class="group"> <li class="group">
<div <div
class="w-full flex items-center hover:bg-gray-50 dark:hover:bg-gray-800 transition class="w-full flex items-center hover:bg-gray-50 dark:hover:bg-gray-800 transition
{dragOverFolder ? 'bg-blue-50 dark:bg-blue-900/30 ring-1 ring-blue-400 dark:ring-blue-500 ring-inset' : ''}" {dragOverFolder
? 'bg-blue-50 dark:bg-blue-900/30 ring-1 ring-blue-400 dark:ring-blue-500 ring-inset'
: ''}"
role={entry.type === 'directory' ? 'button' : undefined} role={entry.type === 'directory' ? 'button' : undefined}
on:dragover={(e) => { on:dragover={(e) => {
if (entry.type !== 'directory') return; if (entry.type !== 'directory') return;
@@ -45,7 +45,9 @@
{!selectedFile && i === breadcrumbs.length - 1 {!selectedFile && i === breadcrumbs.length - 1
? 'text-gray-700 dark:text-gray-300' ? 'text-gray-700 dark:text-gray-300'
: 'text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-400'} : 'text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-400'}
{dragOverCrumb === i ? 'bg-blue-50 dark:bg-blue-900/30 ring-1 ring-blue-400 dark:ring-blue-500' : ''}" {dragOverCrumb === i
? 'bg-blue-50 dark:bg-blue-900/30 ring-1 ring-blue-400 dark:ring-blue-500'
: ''}"
on:click={() => onNavigate(crumb.path)} on:click={() => onNavigate(crumb.path)}
on:dragover={(e) => { on:dragover={(e) => {
if (!e.dataTransfer?.types.includes('application/x-terminal-file-move')) return; if (!e.dataTransfer?.types.includes('application/x-terminal-file-move')) return;
@@ -96,9 +96,7 @@
} }
} }
selectedToolIds = selectedToolIds.filter( selectedToolIds = selectedToolIds.filter((id) => Object.keys(tools).includes(id));
(id) => Object.keys(tools).includes(id)
);
}; };
</script> </script>
+5 -15
View File
@@ -5,12 +5,7 @@
import { WebLinksAddon } from '@xterm/addon-web-links'; import { WebLinksAddon } from '@xterm/addon-web-links';
import '@xterm/xterm/css/xterm.css'; import '@xterm/xterm/css/xterm.css';
import { import { terminalServers, settings, selectedTerminalId, user } from '$lib/stores';
terminalServers,
settings,
selectedTerminalId,
user
} from '$lib/stores';
import { WEBUI_API_BASE_URL } from '$lib/constants'; import { WEBUI_API_BASE_URL } from '$lib/constants';
import Tooltip from '$lib/components/common/Tooltip.svelte'; import Tooltip from '$lib/components/common/Tooltip.svelte';
@@ -66,9 +61,7 @@
// Direct connection to open-terminal // Direct connection to open-terminal
const base = info.baseUrl.replace(/\/$/, ''); const base = info.baseUrl.replace(/\/$/, '');
const directTerminals = ($settings?.terminalServers ?? []).filter((s: any) => s.url); const directTerminals = ($settings?.terminalServers ?? []).filter((s: any) => s.url);
const directMatch = directTerminals.find( const directMatch = directTerminals.find((s: any) => s.url === $selectedTerminalId);
(s: any) => s.url === $selectedTerminalId
);
const apiKey = directMatch?.key ?? ''; const apiKey = directMatch?.key ?? '';
authToken = apiKey; authToken = apiKey;
@@ -162,7 +155,8 @@
term = new Terminal({ term = new Terminal({
cursorBlink: true, cursorBlink: true,
fontSize: 13, fontSize: 13,
fontFamily: "'JetBrains Mono', 'Fira Code', 'Cascadia Code', Menlo, Monaco, 'Courier New', monospace", fontFamily:
"'JetBrains Mono', 'Fira Code', 'Cascadia Code', Menlo, Monaco, 'Courier New', monospace",
theme: { theme: {
background: '#1a1b26', background: '#1a1b26',
foreground: '#c0caf5', foreground: '#c0caf5',
@@ -263,9 +257,5 @@
</script> </script>
<div class="h-full min-h-0 relative"> <div class="h-full min-h-0 relative">
<div <div bind:this={terminalEl} class="absolute inset-0 p-1" class:pointer-events-none={overlay} />
bind:this={terminalEl}
class="absolute inset-0 p-1"
class:pointer-events-none={overlay}
/>
</div> </div>