Use Alt+Up or Alt+Down in the input box to go through your last inputs and /commands.
Use ST's inbuilt extension installer with this URL: https://github.com/LenAnderson/SillyTavern-InputHistory
With the message input box in focus, press Alt
+ Arrow Up
to retrieve the previous message. Press Alt
+ Arrow Up
/ Arrow Down
to navigate the list of previous messages.
The last ten messages are remembered.
The memory persists between sessions.
SillyTavern version >=1.11.1