ui: add sync blocks so display/behavior settings can be set via --ui-config-file (#25132)
* ui: add sync blocks so display/behavior settings can be set via --ui-config-file * ui: remove enable thinking setting
This commit is contained in:
@@ -69,7 +69,6 @@ export const SETTINGS_KEYS = {
|
|||||||
// Developer
|
// Developer
|
||||||
DISABLE_REASONING_PARSING: 'disableReasoningParsing',
|
DISABLE_REASONING_PARSING: 'disableReasoningParsing',
|
||||||
EXCLUDE_REASONING_FROM_CONTEXT: 'excludeReasoningFromContext',
|
EXCLUDE_REASONING_FROM_CONTEXT: 'excludeReasoningFromContext',
|
||||||
ENABLE_THINKING: 'enableThinking',
|
|
||||||
SHOW_RAW_OUTPUT_SWITCH: 'showRawOutputSwitch',
|
SHOW_RAW_OUTPUT_SWITCH: 'showRawOutputSwitch',
|
||||||
// PY_INTERPRETER_ENABLED: 'pyInterpreterEnabled',
|
// PY_INTERPRETER_ENABLED: 'pyInterpreterEnabled',
|
||||||
JS_SANDBOX_ENABLED: 'jsSandboxEnabled',
|
JS_SANDBOX_ENABLED: 'jsSandboxEnabled',
|
||||||
|
|||||||
@@ -185,7 +185,11 @@ const SETTINGS_REGISTRY: Record<string, SettingsSectionEntry> = {
|
|||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
type: SettingsFieldType.CHECKBOX,
|
type: SettingsFieldType.CHECKBOX,
|
||||||
section: SETTINGS_SECTION_SLUGS.GENERAL,
|
section: SETTINGS_SECTION_SLUGS.GENERAL,
|
||||||
isExperimental: true
|
isExperimental: true,
|
||||||
|
sync: {
|
||||||
|
serverKey: SETTINGS_KEYS.TITLE_GENERATION_USE_LLM,
|
||||||
|
paramType: SyncableParameterType.BOOLEAN
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: SETTINGS_KEYS.TITLE_GENERATION_PROMPT,
|
key: SETTINGS_KEYS.TITLE_GENERATION_PROMPT,
|
||||||
@@ -193,7 +197,11 @@ const SETTINGS_REGISTRY: Record<string, SettingsSectionEntry> = {
|
|||||||
help: 'Optional template for the title generation prompt. Use {{USER}} for the user message and {{ASSISTANT}} for the assistant message.',
|
help: 'Optional template for the title generation prompt. Use {{USER}} for the user message and {{ASSISTANT}} for the assistant message.',
|
||||||
defaultValue: TITLE_GENERATION.DEFAULT_PROMPT,
|
defaultValue: TITLE_GENERATION.DEFAULT_PROMPT,
|
||||||
type: SettingsFieldType.TEXTAREA,
|
type: SettingsFieldType.TEXTAREA,
|
||||||
section: SETTINGS_SECTION_SLUGS.GENERAL
|
section: SETTINGS_SECTION_SLUGS.GENERAL,
|
||||||
|
sync: {
|
||||||
|
serverKey: SETTINGS_KEYS.TITLE_GENERATION_PROMPT,
|
||||||
|
paramType: SyncableParameterType.STRING
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: SETTINGS_KEYS.MAX_IMAGE_RESOLUTION,
|
key: SETTINGS_KEYS.MAX_IMAGE_RESOLUTION,
|
||||||
@@ -201,7 +209,11 @@ const SETTINGS_REGISTRY: Record<string, SettingsSectionEntry> = {
|
|||||||
help: 'Images larger than this will be resized before sending to server. Set to 0 to disable.',
|
help: 'Images larger than this will be resized before sending to server. Set to 0 to disable.',
|
||||||
defaultValue: 0,
|
defaultValue: 0,
|
||||||
type: SettingsFieldType.INPUT,
|
type: SettingsFieldType.INPUT,
|
||||||
section: SETTINGS_SECTION_SLUGS.GENERAL
|
section: SETTINGS_SECTION_SLUGS.GENERAL,
|
||||||
|
sync: {
|
||||||
|
serverKey: SETTINGS_KEYS.MAX_IMAGE_RESOLUTION,
|
||||||
|
paramType: SyncableParameterType.NUMBER
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -385,7 +397,11 @@ const SETTINGS_REGISTRY: Record<string, SettingsSectionEntry> = {
|
|||||||
help: 'Display the current build version in the bottom-right corner of the interface.',
|
help: 'Display the current build version in the bottom-right corner of the interface.',
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
type: SettingsFieldType.CHECKBOX,
|
type: SettingsFieldType.CHECKBOX,
|
||||||
section: SETTINGS_SECTION_SLUGS.DISPLAY
|
section: SETTINGS_SECTION_SLUGS.DISPLAY,
|
||||||
|
sync: {
|
||||||
|
serverKey: SETTINGS_KEYS.SHOW_BUILD_VERSION,
|
||||||
|
paramType: SyncableParameterType.BOOLEAN
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -669,7 +685,11 @@ const SETTINGS_REGISTRY: Record<string, SettingsSectionEntry> = {
|
|||||||
help: '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.',
|
help: '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.',
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
type: SettingsFieldType.CHECKBOX,
|
type: SettingsFieldType.CHECKBOX,
|
||||||
section: SETTINGS_SECTION_SLUGS.DEVELOPER
|
section: SETTINGS_SECTION_SLUGS.DEVELOPER,
|
||||||
|
sync: {
|
||||||
|
serverKey: SETTINGS_KEYS.PRE_ENCODE_CONVERSATION,
|
||||||
|
paramType: SyncableParameterType.BOOLEAN
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: SETTINGS_KEYS.DISABLE_REASONING_PARSING,
|
key: SETTINGS_KEYS.DISABLE_REASONING_PARSING,
|
||||||
@@ -677,7 +697,11 @@ const SETTINGS_REGISTRY: Record<string, SettingsSectionEntry> = {
|
|||||||
help: 'Send reasoning_format=none so the server returns thinking tokens inline instead of extracting them into a separate field.',
|
help: 'Send reasoning_format=none so the server returns thinking tokens inline instead of extracting them into a separate field.',
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
type: SettingsFieldType.CHECKBOX,
|
type: SettingsFieldType.CHECKBOX,
|
||||||
section: SETTINGS_SECTION_SLUGS.DEVELOPER
|
section: SETTINGS_SECTION_SLUGS.DEVELOPER,
|
||||||
|
sync: {
|
||||||
|
serverKey: SETTINGS_KEYS.DISABLE_REASONING_PARSING,
|
||||||
|
paramType: SyncableParameterType.BOOLEAN
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: SETTINGS_KEYS.EXCLUDE_REASONING_FROM_CONTEXT,
|
key: SETTINGS_KEYS.EXCLUDE_REASONING_FROM_CONTEXT,
|
||||||
@@ -691,14 +715,6 @@ const SETTINGS_REGISTRY: Record<string, SettingsSectionEntry> = {
|
|||||||
paramType: SyncableParameterType.BOOLEAN
|
paramType: SyncableParameterType.BOOLEAN
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
key: SETTINGS_KEYS.ENABLE_THINKING,
|
|
||||||
label: 'Enable thinking',
|
|
||||||
help: 'Enable model thinking/reasoning for each request. When off, the model will skip the thinking phase and go straight to the response.',
|
|
||||||
defaultValue: false,
|
|
||||||
type: SettingsFieldType.CHECKBOX,
|
|
||||||
section: SETTINGS_SECTION_SLUGS.DEVELOPER
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
key: SETTINGS_KEYS.SHOW_RAW_OUTPUT_SWITCH,
|
key: SETTINGS_KEYS.SHOW_RAW_OUTPUT_SWITCH,
|
||||||
label: 'Enable raw output toggle',
|
label: 'Enable raw output toggle',
|
||||||
@@ -717,7 +733,11 @@ const SETTINGS_REGISTRY: Record<string, SettingsSectionEntry> = {
|
|||||||
help: 'Expose a run_javascript tool to the model. Code runs in a Web Worker inside a sandboxed iframe with an opaque origin, isolated from the WebUI and its API, with a hard timeout.',
|
help: 'Expose a run_javascript tool to the model. Code runs in a Web Worker inside a sandboxed iframe with an opaque origin, isolated from the WebUI and its API, with a hard timeout.',
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
type: SettingsFieldType.CHECKBOX,
|
type: SettingsFieldType.CHECKBOX,
|
||||||
section: SETTINGS_SECTION_SLUGS.DEVELOPER
|
section: SETTINGS_SECTION_SLUGS.DEVELOPER,
|
||||||
|
sync: {
|
||||||
|
serverKey: SETTINGS_KEYS.JS_SANDBOX_ENABLED,
|
||||||
|
paramType: SyncableParameterType.BOOLEAN
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: SETTINGS_KEYS.CUSTOM_JSON,
|
key: SETTINGS_KEYS.CUSTOM_JSON,
|
||||||
@@ -753,7 +773,11 @@ const SETTINGS_REGISTRY: Record<string, SettingsSectionEntry> = {
|
|||||||
defaultValue: DEFAULT_MCP_CONFIG.requestTimeoutSeconds,
|
defaultValue: DEFAULT_MCP_CONFIG.requestTimeoutSeconds,
|
||||||
type: SettingsFieldType.INPUT,
|
type: SettingsFieldType.INPUT,
|
||||||
section: SETTINGS_SECTION_SLUGS.MCP,
|
section: SETTINGS_SECTION_SLUGS.MCP,
|
||||||
isPositiveInteger: true
|
isPositiveInteger: true,
|
||||||
|
sync: {
|
||||||
|
serverKey: SETTINGS_KEYS.MCP_REQUEST_TIMEOUT_SECONDS,
|
||||||
|
paramType: SyncableParameterType.NUMBER
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user