mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
- Change `STRING` input type to `AUTOCOMPLETE_TEXT_LORAS` in LoraManagerLoader, LoraStacker, and WanVideoLoraSelectLM nodes for LoRA syntax input - Change `STRING` input type to `AUTOCOMPLETE_TEXT_EMBEDDINGS` in PromptLoraManager node for prompt input - Remove manual multiline, autocomplete, and dynamicPrompts configurations in favor of built-in autocomplete types - Update placeholder text for consistency across nodes - Remove unused `setupInputWidgetWithAutocomplete` mock from frontend tests - Add Vue app cleanup logic to prevent memory leaks in widget management
21 lines
603 B
JavaScript
21 lines
603 B
JavaScript
import { app } from "../../scripts/app.js";
|
|
import { chainCallback } from "./utils.js";
|
|
|
|
app.registerExtension({
|
|
name: "LoraManager.Prompt",
|
|
|
|
async beforeRegisterNodeDef(nodeType) {
|
|
if (nodeType.comfyClass === "Prompt (LoraManager)") {
|
|
chainCallback(nodeType.prototype, "onNodeCreated", function () {
|
|
this.serialize_widgets = true;
|
|
|
|
// Get the text input widget (AUTOCOMPLETE_TEXT_EMBEDDINGS type, created by Vue widgets)
|
|
const inputWidget = this.widgets?.[0];
|
|
if (inputWidget) {
|
|
this.inputWidget = inputWidget;
|
|
}
|
|
});
|
|
}
|
|
},
|
|
});
|