@@ -419,15 +419,29 @@ describe('getClientName', function () {
419419 assert . ok ( isSageMakerStub . calledOnceWith ( 'SMUS' ) )
420420 } )
421421
422+ it ( 'returns "AmazonQ-For-SMAI-CE" when in SMAI environment' , function ( ) {
423+ isSageMakerStub . withArgs ( 'SMUS' ) . returns ( false )
424+ isSageMakerStub . withArgs ( 'SMAI' ) . returns ( true )
425+ sandbox . stub ( vscode . env , 'appName' ) . value ( 'SageMaker Code Editor' )
426+
427+ const result = getClientName ( )
428+
429+ assert . strictEqual ( result , 'AmazonQ-For-SMAI-CE' )
430+ assert . ok ( isSageMakerStub . calledWith ( 'SMUS' ) )
431+ assert . ok ( isSageMakerStub . calledWith ( 'SMAI' ) )
432+ } )
433+
422434 it ( 'returns vscode app name when not in SMUS environment' , function ( ) {
423435 const mockAppName = 'Visual Studio Code'
424436 isSageMakerStub . withArgs ( 'SMUS' ) . returns ( false )
437+ isSageMakerStub . withArgs ( 'SMAI' ) . returns ( false )
425438 sandbox . stub ( vscode . env , 'appName' ) . value ( mockAppName )
426439
427440 const result = getClientName ( )
428441
429442 assert . strictEqual ( result , mockAppName )
430- assert . ok ( isSageMakerStub . calledOnceWith ( 'SMUS' ) )
443+ assert . ok ( isSageMakerStub . calledWith ( 'SMUS' ) )
444+ assert . ok ( isSageMakerStub . calledWith ( 'SMAI' ) )
431445 } )
432446
433447 it ( 'handles undefined app name gracefully' , function ( ) {
0 commit comments