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 authored and GitHub committed 2026-10-25 07:35:18 +09:00
1 parent b02ff54459
commit d2e88ba37a
1 file changed
+12 -10
@@ -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')}