<commit_before>.panel.right.animated(
    ng-show="client.isConnected()"
    ng-class="{ 'full': showFullChat, 'fadeOutRightBig': justLoggedOut }"
)
    
    ap-chat#chat(
        ap-drop="onDropUpload"
        ap-onscrolltop="loadBackMessages"
    )
        
        table#chat-table.table(ng-show="!showSettings")

            //- Messages
            tr.animated.fadeIn(ng-repeat="message in selectedChat.messages")
                //- avatar for remote party
                td(width="60px")
                    img.img-circle(
                        style="width: 48px"
                        ap-avatar email="message.from.email"
                        ng-click="switchChat(message.from._id)"
                        ng-class="{ clickable: message.from._id !== account._id }"
                    )

                td
                    h6 {{ message.from.display }}
                    ap-message(ap-content="message.content.text" ap-file="message.file")
                td.align-right(width="90px")
                    small: small.help-block {{ message.created | readableDate }}
            tr.chatstate
                td(colspan="3" width="100%")
                    

        //- Settings panel
        #settings.animated.fadeIn(ng-show="showSettings")
            include settings.jade

    .textarea-container(ng-show="selectedChat && selectedChat._id && !showSettings")
        .chatstate
            //- display when someone is typing
            img.img-circle(
                ng-repeat="(key, obj) in selectedChat.chatstate" ng-if="obj"
                style="width: 24px"
                ap-avatar email="recents[key].email"
                ng-class="{ 'animated swing infinite': obj.value === 'composing' }"
            )
        mentio-menu#macros(
            mentio-typed-text="typedTerm"
            mentio-search="searchMacros(term)"
            mentio-select="selectedMacro(item)"
            mentio-for="'textInput'"
            mentio-trigger-char="':'"
            mentio-template-url="/partials/macros.html"
            mentio-items="macros | filter:label:typedTerm"
        )
        mentio-menu#mentions(
            mentio-typed-text="typedTerm"
            mentio-search="getMentionList(term)"
            mentio-select="selectedMention(item)"
            mentio-for="'textInput'"
            mentio-trigger-char="'@'"
            mentio-template-url="/partials/mentions.html"
            mentio-items="allRecents"
        )
        button.btn.btn-default(
            ap-upload="onDropUpload"
        ): i.fa.fa-upload
        textarea#textInput(
            ng-model="textInput"
            placeholder="Type text, markdown, paste images, or drag files"
            ap-enter="sendMessage(textInput); textInput = '';"
            ap-paste="onPasteUpload"
            ap-drop="onDropUpload"
            ng-keyup="isTyping()"
            
            mentio
            autocomplete="off"
        )



    //- Notifications

    .notify(ng-show="(activeCall && !hideCallPanel) || pendingUploads")<commit_msg>no more multiple messages with same avatar<commit_after>.panel.right.animated(
    ng-show="client.isConnected()"
    ng-class="{ 'full': showFullChat, 'fadeOutRightBig': justLoggedOut }"
)
    
    ap-chat#chat(
        ap-drop="onDropUpload"
        ap-onscrolltop="loadBackMessages"
    )
        
        table#chat-table.table(ng-show="!showSettings")

            //- Messages
            tr.animated.fadeInUp.faster(ng-repeat="message in selectedChat.messages" ng-init="notSameFrom = message.from._id !== selectedChat.messages[$index -1].from._id")
                //- avatar for remote party
                td(width="60px")
                    img.img-circle(
                        style="width: 48px"
                        ap-avatar email="message.from.email"
                        ng-click="switchChat(message.from._id)"
                        ng-class="{ clickable: message.from._id !== account._id }"
                        ng-if="notSameFrom"
                    )

                td
                    h6(ng-if="notSameFrom") {{ message.from.display }}
                    ap-message(ap-content="message.content.text" ap-file="message.file")
                td.align-right(width="90px")
                    small: small.help-block {{ message.created | readableDate }}
                    

        //- Settings panel
        #settings.animated.fadeIn(ng-show="showSettings")
            include settings.jade

    .textarea-container(ng-show="selectedChat && selectedChat._id && !showSettings")
        
        //- display when someone is typing
        .chatstate
            img.img-circle(
                ng-repeat="(key, obj) in selectedChat.chatstate" ng-if="obj"
                style="width: 24px"
                ap-avatar email="recents[key].email"
                ng-class="{ 'animated swing infinite': obj.value === 'composing' }"
            )

        //- Macros
        mentio-menu#macros(
            mentio-typed-text="typedTerm"
            mentio-search="searchMacros(term)"
            mentio-select="selectedMacro(item)"
            mentio-for="'textInput'"
            mentio-trigger-char="':'"
            mentio-template-url="/partials/macros.html"
            mentio-items="macros | filter:label:typedTerm"
        )

        //- Mentioning somebody with @
        mentio-menu#mentions(
            mentio-typed-text="typedTerm"
            mentio-search="getMentionList(term)"
            mentio-select="selectedMention(item)"
            mentio-for="'textInput'"
            mentio-trigger-char="'@'"
            mentio-template-url="/partials/mentions.html"
            mentio-items="allRecents"
        )
        button.btn.btn-default(
            ap-upload="onDropUpload"
        ): i.fa.fa-upload
        textarea#textInput(
            ng-model="textInput"
            placeholder="Type text, markdown, paste images, or drag files"
            ap-enter="sendMessage(textInput); textInput = '';"
            ap-paste="onPasteUpload"
            ap-drop="onDropUpload"
            ng-keyup="isTyping()"
            
            mentio
            autocomplete="off"
        )



    //- Notifications

    .notify(ng-show="(activeCall && !hideCallPanel) || pendingUploads")
{'fraction_non_alphanumeric': 0.12892430278884462, 'fraction_numerical': 0.0036653386454183266, 'mean_word_length': 1.6548223350253808, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3274937', 'n_tokens_mistral': 1820, 'n_tokens_neox': 1715, 'n_words': 239}