ui: Linting & Formatting scripts (#26819)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { ICON_CLASS_DEFAULT } from '$lib/constants/css-classes';
|
||||
import { RotateCcw, FlaskConical } from '@lucide/svelte';
|
||||
import { FlaskConical, RotateCcw } from '@lucide/svelte';
|
||||
import { SettingsChatParameterSourceIndicator } from '$lib/components/app/settings';
|
||||
import { Checkbox } from '$lib/components/ui/checkbox';
|
||||
import { Input } from '$lib/components/ui/input';
|
||||
import Label from '$lib/components/ui/label/label.svelte';
|
||||
@@ -8,12 +8,12 @@
|
||||
import * as Select from '$lib/components/ui/select';
|
||||
import { Textarea } from '$lib/components/ui/textarea';
|
||||
import { SETTING_CONFIG_INFO, SETTINGS_KEYS } from '$lib/constants';
|
||||
import { ICON_CLASS_DEFAULT } from '$lib/constants/css-classes';
|
||||
import { SettingsFieldType } from '$lib/enums/settings.enums';
|
||||
import { settingsStore } from '$lib/stores/settings.svelte';
|
||||
import { modelsStore, propsCacheVersion, selectedModelName } from '$lib/stores/models.svelte';
|
||||
import { serverStore } from '$lib/stores/server.svelte';
|
||||
import { modelsStore, selectedModelName, propsCacheVersion } from '$lib/stores/models.svelte';
|
||||
import { settingsStore } from '$lib/stores/settings.svelte';
|
||||
import { normalizeFloatingPoint } from '$lib/utils/precision';
|
||||
import { SettingsChatParameterSourceIndicator } from '$lib/components/app/settings';
|
||||
import type { Component } from 'svelte';
|
||||
|
||||
interface Props {
|
||||
@@ -40,6 +40,7 @@
|
||||
>;
|
||||
}
|
||||
}
|
||||
|
||||
return (serverStore.defaultParams ?? {}) as Record<string, unknown>;
|
||||
});
|
||||
</script>
|
||||
@@ -52,6 +53,7 @@
|
||||
{@const serverDefault = currentModelParams[field.key]}
|
||||
{@const isCustomRealTime = (() => {
|
||||
if (serverDefault == null) return false;
|
||||
|
||||
if (currentValue === '') return false;
|
||||
|
||||
const numericInput = parseFloat(currentValue);
|
||||
@@ -165,7 +167,9 @@
|
||||
{@const serverDefault = currentModelParams[field.key]}
|
||||
{@const isCustomRealTime = (() => {
|
||||
if (serverDefault == null) return false;
|
||||
|
||||
if (currentValue === '' || currentValue === undefined) return false;
|
||||
|
||||
return currentValue !== serverDefault;
|
||||
})()}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user