This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Claude Chat Formatter | |
* | |
* This script is designed to enhance the readability and distinction of messages in the Claude chat interface by either | |
* prepending labels to messages or wrapping messages in custom XML-like tags. It's particularly useful for clearly | |
* distinguishing between user and AI messages, making it easier to copy and paste the conversation with clear attribution. | |
* | |
* Functionality: | |
* - `prependLabels()`: Prepends a label indicating "user:" or "ai:" at the start of each message. | |
* - `tagMessages()`: Wraps each message with custom XML-like tags, <user>...</user> for user messages and <ai>...</ai> for AI messages. |