mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'dev' of https://github.com/SillyLossy/TavernAI into dev
This commit is contained in:
@ -283,9 +283,8 @@ const system_messages = {
|
|||||||
mes: [
|
mes: [
|
||||||
'Hi there! The following chat formatting commands are supported:',
|
'Hi there! The following chat formatting commands are supported:',
|
||||||
'<ol>',
|
'<ol>',
|
||||||
'<li><tt>*text*</tt> – format the actions that your character does</li>',
|
'<li><tt>{{text}}</tt> – sets a permanent behavioral bias for the AI</li>',
|
||||||
'<li><tt>{{text}}</tt> – set the behavioral bias for the AI character</li>',
|
'<li><tt>{{}}</tt> – removes any active character bias</li>',
|
||||||
'<li><tt>{{}}</tt> – cancel a previously set bias</li>',
|
|
||||||
'</ol>',
|
'</ol>',
|
||||||
].join('')
|
].join('')
|
||||||
},
|
},
|
||||||
@ -5334,16 +5333,16 @@ $(document).ready(function () {
|
|||||||
try {
|
try {
|
||||||
var edit_mes_id = $(this).closest(".mes").attr("mesid");
|
var edit_mes_id = $(this).closest(".mes").attr("mesid");
|
||||||
var text = chat[edit_mes_id]["mes"];
|
var text = chat[edit_mes_id]["mes"];
|
||||||
navigator.clipboard.writeText(text);
|
navigator.clipboard.writeText(text);
|
||||||
const copiedMsg = document.createElement("div");
|
const copiedMsg = document.createElement("div");
|
||||||
copiedMsg.classList.add('code-copied');
|
copiedMsg.classList.add('code-copied');
|
||||||
copiedMsg.innerText = "Copied!";
|
copiedMsg.innerText = "Copied!";
|
||||||
copiedMsg.style.top = `${event.clientY - 55}px`;
|
copiedMsg.style.top = `${event.clientY - 55}px`;
|
||||||
copiedMsg.style.left = `${event.clientX - 55}px`;
|
copiedMsg.style.left = `${event.clientX - 55}px`;
|
||||||
document.body.append(copiedMsg);
|
document.body.append(copiedMsg);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
document.body.removeChild(copiedMsg);
|
document.body.removeChild(copiedMsg);
|
||||||
}, 1000);
|
}, 1000);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Failed to copy: ', err);
|
console.error('Failed to copy: ', err);
|
||||||
}
|
}
|
||||||
|
@ -34,11 +34,11 @@ const generationMode = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const triggerWords = {
|
const triggerWords = {
|
||||||
[generationMode.CHARACTER]: ['yourself', 'you', 'bot', 'AI', 'character'],
|
[generationMode.CHARACTER]: ['you'],
|
||||||
[generationMode.USER]: ['me', 'user', 'myself'],
|
[generationMode.USER]: ['me'],
|
||||||
[generationMode.SCENARIO]: ['scenario', 'world', 'surroundings', 'scenery'],
|
[generationMode.SCENARIO]: ['scene'],
|
||||||
[generationMode.NOW]: ['now', 'last'],
|
[generationMode.NOW]: ['last'],
|
||||||
[generationMode.FACE]: ['selfie', 'face'],
|
[generationMode.FACE]: ['face'],
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,15 +58,16 @@ const quietPrompts = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const helpString = [
|
const helpString = [
|
||||||
`${m('what')} – requests an SD generation. Supported "what" arguments:`,
|
`${m('(argument)')} – requests SD to make an image. Supported arguments:`,
|
||||||
'<ul>',
|
'<ul>',
|
||||||
`<li>${m(j(triggerWords[generationMode.CHARACTER]))} – AI character image</li>`,
|
`<li>${m(j(triggerWords[generationMode.CHARACTER]))} – AI character full body selfie</li>`,
|
||||||
`<li>${m(j(triggerWords[generationMode.USER]))} – user character image</li>`,
|
`<li>${m(j(triggerWords[generationMode.FACE]))} – AI character face-only selfie</li>`,
|
||||||
`<li>${m(j(triggerWords[generationMode.SCENARIO]))} – world scenario image</li>`,
|
`<li>${m(j(triggerWords[generationMode.USER]))} – user character full body selfie</li>`,
|
||||||
`<li>${m(j(triggerWords[generationMode.FACE]))} – character face-up selfie image</li>`,
|
`<li>${m(j(triggerWords[generationMode.SCENARIO]))} – visual recap of the whole chat scenario</li>`,
|
||||||
`<li>${m(j(triggerWords[generationMode.NOW]))} – visual recap of the last chat message</li>`,
|
`<li>${m(j(triggerWords[generationMode.NOW]))} – visual recap of the last chat message</li>`,
|
||||||
'</ul>',
|
'</ul>',
|
||||||
`Anything else would trigger a "free mode" with AI describing whatever you prompted.`,
|
`Anything else would trigger a "free mode" to make SD generate whatever you prompted.<Br>
|
||||||
|
example: '/sd apple tree' would generate a picture of an apple tree.`,
|
||||||
].join('<br>');
|
].join('<br>');
|
||||||
|
|
||||||
const defaultSettings = {
|
const defaultSettings = {
|
||||||
@ -422,7 +423,7 @@ $("#sd_dropdown [id]").on("click", function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
jQuery(async () => {
|
jQuery(async () => {
|
||||||
getContext().registerSlashCommand('sd', generatePicture, ['picture', 'image'], helpString, true, true);
|
getContext().registerSlashCommand('sd', generatePicture, [], helpString, true, true);
|
||||||
|
|
||||||
const settingsHtml = `
|
const settingsHtml = `
|
||||||
<div class="sd_settings">
|
<div class="sd_settings">
|
||||||
|
Reference in New Issue
Block a user