diff --git a/tools/server/public/bundle.js b/tools/server/public/bundle.js index 8aa0a52a3e..b3b5673ae9 100644 --- a/tools/server/public/bundle.js +++ b/tools/server/public/bundle.js @@ -1244,112 +1244,113 @@ TEXT_FILE_EXTENSION_REGEX=/\.(txt|md|log)$/i,PROTOCOL_PREFIX_REGEX=/^[a-z]+:\/\/ `,RESOURCE_UNKNOWN_TYPE="unknown type",BINARY_CONTENT_LABEL="Binary content",IMAGE_MIME_TO_EXTENSION={[MimeTypeImage.JPEG]:"jpg",[MimeTypeImage.JPG]:"jpg",[MimeTypeImage.PNG]:"png",[MimeTypeImage.GIF]:"gif",[MimeTypeImage.WEBP]:"webp"},EXPORT_CONV_ID_TRIM_LENGTH=8,EXPORT_CONV_NAME_SUFFIX_MAX_LENGTH=20,ISO_TIMESTAMP_SLICE_LENGTH=19,NON_ALPHANUMERIC_REGEX=/[^a-z0-9]/gi,EXPORT_CONV_NONALNUM_REPLACEMENT="_",MULTIPLE_UNDERSCORE_REGEX=/_+/g,ISO_DATE_TIME_SEPARATOR="T",ISO_DATE_TIME_SEPARATOR_REPLACEMENT="\ _",ISO_TIME_SEPARATOR=":",ISO_TIME_SEPARATOR_REPLACEMENT="-",MODEL_ID_NOT_FOUND=-1,MODEL_ID_ORG_SEPARATOR="/",MODEL_ID_SEGMENT_SEPARATOR="-",MODEL_ID_QUANTIZATION_SEPARATOR=":",MODEL_QUANTIZATION_SEGMENT_RE=/^(I?Q\d+(_[A-Z0-9]+)*|F\d+|BF\d+|MXFP\d+(_[A-Z0-9]+)*)$/i,MODEL_CUSTOM_QUANTIZATION_PREFIX_RE=/^UD$/i,MODEL_PARAMS_RE=/^\d+(\.\d+)?[BbMmKkTt]$/,MODEL_ACTIVATED_PARAMS_RE=/^[Aa]\d+(\.\d+)?[BbMmKkTt]$/,MODEL_IGNORED_SEGMENTS=new Set(["GGUF","GGML"]),PRECISION_MULTIPLIER=1e6,PROCESSING_INFO_TIMEOUT=2e3, -STATS_UNITS={TOKENS_PER_SECOND:"t/s"},SETTING_CONFIG_DEFAULT={apiKey:"",systemMessage:"",showSystemMessage:!0,theme:ColorMode.SYSTEM,showThoughtInProgress:!1,disableReasoningParsing:!1,excludeReasoningFromContext:!1,showRawOutputSwitch:!1,keepStatsVisible:!1,showMessageStats:!0,askForTitleConfirmation:!1,pasteLongTextToFileLen:2500,copyTextAttachmentsAsPlainText:!1,pdfAsImage:!1,disableAutoScroll:!1,renderUserContentAsMarkdown:!1,alwaysShowSidebarOnDesktop:!1,autoShowSidebarOnNewChat:!0,sendOnEnter:!0, -autoMicOnEmpty:!1,fullHeightCodeBlocks:!1,showRawModelNames:!1,mcpServers:"[]",mcpServerUsageStats:"{}",agenticMaxTurns:10,agenticMaxToolPreviewLines:25,showToolCallInProgress:!1,alwaysShowAgenticTurns:!1,samplers:"",backend_sampling:!1,temperature:void 0,dynatemp_range:void 0,dynatemp_exponent:void 0,top_k:void 0,top_p:void 0,min_p:void 0,xtc_probability:void 0,xtc_threshold:void 0,typ_p:void 0,repeat_last_n:void 0,repeat_penalty:void 0,presence_penalty:void 0,frequency_penalty:void 0,dry_multiplier:void 0, -dry_base:void 0,dry_allowed_length:void 0,dry_penalty_last_n:void 0,max_tokens:void 0,custom:"",preEncodeConversation:!1,pyInterpreterEnabled:!1,enableContinueGeneration:!1},SETTING_CONFIG_INFO={apiKey:"Set the API Key if you are using --api-key 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 choos\ -e 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 paramet\ -er 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.",disableReasoningParsing:"Send reasoning_format=none s\ -o the server returns thinking tokens inline instead of extracting them into a separate field.",excludeReasoningFromContext:"Strip thinking from previous messages before sending. When off, thinking is sent back via the reasoning_content field so the model sees its own chain-of-thought across turns.",showRawOutputSwitch:"Show toggle button to display messages as plain text instead of Markdown-formatted content",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.",sendOnEnter:"Use Enter to send messages and Shift + Enter for new lines. When disabled, use Ctrl/Cmd + Enter.",autoMicOnEmpty:"Automatically show microphone button instead of send button when textarea is empt\ -y for models with audio modality support.",fullHeightCodeBlocks:"Always display code blocks at their full natural height, overriding any height limits.",showRawModelNames:'Display full raw model identifiers (e.g. "ggml-org/GLM-4.7-Flash-GGUF:Q8_0") instead of parsed names with badges.',mcpServers:"Configure MCP servers as a JSON list. Use the form in the MCP Client settings section to edit.",mcpServerUsageStats:"Usage statistics for MCP servers. Tracks how many times tools from each server have \ -been used.",agenticMaxTurns:"Maximum number of tool execution cycles before stopping (prevents infinite loops).",agenticMaxToolPreviewLines:"Number of lines shown in tool output previews (last N lines). Only these previews and the final LLM response persist after the agentic loop completes.",showToolCallInProgress:"Automatically expand tool call details while executing and keep them expanded after completion.",pyInterpreterEnabled:"Enable Python interpreter using Pyodide. Allows running Python c\ -ode in markdown code blocks.",preEncodeConversation:"After each response, re-submit the conversation to pre-fill the server KV cache. Makes the next turn faster since the prompt is already encoded while you read the response.",enableContinueGeneration:'Enable "Continue" button for assistant messages. Currently works only with non-reasoning models.'},SETTINGS_COLOR_MODES_CONFIG=[{value:ColorMode.SYSTEM,label:"System",icon:Monitor},{value:ColorMode.LIGHT,label:"Light",icon:Sun},{value:ColorMode.DARK, -label:"Dark",icon:Moon}],NUMERIC_FIELDS=["temperature","top_k","top_p","min_p","max_tokens","pasteLongTextToFileLen","dynatemp_range","dynatemp_exponent","typ_p","xtc_probability","xtc_threshold","repeat_last_n","repeat_penalty","presence_penalty","frequency_penalty","dry_multiplier","dry_base","dry_allowed_length","dry_penalty_last_n","agenticMaxTurns","agenticMaxToolPreviewLines"],POSITIVE_INTEGER_FIELDS=["agenticMaxTurns","agenticMaxToolPreviewLines"],SETTINGS_KEYS={THEME:"theme",API_KEY:"api\ -Key",SYSTEM_MESSAGE:"systemMessage",PASTE_LONG_TEXT_TO_FILE_LEN:"pasteLongTextToFileLen",COPY_TEXT_ATTACHMENTS_AS_PLAIN_TEXT:"copyTextAttachmentsAsPlainText",SEND_ON_ENTER:"sendOnEnter",ENABLE_CONTINUE_GENERATION:"enableContinueGeneration",PDF_AS_IMAGE:"pdfAsImage",ASK_FOR_TITLE_CONFIRMATION:"askForTitleConfirmation",SHOW_MESSAGE_STATS:"showMessageStats",SHOW_THOUGHT_IN_PROGRESS:"showThoughtInProgress",KEEP_STATS_VISIBLE:"keepStatsVisible",AUTO_MIC_ON_EMPTY:"autoMicOnEmpty",RENDER_USER_CONTENT_AS_MARKDOWN:"\ -renderUserContentAsMarkdown",DISABLE_AUTO_SCROLL:"disableAutoScroll",ALWAYS_SHOW_SIDEBAR_ON_DESKTOP:"alwaysShowSidebarOnDesktop",AUTO_SHOW_SIDEBAR_ON_NEW_CHAT:"autoShowSidebarOnNewChat",FULL_HEIGHT_CODE_BLOCKS:"fullHeightCodeBlocks",SHOW_RAW_MODEL_NAMES:"showRawModelNames",TEMPERATURE:"temperature",DYNATEMP_RANGE:"dynatemp_range",DYNATEMP_EXPONENT:"dynatemp_exponent",TOP_K:"top_k",TOP_P:"top_p",MIN_P:"min_p",XTC_PROBABILITY:"xtc_probability",XTC_THRESHOLD:"xtc_threshold",TYP_P:"typ_p",MAX_TOKENS:"\ -max_tokens",SAMPLERS:"samplers",BACKEND_SAMPLING:"backend_sampling",REPEAT_LAST_N:"repeat_last_n",REPEAT_PENALTY:"repeat_penalty",PRESENCE_PENALTY:"presence_penalty",FREQUENCY_PENALTY:"frequency_penalty",DRY_MULTIPLIER:"dry_multiplier",DRY_BASE:"dry_base",DRY_ALLOWED_LENGTH:"dry_allowed_length",DRY_PENALTY_LAST_N:"dry_penalty_last_n",AGENTIC_MAX_TURNS:"agenticMaxTurns",ALWAYS_SHOW_AGENTIC_TURNS:"alwaysShowAgenticTurns",AGENTIC_MAX_TOOL_PREVIEW_LINES:"agenticMaxToolPreviewLines",SHOW_TOOL_CALL_IN_PROGRESS:"\ -showToolCallInProgress",PRE_ENCODE_CONVERSATION:"preEncodeConversation",DISABLE_REASONING_PARSING:"disableReasoningParsing",EXCLUDE_REASONING_FROM_CONTEXT:"excludeReasoningFromContext",SHOW_RAW_OUTPUT_SWITCH:"showRawOutputSwitch",CUSTOM:"custom"},SETTINGS_SECTION_TITLES={GENERAL:"General",DISPLAY:"Display",SAMPLING:"Sampling",PENALTIES:"Penalties",IMPORT_EXPORT:"Import/Export",MCP:"MCP",DEVELOPER:"Developer"};FileTypeAudio.MP3+"",FileExtensionAudio.MP3,MimeTypeAudio.MP3_MPEG,MimeTypeAudio.MP3,FileTypeAudio. -WAV+"",FileExtensionAudio.WAV,MimeTypeAudio.WAV;FileTypeImage.JPEG+"",FileExtensionImage.JPG,FileExtensionImage.JPEG,MimeTypeImage.JPEG,FileTypeImage.PNG+"",FileExtensionImage.PNG,MimeTypeImage.PNG,FileTypeImage.GIF+"",FileExtensionImage.GIF,MimeTypeImage.GIF,FileTypeImage.WEBP+"",FileExtensionImage.WEBP,MimeTypeImage.WEBP,FileTypeImage.SVG+"",FileExtensionImage.SVG,MimeTypeImage.SVG;FileTypePdf.PDF+"",FileExtensionPdf.PDF,MimeTypeApplication.PDF;FileTypeText.PLAIN_TEXT+"",FileExtensionText.TXT, -MimeTypeText.PLAIN,FileTypeText.MARKDOWN+"",FileExtensionText.MD,MimeTypeText.MARKDOWN,FileTypeText.ASCIIDOC+"",FileExtensionText.ADOC,MimeTypeText.ASCIIDOC,FileTypeText.JAVASCRIPT+"",FileExtensionText.JS,MimeTypeText.JAVASCRIPT,MimeTypeText.JAVASCRIPT_APP,FileTypeText.TYPESCRIPT+"",FileExtensionText.TS,MimeTypeText.TYPESCRIPT,FileTypeText.JSX+"",FileExtensionText.JSX,MimeTypeText.JSX,FileTypeText.TSX+"",FileExtensionText.TSX,MimeTypeText.TSX,FileTypeText.CSS+"",FileExtensionText.CSS,MimeTypeText. -CSS,FileTypeText.HTML+"",FileExtensionText.HTML,FileExtensionText.HTM,MimeTypeText.HTML,FileTypeText.JSON+"",FileExtensionText.JSON,MimeTypeText.JSON,FileTypeText.XML+"",FileExtensionText.XML,MimeTypeText.XML_TEXT,MimeTypeText.XML_APP,FileTypeText.YAML+"",FileExtensionText.YAML,FileExtensionText.YML,MimeTypeText.YAML_TEXT,MimeTypeText.YAML_APP,FileTypeText.CSV+"",FileExtensionText.CSV,MimeTypeText.CSV,FileTypeText.LOG+"",FileExtensionText.LOG,MimeTypeText.PLAIN,FileTypeText.PYTHON+"",FileExtensionText. -PY,MimeTypeText.PYTHON,FileTypeText.JAVA+"",FileExtensionText.JAVA,MimeTypeText.JAVA,FileTypeText.CPP+"",FileExtensionText.CPP,FileExtensionText.C,FileExtensionText.H,FileExtensionText.HPP,MimeTypeText.CPP_SRC,MimeTypeText.CPP_HDR,MimeTypeText.C_SRC,MimeTypeText.C_HDR,FileTypeText.PHP+"",FileExtensionText.PHP,MimeTypeText.PHP,FileTypeText.RUBY+"",FileExtensionText.RB,MimeTypeText.RUBY,FileTypeText.GO+"",FileExtensionText.GO,MimeTypeText.GO,FileTypeText.RUST+"",FileExtensionText.RS,MimeTypeText.RUST, -FileTypeText.SHELL+"",FileExtensionText.SH,FileExtensionText.BAT,MimeTypeText.SHELL,MimeTypeText.BAT,FileTypeText.SQL+"",FileExtensionText.SQL,MimeTypeText.SQL,FileTypeText.R+"",FileExtensionText.R,MimeTypeText.R,FileTypeText.SCALA+"",FileExtensionText.SCALA,MimeTypeText.SCALA,FileTypeText.KOTLIN+"",FileExtensionText.KT,MimeTypeText.KOTLIN,FileTypeText.SWIFT+"",FileExtensionText.SWIFT,MimeTypeText.SWIFT,FileTypeText.DART+"",FileExtensionText.DART,MimeTypeText.DART,FileTypeText.VUE+"",FileExtensionText. -VUE,MimeTypeText.VUE,FileTypeText.SVELTE+"",FileExtensionText.SVELTE,MimeTypeText.SVELTE,FileTypeText.LATEX+"",FileExtensionText.TEX,MimeTypeText.LATEX,MimeTypeText.TEX,MimeTypeText.TEX_APP,FileTypeText.BIBTEX+"",FileExtensionText.BIB,MimeTypeText.BIBTEX,FileTypeText.CUDA+"",FileExtensionText.CU,FileExtensionText.CUH,MimeTypeText.CUDA,FileTypeText.VULKAN+"",FileExtensionText.COMP,MimeTypeText.PLAIN,FileTypeText.HASKELL+"",FileExtensionText.HS,MimeTypeText.HASKELL,FileTypeText.CSHARP+"",FileExtensionText. -CS,MimeTypeText.CSHARP,FileTypeText.PROPERTIES+"",FileExtensionText.PROPERTIES,MimeTypeText.PROPERTIES;const BR_PATTERN=//gi,LIST_PATTERN=/^