mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 08:37:22 +00:00
Move imageModel to VFS
This commit is contained in:
7 files changed
+11
-22
No files matched your search
@@ -201,7 +201,7 @@ function generateIdFromName(name: string): string {
|
||||
|
||||
export function AISettings() {
|
||||
const { t } = useTranslation();
|
||||
const { settings, setProvider, removeProvider, setProviders } = useAISettings();
|
||||
const { settings, updateSettings, setProvider, removeProvider, setProviders } = useAISettings();
|
||||
const isMobile = useIsMobile();
|
||||
const navigate = useNavigate();
|
||||
const { user } = useCurrentUser();
|
||||
@@ -682,25 +682,15 @@ export function AISettings() {
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<ModelInput
|
||||
value={config.imageModel || ''}
|
||||
onChange={(value) => {
|
||||
updateConfig((current) => ({
|
||||
...current,
|
||||
imageModel: value || undefined,
|
||||
}));
|
||||
}}
|
||||
value={settings.imageModel || ''}
|
||||
onChange={(value) => updateSettings({ imageModel: value || undefined })}
|
||||
className="flex-1"
|
||||
/>
|
||||
{config.imageModel && (
|
||||
{settings.imageModel && (
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={() => {
|
||||
updateConfig((current) => {
|
||||
const { imageModel, ...rest } = current;
|
||||
return rest;
|
||||
});
|
||||
}}
|
||||
onClick={() => updateSettings({ imageModel: undefined })}
|
||||
className="h-10 px-3"
|
||||
>
|
||||
<X className="h-4 w-4" />
|
||||
|
||||
Reference in new issue
Block a user