<commit_before>module Agents
  class WunderlistAgent < Agent
    include FormConfigurable
    include Oauthable
    valid_oauth_providers :wunderlist

    cannot_be_scheduled!

    description <<-MD
      The WunderlistAgent creates new new tasks based on the incoming event.

      To be able to use this Agent you need to authenticate with Wunderlist in the [Services](/services) section first.

    MD

    def default_options
      {
        'list_id' => '',
        'title' => '{{title}}'
      }
    end

    form_configurable :list_id, roles: :completable
    form_configurable :title

    def complete_list_id
      response = request_guard do
        HTTParty.get lists_url, request_options<commit_msg>Added gem_dependency_check<commit_after>module Agents
  class WunderlistAgent < Agent
    include FormConfigurable
    include Oauthable
    valid_oauth_providers :wunderlist

    cannot_be_scheduled!

    gem_dependency_check { Devise.omniauth_providers.include?(:wunderlist) }

    description <<-MD
      #{'## Include the `omniauth-wunderlist` gem in your `Gemfile` and set `WUNDERLIST_OAUTH_KEY` and `WUNDERLIST_OAUTH_SECRET` in your environment to use this Agent' if dependencies_missing?}

      The WunderlistAgent creates new new tasks based on the incoming event.

      To be able to use this Agent you need to authenticate with Wunderlist in the [Services](/services) section first.

    MD

    def default_options
      {
        'list_id' => '',
        'title' => '{{title}}'
      }
    end

    form_configurable :list_id, roles: :completable
    form_configurable :title

    def complete_list_id
      response = request_guard do
        HTTParty.get lists_url, request_options
{'fraction_non_alphanumeric': 0.06498829039812647, 'fraction_numerical': 0.0, 'mean_word_length': 3.199017199017199, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '2255106', 'n_tokens_mistral': 516, 'n_tokens_neox': 486, 'n_words': 151}