fix: keep a workspace model's base model when cloning it from the admin Models settings and hide Clone for arena models (#30080)

This commit is contained in:
G30 2026-09-21 08:15:12 -04:00 • committed by GitHub
parent f5967aebd7
commit c2f11edb2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -638,7 +638,7 @@
model = await getFullModel(model);
sessionStorage.model = JSON.stringify({
...model,
base_model_id: model.id,
...(isPresetModel(model) ? {} : { base_model_id: model.id }),
id: `${model.id}-clone`,
name: `${model.name} (Clone)`
});

View file

@ -197,7 +197,7 @@
<div class="flex items-center">{$i18n.t('Copy Link')}</div>
</button>
{#if model?.is_active ?? true}
{#if (model?.is_active ?? true) && model?.owned_by !== 'arena'}
<button
class="select-none flex w-full gap-2 items-center h-[1.6875rem] px-2 text-[0.8125rem] font-normal cursor-pointer hover:bg-gray-50/40 dark:hover:bg-gray-800/40 rounded-xl"
on:click={() => runAndClose(cloneHandler)}