mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'staging' into delete-newbie-mode
This commit is contained in:
@ -452,7 +452,9 @@ export const event_types = {
|
||||
// TODO: Naming convention is inconsistent with other events
|
||||
CHARACTER_DELETED: 'characterDeleted',
|
||||
CHARACTER_DUPLICATED: 'character_duplicated',
|
||||
SMOOTH_STREAM_TOKEN_RECEIVED: 'smooth_stream_token_received',
|
||||
/** @deprecated The event is aliased to STREAM_TOKEN_RECEIVED. */
|
||||
SMOOTH_STREAM_TOKEN_RECEIVED: 'stream_token_received',
|
||||
STREAM_TOKEN_RECEIVED: 'stream_token_received',
|
||||
FILE_ATTACHMENT_DELETED: 'file_attachment_deleted',
|
||||
WORLDINFO_FORCE_ACTIVATE: 'worldinfo_force_activate',
|
||||
OPEN_CHARACTER_LIBRARY: 'open_character_library',
|
||||
@ -3120,6 +3122,7 @@ class StreamingProcessor {
|
||||
if (logprobs) {
|
||||
this.messageLogprobs.push(...(Array.isArray(logprobs) ? logprobs : [logprobs]));
|
||||
}
|
||||
await eventSource.emit(event_types.STREAM_TOKEN_RECEIVED, text);
|
||||
await sw.tick(() => this.onProgressStreaming(this.messageId, this.continueMessage + text));
|
||||
}
|
||||
const seconds = (timestamps[timestamps.length - 1] - timestamps[0]) / 1000;
|
||||
@ -10136,7 +10139,7 @@ jQuery(async function () {
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.mes_edit_cancel', function () {
|
||||
$(document).on('click', '.mes_edit_cancel', async function () {
|
||||
let text = chat[this_edit_mes_id]['mes'];
|
||||
|
||||
$(this).closest('.mes_block').find('.mes_text').empty();
|
||||
@ -10154,6 +10157,8 @@ jQuery(async function () {
|
||||
));
|
||||
appendMediaToMessage(chat[this_edit_mes_id], $(this).closest('.mes'));
|
||||
addCopyToCodeBlocks($(this).closest('.mes'));
|
||||
|
||||
await eventSource.emit(event_types.MESSAGE_UPDATED, this_edit_mes_id);
|
||||
this_edit_mes_id = undefined;
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user