| 4028 | 4028 | async function checkPromptSize() { |
| 4029 | 4029 | console.debug('---checking Prompt size'); |
| 4030 | 4030 | setPromptString(); |
| 4031 | + const jointMessages = mesSend.map((e) => `${e.extensionPrompts.join('')}${e.message}`).join(''); |
| 4031 | 4032 | const prompt = [ |
| 4032 | 4033 | beforeScenarioAnchor, |
| 4033 | 4034 | storyString, |
| 4034 | 4035 | afterScenarioAnchor, |
| 4035 | 4036 | mesExmString, |
| 4036 | | - mesSend.map((e) => `${e.extensionPrompts.join('')}${e.message}`).join(''), |
| 4037 | + addChatsPreamble(addChatsSeparator(jointMessages)), |
| 4037 | 4038 | '\n', |
| 4038 | 4039 | generatedPromptCache, |
| 4039 | 4040 | quiet_prompt, |