You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(amazonq): Sync IDE windows for Amazon Q auth state and region profile selection (#7320)
## Problem
The auth state and region profile selection is not sycned between
different IDE windows
## Solution
#### Auth state
* Add an `ssoCacheWatcher` to the LSP auth client, with hooks on
`onDidCreate` and `onDidDelete`
* In the `AuthUtil`, add the following handlers:
* `onDidCreate`: trigger a restore flow to fetch the latest auth state
* `onDidDelete`: trigger a logout
#### Region profile
* Add a `GlobalStatePoller` util that polls the global state value every
second, and call a handler if the value updates
* In `RegionProfileManager` add the poller for the region profile global
state variable and add a handler that switches the profile
## Testing
https://github.com/user-attachments/assets/8cdf6abd-94bd-4e60-9bcf-a60f42d1847e
---
- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
0 commit comments