mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-08-06 14:10:13 -03:00
refactor(autocomplete): remove unused custom_words and embeddings modelTypes
This commit is contained in:
@@ -45,7 +45,7 @@ export interface AutocompleteTextWidgetInterface {
|
||||
const props = defineProps<{
|
||||
widget: AutocompleteTextWidgetInterface
|
||||
node: { id: number }
|
||||
modelType?: 'loras' | 'embeddings' | 'custom_words' | 'prompt'
|
||||
modelType?: 'loras' | 'prompt'
|
||||
placeholder?: string
|
||||
showPreview?: boolean
|
||||
spellcheck?: boolean
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ref, onMounted, onUnmounted, type Ref } from 'vue'
|
||||
// Dynamic import type for AutoComplete class
|
||||
type AutoCompleteClass = new (
|
||||
inputElement: HTMLTextAreaElement,
|
||||
modelType: 'loras' | 'embeddings' | 'custom_words' | 'prompt',
|
||||
modelType: 'loras' | 'prompt',
|
||||
options?: AutocompleteOptions
|
||||
) => AutoCompleteInstance
|
||||
|
||||
@@ -29,7 +29,7 @@ export interface UseAutocompleteOptions {
|
||||
|
||||
export function useAutocomplete(
|
||||
textareaRef: Ref<HTMLTextAreaElement | null>,
|
||||
modelType: 'loras' | 'embeddings' | 'custom_words' | 'prompt' = 'loras',
|
||||
modelType: 'loras' | 'prompt' = 'loras',
|
||||
options: UseAutocompleteOptions = {}
|
||||
) {
|
||||
const autocompleteInstance = ref<AutoCompleteInstance | null>(null)
|
||||
|
||||
@@ -718,7 +718,7 @@ function createLoraInfoWidget(node: any) {
|
||||
function createAutocompleteTextWidgetFactory(
|
||||
node: any,
|
||||
widgetName: string,
|
||||
modelType: 'loras' | 'embeddings' | 'prompt',
|
||||
modelType: 'loras' | 'prompt',
|
||||
inputOptions: { placeholder?: string } = {}
|
||||
) {
|
||||
const metadataWidgetName = `__lm_autocomplete_meta_${widgetName}`
|
||||
@@ -964,13 +964,7 @@ app.registerExtension({
|
||||
const options = widgetInputOptions.get(`${node.comfyClass}:text`) || {}
|
||||
return createAutocompleteTextWidgetFactory(node, 'text', 'loras', options)
|
||||
},
|
||||
// Autocomplete text widget for embeddings (used by Prompt node)
|
||||
// @ts-ignore
|
||||
AUTOCOMPLETE_TEXT_EMBEDDINGS(node) {
|
||||
const options = widgetInputOptions.get(`${node.comfyClass}:text`) || {}
|
||||
return createAutocompleteTextWidgetFactory(node, 'text', 'embeddings', options)
|
||||
},
|
||||
// Autocomplete text widget for prompt (supports both embeddings and custom words)
|
||||
// Autocomplete text widget for prompt (used by Prompt and Text nodes)
|
||||
// @ts-ignore
|
||||
AUTOCOMPLETE_TEXT_PROMPT(node) {
|
||||
const options = widgetInputOptions.get(`${node.comfyClass}:text`) || {}
|
||||
|
||||
Reference in New Issue
Block a user