Local History: Set Max Total Size (MB)…
history.setMaxTotalMb Cap the total size of local-history storage in megabytes.
How to run it
Open the command palette (M-x in the Emacs keymap) and search for Local History: Set Max Total Size (MB)…, then press Enter. It has no default keybinding, but you can bind one in Settings → Keymaps.