private static boolean startsWithClearScreen(@NotNull String text) {
    // ConPTY will randomly send these commands at any time, so we should skip them:
    int offset = 0;
    while (text.startsWith(MAKE_CURSOR_INVISIBLE, offset) || text.startsWith(MAKE_CURSOR_VISIBLE, offset)) {
      offset += MAKE_CURSOR_INVISIBLE.length();
    }

    return text.startsWith(CLEAR_SCREEN, offset);
  }
private static boolean startsWithClearScreen(@NotNull String text)