<commit_before>MailPile.prototype.tag = function(msgids, tags) {};

MailPile.prototype.tag_list = function(complete) {
  $.ajax({
    url      : mailpile.api.tag_list,
    type     : 'GET',
    dataType : 'json',
    success  : function(response) {
      if (response.status === 'success') {
        complete(response.result);
      }
    }
  });
};

/* Pile - Tag Add */
MailPile.prototype.tag_add = function(tag_add, mids, complete) {
  $.ajax({
	  url			 : mailpile.api.tag,
	  type		 : 'POST',
	  data     : {
      add: tag_add,
      mid: mids
    },
	  dataType : 'json',
    success  : function(response) {
      if (response.status == 'success') {
       complete();
      } else {
        mailpile.notification(response.status, response.message);
      }
    }
  });
};


MailPile.prototype.tag_add_delete = function(tag_add, tag_del, mids, complete) {
  $.ajax({<commit_msg>Modified mailpile.tag_list JS to get list of tags<commit_after>MailPile.prototype.tag = function(msgids, tags) {};

MailPile.prototype.tag_list = function(complete) {
  $.ajax({
    url      : mailpile.api.tag_list,
    type     : 'GET',
    dataType : 'json',
    success  : function(response) {
      if (response.status === 'success') {
        complete(response.result);
      }
    }
  });
};

/* Pile - Tag Add */
MailPile.prototype.tag_add = function(tag_add, mids, complete) {
  $.ajax({
	  url			 : mailpile.api.tag,
	  type		 : 'POST',
	  data     : {
      add: tag_add,
      mid: mids
    },
	  dataType : 'json',
    success  : function(response) {
      if (response.status == 'success') {
       complete(response);
      } else {
        mailpile.notification(response.status, response.message);
      }
    }
  });
};


MailPile.prototype.tag_add_delete = function(tag_add, tag_del, mids, complete) {
  $.ajax({
{'fraction_non_alphanumeric': 0.15270121278941565, 'fraction_numerical': 0.0, 'mean_word_length': 2.4836852207293667, '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': '1337377', 'n_tokens_mistral': 632, 'n_tokens_neox': 608, 'n_words': 110}