Merge pull request #185 from Lawrr/fix-model-autocomplete
Fix autocomplete replacing embedding and lora underscores with spaces
This commit is contained in:
@@ -285,6 +285,7 @@ app.registerExtension({
|
||||
words[v] = {
|
||||
text: v,
|
||||
info: () => new EmbeddingInfoDialog(emb).show("embeddings", emb),
|
||||
use_replacer: false,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -303,6 +304,7 @@ app.registerExtension({
|
||||
words[v] = {
|
||||
text: v,
|
||||
info: () => new LoraInfoDialog(lora).show("loras", lora),
|
||||
use_replacer: false,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -576,7 +576,8 @@ export class TextAreaAutoComplete {
|
||||
onclick: () => {
|
||||
this.el.focus();
|
||||
let value = wordInfo.value ?? wordInfo.text;
|
||||
if (TextAreaAutoComplete.replacer) {
|
||||
const use_replacer = wordInfo.use_replacer ?? true;
|
||||
if (TextAreaAutoComplete.replacer && use_replacer) {
|
||||
value = TextAreaAutoComplete.replacer(value);
|
||||
}
|
||||
this.helper.insertAtCursor(value + this.separator, -before.length, wordInfo.caretOffset);
|
||||
|
||||
Reference in New Issue
Block a user