Files
a1111-sd-webui-tagcomplete/javascript/_result.js
DominikDoom 3496fa58d9 Add trigger word completion using the model-keyword extension
Works for both the built-in and user defined list
Restructure some of the python helper for path reusability
2023-07-22 12:06:00 +02:00

35 lines
732 B
JavaScript

// Result data type for cleaner use of optional completion result properties
// Type enum
const ResultType = Object.freeze({
"tag": 1,
"extra": 2,
"embedding": 3,
"wildcardTag": 4,
"wildcardFile": 5,
"yamlWildcard": 6,
"hypernetwork": 7,
"lora": 8,
"lyco": 9,
"chant": 10
});
// 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;
hash = null;
// Constructor
constructor(text, type) {
this.text = text;
this.type = type;
}
}