fix: Web Search Query Generation setting shows while web search is off (#32986)

Settings > Interface showed the Web Search Query Generation switch even with web search turned off, where it has no effect. It now only shows while web search is on, and its stored value is kept.

Refs #32830
This commit is contained in:
Classic298 2026-10-25 00:35:18 +02:00 • committed by GitHub
parent b02ff54459
commit d2e88ba37a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -541,16 +541,18 @@
/>
</AdminSettingRow>
<AdminSettingRow
label={$i18n.t('settings.admin.interface.webSearchQueryGeneration.label')}
description={$i18n.t('settings.admin.interface.webSearchQueryGeneration.description')}
let:labelId
>
<Switch
bind:state={taskConfig.ENABLE_SEARCH_QUERY_GENERATION}
ariaLabelledbyId={labelId}
/>
</AdminSettingRow>
{#if $appConfig?.features?.enable_web_search}
<AdminSettingRow
label={$i18n.t('settings.admin.interface.webSearchQueryGeneration.label')}
description={$i18n.t('settings.admin.interface.webSearchQueryGeneration.description')}
let:labelId
>
<Switch
bind:state={taskConfig.ENABLE_SEARCH_QUERY_GENERATION}
ariaLabelledbyId={labelId}
/>
</AdminSettingRow>
{/if}
<AdminSettingField
label={$i18n.t('settings.admin.interface.queryGenerationPrompt.label')}