fix: model import

This commit is contained in:
Timothy Jaeryang Baek 2025-02-21 13:19:11 -08:00
parent a7d8ed0c6d
commit 642dcd4b70
2 changed files with 10 additions and 3 deletions

View File

@ -180,7 +180,6 @@
} }
if (model) { if (model) {
console.log(model);
name = model.name; name = model.name;
await tick(); await tick();

View File

@ -62,9 +62,17 @@
!['https://openwebui.com', 'https://www.openwebui.com', 'http://localhost:5173'].includes( !['https://openwebui.com', 'https://www.openwebui.com', 'http://localhost:5173'].includes(
event.origin event.origin
) )
) ) {
return; return;
model = JSON.parse(event.data); }
let data = JSON.parse(event.data);
if (data?.info) {
data = data.info;
}
model = data;
}); });
if (window.opener ?? false) { if (window.opener ?? false) {