Emit GENERATION_STARTED after processing commands

8546f498bff394a435eb467ba94a7be2574c31db

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

1 files changed, +2 -1Ignore whitespace
public/script.js+2 -1
@@ -3335,7 +3335,6 @@ function removeLastMessage() {
33353335 */
33363336export async function Generate(type, { automatic_trigger, force_name2, quiet_prompt, quietToLoud, skipWIAN, force_chid, signal, quietImage, quietName } = {}, dryRun = false) {
33373337 console.log('Generate entered');
3338- await eventSource.emit(event_types.GENERATION_STARTED, type, { automatic_trigger, force_name2, quiet_prompt, quietToLoud, skipWIAN, force_chid, signal, quietImage }, dryRun);
33393338 setGenerationProgress(0);
33403339 generation_started = new Date();
33413340
@@ -3358,6 +3357,8 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
33583357 }
33593358 }
33603359
3360+ await eventSource.emit(event_types.GENERATION_STARTED, type, { automatic_trigger, force_name2, quiet_prompt, quietToLoud, skipWIAN, force_chid, signal, quietImage }, dryRun);
3361+
33613362 if (main_api == 'kobold' && kai_settings.streaming_kobold && !kai_flags.can_use_streaming) {
33623363 toastr.error('Streaming is enabled, but the version of Kobold used does not support token streaming.', undefined, { timeOut: 10000, preventDuplicates: true });
33633364 unblockGeneration(type);