Clean-up comments
| @@ -15,9 +15,10 @@ export const debounce_timeout = { | |||
| 15 | extended: 5000, | 15 | extended: 5000, |
| 16 | }; | 16 | }; |
| 17 | 17 | ||
| 18 | /* | 18 | /** |
| 19 | Used as an ephemeral key in message extra metadata. | 19 | * Used as an ephemeral key in message extra metadata. |
| 20 | When set, the message will be excluded from generation prompts without affecting the number of chat messages, | 20 | * When set, the message will be excluded from generation |
| 21 | which is needed to preserve world info timed effects. | 21 | * prompts without affecting the number of chat messages, |
| 22 | * which is needed to preserve world info timed effects. | ||
| 22 | */ | 23 | */ |
| 23 | export const IGNORE_SYMBOL = Symbol.for('ignore'); | 24 | export const IGNORE_SYMBOL = Symbol.for('ignore'); |
| @@ -528,7 +528,7 @@ function setOpenAIMessages(chat) { | |||
| 528 | let role = chat[j]['is_user'] ? 'user' : 'assistant'; | 528 | let role = chat[j]['is_user'] ? 'user' : 'assistant'; |
| 529 | let content = chat[j]['mes']; | 529 | let content = chat[j]['mes']; |
| 530 | 530 | ||
| 531 | // If this flag is set, completely ignore the message. | 531 | // If this symbol flag is set, completely ignore the message. |
| 532 | // This can be used to hide messages without affecting the number of messages in the chat. | 532 | // This can be used to hide messages without affecting the number of messages in the chat. |
| 533 | if (chat[j].extra?.[IGNORE_SYMBOL]) { | 533 | if (chat[j].extra?.[IGNORE_SYMBOL]) { |
| 534 | j++; | 534 | j++; |