Adds a button to refresh the chat in the sidebar. Previously, there was no way to reset/clear the state of the chat view in the sidebar
Adds a button to move the chat session in the sidebar to a new editor panel.
Implementation notes
Populating the initial context chips in the chat input depends on some behavior that is only triggered on the first-time render. In order to trigger this, we key the chat input component on the chat session ID, rather than just the array index. so that these components are recreated when the chat session changes on reset. Otherwise, the existing component from the previous session would be reused, and the input would not be populated with the initial context chips on reset.
Test plan
Tested locally. Note: chat in the sidebar is not yet enabled, so this should have no effect for now.
https://github.com/sourcegraph/cody/assets/1646931/48ebfc54-ebb2-4039-ac15-c5dc67344f2c
Changes
Implementation notes
Populating the initial context chips in the chat input depends on some behavior that is only triggered on the first-time render. In order to trigger this, we key the chat input component on the chat session ID, rather than just the array index. so that these components are recreated when the chat session changes on reset. Otherwise, the existing component from the previous session would be reused, and the input would not be populated with the initial context chips on reset.
Test plan
Tested locally. Note: chat in the sidebar is not yet enabled, so this should have no effect for now.