Merge branch 'staging' into tokenizer-renames
This commit is contained in:
commit
8476ec7570
|
@ -636,9 +636,9 @@ function generateQuickReplyElements() {
|
||||||
$('#quickReplyContainer').empty().append(quickReplyHtml);
|
$('#quickReplyContainer').empty().append(quickReplyHtml);
|
||||||
|
|
||||||
for (let i = 1; i <= extension_settings.quickReply.numberOfSlots; i++) {
|
for (let i = 1; i <= extension_settings.quickReply.numberOfSlots; i++) {
|
||||||
$(`#quickReply${i}Mes`).on('input', function () { onQuickReplyInput(i); });
|
$(`#quickReply${i}Mes`).on('input', function () { onQuickReplyInput(this.closest('[data-order]').getAttribute('data-order')); });
|
||||||
$(`#quickReply${i}Label`).on('input', function () { onQuickReplyLabelInput(i); });
|
$(`#quickReply${i}Label`).on('input', function () { onQuickReplyLabelInput(this.closest('[data-order]').getAttribute('data-order')); });
|
||||||
$(`#quickReply${i}CtxButton`).on('click', function () { onQuickReplyCtxButtonClick(i); });
|
$(`#quickReply${i}CtxButton`).on('click', function () { onQuickReplyCtxButtonClick(this.closest('[data-order]').getAttribute('data-order')); });
|
||||||
$(`#quickReplyContainer > [data-order="${i}"]`).attr('data-contextMenu', JSON.stringify(extension_settings.quickReply.quickReplySlots[i - 1]?.contextMenu ?? []));
|
$(`#quickReplyContainer > [data-order="${i}"]`).attr('data-contextMenu', JSON.stringify(extension_settings.quickReply.quickReplySlots[i - 1]?.contextMenu ?? []));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -692,9 +692,11 @@ function saveQROrder() {
|
||||||
//update html-level order data to match new sort
|
//update html-level order data to match new sort
|
||||||
let i = 1;
|
let i = 1;
|
||||||
$('#quickReplyContainer').children().each(function () {
|
$('#quickReplyContainer').children().each(function () {
|
||||||
|
const oldOrder = $(this).attr('data-order');
|
||||||
$(this).attr('data-order', i);
|
$(this).attr('data-order', i);
|
||||||
$(this).find('input').attr('id', `quickReply${i}Label`);
|
$(this).find('input').attr('id', `quickReply${i}Label`);
|
||||||
$(this).find('textarea').attr('id', `quickReply${i}Mes`);
|
$(this).find('textarea').attr('id', `quickReply${i}Mes`);
|
||||||
|
$(this).find(`#quickReply${oldOrder}CtxButton`).attr('id', `quickReply${i}CtxButton`);
|
||||||
i++;
|
i++;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ function updateSecretDisplay() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function viewSecrets() {
|
async function viewSecrets() {
|
||||||
const response = await fetch('/viewsecrets', {
|
const response = await fetch('/api/secrets/view', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: getRequestHeaders(),
|
headers: getRequestHeaders(),
|
||||||
});
|
});
|
||||||
|
|
|
@ -1374,6 +1374,7 @@ const newEntryTemplate = {
|
||||||
probability: 100,
|
probability: 100,
|
||||||
useProbability: true,
|
useProbability: true,
|
||||||
depth: DEFAULT_DEPTH,
|
depth: DEFAULT_DEPTH,
|
||||||
|
group: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
function createWorldInfoEntry(name, data, fromSlashCommand = false) {
|
function createWorldInfoEntry(name, data, fromSlashCommand = false) {
|
||||||
|
@ -1970,6 +1971,7 @@ function convertAgnaiMemoryBook(inputObj) {
|
||||||
displayIndex: index,
|
displayIndex: index,
|
||||||
probability: null,
|
probability: null,
|
||||||
useProbability: false,
|
useProbability: false,
|
||||||
|
group: '',
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1996,6 +1998,7 @@ function convertRisuLorebook(inputObj) {
|
||||||
displayIndex: index,
|
displayIndex: index,
|
||||||
probability: entry.activationPercent ?? null,
|
probability: entry.activationPercent ?? null,
|
||||||
useProbability: entry.activationPercent ?? false,
|
useProbability: entry.activationPercent ?? false,
|
||||||
|
group: '',
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -2027,6 +2030,7 @@ function convertNovelLorebook(inputObj) {
|
||||||
displayIndex: index,
|
displayIndex: index,
|
||||||
probability: null,
|
probability: null,
|
||||||
useProbability: false,
|
useProbability: false,
|
||||||
|
group: '',
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -2060,6 +2064,7 @@ function convertCharacterBook(characterBook) {
|
||||||
useProbability: entry.extensions?.useProbability ?? false,
|
useProbability: entry.extensions?.useProbability ?? false,
|
||||||
depth: entry.extensions?.depth ?? DEFAULT_DEPTH,
|
depth: entry.extensions?.depth ?? DEFAULT_DEPTH,
|
||||||
selectiveLogic: entry.extensions?.selectiveLogic ?? 0,
|
selectiveLogic: entry.extensions?.selectiveLogic ?? 0,
|
||||||
|
group: entry.extensions?.group ?? '',
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1876,6 +1876,7 @@ function convertWorldInfoToCharacterBook(name, entries) {
|
||||||
useProbability: entry.useProbability ?? false,
|
useProbability: entry.useProbability ?? false,
|
||||||
depth: entry.depth ?? 4,
|
depth: entry.depth ?? 4,
|
||||||
selectiveLogic: entry.selectiveLogic ?? 0,
|
selectiveLogic: entry.selectiveLogic ?? 0,
|
||||||
|
group: entry.group ?? '',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,7 @@ function registerEndpoints(app, jsonParser) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
app.post('/viewsecrets', jsonParser, async (_, response) => {
|
app.post('/api/secrets/view', jsonParser, async (_, response) => {
|
||||||
const allowKeysExposure = getConfigValue('allowKeysExposure', false);
|
const allowKeysExposure = getConfigValue('allowKeysExposure', false);
|
||||||
|
|
||||||
if (!allowKeysExposure) {
|
if (!allowKeysExposure) {
|
||||||
|
|
Loading…
Reference in New Issue