mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-25 04:24:51 -07:00
Disallow floating promises. (#14605)
This commit is contained in:
committed by
GitHub
parent
3cf44acc08
commit
025e450ac2
@@ -294,6 +294,7 @@ export const AppContainer = (props: AppContainerProps) => {
|
||||
const staticExtraHeight = 3;
|
||||
|
||||
useEffect(() => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
(async () => {
|
||||
// Note: the program will not work if this fails so let errors be
|
||||
// handled by the global catch.
|
||||
@@ -384,6 +385,7 @@ export const AppContainer = (props: AppContainerProps) => {
|
||||
|
||||
// Initialize input history from logger (past sessions)
|
||||
useEffect(() => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
initializeFromLogger(logger);
|
||||
}, [logger, initializeFromLogger]);
|
||||
|
||||
@@ -984,6 +986,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
||||
const currentIde = ideClient.getCurrentIde();
|
||||
setCurrentIDE(currentIde || null);
|
||||
};
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
getIde();
|
||||
}, []);
|
||||
const shouldShowIdePrompt = Boolean(
|
||||
@@ -1109,6 +1112,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
||||
recordExitFail(config);
|
||||
}
|
||||
if (ctrlCPressCount > 1) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
handleSlashCommand('/quit', undefined, undefined, false);
|
||||
} else {
|
||||
ctrlCTimerRef.current = setTimeout(() => {
|
||||
@@ -1127,6 +1131,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
||||
recordExitFail(config);
|
||||
}
|
||||
if (ctrlDPressCount > 1) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
handleSlashCommand('/quit', undefined, undefined, false);
|
||||
} else {
|
||||
ctrlDTimerRef.current = setTimeout(() => {
|
||||
@@ -1143,6 +1148,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
||||
const handleIdePromptComplete = useCallback(
|
||||
(result: IdeIntegrationNudgeResult) => {
|
||||
if (result.userSelection === 'yes') {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
handleSlashCommand('/ide install');
|
||||
settings.setValue(
|
||||
SettingScope.User,
|
||||
@@ -1225,6 +1231,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
||||
config.getIdeMode() &&
|
||||
ideContextState
|
||||
) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
handleSlashCommand('/ide status');
|
||||
} else if (
|
||||
keyMatchers[Command.SHOW_MORE_LINES](key) &&
|
||||
@@ -1425,6 +1432,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
||||
}
|
||||
}
|
||||
};
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
fetchBannerTexts();
|
||||
|
||||
return () => {
|
||||
|
||||
Reference in New Issue
Block a user