[VS Code] Show the current Duo Chat status to the user
Problem to Solve
Users have no way of viewing the current Duo Chat status during initialization, during errors, and when Chat is disabled. In all of these cases, the Duo Chat tab and pane are hidden.
This can cause confusion - imagine a user has purchased the Duo add-on, but the root group of their current project does not have Duo enabled. The would not be able to find the Duo Chat tab. We do not currently communicate any reason for this state to the user.
In addition, Duo Chat initialization can take up to a minute for large repos: #1710
Proposed Solution
Sort Term - Show STATUS Button in Webview Header
Show the status in special 'health' area. Perhaps within the 'GitLab Workflow' tab, underneath the issues/MRs lists. This solves the above problem - not showing a tab where the user hasn't purchased Duo Chat.
This step in implementation is a intermediary solution to provide users with more clarity on the state of Duo Chat. This would include a button in the header of the Duo Chat panel that would open the drop down panel that is already implemented in VSCode seen below:
The current state of the dropdown panel would not change at this point, this step gives solely gives users a button in the Duo Chat panel to get to this drop dropdown. This work is currently blocked by Refactoring the Current Duo Chat State Manager.
More information will be added to this panel once the refactor to Include More States in the Duo Chat State Manager is completed. However, this issue is NOT BLOCKED by that work.
Note: This still does not solve the problem of when a user has bought Duo Chat but the feature is not enabled at the root level or when a user has not bought Duo Chat and we want to display a link to purchasing plans.
Long Term - [VS Code] Show Duo Chat State in Webview Pane (#1755 - closed)
Notes
In VS Code we currently support multiple accounts, but the Duo Chat internals only use the first account found with Duo access. There may be an issue here where we display the wrong status because the wrong account was used.
We're in-progress with a migration of Chat to the Language Server, we should ensure the implementation is compatible with that. It doesn't need to 100% be implemented in the LS, but other extensions may find the view to also be useful.
