fix: enforce the image generation flag on the legacy chat feature path (#27759)
* fix: enforce the image generation flag on the legacy chat feature path * fix: refresh the config store when image generation is disabled in admin settings * fix: hide active feature pills when the feature is no longer available
This commit is contained in:
@@ -150,8 +150,9 @@
|
||||
});
|
||||
|
||||
if (res) {
|
||||
backendConfig.set(await getBackendConfig());
|
||||
|
||||
if (res.ENABLE_IMAGE_GENERATION) {
|
||||
backendConfig.set(await getBackendConfig());
|
||||
getModels();
|
||||
}
|
||||
|
||||
|
||||
@@ -2241,7 +2241,7 @@
|
||||
{/if}
|
||||
{/each}
|
||||
|
||||
{#if webSearchEnabled}
|
||||
{#if webSearchEnabled && showWebSearchButton}
|
||||
<Tooltip content={$i18n.t('Web Search')} placement="top">
|
||||
<button
|
||||
on:click|preventDefault={() => (webSearchEnabled = !webSearchEnabled)}
|
||||
@@ -2259,7 +2259,7 @@
|
||||
</Tooltip>
|
||||
{/if}
|
||||
|
||||
{#if imageGenerationEnabled}
|
||||
{#if imageGenerationEnabled && showImageGenerationButton}
|
||||
<Tooltip content={$i18n.t('Image')} placement="top">
|
||||
<button
|
||||
on:click|preventDefault={() =>
|
||||
@@ -2277,7 +2277,7 @@
|
||||
</Tooltip>
|
||||
{/if}
|
||||
|
||||
{#if codeInterpreterEnabled}
|
||||
{#if codeInterpreterEnabled && showCodeInterpreterButton}
|
||||
<Tooltip content={$i18n.t('Code Interpreter')} placement="top">
|
||||
<button
|
||||
aria-label={codeInterpreterEnabled
|
||||
|
||||
Reference in New Issue
Block a user