mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
refactor: consolidate model API client creation into a factory function for better maintainability feat: implement move operations for LoRAs and handle unsupported operations for Checkpoints and Embeddings
31 lines
962 B
JavaScript
31 lines
962 B
JavaScript
import { BaseModelApiClient } from './baseModelApi.js';
|
|
import { showToast } from '../utils/uiHelpers.js';
|
|
|
|
/**
|
|
* Embedding-specific API client
|
|
*/
|
|
export class EmbeddingApiClient extends BaseModelApiClient {
|
|
/**
|
|
* Move a single embedding to target path
|
|
*/
|
|
async moveSingleModel(filePath, targetPath) {
|
|
if (filePath.substring(0, filePath.lastIndexOf('/')) === targetPath) {
|
|
showToast('Embedding is already in the selected folder', 'info');
|
|
return null;
|
|
}
|
|
|
|
// TODO: Implement embedding move endpoint when available
|
|
showToast('Moving embeddings is not yet implemented', 'info');
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* Move multiple embeddings to target path
|
|
*/
|
|
async moveBulkModels(filePaths, targetPath) {
|
|
// TODO: Implement embedding bulk move endpoint when available
|
|
showToast('Moving embeddings is not yet implemented', 'info');
|
|
return [];
|
|
}
|
|
}
|