void (@NotNull TerminalWidget terminalWidget, @NotNull ShellStartupOptions startupOptions, boolean deferSessionStartUntilUiShown) { if (deferSessionStartUntilUiShown) { UiNotifyConnector.doWhenFirstShown(terminalWidget.getComponent(), () -> openSessionInDirectory(terminalWidget, startupOptions)); } else { openSessionInDirectory(terminalWidget, startupOptions); } }