feat: add experimental chat panel#1486
Conversation
valerybugakov
left a comment
There was a problem hiding this comment.
Exciting! Thank you for the video overview. 🙌
I reviewed the PR, focusing on the implementation details, leaving UI/UX to @toolmantim.
| this.treeView = treeView | ||
| } | ||
|
|
||
| private async onDidReceiveMessage(message: WebviewMessage): Promise<void> { |
There was a problem hiding this comment.
Does it make sense to share part of the existing logic from ChatViewProvider with the new ChatPanelProvider to ensure we fix bugs for both implementations while ChatPanelProvider is behind the feature flag? Do we need to handle all the same messages as ChatViewProvider here?
toolmantim
left a comment
There was a problem hiding this comment.
Woohoo! Just gave it a test, and left you some testing notes in Slack.
To do items from @toolmantimEdit: moved to PR description under WIP |
Co-authored-by: Valery Bugakov <skymk1@gmail.com>
toolmantim
left a comment
There was a problem hiding this comment.
It's starting to feel much more solid now! The pre-existing bugs which you asked for repo-steps for seem to be fixed 🙌🏼
Left a few small suggestions and found a few more bugs in testing:
- Sign out with chat window open doesn't close existing chats, which has some odd side-effects:
Screen.Recording.2023-10-26.at.4.52.41.pm.mov
Screen.Recording.2023-10-26.at.4.52.41.pm.1.mov
- Sometimes it gets in a state where clicking the buttons in the chats treeview fail with command not found errors:
Screen.Recording.2023-10-26.at.7.38.06.pm.mov
- Creating new chats in succession causes some to fail to load:
Screen.Recording.2023-10-26.at.7.36.14.pm.mov
- This may be existing behaviour, but a blank unsaved editor seems to work but if you add some lines of code then it fails saying no file is open:
Screen.Recording.2023-10-26.at.4.54.00.pm.mov
Co-authored-by: Tim Lucas <t@toolmantim.com>
…into bee/new-chat-ui
Co-authored-by: Valery Bugakov <skymk1@gmail.com>
|
@toolmantim Thank you so much for reporting all the bugs you found! I think I fixed all the bugs you last reported 🤞 Can you give the latest commit a try and let me know if you find other bugs before I move onto implementing the items on the rest of the list (see PR description under WIP section)? 🙇♀️ |
toolmantim
left a comment
There was a problem hiding this comment.
Looks great! I just pushed some tweaks after playing with it for real.
…ch don't support inlay models. (#1490) ImaginaryEditor does not support InlayModel and throws an UnsupportedOperationException; IntentionPreviewEditor throws an IntentionPreviewUnsupportedOperationException: UnsupportedOperationException, etc. Fixes #1488, #1486, #1485, #1480, #1466, #1462, #1435, #1363 ## Test plan ``` ./gradlew test --tests InlayModelUtilTest ``` Ran the IDE and clicked between editors, requesting autocompletes.
Close https://github.com/sourcegraph/cody/issues/1522
New Chat UI
cody.experimental.chatPanelconfig that create separate views for commands, search, chats, and settings.How does it work
The ChatViewManager class manages different chat view provider instances and handles switching between them based on config, and uses currentProvider or sidebarViewProvider to run chat commands.
A chat view provider (ChatViewProvider or ChatPanelProvider) is a class that implements the VS Code WebviewViewProvider interface to display a webview or webview panel for chat.
The ChatViewManager maintains:
It decides which provider to use based on the experimentalChatPanel config:
To execute commands, it first checks currentProvider, and if not set, defaults to using sidebarViewProvider.
After executing the command, it sets currentProvider to the provider used.
Next
Here are the items to be completed in future PRs:
Test plan
You can switch between the new chat UI and the current one from Cody Setting under
New Chat UI:See video below for a quick walkthrough:
Demo_.New.Chat.UI.v0.mp4
WIP
To do items from @toolmantim
Bugs
pending for repro stepsChanges
TBD
I'm going to move the following items to a seperate PRs since they affect the current behavior: