<commit_before>angular.module("grumbles")
  .controller "FormCtrl", ($http, Output) ->
    @submit = ->
      return unless @command

      words = @command.split ' '
      words.length = 3
      path = words.join '/'

      $http.post("/cli/#{path}")
        .success (data, status, headers, config) =>
          Output.add data
          @command = ""

        .error (data, status, headers, config) ->
          Output.add data if angular.isObject(data)

    this<commit_msg>Add command queue functionality using `&&`<commit_after>angular.module("grumbles")
  .controller "FormCtrl", ($http, Output) ->
    @commandQueue = []

    @submit = ->
      return unless @command

      @commandQueue = @command.split("&&").map (command, index) ->
        query: command.trim()
        nextIndex:  index + 1

      queryCommand @commandQueue[0]

    queryCommand = (command) =>
      return unless command

      words = command.query.split ' '
      words.length = 3
      path = words.join '/'

      $http.post("/cli/#{path}")
        .success (data, status, headers, config) =>
          Output.add data
          @command = ""

          queryCommand @commandQueue[command.nextIndex]

        .error (data, status, headers, config) =>
          Output.add data if angular.isObject(data)

          @commandQueue = []

    this
{'fraction_non_alphanumeric': 0.14167294649585532, 'fraction_numerical': 0.003014318010550113, 'mean_word_length': 2.2, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '2402901', 'n_tokens_mistral': 388, 'n_tokens_neox': 370, 'n_words': 92}