974c8c94cc
* webui: add setting for first-line chat titles Add an opt-in setting (`titleGenerationUseFirstLine`) to use the first non-empty line of a prompt as the generated conversation title. Previously, the complete multi-line prompt was being used, which created long titles for complex queries. Coupled with "Ask for confirmation before changing conversation title", the dialog would overflow. * Update tools/server/webui/src/lib/utils/text.ts Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com> * Update tools/server/webui/src/lib/utils/text.ts Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com> * webui: Run build to update the bundle As requested in: https://github.com/ggml-org/llama.cpp/pull/21797#pullrequestreview-4094935065 * webui: Fix missing import for NEWLINE_SEPARATOR --------- Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com>
65 lines
2.3 KiB
TypeScript
65 lines
2.3 KiB
TypeScript
/**
|
|
* Settings key constants for ChatSettings configuration.
|
|
*
|
|
* These keys correspond to properties in SettingsConfigType and are used
|
|
* in settings field configurations to ensure consistency.
|
|
*/
|
|
export const SETTINGS_KEYS = {
|
|
// General
|
|
THEME: 'theme',
|
|
API_KEY: 'apiKey',
|
|
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',
|
|
TITLE_GENERATION_USE_FIRST_LINE: 'titleGenerationUseFirstLine',
|
|
// Display
|
|
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',
|
|
// Sampling
|
|
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',
|
|
// Penalties
|
|
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',
|
|
// MCP
|
|
AGENTIC_MAX_TURNS: 'agenticMaxTurns',
|
|
ALWAYS_SHOW_AGENTIC_TURNS: 'alwaysShowAgenticTurns',
|
|
AGENTIC_MAX_TOOL_PREVIEW_LINES: 'agenticMaxToolPreviewLines',
|
|
SHOW_TOOL_CALL_IN_PROGRESS: 'showToolCallInProgress',
|
|
// Performance
|
|
PRE_ENCODE_CONVERSATION: 'preEncodeConversation',
|
|
// Developer
|
|
DISABLE_REASONING_PARSING: 'disableReasoningParsing',
|
|
EXCLUDE_REASONING_FROM_CONTEXT: 'excludeReasoningFromContext',
|
|
SHOW_RAW_OUTPUT_SWITCH: 'showRawOutputSwitch',
|
|
CUSTOM: 'custom'
|
|
} as const;
|