mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-01-26 19:19:57 +00:00
27 lines
551 B
JavaScript
27 lines
551 B
JavaScript
// Type enum
|
|
const ResultType = Object.freeze({
|
|
"tag": 1,
|
|
"embedding": 2,
|
|
"wildcardTag": 3,
|
|
"wildcardFile": 4,
|
|
"yamlWildcard": 5
|
|
});
|
|
|
|
// Class to hold result data and annotations to make it clearer to use
|
|
class AutocompleteResult {
|
|
// Main properties
|
|
text = "";
|
|
type = ResultType.tag;
|
|
|
|
// Additional info, only used in some cases
|
|
category = null;
|
|
count = null;
|
|
aliases = null;
|
|
meta = null;
|
|
|
|
// Constructor
|
|
constructor(text, type) {
|
|
this.text = text;
|
|
this.type = type;
|
|
}
|
|
} |