mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-28 23:11:19 -07:00
Disallow floating promises. (#14605)
This commit is contained in:
committed by
GitHub
parent
3cf44acc08
commit
025e450ac2
@@ -84,6 +84,7 @@ export function useShellHistory(
|
||||
const loadedHistory = await readHistoryFile(filePath);
|
||||
setHistory(loadedHistory.reverse()); // Newest first
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
loadHistory();
|
||||
}, [projectRoot, storage]);
|
||||
|
||||
@@ -97,6 +98,7 @@ export function useShellHistory(
|
||||
.filter(Boolean);
|
||||
setHistory(newHistory);
|
||||
// Write to file in reverse order (oldest first)
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
writeHistoryFile(historyFilePath, [...newHistory].reverse());
|
||||
setHistoryIndex(-1);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user