This commit is contained in:
Timothy Jaeryang Baek
2025-02-12 01:22:53 -08:00
parent 431e97b03a
commit 0bec9122c1
17 changed files with 211 additions and 47 deletions
@@ -2,7 +2,7 @@
import { v4 as uuidv4 } from 'uuid';
import { toast } from 'svelte-sonner';
import { models, settings } from '$lib/stores';
import { config, models, settings } from '$lib/stores';
import { getContext, onMount, tick } from 'svelte';
import type { Writable } from 'svelte/store';
import type { i18n as i18nType } from 'i18next';
@@ -63,7 +63,12 @@
if (res) {
toast.success($i18n.t('Valves updated successfully'));
setPipelines();
models.set(await getModels(localStorage.token, $settings?.directConnections ?? null));
models.set(
await getModels(
localStorage.token,
$config?.features?.enable_direct_connetions && ($settings?.directConnections ?? null)
)
);
saveHandler();
}
} else {
@@ -125,7 +130,12 @@
if (res) {
toast.success($i18n.t('Pipeline downloaded successfully'));
setPipelines();
models.set(await getModels(localStorage.token, $settings?.directConnections ?? null));
models.set(
await getModels(
localStorage.token,
$config?.features?.enable_direct_connetions && ($settings?.directConnections ?? null)
)
);
}
downloading = false;
@@ -150,7 +160,12 @@
if (res) {
toast.success($i18n.t('Pipeline downloaded successfully'));
setPipelines();
models.set(await getModels(localStorage.token, $settings?.directConnections ?? null));
models.set(
await getModels(
localStorage.token,
$config?.features?.enable_direct_connetions && ($settings?.directConnections ?? null)
)
);
}
} else {
toast.error($i18n.t('No file selected'));
@@ -179,7 +194,12 @@
if (res) {
toast.success($i18n.t('Pipeline deleted successfully'));
setPipelines();
models.set(await getModels(localStorage.token, $settings?.directConnections ?? null));
models.set(
await getModels(
localStorage.token,
$config?.features?.enable_direct_connetions && ($settings?.directConnections ?? null)
)
);
}
};