mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-28 20:27:08 -07:00
Disallow floating promises. (#14605)
This commit is contained in:
committed by
GitHub
parent
3cf44acc08
commit
025e450ac2
@@ -41,6 +41,7 @@ export const FolderTrustDialog: React.FC<FolderTrustDialogProps> = ({
|
||||
}, 250);
|
||||
}
|
||||
};
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
doRelaunch();
|
||||
}, [isRestarting]);
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ export const IdeTrustChangeDialog = ({ reason }: IdeTrustChangeDialogProps) => {
|
||||
useKeypress(
|
||||
(key) => {
|
||||
if (key.name === 'r' || key.name === 'R') {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
relaunchApp();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -373,6 +373,7 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
|
||||
useMouse(
|
||||
(event: MouseEvent) => {
|
||||
if (event.name === 'right-release') {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
handleClipboardPaste();
|
||||
}
|
||||
},
|
||||
@@ -779,12 +780,14 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
|
||||
|
||||
// External editor
|
||||
if (keyMatchers[Command.OPEN_EXTERNAL_EDITOR](key)) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
buffer.openInExternalEditor();
|
||||
return;
|
||||
}
|
||||
|
||||
// Ctrl+V for clipboard paste
|
||||
if (keyMatchers[Command.PASTE_CLIPBOARD](key)) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
handleClipboardPaste();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -66,6 +66,7 @@ export const MultiFolderTrustDialog: React.FC<MultiFolderTrustDialogProps> = ({
|
||||
useKeypress(
|
||||
(key) => {
|
||||
if (key.name === 'escape') {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
handleCancel();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -49,6 +49,7 @@ export const Notifications = () => {
|
||||
};
|
||||
|
||||
if (isScreenReaderEnabled) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
checkScreenReader();
|
||||
}
|
||||
}, [isScreenReaderEnabled]);
|
||||
@@ -69,6 +70,7 @@ export const Notifications = () => {
|
||||
}
|
||||
}
|
||||
};
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
writeScreenReaderNudgeFile();
|
||||
}, [showScreenReaderNudge]);
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ export function PermissionsModifyTrustDialog({
|
||||
if (needsRestart && key.name === 'r') {
|
||||
const success = commitTrustLevelChange();
|
||||
if (success) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
relaunchApp();
|
||||
} else {
|
||||
onExit();
|
||||
|
||||
@@ -665,6 +665,7 @@ const useLoadSessions = (config: Config, state: SessionBrowserState) => {
|
||||
}
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
loadSessions();
|
||||
}, [config, setSessions, setLoading, setError]);
|
||||
|
||||
@@ -693,6 +694,7 @@ const useLoadSessions = (config: Config, state: SessionBrowserState) => {
|
||||
}
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
loadFullContent();
|
||||
}, [
|
||||
isSearchMode,
|
||||
|
||||
@@ -139,6 +139,7 @@ export function SettingsDialog({
|
||||
setScrollOffset(0);
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
doSearch();
|
||||
|
||||
return () => {
|
||||
|
||||
@@ -57,6 +57,7 @@ export const ToolConfirmationMessage: React.FC<
|
||||
setIsDiffingEnabled(client?.isDiffingEnabled() ?? false);
|
||||
}
|
||||
};
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
getIdeClient();
|
||||
}
|
||||
return () => {
|
||||
@@ -75,6 +76,7 @@ export const ToolConfirmationMessage: React.FC<
|
||||
);
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
onConfirm(outcome);
|
||||
};
|
||||
|
||||
@@ -84,6 +86,7 @@ export const ToolConfirmationMessage: React.FC<
|
||||
(key) => {
|
||||
if (!isFocused) return;
|
||||
if (key.name === 'escape' || (key.ctrl && key.name === 'c')) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
handleConfirm(ToolConfirmationOutcome.Cancel);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user