| 3477 | //PRE FORMATING STRING | 3477 | //PRE FORMATING STRING |
| 3478 | //********************************* | 3478 | //********************************* |
| 3479 | | 3479 | |
| | 3480 | // These generation types should not attach pending files to the chat |
| | 3481 | const noAttachTypes = [ |
| | 3482 | 'regenerate', |
| | 3483 | 'swipe', |
| | 3484 | 'impersonate', |
| | 3485 | 'quiet', |
| | 3486 | 'continue', |
| | 3487 | 'ask_command', |
| | 3488 | ]; |
| 3480 | //for normal messages sent from user.. | 3489 | //for normal messages sent from user.. |
| 3481 | if ((textareaText != '' || hasPendingFileAttachment()) && !automatic_trigger && type !== 'quiet' && !dryRun) { | 3490 | if ((textareaText != '' || (hasPendingFileAttachment() && !noAttachTypes.includes(type))) && !automatic_trigger && type !== 'quiet' && !dryRun) { |
| 3482 | // If user message contains no text other than bias - send as a system message | 3491 | // If user message contains no text other than bias - send as a system message |
| 3483 | if (messageBias && !removeMacros(textareaText)) { | 3492 | if (messageBias && !removeMacros(textareaText)) { |
| 3484 | sendSystemMessage(system_message_types.GENERIC, ' ', { bias: messageBias }); | 3493 | sendSystemMessage(system_message_types.GENERIC, ' ', { bias: messageBias }); |