ui: Constants refactor (#26908)

* refactor: Constants

* refactor: Constants/Enums cleanup

* refactor: Constant objects instead of multiple single value constants

* refactor: Cleanup constants
This commit is contained in:
Aleksander Grygier
2026-08-13 06:53:56 +02:00
committed by GitHub
parent 8e7f22b67e
commit e21152dc96
209 changed files with 1101 additions and 1137 deletions
@@ -1,6 +1,7 @@
import { getChatCommands, PROMPT_TRIGGER_PREFIX } from '$lib/constants';
import { PROMPT_TRIGGER_PREFIX } from '$lib/constants';
import { ChatFormCommandAction, KeyboardKey } from '$lib/enums';
import type { ChatFormCommand } from '$lib/types';
import { getChatCommands } from '$lib/utils';
import {
type CommandDismissSnapshot,
findCommandToken,
@@ -1,5 +1,5 @@
import { goto } from '$app/navigation';
import { ROUTES } from '$lib/constants/routes';
import { ROUTES } from '$lib/constants';
import { KeyboardKey } from '$lib/enums';
interface KeyboardShortcutsCallbacks {
+1 -2
View File
@@ -1,6 +1,5 @@
import { browser } from '$app/environment';
import { SW_CONFIG } from '$lib/constants/pwa';
import { BUILD_VERSION_LOCALSTORAGE_KEY } from '$lib/constants/storage';
import { BUILD_VERSION_LOCALSTORAGE_KEY, SW_CONFIG } from '$lib/constants';
import { versionStore } from '$lib/stores/version.svelte';
import { useRegisterSW } from 'virtual:pwa-register/svelte';
@@ -1,5 +1,4 @@
import { REASONING_EFFORT_LEVELS } from '$lib/constants/reasoning-effort';
import { REASONING_EFFORT_TOKENS } from '$lib/constants/reasoning-effort-tokens';
import { REASONING_EFFORT_LEVELS, REASONING_EFFORT_TOKENS } from '$lib/constants';
import { ReasoningEffort } from '$lib/enums';
import { chatStore } from '$lib/stores/chat.svelte';
import { activeMessages, conversationsStore } from '$lib/stores/conversations.svelte';
@@ -1,6 +1,6 @@
import { beforeNavigate } from '$app/navigation';
import { page } from '$app/state';
import { ROUTES } from '$lib/constants/routes';
import { ROUTES } from '$lib/constants';
import { settingsReferrer } from '$lib/stores/settings-referrer.svelte';
export interface ChatSettings {