Improve color picker example and minor code comments changes

This commit is contained in:
vitopigno
2025-06-10 00:23:51 +02:00
parent 881cf66e4e
commit c42ee5ee6f
2 changed files with 3 additions and 2 deletions

View File

@@ -111,7 +111,8 @@ public sealed partial class ChatUIController : IOnSystemChanged<CharacterInfoSys
keyword = Regex.Replace(keyword, "^\"|(?<=^@)\"", "(?<!\\w)");
}
// Make sure any name tagged as ours gets highlighted only when others say it.
// Make sure the character's name is highlighted only when mentioned directly (eg. it's said by someone),
// for example in 'Name Surname says, "..."' 'Name Surname' won't be highlighted.
keyword = Regex.Replace(keyword, "^@", @"(?<=(?<=,.*"".*)|(?<!\[Name].*))");
_highlights.Add(keyword);