feat(ui): allow immediate user input during startup (#23661)

This commit is contained in:
Sehoon Shon
2026-03-24 09:33:17 -04:00
committed by GitHub
parent dcedc42979
commit 893c7d3880
2 changed files with 13 additions and 12 deletions
+11 -6
View File
@@ -700,7 +700,10 @@ export const AppContainer = (props: AppContainerProps) => {
// Derive auth state variables for backward compatibility with UIStateContext // Derive auth state variables for backward compatibility with UIStateContext
const isAuthDialogOpen = authState === AuthState.Updating; const isAuthDialogOpen = authState === AuthState.Updating;
const isAuthenticating = authState === AuthState.Unauthenticated; // TODO: Consider handling other auth types that should also skip the blocking screen
const isAuthenticating =
authState === AuthState.Unauthenticated &&
settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
// Session browser and resume functionality // Session browser and resume functionality
const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized(); const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
@@ -1300,7 +1303,8 @@ Logging in with Google... Restarting Gemini CLI to continue.
return; return;
} }
if (isSlash || (isIdle && isMcpReady)) { const isMcpOrConfigReady = isConfigInitialized && isMcpReady;
if ((isSlash && isConfigInitialized) || (isIdle && isMcpOrConfigReady)) {
if (!isSlash) { if (!isSlash) {
const permissions = await checkPermissions(submittedValue, config); const permissions = await checkPermissions(submittedValue, config);
if (permissions.length > 0) { if (permissions.length > 0) {
@@ -1323,10 +1327,12 @@ Logging in with Google... Restarting Gemini CLI to continue.
void submitQuery(submittedValue); void submitQuery(submittedValue);
} else { } else {
// Check messageQueue.length === 0 to only notify on the first queued item // Check messageQueue.length === 0 to only notify on the first queued item
if (isIdle && !isMcpReady && messageQueue.length === 0) { if (isIdle && !isMcpOrConfigReady && messageQueue.length === 0) {
coreEvents.emitFeedback( coreEvents.emitFeedback(
'info', 'info',
'Waiting for MCP servers to initialize... Slash commands are still available and prompts will be queued.', !isConfigInitialized
? 'Initializing... Prompts will be queued.'
: 'Waiting for MCP servers to initialize... Slash commands are still available and prompts will be queued.',
); );
} }
addMessage(submittedValue); addMessage(submittedValue);
@@ -1350,6 +1356,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
refreshStatic, refreshStatic,
reset, reset,
handleHintSubmit, handleHintSubmit,
isConfigInitialized,
triggerExpandHint, triggerExpandHint,
], ],
); );
@@ -1380,11 +1387,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
* - Any future streaming states not explicitly allowed * - Any future streaming states not explicitly allowed
*/ */
const isInputActive = const isInputActive =
isConfigInitialized &&
!initError && !initError &&
!isProcessing && !isProcessing &&
!isResuming && !isResuming &&
!!slashCommands &&
(streamingState === StreamingState.Idle || (streamingState === StreamingState.Idle ||
streamingState === StreamingState.Responding || streamingState === StreamingState.Responding ||
streamingState === StreamingState.WaitingForConfirmation) && streamingState === StreamingState.WaitingForConfirmation) &&
+2 -6
View File
@@ -518,12 +518,8 @@ export const Composer = ({ isFocused = true }: { isFocused?: boolean }) => {
flexGrow={0} flexGrow={0}
flexShrink={0} flexShrink={0}
> >
{(!uiState.slashCommands || {uiState.isResuming && (
!uiState.isConfigInitialized || <ConfigInitDisplay message="Resuming session..." />
uiState.isResuming) && (
<ConfigInitDisplay
message={uiState.isResuming ? 'Resuming session...' : undefined}
/>
)} )}
{showUiDetails && ( {showUiDetails && (