fix(models): Add button, probe of managed models, delete list refresh
- ui.js: mount() now wraps non-node children in text nodes (like h()), so mount(el, "") no longer throws in appendChild — this is what broke the "Add model" form (applyDefaults cleared a status via mount(x,"")). - probe_model: resolve managed local models too (they are synthesized into the registry, not [[models]]) — probing them no longer returns "model not found". - models.js: await reload() after delete so the row is removed immediately.
This commit is contained in:
Vendored
+3
-1
@@ -25,7 +25,9 @@ export function clear(node) {
|
||||
|
||||
export function mount(node, ...children) {
|
||||
clear(node);
|
||||
for (const c of children.flat()) if (c != null && c !== false) node.appendChild(c);
|
||||
for (const c of children.flat())
|
||||
if (c != null && c !== false)
|
||||
node.appendChild(typeof c === "object" ? c : document.createTextNode(String(c)));
|
||||
return node;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -264,7 +264,7 @@ function row(m, meta, reload) {
|
||||
try {
|
||||
await api.deleteModel(m.id);
|
||||
toast(t("toast.deleted"), "good");
|
||||
reload();
|
||||
await reload();
|
||||
} catch (e) {
|
||||
toast(String(e.message || e), "bad");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user