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