use cookie to record the open/close state of `tool window`