-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cody: Improve chat history #52904
Cody: Improve chat history #52904
Conversation
@abeatrix @toolmantim Requesting review for this PR. |
@deepak2431 Thanks for the ping! I have tagged my team for review and we will get to this asap, thank you so much for the PR ❤️ |
Thanks a lot, @abeatrix. I was looking to add more E2E tests for this. Just a question, how to run the extension in browser mode so I can look over the proper selectors to pick and attach events to it? |
@deepak2431 if you start the e2e test in debug mode and then hit record in the pop up console, it will show you the name of each selector you hover or click on (all thanks to @philipp-spiess 🙏 ) |
@abeatrix Thanks, Got that. This works fantastic as it captures most of it during the record. |
@abeatrix Added the tests. It was fun to write tests by recording the events in sequential order to get the selectors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments inline. The new behavior makes a lot more sense to me so thank you so much for working on this 🙇
In addition, the Clear History button is still clickable if you remove the history item one by one. I tried updating it to disabled={!userHistory || !Object.keys(userHistory).length}
and it fixed it for me :)
Thanks a lot for the review @abeatrix, and for thoroughly testing it. I will make all the requested changes here soon. |
…o deepak/chat-history
Approved! Once the conflict is resolved, we can merge this 🎉 thank you so much for the great work! |
…o deepak/chat-history
Thanks a lot, @abeatrix, for the complete review. I have resolved the conflicts so all good to be merged now! |
@deepak2431 i tried to merge but your PR is not passing the e2e tests 🤔 |
@abeatrix Hmm, not sure, as it's passing all of them here 👀 |
@deepak2431 I think #53224 should fix the build errors. Can you merge main into this branch, so we can see? Thanks! |
…o deepak/chat-history
@toolmantim I have merged the main and updated the integration test, which I saw now was breaking because we can now load the last chat. So, we need to clear the history after each test gets completed. All the E2E tests are passing locally. I hope now the build will succeed as in the logs it shows E2E tests failing, but I'm not sure why! |
@philipp-spiess @abeatrix @toolmantim Thanks a lot. Finally, I can see that the required failing build is successful in this PR! |
Yeah it seems like there's something flaky with the inline assist tests but it passed after the retry. 🤔 (cc @abeatrix) we should try and find out why that's happening (it seems to only be running into this issue with the inline assist tests) This is unrelated to your changes though so let's land these 🚀 |
This PR closes #52544, #52848, #52889 and #52890. The issues mostly overlapped, so I handled it in this PR. Changes made: 1. Add history to the history list on each new conversation started. 2. Display the last human message in history instead of the assistant message. 3. Add a delete button to delete individual chats from history. 4. Load the most recent chat, if available, from the history. 5. Fix the loading of context files. 6. Load the history messages to the end of the scroll position. ## Test plan All E2E tests have passed. https://www.loom.com/share/3dca98dd0db94c298df38ab79c5e72d1 --------- Co-authored-by: Philipp Spiess <hello@philippspiess.com>
This PR closes sourcegraph/cody#339, #52848, #52889 and #52890.
The issues mostly overlapped, so I handled it in this PR.
Changes made:
Test plan
All E2E tests have passed.
https://www.loom.com/share/3dca98dd0db94c298df38ab79c5e72d1