Return GENERATION_STARTED to original location. Add GENERATION_AFTER_COMMANDS

7dd8229df6bd2dbac93376855bc1d077750c69d5

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +3 -3Ignore whitespace
public/script.js+3 -3
@@ -413,7 +413,7 @@ export const event_types = {
413413 MESSAGE_FILE_EMBEDDED: 'message_file_embedded',
414414 IMPERSONATE_READY: 'impersonate_ready',
415415 CHAT_CHANGED: 'chat_id_changed',
416416 GENERATION_ENTEREDGENERATION_AFTER_COMMANDS: 'generation_enteredGENERATION_AFTER_COMMANDS',
417417 GENERATION_STARTED: 'generation_started',
418418 GENERATION_STOPPED: 'generation_stopped',
419419 GENERATION_ENDED: 'generation_ended',
@@ -3346,7 +3346,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
33463346 generation_started = new Date();
33473347
33483348 // Occurs every time, even if the generation is aborted due to slash commands execution
33493349 await eventSource.emit(event_types.GENERATION_ENTEREDGENERATION_STARTED, type, { automatic_trigger, force_name2, quiet_prompt, quietToLoud, skipWIAN, force_chid, signal, quietImage }, dryRun);
33503350
33513351 // Don't recreate abort controller if signal is passed
33523352 if (!(abortController && signal)) {
@@ -3368,7 +3368,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
33683368 }
33693369
33703370 // Occurs only if the generation is not aborted due to slash commands execution
33713371 await eventSource.emit(event_types.GENERATION_STARTEDGENERATION_AFTER_COMMANDS, type, { automatic_trigger, force_name2, quiet_prompt, quietToLoud, skipWIAN, force_chid, signal, quietImage }, dryRun);
33723372
33733373 if (main_api == 'kobold' && kai_settings.streaming_kobold && !kai_flags.can_use_streaming) {
33743374 toastr.error('Streaming is enabled, but the version of Kobold used does not support token streaming.', undefined, { timeOut: 10000, preventDuplicates: true });