@@ -28,6 +28,7 @@ import { AuthUtil } from '../util/authUtil'
2828import { submitFeedback } from '../../feedback/vue/submitFeedback'
2929import { focusAmazonQPanel } from '../../codewhispererChat/commands/registerCommands'
3030import { isWeb } from '../../shared/extensionGlobals'
31+ import { getLogger } from '../../shared/logger/logger'
3132
3233export function createAutoSuggestions ( running : boolean ) : DataQuickPickItem < 'autoSuggestions' > {
3334 const labelResume = localize ( 'AWS.codewhisperer.resumeCodeWhispererNode.label' , 'Resume Auto-Suggestions' )
@@ -238,7 +239,10 @@ export function switchToAmazonQNode(): DataQuickPickItem<'openChatPanel'> {
238239 data : 'openChatPanel' ,
239240 label : 'Open Chat Panel' ,
240241 iconPath : getIcon ( 'vscode-comment' ) ,
241- onClick : ( ) => focusAmazonQPanel . execute ( placeholder , 'codewhispererQuickPick' ) ,
242+ onClick : ( ) =>
243+ focusAmazonQPanel . execute ( placeholder , 'codewhispererQuickPick' ) . catch ( ( e ) => {
244+ getLogger ( ) . error ( 'focusAmazonQPanel failed: %s' , e )
245+ } ) ,
242246 }
243247}
244248
@@ -247,7 +251,9 @@ export function createSignIn(): DataQuickPickItem<'signIn'> {
247251 const icon = getIcon ( 'vscode-account' )
248252
249253 let onClick = ( ) => {
250- void focusAmazonQPanel . execute ( placeholder , 'codewhispererQuickPick' )
254+ focusAmazonQPanel . execute ( placeholder , 'codewhispererQuickPick' ) . catch ( ( e ) => {
255+ getLogger ( ) . error ( 'focusAmazonQPanel failed: %s' , e )
256+ } )
251257 }
252258 if ( isWeb ( ) ) {
253259 // TODO: nkomonen, call a Command instead
0 commit comments