mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-04 18:31:36 -07:00
Fix bug where users are unable to re-enter disconnected terminals. (#8765)
This commit is contained in:
@@ -86,7 +86,7 @@ import { useWorkspaceMigration } from './hooks/useWorkspaceMigration.js';
|
||||
import { useSessionStats } from './contexts/SessionContext.js';
|
||||
import { useGitBranchName } from './hooks/useGitBranchName.js';
|
||||
import { useExtensionUpdates } from './hooks/useExtensionUpdates.js';
|
||||
import { FocusContext } from './contexts/FocusContext.js';
|
||||
import { ShellFocusContext } from './contexts/ShellFocusContext.js';
|
||||
|
||||
const CTRL_EXIT_PROMPT_DURATION_MS = 1000;
|
||||
|
||||
@@ -135,7 +135,7 @@ export const AppContainer = (props: AppContainerProps) => {
|
||||
initializationResult.themeError,
|
||||
);
|
||||
const [isProcessing, setIsProcessing] = useState<boolean>(false);
|
||||
const [shellFocused, setShellFocused] = useState(false);
|
||||
const [embeddedShellFocused, setEmbeddedShellFocused] = useState(false);
|
||||
|
||||
const [geminiMdFileCount, setGeminiMdFileCount] = useState<number>(
|
||||
initializationResult.geminiMdFileCount,
|
||||
@@ -557,10 +557,10 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
setModelSwitchedFromQuotaError,
|
||||
refreshStatic,
|
||||
() => cancelHandlerRef.current(),
|
||||
setShellFocused,
|
||||
setEmbeddedShellFocused,
|
||||
terminalWidth,
|
||||
terminalHeight,
|
||||
shellFocused,
|
||||
embeddedShellFocused,
|
||||
);
|
||||
|
||||
// Auto-accept indicator
|
||||
@@ -917,8 +917,8 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
) {
|
||||
setConstrainHeight(false);
|
||||
} else if (keyMatchers[Command.TOGGLE_SHELL_INPUT_FOCUS](key)) {
|
||||
if (activePtyId || shellFocused) {
|
||||
setShellFocused((prev) => !prev);
|
||||
if (activePtyId || embeddedShellFocused) {
|
||||
setEmbeddedShellFocused((prev) => !prev);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -941,7 +941,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
handleSlashCommand,
|
||||
cancelOngoingRequest,
|
||||
activePtyId,
|
||||
shellFocused,
|
||||
embeddedShellFocused,
|
||||
settings.merged.general?.debugKeystrokeLogging,
|
||||
],
|
||||
);
|
||||
@@ -1069,7 +1069,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
isRestarting,
|
||||
extensionsUpdateState,
|
||||
activePtyId,
|
||||
shellFocused,
|
||||
embeddedShellFocused,
|
||||
}),
|
||||
[
|
||||
historyManager.history,
|
||||
@@ -1145,7 +1145,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
currentModel,
|
||||
extensionsUpdateState,
|
||||
activePtyId,
|
||||
shellFocused,
|
||||
embeddedShellFocused,
|
||||
],
|
||||
);
|
||||
|
||||
@@ -1207,9 +1207,9 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
startupWarnings: props.startupWarnings || [],
|
||||
}}
|
||||
>
|
||||
<FocusContext.Provider value={isFocused}>
|
||||
<ShellFocusContext.Provider value={isFocused}>
|
||||
<App />
|
||||
</FocusContext.Provider>
|
||||
</ShellFocusContext.Provider>
|
||||
</AppContext.Provider>
|
||||
</ConfigContext.Provider>
|
||||
</UIActionsContext.Provider>
|
||||
|
||||
Reference in New Issue
Block a user