Socket
Socket
Sign inDemoInstall

sillytavern

Package Overview
Dependencies
240
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.7.0 to 1.7.1

2

package.json

@@ -51,3 +51,3 @@ {

},
"version": "1.7.0",
"version": "1.7.1",
"scripts": {

@@ -54,0 +54,0 @@ "start": "node server.js",

@@ -176,3 +176,3 @@ import { callPopup, cancelTtsPlay, eventSource, event_types, isMultigenEnabled, is_send_press, saveSettingsDebounced } from '../../../script.js'

audioElement.currentTime = 0;
audioElement.src = '/sounds/silence.mp3';
audioElement.src = '';

@@ -416,3 +416,2 @@ // Clear any queue items

if (char && !power_user.allow_name2_display) {
debugger;
const escapedChar = escapeRegex(char);

@@ -709,24 +708,2 @@ text = text.replace(new RegExp(`^${escapedChar}:`, 'gm'), '');

eventSource.on(event_types.MESSAGE_SWIPED, resetTtsPlayback);
// Mobiles need to "activate" the Audio element with click before it can be played
if (isMobile()) {
console.debug('Activating mobile audio element on first click');
let audioActivated = false;
// Play silence on first click
$(document).on('click touchend', function () {
// Prevent multiple activations
if (audioActivated) {
return;
}
console.debug('Activating audio element...');
audioActivated = true;
audioElement.src = '/sounds/silence.mp3';
// Reset volume to 1
audioElement.onended = function () {
console.debug('Audio element activated');
};
});
}
})

@@ -216,3 +216,3 @@ import {

function canUseKoboldStreaming(koboldVersion) {
if (koboldVersion.result == 'KoboldCpp') {
if (koboldVersion && koboldVersion.result == 'KoboldCpp') {
return (koboldVersion.version || '0.0').localeCompare(MIN_STREAMING_KCPPVERSION, undefined, { numeric: true, sensitivity: 'base' }) > -1;

@@ -219,0 +219,0 @@ } else return false;

@@ -266,2 +266,3 @@ import {

const isQuiet = type === 'quiet';
const isImpersonate = type === 'impersonate';
let reply = '';

@@ -271,3 +272,3 @@

console.debug('Prompt is too long, sending in chunks');
const result = await sendChunkedMessage(finalPrompt, !isQuiet, signal)
const result = await sendChunkedMessage(finalPrompt, !isQuiet, !isQuiet && !isImpersonate, signal)
reply = result.reply;

@@ -278,3 +279,3 @@ messages_to_purge = result.chunks + 1; // +1 for the reply

console.debug('Sending prompt in one message');
reply = await sendMessage(finalPrompt, !isQuiet, !isQuiet, signal);
reply = await sendMessage(finalPrompt, !isQuiet, !isQuiet && !isImpersonate, signal);
messages_to_purge = 2; // prompt and the reply

@@ -286,3 +287,3 @@ }

async function sendChunkedMessage(finalPrompt, withStreaming, signal) {
async function sendChunkedMessage(finalPrompt, withStreaming, withSuggestions, signal) {
const fastReplyPrompt = '\n[Reply to this message with a full stop only]';

@@ -298,3 +299,3 @@ const promptChunks = splitRecursive(finalPrompt, CHUNKED_PROMPT_LENGTH - fastReplyPrompt.length);

// Extract reply of the last chunk
reply = await sendMessage(promptChunk, withStreaming, true, signal);
reply = await sendMessage(promptChunk, withStreaming, withSuggestions, signal);
} else {

@@ -301,0 +302,0 @@ // Add fast reply prompt to the chunk

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc