This commit is contained in:
Timothy Jaeryang Baek
2025-05-16 23:21:08 +04:00
parent b61efcf54a
commit e37433f2b1
2 changed files with 59 additions and 6 deletions
+13
View File
@@ -195,10 +195,12 @@
$: if (selectedModels) {
setToolIds();
setFilterIds();
}
$: if (atSelectedModel || selectedModels) {
setToolIds();
setFilterIds();
}
const setToolIds = async () => {
@@ -218,6 +220,17 @@
}
};
const setFilterIds = async () => {
if (selectedModels.length !== 1 && !atSelectedModel) {
selectedFilterIds = [];
}
const model = atSelectedModel ?? $models.find((m) => m.id === selectedModels[0]);
if (model) {
selectedFilterIds = model?.info?.meta?.filterIds ?? [];
}
};
const showMessage = async (message) => {
const _chatId = JSON.parse(JSON.stringify($chatId));
let _messageId = JSON.parse(JSON.stringify(message.id));