mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-06-29 19:01:38 +00:00
🪞 fix: Match Prompt Cache TTL Control to Region Combobox Styling (#13839)
Some checks are pending
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Waiting to run
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Waiting to run
GitNexus Index / index (push) Waiting to run
GitNexus Index / post-index (push) Blocked by required conditions
Some checks are pending
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Waiting to run
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Waiting to run
GitNexus Index / index (push) Waiting to run
GitNexus Index / post-index (push) Blocked by required conditions
The Prompt Cache Duration control used `component: 'dropdown'` (DynamicDropdown → SelectDropDown), which renders with a different trigger style than the sibling Region selector and expands its options inline (headless-ui Listbox) — causing a visual mismatch and layout shift in the parameters panel. Switch both the Anthropic and Bedrock promptCacheTtl definitions to `component: 'combobox'` (DynamicCombobox → ControlCombobox), the same component Region uses: matching rounded trigger styling, an Ariakit popover (portal, no layout shift), and — as a bonus — it persists selections via setOption on custom endpoints (DynamicDropdown's custom branch is a no-op TODO). Renames the placeholder fields to the combobox's selectPlaceholder/selectPlaceholderCode.
This commit is contained in:
parent
268fcbb78d
commit
2c6db6bf73
1 changed files with 6 additions and 6 deletions
|
|
@ -415,11 +415,11 @@ const anthropic: Record<string, SettingDefinition> = {
|
|||
type: 'enum',
|
||||
default: anthropicSettings.promptCacheTtl.default,
|
||||
options: ['5m', '1h'],
|
||||
component: 'dropdown',
|
||||
component: 'combobox',
|
||||
optionType: 'conversation',
|
||||
showDefault: false,
|
||||
placeholder: 'com_endpoint_prompt_cache_ttl_default',
|
||||
placeholderCode: true,
|
||||
selectPlaceholder: 'com_endpoint_prompt_cache_ttl_default',
|
||||
selectPlaceholderCode: true,
|
||||
columnSpan: 2,
|
||||
},
|
||||
thinking: {
|
||||
|
|
@ -577,11 +577,11 @@ const bedrock: Record<string, SettingDefinition> = {
|
|||
type: 'enum',
|
||||
default: undefined,
|
||||
options: ['5m', '1h'],
|
||||
component: 'dropdown',
|
||||
component: 'combobox',
|
||||
optionType: 'conversation',
|
||||
showDefault: false,
|
||||
placeholder: 'com_endpoint_prompt_cache_ttl_default',
|
||||
placeholderCode: true,
|
||||
selectPlaceholder: 'com_endpoint_prompt_cache_ttl_default',
|
||||
selectPlaceholderCode: true,
|
||||
columnSpan: 2,
|
||||
},
|
||||
reasoning_effort: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue