sourcegraph / cody

AI that knows your entire codebase
https://cody.dev
Apache License 2.0
2.26k stars 215 forks source link

Chat: enable sidebar refresh and moving from sidebar to editor #4729

Closed beyang closed 4 days ago

beyang commented 4 days ago

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.

sqs commented 4 days ago

Looks really nice. Looking fwd to using this