-
Notifications
You must be signed in to change notification settings - Fork 6
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
Simplify WebView initialization #98
base: main
Are you sure you want to change the base?
Conversation
Let's treat it as an experiment for now. There are some nice concepts here, that we could potentially bring to the main, if it will be stable enough. |
# Conflicts: # src/Cody.Core/Infrastructure/WebViewsManager.cs # src/Cody.VisualStudio.Tests/ChatLoggedBasicTests.cs # src/Cody.VisualStudio.Tests/ChatNotLoggedStateTests.cs # src/Cody.VisualStudio/Client/AgentClientProviderOptions.cs # src/Cody.VisualStudio/CodyPackage.cs
@abeatrix I have made improvements to the code, please check it out |
|
# Conflicts: # src/Cody.UI/Views/MainView.xaml
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.
It needs a little more work. Based on that PR, I will create a separate branch that will "transplant" simplified control made by Tomasz, with additional changes.
I'm marking this PR as draft, so it won't be accidently merged.
This PR refactors the code associated with webview. The changes allow to:
Most of the code related to webview is now in the
WebViewNotificationHandlers.cs
andCodyWebView.cs
files. The code takes advantage of the fact that webview loads files from disk and no longer needs the results returned by the agent during initialization (e.g. SetHtml notification). This means that the webview can now load independently of notifications from the agent which greatly simplifies the entire code.