File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -836,6 +836,16 @@ export const createKimicodePlugin = (providerId: string) => async (
836836 lastAccountIndex = account . index ;
837837 }
838838
839+ // Show toast when switching accounts (debounced).
840+ const accountCount = accountManager . getAccountCount ( ) ;
841+ if ( accountCount > 1 && accountManager . shouldShowAccountToast ( account . index ) ) {
842+ const accountLabel = account . email || `Account ${ account . index + 1 } ` ;
843+ const enabledAccounts = accountManager . getEnabledAccounts ( ) ;
844+ const enabledPosition = enabledAccounts . findIndex ( a => a . index === account . index ) + 1 ;
845+ await showToast ( `Using ${ accountLabel } (${ enabledPosition } /${ accountCount } )` , "info" ) ;
846+ accountManager . markToastShown ( account . index ) ;
847+ }
848+
839849 // Resolve/refresh the account's access token.
840850 let accountAuth = resolveCachedAuth ( accountManager . toAuthDetails ( account ) ) ;
841851 if ( accessTokenExpired ( accountAuth ) ) {
You can’t perform that action at this time.
0 commit comments