## Description In some situations the buttons to insert code snippets as new cells in a notebook seem to be disabled while they shouldn't. ## Reproduce Create a new notebook and click on the `cut` icon in the toolbar several times. With `jupyterlab-chat`: https://github.com/user-attachments/assets/dda4507d-72d3-483a-9cae-a9b3b36e1bff With an extension using `buildChatSidebar` from `@jupyter/chat`: https://github.com/user-attachments/assets/3b7e3a29-f265-4d74-b245-bb43678e231f ## Expected behavior The buttons should always be enabled when there is a notebook with the focus.