fix: resolve remaining modal JavaScript errors

- Fix sendMessageWithCustomHistory wrapper to properly return generator with yield*
- Fix getSelectedModel import path from ./chat.js to ./models.js
This commit is contained in:
Russell Ballestrini 2025-07-03 18:18:41 -04:00
parent 7b9a37ebea
commit 335dd937d8

View file

@ -30,9 +30,9 @@ async function sendMessage(message) {
return sendMessage(message);
}
async function sendMessageWithCustomHistory(history) {
async function* sendMessageWithCustomHistory(history) {
const { sendMessageWithCustomHistory } = await import("./chat.js");
return sendMessageWithCustomHistory(history);
yield* sendMessageWithCustomHistory(history);
}
async function getChatHistory() {
@ -66,7 +66,7 @@ async function fetchModelsFromEndpoints() {
}
async function getSelectedModel() {
const { getSelectedModel } = await import("./chat.js");
const { getSelectedModel } = await import("./models.js");
return getSelectedModel();
}