@@ -920,7 +920,7 @@ class CopilotTokenTracker implements vscode.Disposable {
920920 // Re-render open panels when display settings change
921921 context . subscriptions . push (
922922 vscode . workspace . onDidChangeConfiguration ( e => {
923- if ( e . affectsConfiguration ( 'copilotTokenTracker .display' ) ) {
923+ if ( e . affectsConfiguration ( 'aiEngineeringFluency .display' ) ) {
924924 this . refreshOpenPanelsForSettingChange ( ) ;
925925 }
926926 } )
@@ -1828,7 +1828,7 @@ class CopilotTokenTracker implements vscode.Disposable {
18281828 }
18291829
18301830 private getCompactNumbersSetting ( ) : boolean {
1831- return vscode . workspace . getConfiguration ( 'copilotTokenTracker ' ) . get < boolean > ( 'display.compactNumbers' , true ) ;
1831+ return vscode . workspace . getConfiguration ( 'aiEngineeringFluency ' ) . get < boolean > ( 'display.compactNumbers' , true ) ;
18321832 }
18331833
18341834 private refreshOpenPanelsForSettingChange ( ) : void {
@@ -4839,7 +4839,7 @@ class CopilotTokenTracker implements vscode.Disposable {
48394839 case 'suppressUnknownTool' : {
48404840 const toolName = message . toolName as string ;
48414841 if ( toolName ) {
4842- const config = vscode . workspace . getConfiguration ( 'copilotTokenTracker ' ) ;
4842+ const config = vscode . workspace . getConfiguration ( 'aiEngineeringFluency ' ) ;
48434843 const current = config . get < string [ ] > ( 'suppressedUnknownTools' , [ ] ) ;
48444844 if ( ! current . includes ( toolName ) ) {
48454845 await config . update ( 'suppressedUnknownTools' , [ ...current , toolName ] , vscode . ConfigurationTarget . Global ) ;
@@ -7429,7 +7429,7 @@ ${hashtag}`;
74297429 if ( choice === "Open Settings" ) {
74307430 vscode . commands . executeCommand (
74317431 "workbench.action.openSettings" ,
7432- "copilotTokenTracker .backend" ,
7432+ "aiEngineeringFluency .backend" ,
74337433 ) ;
74347434 }
74357435 } ) ;
@@ -7440,15 +7440,15 @@ ${hashtag}`;
74407440 await this . dispatch ( 'openSettings:diagnostics' , ( ) =>
74417441 vscode . commands . executeCommand (
74427442 "workbench.action.openSettings" ,
7443- "copilotTokenTracker .backend" ,
7443+ "aiEngineeringFluency .backend" ,
74447444 )
74457445 ) ;
74467446 break ;
74477447 case "openDisplaySettings" :
74487448 await this . dispatch ( 'openDisplaySettings:diagnostics' , ( ) =>
74497449 vscode . commands . executeCommand (
74507450 "workbench.action.openSettings" ,
7451- "copilotTokenTracker .display" ,
7451+ "aiEngineeringFluency .display" ,
74527452 )
74537453 ) ;
74547454 break ;
@@ -7775,7 +7775,7 @@ ${hashtag}`;
77757775 * Get backend storage information for diagnostics
77767776 */
77777777 private async getBackendStorageInfo ( ) : Promise < any > {
7778- const config = vscode . workspace . getConfiguration ( "copilotTokenTracker " ) ;
7778+ const config = vscode . workspace . getConfiguration ( "aiEngineeringFluency " ) ;
77797779 const enabled = config . get < boolean > ( "backend.enabled" , false ) ;
77807780 const storageAccount = config . get < string > ( "backend.storageAccount" , "" ) ;
77817781 const subscriptionId = config . get < string > ( "backend.subscriptionId" , "" ) ;
@@ -8266,7 +8266,7 @@ ${hashtag}`;
82668266 ) ;
82678267
82688268 const suppressedUnknownTools = vscode . workspace
8269- . getConfiguration ( 'copilotTokenTracker ' )
8269+ . getConfiguration ( 'aiEngineeringFluency ' )
82708270 . get < string [ ] > ( 'suppressedUnknownTools' , [ ] ) ;
82718271
82728272 const initialData = stats ? JSON . stringify ( {
@@ -8334,10 +8334,72 @@ ${hashtag}`;
83348334 }
83358335}
83368336
8337- export function activate ( context : vscode . ExtensionContext ) {
8337+ /**
8338+ * One-time migration: copies any user-set values from the old `copilotTokenTracker.*` namespace
8339+ * to the new `aiEngineeringFluency.*` namespace. The old settings remain in package.json
8340+ * with `deprecationMessage` so VS Code continues to show them as deprecated; this function
8341+ * handles users who already had values configured before the rename.
8342+ *
8343+ * Leave this migration in place for a couple of extension versions before removing it.
8344+ */
8345+ async function migrateSettingsIfNeeded ( log : ( m : string ) => void ) : Promise < void > {
8346+ const keys = [
8347+ 'display.compactNumbers' ,
8348+ 'backend.enabled' ,
8349+ 'backend.backend' ,
8350+ 'backend.authMode' ,
8351+ 'backend.datasetId' ,
8352+ 'backend.sharingProfile' ,
8353+ 'backend.userId' ,
8354+ 'backend.shareWithTeam' ,
8355+ 'backend.shareWorkspaceMachineNames' ,
8356+ 'backend.shareConsentAt' ,
8357+ 'backend.userIdentityMode' ,
8358+ 'backend.userIdMode' ,
8359+ 'backend.subscriptionId' ,
8360+ 'backend.resourceGroup' ,
8361+ 'backend.storageAccount' ,
8362+ 'backend.aggTable' ,
8363+ 'backend.eventsTable' ,
8364+ 'backend.lookbackDays' ,
8365+ 'backend.includeMachineBreakdown' ,
8366+ 'backend.blobUploadEnabled' ,
8367+ 'backend.blobContainerName' ,
8368+ 'backend.blobUploadFrequencyHours' ,
8369+ 'backend.blobCompressFiles' ,
8370+ 'sampleDataDirectory' ,
8371+ 'suppressedUnknownTools' ,
8372+ ] ;
8373+
8374+ const oldCfg = vscode . workspace . getConfiguration ( 'copilotTokenTracker' ) ;
8375+ const newCfg = vscode . workspace . getConfiguration ( 'aiEngineeringFluency' ) ;
8376+
8377+ let migrated = 0 ;
8378+ for ( const key of keys ) {
8379+ const insp = oldCfg . inspect ( key ) ;
8380+ if ( insp ?. globalValue !== undefined ) {
8381+ await newCfg . update ( key , insp . globalValue , vscode . ConfigurationTarget . Global ) ;
8382+ migrated ++ ;
8383+ }
8384+ if ( insp ?. workspaceValue !== undefined ) {
8385+ await newCfg . update ( key , insp . workspaceValue , vscode . ConfigurationTarget . Workspace ) ;
8386+ migrated ++ ;
8387+ }
8388+ }
8389+
8390+ if ( migrated > 0 ) {
8391+ log ( `Migrated ${ migrated } setting(s) from 'copilotTokenTracker' to 'aiEngineeringFluency' namespace.` ) ;
8392+ }
8393+ }
8394+
8395+ export async function activate ( context : vscode . ExtensionContext ) {
83388396 // Create the token tracker
83398397 const tokenTracker = new CopilotTokenTracker ( context . extensionUri , context ) ;
83408398
8399+ // Migrate settings from the old copilotTokenTracker namespace to aiEngineeringFluency.
8400+ // Run before any other settings are read so the new keys are populated first.
8401+ await migrateSettingsIfNeeded ( ( m ) => ( tokenTracker as any ) . log ( m ) ) ;
8402+
83418403 // Wire up backend facade and commands so the diagnostics webview can launch the
83428404 // configuration wizard. Uses tokenTracker logging and helpers via casting to any.
83438405 try {
0 commit comments