fix(cli): Make IDE trust listener also listen to IDE status changes a… (#9783)

This commit is contained in:
shrutip90
2025-09-29 13:54:12 -07:00
committed by GitHub
parent 0c3fcb7030
commit d6933c77ba
8 changed files with 440 additions and 32 deletions
+7 -9
View File
@@ -779,7 +779,10 @@ Logging in with Google... Please restart Gemini CLI to continue.
const { isFolderTrustDialogOpen, handleFolderTrustSelect, isRestarting } =
useFolderTrust(settings, setIsTrustedFolder);
const { needsRestart: ideNeedsRestart } = useIdeTrustListener();
const {
needsRestart: ideNeedsRestart,
restartReason: ideTrustRestartReason,
} = useIdeTrustListener();
const isInitialMount = useRef(true);
useEffect(() => {
@@ -973,14 +976,6 @@ Logging in with Google... Please restart Gemini CLI to continue.
);
useKeypress(handleGlobalKeypress, { isActive: true });
useKeypress(
(key) => {
if (key.name === 'r' || key.name === 'R') {
process.exit(0);
}
},
{ isActive: showIdeRestartPrompt },
);
// Update terminal title with Gemini CLI status and thoughts
useEffect(() => {
@@ -1051,6 +1046,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
isAuthDialogOpen ||
isEditorDialogOpen ||
showPrivacyNotice ||
showIdeRestartPrompt ||
!!proQuotaRequest;
const pendingHistoryItems = useMemo(
@@ -1133,6 +1129,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
currentIDE,
updateInfo,
showIdeRestartPrompt,
ideTrustRestartReason,
isRestarting,
extensionsUpdateState,
activePtyId,
@@ -1209,6 +1206,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
currentIDE,
updateInfo,
showIdeRestartPrompt,
ideTrustRestartReason,
isRestarting,
currentModel,
extensionsUpdateState,