mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-24 18:31:38 +01:00
Compare commits
6 Commits
dependabot
...
worktree-f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2a3f7a669 | ||
|
|
356b8ea0d6 | ||
|
|
f283b02cfe | ||
|
|
df089e6f00 | ||
|
|
0979398215 | ||
|
|
85260ab49a |
@@ -144,9 +144,10 @@ export function duplicateModel<M extends AnyModel["model"], T extends ExtractMod
|
||||
throw new Error("Failed to duplicate null model");
|
||||
}
|
||||
|
||||
// If the model has a name, try to duplicate it with a name that doesn't conflict
|
||||
let name = "name" in model ? resolvedModelName(model) : undefined;
|
||||
if (name != null) {
|
||||
// If the model has an explicit (non-empty) name, try to duplicate it with a name that doesn't conflict.
|
||||
// When the name is empty, keep it empty so the display falls back to the URL.
|
||||
let name = "name" in model ? model.name : undefined;
|
||||
if (name) {
|
||||
const existingModels = listModels(model.model);
|
||||
for (let i = 0; i < 100; i++) {
|
||||
const hasConflict = existingModels.some((m) => {
|
||||
|
||||
Reference in New Issue
Block a user