mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-05-06 16:36:45 -03:00
feat(prompt): expand wildcards at runtime (#895)
This commit is contained in:
20
web/comfyui/autocomplete_wildcards.js
Normal file
20
web/comfyui/autocomplete_wildcards.js
Normal file
@@ -0,0 +1,20 @@
|
||||
export const WILDCARD_COMMANDS = {
|
||||
'/wild': { type: 'wildcard', label: 'Wildcards' },
|
||||
'/wildcard': { type: 'wildcard', label: 'Wildcards' },
|
||||
};
|
||||
|
||||
export function isWildcardCommand(command) {
|
||||
return command?.type === 'wildcard';
|
||||
}
|
||||
|
||||
export function getWildcardSearchEndpoint() {
|
||||
return '/lm/wildcards/search';
|
||||
}
|
||||
|
||||
export function getWildcardInsertText(relativePath = '') {
|
||||
const trimmed = typeof relativePath === 'string' ? relativePath.trim() : '';
|
||||
if (!trimmed) {
|
||||
return '';
|
||||
}
|
||||
return `__${trimmed}__`;
|
||||
}
|
||||
Reference in New Issue
Block a user