You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: composer_message_details.rb
    path of file: ./repos/discourse/plugins/chat/spec/system/page_objects/chat/components
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module PageObjects
  module Components
    module Chat
      class ComposerMessageDetails < PageOb
    
        def has_message?(**args)
          selectors = SELECTOR
          selectors += "[data-id=\"#{args[:id]}\"]" if args[:id]
          selectors += "[data-action=\"#{args[:action]}\"]" if args[:action]
          selector_method = args[:does_not_exist] ? :has_no_selector? : :has_selector?
          predicate = component.send(selector_method, selectors)

          text_options = {}
          text_options[:text] = args[:text] if args[:text]
          text_options[:exact_text] = args[:exact_text] if args[:exact_text]
          if text_options.present?
            predicate &&=
              component.send(selector_method, "#{selectors} .chat-reply__excerpt", **text_options)
          end