Initial support for `reset` on history panel.

The code structure has been changed a lot and I don't know how to merge them. So I send a new PR. :)