mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-05-06 08:26:45 -03:00
21 lines
542 B
JavaScript
21 lines
542 B
JavaScript
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}__`;
|
|
}
|