Clean-up comments

This commit is contained in:
Cohee
2025-03-27 20:46:27 +02:00
parent dac5f6910c
commit de091daa40
2 changed files with 6 additions and 5 deletions

View File

@ -15,9 +15,10 @@ export const debounce_timeout = {
extended: 5000, extended: 5000,
}; };
/* /**
Used as an ephemeral key in message extra metadata. * Used as an ephemeral key in message extra metadata.
When set, the message will be excluded from generation prompts without affecting the number of chat messages, * When set, the message will be excluded from generation
which is needed to preserve world info timed effects. * prompts without affecting the number of chat messages,
* which is needed to preserve world info timed effects.
*/ */
export const IGNORE_SYMBOL = Symbol.for('ignore'); export const IGNORE_SYMBOL = Symbol.for('ignore');

View File

@ -528,7 +528,7 @@ function setOpenAIMessages(chat) {
let role = chat[j]['is_user'] ? 'user' : 'assistant'; let role = chat[j]['is_user'] ? 'user' : 'assistant';
let content = chat[j]['mes']; let content = chat[j]['mes'];
// If this flag is set, completely ignore the message. // If this symbol flag is set, completely ignore the message.
// This can be used to hide messages without affecting the number of messages in the chat. // This can be used to hide messages without affecting the number of messages in the chat.
if (chat[j].extra?.[IGNORE_SYMBOL]) { if (chat[j].extra?.[IGNORE_SYMBOL]) {
j++; j++;