We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74b1f73 commit 7787685Copy full SHA for 7787685
gui/src/hooks/useInputHistory.ts
@@ -54,7 +54,7 @@ export function useInputHistory(historyKey: string) {
54
return;
55
}
56
57
- setCurrentIndex(inputHistory.length + 1);
+ setCurrentIndex(Math.min(inputHistory.length + 1, MAX_HISTORY_LENGTH));
58
setInputHistory((prev) => {
59
return [...prev, inputValue].slice(-MAX_HISTORY_LENGTH);
60
});
0 commit comments