code: def add_console_message(self, message_type, message):
          
          for m in message.split("\n"):
              if m.strip():
                  self.console_messages.append((message_type, m))
docs: add messages in the console_messages list