<commit_before>export const searchMixin = {

  created () {
  },

  mounted () {
  },

  beforeDestroy () {
  },

  computed: {

  },

  methods: {
    setSearchFromUrl () {
      const searchQuery = this.searchField.getValue()
      const searchFromUrl = this.$route.query.search
      if (!searchQuery && searchFromUrl) {
        this.searchField.setValue(searchFromUrl)
      }
    },

    setSearchInUrl () {
      const searchQuery = this.searchField.getValue()
      this.$router.push({
        query: {
          search: searchQuery
        }
      })
    },<commit_msg>Do not store search twice in URL if not needed<commit_after>export const searchMixin = {

  created () {
  },

  mounted () {
  },

  beforeDestroy () {
  },

  computed: {

  },

  methods: {
    setSearchFromUrl () {
      const searchQuery = this.searchField.getValue()
      const searchFromUrl = this.$route.query.search
      if (!searchQuery && searchFromUrl) {
        this.searchField.setValue(searchFromUrl)
      }
    },

    setSearchInUrl () {
      const searchQuery = this.searchField.getValue()
      if (this.$route.query.search !== searchQuery) {
        this.$router.push({
          query: {
            search: searchQuery
          }
        })
      }
    },
{'fraction_non_alphanumeric': 0.12470214455917394, 'fraction_numerical': 0.0, 'mean_word_length': 2.095823095823096, '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': '3374655', 'n_tokens_mistral': 380, 'n_tokens_neox': 369, 'n_words': 66}