File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed
Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -688,17 +688,24 @@ export class ExtensionUse {
688688 return this . isFirstUseCurrentSession
689689 }
690690
691- this . isFirstUseCurrentSession = globals . globalState . get ( 'isExtensionFirstUse' )
692- if ( this . isFirstUseCurrentSession === undefined ) {
691+ // This is for sure not their first use
692+ const isFirstUse = globals . globalState . tryGet ( 'isExtensionFirstUse' , Boolean )
693+ if ( isFirstUse === false ) {
694+ this . isFirstUseCurrentSession = isFirstUse
695+ return this . isFirstUseCurrentSession
696+ }
697+
698+ if ( isAmazonQ ( ) ) {
699+ this . isFirstUseCurrentSession = true
700+ } else {
693701 // The variable in the store is not defined yet, fallback to checking if they have existing connections.
694702 this . isFirstUseCurrentSession = ! hasExistingConnections ( )
695-
696- getLogger ( ) . debug (
697- `isFirstUse: State not found, marking user as '${
698- this . isFirstUseCurrentSession ? '' : 'NOT '
699- } first use' since they 'did ${ this . isFirstUseCurrentSession ? 'NOT ' : '' } have existing connections'.`
700- )
701703 }
704+ getLogger ( ) . debug (
705+ `isFirstUse: State not found, marking user as '${
706+ this . isFirstUseCurrentSession ? '' : 'NOT '
707+ } first use' since they 'did ${ this . isFirstUseCurrentSession ? 'NOT ' : '' } have existing connections'.`
708+ )
702709
703710 // Update state, so next time it is not first use
704711 this . updateMemento ( 'isExtensionFirstUse' , false )
You can’t perform that action at this time.
0 commit comments