| 2907 | 2907 | */ |
| 2908 | 2908 | async function sendGenerationRequest(generationType, prompt, additionalNegativePrefix, characterName, callback, initiator, signal) { |
| 2909 | 2909 | const noCharPrefix = [generationMode.FREE, generationMode.BACKGROUND, generationMode.USER, generationMode.USER_MULTIMODAL, generationMode.FREE_EXTENDED]; |
| 2910 | | - const prefix = noCharPrefix.includes(generationType) |
| 2910 | + const isCharChat = this_chid !== undefined && !selected_group; |
| 2911 | + const ignoreNoCharForSwipe = initiator === initiators.swipe && isCharChat; |
| 2912 | + |
| 2913 | + const skipCharPrefix = !ignoreNoCharForSwipe && noCharPrefix.includes(generationType); |
| 2914 | + |
| 2915 | + const prefix = skipCharPrefix |
| 2911 | 2916 | ? extension_settings.sd.prompt_prefix |
| 2912 | 2917 | : combinePrefixes(extension_settings.sd.prompt_prefix, getCharacterPrefix()); |
| 2913 | | - const negativePrefix = noCharPrefix.includes(generationType) |
| 2918 | + |
| 2919 | + const negativePrefix = skipCharPrefix |
| 2914 | 2920 | ? extension_settings.sd.negative_prompt |
| 2915 | 2921 | : combinePrefixes(extension_settings.sd.negative_prompt, getCharacterNegativePrefix()); |
| 2916 | 2922 | |