mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-02-23 00:14:09 +00:00
Add queue processing & callbacks
This commit is contained in:
@@ -224,6 +224,9 @@ async function syncOptions() {
|
||||
|
||||
// Apply changes
|
||||
CFG = newCFG;
|
||||
|
||||
// Callback
|
||||
processQueue(afterConfigChangeQueue, null);
|
||||
}
|
||||
|
||||
// Create the result list div and necessary styling
|
||||
@@ -359,6 +362,9 @@ function insertTextAtCursor(textArea, result, tagword) {
|
||||
}
|
||||
previousTags = tags;
|
||||
|
||||
// Callback
|
||||
processQueue(afterInsertQueue, null, tagType);
|
||||
|
||||
// If it was a yaml wildcard, also update the umiPreviousTags
|
||||
if (tagType === ResultType.yamlWildcard && originalTagword.length > 0) {
|
||||
let umiSubPrompts = [...newPrompt.matchAll(UMI_PROMPT_REGEX)];
|
||||
@@ -612,6 +618,8 @@ async function autocomplete(textArea, prompt, fixedTag = null) {
|
||||
results = [];
|
||||
tagword = tagword.toLowerCase().replace(/[\n\r]/g, "");
|
||||
|
||||
let resultCandidates = processParsers(textArea, prompt);
|
||||
|
||||
if (CFG.useWildcards && [...tagword.matchAll(WC_REGEX)].length > 0) {
|
||||
// Show wildcards from a file with that name
|
||||
wcMatch = [...tagword.matchAll(WC_REGEX)]
|
||||
@@ -1286,6 +1294,9 @@ async function setup() {
|
||||
acStyle.appendChild(document.createTextNode(css));
|
||||
}
|
||||
gradioApp().appendChild(acStyle);
|
||||
|
||||
// Callback
|
||||
processQueue(afterSetupQueue, null);
|
||||
}
|
||||
|
||||
onUiUpdate(async () => {
|
||||
|
||||
Reference in New Issue
Block a user