feat(initialization): add support for embeddings page type and log progress updates

This commit is contained in:
Will Miao
2025-10-04 14:11:27 +08:00
parent d9b0660611
commit 0aa6c53c1f

View File

@@ -56,6 +56,8 @@ class InitializationManager {
this.pageType = 'checkpoints';
} else if (path.includes('/loras')) {
this.pageType = 'loras';
} else if (path.includes('/embeddings')) {
this.pageType = 'embeddings';
} else {
// Default to loras if can't determine
this.pageType = 'loras';
@@ -195,6 +197,7 @@ class InitializationManager {
*/
handleProgressUpdate(data) {
if (!data) return;
console.log('Received progress update:', data);
// Check if this update is for our page type
if (data.pageType && data.pageType !== this.pageType) {
@@ -206,7 +209,8 @@ class InitializationManager {
if (!data.pageType && data.scanner_type) {
const scannerTypeToPageType = {
'lora': 'loras',
'checkpoint': 'checkpoints'
'checkpoint': 'checkpoints',
'embedding': 'embeddings'
};
if (scannerTypeToPageType[data.scanner_type] !== this.pageType) {