mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-05 11:07:55 -05:00
refac
This commit is contained in:
1 parent
c7dcba6b04
commit
e1d2722520
84 files changed
+4902
-5460
No files matched your search
@@ -65,6 +65,7 @@
|
||||
import LocalizedPromptSuggestions from './LocalizedPromptSuggestions.svelte';
|
||||
import PromptSuggestions from './PromptSuggestions.svelte';
|
||||
import TerminalSelector from './TerminalSelector.svelte';
|
||||
import ImageModelSelector from './ImageModelSelector.svelte';
|
||||
import TTSVoiceInput from './TTSVoiceInput.svelte';
|
||||
import VoiceAvatarSettings from './VoiceAvatarSettings.svelte';
|
||||
import Photo from '$lib/components/icons/Photo.svelte';
|
||||
@@ -268,6 +269,7 @@
|
||||
let actionIds = [];
|
||||
let accessGrants: any[] = [];
|
||||
let terminalId = '';
|
||||
let imageModelId = '';
|
||||
$: hasTerminal = $config?.features?.enable_terminal_servers || $config?.features?.tether;
|
||||
let tts = { voice: '' };
|
||||
let voice = { voice: '' };
|
||||
@@ -529,6 +531,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (imageModelId || defaultMeta.imageModelId) {
|
||||
modelInfo.meta.imageModelId = imageModelId;
|
||||
} else if (modelInfo.meta.imageModelId) {
|
||||
delete modelInfo.meta.imageModelId;
|
||||
}
|
||||
|
||||
if (voice.voice.trim()) modelInfo.meta.voice = { voice: voice.voice.trim() };
|
||||
else delete modelInfo.meta.voice;
|
||||
|
||||
@@ -761,6 +769,7 @@
|
||||
defaultFeatureIds = model?.meta?.defaultFeatureIds ?? defaultMeta.defaultFeatureIds ?? [];
|
||||
builtinTools = model?.meta?.builtinTools ?? defaultMeta.builtinTools ?? {};
|
||||
terminalId = model?.meta?.terminalId ?? defaultMeta.terminalId ?? '';
|
||||
imageModelId = model?.meta?.imageModelId ?? defaultMeta.imageModelId ?? '';
|
||||
tts = { voice: model?.meta?.tts?.voice ?? '' };
|
||||
voice = { voice: model?.meta?.voice?.voice ?? '' };
|
||||
|
||||
@@ -808,6 +817,7 @@
|
||||
builtinTools = defaultMeta.builtinTools ?? {};
|
||||
toolIds = defaultMeta.toolIds ?? [];
|
||||
terminalId = defaultMeta.terminalId ?? '';
|
||||
imageModelId = defaultMeta.imageModelId ?? '';
|
||||
|
||||
// Scroll to top 'workspace-container' element
|
||||
const workspaceContainer = document.getElementById('workspace-container');
|
||||
@@ -1860,6 +1870,9 @@
|
||||
{#if capabilities.terminal && hasTerminal}
|
||||
<TerminalSelector bind:terminalId />
|
||||
{/if}
|
||||
{#if capabilities.image_generation && $config?.features?.enable_image_generation}
|
||||
<ImageModelSelector bind:imageModelId />
|
||||
{/if}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
||||
Reference in new issue
Block a user