diff options
Diffstat (limited to 'llama.cpp/tools/server/webui/src/lib/constants')
17 files changed, 470 insertions, 0 deletions
diff --git a/llama.cpp/tools/server/webui/src/lib/constants/auto-scroll.ts b/llama.cpp/tools/server/webui/src/lib/constants/auto-scroll.ts new file mode 100644 index 0000000..098f435 --- /dev/null +++ b/llama.cpp/tools/server/webui/src/lib/constants/auto-scroll.ts @@ -0,0 +1,3 @@ +export const AUTO_SCROLL_INTERVAL = 100; +export const INITIAL_SCROLL_DELAY = 50; +export const AUTO_SCROLL_AT_BOTTOM_THRESHOLD = 10; diff --git a/llama.cpp/tools/server/webui/src/lib/constants/binary-detection.ts b/llama.cpp/tools/server/webui/src/lib/constants/binary-detection.ts new file mode 100644 index 0000000..a4440fd --- /dev/null +++ b/llama.cpp/tools/server/webui/src/lib/constants/binary-detection.ts @@ -0,0 +1,14 @@ +export interface BinaryDetectionOptions { + /** Number of characters to check from the beginning of the file */ + prefixLength: number; + /** Maximum ratio of suspicious characters allowed (0.0 to 1.0) */ + suspiciousCharThresholdRatio: number; + /** Maximum absolute number of null bytes allowed */ + maxAbsoluteNullBytes: number; +} + +export const DEFAULT_BINARY_DETECTION_OPTIONS: BinaryDetectionOptions = { + prefixLength: 1024 * 10, // Check the first 10KB of the string + suspiciousCharThresholdRatio: 0.15, // Allow up to 15% suspicious chars + maxAbsoluteNullBytes: 2 +}; diff --git a/llama.cpp/tools/server/webui/src/lib/constants/default-context.ts b/llama.cpp/tools/server/webui/src/lib/constants/default-context.ts new file mode 100644 index 0000000..78f3111 --- /dev/null +++ b/llama.cpp/tools/server/webui/src/lib/constants/default-context.ts @@ -0,0 +1 @@ +export const DEFAULT_CONTEXT = 4096; diff --git a/llama.cpp/tools/server/webui/src/lib/constants/floating-ui-constraints.ts b/llama.cpp/tools/server/webui/src/lib/constants/floating-ui-constraints.ts new file mode 100644 index 0000000..003fc77 --- /dev/null +++ b/llama.cpp/tools/server/webui/src/lib/constants/floating-ui-constraints.ts @@ -0,0 +1,2 @@ +export const VIEWPORT_GUTTER = 8; +export const MENU_OFFSET = 6; diff --git a/llama.cpp/tools/server/webui/src/lib/constants/icons.ts b/llama.cpp/tools/server/webui/src/lib/constants/icons.ts new file mode 100644 index 0000000..1e88ab5 --- /dev/null +++ b/llama.cpp/tools/server/webui/src/lib/constants/icons.ts @@ -0,0 +1,32 @@ +/** + * Icon mappings for file types and model modalities + * Centralized configuration to ensure consistent icon usage across the app + */ + +import { + File as FileIcon, + FileText as FileTextIcon, + Image as ImageIcon, + Eye as VisionIcon, + Mic as AudioIcon +} from '@lucide/svelte'; +import { FileTypeCategory, ModelModality } from '$lib/enums'; + +export const FILE_TYPE_ICONS = { + [FileTypeCategory.IMAGE]: ImageIcon, + [FileTypeCategory.AUDIO]: AudioIcon, + [FileTypeCategory.TEXT]: FileTextIcon, + [FileTypeCategory.PDF]: FileIcon +} as const; + +export const DEFAULT_FILE_ICON = FileIcon; + +export const MODALITY_ICONS = { + [ModelModality.VISION]: VisionIcon, + [ModelModality.AUDIO]: AudioIcon +} as const; + +export const MODALITY_LABELS = { + [ModelModality.VISION]: 'Vision', + [ModelModality.AUDIO]: 'Audio' +} as const; diff --git a/llama.cpp/tools/server/webui/src/lib/constants/input-classes.ts b/llama.cpp/tools/server/webui/src/lib/constants/input-classes.ts new file mode 100644 index 0000000..a541cfc --- /dev/null +++ b/llama.cpp/tools/server/webui/src/lib/constants/input-classes.ts @@ -0,0 +1,6 @@ +export const INPUT_CLASSES = ` + bg-muted/70 dark:bg-muted/85 + border border-border/30 focus-within:border-border dark:border-border/20 dark:focus-within:border-border + outline-none + text-foreground +`; diff --git a/llama.cpp/tools/server/webui/src/lib/constants/latex-protection.ts b/llama.cpp/tools/server/webui/src/lib/constants/latex-protection.ts new file mode 100644 index 0000000..27c88e7 --- /dev/null +++ b/llama.cpp/tools/server/webui/src/lib/constants/latex-protection.ts @@ -0,0 +1,35 @@ +/** + * Matches common Markdown code blocks to exclude them from further processing (e.g. LaTeX). + * - Fenced: ```...``` + * - Inline: `...` (does NOT support nested backticks or multi-backtick syntax) + * + * Note: This pattern does not handle advanced cases like: + * `` `code with `backticks` `` or \\``...\\`` + */ +export const CODE_BLOCK_REGEXP = /(```[\s\S]*?```|`[^`\n]+`)/g; + +/** + * Matches LaTeX math delimiters \(...\) and \[...\] only when not preceded by a backslash (i.e., not escaped), + * while also capturing code blocks (```, `...`) so they can be skipped during processing. + * + * Uses negative lookbehind `(?<!\\)` to avoid matching \\( or \\[. + * Using the lookâbehind pattern `(?<!\\)` we skip matches + * that are preceded by a backslash, e.g. + * `Definitions\\(also called macros)` (title of chapter 20 in The TeXbook) + * or `\\[4pt]` (LaTeX line-break). + * + * group 1: code-block + * group 2: square-bracket + * group 3: round-bracket + */ +export const LATEX_MATH_AND_CODE_PATTERN = + /(```[\S\s]*?```|`.*?`)|(?<!\\)\\\[([\S\s]*?[^\\])\\]|(?<!\\)\\\((.*?)\\\)/g; + +/** Regex to capture the content of a $$...\\\\...$$ block (display-formula with line-break) */ +export const LATEX_LINEBREAK_REGEXP = /\$\$([\s\S]*?\\\\[\s\S]*?)\$\$/; + +/** map from mchem-regexp to replacement */ +export const MHCHEM_PATTERN_MAP: readonly [RegExp, string][] = [ + [/(\s)\$\\ce{/g, '$1$\\\\ce{'], + [/(\s)\$\\pu{/g, '$1$\\\\pu{'] +] as const; diff --git a/llama.cpp/tools/server/webui/src/lib/constants/literal-html.ts b/llama.cpp/tools/server/webui/src/lib/constants/literal-html.ts new file mode 100644 index 0000000..ed1b0cf --- /dev/null +++ b/llama.cpp/tools/server/webui/src/lib/constants/literal-html.ts @@ -0,0 +1,15 @@ +export const LINE_BREAK = /\r?\n/; + +export const PHRASE_PARENTS = new Set([ + 'paragraph', + 'heading', + 'emphasis', + 'strong', + 'delete', + 'link', + 'linkReference', + 'tableCell' +]); + +export const NBSP = '\u00a0'; +export const TAB_AS_SPACES = NBSP.repeat(4); diff --git a/llama.cpp/tools/server/webui/src/lib/constants/localstorage-keys.ts b/llama.cpp/tools/server/webui/src/lib/constants/localstorage-keys.ts new file mode 100644 index 0000000..919b6ea --- /dev/null +++ b/llama.cpp/tools/server/webui/src/lib/constants/localstorage-keys.ts @@ -0,0 +1,2 @@ +export const CONFIG_LOCALSTORAGE_KEY = 'LlamaCppWebui.config'; +export const USER_OVERRIDES_LOCALSTORAGE_KEY = 'LlamaCppWebui.userOverrides'; diff --git a/llama.cpp/tools/server/webui/src/lib/constants/max-bundle-size.ts b/llama.cpp/tools/server/webui/src/lib/constants/max-bundle-size.ts new file mode 100644 index 0000000..e04348f --- /dev/null +++ b/llama.cpp/tools/server/webui/src/lib/constants/max-bundle-size.ts @@ -0,0 +1 @@ +export const MAX_BUNDLE_SIZE = 2 * 1024 * 1024; diff --git a/llama.cpp/tools/server/webui/src/lib/constants/precision.ts b/llama.cpp/tools/server/webui/src/lib/constants/precision.ts new file mode 100644 index 0000000..8df5c4f --- /dev/null +++ b/llama.cpp/tools/server/webui/src/lib/constants/precision.ts @@ -0,0 +1,2 @@ +export const PRECISION_MULTIPLIER = 1000000; +export const PRECISION_DECIMAL_PLACES = 6; diff --git a/llama.cpp/tools/server/webui/src/lib/constants/processing-info.ts b/llama.cpp/tools/server/webui/src/lib/constants/processing-info.ts new file mode 100644 index 0000000..7264392 --- /dev/null +++ b/llama.cpp/tools/server/webui/src/lib/constants/processing-info.ts @@ -0,0 +1 @@ +export const PROCESSING_INFO_TIMEOUT = 2000; diff --git a/llama.cpp/tools/server/webui/src/lib/constants/settings-config.ts b/llama.cpp/tools/server/webui/src/lib/constants/settings-config.ts new file mode 100644 index 0000000..cac48a5 --- /dev/null +++ b/llama.cpp/tools/server/webui/src/lib/constants/settings-config.ts @@ -0,0 +1,117 @@ +export const SETTING_CONFIG_DEFAULT: Record<string, string | number | boolean> = { + // Note: in order not to introduce breaking changes, please keep the same data type (number, string, etc) if you want to change the default value. Do not use null or undefined for default value. + // Do not use nested objects, keep it single level. Prefix the key if you need to group them. + apiKey: '', + systemMessage: '', + showSystemMessage: true, + theme: 'system', + showThoughtInProgress: false, + showToolCalls: false, + disableReasoningFormat: false, + keepStatsVisible: false, + showMessageStats: true, + askForTitleConfirmation: false, + pasteLongTextToFileLen: 2500, + copyTextAttachmentsAsPlainText: false, + pdfAsImage: false, + disableAutoScroll: false, + renderUserContentAsMarkdown: false, + alwaysShowSidebarOnDesktop: false, + autoShowSidebarOnNewChat: true, + autoMicOnEmpty: false, + // make sure these default values are in sync with `common.h` + samplers: 'top_k;typ_p;top_p;min_p;temperature', + backend_sampling: false, + temperature: 0.8, + dynatemp_range: 0.0, + dynatemp_exponent: 1.0, + top_k: 40, + top_p: 0.95, + min_p: 0.05, + xtc_probability: 0.0, + xtc_threshold: 0.1, + typ_p: 1.0, + repeat_last_n: 64, + repeat_penalty: 1.0, + presence_penalty: 0.0, + frequency_penalty: 0.0, + dry_multiplier: 0.0, + dry_base: 1.75, + dry_allowed_length: 2, + dry_penalty_last_n: -1, + max_tokens: -1, + custom: '', // custom json-stringified object + // experimental features + pyInterpreterEnabled: false, + enableContinueGeneration: false +}; + +export const SETTING_CONFIG_INFO: Record<string, string> = { + apiKey: 'Set the API Key if you are using <code>--api-key</code> option for the server.', + systemMessage: 'The starting message that defines how model should behave.', + showSystemMessage: 'Display the system message at the top of each conversation.', + theme: + 'Choose the color theme for the interface. You can choose between System (follows your device settings), Light, or Dark.', + pasteLongTextToFileLen: + 'On pasting long text, it will be converted to a file. You can control the file length by setting the value of this parameter. Value 0 means disable.', + copyTextAttachmentsAsPlainText: + 'When copying a message with text attachments, combine them into a single plain text string instead of a special format that can be pasted back as attachments.', + samplers: + 'The order at which samplers are applied, in simplified way. Default is "top_k;typ_p;top_p;min_p;temperature": top_k->typ_p->top_p->min_p->temperature', + backend_sampling: + 'Enable backend-based samplers. When enabled, supported samplers run on the accelerator backend for faster sampling.', + temperature: + 'Controls the randomness of the generated text by affecting the probability distribution of the output tokens. Higher = more random, lower = more focused.', + dynatemp_range: + 'Addon for the temperature sampler. The added value to the range of dynamic temperature, which adjusts probabilities by entropy of tokens.', + dynatemp_exponent: + 'Addon for the temperature sampler. Smoothes out the probability redistribution based on the most probable token.', + top_k: 'Keeps only k top tokens.', + top_p: 'Limits tokens to those that together have a cumulative probability of at least p', + min_p: + 'Limits tokens based on the minimum probability for a token to be considered, relative to the probability of the most likely token.', + xtc_probability: + 'XTC sampler cuts out top tokens; this parameter controls the chance of cutting tokens at all. 0 disables XTC.', + xtc_threshold: + 'XTC sampler cuts out top tokens; this parameter controls the token probability that is required to cut that token.', + typ_p: 'Sorts and limits tokens based on the difference between log-probability and entropy.', + repeat_last_n: 'Last n tokens to consider for penalizing repetition', + repeat_penalty: 'Controls the repetition of token sequences in the generated text', + presence_penalty: 'Limits tokens based on whether they appear in the output or not.', + frequency_penalty: 'Limits tokens based on how often they appear in the output.', + dry_multiplier: + 'DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the DRY sampling multiplier.', + dry_base: + 'DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the DRY sampling base value.', + dry_allowed_length: + 'DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the allowed length for DRY sampling.', + dry_penalty_last_n: + 'DRY sampling reduces repetition in generated text even across long contexts. This parameter sets DRY penalty for the last n tokens.', + max_tokens: 'The maximum number of token per output. Use -1 for infinite (no limit).', + custom: 'Custom JSON parameters to send to the API. Must be valid JSON format.', + showThoughtInProgress: 'Expand thought process by default when generating messages.', + showToolCalls: + 'Display tool call labels and payloads from Harmony-compatible delta.tool_calls data below assistant messages.', + disableReasoningFormat: + 'Show raw LLM output without backend parsing and frontend Markdown rendering to inspect streaming across different models.', + keepStatsVisible: 'Keep processing statistics visible after generation finishes.', + showMessageStats: + 'Display generation statistics (tokens/second, token count, duration) below each assistant message.', + askForTitleConfirmation: + 'Ask for confirmation before automatically changing conversation title when editing the first message.', + pdfAsImage: + 'Parse PDF as image instead of text. Automatically falls back to text processing for non-vision models.', + disableAutoScroll: + 'Disable automatic scrolling while messages stream so you can control the viewport position manually.', + renderUserContentAsMarkdown: 'Render user messages using markdown formatting in the chat.', + alwaysShowSidebarOnDesktop: + 'Always keep the sidebar visible on desktop instead of auto-hiding it.', + autoShowSidebarOnNewChat: + 'Automatically show sidebar when starting a new chat. Disable to keep the sidebar hidden until you click on it.', + autoMicOnEmpty: + 'Automatically show microphone button instead of send button when textarea is empty for models with audio modality support.', + pyInterpreterEnabled: + 'Enable Python interpreter using Pyodide. Allows running Python code in markdown code blocks.', + enableContinueGeneration: + 'Enable "Continue" button for assistant messages. Currently works only with non-reasoning models.' +}; diff --git a/llama.cpp/tools/server/webui/src/lib/constants/supported-file-types.ts b/llama.cpp/tools/server/webui/src/lib/constants/supported-file-types.ts new file mode 100644 index 0000000..0d955ad --- /dev/null +++ b/llama.cpp/tools/server/webui/src/lib/constants/supported-file-types.ts @@ -0,0 +1,217 @@ +/** + * Comprehensive dictionary of all supported file types in webui + * Organized by category with TypeScript enums for better type safety + */ + +import { + FileExtensionAudio, + FileExtensionImage, + FileExtensionPdf, + FileExtensionText, + FileTypeAudio, + FileTypeImage, + FileTypePdf, + FileTypeText, + MimeTypeAudio, + MimeTypeImage, + MimeTypeApplication, + MimeTypeText +} from '$lib/enums'; + +// File type configuration using enums +export const AUDIO_FILE_TYPES = { + [FileTypeAudio.MP3]: { + extensions: [FileExtensionAudio.MP3], + mimeTypes: [MimeTypeAudio.MP3_MPEG, MimeTypeAudio.MP3] + }, + [FileTypeAudio.WAV]: { + extensions: [FileExtensionAudio.WAV], + mimeTypes: [MimeTypeAudio.WAV] + } +} as const; + +export const IMAGE_FILE_TYPES = { + [FileTypeImage.JPEG]: { + extensions: [FileExtensionImage.JPG, FileExtensionImage.JPEG], + mimeTypes: [MimeTypeImage.JPEG] + }, + [FileTypeImage.PNG]: { + extensions: [FileExtensionImage.PNG], + mimeTypes: [MimeTypeImage.PNG] + }, + [FileTypeImage.GIF]: { + extensions: [FileExtensionImage.GIF], + mimeTypes: [MimeTypeImage.GIF] + }, + [FileTypeImage.WEBP]: { + extensions: [FileExtensionImage.WEBP], + mimeTypes: [MimeTypeImage.WEBP] + }, + [FileTypeImage.SVG]: { + extensions: [FileExtensionImage.SVG], + mimeTypes: [MimeTypeImage.SVG] + } +} as const; + +export const PDF_FILE_TYPES = { + [FileTypePdf.PDF]: { + extensions: [FileExtensionPdf.PDF], + mimeTypes: [MimeTypeApplication.PDF] + } +} as const; + +export const TEXT_FILE_TYPES = { + [FileTypeText.PLAIN_TEXT]: { + extensions: [FileExtensionText.TXT], + mimeTypes: [MimeTypeText.PLAIN] + }, + [FileTypeText.MARKDOWN]: { + extensions: [FileExtensionText.MD], + mimeTypes: [MimeTypeText.MARKDOWN] + }, + [FileTypeText.ASCIIDOC]: { + extensions: [FileExtensionText.ADOC], + mimeTypes: [MimeTypeText.ASCIIDOC] + }, + [FileTypeText.JAVASCRIPT]: { + extensions: [FileExtensionText.JS], + mimeTypes: [MimeTypeText.JAVASCRIPT, MimeTypeText.JAVASCRIPT_APP] + }, + [FileTypeText.TYPESCRIPT]: { + extensions: [FileExtensionText.TS], + mimeTypes: [MimeTypeText.TYPESCRIPT] + }, + [FileTypeText.JSX]: { + extensions: [FileExtensionText.JSX], + mimeTypes: [MimeTypeText.JSX] + }, + [FileTypeText.TSX]: { + extensions: [FileExtensionText.TSX], + mimeTypes: [MimeTypeText.TSX] + }, + [FileTypeText.CSS]: { + extensions: [FileExtensionText.CSS], + mimeTypes: [MimeTypeText.CSS] + }, + [FileTypeText.HTML]: { + extensions: [FileExtensionText.HTML, FileExtensionText.HTM], + mimeTypes: [MimeTypeText.HTML] + }, + [FileTypeText.JSON]: { + extensions: [FileExtensionText.JSON], + mimeTypes: [MimeTypeText.JSON] + }, + [FileTypeText.XML]: { + extensions: [FileExtensionText.XML], + mimeTypes: [MimeTypeText.XML_TEXT, MimeTypeText.XML_APP] + }, + [FileTypeText.YAML]: { + extensions: [FileExtensionText.YAML, FileExtensionText.YML], + mimeTypes: [MimeTypeText.YAML_TEXT, MimeTypeText.YAML_APP] + }, + [FileTypeText.CSV]: { + extensions: [FileExtensionText.CSV], + mimeTypes: [MimeTypeText.CSV] + }, + [FileTypeText.LOG]: { + extensions: [FileExtensionText.LOG], + mimeTypes: [MimeTypeText.PLAIN] + }, + [FileTypeText.PYTHON]: { + extensions: [FileExtensionText.PY], + mimeTypes: [MimeTypeText.PYTHON] + }, + [FileTypeText.JAVA]: { + extensions: [FileExtensionText.JAVA], + mimeTypes: [MimeTypeText.JAVA] + }, + [FileTypeText.CPP]: { + extensions: [ + FileExtensionText.CPP, + FileExtensionText.C, + FileExtensionText.H, + FileExtensionText.HPP + ], + mimeTypes: [MimeTypeText.CPP_SRC, MimeTypeText.CPP_HDR, MimeTypeText.C_SRC, MimeTypeText.C_HDR] + }, + [FileTypeText.PHP]: { + extensions: [FileExtensionText.PHP], + mimeTypes: [MimeTypeText.PHP] + }, + [FileTypeText.RUBY]: { + extensions: [FileExtensionText.RB], + mimeTypes: [MimeTypeText.RUBY] + }, + [FileTypeText.GO]: { + extensions: [FileExtensionText.GO], + mimeTypes: [MimeTypeText.GO] + }, + [FileTypeText.RUST]: { + extensions: [FileExtensionText.RS], + mimeTypes: [MimeTypeText.RUST] + }, + [FileTypeText.SHELL]: { + extensions: [FileExtensionText.SH, FileExtensionText.BAT], + mimeTypes: [MimeTypeText.SHELL, MimeTypeText.BAT] + }, + [FileTypeText.SQL]: { + extensions: [FileExtensionText.SQL], + mimeTypes: [MimeTypeText.SQL] + }, + [FileTypeText.R]: { + extensions: [FileExtensionText.R], + mimeTypes: [MimeTypeText.R] + }, + [FileTypeText.SCALA]: { + extensions: [FileExtensionText.SCALA], + mimeTypes: [MimeTypeText.SCALA] + }, + [FileTypeText.KOTLIN]: { + extensions: [FileExtensionText.KT], + mimeTypes: [MimeTypeText.KOTLIN] + }, + [FileTypeText.SWIFT]: { + extensions: [FileExtensionText.SWIFT], + mimeTypes: [MimeTypeText.SWIFT] + }, + [FileTypeText.DART]: { + extensions: [FileExtensionText.DART], + mimeTypes: [MimeTypeText.DART] + }, + [FileTypeText.VUE]: { + extensions: [FileExtensionText.VUE], + mimeTypes: [MimeTypeText.VUE] + }, + [FileTypeText.SVELTE]: { + extensions: [FileExtensionText.SVELTE], + mimeTypes: [MimeTypeText.SVELTE] + }, + [FileTypeText.LATEX]: { + extensions: [FileExtensionText.TEX], + mimeTypes: [MimeTypeText.LATEX, MimeTypeText.TEX, MimeTypeText.TEX_APP] + }, + [FileTypeText.BIBTEX]: { + extensions: [FileExtensionText.BIB], + mimeTypes: [MimeTypeText.BIBTEX] + }, + [FileTypeText.CUDA]: { + extensions: [FileExtensionText.CU, FileExtensionText.CUH], + mimeTypes: [MimeTypeText.CUDA] + }, + [FileTypeText.VULKAN]: { + extensions: [FileExtensionText.COMP], + mimeTypes: [MimeTypeText.PLAIN] + }, + [FileTypeText.HASKELL]: { + extensions: [FileExtensionText.HS], + mimeTypes: [MimeTypeText.HASKELL] + }, + [FileTypeText.CSHARP]: { + extensions: [FileExtensionText.CS], + mimeTypes: [MimeTypeText.CSHARP] + }, + [FileTypeText.PROPERTIES]: { + extensions: [FileExtensionText.PROPERTIES], + mimeTypes: [MimeTypeText.PROPERTIES] + } +} as const; diff --git a/llama.cpp/tools/server/webui/src/lib/constants/table-html-restorer.ts b/llama.cpp/tools/server/webui/src/lib/constants/table-html-restorer.ts new file mode 100644 index 0000000..e5d5b12 --- /dev/null +++ b/llama.cpp/tools/server/webui/src/lib/constants/table-html-restorer.ts @@ -0,0 +1,20 @@ +/** + * Matches <br>, <br/>, <br /> tags (case-insensitive). + * Used to detect line breaks in table cell text content. + */ +export const BR_PATTERN = /<br\s*\/?\s*>/gi; + +/** + * Matches a complete <ul>...</ul> block. + * Captures the inner content (group 1) for further <li> extraction. + * Case-insensitive, allows multiline content. + */ +export const LIST_PATTERN = /^<ul>([\s\S]*)<\/ul>$/i; + +/** + * Matches individual <li>...</li> elements within a list. + * Captures the inner content (group 1) of each list item. + * Non-greedy to handle multiple consecutive items. + * Case-insensitive, allows multiline content. + */ +export const LI_PATTERN = /<li>([\s\S]*?)<\/li>/gi; diff --git a/llama.cpp/tools/server/webui/src/lib/constants/tooltip-config.ts b/llama.cpp/tools/server/webui/src/lib/constants/tooltip-config.ts new file mode 100644 index 0000000..3c30c8c --- /dev/null +++ b/llama.cpp/tools/server/webui/src/lib/constants/tooltip-config.ts @@ -0,0 +1 @@ +export const TOOLTIP_DELAY_DURATION = 100; diff --git a/llama.cpp/tools/server/webui/src/lib/constants/viewport.ts b/llama.cpp/tools/server/webui/src/lib/constants/viewport.ts new file mode 100644 index 0000000..26e202c --- /dev/null +++ b/llama.cpp/tools/server/webui/src/lib/constants/viewport.ts @@ -0,0 +1 @@ +export const DEFAULT_MOBILE_BREAKPOINT = 768; |
