def parse_text_input(text_input):
    """
    Parses the text input received over the client's websocket connection.

    Returns:
        (input_type (str), params (list))
    """
    tokens = text_input.strip().split("|")
    if len(tokens) == 1:
        inp_type = "rawtext"
        params = tokens
    else:
        inp_type = tokens[1].lower()
        params = tokens[2:]
    return inp_type, params