refac: usage event handling

This commit is contained in:
Timothy Jaeryang Baek
2025-06-16 10:42:34 +04:00
parent deaa7133a2
commit 423a35782b
12 changed files with 219 additions and 152 deletions

View File

@@ -16,8 +16,6 @@
WEBUI_NAME,
mobile,
socket,
activeUserIds,
USAGE_POOL,
chatId,
chats,
currentChatPage,
@@ -103,16 +101,6 @@
console.log('Additional details:', details);
}
});
_socket.on('user-list', (data) => {
console.log('user-list', data);
activeUserIds.set(data.user_ids);
});
_socket.on('usage', (data) => {
console.log('usage', data);
USAGE_POOL.set(data['models']);
});
};
const executePythonAsWorker = async (id, code, cb) => {