private static @NotNull CompletableFuture<TermSize> awaitTermSize(@NotNull TerminalWidget terminalWidget,
                                                                    @NotNull ShellStartupOptions configuredOptions) {
    if (terminalWidget instanceof TerminalWidgetImpl terminalWidgetImpl) {
      return terminalWidgetImpl.initialize(configuredOptions);
    }
    var future = TerminalUiUtils.INSTANCE.getComponentSizeInitializedFuture(terminalWidget.getComponent());
    TerminalUiUtils.INSTANCE.cancelFutureByTimeout(future, 2000, terminalWidget);
    return future.thenApply(v -> {
      return terminalWidget.getTermSize();
    });
  }
private static @NotNull CompletableFuture<TermSize> awaitTermSize(@NotNull TerminalWidget terminalWidget,
                                                                    @NotNull ShellStartupOptions configuredOptions)