This commit is contained in:
Timothy Jaeryang Baek committed 2026-07-15 16:31:27 -04:00
1 parent 9cfafc0608
commit 667cba1a95
5 files changed
+35 -22

No files matched your search

@@ -9,7 +9,7 @@
import PinSlash from '$lib/components/icons/PinSlash.svelte';
import Link from '$lib/components/icons/Link.svelte';
import Pencil from '$lib/components/icons/Pencil.svelte';
import { config, settings, user } from '$lib/stores';
import { config, settings, showSettings, user } from '$lib/stores';
import GlobeAlt from '$lib/components/icons/GlobeAlt.svelte';
const i18n = getContext('i18n');
@@ -53,11 +53,11 @@
e.stopPropagation();
e.preventDefault();
goto(
model?.preset || model?.info?.base_model_id
? `/workspace/models/edit?id=${encodeURIComponent(model?.id ?? '')}`
: `/admin/settings/models?id=${encodeURIComponent(model?.id ?? '')}`
);
if (model?.preset || model?.info?.base_model_id) {
goto(`/workspace/models/edit?id=${encodeURIComponent(model?.id ?? '')}`);
} else {
showSettings.set({ tab: 'admin:models', state: { id: model?.id ?? null } });
}
show = false;
}}
>
@@ -306,10 +306,7 @@
</div>
<Textarea
bind:value={system}
className={'w-full text-sm outline-hidden resize-vertical' +
($settings.highContrastMode
? ' p-2.5 border-2 border-gray-300 dark:border-gray-700 rounded-lg bg-transparent text-gray-900 dark:text-gray-100 focus:ring-1 focus:ring-blue-500 focus:border-blue-500 overflow-y-hidden'
: ' dark:text-gray-300 ')}
className="w-full resize-vertical appearance-none bg-transparent text-sm outline-hidden focus:bg-transparent disabled:bg-transparent dark:text-gray-300"
rows="4"
placeholder={$i18n.t('Enter system prompt here')}
/>
+14 -4
View File
@@ -3,6 +3,7 @@
import type { Writable } from 'svelte/store';
import { toast } from 'svelte-sonner';
import { config, models, settings, user } from '$lib/stores';
import type { SettingsModalRequest } from '$lib/stores';
import { updateUserSettings } from '$lib/apis/users';
import { getBackendConfig, getModels as _getModels } from '$lib/apis';
@@ -51,13 +52,20 @@
const i18n: Writable<any> = getContext('i18n');
export let show: boolean | string = false;
export let show: boolean | string | SettingsModalRequest = false;
let modalShow = false;
let lastShow: boolean | string = false;
let lastShow: boolean | string | SettingsModalRequest = false;
let tabState: Record<string, unknown> | null = null;
$: if (show !== lastShow) {
lastShow = show;
if (typeof show === 'string') {
if (show && typeof show === 'object') {
selectedTab = show.tab;
tabState = show.state ?? null;
show = true;
lastShow = true;
modalShow = true;
} else if (typeof show === 'string') {
selectedTab = show;
show = true;
lastShow = true;
@@ -66,6 +74,7 @@
modalShow = show;
if (!show) {
selectedTab = 'general';
tabState = null;
}
}
}
@@ -74,6 +83,7 @@
show = false;
lastShow = false;
selectedTab = 'general';
tabState = null;
}
interface SettingsTab {
@@ -1130,7 +1140,7 @@
}}
/>
{:else if selectedTab === 'admin:models'}
<AdminModels />
<AdminModels bind:tabState />
{:else if selectedTab === 'admin:subagents'}
<AdminSubagents />
{:else if selectedTab === 'admin:evaluations'}