Emit GENERATION_STARTED after processing commands

8546f498bff394a435eb467ba94a7be2574c31db

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

1 files changed, +2 -1Showing whitespace changes
public/script.js+2 -1
@@ -3335,7 +3335,6 @@ function removeLastMessage() {
3335 */3335 */
3336export async function Generate(type, { automatic_trigger, force_name2, quiet_prompt, quietToLoud, skipWIAN, force_chid, signal, quietImage, quietName } = {}, dryRun = false) {3336export async function Generate(type, { automatic_trigger, force_name2, quiet_prompt, quietToLoud, skipWIAN, force_chid, signal, quietImage, quietName } = {}, dryRun = false) {
3337 console.log('Generate entered');3337 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);
3339 setGenerationProgress(0);3338 setGenerationProgress(0);
3340 generation_started = new Date();3339 generation_started = new Date();
33413340
@@ -3358,6 +3357,8 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
3358 }3357 }
3359 }3358 }
33603359
3360 await eventSource.emit(event_types.GENERATION_STARTED, type, { automatic_trigger, force_name2, quiet_prompt, quietToLoud, skipWIAN, force_chid, signal, quietImage }, dryRun);
3361
3361 if (main_api == 'kobold' && kai_settings.streaming_kobold && !kai_flags.can_use_streaming) {3362 if (main_api == 'kobold' && kai_settings.streaming_kobold && !kai_flags.can_use_streaming) {
3362 toastr.error('Streaming is enabled, but the version of Kobold used does not support token streaming.', undefined, { timeOut: 10000, preventDuplicates: true });3363 toastr.error('Streaming is enabled, but the version of Kobold used does not support token streaming.', undefined, { timeOut: 10000, preventDuplicates: true });
3363 unblockGeneration(type);3364 unblockGeneration(type);