<commit_before>class ChatConversationListController extends CommonChatController

  constructor:->
    super
    @getListView().on 'moveToIndexRequested', @bound 'moveItemToIndex'

  addItem:(data)->
    # Make sure there is one conversation with same channel name
    {conversation, chatChannel} = data
    for chat in @itemsOrdered
      return  if chat.conversation?.channel?.name is chatChannel?.name

    return  if (conversation.invitees?.length or 1) < 2

    super data

  loadItems:->
    @removeAllItems()

    chatController = KD.getSingleton 'chatController'
    {JChatConversation} = KD.remote.api
    JChatConversation.fetchSome {}, (err, conversations)=>
      warn err  if err
      for conversation in conversations
        chatController.addConversationToChatPanel \
          conversation.publicName, conversation<commit_msg>Make sure there is a conversations variable<commit_after>class ChatConversationListController extends CommonChatController

  constructor:->
    super
    @getListView().on 'moveToIndexRequested', @bound 'moveItemToIndex'

  addItem:(data)->
    # Make sure there is one conversation with same channel name
    {conversation, chatChannel} = data
    for chat in @itemsOrdered
      return  if chat.conversation?.channel?.name is chatChannel?.name

    return  if (conversation.invitees?.length or 1) < 2

    super data

  loadItems:->
    @removeAllItems()

    chatController = KD.getSingleton 'chatController'
    {JChatConversation} = KD.remote.api
    JChatConversation.fetchSome {}, (err, conversations)=>
      warn err  unless err?.message is 'Access denied.'
      conversations ?= []
      for conversation in conversations
        chatController.addConversationToChatPanel \
          conversation.publicName, conversation
{'fraction_non_alphanumeric': 0.08159819921215532, 'fraction_numerical': 0.0022509848058525606, 'mean_word_length': 3.6666666666666665, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '7154993', 'n_tokens_mistral': 482, 'n_tokens_neox': 461, 'n_words': 133}