File tree Expand file tree Collapse file tree 6 files changed +16
-4
lines changed
amazonq/src/app/amazonqScan
amazonq/webview/generators Expand file tree Collapse file tree 6 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,9 @@ export function init(appContext: AmazonQAppInitContext) {
70
70
AuthUtil . instance . secondaryAuth . onDidChangeActiveConnection ( ( ) => {
71
71
return debouncedEvent ( )
72
72
} )
73
+ AuthUtil . instance . regionProfileManager . onDidChangeRegionProfile ( ( ) => {
74
+ return debouncedEvent ( )
75
+ } )
73
76
74
77
Commands . register ( 'aws.amazonq.security.scan-statusbar' , async ( ) => {
75
78
if ( AuthUtil . instance . isConnectionExpired ( ) ) {
Original file line number Diff line number Diff line change @@ -94,10 +94,7 @@ export class WebViewContentGenerator {
94
94
}
95
95
96
96
const regionProfileString : string = JSON . stringify ( regionProfile )
97
-
98
- // AuthUtil.instance.getChatAuthState is throttled version which possibly return an old snapshot of auth state however webview initialization here requires the latest accurate
99
- // otherwise features will be disabled as auth still says it's not connected & profile selected
100
- const authState = ( await AuthUtil . instance . _getChatAuthState ( ) ) . amazonQ
97
+ const authState = ( await AuthUtil . instance . getChatAuthState ( ) ) . amazonQ
101
98
102
99
return `
103
100
<script type="text/javascript" src="${ javascriptEntrypoint . toString ( ) } " defer onload="init()"></script>
Original file line number Diff line number Diff line change @@ -100,4 +100,7 @@ export function init(appContext: AmazonQAppInitContext) {
100
100
AuthUtil . instance . secondaryAuth . onDidChangeActiveConnection ( ( ) => {
101
101
return debouncedEvent ( )
102
102
} )
103
+ AuthUtil . instance . regionProfileManager . onDidChangeRegionProfile ( ( ) => {
104
+ return debouncedEvent ( )
105
+ } )
103
106
}
Original file line number Diff line number Diff line change @@ -106,4 +106,7 @@ export function init(appContext: AmazonQAppInitContext) {
106
106
AuthUtil . instance . secondaryAuth . onDidChangeActiveConnection ( ( ) => {
107
107
return debouncedEvent ( )
108
108
} )
109
+ AuthUtil . instance . regionProfileManager . onDidChangeRegionProfile ( ( ) => {
110
+ return debouncedEvent ( )
111
+ } )
109
112
}
Original file line number Diff line number Diff line change @@ -67,6 +67,9 @@ export function init(appContext: AmazonQAppInitContext) {
67
67
AuthUtil . instance . secondaryAuth . onDidChangeActiveConnection ( ( ) => {
68
68
return debouncedEvent ( )
69
69
} )
70
+ AuthUtil . instance . regionProfileManager . onDidChangeRegionProfile ( ( ) => {
71
+ return debouncedEvent ( )
72
+ } )
70
73
71
74
showTransformationHub . register ( )
72
75
Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ export function init(appContext: AmazonQAppInitContext) {
68
68
AuthUtil . instance . secondaryAuth . onDidChangeActiveConnection ( ( ) => {
69
69
return debouncedEvent ( )
70
70
} )
71
+ AuthUtil . instance . regionProfileManager . onDidChangeRegionProfile ( ( ) => {
72
+ return debouncedEvent ( )
73
+ } )
71
74
testGenState . setChatControllers ( testChatControllerEventEmitters )
72
75
// TODO: Add testGen provider for creating new files after test generation if they does not exist
73
76
}
You can’t perform that action at this time.
0 commit comments