Adding in a history buffer (#38)

Up and down arrows traverse the command history.
This commit is contained in:
Evan Senter
2025-04-19 14:31:59 +01:00
committed by GitHub
parent 2f5f6baf0f
commit 75ecb4a81f
4 changed files with 164 additions and 18 deletions

View File

@@ -112,7 +112,7 @@ export const useGeminiStream = (
const maybeCommand = trimmedQuery.split(/\s+/)[0];
if (allowlistedCommands.includes(maybeCommand)) {
exec(trimmedQuery, (error, stdout, stderr) => {
exec(trimmedQuery, (error, stdout) => {
const timestamp = getNextMessageId(userMessageTimestamp);
// TODO: handle stderr, error
addHistoryItem(